:root {
  --paper: #f7f8f5;
  --ink: #21342e;
  --muted: #596b61;
  --line: #ced7cd;
  --accent: #245b46;
  --soft: #eaf0e6;
  --focus: #974e22;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
input, textarea { accent-color: var(--accent); caret-color: var(--accent); }
::selection { background: #cedfc2; color: #192f21; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
p { line-height: 1.95; }
h1, h2 { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-weight: 500; }
h3 { font-size: 1.125rem; line-height: 1.65; }
section, .anchor { scroll-margin-top: 2rem; }
.anchor { display: block; }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--accent); z-index: 30; }
.skip-link { position: fixed; top: -100px; background: white; z-index: 40; padding: 1rem; }
.skip-link:focus { top: .5rem; left: .5rem; }
.masthead { max-width: 1336px; margin: 0 auto; padding: 1.7rem 3rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { text-decoration: none; font-weight: 600; font-size: 1.125rem; letter-spacing: .04em; }
.brand span { display: block; font-size: .75rem; line-height: 1.7; letter-spacing: .06em; font-weight: 400; color: var(--muted); margin-top: .25rem; }
.header-actions { display: flex; gap: 1.5rem; align-items: center; }
.header-link { font-size: .875rem; white-space: nowrap; padding: .75rem 0; }
.mobile-toc { display: none; }
.page-layout { display: grid; grid-template-columns: 170px minmax(0, 880px); gap: 4rem; max-width: 1336px; margin: auto; padding: 0 3rem; border-top: 1px solid var(--line); }
.side-nav { position: sticky; top: 2rem; align-self: start; padding-top: 3.5rem; }
.nav-label { font-size: .75rem; color: var(--muted); margin-bottom: 1rem; }
.side-nav nav { display: grid; gap: .2rem; }
.chapter-link { display: flex; align-items: baseline; gap: .875rem; padding: .7rem 0; font-size: .875rem; text-decoration: none; }
.chapter-link span { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.chapter-link.active { font-weight: 600; text-decoration: underline; color: var(--accent); }
.nav-note { color: var(--muted); font-size: .75rem; line-height: 1.9; margin-top: 2rem; }
main { min-width: 0; }
.hero { padding: 4rem 0 3.5rem; max-width: 800px; }
.edition { color: var(--muted); font-size: .875rem; margin-bottom: 1.5rem; }
h1 { font-size: clamp(2.5rem, 4.8vw, 4.5rem); line-height: 1.3; letter-spacing: 0; margin-bottom: 1.25rem; }
.hero-lead { font-size: 1.3rem; line-height: 1.7; margin-bottom: 1.5rem; }
.hero-bottom p { max-width: 42em; font-size: 1.0625rem; color: #405549; margin-bottom: 1.8rem; }
.reading-entry { display: flex; gap: 2rem; flex-wrap: wrap; }
.reading-entry a { font-size: .9375rem; padding: .5rem 0; }
.section { border-top: 1px solid var(--line); padding: 3.5rem 0 4rem; font-size: 1.0625rem; }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.section-head > span { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-head h2 { font-size: 2rem; line-height: 1.5; margin: 0; }
.prose { max-width: 43em; }
.prose p { color: #354b3c; margin-bottom: 1.4rem; }
.prose .lead { font-size: 1.125rem; color: var(--ink); }
.section-intro { max-width: 43em; color: var(--muted); }
.worked-example { margin-bottom: 2.5rem; padding: 0 0 2rem; border-bottom: 1px solid var(--line); }
.example-label { font-size: .8125rem; color: var(--muted); margin-bottom: .75rem; }
.worked-example h3 { font-family: "Songti SC", serif; font-size: 1.65rem; font-weight: 500; margin-bottom: 1.25rem; }
.worked-example > p { max-width: 43em; }
.recovery-ledger { margin: 1.8rem 0; background: var(--soft); padding: .4rem 1.5rem; }
.recovery-ledger > div { display: grid; grid-template-columns: 7rem 1fr; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); line-height: 1.85; }
.recovery-ledger > div:last-child { border: 0; }
.recovery-ledger dt { font-weight: 600; font-size: .9375rem; }
.recovery-ledger dd { margin: 0; font-size: 1rem; }
.example-conclusion { margin-bottom: 0; }
.concept-comparison { margin-top: 2rem; }
.concept-comparison article { display: grid; grid-template-columns: 5rem 11rem 1fr; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.concept-comparison article > span { font-size: .875rem; color: var(--muted); }
.concept-comparison h3 { font-size: 1rem; margin: 0; }
.concept-comparison p { font-size: .9375rem; color: var(--muted); margin: 0; }
.reading-rows { margin: 2rem 0; }
.reading-rows article { display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; border-top: 1px solid var(--line); padding: 1.5rem 0; }
.reading-rows h3 { font-size: 1rem; margin: 0; }
.reading-rows p { margin: 0; color: #354b3c; }
.formula { padding: 1.7rem 0; margin: 1rem 0 2rem; border-block: 1px solid var(--line); }
.formula > span { font-size: .875rem; color: var(--muted); }
.formula p { font-size: 1.3rem; line-height: 1.85; margin: .75rem 0; }
.formula b { font-weight: 600; }
.formula small { display: block; font-size: .875rem; line-height: 1.9; color: var(--muted); max-width: 46em; }
.subheading { font-size: 1.25rem; margin: 2.5rem 0 1rem; }
.disclosures { border-top: 1px solid var(--line); margin-top: 1.8rem; }
.disclosures > details, .review-example { border-bottom: 1px solid var(--line); }
summary { list-style: none; position: relative; padding: 1.25rem 2.5rem 1.25rem 0; font-size: 1.0625rem; line-height: 1.75; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: .4rem; top: 1.25rem; font-size: 1.3rem; color: var(--accent); }
details[open] > summary::after { content: '−'; }
summary:hover { color: var(--accent); }
.detail-body { padding: 0 1.5rem 1.25rem 0; max-width: 44em; }
.detail-body p { color: #354b3c; }
.detail-body p:last-child { margin-bottom: 0; }
.source-note { font-size: .875rem; line-height: 1.9; color: var(--muted); }
.feature-note { margin: 2rem 0; padding: 1.75rem; background: var(--soft); }
.feature-note > span, .eyebrow { font-size: .8125rem; color: var(--muted); }
.feature-note h3 { font-size: 1.25rem; margin: 1rem 0; }
.feature-note p:last-child { margin: 0; }
.case-study { border-block: 1px solid var(--line); padding: 1.7rem 0; }
.case-study > h3 { font-family: "Songti SC", serif; font-size: 1.7rem; font-weight: 500; margin: 1rem 0; }
.case-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--line); }
.case-split b { font-size: .9375rem; }
.case-split p { font-size: .9375rem; margin: .75rem 0 0; color: var(--muted); }
.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; margin: 1.5rem 0; }
.three-up article { border-top: 1px solid var(--line); padding-top: 1rem; }
.three-up article > span { display: block; font-size: .8125rem; color: var(--muted); margin-bottom: .75rem; }
.three-up p { font-size: .9375rem; color: var(--muted); margin: 0; }
.charter-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; counter-reset: article; }
.charter-list li { position: relative; counter-increment: article; border-top: 1px solid var(--line); padding: 1.4rem 0 1.4rem 2rem; }
.charter-list li::before { content: counter(article); position: absolute; left: 0; top: 1.65rem; font-size: .8125rem; color: var(--muted); }
.charter-list h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.charter-list p { font-size: .9375rem; color: var(--muted); margin: 0; }
.stress-list { padding-left: 1.5rem; line-height: 2; }
.stress-list li { margin-bottom: .5rem; }
.closing-note { margin: 2.5rem 0 0; max-width: 43em; }
.source-list { padding-left: 1.5rem; }
.source-list li { border-bottom: 1px solid var(--line); padding: 1.1rem 0 1.1rem .5rem; }
.source-list a { font-size: 1rem; overflow-wrap: anywhere; }
.source-list p { font-size: .9375rem; color: var(--muted); margin: .65rem 0 0; }
.search-label { display: block; font-size: .9375rem; margin-bottom: .75rem; }
#glossSearch, #decisionName, textarea { width: 100%; padding: .8rem 1rem; background: #fff; color: var(--ink); border: 1px solid #9aaa99; border-radius: 3px; font-size: 1rem; }
input::placeholder, textarea::placeholder { color: #626e60; opacity: 1; }
.gloss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; margin-top: 1.2rem; }
.gloss-item { border-top: 1px solid var(--line); padding: 1.3rem 0; }
.gloss-item h3 { font-size: 1rem; margin-bottom: .6rem; }
.gloss-item p { color: var(--muted); font-size: .9375rem; margin: 0; }
.small { font-size: .8125rem; color: var(--muted); line-height: 1.8; }
/* Decision review: a working record with explicit evidence provenance. */
.review-example { margin-bottom: 1.5rem; border-top: 1px solid var(--line); }
.review-example summary { font-size: .9375rem; }
.review-context label { display: block; margin-bottom: .75rem; font-size: 1rem; font-weight: 600; }
.privacy-note { font-size: .8125rem; color: var(--muted); margin: .75rem 0 1.75rem; }
.assessment { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 2rem; align-items: start; }
.check-row { margin: 0; padding: 0 0 1.5rem; border: 0; min-width: 0; }
.check-row + .check-row { margin-top: 1.5rem; }
.check-row legend { float: left; width: 100%; font-size: 1.0625rem; font-weight: 600; line-height: 1.8; padding: 1rem 0 0; border-top: 1px solid var(--line); }
.check-row legend + * { clear: both; }
.check-hint { color: var(--muted); font-size: .875rem; padding-top: .5rem; margin: 0 0 .8rem; }
.check-options { display: flex; gap: .45rem; flex-wrap: wrap; }
.check-options label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem .7rem; background: var(--paper); border: 1px solid #abb9a5; border-radius: 3px; font-size: .875rem; cursor: pointer; }
.check-options label:has(input:checked) { background: var(--soft); border-color: var(--accent); font-weight: 600; }
.check-options label:hover { border-color: var(--accent); }
.check-options input { margin: 0; width: 1rem; height: 1rem; }
.evidence-note { margin-top: .5rem; }
.evidence-note summary { padding: .65rem 1.5rem .65rem 0; font-size: .875rem; color: var(--muted); }
.evidence-note summary::after { top: .6rem; right: 0; }
.evidence-note label { display: block; font-size: .8125rem; color: var(--muted); margin: .3rem 0 .6rem; }
textarea { resize: vertical; line-height: 1.8; min-height: 90px; }
.assessment-result { position: sticky; top: 2rem; background: var(--soft); padding: 1.5rem; min-width: 0; overflow-wrap: anywhere; }
.result-caption { color: var(--muted); font-size: .8125rem; margin-bottom: 1rem; }
.assessment-result h3 { font-size: 1.25rem; margin-bottom: .75rem; }
.assessment-result p, .assessment-result ul { font-size: .875rem; }
.assessment-result ul { padding-left: 1.2rem; line-height: 1.9; }
.assessment-result li { margin-bottom: .65rem; }
.result-limit { border-top: 1px solid #bdcbb7; padding-top: 1rem; color: var(--muted); }
.result-actions { display: flex; flex-direction: column; gap: .6rem; }
button { min-height: 44px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #fff; font-size: .9375rem; padding: .6rem .85rem; transition: background .15s; }
button:hover { background: #163e2d; }
button:active { transform: translateY(1px); }
#resetChecks, #cancelReset { background: transparent; color: var(--ink); border-color: #91a38a; }
#resetChecks:hover, #cancelReset:hover { background: #dce6d6; }
#resetConfirm { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
#resetConfirm button { margin-bottom: .5rem; }
#reviewFeedback { margin: .75rem 0 0; }
footer { display: flex; justify-content: space-between; gap: 1.5rem; max-width: 1240px; margin: 0 auto; border-top: 1px solid var(--line); padding: 2rem 0; font-size: .8125rem; color: var(--muted); }
.top { position: fixed; right: 1.5rem; bottom: 1.5rem; width: 44px; min-height: 44px; opacity: 0; pointer-events: none; }
.top.show { opacity: 1; pointer-events: auto; }
@media (max-width: 1199px) {
  .masthead { position: sticky; top: 0; padding: .85rem 5%; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 20; }
  .brand span { font-size: .75rem; letter-spacing: 0; }
  .page-layout { display: block; max-width: 920px; padding: 0 5%; border-top: 0; }
  .side-nav { display: none; }
  .hero { padding-top: 2.5rem; }
  .mobile-toc { display: block; position: relative; border: 0; }
  .mobile-toc > summary { padding: .7rem 1.5rem .7rem 0; font-size: .875rem; }
  .mobile-toc > summary::after { top: .65rem; right: 0; }
  .mobile-toc > nav { position: absolute; right: 0; top: 100%; width: min(300px, 85vw); background: var(--paper); border: 1px solid var(--line); padding: .7rem 1.25rem; max-height: 70vh; overflow-y: auto; }
  .mobile-toc .chapter-link { min-height: 44px; }
  .assessment-result { top: 7rem; }
  section, .anchor { scroll-margin-top: 7rem; }
  footer { margin: 0 5%; }
}
@media (max-width: 700px) {
  .masthead { gap: 1rem; }
  .brand { font-size: 1rem; letter-spacing: 0; }
  .brand span { display: none; }
  .header-actions { gap: 1rem; }
  .header-link { font-size: .8125rem; }
  .hero { padding: 2.5rem 0; }
  h1 { font-size: 2.65rem; }
  .hero-lead { font-size: 1.125rem; }
  .hero-bottom p, .section { font-size: 1rem; }
  .section { padding: 2.5rem 0 3rem; }
  .section-head { gap: .75rem; margin-bottom: 1.5rem; }
  .section-head h2 { font-size: 1.6rem; }
  .worked-example h3, .case-study > h3 { font-size: 1.4rem; }
  .recovery-ledger { padding: .25rem 1rem; }
  .recovery-ledger > div { grid-template-columns: 5rem 1fr; gap: .75rem; }
  .recovery-ledger dd { font-size: .9375rem; }
  .concept-comparison article { grid-template-columns: 4.5rem 1fr; gap: .5rem; }
  .concept-comparison p { grid-column: 2; }
  .reading-rows article { display: block; }
  .reading-rows h3 { margin-bottom: .75rem; }
  .assessment { display: block; }
  .assessment-result { position: static; margin-top: 1rem; padding: 1.5rem; }
  .check-row + .check-row { margin-top: .75rem; }
  .check-options { gap: .6rem; }
  .check-options label { flex: 1; justify-content: center; padding: .5rem; }
  .feature-note { padding: 1.25rem; }
  .case-split, .charter-list, .gloss-grid, .three-up { grid-template-columns: 1fr; }
  .case-split, .three-up { gap: 1.25rem; }
  .three-up article { padding-top: 1.2rem; }
  .detail-body { padding-right: 0; }
  .formula p { font-size: 1.125rem; }
  .formula small { font-size: .875rem; }
  footer { flex-wrap: wrap; }
  footer span { width: 100%; order: 2; }
  .top { right: .75rem; bottom: .75rem; }
  section, .anchor { scroll-margin-top: 6rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print {
  .masthead, .side-nav, .top, .progress, .result-actions, #resetConfirm, .mobile-toc { display: none !important; }
  .page-layout { display: block; padding: 0; }
  .hero, .section { padding: 1rem 0; }
  body { color: black; background: white; }
  details:not([open]) > .detail-body { display: block; }
  .assessment { display: block; }
  .assessment-result { position: static; }
  .check-row, .recovery-ledger, .case-study { break-inside: avoid; }
  .section-head { break-after: avoid; }
}

.export-record { margin-top: 1rem; }
.export-record label { display: block; margin: .7rem 0; }
.export-record textarea { font-size: .875rem; }
