:root {
  color-scheme: light dark;
  --brand: #0284c7;
  --brand-strong: #0369a1;
  --button-bg: #0369a1;
  --button-bg-hover: #075985;
  --button-text: #ffffff;
  --accent: #7c3aed;
  --success: #047857;
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #dbe3ec;
  --text: #172033;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --focus: #0ea5e9;
  --radius: 0.5rem;
  --content-width: 72rem;
  font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #38bdf8;
    --brand-strong: #7dd3fc;
    --button-bg: #38bdf8;
    --button-bg-hover: #7dd3fc;
    --button-text: #082f49;
    --accent: #a78bfa;
    --success: #34d399;
    --page-bg: #0b1020;
    --surface: #141b2d;
    --surface-muted: #1b2438;
    --border: #2b3851;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --focus: #38bdf8;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.75;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-strong);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--page-bg);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--page-bg);
  background: color-mix(in srgb, var(--page-bg) 92%, transparent);
  backdrop-filter: blur(12px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--content-width));
  min-height: 4.25rem;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.header-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.button-primary {
  background: var(--button-bg);
  color: var(--button-text);
}

.button-primary:hover {
  background: var(--button-bg-hover);
  text-decoration: none;
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--brand);
  text-decoration: none;
}

.guide-hero {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.guide-hero-inner {
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding: 3.25rem 0 2.75rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  padding: 0;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: 0.4rem;
  content: '/';
}

.breadcrumbs a {
  color: inherit;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  max-width: 18em;
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.lead {
  max-width: 44rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  gap: 0.75rem;
}

.key-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2rem 0 0;
  padding: 0;
  gap: 0.75rem;
  list-style: none;
}

.key-points li {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--success);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.product-visual {
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding: 2.5rem 0;
}

.product-visual img {
  width: min(100%, 38rem);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgb(15 23 42 / 12%);
}

.product-visual figcaption {
  width: min(100%, 38rem);
  margin: 0.75rem auto 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 46rem) 15rem;
  align-items: start;
  width: min(100% - 2rem, 64rem);
  margin: 0 auto;
  padding: 1rem 0 5rem;
  gap: 3rem;
}

.article-content > section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
}

.article-content > section:first-child {
  border-top: 0;
}

.article-content h2 {
  margin-bottom: 1rem;
  font-size: 1.65rem;
}

.article-content h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.15rem;
}

.article-content p,
.article-content ul,
.article-content ol {
  color: var(--text-secondary);
}

.article-content li + li {
  margin-top: 0.55rem;
}

.toc {
  position: sticky;
  top: 5.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc h2 {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.toc li + li {
  margin-top: 0.45rem;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--accent);
  background: var(--surface-muted);
}

.callout strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.comparison {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison caption {
  margin-bottom: 0.65rem;
  color: var(--text-muted);
  text-align: left;
}

.comparison th,
.comparison td {
  padding: 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.comparison th {
  background: var(--surface-muted);
  color: var(--text);
}

.comparison td {
  color: var(--text-secondary);
}

.steps {
  padding-left: 1.35rem;
}

.steps li::marker {
  color: var(--brand-strong);
  font-weight: 700;
}

.related-guides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0 0;
  padding: 0;
  gap: 0.75rem;
  list-style: none;
}

.related-guides a {
  display: block;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.related-guides a:hover {
  border-color: var(--brand);
}

.related-guides span {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.final-cta {
  padding: 3.5rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  text-align: center;
}

.final-cta-inner {
  width: min(100%, 44rem);
  margin: 0 auto;
}

.final-cta h2 {
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
}

.final-cta p {
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
}

.site-footer {
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.65rem;
  gap: 0.9rem;
}

.footer-links a {
  color: var(--text-secondary);
}

@media (max-width: 800px) {
  .article-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toc {
    position: static;
    grid-row: 1;
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    min-height: 3.75rem;
  }

  .brand span,
  .header-link {
    display: none;
  }

  .guide-hero-inner {
    padding: 2.25rem 0 2rem;
  }

  h1 {
    font-size: 2.15rem;
  }

  .lead {
    font-size: 1rem;
  }

  .key-points,
  .related-guides {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .comparison-wrap {
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
