/*
  article.css — Shared styles for all RequestNotes articles
  ─────────────────────────────────────────────────────────
  ⚠ GROUND RULE: Do NOT modify this file unless explicitly asked to.
  • Common styles for all articles live here.
  • Article-unique component CSS stays inline in each article's <style> block.
  • When a new component becomes standard/reusable, ADD its CSS at the END of this file.
*/

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── TOKENS — DARK (default) ─── */
:root {
  --bg: #09090b;     --surface: #111113;    --card: #18181b;    --card-hover: #1e1e21;
  --border: #27272a; --border-light: #3f3f46;
  --text: #fafafa;   --text-secondary: #d4d4d8; --muted: #a1a1aa; --dim: #52525b;
  /* Indigo — UI chrome & headings only */
  --accent: #6366f1; --accent2: #818cf8; --accent3: #a5b4fc;
  --accent-hover: #818cf8; --accent-muted: rgba(99,102,241,0.12); --accent-muted2: rgba(99,102,241,0.07);
  /* Semantic */
  --info: #3b82f6;   --info-muted: rgba(59,130,246,0.12);
  --warning: #f59e0b; --warning-muted: rgba(245,158,11,0.12);
  /* Variant palette — matches global site */
  --green: #22c55e;  --green-muted: rgba(34,197,94,0.12);
  --amber: #f59e0b;  --amber-muted: rgba(245,158,11,0.12);
  --teal:  #14b8a6;  --teal-muted:  rgba(20,184,166,0.12);
  --coral: #f97316;  --coral-muted: rgba(249,115,22,0.12);
  --pink:  #ec4899;  --pink-muted:  rgba(236,72,153,0.12);
  --shadow: 0 1px 3px rgba(0,0,0,0.4); --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 12px; --text-sm: 14px; --text-base: 17px; --text-lg: 19px;
  --text-xl: 21px; --text-2xl: 26px; --text-3xl: 32px; --text-4xl: 40px;
  --line-height-body: 1.78; --line-height-heading: 1.25;
  --reading-width: 680px; --para-spacing: 1.4em;
  /* Heading accent hierarchy */
  --h2-color: #6366f1; --h3-color: #a5b4fc; --h4-color: #c7d2fe;
}

/* ─── TOKENS — LIGHT ─── */
.light {
  --bg: #fafaf9;     --surface: #f4f4f5;    --card: #ffffff;    --card-hover: #f9f9f9;
  --border: #e4e4e7; --border-light: #d4d4d8;
  --text: #09090b;   --text-secondary: #27272a; --muted: #52525b; --dim: #a1a1aa;
  --accent: #4f46e5; --accent2: #4338ca; --accent3: #6366f1;
  --accent-hover: #4338ca; --accent-muted: rgba(79,70,229,0.10); --accent-muted2: rgba(79,70,229,0.06);
  --info: #2563eb;   --info-muted: rgba(37,99,235,0.10);
  --warning: #d97706; --warning-muted: rgba(217,119,6,0.10);
  --green: #16a34a;  --green-muted: rgba(22,163,74,0.10);
  --amber: #b45309;  --amber-muted: rgba(180,83,9,0.10);
  --teal:  #0f766e;  --teal-muted:  rgba(15,118,110,0.10);
  --coral: #c2410c;  --coral-muted: rgba(194,65,12,0.10);
  --pink:  #be185d;  --pink-muted:  rgba(190,24,93,0.10);
  --shadow: 0 1px 3px rgba(0,0,0,0.06); --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --h2-color: #4f46e5; --h3-color: #6366f1; --h4-color: #818cf8;
}

/* ─── TRANSITIONS ─── */
*, *::before, *::after {
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

/* ─── BASE ─── */
html { scroll-behavior: smooth; }
html, body { max-width: 100%; }
body {
  font-family: var(--font-sans); font-size: var(--text-base);
  line-height: var(--line-height-body); color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ─── TOPBAR ─── */
.article-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 52px;
  background: rgba(9,9,11,0.92);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.light .article-topbar {
  background: rgba(250,250,249,0.92);
  box-shadow: 0 1px 12px rgba(0,0,0,0.10);
}
.topbar-spacer { height: 52px; }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  padding: 0 1.25rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; min-width: 0;
}
.topbar-logo { display: flex; align-items: center; gap: 0.45rem; text-decoration: none; flex-shrink: 0; }
.logo-mark {
  font-size: 16px; font-weight: 700; color: var(--accent);
  background: var(--accent-muted); border: 1px solid var(--border);
  padding: 0.3rem 0.55rem; border-radius: 6px; letter-spacing: 0.04em; white-space: nowrap;
}
.logo-text { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.topbar-breadcrumb { flex: 1; min-width: 0; overflow: hidden; }
.breadcrumb-list {
  display: flex; align-items: center; gap: 0.3rem; list-style: none;
  font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden;
}
.breadcrumb-list li { flex-shrink: 0; }
.breadcrumb-list li:nth-last-child(2) { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-list a { color: var(--muted); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--accent); }
.breadcrumb-list [aria-current="page"] { color: var(--text); }
.topbar-actions { display: flex; align-items: center; flex-shrink: 0; }

/* ─── THEME TOGGLE — ☽/☀ matches global site ─── */
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 0.3rem 0.55rem; color: var(--muted); cursor: pointer;
  font-size: 16px; line-height: 1; display: flex; align-items: center;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-light); }
.theme-toggle .icon-light { display: none; }
.theme-toggle .icon-dark  { display: inline; }
.light .theme-toggle .icon-dark  { display: none; }
.light .theme-toggle .icon-light { display: inline; }

/* ─── READING PROGRESS BAR ─── */
.reading-progress {
  position: fixed; top: 52px; left: 0; width: 0; height: 3px;
  background: var(--accent); z-index: 99; transition: width 0.1s linear;
}

/* ─── PAGE LAYOUT ─── */
.article-page { min-height: 100vh; background: var(--bg); }
.article-main {
  max-width: 1160px; margin: 0 auto; padding: 1.75rem 1.25rem 4rem;
  display: grid; grid-template-columns: 1fr 240px; gap: 3rem; align-items: start;
}
.article-content-col { min-width: 0; }
.article-body {
  max-width: var(--reading-width);
  font-size: var(--text-base); line-height: var(--line-height-body); color: var(--text-secondary);
}

/* ─── ARTICLE HEADER ─── */
.article-header { margin-bottom: 2rem; }
.article-meta-top { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.article-title {
  font-size: var(--text-4xl); font-weight: 700;
  line-height: var(--line-height-heading); color: var(--text); margin-bottom: 0.6rem;
}
.article-title-sub {
  display: block; font-size: var(--text-2xl); font-weight: 400;
  font-style: italic; color: var(--muted); margin-top: 0.3rem; line-height: 1.35;
}
.article-subtitle {
  font-size: var(--text-xl); color: var(--muted); line-height: 1.55;
  margin-bottom: 0.9rem; font-weight: 400;
}
.article-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  font-size: var(--text-sm); color: var(--muted);
}
.meta-divider { color: var(--border-light); }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; padding: 0.2em 0.65em;
  border-radius: 9999px; font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.03em; line-height: 1.5;
}
.badge--domain       { background: var(--accent-muted); color: var(--accent); border: 1px solid rgba(99,102,241,0.25); }
.badge--intermediate { background: var(--info-muted);   color: var(--info);   border: 1px solid rgba(59,130,246,0.25); }
.light .badge--domain       { border-color: rgba(79,70,229,0.25); }
.light .badge--intermediate { border-color: rgba(37,99,235,0.25); }

/* ─── HEADINGS — accent color hierarchy ─── */
.article-body h2 {
  font-size: var(--text-2xl); font-weight: 600; color: var(--h2-color);
  line-height: var(--line-height-heading); margin-top: 2.75rem; margin-bottom: 0.9rem;
}
.article-body h3 {
  font-size: var(--text-xl); font-weight: 600; color: var(--h3-color);
  line-height: var(--line-height-heading); margin-top: 2rem; margin-bottom: 0.7rem;
}
.article-body h4 {
  font-size: var(--text-lg); font-weight: 600; color: var(--h4-color);
  margin-top: 1.5rem; margin-bottom: 0.5rem;
}
.article-body p { margin-bottom: var(--para-spacing); color: var(--text-secondary); }
.article-body ul, .article-body ol { margin: 0 0 var(--para-spacing) 1.25rem; color: var(--text-secondary); }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--text); font-weight: 600; }

/* ─── FLOATING TOC (desktop) ─── */
.article-toc {
  position: sticky; top: 68px; max-height: calc(100vh - 90px); overflow-y: auto;
  padding: 0.9rem 0 0.9rem 1.1rem; border-left: 1px solid var(--border); font-size: 13px;
}
.toc-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin-bottom: 0.65rem; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-link { display: block; padding: 0.22rem 0; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc-link:hover { color: var(--accent); text-decoration: none; }
.toc-link.active { color: var(--accent); font-weight: 500; }

/* ─── MOBILE TOC — collapsible accordion, placed above article body ─── */
/*   Placement: directly after </header>, before <article class="article-body">    */
/*   On ≤1023px, floating sidebar is hidden; this is the only TOC visible.         */
.article-toc-mobile { display: none; }
.toc-toggle {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1rem; cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--text); background: var(--card); list-style: none;
}
.toc-toggle::-webkit-details-marker { display: none; }
summary.toc-toggle { list-style: none; }
details[open] .toc-chevron { transform: rotate(180deg); }
.toc-chevron { transition: transform 0.2s ease; color: var(--muted); flex-shrink: 0; }
.toc-mobile-nav { padding: 0.4rem 1rem 0.9rem; background: var(--surface); }
.toc-mobile-nav .toc-list { font-size: 14px; }
.toc-mobile-nav .toc-list li { border-bottom: 1px solid var(--border); }
.toc-mobile-nav .toc-list li:last-child { border-bottom: none; }
.toc-mobile-nav .toc-list a { color: var(--muted); text-decoration: none; display: block; padding: 0.4rem 0; }
.toc-mobile-nav .toc-list a:hover { color: var(--accent); }

/* ─── CALLOUTS ─── */
.callout { display: flex; gap: 0.75rem; padding: 0.9rem 1.1rem; border-radius: 8px; border-left: 3px solid; margin: 1.6rem 0; }
.callout-icon { font-size: 0.95rem; flex-shrink: 0; margin-top: 0.1rem; line-height: 1.55; }
.callout-content p { margin: 0.25rem 0 0; font-size: var(--text-sm); color: var(--text-secondary); }
.callout-content p a { color: var(--accent); }
.callout-content p a:hover { color: var(--accent-hover); }
.callout-title { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.callout--info    { background: var(--info-muted);    border-color: var(--info);    }
.callout--warning { background: var(--warning-muted); border-color: var(--warning); }
.callout--tip, .callout--deeper { background: var(--teal-muted); border-color: var(--teal); }
.callout--tip .callout-title, .callout--deeper .callout-title { color: var(--teal); }

/* ─── DEFINITION ─── */
.definition {
  display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 1rem;
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--teal); border-radius: 6px;
  margin: 1.1rem 0; font-size: var(--text-sm);
}
.definition-term { font-weight: 700; color: var(--text); flex-shrink: 0; }
.definition-text { color: var(--text-secondary); }

/* ─── PULL QUOTE — pink/coral for contrarian tone ─── */
.pullquote {
  border-left: 4px solid var(--pink); padding: 0.75rem 1.4rem; margin: 2rem 0;
  font-size: var(--text-xl); font-style: italic; color: var(--text); line-height: 1.5;
  background: var(--pink-muted); border-radius: 0 6px 6px 0;
}
.pullquote cite { display: block; margin-top: 0.5rem; font-size: var(--text-sm); color: var(--muted); font-style: normal; }

/* ─── FORMULA BOX — teal top border for methodology ─── */
.formula-box {
  background: var(--card); border: 1px solid var(--border);
  border-top: 3px solid var(--teal); border-radius: 8px;
  padding: 0.9rem 1.1rem; margin: 1.4rem 0;
}
.formula-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--teal); margin-bottom: 0.45rem; }
.formula-text { font-size: var(--text-base); color: var(--text); font-weight: 500; line-height: 1.6; }
.formula-eq { color: var(--teal); }
.formula-note { margin-top: 0.4rem; font-size: var(--text-sm); color: var(--muted); font-weight: 400; }

/* ─── WORKED EXAMPLE — amber header ─── */
.worked-example { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 1.6rem 0; }
.worked-example-header { background: var(--amber-muted); padding: 0.45rem 1rem; border-bottom: 1px solid var(--border); }
.worked-example-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--amber); }
.worked-example-body { padding: 0.9rem 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.worked-example-note { margin-top: 0.7rem; font-size: var(--text-sm); color: var(--muted); }
.worked-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.worked-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap; }
.worked-table td:last-child { text-align: right; }
.worked-table tr:last-child td { border-bottom: none; }
.worked-table-section td { background: var(--surface); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); padding-top: 0.8rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--border); }
.worked-table-subtotal td { border-top: 1px solid var(--border-light); color: var(--text); font-weight: 600; }
.worked-table-result td { border-top: 2px solid var(--amber); padding-top: 0.55rem; color: var(--amber); font-weight: 700; }
.worked-table .deduct { color: var(--muted); }

/* ─── COMPARISON TABLE ─── */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6rem 0; border-radius: 8px; border: 1px solid var(--border); }
.comparison-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 480px; }
.comparison-table th { padding: 0.65rem 0.9rem; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--card); border-bottom: 1px solid var(--border); white-space: nowrap; }
.comparison-table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: top; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover td { background: var(--card-hover); }

/* ─── STAT HIGHLIGHT ─── */
.stat-highlight { text-align: center; padding: 1.4rem; border: 1px solid var(--border); border-radius: 10px; background: var(--card); margin: 1.75rem 0; }
.stat-number { font-size: var(--text-4xl); font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { margin-top: 0.4rem; font-size: var(--text-sm); color: var(--muted); }

/* ─── SUMMARY STATS CARDS — variant color cycle ─── */
.summary-stats-section { margin: 2.5rem 0 2rem; }
.summary-stats-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin-bottom: 0.9rem; }
.summary-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-top: 3px solid; border-radius: 8px; padding: 1rem; }
.stat-card--green  { border-top-color: var(--green); }
.stat-card--amber  { border-top-color: var(--amber); }
.stat-card--teal   { border-top-color: var(--teal);  }
.stat-card--coral  { border-top-color: var(--coral); }
.stat-card-value { font-size: var(--text-2xl); font-weight: 700; line-height: 1.1; margin-bottom: 0.3rem; }
.stat-card--green .stat-card-value  { color: var(--green);  }
.stat-card--amber .stat-card-value  { color: var(--amber);  }
.stat-card--teal  .stat-card-value  { color: var(--teal);   }
.stat-card--coral .stat-card-value  { color: var(--coral);  }
.stat-card-label { font-size: var(--text-sm); font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.stat-card-note  { font-size: var(--text-xs); color: var(--muted); line-height: 1.5; }

/* ─── ARTICLE QUICK QUIZ ─── */
.article-quiz { margin: 2.5rem 0; padding-top: 2rem; border-top: 1px solid var(--border); }
.article-quiz-title { font-size: var(--text-lg); font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.article-quiz-sub   { font-size: 13px; color: var(--dim); margin: 0 0 1.5rem; }
.quiz-question { margin-bottom: 1.5rem; }
.quiz-q  { font-size: var(--text-sm); font-weight: 500; color: var(--text); margin-bottom: 0.6rem; line-height: 1.5; }
.quiz-options { display: flex; flex-direction: column; gap: 0.4rem; }
.quiz-opt {
  text-align: left; background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.55rem 0.85rem; font-size: var(--text-sm);
  color: var(--text-secondary); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.quiz-opt.correct  { background: var(--green-muted); border-color: var(--green); color: var(--green); }
.quiz-opt.wrong    { background: rgba(239,68,68,0.10); border-color: #ef4444; color: #ef4444; }
.quiz-opt:disabled { cursor: default; }
.quiz-explain {
  display: none; margin-top: 0.65rem; padding: 0.75rem 0.9rem;
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0; font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6;
}
.quiz-question.answered .quiz-explain { display: block; }

/* ─── KEY TAKEAWAYS — green top border ─── */
.key-takeaways { background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--green); border-radius: 10px; padding: 1.4rem; margin: 2.5rem 0 2rem; }
.takeaways-title { font-size: var(--text-lg); font-weight: 600; color: var(--green); margin-bottom: 0.9rem; }
.takeaways-list { padding-left: 1.2rem; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.takeaways-list li { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.55; }

/* ─── NOTE LINK — teal dotted underline ─── */
.note-link { color: var(--teal); border-bottom: 1px dotted var(--teal); }
.note-link:hover { color: var(--teal); text-decoration: none; border-bottom-style: solid; }

/* ─── RELATED ARTICLES — variant-color cards ─── */
/* Each card sets --rc / --rc-muted inline; cycle: teal → amber → green → coral → pink */
.related-articles { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.related-title { font-size: var(--text-xl); font-weight: 600; margin-bottom: 1.1rem; color: var(--text); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem; }
.related-card {
  display: block; padding: 1rem; background: var(--card);
  border: 1px solid var(--border); border-left: 3px solid var(--rc, var(--teal));
  border-radius: 8px; text-decoration: none;
}
.related-card:hover { background: var(--card-hover); text-decoration: none; }
.related-card-badge {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.15em 0.5em; border-radius: 4px; margin-bottom: 0.45rem;
  color: var(--rc, var(--teal)); background: var(--rc-muted, var(--teal-muted));
  border: 1px solid color-mix(in srgb, var(--rc, var(--teal)) 30%, transparent);
}
.related-card-title { font-size: var(--text-sm); font-weight: 600; color: var(--text); line-height: 1.4; margin: 0 0 0.35rem; }
.related-card-meta  { font-size: var(--text-xs); color: var(--muted); margin: 0; }

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed; bottom: 1.75rem; right: 1.25rem; width: 36px; height: 36px;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 15px; cursor: pointer;
  opacity: 0; pointer-events: none; z-index: 50;
  display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { color: var(--text); border-color: var(--border-light); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1023px) {
  .article-main { grid-template-columns: 1fr; gap: 0; max-width: 740px; }
  .article-toc { display: none; }
  .article-toc-mobile { display: block; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1.75rem; overflow: hidden; }
}
@media (max-width: 767px) {
  .article-main { padding: 1.25rem 0.9rem 3rem; }
  .article-title { font-size: var(--text-3xl); }
  .article-title-sub { font-size: var(--text-xl); }
  .article-subtitle { font-size: var(--text-lg); }
  .pullquote { font-size: var(--text-lg); padding: 0.6rem 1rem; }
  .stat-number { font-size: var(--text-3xl); }
  .summary-stats-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 479px) {
  .topbar-breadcrumb { display: none; }
  .logo-text { display: none; }
  .summary-stats-grid { grid-template-columns: 1fr; }
  .article-title { font-size: var(--text-2xl); }
}

/* ─── ADD NEW REUSABLE COMPONENT CSS BELOW THIS LINE ─── */

/* ─── STEP BLOCK (CommonComponent.md §10) ─── */
.step-list   { display: flex; flex-direction: column; gap: 1.25rem; margin: 1.75rem 0; }
.step        { display: flex; gap: 1rem; }
.step-number { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-muted); border: 1px solid var(--accent); color: var(--accent); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-content { flex: 1; }
.step-title   { margin: 0 0 0.35rem; font-size: var(--text-base); font-weight: 600; color: var(--text); }
.step-content p { margin: 0; font-size: var(--text-sm); }

/* ─── TOC NESTED SUB-ITEMS ─── */
/* Removes browser-default numbering on nested <ol> inside .toc-list */
.toc-list ol { list-style: none; padding: 0; margin: 0; padding-left: 0.75rem; }
.toc-link--sub { font-size: 12px; color: var(--dim); padding: 0.18rem 0; }
.toc-link--sub:hover { color: var(--accent); }
.toc-link--sub.active { color: var(--accent); font-weight: 500; }

/* ─── ARTICLE DIAGRAM (opening visual / flow diagram component) ─── */
.article-diagram { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 1.75rem 0; }
.article-diagram-header { padding: 0.6rem 1.1rem 0; }
.article-diagram-title { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); }
.article-diagram-body { padding: 0.85rem 1.1rem; }
.diagram-hint-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; padding: 0.55rem 1.1rem 0.75rem; border-top: 1px solid var(--border); font-size: 12px; color: var(--dim); }
.diagram-tag { display: inline-flex; align-items: center; padding: 0.18em 0.6em; border-radius: 9999px; font-size: 11px; font-weight: 500; background: var(--accent-muted); color: var(--accent); border: 1px solid rgba(99,102,241,0.22); letter-spacing: 0.02em; }
.light .diagram-tag { border-color: rgba(79,70,229,0.22); }
