/* V2.1: quiet reading, a tighter type scale, restrained lime and orange accents.
   The original stylesheet stays untouched as the functional baseline. */
:root {
  --paper: #fafbf8;
  --surface: #fff;
  --ink: #222721;
  --muted: #686a64;
  --line: #e3e6df;
  --lime: #e9f4bd;
  --soft: #f2f4ed;
  --accent: #b33a13;
  --orange: #fa572b;
  --danger: #b63523;
  --grid: #15191006;
  --edge: #d4d9ce;
  --board: #e9eae3;
  --header: 60px;
  --mono: "SFMono-Regular", Consolas, monospace;
}
:root[data-theme=dark] {
  --paper: #171815;
  --surface: #20211d;
  --ink: #f4f5ed;
  --muted: #b4b7a9;
  --line: #41443a;
  --soft: #2b2e25;
  --accent: #ff9972;
  --orange: #ff8056;
  --danger: #ff9e8b;
  --grid: #dbe5bc09;
  --edge: #4a5143;
  --board: #24261e;
}
body { background: var(--surface); font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif; }
html { scroll-padding-top: calc(var(--header) + 16px); }
::selection { background: var(--lime); color: #10110c; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline-color: var(--orange); }
.pixel-icon { stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.button { gap: 10px; min-height: 44px; border: 1px solid var(--edge); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; transition: background .18s, border-color .18s, box-shadow .18s; }
.button.dark { color: #fff; background: #20251e; border-color: #20251e; box-shadow: none; }
.button.outline { color: var(--ink); background: var(--surface); box-shadow: none; }
.button.dark:hover { color: #fff; background: #363e2e; border-color: #363e2e; box-shadow: none; transform: none; }
.button.outline:hover { background: var(--soft); border-color: var(--muted); box-shadow: none; transform: none; }
.button .pixel-icon { width: 19px; height: 19px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.6; }
.text-link .pixel-icon { width: 18px; height: 18px; }

/* Compact navigation with a single, quiet active state. */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); height: var(--header); }
.header-inner { max-width: 1328px; padding: 0 24px; gap: 16px; }
.brand { font-size: 18px; gap: 9px; margin-right: 15px; letter-spacing: -.4px; }
.brand b { font-size: 14px; font-weight: 650; letter-spacing: 0; }
.brand svg { color: var(--orange); width: 26px; height: 26px; stroke-width: 1.9; }
.system-home-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.system-home-link:hover { background: var(--lime); border-color: var(--lime); color: #28311e; }
.system-home-link>span:first-child { font-size: 16px; line-height: 1; }
.top-nav { margin-left: 0; gap: 6px; align-self: center; font-size: 13px; }
.top-nav a { border: 1px solid transparent; border-radius: 6px; height: 34px; padding: 0 12px; gap: 7px; }
.top-nav a svg { height: 14px; width: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.top-nav a.active { background: var(--lime); color: #28311e; border-color: transparent; box-shadow: none; }
.top-nav a.active:after { display: none; }
.top-nav a:not(.active):hover { background: var(--soft); color: var(--ink); }
.search-trigger { margin-left: auto; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; min-height: 34px; color: var(--muted); white-space: nowrap; }
.search-trigger svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.search-trigger>.search-label { font-size: 12px; font-weight: 600; }
.search-trigger kbd { font-size: 9px; margin-left: 2px; padding: 2px 3px; border: 0; color: var(--muted); }
.header-download { display: inline-flex; align-items: center; gap: 10px; background: var(--soft); color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 8px 13px; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: none; }
.header-download:hover { background: var(--lime); transform: none; box-shadow: none; }
#theme-toggle { border: 0; width: 30px; height: 30px; flex-shrink: 0; font-size: 18px; color: var(--muted); }

/* A typographic poster, not a boxed banner. */
.home-v2 { overflow: clip; }
.content-width { width: calc(100% - 64px); max-width: 1080px; margin-left: auto; margin-right: auto; }
.masthead { padding: 46px 24px 0; text-align: center; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; box-shadow: none; font-size: 12px; color: var(--muted); font-weight: 550; line-height: 1.7; }
.hero-kicker .pixel-icon { width: 15px; height: 15px; color: var(--accent); }
.masthead h1 { margin: 20px 0 18px; font-size: clamp(44px, 5vw, 64px); line-height: 1.13; letter-spacing: -2px; font-weight: 700; -webkit-text-stroke: 0; }
.masthead-description { margin: 0 auto; max-width: 680px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.masthead-actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 24px; }
.proof-strip { max-width: 1080px; margin: 40px auto 0; display: grid; grid-template-columns: repeat(4,1fr); border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; }
.proof-strip>div { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-right: 1px solid var(--line); }
.proof-strip>div:last-child { border: 0; }
.proof-strip .pixel-icon { width: 22px; height: 22px; color: var(--orange); }
.proof-strip b { display: block; font-size: 13px; line-height: 1.6; font-weight: 650; }
.proof-strip small { display: block; font-size: 12px; line-height: 1.6; margin-top: 4px; color: var(--muted); }
.masthead> :not(.proof-strip) { animation: rise-in .6s both; }
.masthead h1 { animation-delay: .07s; }
.masthead-description { animation-delay: .14s; }
.masthead-actions { animation-delay: .21s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
[data-reveal].revealed { animation: rise-in .6s both; }
.section-kicker { font-size: 12px; line-height: 1.6; color: var(--accent); font-weight: 600; margin-bottom: 10px; letter-spacing: .2px; }
.editorial-heading h2, .numbers-copy h2, .final-section h2 { font-size: clamp(28px,3vw,38px); font-weight: 650; line-height: 1.25; letter-spacing: -.8px; margin: 0 0 16px; -webkit-text-stroke: 0; }
.editorial-heading>p:last-child { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.centered { text-align: center; margin-bottom: 26px; }
.roadmap-section { margin-top: 56px; scroll-margin-top: 16px; }
.learning-board { border: 1px solid var(--edge); border-radius: 10px; box-shadow: none; overflow: hidden; }
.board-chrome { display: flex; justify-content: space-between; align-items: center; padding: 13px 20px; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); min-height: 44px; font-size: 12px; font-weight: 600; }
.window-dots { display: none; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #6b6e61; }
.window-dots i:first-child { background: var(--orange); }
.window-dots i:nth-child(2) { background: var(--lime); }
.board-label { text-align: left; letter-spacing: .3px; }
.board-local { color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 11px; font-weight: 400; }
.board-local i { width: 5px; height: 5px; border-radius: 50%; background: #82974f; box-shadow: none; }
.board-canvas { background: var(--paper); padding: 16px; }
.stage-connector { display: none; }
.stage-connector:before { content: ""; height: 1px; background: var(--orange); position: absolute; top: 50%; left: 12%; right: 12%; }
.stage-connector span { justify-self: center; display: grid; place-items: center; position: relative; width: 26px; height: 26px; border: 1px solid var(--edge); border-radius: 50%; background: var(--surface); font: 9px var(--mono); }
.stage-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
.stage-tab { display: flex; align-items: flex-start; gap: 9px; padding: 15px 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; min-height: 72px; transition: background .18s, border-color .18s; }
.stage-tab:hover { border-color: var(--muted); transform: none; }
.stage-tab[aria-selected=true] { color: #253017; background: var(--lime); border-color: #c7d99a; box-shadow: none; }
.stage-number { color: var(--muted); font: 500 11px/1.9 var(--mono); }
.stage-tab[aria-selected=true] .stage-number { color: #b33a13; }
.stage-tab b { display: block; font-size: 14px; line-height: 1.5; font-weight: 600; }
.stage-tab small { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.stage-tab[aria-selected=true] small { color: #4b512e; }
.stage-indicator { display: none; }
.stage-tab[aria-selected=true] .stage-indicator { background: #10110c; border-color: #10110c; color: var(--lime); }
.stage-panel { display: grid; grid-template-columns: .8fr 1.2fr; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 340px; overflow: hidden; }
.stage-summary { padding: 24px; border-right: 1px solid var(--line); }
.stage-summary .section-kicker { font-size: 11px; margin-bottom: 10px; }
.stage-summary h3 { font-size: 27px; letter-spacing: -.5px; margin-bottom: 12px; font-weight: 650; }
.stage-summary>p:not(.section-kicker) { color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 300px; margin-bottom: 18px; }
.stage-summary .button { min-height: 42px; padding: 10px 17px; font-size: 12px; }
.stage-outcomes { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; font-size: 12px; }
.stage-outcomes>span { display: flex; align-items: center; gap: 8px; }
.stage-outcomes>span:first-child { color: var(--muted); margin-bottom: 3px; }
.stage-outcomes .pixel-icon { color: var(--accent); width: 14px; height: 14px; }
.stage-reading { padding: 20px 24px; min-width: 0; }
.stage-reading-label { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.stage-reading .chapter-row { padding: 12px 0; }
.stage-reading .chapter-row strong { font-size: 14px; font-weight: 600; }
.stage-reading .chapter-row small { font-size: 12px; }
.stage-reading .chapter-row:last-child { border-bottom: 0; }
.board-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: var(--surface); border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); gap: 16px; }
.board-footer b { color: var(--ink); font-family: var(--mono); margin-right: 4px; }
.board-footer>div { display: flex; align-items: center; gap: 14px; font-family: var(--mono); white-space: nowrap; }
.stage-nav { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font-size: 18px; }
.stage-nav:hover { background: var(--lime); color: #10110c; }
.board-caption { text-align: center; font-size: 12px; line-height: 1.7; color: var(--muted); margin: 16px 0 0; }

/* Questions, a useful working model, and the full reading index. */
.question-section, .contents-section { margin-top: 64px; }
.split-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 24px; }
.split-heading h2 { font-size: 30px; line-height: 1.25; margin: 0; }
.split-heading .text-link { margin-bottom: 5px; }
.question-grid { grid-template-columns: repeat(3,1fr); border-color: var(--edge); background: var(--surface); }
.question-grid>a { border-color: var(--line); gap: 12px; padding: 22px 18px; font-size: 14px; line-height: 1.7; }
.question-grid>a>span:last-of-type { flex: 1; }
.question-grid small { font-size: 12px; margin-top: 5px; }
.question-grid .question-index { color: var(--accent); font: 10px/1.9 var(--mono); align-self: flex-start; }
.question-grid>a .pixel-icon { width: 17px; height: 17px; }
.question-grid>a:hover { background: var(--lime); color: #10110c; }
.question-grid>a:hover small { color: #50552e; }
.numbers-section { margin-top: 64px; display: grid; grid-template-columns: 1fr .9fr; gap: 56px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 24px; }
.numbers-copy h2 { font-size: 40px; margin-bottom: 16px; }
.numbers-copy>p:not(.section-kicker) { color: var(--muted); font-size: 15px; line-height: 1.8; margin-bottom: 24px; }
.quiet-link { display: block; font-size: 12px; color: var(--muted); margin-top: 16px; width: fit-content; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.quiet-link:hover { color: var(--accent); }
.receipt { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: var(--surface); box-shadow: none; transform: none; }
.receipt-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px dashed var(--line); gap: 12px; }
.receipt-heading>span:first-child { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 750; }
.receipt-heading .pixel-icon { width: 21px; height: 21px; color: var(--orange); }
.receipt-tag { font-size: 11px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); white-space: nowrap; }
.receipt-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 16px; gap: 12px; color: var(--muted); }
.receipt-row b { font: 500 19px var(--mono); color: var(--ink); }
.receipt-result { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; padding: 19px 0; border-top: 1px dashed var(--edge); }
.receipt-result>span { font-size: 12px; }
.receipt-result strong { font-size: 54px; font-weight: 650; line-height: 1; letter-spacing: -2px; }
.after-cac { margin: 13px 0 18px; }
.receipt-net { display: flex; align-items: center; gap: 15px; background: var(--soft); color: var(--ink); border: 0; border-radius: 6px; padding: 12px 14px; }
.receipt-net>span { font-size: 12px; font-weight: 650; }
.receipt-net strong { margin-left: auto; font: 700 25px var(--mono); }
.receipt-net .pixel-icon { width: 19px; height: 19px; transform: rotate(-35deg); }
.receipt>p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 14px 0 0; }
.chapter-grid { gap: 28px 36px; }
.chapter-group>h3 { font-size: 15px; padding-bottom: 13px; border-bottom: 1px solid var(--edge); font-weight: 650; }
.chapter-group>h3 span { background: var(--soft); border: 0; color: var(--muted); border-radius: 4px; padding: 4px 7px; box-shadow: none; margin-right: 1px; }
.chapter-group>h3 small { margin-left: auto; color: var(--muted); font: 10px var(--mono); }
.chapter-row { padding: 14px 4px; }
.chapter-row strong { font-size: 14px; font-weight: 600; }
.chapter-row:hover { background: var(--soft); }
.final-section { text-align: center; margin-top: 64px; margin-bottom: 48px; padding: 38px 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: none; color: var(--ink); border-radius: 10px; }
.final-section .section-kicker { color: var(--muted); font: 500 11px var(--mono); letter-spacing: 1px; }
.final-section h2 { font-size: 40px; margin: 16px 0; }
.final-section>p:not(.section-kicker) { font-size: 14px; color: var(--muted); line-height: 1.8; }
.final-section .button.outline { background: var(--surface); color: var(--ink); border-color: var(--edge); box-shadow: none; }
.final-section>small { display: block; margin-top: 24px; font-size: 11px; color: var(--muted); }
.site-footer { max-width: 1144px; padding: 20px 32px 26px; border-color: var(--line); font-size: 11px; }
.site-footer b { color: var(--ink); font-size: 13px; margin-right: 7px; }
.edition-tag { display: inline-block; border: 1px solid var(--line); padding: 0 4px; font: 9px/1.7 var(--mono); margin-right: 12px; border-radius: 3px; }

/* Quiet reading surfaces: one type scale, a comfortable measure, fewer dividers. */
.reader-layout { max-width: 1280px; grid-template-columns: 224px minmax(0,1fr) 176px; background: var(--paper); }
.reader-center { background: var(--surface); }
.reader-toolbar { background: var(--surface); font-size: 12px; min-height: 40px; padding: 10px 28px; }
.reader-sidebar { background: var(--paper); padding: 24px 16px; }
.sidebar-title { font-size: 12px; margin-bottom: 12px; }
.overview-link { font-size: 13px; padding: 9px 10px; border-radius: 6px; }
.sidebar-group { margin: 16px 0; }
.sidebar-group a { border: 0; font-size: 13px; min-height: 32px; padding: 6px 10px; border-radius: 6px; }
.sidebar-group a.current, .overview-link.current { background: var(--lime); color: #283514; border: 0; box-shadow: none; }
.sidebar-group a.current>span, .sidebar-group a.current i { color: #526339; }
.sidebar-group h2 { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.sidebar-tools { margin-top: 18px; padding-top: 12px; }
.sidebar-tools a { font-size: 12px; }
.reader-article { padding: 24px 36px 48px; max-width: 768px; }
.article-header h1 { font-size: 32px; font-weight: 650; line-height: 1.3; letter-spacing: -.7px; margin: 0 0 10px; overflow-wrap: anywhere; }
.article-description { font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
.article-utilities { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.article-meta { font-size: 12px; padding: 0; border: 0; gap: 14px; }
.article-meta a, .article-meta button { font-size: 12px; color: var(--muted); }
.article-meta a:hover, .article-meta button:hover { color: var(--accent); }
.article-progress { font-size: 11px; gap: 6px; padding: 0; }
.article-progress b { font-size: 11px; }
.article-progress>span:last-child { margin-left: 3px; font-size: 11px; }
.reader-toc { background: var(--paper); padding: 26px 12px 24px; }
.reader-toc>p { font-size: 12px; font-weight: 600; }
.reader-toc>a { font-size: 12px; padding: 7px 10px; }
.progress-panel { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 16px 8px 0; margin-top: 18px; }
.progress-panel>div:first-child, .progress-panel b { font-size: 11px; }
.progress-panel progress::-webkit-progress-value { background: var(--accent); }
.progress-panel progress::-moz-progress-bar { background: var(--accent); }
.progress-panel small { font-size: 11px; line-height: 1.7; }
.backup-actions button { font-size: 11px; }
.prose { font-size: 16px; line-height: 1.75; }
.prose p { margin: 12px 0; }
.prose h2 { font-size: 21px; font-weight: 650; line-height: 1.5; margin: 28px 0 12px; padding: 0; border: 0; }
.prose h2:first-child { margin-top: 24px; padding-top: 0; }
.prose h3 { font-size: 17px; font-weight: 600; line-height: 1.6; margin: 24px 0 10px; }
.prose h4 { font-size: 15px; font-weight: 600; }
.prose h2, .prose h3 { scroll-margin-top: 56px; }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { margin: 12px 0; }
.prose li { margin: 6px 0; }
.prose code { font-size: 13px; }
.prose pre { padding: 16px 18px; border-radius: 6px; }
.prose pre code { font-size: 13px; line-height: 1.8; }
.prose blockquote { border-left: 2px solid var(--line); padding: 12px 16px; margin: 18px 0; font-size: 15px; }
.prose th { background: var(--soft); }
.prose table { font-size: 13px; }
.prose th, .prose td { padding: 10px 12px; }
.table-wrap { margin: 18px 0 22px; }
.prose .checklist { border-color: var(--line); border-radius: 6px; margin: 18px 0; }
.checklist label { font-size: 14px; padding: 12px 14px; }
.checklist input { accent-color: #526b29; margin-top: 5px; }
.chapter-finish { margin-top: 32px; }
.chapter-finish small { font-size: 12px; }
.chapter-pagination a { border-color: var(--line); border-radius: 7px; }
.chapter-pagination a:hover { box-shadow: none; }
.chapter-pagination small { font-size: 12px; }
.chapter-pagination strong { font-size: 14px; font-weight: 600; }

/* Tools share the quieter chrome, without changing their working layout. */
.utility-shell { max-width: 1144px; padding-top: 36px; }
.page-intro { margin-bottom: 26px; }
.page-intro h1 { font-size: 32px; font-weight: 650; letter-spacing: -.7px; margin-bottom: 12px; }
.page-intro .eyebrow { color: var(--muted); margin-bottom: 12px; }
.page-intro>p:last-child { font-size: 15px; }
.tool-note { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 14px 18px; }
.tool-note .pixel-icon { color: var(--accent); }
.calculator-layout { border-color: var(--line); border-radius: 9px; box-shadow: none; }
.calculator-output { background: var(--soft); }
.main-result strong { font-weight: 650; font-size: 56px; letter-spacing: -2px; }
.input-grid label { font-size: 13px; }
.input-grid input { border-radius: 6px; background: var(--paper); padding: 10px 12px; }
.input-grid input:focus { outline-color: var(--accent); border-color: var(--accent); }
.scenario-tabs button, .filter-tabs button { background: var(--surface); border-radius: 6px; font-size: 12px; min-height: 36px; }
.scenario-tabs button.active, .filter-tabs button.active { background: var(--lime); color: #283514; border-color: #b7c99a; box-shadow: none; }
.result-status { border-left-color: var(--accent); }
.result-status.warning { border-left-color: var(--danger); }
.result-grid span, .result-breakdown { font-size: 12px; }
.symptom-list button { border-color: var(--line); border-radius: 7px; }
.symptom-list button.active { border-color: #b7c99a; box-shadow: none; }
#diagnostic-result { border-color: var(--line); border-radius: 9px; box-shadow: none; }
.next-action { border-color: var(--accent); }
.wide-link { background: var(--surface); border-color: var(--line); }
.resource-card { border-color: var(--line); border-radius: 8px; transition: background .18s,border-color .18s; }
.resource-card>.pixel-icon { color: var(--accent); }
.resource-card:hover { background: var(--paper); border-color: var(--edge); box-shadow: none; transform: none; }
.backup-panel { border-color: var(--line); border-radius: 8px; }
#search-dialog { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 64px #15200d26; }
#search-dialog::backdrop { background: #11130e60; backdrop-filter: blur(3px); }
#search-input { border-color: var(--line); border-radius: 6px; }
.search-head h2 { font-weight: 600; }
.search-result:hover { background: var(--soft); }

@media (max-width: 1279px) {
  .reader-layout { grid-template-columns: 224px minmax(0,1fr); }
  .reader-toc { display: none; }
  .reader-center { border-right: 0; }
}
@media (max-width: 1199px) {
  .header-inner { padding: 0 24px; gap: 10px; }
  .brand { margin-right: 8px; font-size: 17px; }
  .brand b { font-size: 14px; }
  .top-nav { gap: 2px; font-size: 12px; }
  .top-nav a { padding: 0 9px; }
  .search-trigger kbd { display: none; }
  .header-download { padding: 9px 13px; }
  .proof-strip>div { padding: 16px 15px; gap: 10px; }
  .stage-tab { padding: 15px 10px; gap: 7px; }
  .stage-tab b { font-size: 13px; }
  .numbers-section { gap: 40px; padding: 36px 20px; }
}
@media (max-width: 959px) {
  .header-download { display: none; }
  .search-trigger { padding: 7px 9px; }
  .search-trigger>.search-label { display: none; }
  .masthead { padding-top: 40px; }
  .masthead h1 { font-size: clamp(44px,6.3vw,60px); letter-spacing: -1.8px; }
  .proof-strip { grid-template-columns: 1fr 1fr; max-width: 720px; }
  .proof-strip>div { padding: 16px 24px; }
  .proof-strip>div:nth-child(2) { border-right: 0; }
  .proof-strip>div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .roadmap-section { margin-top: 48px; }
  .editorial-heading h2 { font-size: 32px; }
  .stage-tab { padding: 14px 10px; min-height: 72px; }
  .stage-number { display: none; }
  .stage-summary, .stage-reading { padding: 22px 20px; }
  .stage-summary h3 { font-size: 26px; }
  .question-grid { grid-template-columns: 1fr 1fr; }
  .question-section, .contents-section { margin-top: 56px; }
  .split-heading h2 { font-size: 28px; }
  .split-heading .text-link { font-size: 12px; }
  .numbers-section { margin-top: 56px; gap: 32px; padding: 36px 0; }
  .numbers-copy h2 { font-size: 36px; }
  .numbers-copy>p:not(.section-kicker) { font-size: 14px; }
  .receipt { padding: 22px; }
  .receipt-result strong { font-size: 50px; }
  .final-section h2 { font-size: 36px; }
  .reader-layout { grid-template-columns: 204px minmax(0,1fr); }
  .reader-article { padding: 24px 28px 44px; }
  .reader-sidebar { padding: 24px 12px; }
  .article-header h1 { font-size: 29px; }
}
@media (max-width: 759px) {
  :root { --header: 104px; }
  .site-header { height: var(--header); }
  .header-inner { padding: 0 18px; height: 56px; gap: 8px; }
  .brand { margin-right: auto; font-size: 18px; }
  .brand b { font-size: 14px; }
  .brand svg { width: 23px; height: 23px; }
  .system-home-link { width: 40px; height: 40px; min-height: 40px; padding: 0; border-color: transparent; background: transparent; }
  .system-home-label { display: none; }
  .top-nav { top: 56px; height: 48px; padding: 0 16px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); gap: 4px; font-size: 12px; }
  .top-nav a { height: 36px; padding: 0 9px; border-radius: 6px; }
  .top-nav a svg { display: none; }
  .search-trigger { width: 40px; height: 40px; min-height: 40px; margin-left: 0; padding: 9px; background: transparent; border: 0; }
  #theme-toggle { width: 40px; height: 40px; }
  .content-width { width: calc(100% - 36px); }
  .masthead { padding: 32px 18px 0; }
  .hero-kicker { font-size: 11px; padding: 0; gap: 7px; }
  .hero-kicker .pixel-icon { width: 14px; height: 14px; }
  .masthead h1 { font-size: clamp(34px,8.8vw,52px); line-height: 1.18; letter-spacing: -1px; -webkit-text-stroke: 0; margin: 20px 0 18px; }
  .masthead-description { font-size: 14px; line-height: 1.8; max-width: 470px; }
  .masthead-actions { gap: 10px; margin-top: 22px; }
  .masthead-actions .button { min-height: 44px; font-size: 13px; padding: 10px 15px; gap: 9px; }
  .masthead-actions .button .pixel-icon { width: 16px; height: 16px; }
  .proof-strip { margin-top: 30px; }
  .proof-strip>div { padding: 14px 11px; gap: 9px; }
  .proof-strip .pixel-icon { width: 18px; height: 18px; }
  .proof-strip b { font-size: 12px; }
  .proof-strip small { font-size: 11px; margin-top: 4px; line-height: 1.5; }
  .roadmap-section { margin-top: 40px; }
  .section-kicker { font-size: 11px; margin-bottom: 10px; }
  .editorial-heading h2 { font-size: clamp(25px,6vw,32px); line-height: 1.3; letter-spacing: -.6px; margin-bottom: 14px; -webkit-text-stroke: 0; }
  .editorial-heading>p:last-child { font-size: 13px; line-height: 1.8; }
  .centered { margin-bottom: 22px; }
  .learning-board { border-radius: 9px; box-shadow: none; }
  .board-chrome { padding: 12px; min-height: 40px; }
  .board-label { font-size: 10px; letter-spacing: .2px; }
  .board-local { display: none; }
  .board-canvas { padding: 12px; }
  .stage-tabs { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .stage-tab { gap: 7px; padding: 12px 11px; min-height: 68px; }
  .stage-tab b { font-size: 13px; }
  .stage-tab small { font-size: 11px; margin-top: 4px; }
  .stage-number { display: none; }
  .stage-panel { display: block; min-height: 0; }
  .stage-summary { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 18px; }
  .stage-summary h3 { font-size: 25px; margin-bottom: 10px; }
  .stage-summary .section-kicker { font-size: 11px; }
  .stage-summary>p:not(.section-kicker) { font-size: 14px; margin-bottom: 18px; }
  .stage-outcomes { font-size: 12px; gap: 7px; margin-top: 18px; }
  .stage-reading { padding: 18px 16px; }
  .stage-reading .chapter-row { padding: 12px 0; grid-template-columns: 18px minmax(0,1fr) 14px; }
  .stage-reading .chapter-row strong { font-size: 13px; }
  .stage-reading .chapter-row small { font-size: 12px; }
  .stage-reading-label { font-size: 11px; }
  .board-footer { padding: 10px 12px; font-size: 11px; gap: 10px; }
  .board-footer>div { gap: 9px; }
  .board-disclaimer { display: none; }
  .board-caption { font-size: 11px; margin-top: 14px; }
  .question-section, .contents-section { margin-top: 48px; }
  .split-heading { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
  .split-heading h2 { margin-bottom: 0; font-size: 26px; }
  .split-heading .text-link { font-size: 12px; margin-bottom: 0; }
  .question-grid { grid-template-columns: 1fr; }
  .question-grid>a { font-size: 14px; padding: 18px 16px; gap: 12px; }
  .question-grid small { font-size: 12px; margin-top: 6px; }
  .numbers-section { grid-template-columns: 1fr; gap: 28px; margin-top: 48px; padding: 30px 0; }
  .numbers-copy h2 { font-size: 34px; line-height: 1.2; letter-spacing: -.8px; }
  .numbers-copy>p:not(.section-kicker) { font-size: 14px; margin-bottom: 22px; }
  .quiet-link { margin-top: 16px; font-size: 12px; }
  .receipt { width: 100%; max-width: 390px; margin: 0 auto; padding: 22px; }
  .receipt-result strong { font-size: 50px; }
  .receipt>p { font-size: 11px; }
  .chapter-grid { gap: 26px; }
  .chapter-group>h3 { font-size: 14px; padding-bottom: 12px; }
  .chapter-group>h3 small { font-size: 10px; }
  .chapter-row { padding: 14px 2px; }
  .chapter-row strong { font-size: 14px; }
  .chapter-row small { font-size: 12px; }
  .final-section { margin-top: 48px; margin-bottom: 40px; padding: 28px 14px; box-shadow: none; }
  .final-section .section-kicker { font-size: 10px; letter-spacing: 1px; }
  .final-section h2 { font-size: 32px; letter-spacing: -.7px; line-height: 1.25; margin: 16px 0; }
  .final-section>p:not(.section-kicker) { font-size: 13px; }
  .final-section>small { font-size: 11px; margin-top: 22px; }
  .site-footer { padding: 20px 18px; font-size: 11px; }
  .site-footer b { font-size: 12px; }
  .reader-toolbar { top: var(--header); font-size: 12px; padding: 4px 20px; min-height: 44px; }
  .menu-button { min-height: 36px; font-size: 14px; }
  .menu-button span { font-size: 12px; }
  .reader-shortcuts { gap: 14px; }
  .reader-shortcuts a { display: inline-flex; align-items: center; min-height: 36px; }
  .reader-sidebar { top: var(--header); height: calc(100dvh - var(--header)); padding: 20px; }
  .sidebar-group a { min-height: 40px; }
  .menu-open .sidebar-backdrop { inset: var(--header) 0 0; }
  .reader-article { padding: 22px 20px 40px; }
  .article-header h1 { font-size: 26px; line-height: 1.35; }
  .article-description { font-size: 14px; }
  .article-meta, .article-meta a, .article-meta button { font-size: 11px; }
  .article-meta { gap: 12px; }
  .article-progress>span:last-child { display: none; }
  .prose { font-size: 16px; line-height: 1.75; }
  .prose table { font-size: 12px; }
  .checklist label { font-size: 14px; }
  .chapter-pagination strong { font-size: 13px; }
  .utility-shell { padding: 28px 20px 44px; }
  .page-intro h1 { font-size: 27px; line-height: 1.35; }
  .page-intro>p:last-child { font-size: 14px; line-height: 1.8; }
  .tool-note { font-size: 12px; padding: 14px; }
  .tool-section-heading>span { font-size: 11px; }
  .main-result strong { font-size: 52px; }
  .resource-card { border-radius: 7px; }
  .resource-card h2 { font-size: 15px; }
  .resource-card-bottom { font-size: 10px; }
  .symptom-list button { font-size: 12px; }
  #diagnostic-result { padding: 24px 20px; }
  #diagnostic-result h2 { font-size: 23px; }
  #diagnostic-result ol { font-size: 14px; }
}
@media (max-width: 379px) {
  .header-inner { padding: 0 14px; gap: 6px; }
  .brand { font-size: 16px; gap: 7px; }
  .brand b { font-size: 13px; }
  .top-nav { padding: 0 12px; gap: 3px; font-size: 11px; }
  .top-nav a { padding: 0 7px; }
  .proof-strip>div { padding: 13px 8px; gap: 7px; }
  .proof-strip small { font-size: 11px; }
  .stage-tab { padding: 12px 8px; }
  .final-section h2 { font-size: 29px; }
  .final-section .masthead-actions { gap: 8px; }
  .final-section .button { padding: 10px 11px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
@media print {
  :root, :root[data-theme=dark] { --paper: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #ccc; --edge: #000; --soft: #f4f4f4; --accent: #000; }
  body { background: #fff !important; }
  .reader-article { padding: 0; max-width: none; }
  .article-header h1 { font-size: 24pt; }
  .article-meta, .article-meta a { font-size: 8pt; }
  .article-utilities { padding-bottom: 10px; }
  .prose { font-size: 10pt; }
  .prose table, .prose table:has(th:nth-child(5)) { min-width: 0; width: 100%; font-size: 8pt; }
  .prose th, .prose td { padding: 5px; min-width: 0; }
  .checklist label { font-size: 10pt; }
  .learning-board, .receipt, .final-section, .calculator-layout { box-shadow: none; break-inside: avoid; }
}

/* Grouped independent-store profit calculator. */
.profit-tool .calculator-layout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); overflow: visible; align-items: start; }
.profit-tool .calculator-input { padding: 24px; border-radius: 9px 0 0 9px; }
.profit-tool .calculator-output { align-self: stretch; border-radius: 0 9px 9px 0; padding: 24px; }
.profit-tool .calc-sticky { position: sticky; top: 82px; }
.profit-tool .scenario-tabs { align-items: center; margin-bottom: 18px; }
.profit-tool .calc-group { border: 0; border-bottom: 1px solid var(--line); padding: 0 0 24px; margin: 0 0 24px; min-width: 0; }
.profit-tool .calc-group:last-child { border-bottom: 0; margin-bottom: 0; }
.profit-tool legend { font-size: 17px; font-weight: 650; padding: 0; margin-bottom: 8px; }
.profit-tool legend>span { font: 12px var(--mono); color: var(--accent); margin-right: 8px; }
.profit-tool .calc-group>p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0; }
.profit-tool .input-grid { gap: 18px 16px; margin-top: 18px; }
.profit-tool .input-grid small { font-size: 11px; color: var(--muted); line-height: 1.6; }
.profit-tool .calc-value { display: flex; align-items: center; border: 1px solid var(--edge); border-radius: 6px; background: var(--paper); }
.profit-tool .calc-value:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.profit-tool .calc-value input { border: 0; background: transparent; outline: none; padding: 9px 10px; font-size: 17px; }
.profit-tool .calc-value>span { white-space: nowrap; font-size: 10px; color: var(--muted); padding-right: 10px; }
.profit-tool .main-result { margin-top: 22px; padding-bottom: 20px; }
.profit-tool .main-result strong { font-size: clamp(34px, 4vw, 52px); }
.profit-tool .result-grid { gap: 20px 14px; padding: 22px 0 12px; }
.profit-tool .result-grid strong { font-size: 22px; }
.profit-tool .result-grid span { font-size: 11px; line-height: 1.6; }
.profit-tool .calc-ledger h3,.profit-tool .calc-month h3 { font-size: 14px; margin: 0 0 14px; }
.profit-tool .calc-ledger>div,.profit-tool .calc-month>div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 12px; }
.profit-tool .calc-ledger b,.profit-tool .calc-month b { font: 500 13px var(--mono); white-space: nowrap; }
.profit-tool .calc-total { border-top: 1px solid var(--edge); margin-top: 8px; font-weight: 650; }
.profit-tool .calc-month { margin: 20px 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.profit-tool .calc-month p { font-size: 11px; line-height: 1.7; color: var(--muted); margin-bottom: 0; }
.profit-tool .negative { color: var(--danger); }
@media(max-width:760px) {
  .profit-tool .calculator-layout { grid-template-columns: minmax(0,1fr); }
  .profit-tool .calculator-input,.profit-tool .calculator-output { padding: 20px; border-radius: 8px; }
  .profit-tool .calc-sticky { position: static; }
}
@media(max-width:420px) {
  .profit-tool .input-grid { grid-template-columns: minmax(0,1fr); }
}

.prose img[src*="tool-screenshots/"] { display:block; width:100%; height:auto; border:1px solid var(--line); border-radius:8px; margin:18px 0 8px; }
.prose a:has(>img[src*="tool-screenshots/"]) { display:block; }
