@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&display=swap');
:root{ --font-reading: 'Newsreader', Georgia, 'Times New Roman', serif; }
/* ==========================================================================
   RateMyChance — Publication layer (Design System v1.0)
   Loads AFTER css/styles.css, which owns all design tokens (colours, type,
   radii, shadows, buttons, cards, brand lockup). Nothing here redefines a
   token or a brand colour — every value below references the same
   --primary (#2563EB) and --font-sans (Plus Jakarta Sans) as the homepage.

   Contents:
     1. Shared header + footer  (copied verbatim from landing.css so the
        Guides + Article pages are visually identical to index.html)
     2. Reading layout          (720–760px reading column)
     3. Guide card
     4. Article hero
     5. Quick Facts card
     6. RMC Insight / RMC Take
     7. Parent Box
     8. Section Takeaway
     9. DNA Tag Line
    10. Diagram placeholder
    11. FAQ item
    12. Primary CTA block
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. SHARED HEADER + FOOTER  — identical to homepage
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { font-family: var(--font-sans); font-size: 15px; font-weight: 600; color: var(--text-primary); text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 -10px 0 0; border: none; background: none; color: var(--text-primary); }
.nav-toggle svg { width: 24px; height: 24px; }
.header-cta { min-height: 38px; padding: 0 12px; font-size: 13.5px; white-space: nowrap; flex: none; }
@media (min-width: 768px){ .header-cta { min-height: 42px; padding: 0 20px; font-size: 15px; } }
/* Mobile: collapse nav into a standard menu so nothing crowds or wraps */
@media (max-width: 560px){
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-card);
    padding: 6px 24px 18px;
  }
  .site-header.open .site-nav { display: flex; }
  .site-nav .nav-link { padding: 15px 2px; border-bottom: 1px solid var(--border); font-size: 16px; }
  .site-nav .header-cta { width: 100%; min-height: 48px; font-size: 15px; margin-top: 14px; }
}

.site-footer { border-top: 1px solid var(--border); padding: 36px 0; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 18px; text-align: center; }
@media (min-width: 768px){ .footer-grid { grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 24px; }
  .footer-grid > :nth-child(2){ text-align: center; } .footer-grid > :nth-child(1){ text-align: left; } .footer-grid > :nth-child(3){ text-align: right; } }
.footer-brand .brand-icon { width: 22px; height: 22px; }
.footer-brand .brand-name { font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 6px; }
.footer-links a { color: var(--text-secondary); }
.footer-links a + a::before { content: "\00B7"; color: #CDCDCD; margin: 0 10px; display: inline-block; }
.footer-mail { color: var(--text-secondary); font-size: 14px; }
.footer-copy { text-align: center; font-size: 12.5px; color: var(--text-helper); margin-top: 24px; }
.footer-disclaimer { max-width: 720px; margin: 0 auto 22px; text-align: center; font-size: 12.5px; line-height: 1.65; color: var(--text-helper); text-wrap: pretty; }
@media (min-width: 768px){ .footer-disclaimer { font-size: 13px; margin-bottom: 26px; } }

/* ---------------------------------------------------------------------------
   2. READING LAYOUT
   Reading column never exceeds 760px. Page padding 24px. 32px between blocks,
   64px between major sections. Full-bleed slots break out to a wider 960px.
   --------------------------------------------------------------------------- */
.reading { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.reading-wide { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.article-body > * + * { margin-top: 24px; }               /* block rhythm: 32px total incl. line-height */
.article-body h2 { margin-top: 64px; margin-bottom: 4px; }
.article-body h3 { margin-top: 40px; }
.article-body p { font-size: 18px; line-height: 1.75; color: #2A2A2A; text-wrap: pretty; }
.article-body p a { font-weight: 600; }
.article-body ul { margin: 0; padding-left: 22px; }
.article-body li { font-size: 18px; line-height: 1.7; color: #2A2A2A; margin-top: 8px; }
/* Numbered "six parts" list — counter styled in brand blue */
.article-body ol.parts { list-style: none; counter-reset: part; padding: 0; margin: 4px 0 0; display: grid; gap: 12px; }
.article-body ol.parts > li { counter-increment: part; margin: 0; display: flex; gap: 14px; align-items: baseline; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.article-body ol.parts > li::before { content: counter(part); flex: none; font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--primary); width: 26px; }
.article-body ol.parts > li strong { display: block; }
/* Centered inline CTA button between sections */
.inline-cta { display: flex; justify-content: center; margin-top: 28px; }
.article-body strong { font-weight: 700; color: var(--text-primary); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); }
.caption { font-size: 14px; line-height: 1.55; color: var(--text-helper); }

/* ---------------------------------------------------------------------------
   3. GUIDE CARD  (Guides index — duplicate the <article> to add a card)
   --------------------------------------------------------------------------- */
.guides-grid { display: grid; grid-template-columns: 1fr; gap: 44px 56px; margin-top: 48px; }
@media (min-width: 760px){ .guides-grid { grid-template-columns: 1fr 1fr; } }
.guide-card { display: flex; flex-direction: column; background: none; border: none; box-shadow: none; padding: 0; border-radius: 0; transition: none; }
.guide-card:hover { box-shadow: none; border-color: transparent; }
.guide-card .gc-media { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--border); background: var(--section-tint); }
.guide-card .gc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.guide-card:hover .gc-media img { transform: scale(1.03); }
.guide-card .gc-kicker { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-helper); margin-top: 22px; margin-bottom: 0; }
.guide-card .gc-title { font-size: 24px; font-weight: 600; line-height: 1.22; letter-spacing: -0.012em; color: var(--text-primary); margin-top: 12px; }
.guide-card .gc-title a { color: inherit; text-decoration: none; }
.guide-card .gc-title a:hover { color: var(--primary); text-decoration: none; }
.guide-card .gc-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-helper); margin-top: 12px; }
.guide-card .gc-desc { font-family: var(--font-reading); font-size: 17px; line-height: 1.6; color: var(--text-secondary); margin-top: 14px; }
.guide-card .gc-link { margin-top: 16px; padding-top: 0; }
.guide-card .gc-link a { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: 15px; font-weight: 700; color: var(--primary); }
.guide-card .gc-link a:hover { text-decoration: none; gap: 9px; }

/* ---------------------------------------------------------------------------
   4. ARTICLE HERO
   --------------------------------------------------------------------------- */
.article-hero { margin-top: 28px; }
.article-hero .hero-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 14px; color: var(--text-helper); margin-bottom: 18px; }
.article-hero .hero-meta .dot { color: #CDCDCD; }
.article-hero h1 { font-size: 32px; line-height: 1.14; margin-bottom: 16px; }
@media (min-width: 768px){ .article-hero h1 { font-size: 44px; } }
.article-hero .standfirst { font-size: 20px; line-height: 1.55; color: var(--text-secondary); text-wrap: pretty; }
.article-hero .byline { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; color: var(--text-helper); }
.article-hero .byline .avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--primary-tint); display: inline-flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 800; font-size: 14px; flex: none; }

/* ---------------------------------------------------------------------------
   5. QUICK FACTS CARD  (screenshot-friendly)
   --------------------------------------------------------------------------- */
.quick-facts { border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; background: #fff; }
.quick-facts .qf-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--border); background: var(--section-tint); }
.quick-facts .qf-head .eyebrow { color: var(--text-secondary); }
.quick-facts dl { margin: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 560px){ .quick-facts dl { grid-template-columns: 1fr 1fr; } }
.quick-facts .qf-row { padding: 16px 22px; border-bottom: 1px solid var(--border); }
@media (min-width: 560px){ .quick-facts .qf-row:nth-child(odd){ border-right: 1px solid var(--border); } }
.quick-facts dt { font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-helper); margin: 0 0 6px; }
.quick-facts dd { margin: 0; font-size: 16px; line-height: 1.45; color: var(--text-primary); font-weight: 600; }
.quick-facts dd .big { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); display: block; }

/* ---------------------------------------------------------------------------
   6. RMC INSIGHT  +  RMC TAKE  (original analysis / expert commentary)
   Same DNA, clearly differentiated: Insight = tinted panel; Take = quote rule.
   --------------------------------------------------------------------------- */
.rmc-insight {
  background: var(--primary-tint); border: 1px solid rgba(37,99,235,0.18);
  border-radius: var(--radius-card); padding: 24px 26px;
}
.rmc-insight .rmc-label,
.rmc-take .rmc-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.rmc-insight .rmc-label::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }
.rmc-insight p, .rmc-take p { font-size: 17px; line-height: 1.65; color: var(--text-primary); margin: 0; }
.rmc-insight p + p, .rmc-take p + p { margin-top: 12px; }

/* The rule-and-ring treatment. This is now the default callout: it carries
   "What this means for you", which ends most sections, plus quotations and
   caveats. It is deliberately light, because at seventeen uses on one page a
   filled box stops reading as emphasis and becomes wallpaper. The ring echoes
   the logo. Only .rmc-insight keeps a fill, so a filled block still means
   "stop and read this". See SITE-RULES §20. */
.rmc-take { border-left: 3px solid var(--primary); padding: 6px 0 6px 24px; margin-top: 28px; }
.rmc-take .rmc-label { color: var(--text-secondary); }
.rmc-take .rmc-label::before { content: ""; width: 14px; height: 14px; border-radius: 999px; border: 3px solid var(--primary); }
.rmc-take p { font-size: 19px; line-height: 1.6; font-weight: 500; letter-spacing: -0.01em; }

/* Alert variant — freshness and "check this before you rely on it" notes. */
.rmc-take.is-alert { border-left-color: #D9382B; }
.rmc-take.is-alert .rmc-label { color: #B22C21; }
.rmc-take.is-alert .rmc-label::before { border-color: #D9382B; }

/* ---------------------------------------------------------------------------
   7. PARENT BOX  (warm, calm, addressed to families)
   --------------------------------------------------------------------------- */
.parent-box { background: var(--warm-tint); border: 1px solid #EFE4D6; border-radius: var(--radius-card); padding: 26px 28px; }
.parent-box .pb-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.parent-box h3 { font-size: 20px; margin-bottom: 12px; }
.parent-box p { font-size: 17px; line-height: 1.7; color: #3A3226; margin: 0; }
.parent-box p + p { margin-top: 12px; }

/* ---------------------------------------------------------------------------
   8. SECTION TAKEAWAY  ("What this means for you" — ends every major section)
   --------------------------------------------------------------------------- */
.takeaway { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 16px 18px; background: var(--section-tint); border-radius: 10px; }
.takeaway .tk-mark { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.takeaway .tk-body .tk-label { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-helper); margin-bottom: 3px; }
/* Alert variant — freshness / "check this before you rely on it" notes */
.takeaway.is-alert { background: #FEF4F3; }
.takeaway.is-alert .tk-mark { background: #D9382B; }
.takeaway.is-alert .tk-body .tk-label { color: #B22C21; }
.takeaway .tk-body p { font-size: 16.5px; line-height: 1.6; color: var(--text-primary); margin: 0; font-weight: 500; }

/* ---------------------------------------------------------------------------
   9. DNA TAG LINE  (subtle one-line accent naming an Admission DNA strand)
   --------------------------------------------------------------------------- */
/* Block, not inline-flex. As a flex container every child of this paragraph
   became its own flex item, so "Builds your", the <strong> and the closing
   sentence each wrapped inside their own column instead of flowing as one
   sentence. It only showed on the longer tags, which is why it survived. */
.dna-tag { display: block; font-style: italic; font-size: 15px; color: var(--text-secondary); margin-top: 20px; }
.dna-tag::before { content: ""; display: inline-block; width: 18px; height: 1px; vertical-align: middle; margin-right: 8px; background: var(--primary); opacity: 0.5; }
.dna-tag strong { font-style: normal; font-weight: 700; color: var(--primary); }

/* ---------------------------------------------------------------------------
   10. DIAGRAM PLACEHOLDER  (elegant slot for a diagram built later)
   Shows: title, aspect ratio, caption, alt text, designer note.
   Striped background + monospace labelling; never a fake illustration.
   --------------------------------------------------------------------------- */
.diagram { margin-top: 8px; }
.diagram .dg-frame {
  position: relative; border: 1px dashed #C7D2E8; border-radius: var(--radius-card);
  background-color: #FAFBFE;
  background-image: repeating-linear-gradient(135deg, rgba(37,99,235,0.05) 0 2px, transparent 2px 11px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px 24px; gap: 8px;
}
.diagram .dg-ar-16-9 { aspect-ratio: 16 / 9; }
.diagram .dg-ar-4-3  { aspect-ratio: 4 / 3; }
.diagram .dg-ar-3-2  { aspect-ratio: 3 / 2; }
.diagram .dg-ar-21-9 { aspect-ratio: 21 / 9; }
.diagram .dg-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); background: #fff; border: 1px solid rgba(37,99,235,0.25); border-radius: 999px; padding: 5px 12px; }
.diagram .dg-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); }
.diagram .dg-ratio { font-family: var(--font-mono); font-size: 12px; color: var(--text-helper); }
.diagram figcaption { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--text-secondary); text-align: center; text-wrap: pretty; }
.diagram figcaption em { color: var(--text-primary); font-style: italic; }
.diagram .dg-meta { margin-top: 10px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6; color: var(--text-helper); background: var(--locked-bg); border-radius: 8px; padding: 10px 14px; text-align: left; }
.diagram .dg-meta b { color: var(--text-secondary); font-weight: 700; }
/* Full-bleed supplied-image slot (Admissions Intelligence Model) */
.diagram.diagram-hero .dg-frame { border-style: solid; border-color: var(--border); background-image: repeating-linear-gradient(135deg, rgba(16,24,40,0.035) 0 2px, transparent 2px 13px); }

/* ---------------------------------------------------------------------------
   11. FAQ ITEM  (identical interaction to the homepage FAQ)
   --------------------------------------------------------------------------- */
.faq { margin-top: 24px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; text-align: left; padding: 22px 40px 22px 0; font-size: 17px; font-weight: 700; color: var(--text-primary); position: relative; cursor: pointer; }
.faq-q .icon { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); transition: transform .2s ease; width: 18px; height: 18px; color: var(--primary); }
.faq-item.open .faq-q .icon { transform: translateY(-50%) rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a-inner { padding: 0 8px 22px 0; color: var(--text-secondary); font-size: 15.5px; line-height: 1.65; }

/* ---------------------------------------------------------------------------
   12. PRIMARY CTA BLOCK
   --------------------------------------------------------------------------- */
.cta-block { text-align: center; background: var(--section-tint); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 40px 28px; }
.cta-block h2 { font-size: 26px; margin-bottom: 10px; }
@media (min-width: 768px){ .cta-block h2 { font-size: 30px; } }
.cta-block p { font-size: 17px; color: var(--text-secondary); max-width: 460px; margin: 0 auto 24px; line-height: 1.6; }
.cta-block .fine { font-size: 13px; color: var(--text-helper); margin-top: 16px; }

/* Page intro (both pages) */
.pub-intro { padding: 48px 0 8px; }
@media (min-width: 768px){ .pub-intro { padding: 72px 0 8px; } }
.pub-intro .eyebrow { display: block; margin-bottom: 14px; }
.pub-intro h1 { font-size: 34px; line-height: 1.12; }
@media (min-width: 768px){ .pub-intro h1 { font-size: 46px; } }
.pub-intro .lede { font-size: 19px; line-height: 1.6; color: var(--text-secondary); margin-top: 16px; max-width: 640px; text-wrap: pretty; }

/* Breadcrumb */
.crumb { font-size: 14px; color: var(--text-helper); padding-top: 26px; }
.crumb a { color: var(--text-helper); font-weight: 600; }
.crumb a:hover { color: var(--primary); }
.crumb .sep { margin: 0 8px; color: #CDCDCD; }

/* ---------------------------------------------------------------------------
   16. (retired — the freshness note now uses .takeaway)
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   15. ARTICLE FIGURE (in-body diagram image)
   --------------------------------------------------------------------------- */
/* Restore body rhythm across wrapper boundaries (figure block ↔ prose block).
   Margins collapse with a first-child h2's 64px, so headings never double up. */
.article-main > .reading + .reading,
.article-main > .reading + .reading-wide,
.article-main > .reading-wide + .reading,
.article-main > .reading-wide + .reading-wide { margin-top: 24px; }

.article-figure { margin: 24px 0 0; }
.article-body > .article-figure + :not(h2):not(h3) { margin-top: 24px; }
.article-figure img { width: 100%; height: auto; display: block; border-radius: var(--radius-card); border: 1px solid var(--border); background: #fff; }
.article-figure figcaption { margin-top: 12px; font-family: var(--font-sans); font-size: 13.5px; line-height: 1.55; color: var(--text-helper); text-align: center; text-wrap: pretty; }

/* ---------------------------------------------------------------------------
   16. Keep inset components styled correctly inside .article-body
   (which restyles bare <p>/<li> to the serif reading font)
   --------------------------------------------------------------------------- */
.article-body p.dna-tag { font-size: 15px; }
.article-body .rmc-insight p, .article-body .rmc-take p { font-family: var(--font-sans); color: var(--text-primary); }
.article-body .rmc-insight p { font-size: 17px; line-height: 1.65; }
.article-body .rmc-take p { font-size: 19px; line-height: 1.6; font-weight: 500; }
.article-body .parent-box p { font-size: 17px; color: #3A3226; }
/* "Where to go next" related-guides list */
.related-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
/* Live guide: the whole row is the link */
.related-list li.rl-live { padding: 0; transition: border-color .15s ease, background .15s ease; }
.related-list li.rl-live > a { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; padding: 14px 18px; text-decoration: none; color: inherit; }
.related-list li.rl-live > a:hover { text-decoration: none; }
.related-list li.rl-live:hover { border-color: var(--primary); background: var(--primary-tint); }
.related-list .rl-title { font-weight: 700; color: var(--primary); }
.related-list li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; font-family: var(--font-sans); font-size: 16px; color: var(--text-primary); }
.related-list .soon { margin-left: auto; flex: none; white-space: nowrap; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-helper); background: var(--section-tint); border-radius: 999px; padding: 4px 9px; }

/* ---------------------------------------------------------------------------
   13. TYPE SYSTEM — editorial serif (Newsreader) for publication reading.
   Chrome (header/footer/nav/buttons/eyebrows/mono) stays Plus Jakarta Sans.
   --------------------------------------------------------------------------- */
.article-hero h1, .article-hero .standfirst,
.article-body h2, .article-body h3,
.pub-intro h1, .guide-card .gc-title, .cta-block h2, .parent-box h3 {
  font-family: var(--font-reading); font-weight: 600; letter-spacing: -0.012em;
}
.article-hero .standfirst { font-weight: 400; }
.article-body p, .article-body li { font-family: var(--font-reading); }
.pub-intro .lede { font-family: var(--font-reading); }
.article-body p { font-size: 19px; line-height: 1.78; color: #242830; }
.article-body li { font-size: 18px; line-height: 1.72; color: #242830; }
.article-body ol.parts > li { font-family: var(--font-sans); }

/* Read-time with timer icon */
.read-time { display: inline-flex; align-items: center; gap: 5px; }
.read-time svg { width: 15px; height: 15px; flex: none; opacity: 0.85; }

/* ---------------------------------------------------------------------------
   14. ARTICLE SHELL + ON-THIS-PAGE TOC
   --------------------------------------------------------------------------- */
.article-shell { padding: 0 24px; }
.article-shell .reading, .article-shell .reading-wide { max-width: none; margin: 0; padding: 0; }
.article-main h2, .article-main h3 { scroll-margin-top: 84px; }

.toc-rail { display: none; border: 1px solid var(--border); border-radius: var(--radius-card); background: #fff; padding: 6px 18px 14px; margin: 32px 0 8px; }
.toc-title { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-helper); cursor: pointer; list-style: none; padding: 12px 0; position: relative; }
.toc-title::-webkit-details-marker { display: none; }
.toc-title::after { content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--text-helper); }
.toc-rail[open] .toc-title::after { content: "–"; }
.toc { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.toc a { display: block; border-left: 2px solid var(--border); padding: 8px 0 8px 16px; font-family: var(--font-reading); font-size: 16px; line-height: 1.35; color: var(--text-secondary); text-decoration: none; transition: color .14s ease, border-color .14s ease; }
.toc a:hover { color: var(--primary); border-color: #C2D2F7; text-decoration: none; }
.toc a.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }

@media (min-width: 1080px) {
  .article-shell { display: grid; grid-template-columns: 236px minmax(0, 720px); gap: 64px; justify-content: center; align-items: start; max-width: 1120px; margin: 0 auto; padding: 0 40px; }
  .toc-rail { display: block; position: sticky; top: 88px; border: none; background: none; padding: 0; margin: 40px 0 0; }
  .toc-title { cursor: default; padding: 0 0 12px; }
  .toc-title::after { display: none; }
  .toc-rail:not([open]) .toc { display: flex; }  /* always expanded on desktop */
}
