:root {
  color-scheme: light;
  --ink: #171b20;
  --paper: #f4f2eb;
  --line: #d6d0c2;
  --acid: #d7ff42;
  --white: #ffffff;
  --muted: #5d6671;
  --blue: #dcecff;
  --yellow: #fff0b8;
  --coral: #ffdfd9;
  --green: #dff3e7;
  --content: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.wrap { width: min(1140px, calc(100% - 32px)); margin: 0 auto; }
.reading-wrap { width: min(var(--content), calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--acid); padding: 10px 14px; font-weight: 800; }
.skip-link:focus { left: 8px; }

.topbar { border-bottom: 1px solid var(--line); background: var(--white); }
.topbar-inner { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--acid); font-weight: 900; }
.brand-name { display: block; font-size: 20px; font-weight: 800; }
.tagline { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 700; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--white); padding: 10px 15px; font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: #30363d; }
.button.acid { border-color: var(--acid); background: var(--acid); color: var(--ink); }
.button.acid:hover { background: #c8ef35; }
.button.secondary { background: var(--white); color: var(--ink); }
.button.secondary:hover { background: #eceae3; }
.button.small { min-height: 36px; padding: 7px 11px; font-size: 13px; }

.library-hero { border-bottom: 1px solid var(--line); background: var(--ink); color: var(--white); }
.library-hero-inner { position: relative; min-height: 520px; display: grid; align-items: end; overflow: hidden; }
.library-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .44; }
.library-hero::after { content: ""; position: absolute; inset: 0; background: rgba(23,27,32,.42); }
.library-hero-copy { position: relative; z-index: 1; max-width: 790px; padding: 64px 0 58px; text-shadow: 0 1px 18px rgba(0,0,0,.28); }
.eyebrow { color: var(--acid); font-size: 14px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p, li { overflow-wrap: anywhere; }
h1 { margin: 12px 0 0; font-size: 54px; line-height: 1.04; letter-spacing: 0; }
.hero-copy { max-width: 730px; margin: 18px 0 0; color: #edf0f2; font-size: 19px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.intro-band { border-bottom: 1px solid var(--line); background: var(--white); }
.intro-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; padding: 38px 0; }
.intro-grid h2 { margin: 5px 0 0; font-size: 30px; }
.intro-grid p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.guide-list { padding: 44px 0 58px; }
.topic-group + .topic-group { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 36px; }
.topic-heading { display: grid; grid-template-columns: .7fr 1.3fr; gap: 28px; align-items: end; margin-bottom: 18px; }
.topic-heading h2 { margin: 0; font-size: 30px; }
.topic-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card { display: grid; min-height: 300px; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: 24px; }
.guide-card:nth-child(1) { border-top: 5px solid #7cadc9; }
.guide-card:nth-child(2) { border-top: 5px solid #e48070; }
.guide-card:nth-child(3) { border-top: 5px solid #d0ac43; }
.guide-card:nth-child(4) { border-top: 5px solid #6ba683; }
.guide-card .number { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.guide-card h2 { margin: 16px 0 10px; font-size: 28px; line-height: 1.18; }
.guide-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.guide-card footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.read-time { color: var(--muted); font-size: 12px; font-weight: 700; }

.article-hero { border-bottom: 1px solid var(--line); background: var(--white); }
.article-hero-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 44px; align-items: center; padding: 50px 0; }
.breadcrumb { margin-bottom: 22px; color: var(--muted); font-size: 13px; font-weight: 700; }
.breadcrumb a { text-decoration: none; }
.article-hero h1 { max-width: 790px; font-size: 48px; }
.dek { max-width: 760px; margin: 18px 0 0; color: #3f4852; font-size: 19px; line-height: 1.6; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.article-hero figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.article-hero figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center right; }
.article-hero figcaption { border-top: 1px solid var(--line); padding: 10px 12px; color: var(--muted); font-size: 12px; }

.article-layout { display: grid; grid-template-columns: 220px minmax(0, var(--content)); gap: 50px; align-items: start; padding: 42px 0 64px; }
.toc { position: sticky; top: 18px; border-left: 3px solid var(--acid); padding-left: 15px; font-size: 13px; }
.toc strong { display: block; margin-bottom: 10px; text-transform: uppercase; }
.toc a { display: block; margin: 8px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.article-body { min-width: 0; }
.article-body > :first-child { margin-top: 0; }
.article-body p, .article-body li { color: #343b44; font-size: 17px; line-height: 1.75; }
.article-body h2 { margin: 52px 0 15px; padding-top: 6px; font-size: 32px; line-height: 1.18; }
.article-body h3 { margin: 30px 0 10px; font-size: 22px; line-height: 1.28; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li + li { margin-top: 8px; }
.direct-answer { border-left: 5px solid var(--acid); background: var(--white); padding: 20px 22px; }
.direct-answer strong { display: block; margin-bottom: 7px; font-size: 13px; text-transform: uppercase; }
.direct-answer p { margin: 0; color: var(--ink); font-size: 18px; }
.callout { margin: 28px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--blue); padding: 20px 22px; }
.callout.yellow { background: #fff9df; }
.callout.green { background: var(--green); }
.callout.coral { background: var(--coral); }
.callout h3 { margin-top: 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.formula { border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--white); padding: 22px; }
.formula strong { display: block; color: var(--acid); font-size: 13px; text-transform: uppercase; }
.formula p { margin-bottom: 0; color: var(--white); font-size: 19px; }
.table-wrap { margin: 22px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); padding: 13px 14px; text-align: left; vertical-align: top; line-height: 1.5; }
th { background: #efede6; font-size: 12px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.checklist { margin: 24px 0; padding: 0; list-style: none; }
.checklist li { position: relative; border-bottom: 1px solid var(--line); padding: 12px 0 12px 34px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 17px; width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 3px; background: var(--white); }
.scorecard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0; }
.score-item { border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: 16px; }
.score-item strong { display: block; margin-bottom: 6px; }
.score-item p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.faq { margin-top: 52px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 800; line-height: 1.4; }
.faq details p { margin-bottom: 0; }
.source-notes { margin-top: 52px; border-top: 1px solid var(--line); padding-top: 24px; }
.source-notes h2 { margin-top: 0; }
.source-notes li { font-size: 15px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 20px; }
.share-status { align-self: center; color: var(--muted); font-size: 13px; }
.method-note { color: var(--muted); font-size: 14px; }

.next-guides { border-top: 1px solid var(--line); background: var(--white); }
.next-inner { padding: 42px 0; }
.next-inner h2 { margin: 0 0 20px; font-size: 30px; }
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.next-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; text-decoration: none; }
.next-card:hover { border-color: var(--ink); }
.next-card strong { display: block; line-height: 1.35; }
.next-card span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cta-band { border-top: 1px solid var(--line); background: var(--ink); color: var(--white); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 38px 0; }
.cta-inner h2 { margin: 0; font-size: 30px; }
.cta-inner p { margin: 8px 0 0; color: #d9dee4; line-height: 1.6; }
.footer { border-top: 1px solid var(--line); background: var(--white); color: var(--muted); padding: 24px 0; font-size: 13px; text-align: center; }
.footer a { margin-left: 8px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .library-hero-inner { min-height: 470px; }
  h1, .article-hero h1 { font-size: 42px; }
  .article-hero-inner, .article-layout { grid-template-columns: 1fr; }
  .article-hero-inner { gap: 28px; }
  .article-hero figure img { aspect-ratio: 16 / 7; }
  .toc { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; border-left: 0; border-top: 3px solid var(--acid); padding: 14px 0 0; }
  .toc strong { grid-column: 1 / -1; }
  .next-grid { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  .topbar-inner { min-height: 64px; }
  .tagline { display: none; }
  .library-hero-inner { min-height: 440px; }
  .library-hero img { object-position: 64% center; opacity: .34; }
  .library-hero-copy { padding: 46px 0 42px; }
  h1, .article-hero h1 { font-size: 36px; }
  .hero-copy, .dek { font-size: 17px; }
  .intro-grid, .guide-grid, .scorecard, .cta-inner, .topic-heading { grid-template-columns: 1fr; }
  .intro-grid { gap: 18px; }
  .guide-card { min-height: 0; }
  .article-hero-inner { padding: 34px 0; }
  .article-hero figure img { aspect-ratio: 4 / 3; }
  .article-layout { gap: 28px; padding-top: 30px; }
  .toc { grid-template-columns: 1fr; }
  .article-body p, .article-body li { font-size: 16px; }
  .article-body h2 { margin-top: 42px; font-size: 28px; }
  .cta-inner .button { width: 100%; }
}

@media print {
  .topbar, .toc, .share-row, .next-guides, .cta-band, .footer { display: none !important; }
  body { background: white; }
  .article-hero-inner, .article-layout { display: block; }
  .article-hero figure { display: none; }
  .article-layout { padding-top: 24px; }
  .callout, .formula, .score-item { break-inside: avoid; }
}
