/* An editorial decision handbook: seven chapters, not a technical atlas. */
:root {
  --paper: #fff; --paper-2: #f7f6f2; --panel: #faf9f6; --ink: #292923;
  --muted: #67675d; --dim: #77786c; --line: #deded4; --teal: #7d6941;
  --teal-soft: #f0ece0; --orange: #79604a; --orange-soft: #f3eee8;
  --cream: #303126; --shadow: none;
  --serif: "Songti SC", "Noto Serif CJK SC", "STSong", Georgia, serif;
  --sans: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", monospace;
}
html.dark { --paper: #171814; --paper-2: #20211b; --panel: #1e201a; --ink: #e4e5da; --muted: #b1b4a4; --dim: #a0a591; --line: #393d30; --teal: #c7b888; --teal-soft: #2e2e21; --orange: #c8b29a; --orange-soft: #2d2921; --cream: #e4e5da; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.85 var(--sans); }
::selection { background: var(--teal-soft); }
a { color: inherit; text-underline-offset: 5px; }
button,input { font: inherit; }
:is(a,button,summary):focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.shell, .nav-wrap { width: min(var(--lm-canvas-content-width), calc(100% - 2 * var(--lm-page-gutter))); margin-inline: auto; }
.nav-wrap .shell { width: 100%; }
.masthead { padding: 64px 0 48px; display: grid; grid-template-columns: minmax(0,1fr) 245px; gap: 16px 36px; align-items: start; }
.eyebrow { font: 11px/1.8 var(--mono); color: var(--teal); letter-spacing: .11em; }
.masthead > .eyebrow { grid-column: 1/-1; }
h1,h2,h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
h1 { grid-column: 1; font-size: clamp(36px,4.7vw,60px); line-height: 1.27; letter-spacing: -.035em; margin: 8px 0 4px; }
h1 em { font-style: normal; color: var(--teal); }
h1 .title-keep { white-space: nowrap; }
.deck { grid-column: 1; max-width: 720px; margin: 0; color: var(--muted); font: 18px/1.9 var(--serif); }
.mast-aside { grid-column: 2; grid-row: 2/4; border-top: 2px solid var(--teal); padding-top: 14px; margin-top: 16px; }
.edition { font: 10px/1.8 var(--mono); color: var(--teal); letter-spacing: .08em; }
.mast-aside p { font: 23px/1.75 var(--serif); margin: 20px 0 24px; }
.mast-aside small { display: block; color: var(--muted); font-size: 12px; line-height: 1.85; }
.mast-aside a { display: inline-block; margin-top: 16px; color: var(--teal); font-size: 12px; }
.mast-meta { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 10px 26px; padding-top: 22px; margin-top: 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; }
.nav-wrap { position: sticky; top: var(--header-height); z-index: 30; border-block: 1px solid var(--line); background: var(--lm-glass-top); backdrop-filter: var(--lm-glass-filter); -webkit-backdrop-filter: var(--lm-glass-filter); }
.book-nav { display: flex; gap: 0; overflow-x: auto; scrollbar-width: thin; padding: 0 2px; }
.nav-btn { display: flex; flex: 1; align-items: center; gap: 9px; padding: 17px 12px; white-space: nowrap; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 12px; text-decoration: none; transition: color 150ms ease; }
.nav-btn > span { color: var(--dim); font: 10px var(--mono); }
.nav-btn:is(:hover,.active) { color: var(--ink); }.nav-btn.active { border-bottom-color: var(--teal); }.nav-btn.active > span { color: var(--teal); }
main.shell { padding: 48px 0 56px; }
.section { display: block; scroll-margin-top: calc(var(--header-height) + 86px); margin-bottom: 56px; }
.section[hidden],.question-panel[hidden],[hidden] { display: none !important; }
.book-ready .section { margin-bottom: 0; animation: chapter-in 200ms ease-out both; }
@keyframes chapter-in { from { opacity: .2; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.section-head { display: grid; grid-template-columns: 82px 1fr; gap: 26px; margin-bottom: 30px; align-items: start; }
.section-no { color: var(--teal); font: 11px/1.8 var(--mono); padding-top: 8px; letter-spacing: .06em; }
h2 { font-size: clamp(27px,3vw,38px); line-height: 1.45; letter-spacing: -.025em; }
h3 { font-size: 21px; line-height: 1.5; }
.lede { color: var(--muted); margin: 12px 0 0; max-width: 840px; font-size: 15px; }
.callout { border-left: 2px solid var(--teal); background: var(--paper-2); padding: 22px 28px; margin: 28px 0; font-size: 15px; }
.callout.warning { border-left-color: var(--orange); background: var(--orange-soft); }
.callout strong { display: block; margin-bottom: 9px; color: var(--cream); font: 600 19px/1.7 var(--serif); }
.grid { display: grid; gap: 28px; margin: 28px 0; }.g2 { grid-template-columns: repeat(2,minmax(0,1fr)); }.g3 { grid-template-columns: repeat(3,minmax(0,1fr)); }.g4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.card { min-width: 0; border-top: 1px solid var(--line); padding: 22px 0; }.card h3 { color: var(--cream); margin-bottom: 12px; }.card p { color: var(--muted); margin: 0; font-size: 15px; }
.accent-card { border-top: 2px solid var(--teal); background: var(--paper-2); padding: 22px 24px; }
.formula { font: 600 clamp(20px,2.4vw,28px)/1.7 var(--serif) !important; color: var(--cream) !important; margin: 8px 0 16px !important; }
.small { color: var(--muted); font-size: 13px; }.label { display: inline-block; padding-bottom: 10px; font: 11px/1.8 var(--mono); color: var(--teal); letter-spacing: .08em; }
.subhead { font-size: 25px; margin: 40px 0 18px; color: var(--cream); }.grid .subhead { margin-top: 0; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0; }.flow span { padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line); }.flow i { color: var(--teal); font-style: normal; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); margin: 24px 0 32px; max-width: 100%; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: 14px; background: var(--paper); }
th,td { text-align: left; vertical-align: top; padding: 16px 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
th:last-child,td:last-child { border-right: 0; }th { background: var(--paper-2); color: var(--cream); font-size: 13px; font-weight: 600; }td { color: var(--muted); }tbody tr:last-child td { border-bottom: 0; }td:first-child { color: var(--ink); font-weight: 500; }tbody tr:hover td { background: var(--panel); }
.compare-title { font: 600 22px/1.5 var(--serif); margin-bottom: 18px; }.checklist { list-style: none; padding: 0; margin: 0; }.checklist li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); position: relative; color: var(--muted); font-size: 15px; }.checklist li::before { content: '+'; position: absolute; left: 0; color: var(--teal); }.checklist.bad li::before { content: '−'; color: var(--orange); }
.stat { padding: 20px 0; border-top: 2px solid var(--teal); }.stat b { display: block; font: 600 30px/1.3 var(--serif); color: var(--cream); }.stat span { color: var(--muted); font-size: 12px; }
.switcher { display: flex; flex-wrap: wrap; gap: 0; margin: 20px 0 24px; border-bottom: 1px solid var(--line); }
.switcher button { border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; padding: 12px 20px; cursor: pointer; font-size: 14px; }
.switcher button.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }
.question-panel > h3 { margin-block: 24px 0; }.question-count { font: 11px var(--mono); color: var(--dim); margin-left: 10px; }
details { border-top: 1px solid var(--line); }details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 19px 2px; color: var(--cream); font: 600 18px/1.6 var(--serif); }
details p { margin: 0; padding: 0 24px 22px 2px; color: var(--muted); font-size: 15px; }
.quote { padding: 16px 0 16px 28px; border-left: 2px solid var(--teal); font: 600 clamp(21px,2.5vw,29px)/1.85 var(--serif); color: var(--cream); }
.sources { display: grid; gap: 0; }.sources a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }.sources a:hover { color: var(--teal); text-decoration: underline; }
.book-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.reading-focus .masthead { padding-top: 40px; }
@media (max-width: 1050px) { .masthead { grid-template-columns: 1fr 210px; gap: 16px 32px; }.nav-btn { flex: none; padding: 15px 14px; }.nav-btn:first-child { padding-left: 0; }.nav-btn:last-child { padding-right: 0; }.g4 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 780px) { .masthead { padding-top: 36px; grid-template-columns: 1fr; gap: 16px; }h1 { font-size: 38px; }.deck { font-size: 17px; }.mast-aside { grid-column: 1; grid-row: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-top: 4px; }.mast-aside .edition { grid-column: 1/-1; }.mast-aside p { font-size: 20px; margin: 0; }.mast-aside a { grid-column: 2; margin-top: 0; }.mast-meta { margin-top: 4px; gap: 8px; flex-direction: column; }.section-head { grid-template-columns: 1fr; gap: 8px; }.g2,.g3,.g4 { grid-template-columns: 1fr; gap: 18px; }.grid { margin-block: 24px; }.card { padding: 18px 0; }.accent-card { padding: 20px; }.callout { padding: 20px; }.nav-btn { padding: 14px 12px; }.nav-btn > span { font-size: 10px; }main.shell { padding-top: 32px; }.table-wrap { margin-block: 20px; }th,td { padding: 14px; }.quote { padding-left: 20px; }.section { scroll-margin-top: calc(var(--header-height) + 74px); } }
@media (max-width: 380px) { h1 { font-size: 32px; }.mast-aside { grid-template-columns: 1fr; }.mast-aside a { grid-column: 1; }.switcher button { padding-inline: 12px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.book-ready .section { animation: none; } }
@media print { .reading-shell-header,.nav-wrap,.switcher,.book-status { display: none !important; }.section[hidden],.question-panel[hidden] { display: block !important; }.section { break-before: page; }.table-wrap { overflow: visible; }table { min-width: 0; }.masthead { display: block; }.mast-aside { margin-top: 24px; } }
