:root {
  color-scheme: light;
  --bg: #f4f3f6;
  --surface: #ffffff;
  --surface-soft: #ebe9ef;
  --text: #17151c;
  --muted: #625e6a;
  --line: rgba(23, 21, 28, .13);
  --accent: #c44870;
  --accent-ink: #fff8fb;
  --shadow: 0 24px 70px rgba(48, 35, 55, .13);
  --radius: 24px;
  --max: 1180px;
  --pad: clamp(20px, 5vw, 56px);
}

body[data-app="steady"] {
  --accent: #e74792;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--accent-ink); background: var(--accent); }
.wrap { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--pad); }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 100; padding: 12px 16px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; }
.reading-progress { position: fixed; inset: 0 0 auto; z-index: 50; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: read-progress linear; animation-timeline: scroll(root); }
@keyframes read-progress { to { transform: scaleX(1); } }

.site-head { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; font-weight: 850; letter-spacing: -.03em; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); box-shadow: inset 0 1px rgba(255,255,255,.3); }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; font-weight: 700; }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }
.nav-links .nav-cta { padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); }

.guide-hero { padding: clamp(64px, 9vw, 112px) 0 clamp(44px, 6vw, 76px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 28px; color: var(--muted); font-size: 14px; }
.breadcrumb a { text-underline-offset: 4px; }
.guide-hero h1 { max-width: 15ch; margin: 0; font-size: clamp(48px, 7.4vw, 88px); line-height: .96; letter-spacing: -.06em; text-wrap: balance; }
.guide-hero .dek { max-width: 59ch; margin: 28px 0 0; color: var(--muted); font-size: clamp(19px, 2.3vw, 23px); line-height: 1.5; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; color: var(--muted); font-size: 14px; }
.hero-image { width: min(calc(100% - (2 * var(--pad))), var(--max)); aspect-ratio: 3 / 2; margin: 0 auto clamp(56px, 8vw, 96px); overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface-soft); }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: clamp(48px, 8vw, 100px); align-items: start; padding-bottom: clamp(80px, 12vw, 150px); }
.article { min-width: 0; }
.article h2 { margin: 72px 0 20px; font-size: clamp(32px, 4.2vw, 48px); line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.article h3 { margin: 42px 0 14px; font-size: clamp(23px, 2.7vw, 30px); line-height: 1.16; letter-spacing: -.03em; }
.article p { margin: 0 0 22px; }
.article a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.article ul, .article ol { margin: 0 0 26px; padding-left: 24px; }
.article li { margin: 10px 0; padding-left: 6px; }
.article strong { font-weight: 800; }
.article .lede { font-size: 21px; line-height: 1.58; }
.toc { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.toc strong { display: block; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 6px 0; }
.toc a { color: var(--muted); }
.callout { margin: 36px 0; padding: 26px; border-left: 4px solid var(--accent); border-radius: 0 18px 18px 0; background: var(--surface); }
.callout > :last-child { margin-bottom: 0; }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 36px; padding: 0; list-style: none; }
.checklist li { margin: 0; padding: 18px 18px 18px 46px; border-radius: 16px; background: var(--surface); position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 18px; top: 17px; color: var(--accent); font-weight: 900; }
.app-note { margin: 54px 0; padding: clamp(26px, 5vw, 42px); border-radius: var(--radius); background: var(--text); color: var(--bg); box-shadow: var(--shadow); }
.app-note-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.app-note img { width: 52px; height: 52px; border-radius: 14px; }
.app-note h2 { margin: 0; color: inherit; font-size: clamp(28px, 4vw, 40px); }
.app-note p { color: color-mix(in srgb, var(--bg) 76%, transparent); }
.app-note .btn { color: var(--accent-ink); background: var(--accent); }
.btn { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 20px; border-radius: 999px; color: var(--accent-ink); background: var(--accent); font-weight: 850; text-decoration: none !important; white-space: nowrap; transition: transform .2s ease, filter .2s ease; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.side { position: sticky; top: 106px; }
.side-card { padding: 24px 0; border-top: 1px solid var(--line); }
.side-card:last-child { border-bottom: 1px solid var(--line); }
.side-card strong { display: block; margin-bottom: 8px; }
.side-card p { margin: 0; color: var(--muted); font-size: 14px; }
.side-card a { color: var(--accent); font-weight: 750; text-underline-offset: 4px; }
.sources { margin-top: 68px; padding-top: 28px; border-top: 1px solid var(--line); }
.sources h2 { margin-top: 0; }
.sources li { margin-bottom: 12px; }
.faq { margin-top: 68px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-right: 34px; color: var(--muted); }
.medical-note { color: var(--muted); font-size: 14px; }

.hub-hero { padding: clamp(70px, 10vw, 130px) 0 clamp(54px, 8vw, 92px); }
.hub-hero h1 { max-width: 13ch; margin: 0; font-size: clamp(54px, 8.5vw, 102px); line-height: .92; letter-spacing: -.065em; text-wrap: balance; }
.hub-hero p { max-width: 56ch; margin: 28px 0 0; color: var(--muted); font-size: 21px; }
.guide-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; padding-bottom: clamp(86px, 12vw, 150px); }
.guide-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease; }
.guide-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.guide-card:nth-child(3), .guide-card:nth-child(4) { grid-column: span 1; }
.guide-card .cover { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-soft); }
.guide-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.16,1,.3,1); }
.guide-card:hover img { transform: scale(1.025); }
.guide-card .copy { padding: clamp(24px, 4vw, 38px); }
.guide-card .topic { color: var(--accent); font-size: 13px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.guide-card h2 { margin: 14px 0 12px; font-size: clamp(28px, 4vw, 45px); line-height: 1.02; letter-spacing: -.045em; }
.guide-card p { margin: 0; color: var(--muted); }
.guide-card .read { display: inline-block; margin-top: 22px; color: var(--text); font-weight: 800; }
.hub-note { margin-bottom: clamp(86px, 12vw, 150px); padding: clamp(30px, 5vw, 54px); border-radius: var(--radius); background: var(--text); color: var(--bg); }
.hub-note h2 { max-width: 18ch; margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -.05em; }
.hub-note p { max-width: 60ch; margin: 20px 0 0; color: color-mix(in srgb, var(--bg) 72%, transparent); }

.related { padding: clamp(76px, 10vw, 120px) 0; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 34px; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.05em; line-height: 1; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.related-card { display: grid; grid-template-columns: 150px 1fr; min-height: 160px; overflow: hidden; border-radius: 18px; background: var(--surface); text-decoration: none; }
.related-card img { width: 100%; height: 100%; object-fit: cover; }
.related-card div { padding: 22px; }
.related-card strong { display: block; font-size: 20px; line-height: 1.2; }
.related-card span { display: block; margin-top: 9px; color: var(--muted); font-size: 14px; }

footer { padding: 42px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { text-underline-offset: 4px; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .article-shell { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .side-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  .side-card:last-child { border-bottom: 1px solid var(--line); }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .related-card { grid-template-columns: 120px 1fr; }
}

@media (max-width: 640px) {
  :root { --radius: 18px; }
  .nav { min-height: 64px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links .nav-cta { padding: 9px 14px; }
  .guide-hero { padding-top: 48px; }
  .guide-hero h1 { font-size: clamp(45px, 14vw, 64px); }
  .hero-image { width: calc(100% - 32px); border-radius: 18px; }
  .checklist, .side, .guide-grid, .related-grid { grid-template-columns: 1fr; }
  .guide-card:nth-child(3), .guide-card:nth-child(4) { grid-column: auto; }
  .related-card { grid-template-columns: 110px 1fr; }
  .app-note-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reading-progress { display: none; }
  .reveal { opacity: 1; transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-head { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
