/* GENERATED by scripts/build-stylesheet.mjs from reference/contract-v3/learn-article.html — DO NOT EDIT.
 *
 * Visual Contract v3: this sheet is the learn-article surface's oracle stylesheet VERBATIM. Refresh
 * the contract file and run `npm run css`; the release gate runs `--check` and fails on drift.
 */
/* CoreVecta Atlas — contract-v4 canonical token sheet (Wave R0, card atlas-redesign-flagship-2026-08-05)
   ONE token generation for all surfaces. Derived from the designers' system
   (/home/sali/atlasv2/redesign/, Calculatordetail generation) with the ratified red-line
   corrections applied. Dark = brand default; light fully covered. Every oracle embeds this
   block verbatim at the top of its stylesheet. */

:root {
  color-scheme: dark;
  /* surfaces */
  --bg: #07110e;
  --bg-elevated: #0b1713;
  --surface: #10201a;
  --surface-2: #142820;
  --surface-3: #193229;
  --surface-soft: rgba(255, 255, 255, .035);
  /* text */
  --text: #f4f8f5;
  --text-soft: #c0ccc5;
  --text-muted: #8fa198;
  /* lines */
  --line: rgba(216, 239, 225, .13);
  --line-strong: rgba(216, 239, 225, .22);
  /* accent — the reader's color: interactive, CTA, active states */
  --accent: #a7f36d;
  --accent-strong: #86df45;
  --accent-ink: #10200b;          /* text ON accent fills */
  --accent-soft: rgba(167, 243, 109, .12);
  --accent-fill: #a7f36d;         /* non-text graphics: bars, chart strokes, fills */
  /* semantic */
  --teal: #77e7cc;                /* engine/verified secondary */
  --warn: #ffd166;
  --danger: #ff8e8e;
  --blue: #8fc7ff;
  --violet: #c7a8ff;
  /* elevation */
  --shadow: 0 24px 64px rgba(0, 0, 0, .30);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, .18);
  /* geometry */
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --header-h: 72px;
  --max: 1380px;
  /* type — Inter first-in-stack ONLY (no webfont, gate law NO REMOTE FONT) */
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f2;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f7f1;
  --surface-3: #ebf1e9;
  --surface-soft: rgba(10, 34, 22, .035);
  --text: #102018;
  --text-soft: #3d5146;
  --text-muted: #5c6f64;          /* corrected from #687c71 — 4.98:1 on --bg (was 4.13 FAIL) */
  --line: rgba(15, 42, 27, .12);
  --line-strong: rgba(15, 42, 27, .20);
  --accent: #37791b;              /* corrected from #5dbf2f — 5.37:1 on white as text (was 2.34 FAIL) */
  --accent-strong: #2f6a15;       /* hover/emphasis — 6.58:1 */
  --accent-ink: #ffffff;          /* white on #37791b = 5.37:1 (was 2.34 FAIL) */
  --accent-soft: rgba(82, 181, 38, .12);
  --accent-fill: #4ca224;         /* graphics-only (>=3:1); NEVER as text in light theme */
  --teal: #157d69;                /* 5.04:1 as text — ok */
  --warn: #8f5a00;                /* darkened from #b46f00 (4.03 marginal) for small-text use */
  --danger: #bd3e3e;              /* 5.35:1 — ok */
  --blue: #226dac;
  --violet: #6d4fb0;
  --shadow: 0 24px 64px rgba(41, 63, 49, .13);
  --shadow-soft: 0 14px 36px rgba(41, 63, 49, .09);
}

/* ===== base (mobile-first, 390 is the base layout) ========================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 78px); }
body {
  margin: 0; min-width: 320px;
  background:
    radial-gradient(circle at 12% -6%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 30rem),
    radial-gradient(circle at 90% 4%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 28rem),
    var(--bg);
  color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
svg { display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: fixed; left: 8px; top: 8px; z-index: 1000; transform: translateY(-160%); padding: 12px 16px; border-radius: var(--radius-xs); background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.skip:focus { transform: none; }
/* engine-number treatment — every engine-produced figure carries .num */
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ======================================================================
   SHARED SHELL — canonical, byte-identical across all eight v4 oracles.
   Normalized from calculator.html (THE SHELL IS ONE SHELL, v4). Refresh
   the shell here and re-run the normalizer; drift fails the css build.
   ====================================================================== */

/* ======================================================================
   SHARED SHELL — canonical, byte-identical across all eight v4 oracles.
   Normalized from calculator.html (THE SHELL IS ONE SHELL, v4). Refresh
   the shell here and re-run the normalizer; drift fails the css build.
   ====================================================================== */

/* ======================================================================
   SHARED SHELL — canonical, byte-identical across all eight v4 oracles.
   Normalized from calculator.html (THE SHELL IS ONE SHELL, v4). Refresh
   the shell here and re-run the normalizer; drift fails the css build.
   ====================================================================== */
.skip-link {
  position: fixed; top: 8px; left: 8px; transform: translateY(-150%); z-index: 999;
  padding: 12px 16px; border-radius: var(--radius-xs); background: var(--accent); color: var(--accent-ink); font-weight: 800;
}
.skip-link:focus { transform: none; }
.oracle-note { color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.commercial-slot:empty { display: none; }
.shell-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
}
.header-inner {
  width: min(var(--max), calc(100% - 32px)); height: 100%; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--teal));
  color: var(--accent-ink);
}
.brand-copy { display: grid; line-height: 1; gap: 4px; }
.brand-copy strong { font-size: 17px; letter-spacing: -.015em; font-weight: 800; }
.brand-copy span { display: none; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.primary-nav { display: none; align-items: center; gap: 4px; }
.nav-link { padding: 10px 13px; border-radius: 11px; color: var(--text-soft); font-size: 15px; font-weight: 700; }
.nav-link:hover { background: var(--surface-soft); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 8px; justify-self: end; }
.tool-btn, .search-btn {
  min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: var(--text-soft); font-weight: 700;
  transition: border-color .2s;
}
.tool-btn { width: 42px; padding: 0; }
.tool-btn:hover, .search-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.search-btn { width: 42px; padding: 0; }
.search-btn kbd {
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px;
  color: var(--text-muted); font-size: 12px; background: var(--surface); font-family: var(--font);
}
.mobile-bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 70;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--bg-elevated); box-shadow: var(--shadow-soft);
}
.mobile-bottom-nav a {
  min-height: 52px; display: grid; place-items: center; align-content: center; gap: 3px;
  border-radius: 12px; color: var(--text-muted); font-size: 11px; font-weight: 650;
}
.mobile-bottom-nav svg { width: 20px; height: 20px; }
.mobile-bottom-nav a.active { background: var(--accent-soft); color: var(--accent); }
.page { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 18px 0 24px; }
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  color: var(--text-muted); font-size: 14px; font-weight: 650; margin-bottom: 16px;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb strong { color: var(--text-soft); font-weight: 650; }
.crumb-sep { opacity: .5; }
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--bg-elevated); }
.refnote { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.search-btn .search-label, .search-btn kbd { display: none; }
.lang-chip { width: auto; padding: 0 12px; font-size: 14px; font-weight: 800; }
.footer-inner { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 40px 0 120px; display: grid; gap: 28px; }
.footer-copy { color: var(--text-muted); max-width: 480px; font-size: 14px; margin: 14px 0 0; }
.footer-col strong { display: block; margin-bottom: 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); font-weight: 700; }
.footer-col a { display: block; padding: 5px 0; color: var(--text-soft); font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
@media (min-width: 720px) {
.header-inner { width: min(var(--max), calc(100% - 40px)); gap: 28px; }
.brand-copy span { display: block; }
.search-btn { width: auto; padding: 0 13px; }
.page { width: min(var(--max), calc(100% - 40px)); padding-top: 26px; }
.search-btn .search-label, .search-btn kbd { display: inline-block; }
.footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
.primary-nav { display: flex; }
.mobile-bottom-nav { display: none; }
.footer-inner { grid-template-columns: 1.4fr repeat(3, .6fr); gap: 36px; padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
.skip-link { transition: none; }
}
@media print {
.site-footer { margin-top: 12pt; background: none; border-top: 0; }
.refnote { border-top: 1px solid var(--line); }
.page, .footer-inner { width: 100%; padding: 0; }
}
/* ==== end shared shell ==== */






































/* ==== end shared shell ==== */




































/* ==== end shared shell ==== */



/* reading progress — CSS scroll-driven, zero JS; engines without scroll timelines never grow it */
.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 90; pointer-events: none; }
.reading-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); animation: reading-grow linear both; animation-timeline: scroll(root); }
@keyframes reading-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ===== shared shell: header =============================================================== */


















/* ===== page frame ========================================================================== */






/* ===== hero ================================================================================ */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 22px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--teal) 8%, transparent), transparent 48%), var(--surface-soft); }
.hero::after { content: ""; position: absolute; right: -104px; top: -120px; width: 300px; height: 300px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent); box-shadow: 0 0 0 48px color-mix(in srgb, var(--accent) 3%, transparent); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.eyebrow-icon { width: 32px; height: 32px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--accent-soft); }
h1 { margin: 0; max-width: 890px; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -.04em; text-wrap: balance; }
.lead { max-width: 70ch; margin: 16px 0 0; color: var(--text-soft); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--text-soft); font-size: 13px; font-weight: 650; }
.pill.verified { border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); color: var(--accent); }
.hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
.btn { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 15px; font-weight: 800; transition: .2s transform, .2s border-color; }
.btn.primary { border-color: transparent; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); }
.btn:hover { transform: translateY(-1px); }
.brief { position: relative; z-index: 1; align-self: stretch; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 78%, transparent); display: grid; align-content: start; }
.brief-kicker { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.brief h2 { margin: 6px 0 10px; font-size: 22px; line-height: 1.15; letter-spacing: -.03em; }
.brief p { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.55; }
.mini-mix { margin-top: 18px; display: grid; gap: 10px; }
.mini-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--text-muted); font-weight: 650; }
.mini-track { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mini-fill { height: 100%; border-radius: inherit; }
.mini-row strong { color: var(--text-soft); font-size: 12px; }
.brief-total { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.brief-total span { color: var(--text-muted); font-size: 13px; font-weight: 650; }
.brief-total strong { font-size: 26px; letter-spacing: -.03em; line-height: 1; }
.brief-note { margin-top: 9px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }

/* graphics fills — token-named so BOTH lessons share one vocabulary; --accent-fill is graphics-only */
.seg-accent { background: var(--accent-fill); }
.seg-blue   { background: var(--blue); }
.seg-warn   { background: var(--warn); }
.seg-teal   { background: var(--teal); }
/* width/height utilities (no inline styles in an oracle) */
.w-10 { width: 10.06%; } .w-15 { width: 15%; } .w-19 { width: 19.01%; } .w-23 { width: 23%; }
.w-25 { width: 25%; } .w-28 { width: 27.9%; } .w-34 { width: 34%; } .w-43 { width: 43.03%; }
.w-44 { width: 44%; } .w-48 { width: 48%; } .w-65 { width: 65%; } .w-68 { width: 68%; } .w-85 { width: 85%; } .w-100 { width: 100%; }
.h-32 { height: 32%; } .h-37 { height: 37%; } .h-38 { height: 38%; } .h-100 { height: 100%; }

/* ===== journey pill subnav (sticky; SOLID — no blur off the header) ======================== */
.journey { position: sticky; top: var(--header-h); z-index: 50; margin-top: 16px; padding: 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-elevated); box-shadow: var(--shadow-soft); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.journey::-webkit-scrollbar { display: none; }
.journey a { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: var(--radius-xs); color: var(--text-muted); font-size: 13px; font-weight: 700; }
.journey a span { width: 23px; height: 23px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--surface-2); font-size: 11px; font-family: var(--font-mono); }
.journey a:hover, .journey a.active { background: var(--accent-soft); color: var(--accent); }

/* ===== article + rail layout =============================================================== */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 24px; }
.article { min-width: 0; display: grid; gap: 20px; }

/* mobile/tablet contents — details/summary at article top; the sticky rail replaces it >=1080 */
.toc-inline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.toc-inline summary { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px; cursor: pointer; font-weight: 800; font-size: 15px; list-style: none; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary small { margin-left: auto; color: var(--text-muted); font-size: 12px; font-weight: 650; }
.chev { transition: .2s transform; }
.toc-inline[open] .chev { transform: rotate(180deg); }
.toc-links { list-style: none; margin: 0; padding: 4px 10px 12px; display: grid; gap: 3px; }
.toc-links a { display: grid; grid-template-columns: 26px 1fr; gap: 7px; align-items: center; min-height: 44px; padding: 4px 8px; border-radius: var(--radius-xs); color: var(--text-muted); font-size: 13px; font-weight: 700; line-height: 1.35; }
.toc-links .toc-n { color: var(--text-soft); font-size: 11px; font-weight: 800; font-family: var(--font-mono); }
.toc-links a:hover, .toc-links a.active { background: var(--accent-soft); color: var(--accent); }
.toc-links a.active .toc-n { color: var(--accent); }

/* ===== sections ============================================================================ */
.section { padding: 22px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.section-no { flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; font-family: var(--font-mono); }
.section h2 { margin: 2px 0 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.section h3 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.section p { margin: 0; color: var(--text-soft); max-width: 82ch; line-height: 1.65; }
.section p + p { margin-top: 14px; }
.section strong { color: var(--text); }

.concepts { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.concept { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.concept-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.concept-num { font-size: 11px; font-weight: 800; color: var(--accent); letter-spacing: .1em; font-family: var(--font-mono); }
.concept-icon { width: 34px; height: 34px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--surface-2); color: var(--teal); }
.concept strong { display: block; font-size: 16px; }
.concept p { margin-top: 7px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.quote { margin-top: 18px; padding: 16px 18px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--accent-soft); color: var(--text-soft); font-size: 16px; }
.quote strong { color: var(--accent); }

/* concept model card (equal mass / unequal volume — and the energy loss ledger) */
.visual-lab { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.visual-head { display: grid; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.visual-head p { margin-top: 5px; color: var(--text-muted); font-size: 13px; }
.tag { justify-self: start; flex: 0 0 auto; min-height: 30px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal); font-size: 11px; font-weight: 800; }
.volume-demo { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 16px; }
.mass-group { display: grid; gap: 12px; }
.mass-item { display: grid; grid-template-columns: 72px 1fr 48px; gap: 10px; align-items: center; }
.mass-label { font-size: 13px; color: var(--text-soft); font-weight: 650; }
.mass-cylinder { height: 66px; display: flex; align-items: end; justify-content: center; border: 1px solid var(--line-strong); border-top-color: transparent; border-radius: 0 0 var(--radius-xs) var(--radius-xs); padding: 4px; background: var(--surface-soft); overflow: hidden; }
.mass-level { width: 100%; }
.mass-value { text-align: right; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.stack-side { display: grid; align-content: center; }
.stack-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.yield-stack { height: 72px; display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
/* labels ON colored fills: var(--accent-ink) is legible on accent/blue/warn/teal in BOTH themes
   (dark ink on light dark-theme fills; white on the darkened light-theme fills, all >=4.5:1) */
.yield-part { height: 100%; display: grid; place-items: center; min-width: 20px; border-right: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); color: var(--accent-ink); font-size: 11px; font-weight: 800; }
.yield-part:last-child { border-right: 0; }
.yield-part.seg-accent { background: var(--accent); } /* text-bearing: pair with --accent-ink, never --accent-fill */
.yield-total { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.yield-total span { font-size: 12px; color: var(--text-muted); font-weight: 650; }
.yield-total strong { display: block; font-size: 24px; letter-spacing: -.03em; }
.yield-total small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.legend-row span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.impact-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.impact { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.impact-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.impact strong { display: block; font-size: 16px; }
.impact p { margin-top: 6px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }

.steps { display: grid; gap: 11px; margin-top: 18px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.step-badge { width: 44px; height: 44px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-weight: 800; font-family: var(--font-mono); }
.step strong { display: block; font-size: 16px; }
.step p { margin-top: 4px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.formula { margin-top: 18px; padding: 18px 14px; border: 1px solid color-mix(in srgb, var(--teal) 23%, var(--line)); border-radius: var(--radius-sm); background: linear-gradient(115deg, color-mix(in srgb, var(--teal) 10%, transparent), transparent), var(--surface); text-align: center; }
.formula-main { font-family: var(--font-mono); font-size: clamp(16px, 2.6vw, 26px); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.formula-key { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 17px; margin-top: 11px; color: var(--text-muted); font-size: 12px; }
.formula-key b { color: var(--text-soft); }

/* ===== try-it band: the engine mount (pre-intent is the first-class state) ================= */
.calculator { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-soft); }
.calc-head { padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.calc-title { display: flex; align-items: center; gap: 12px; }
.runtime { width: 38px; height: 38px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.calc-title strong { display: block; font-size: 16px; }
.calc-title span { display: block; color: var(--text-muted); font-size: 12px; }
.status-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.calc-body { display: grid; grid-template-columns: 1fr; }
.input-panel { padding: 17px; border-bottom: 1px solid var(--line); }
.input-table { display: grid; gap: 11px; }
/* base = the 620px labeled-card recomposition: each row is a card, .field::before names its column */
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-items: end; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.input-row.header { display: none; }
.input-row label { grid-column: 1 / -1; font-size: 15px; font-weight: 650; color: var(--text); margin-bottom: 1px; line-height: 1.3; }
.field { position: relative; }
.field::before { content: attr(data-label); display: block; margin: 0 0 5px; color: var(--text-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.field.wide { grid-column: 1 / -1; }
.field input { width: 100%; height: 52px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface); color: var(--text); padding: 0 42px 0 12px; font-size: 16px; font-weight: 700; outline: 0; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.unit { position: absolute; right: 11px; bottom: 19px; color: var(--text-muted); font-size: 11px; font-weight: 800; pointer-events: none; }
.calc-note { display: flex; gap: 8px; margin-top: 15px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.result-panel { padding: 17px; }
.result-primary span { color: var(--text-muted); font-size: 13px; font-weight: 650; }
.big-result { margin-top: 4px; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; font-weight: 800; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.big-result small { font-size: .35em; color: var(--text-soft); letter-spacing: 0; }
.result-primary .status-chip { margin-top: 12px; }
.result-metrics { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
.result-metric { padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.result-metric span { display: block; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.result-metric strong { display: block; margin-top: 3px; font-size: 18px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.composition { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.composition-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.composition-head strong { font-size: 13px; }
.composition-head span { color: var(--text-muted); font-size: 11px; }
.composition-bar { height: 28px; display: flex; border-radius: var(--radius-xs); overflow: hidden; background: var(--surface-3); }
.composition-seg { height: 100%; }
.result-caption { margin-top: 13px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.open-full { width: 100%; min-height: 48px; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--text-soft); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; transition: .2s border-color; }
.open-full:hover { border-color: var(--accent); color: var(--accent); }

.input-cards { display: grid; grid-template-columns: 1fr; gap: 11px; margin-top: 18px; }
.input-card { display: grid; grid-template-columns: 35px 1fr; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.input-card b { width: 35px; height: 35px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 11px; font-family: var(--font-mono); }
.input-card strong { font-size: 15px; }
.input-card p { margin-top: 4px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.scenario { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(115deg, var(--accent-soft), transparent), var(--surface); }
.scenario h3 { font-size: 19px; }
.scenario p { margin-top: 7px; color: var(--text-muted); font-size: 14px; }
.scenario-masses { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.scenario-masses span { padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface-2); color: var(--text-soft); font-size: 11px; font-weight: 650; }
.scenario-result span { display: block; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.scenario-result strong { display: block; font-size: 28px; letter-spacing: -.03em; }
.number-list { display: grid; gap: 10px; margin-top: 18px; }
.number-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.number-item span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; font-family: var(--font-mono); }
.number-item p { color: var(--text-soft); font-size: 14px; }
.mistakes { display: grid; gap: 9px; margin-top: 18px; }
.mistake { display: grid; grid-template-columns: 35px 1fr; gap: 12px; padding: 15px; border: 1px solid color-mix(in srgb, var(--danger) 16%, var(--line)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.mistake i { width: 35px; height: 35px; border-radius: var(--radius-xs); display: grid; place-items: center; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-style: normal; font-weight: 800; }
.mistake strong { display: block; font-size: 14px; }
.mistake p { margin-top: 3px; color: var(--text-muted); font-size: 13px; line-height: 1.48; }
.faq { display: grid; gap: 9px; margin-top: 18px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 17px; cursor: pointer; font-weight: 800; font-size: 15px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; width: 27px; height: 27px; border-radius: var(--radius-xs); display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 18px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 17px 17px; margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.use-grid { display: grid; grid-template-columns: 1fr; gap: 11px; margin-top: 18px; }
.use { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.use-num { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; font-family: var(--font-mono); }
.use strong { display: block; margin-top: 8px; font-size: 15px; }
.use p { margin-top: 5px; color: var(--text-muted); font-size: 13px; line-height: 1.48; }
.guards { display: grid; gap: 9px; margin-top: 18px; }
.guard { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.guard svg { color: var(--warn); margin-top: 2px; }
.guard p { color: var(--text-soft); font-size: 14px; }
.authority { margin-top: 18px; padding: 17px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 13px; }
.authority strong { display: block; color: var(--text-soft); margin-bottom: 4px; }

/* ===== desktop TOC rail (>=1080 only) ====================================================== */
.toc-rail { display: none; }
.toc-card, .side-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-soft); padding: 17px; }
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.toc-head strong { font-size: 14px; }
.toc-head span { color: var(--text-muted); font-size: 11px; font-weight: 650; }
.toc-card .toc-links { padding: 10px 0 0; max-height: 54vh; overflow: auto; scrollbar-width: thin; }
.side-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.side-card h3 { margin: 5px 0 6px; font-size: 18px; line-height: 1.2; }
.side-card p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.side-card .btn { width: 100%; min-height: 44px; margin-top: 13px; font-size: 13px; }
.reading-stat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 13px; }
.reading-stat div { padding: 9px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface-2); }
.reading-stat span { display: block; color: var(--text-muted); font-size: 11px; }
.reading-stat strong { font-size: 14px; }

/* ===== continue / next steps =============================================================== */
.continue { margin-top: 24px; padding: 21px 17px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(115deg, color-mix(in srgb, var(--teal) 10%, transparent), transparent), var(--surface); }
.continue-top { display: grid; gap: 14px; }
.continue h2 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.035em; }
.continue p { margin: 7px 0 0; color: var(--text-muted); }
.next-grid { display: grid; grid-template-columns: 1fr; gap: 11px; margin-top: 20px; }
.next-card { min-height: 142px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); display: flex; flex-direction: column; }
.next-card span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.next-card strong { margin-top: 8px; font-size: 16px; line-height: 1.3; }
.next-card p { margin-top: 6px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.next-card svg { margin-top: auto; color: var(--accent); }

/* ===== shared shell: footer + mobile bottom nav =========================================== */



.footer-heading { margin: 0 0 10px; color: var(--text-muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }








/* ===== ladder up: 720 ====================================================================== */
@media (min-width: 720px) {
  body { font-size: 17px; }
  
  
  
  .hero { padding: 30px; }
  .hero-actions { display: flex; flex-wrap: wrap; }
  .section { padding: 30px; }
  .concepts, .input-cards, .use-grid { grid-template-columns: repeat(2, 1fr); }
  .visual-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 19px 20px; }
  .volume-demo { grid-template-columns: 1fr 1.05fr; padding: 22px; }
  .mass-item { grid-template-columns: 92px 1fr 56px; }
  .formula { padding: 22px; }
  .calc-head { padding: 20px 22px; }
  .input-panel, .result-panel { padding: 22px; }
  .input-row { grid-template-columns: minmax(110px, 1fr) 118px 98px; padding: 0; border: 0; border-radius: 0; background: none; align-items: center; }
  .input-row.header { display: grid; color: var(--text-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
  .input-row label { grid-column: auto; font-size: 13px; font-weight: 650; color: var(--text-soft); margin: 0; }
  .field::before { display: none; }
  .field.wide { grid-column: 2 / -1; }
  .unit { top: 50%; bottom: auto; transform: translateY(-50%); }
  .result-metrics { grid-template-columns: repeat(2, 1fr); }
  .scenario { grid-template-columns: 1fr auto; }
  .scenario-result { text-align: right; }
  .continue { padding: 27px; }
  .continue-top { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
  .continue p { max-width: 60ch; }
  .next-grid { grid-template-columns: repeat(2, 1fr); }
  
}

/* ===== ladder up: 1080 ===================================================================== */
@media (min-width: 1080px) {
  
  
  
  
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 32px; padding: 34px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; }
  .toc-inline { display: none; }
  .toc-rail { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 70px); }
  .impact-grid { grid-template-columns: repeat(3, 1fr); }
  .calc-body { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
  .input-panel { border-bottom: 0; border-right: 1px solid var(--line); }
  .next-grid { grid-template-columns: repeat(3, 1fr); }
  
}

/* ===== wide polish: 1360 =================================================================== */
@media (min-width: 1360px) {
  .article-layout { gap: 44px; }
  .section { padding: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
