/* GENERATED by scripts/build-stylesheet.mjs from reference/contract-v3/calculator.html — DO NOT EDIT.
 *
 * Visual Contract v3: this sheet is the calculator 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);
}

/* PRINT TOKENS — part of the canonical token region. "An estimate that cannot be printed is
   not an estimate": paper output always resolves the CANONICAL LIGHT VALUES ABOVE, re-declared
   verbatim here so a dark-theme reader prints ink-safe. No new colors are introduced. */
@media print {
  :root {
    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;
    --line: rgba(15, 42, 27, .12);
    --line-strong: rgba(15, 42, 27, .20);
    --accent: #37791b;
    --accent-strong: #2f6a15;
    --accent-ink: #ffffff;
    --accent-soft: rgba(82, 181, 38, .12);
    --accent-fill: #4ca224;
    --teal: #157d69;
    --warn: #8f5a00;
    --danger: #bd3e3e;
    --blue: #226dac;
    --violet: #6d4fb0;
    --shadow: none;
    --shadow-soft: none;
  }
}

/* ============================================================================
   Base — authored at 390px, built UP (720 / 1080 / 1360 ladder only)
   ============================================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% -10%, color-mix(in srgb, var(--teal) 8%, transparent), transparent 34rem),
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }


/* ======================================================================
   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 ==== */



/* Oracle annotation — never ships as content, documents declarative states. */


/* Commercial slots — zero footprint until filled. */


/* ============================================================================
   Shared shell — header
   ============================================================================ */




















/* ============================================================================
   Shared shell — mobile bottom nav (floating island, solid — no blur)
   ============================================================================ */





/* ============================================================================
   Page frame + breadcrumb (WRAPS on mobile — clipped crumbs are a named defect)
   ============================================================================ */






/* ============================================================================
   Head — hero with domain eyebrow, h1, subtitle, meta pills
   ============================================================================ */
.calc-head {
  position: relative; overflow: hidden;
  padding: 22px 18px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(115deg, var(--accent-soft), transparent 50%), var(--surface-soft);
}
.calc-head::after {
  content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; right: -88px; top: -105px;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  box-shadow: 0 0 0 38px color-mix(in srgb, var(--accent) 3%, transparent), 0 0 0 76px color-mix(in srgb, var(--accent) 2%, transparent);
  pointer-events: none;
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font-size: 14px; font-weight: 800; letter-spacing: .02em; margin-bottom: 13px; }
.domain-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); font-weight: 800; }
h1 { margin: 0; max-width: 900px; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.04em; text-wrap: balance; font-weight: 800; }
.subtitle { margin: 14px 0 0; max-width: 830px; color: var(--text-soft); font-size: 17px; line-height: 1.55; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.pill {
  display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 99px;
  color: var(--text-soft); background: var(--surface-soft); font-size: 13px; font-weight: 700;
}
.pill.good { border-color: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); background: var(--accent-soft); }

/* ============================================================================
   Workspace — engine mount panel | result panel
   ============================================================================ */
.workspace { display: grid; gap: 14px; align-items: start; margin-top: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; font-weight: 800; }
.panel-head p { margin: 4px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.45; }
.status-chip {
  min-height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 12%, transparent); }
.panel-body { padding: 18px; }

/* Engine mount vocabulary — in production the governed loader renders the pack's own
   fields, action and results into .authority-mount using exactly these classes. */
.authority-mount { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-row label { color: var(--text-soft); font-size: 15px; font-weight: 700; }
.field-help { color: var(--text-muted); font-size: 12px; }
.input-wrap { position: relative; }
.input-wrap input, .input-wrap select {
  width: 100%; height: 54px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  padding: 0 54px 0 16px; font-size: 17px; font-weight: 650; outline: none;
  transition: border-color .2s;
}
.input-wrap input:hover, .input-wrap select:hover { border-color: color-mix(in srgb, var(--accent) 36%, var(--line-strong)); }
.input-wrap input:focus, .input-wrap select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.input-affix { position: absolute; top: 50%; transform: translateY(-50%); right: 16px; color: var(--text-muted); font-size: 13px; font-weight: 800; pointer-events: none; }
.currency-affix { left: 16px; right: auto; color: var(--text-soft); font-size: 17px; }
.input-wrap.has-prefix input { padding-left: 46px; }
.input-wrap select { appearance: none; padding-right: 44px; cursor: pointer; }
.select-arrow { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); }
.segmented {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.segmented button { min-height: 46px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-muted); cursor: pointer; font-weight: 700; font-size: 14px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { color: var(--accent-ink); background: var(--accent); }
.segmented button span { display: block; font-size: 11px; opacity: .72; font-weight: 700; margin-top: 1px; }
.mount-action {
  min-height: 56px; border: 0; border-radius: 15px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: var(--accent-ink);
  cursor: pointer; font-size: 17px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 17%, transparent);
  transition: transform .2s;
}
.mount-action:hover { transform: translateY(-1px); }
.mount-action:active { transform: translateY(0); }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.privacy-note svg { flex: 0 0 auto; margin-top: 1px; }

/* Result panel — the PRE-INTENT state is the first-class default: em dash + Ready chip.
   Every engine-produced value slot wears mono/tabular. */
.result-panel { position: relative; }
.result-panel::before {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -220px; top: -230px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.result-hero { position: relative; padding: 20px 18px; border-bottom: 1px solid var(--line); }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-kicker { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.result-value {
  margin-top: 8px; font-size: clamp(44px, 6vw, 68px); line-height: 1; letter-spacing: -.04em; font-weight: 800;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.result-value .decimals { color: var(--text-soft); font-size: .52em; vertical-align: .38em; letter-spacing: -.02em; }
.result-period { color: var(--text-muted); font-size: 15px; font-weight: 650; margin-top: 8px; }
.result-grid { display: grid; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.metric { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.metric span { color: var(--text-muted); font-size: 12px; font-weight: 650; }
.metric b {
  display: block; margin-top: 4px; font-size: 17px; line-height: 1.25; letter-spacing: -.015em; font-weight: 700;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.composition { padding: 18px; border-bottom: 1px solid var(--line); position: relative; }
.section-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.comp-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 52px; gap: 10px; align-items: center; padding: 7px 0; }
.comp-row > span { font-size: 13px; font-weight: 650; color: var(--text-soft); }
.track { height: 9px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--accent-fill); border-radius: 99px; }
.comp-row b { text-align: right; font-size: 12px; font-weight: 700; font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-soft); }
.trace { padding: 18px; position: relative; }
.trace-row { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.trace-row:first-of-type { border-top: 0; padding-top: 0; }
.trace-row b { font-size: 13px; font-weight: 800; }
.trace-row small { color: var(--text-soft); font-size: 12px; line-height: 1.5; }
.state-example { margin: 0 18px 18px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); display: grid; gap: 6px; }
.state-example .example-value {
  font-size: 34px; line-height: 1; letter-spacing: -.04em; font-weight: 800;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.state-example .example-value .decimals { color: var(--text-soft); font-size: .52em; vertical-align: .38em; }
.state-example .example-period { color: var(--text-muted); font-size: 13px; font-weight: 650; }

/* ============================================================================
   Visual — the plot card (design stand-in for <atlas-line-plot>)
   ============================================================================ */
.visual { margin-top: 14px; padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.visual h2 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; font-weight: 800; }
.chart-wrap { position: relative; height: 190px; margin-top: 16px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--accent-fill); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-stop-a { stop-color: var(--accent-fill); stop-opacity: .22; }
.chart-stop-b { stop-color: var(--accent-fill); stop-opacity: 0; }
.chart-x-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.visual-note { margin: 12px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.visual .oracle-note { margin-top: 8px; }

/* ============================================================================
   Section chip-nav (intentional horizontal scroller at 390)
   ============================================================================ */
.section-nav { margin-top: 16px; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  min-height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 99px; color: var(--text-soft); background: var(--surface);
  font-size: 14px; font-weight: 650; transition: border-color .2s;
}
.section-nav a:hover { color: var(--text); border-color: var(--line-strong); }

/* ============================================================================
   Content layout — editorial column + side rail
   ============================================================================ */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 16px; }
.content-layout .card { min-width: 0; }
.content-col { display: grid; gap: 14px; min-width: 0; }
.card { padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.card h2 { margin: 0 0 10px; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; }
.card p { color: var(--text-soft); margin: 0; }
.card p + p { margin-top: 12px; }
.formula {
  margin-top: 16px; overflow-x: auto; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--surface);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 16px; text-align: center; white-space: nowrap;
}
.formula-legend { margin-top: 10px; color: var(--text-muted); font-size: 13px; }
.check-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--text-soft); }
.check-list li::before {
  content: "✓"; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 11px; font-weight: 800; margin-top: 4px;
}
.info-grid { display: grid; gap: 10px; margin-top: 16px; }
.info { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.info b { display: block; font-size: 15px; font-weight: 800; }
.info p { color: var(--text-soft); font-size: 13px; margin: 4px 0 0; line-height: 1.5; }

/* Side rail */
.side-rail { display: grid; gap: 14px; min-width: 0; }
.side-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.side-card h2 { margin: 0 0 14px; font-size: 17px; letter-spacing: -.02em; font-weight: 800; }
.side-card > p { color: var(--text-soft); font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.learn-cta { background: linear-gradient(140deg, var(--surface), var(--accent-soft)); }
.learn-cta .label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; color: var(--accent); }
.learn-cta h2 { margin: 6px 0 5px; font-size: 19px; }
.learn-cta p { color: var(--text-soft); font-size: 14px; line-height: 1.5; margin: 0; }
.learn-cta a { display: inline-flex; margin-top: 12px; color: var(--accent); font-size: 14px; font-weight: 700; }
.authority-row { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.authority-row:first-of-type { border-top: 0; padding-top: 0; }
.authority-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--accent); }
.authority-row strong { display: block; font-size: 13px; font-weight: 800; }
.authority-row span { display: block; color: var(--text-muted); font-size: 12px; line-height: 1.4; margin-top: 2px; word-break: break-word; }
.authority-row .code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-soft); }
.related-link { display: block; padding: 13px 0; border-top: 1px solid var(--line); }
.related-link:first-of-type { border-top: 0; padding-top: 0; }
.related-link strong { display: block; font-size: 14px; line-height: 1.3; font-weight: 800; }
.related-link span { display: block; color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.related-link:hover strong { color: var(--accent); }
.rail-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rail-list li { color: var(--text-soft); font-size: 14px; line-height: 1.45; }
.rail-list a { color: var(--accent); font-weight: 700; }
.rail-list a:hover { color: var(--accent-strong); }
.rail-foot { color: var(--text-muted); font-size: 13px; margin: 12px 0 0; }
.rail-foot a { color: var(--accent); font-weight: 700; }

/* ============================================================================
   Shared shell — footer
   ============================================================================ */








/* ============================================================================
   ≥720 — tablet
   ============================================================================ */
@media (min-width: 720px) {
  body { font-size: 17px; }
  
  
  
  
  
  .calc-head { padding: 28px 30px; border-radius: var(--radius-lg); }
  .authority-mount { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-full, .mount-action, .privacy-note, .authority-mount .oracle-note { grid-column: 1 / -1; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  
}

/* ============================================================================
   ≥1080 — desktop
   ============================================================================ */
@media (min-width: 1080px) {
  
  
  .workspace { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 22px; }
  .authority-mount { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
  .side-rail { grid-template-columns: 1fr; position: sticky; top: calc(var(--header-h) + 18px); }
  
}

/* ============================================================================
   ≥1360 — wide polish
   ============================================================================ */
@media (min-width: 1360px) {
  .workspace { gap: 24px; }
  .content-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ============================================================================
   Reduced motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .mount-action:hover, .mount-action:active { transform: none; }
  
}

/* ============================================================================
   Print — chrome hidden; workspace + provenance printable.
   "An estimate that cannot be printed is not an estimate."
   ============================================================================ */
@media print {
  body { background: var(--bg); padding: 0; font-size: 12pt; }
  .shell-header, .mobile-bottom-nav, .skip-link, .section-nav, .visual,
  .commercial-slot, .oracle-note, .state-example, .mount-action,
  .learn-cta, .related-tools-card, .related-calcs-card,
  .footer-col, .footer-brand { display: none !important; }
  
  .workspace, .content-layout, .side-rail { display: block; }
  .panel, .card, .side-card { break-inside: avoid; box-shadow: none; margin: 0 0 12pt; background: var(--surface); }
  .calc-head { border: 0; padding: 0 0 12pt; background: none; }
  .calc-head::after { display: none; }
  .result-panel::before { display: none; }
  .input-wrap input, .input-wrap select { background: var(--surface); }
  
  
  a { text-decoration: none; }
}
