/* Reversible local portfolio display. */
.project-list { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; }
.project-list .project-card { background: var(--surface); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.project-card .toolbar { margin-top: auto; padding-top: 12px; }
.project-entry { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ink); padding: 24px; margin-bottom: 32px; }
.material-label { font-size: 14px; padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--wash); }
.material-figure { margin: 24px 0; min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.material-figure > a { display: block; }
.material-figure img { display: block; width: 100%; height: auto; }
.material-figure img[hidden] { display: none; }
.material-figure figcaption { padding: 16px; font-size: 14px; border-top: 1px solid var(--line); }
.material-error { padding: 24px; }
.gallery-guide { max-width: 850px; }
.process-steps { list-style: decimal-leading-zero; padding-left: 32px; margin-block: 24px; }
.process-steps li { padding: 0 0 16px 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.process-steps li::marker { color: var(--muted); font-size: 14px; }
.process-steps p { margin: 5px 0 0; color: var(--muted); }
@media(max-width:700px) { .project-list { grid-template-columns: minmax(0,1fr); } .project-list .project-card,.project-entry { padding: 18px; } }
:root {
  --paper: #f7f7f5;
  --surface: #fff;
  --ink: #242424;
  --muted: #616161;
  --line: #cececa;
  --wash: #ecece8;
  --radius: 6px;
  --content-width: 1120px;
  --header-clearance: 124px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
html { scroll-padding-top: var(--header-clearance); }
body { margin: 0; min-width: 280px; }
body, button, input, select, textarea { font-family: inherit; }
a { color: inherit; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid #242424;
  outline-offset: 4px;
  scroll-margin-top: var(--header-clearance);
  scroll-margin-bottom: 24px;
}
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
p { margin: 0 0 14px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.3; font-weight: 650; overflow-wrap: anywhere; }
h1 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; }
h2 { font-size: 23px; letter-spacing: -.02em; }
h3 { font-size: 18px; }
img, svg { max-width: 100%; height: auto; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 12px; padding: 10px 16px; background: var(--ink); color: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner, .location-bar { max-width: var(--content-width); margin-inline: auto; padding-inline: 28px; }
.header-inner { min-height: 67px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { font-size: 18px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand span { margin-left: 9px; font-size: 12px; font-weight: 400; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.site-nav a { padding: 9px 12px; text-decoration: none; border-radius: 3px; font-size: 14px; }
.site-nav a:hover { background: var(--wash); }
.site-nav a[aria-current="page"], .brand[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.location-bar { min-height: 31px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 8px; font-size: 12px; color: var(--muted); }
#location { margin: 0; overflow-wrap: anywhere; }
.wireframe-label { flex: 0 0 auto; }
main { max-width: var(--content-width); min-height: 55vh; margin: 0 auto; padding: 32px 28px 48px; overflow-wrap: anywhere; scroll-margin-top: var(--header-clearance); }
main:focus-visible { outline: 2px dashed var(--muted); outline-offset: -2px; }
.view-enter { animation: view-enter 180ms ease-out both; }
@keyframes view-enter { from { opacity: .4; } to { opacity: 1; } }
.page-head { margin-bottom: 26px; max-width: 840px; }
.eyebrow { margin-bottom: 8px; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.lead { color: var(--muted); max-width: 72ch; font-size: 16px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.entry-card { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.entry-card > :last-child { margin-top: auto; }
.entry-card h2, .entry-card p { margin-bottom: 0; }
.entry-card p { color: var(--muted); }
.entry-preview, .placeholder, .mock-block { border: 1px dashed #a6a6a1; background: var(--wash); display: grid; place-items: center; padding: 18px; min-height: 116px; text-align: center; color: var(--muted); font-size: 13px; }
.entry-preview { min-height: 128px; }
.placeholder { min-height: 90px; }
.list-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.side-panel, .facts-panel { min-width: 0; border: 1px solid var(--line); padding: 20px; background: var(--surface); border-radius: var(--radius); }
.side-panel p, .facts-panel p, .facts-panel li { color: var(--muted); font-size: 14px; }
.side-panel ul, .facts-panel ul { margin: 0; padding-left: 20px; }
.side-panel li, .facts-panel li { margin-bottom: 8px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: end; }
.filter-row > * { min-width: 0; }
.filter-row label { flex: 1 1 160px; }
.item-list { list-style: none; padding: 0; margin: 0; min-width: 0; }
.item-row { display: block; padding: 22px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.item-row:first-child { border-top: 1px solid var(--line); }
.item-row h2, .item-row h3 { margin-bottom: 8px; }
.item-row p { max-width: 72ch; margin-bottom: 12px; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.content-column { min-width: 0; }
.content-column > section { margin-bottom: 28px; }
.content-column > .mock-block { margin-bottom: 24px; }
.facts-panel dl { margin: 0; }
.facts-panel dt { margin-top: 14px; font-size: 12px; color: var(--muted); }
.facts-panel dt:first-child { margin-top: 0; }
.facts-panel dd { margin: 3px 0 0; font-size: 14px; }
.section-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 16px; }
.section-bar > * { margin-bottom: 0; }
details { border-block: 1px solid var(--line); margin: 14px 0; padding: 16px 0; }
details + details { border-top: none; }
summary { cursor: pointer; font-weight: 650; padding: 2px 0; }
details[open] summary { margin-bottom: 14px; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.demo-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); padding: 22px; border-radius: var(--radius); }
.demo-panel h2 { font-size: 21px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
label small, .field-hint { display: block; font-weight: 400; color: var(--muted); margin-top: 5px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { display: block; width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #92928e; border-radius: 3px; background: #fff; color: var(--ink); margin-top: 6px; }
input[type="checkbox"], input[type="radio"] { margin: 0 7px 0 0; accent-color: #333; }
textarea { min-height: 150px; resize: vertical; overflow-wrap: anywhere; }
.status-box { border-left: 3px solid #6b6b66; background: var(--wash); padding: 15px 17px; margin: 14px 0; min-height: 70px; overflow-wrap: anywhere; }
.status-box p:last-child { margin-bottom: 0; }
.status-box[data-status="error"], .status-box[data-status="timeout"] { border-left-style: double; border-left-width: 5px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; padding: 9px 15px; border-radius: 3px; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.5; white-space: normal; }
.primary { color: #fff; border: 1px solid var(--ink); background: var(--ink); }
.primary:hover { background: #444; }
.secondary { color: var(--ink); border: 1px solid #969691; background: transparent; }
.secondary:hover { background: var(--wash); }
.inline-link { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.notice { padding: 14px 16px; border-left: 3px solid #aaa; background: #efefec; color: #51514e; margin: 20px 0; font-size: 14px; }
.notice p:last-child { margin-bottom: 0; }
.empty-state { border: 1px dashed #aaa; padding: 28px; text-align: center; background: var(--surface); }
.empty-state p { color: var(--muted); }
.prototype-tools { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 32px; color: var(--muted); font-size: 13px; }
.prototype-tools summary { font-size: 13px; }
.prototype-tools label { font-size: 13px; }
.prototype-tools .toolbar { margin-top: 8px; }
.compact { font-size: 13px; }
.compact p { margin-bottom: 8px; }
.attachment-dialog { width: min(880px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border: 1px solid #888; border-radius: var(--radius); padding: 22px; color: var(--ink); background: var(--surface); overflow-y: auto; overflow-wrap: anywhere; }
.attachment-dialog::backdrop { background: rgb(0 0 0 / .45); }
.attachment-dialog .section-bar { margin-top: 0; }
.attachment-dialog .toolbar { justify-content: flex-end; }
.preview-frame { min-height: 300px; margin-top: 18px; background: var(--wash); border: 1px dashed #999; padding: 26px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.preview-frame > * { min-width: 0; max-width: 100%; }
.site-footer { max-width: var(--content-width); padding: 24px 28px 32px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; gap: 24px; color: var(--muted); font-size: 12px; }
.site-footer p { max-width: 80ch; margin: 0; }
.site-footer a { flex: 0 0 auto; }
@media (max-width: 900px) {
  .list-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 22px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; }
  .home-grid { gap: 18px; }
}
@media (max-width: 680px) {
  :root { --header-clearance: 132px; }
  .header-inner, .location-bar { padding-inline: 16px; }
  .header-inner { min-height: 0; padding-top: 10px; padding-bottom: 4px; flex-wrap: wrap; gap: 3px 12px; }
  .brand { font-size: 16px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 2px; }
  .site-nav a { font-size: 13px; padding: 8px 6px; }
  .site-nav a:first-child { padding-left: 0; }
  .location-bar { min-height: 24px; font-size: 11px; gap: 8px; padding-bottom: 7px; }
  .wireframe-label { font-size: 10px; }
  main { padding: 22px 16px 34px; }
  .page-head { margin-bottom: 18px; }
  .eyebrow { margin-bottom: 5px; font-size: 11px; }
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
  .lead { font-size: 14px; margin-bottom: 10px; }
  .home-grid, .list-layout, .detail-layout, .demo-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .entry-card { padding: 14px; gap: 8px; }
  .entry-card p { font-size: 13px; }
  .entry-preview { min-height: 42px; padding: 9px 12px; font-size: 12px; }
  .entry-card .primary, .entry-card .secondary { min-height: 38px; padding: 7px 12px; align-self: flex-start; }
  .side-panel { padding: 15px; }
  .side-panel h2, .side-panel h3 { font-size: 17px; margin-bottom: 7px; }
  .side-panel p { margin-bottom: 8px; }
  .facts-panel { padding: 17px; }
  .facts-panel dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 12px; }
  .facts-panel dt, .facts-panel dd { margin: 0; }
  .filter-row { margin-bottom: 12px; gap: 8px; }
  .item-row { padding: 19px 0; }
  .demo-panel { padding: 17px; }
  .toolbar { gap: 8px; }
  .empty-state { padding: 22px 16px; }
  .attachment-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 16px; }
  .preview-frame { min-height: 240px; padding: 18px; }
  .site-footer { padding: 20px 16px 26px; flex-direction: column; gap: 12px; }
}
@media (max-height: 650px) and (max-width: 680px) {
  main { padding-top: 16px; }
  .home-grid { gap: 12px; }
  .entry-card { padding: 12px; }
  .entry-preview { min-height: 32px; padding: 5px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
body[data-motion="off"] *, body[data-motion="off"] *::before, body[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
/* Contribution-first field guide: paper, ink and a restrained jade accent. */
.harness-hero { margin: 28px 0 50px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px 52px; border-block: 2px solid var(--ink); padding: 38px 0 26px; }
.hero-copy h1 { font-family: "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif; font-size: clamp(28px,3vw,40px); line-height: 1.4; letter-spacing: -.04em; margin-bottom: 24px; }
.hero-lead { font-size: 17px; line-height: 1.85; }
.hero-role { border-left: 3px solid #355d51; padding-left: 16px; font-size: 15px; }
.hero-role strong { display: block; margin-bottom: 7px; }
.hero-boundary { font-size: 14px; color: var(--muted); }
.judgment-list { display: grid; align-content: start; }
.judgment-list article { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.judgment-list article:first-child { padding-top: 0; border: 0; }
.judgment-number { font: 29px Georgia,serif; color: #355d51; }
.judgment-list h2 { font-size: 19px; margin-bottom: 10px; }
.judgment-list p { color: var(--muted); font-size: 15px; margin: 0; }
.hero-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; padding-top: 8px; }
.hero-actions a { font-size: 14px; }
.chapter-directory { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,1.6fr); gap: 36px; background: #e8ece6; padding: 28px; margin-block: 44px; scroll-margin-top: var(--header-clearance); }
.chapter-directory p { font-size: 14px; color: #42534b; }
.directory-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 22px; align-content: center; }
.directory-links a { font-size: 14px; text-decoration: none; padding: 9px 0; border-bottom: 1px solid #bbc7bc; }
.directory-links a:hover { text-decoration: underline; }
.evidence-ledger { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; margin-block: 24px; }
.evidence-ledger article { border-top: 3px solid #355d51; padding-top: 18px; }
.evidence-ledger h3 { font-size: 18px; }
.evidence-ledger p,.evidence-ledger a { font-size: 14px; }
.source-time-label { font-size: 14px; padding: 14px; background: #f1eadf; border-left: 3px solid #8a673f; }
.harness-overview { padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.overview-origin { width: fit-content; margin: 0 auto 32px; padding: 14px 24px; background: var(--ink); color: white; font-size: 17px; }
.overview-relations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; position: relative; border-top: 1px solid var(--ink); padding-top: 24px; }
.overview-part { position: relative; padding: 16px; border: 1px solid var(--line); background: var(--paper); }
.overview-part:before { content: ''; position: absolute; top: -25px; left: 50%; height: 24px; width: 1px; background: var(--ink); }
.overview-title { font-size: 21px; font-weight: 650; display: inline-block; margin-bottom: 10px; }
.overview-part p,.overview-part span { font-size: 14px; }
.overview-part span { color: #355d51; }
.overview-collaboration { display: flex; flex-direction: column; gap: 8px; text-align: center; margin-top: 24px; padding: 17px; border-block: 3px double #355d51; font-size: 14px; }
.overview-collaboration a { font-weight: 650; }
.harness-overview figcaption { font-size: 14px; line-height: 1.8; margin-top: 22px; }
.module-heading h2 { font-family: "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif; font-size: 29px; }
.module-explanation { display: grid; grid-template-columns: 1fr 1.5fr; gap: 36px; margin-block: 24px; }
.module-explanation p { font-size: 15px; color: var(--muted); }
.module-explanation strong { display: block; margin-bottom: 8px; color: var(--ink); }
.atomic-flow { margin: 26px 0; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); }
.flow-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 17px; color: var(--ink); margin: 0 0 24px; }
.flow-index { color: #355d51; font: 23px Georgia,serif; }
.flow-design-label { margin-left: auto; font-size: 14px; color: var(--muted); }
.vertical-flow { max-width: 760px; margin-inline: auto; }
.vertical-node { border: 1px solid var(--line); padding: 16px 20px; margin-inline: auto; width: min(100%,590px); background: var(--paper); }
.vertical-node > span { font-size: 14px; color: var(--muted); display: block; margin-bottom: 8px; }
.vertical-node p { font-size: 15px; margin: 0; }
.vertical-arrow { text-align: center; line-height: 1.3; padding: 5px; color: #355d51; font-size: 22px; }
.action-node { border-left: 3px solid var(--ink); }
.decision-node { border: 2px solid #355d51; border-radius: 14px; background: #edf2ec; }
.decision-node > span { color: #355d51; font-weight: 650; }
.branch-routes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin-top: 22px; }
.yes-route,.no-route { padding: 16px 18px; border: 1px solid var(--line); border-top: 3px solid #355d51; background: #f3f6f0; position: relative; }
.no-route { border-top-color: #8a673f; background: #f5eee4; }
.branch-label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 10px; }
.branch-routes p { font-size: 14px; margin: 0; line-height: 1.8; }
.return-route { margin-top: 16px; border: 1px dashed #8a673f; padding: 14px 18px; font-size: 14px; background: #faf6ef; }
.return-route > span { display: block; font-weight: 650; margin-bottom: 7px; }
.return-route p { margin: 0; }
.flow-references { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 14px; }
.flow-references > span { flex: 0 0 100%; color: var(--muted); }
.flow-references a { max-width: 100%; }
.construction-index { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 20px 0; font-size: 15px; }
.construction-stage { border: 1px solid var(--line); padding: 0; margin: 16px 0; background: var(--surface); scroll-margin-top: var(--header-clearance); }
.construction-stage > summary { padding: 20px; font-size: 18px; }
.stage-name { font-weight: 650; }
.stage-purpose { display: block; font-size: 14px; color: var(--muted); margin: 6px 0 0 20px; }
.stage-content { padding: 0 20px 20px; }
.stage-content .atomic-flow { padding: 20px; }
.atomic-library { margin: 24px 0; padding: 18px 20px; background: #efefea; border: 1px solid var(--line); }
.atomic-library > summary { font-size: 16px; font-weight: 650; }
.atom-directory { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.atom-directory a { font-size: 14px; }
.atom-detail { padding: 17px 0; margin: 0; border-bottom: 1px solid var(--line); scroll-margin-top: var(--header-clearance); }
.atom-detail > summary { font-size: 15px; }
.atom-name { font-weight: 650; }
.atom-expand { display: block; font-size: 14px; color: var(--muted); margin: 5px 0 0 20px; }
.atom-content { margin-top: 22px; padding: 20px; background: var(--surface); }
.atom-fields { display: grid; grid-template-columns: 150px minmax(0,1fr); margin: 0; gap: 14px 24px; font-size: 14px; line-height: 1.85; }
.atom-fields dt { color: #355d51; font-weight: 650; }
.atom-fields dd { margin: 0; }
.atom-provenance { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); }
.atom-original summary,.module-source-detail summary,.source-ledger summary,.real-example-source summary { font-size: 14px; }
.source-markdown { font-size: 14px; line-height: 1.9; padding-top: 18px; overflow-wrap: anywhere; }
.source-markdown h4 { margin: 24px 0 12px; font-size: 16px; }
.source-markdown ul { padding-left: 22px; }
.source-markdown li { margin-bottom: 10px; }
.source-markdown code,.atom-fields code { font-size: 14px; }
.source-table { max-width: 100%; overflow-x: auto; margin-block: 18px; }
.source-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.source-table td { padding: 12px; min-width: 120px; vertical-align: top; border: 1px solid var(--line); }
.source-table tr:first-child { font-weight: 650; background: var(--wash); }
.source-statuses { font-size: 14px; border-left: 3px solid #355d51; padding: 16px 20px; background: #edf2ec; margin-block: 20px; }
.source-statuses strong { display: block; margin-bottom: 5px; }
.harness-hero,.chapter-directory,.guide-section,[id^="guide-"] { scroll-margin-top: var(--header-clearance); }
.diagram-legend,.back-to-overview { font-size: 14px; }
@media(max-width:760px){
 .harness-hero { grid-template-columns: minmax(0,1fr); gap: 20px; padding-top: 28px; margin-top: 22px; }
 .hero-copy h1 { font-size: 28px; }
 .hero-lead { font-size: 16px; }
 .judgment-list article { padding: 18px 0; }
 .hero-actions { gap: 16px; }
 .chapter-directory,.module-explanation { grid-template-columns: minmax(0,1fr); gap: 16px; }
 .chapter-directory { padding: 20px; }
 .directory-links,.evidence-ledger { grid-template-columns: minmax(0,1fr); }
 .evidence-ledger { gap: 22px; }
 .overview-relations { grid-template-columns: minmax(0,1fr); gap: 22px; padding-top: 24px; border-top: 0; border-left: 1px solid var(--ink); margin-left: 12px; padding-left: 20px; }
 .overview-part:before { left: -21px; top: 24px; width: 20px; height: 1px; }
 .overview-origin { margin-bottom: 0; font-size: 15px; }
 .harness-overview,.atomic-flow { padding: 18px 14px; }
 .module-heading h2 { font-size: 25px; }
 .flow-caption { gap: 10px; font-size: 17px; }
 .flow-design-label { width: 100%; margin: 0; }
 .vertical-node { padding: 14px; }
 .branch-routes { grid-template-columns: minmax(0,1fr); gap: 14px; }
 .yes-route,.no-route { padding: 14px; }
 .stage-content { padding: 0 12px 14px; }
 .stage-content .atomic-flow { padding: 14px 10px; }
 .construction-stage > summary { padding: 16px 12px; font-size: 17px; }
 .atomic-library { padding: 16px 12px; }
 .atom-content { padding: 14px; }
 .atom-fields { grid-template-columns: minmax(0,1fr); gap: 5px; }
 .atom-fields dd { margin-bottom: 14px; }
 .atom-provenance { gap: 10px; }
 .source-table td { min-width: 130px; }
}
.entry-card { text-decoration: none; }
.entry-card:hover { border-color: var(--ink); }
.content-preview { display: grid; gap: 6px; border-block: 1px solid var(--line); padding: 18px 0; font-size: 14px; }
.content-preview span { color: var(--muted); margin-bottom: 10px; }
.advantage { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.advantage-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.advantage-grid p { font-size: 14px; color: var(--muted); }
.advantage-grid strong { display: block; color: var(--ink); margin-bottom: 8px; }
.case-role { font-size: 14px; color: var(--muted); }
.artifact-actions { margin-bottom: 28px; }
.artifact-actions p { margin-top: 12px; }
.evidence { border-top: 1px solid var(--line); padding-top: 24px; }
.evidence li { margin-bottom: 12px; }
figure { margin: 24px 0 0; }
figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.artifact-image { border: 1px solid var(--line); display: block; }
.facts-panel dt:not(:first-child) { border-top: 1px solid var(--line); padding-top: 14px; }
.fact-lines { font-size: 14px; }
.fact-lines dt { font-weight: 600; margin-top: 12px; }
.fact-lines dd { margin: 4px 0 0; }
code { white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-panel .compact { margin-top: 12px; color: var(--muted); }
.sample-buttons { margin: 12px 0 20px; }
.confirm-row { display: flex; align-items: start; gap: 8px; font-weight: 400; }
.confirm-row input { margin-top: 5px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media(max-width:680px){ .advantage-grid { grid-template-columns: minmax(0,1fr); gap: 8px; } .facts-panel dt:not(:first-child) { border-top: none; padding-top: 0; } }

/* Harness: an editorial field guide, real text at every viewport. */
.guide-intro { max-width: 820px; padding: 18px 0 8px; border-top: 1px solid var(--ink); }
.guide-deck { font-size: 20px; line-height: 1.7; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 22px; padding: 16px 0; border-block: 1px solid var(--line); }
.guide-nav a { padding: 4px 0; }
.diagram-legend { font-size: 13px; color: var(--muted); }
.diagram-legend strong { margin-right: 12px; color: var(--ink); }
.guide-section { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--ink); scroll-margin-top: var(--header-clearance); }
.guide-section:focus { outline: none; }
.guide-section:focus-visible { outline: 2px dashed var(--muted); outline-offset: 7px; }
.guide-section-head { max-width: 850px; }
.guide-section-head h2 { font-family: "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif; font-size: 29px; font-weight: 700; }
.map-rationale { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px; margin: 22px 0 26px; color: var(--muted); font-size: 14px; }
.map-rationale strong { display: block; margin-bottom: 6px; color: var(--ink); }
.mindmap,.work-flow,.collaboration-map,.constraints-map,.directed-map { margin: 26px 0 20px; padding: 28px; border: 1px solid var(--line); background: var(--surface); }
.map-root { position: relative; padding: 14px 22px; width: fit-content; max-width: 100%; margin: 0 auto; text-align: center; background: var(--ink); color: white; font-weight: 650; }
.map-root::after { content: ''; position: absolute; width: 1px; height: 25px; bottom: -25px; left: 50%; background: var(--ink); }
.map-branches { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding-top: 48px; gap: 24px; }
.map-branches::before { content: ''; position: absolute; top: 24px; left: calc((100% - 48px) / 6); right: calc((100% - 48px) / 6); height: 1px; background: var(--ink); }
.map-branch { position: relative; min-width: 0; }
.map-branch::before { content: ''; position: absolute; width: 1px; height: 24px; top: -24px; left: 50%; background: var(--ink); }
.map-node { padding: 17px 18px; border: 1px solid var(--line); min-width: 0; background: var(--paper); font-size: 14px; line-height: 1.65; }
.map-node > strong { display: block; font-size: 18px; margin-bottom: 9px; color: var(--ink); }
.map-node > span:not(.node-kicker) { display: block; color: var(--muted); }
.map-node small { display: block; margin-top: 10px; font-size: 12px; text-decoration: underline; }
.node-kicker { font-size: 11px; color: var(--muted); }
.node-kicker:empty { display: none; }
.overview-link { display: block; height: 100%; text-decoration: none; border-top: 3px solid var(--ink); }
.overview-link:hover { background: var(--wash); border-color: var(--ink); }
.mindmap figcaption,.work-flow figcaption,.collaboration-map figcaption,.constraints-map figcaption,.directed-map figcaption { margin-top: 20px; font-size: 12px; line-height: 1.7; }
.relation-text { color: var(--muted); font-size: 13px; }
.relation-text ul,.source-notes ul { margin: 0; padding-left: 20px; }
.relation-text li,.source-notes li { margin-bottom: 8px; }
.source-notes { font-size: 13px; color: var(--muted); }
.source-path { word-break: break-word; }
.back-to-overview { display: inline-block; font-size: 12px; margin-top: 8px; }
.map-explanations { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 36px; margin: 28px 0; }
.node-explanation { padding: 20px 0; border-top: 1px solid var(--line); min-width: 0; }
.node-explanation h3 { font-size: 18px; }
.node-detail { margin: 12px 0 0; font-size: 14px; display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 10px 14px; }
.node-detail dt { color: var(--muted); }
.node-detail dd { margin: 0; }
.work-flow ol { list-style: none; padding: 0; margin: 0; }
.flow-step { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 24px; position: relative; padding-bottom: 34px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-step:not(:last-child)::after { content: '↓'; position: absolute; top: 48px; bottom: 8px; left: 27px; width: 1px; background: var(--line); color: var(--ink); display: flex; align-items: flex-end; justify-content: center; line-height: 1; }
.flow-count { position: relative; z-index: 1; width: 56px; height: 46px; background: var(--ink); color: white; display: grid; place-items: center; font: 20px "Georgia",serif; }
.flow-body { padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.flow-step:last-child .flow-body { border-bottom: 0; padding-bottom: 0; }
.flow-body > p { font-size: 14px; color: var(--muted); }
.failure-return { border-left: 2px dashed #a3764b; background: #f4efe7; padding: 12px 14px; margin: 18px 0 0; }
.failure-return > span { color: #725335; font-size: 20px; margin-right: 4px; }
.failure-return strong { color: var(--ink); margin-right: 8px; }
.swimlanes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 34px; }
.swimlane { min-width: 0; position: relative; }
.swimlane:not(:last-child)::after { content: '→'; position: absolute; right: -29px; top: 83px; color: var(--ink); font-size: 26px; }
.swimlane h3 { min-height: 48px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; font-size: 15px; }
.swimlane-nodes { display: grid; gap: 12px; }
.swimlane-nodes .map-node { font-size: 13px; }
.swimlane-nodes .map-node strong { font-size: 17px; }
.lane-return { position: relative; padding: 14px 16px; margin: 24px 0 0; border: 1px dashed #a3764b; background: #f4efe7; font-size: 13px; }
.lane-return > span { font-size: 20px; color: #725335; }
.constraint-track h3,.constraint-rail h3 { font-size: 16px; }
.gate-chain { display: flex; gap: 26px; }
.gate-chain .map-node { flex: 1 1 0; position: relative; }
.gate-chain .map-node:not(:last-child)::after { content: '→'; position: absolute; right: -23px; top: 40%; font-size: 22px; }
.gate-chain .map-node strong { font-size: 16px; }
.stop-route { font-size: 13px; color: #725335; border-bottom: 1px dashed #a3764b; margin-top: 16px; padding-bottom: 12px; }
.constraint-rail { border-top: 4px double var(--ink); margin-top: 24px; padding-top: 20px; }
.constraint-rail > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.constraint-rail .map-node strong { font-size: 16px; }
.comparison-table { margin-top: 22px; }
.comparison-table table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.comparison-table th,.comparison-table td { text-align: left; vertical-align: top; padding: 16px; border-block: 1px solid var(--line); }
.comparison-table thead th { background: var(--ink); color: white; font-weight: 600; }
.comparison-table th:first-child { width: 18%; }
.comparison-table td:last-child { background: var(--wash); }
.glossary { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 12px 20px; font-size: 14px; }
.glossary dt { font-weight: 650; }
.glossary dd { margin: 0; }
.guide-appendix { font-size: 14px; }
.history-appendix .material-figure { max-width: 900px; }
.evidence-classes { padding: 16px 18px; border-left: 3px solid var(--ink); background: var(--wash); margin: 20px 0; }
.evidence-classes p:last-child,.contribution-classes p:last-child { margin-bottom: 0; }
.evidence-classes strong,.contribution-classes strong { color: var(--ink); }
.facts-panel .evidence-classes { padding: 0; background: transparent; border: 0; margin-top: 0; }
.knowledge-cabinet { padding: 20px; border: 1px solid var(--ink); }
.knowledge-cabinet > h3 { font-size: 17px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.knowledge-partitions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.knowledge-partitions .map-node strong { font-size: 15px; }
.knowledge-partitions .map-node { font-size: 13px; }
.memory-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-top: 26px; }
.memory-tools .map-node { border-top: 3px solid var(--ink); }
.edge-heading { font-size: 15px; margin: 28px 0 16px; }
.edge-routes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 24px; margin-top: 24px; border-block: 1px solid var(--line); }
.edge-route { display: grid; grid-template-columns: minmax(0,1fr) minmax(80px,1.3fr) minmax(0,1fr); align-items: center; gap: 8px; padding: 14px 0; font-size: 13px; line-height: 1.5; }
.edge-from,.edge-to { padding: 8px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.edge-arrow { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.edge-arrow small { font-size: 14px; color: var(--muted); }
.edge-arrow > span { position: absolute; bottom: -10px; right: -2px; font-size: 20px; line-height: 1; background: var(--paper); }
.directed-map .edge-arrow > span { background: var(--surface); }
.context-chain { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; padding: 0; margin: 0; gap: 28px; }
.context-chain li { position: relative; }
.context-chain li:not(:last-child)::after { content: '→'; position: absolute; right: -25px; top: 45%; font-size: 23px; }
.context-chain .map-node { height: 100%; }
.context-chain .map-node strong { font-size: 17px; }
.map-explanations .node-explanation { margin: 0; padding: 15px 0; border-bottom: 0; }
.map-explanations .node-explanation summary { font-size: 14px; }
.step-reason { margin-bottom: 0; font-size: 13px; padding: 12px 0 0; border-bottom: 0; }
.flow-output { margin-top: 12px; }
.flow-body .flow-output strong { color: var(--ink); }
@media(max-width:900px){ .gate-chain { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; } .gate-chain .map-node:not(:last-child)::after { display: none; } }
@media(max-width:680px){
 .guide-deck { font-size: 17px; }
 .guide-nav { gap: 6px 16px; }
 .guide-nav a { font-size: 13px; }
 .guide-section { margin-top: 38px; padding-top: 22px; }
 .guide-section-head h2 { font-size: 25px; }
 .knowledge-cabinet { padding: 14px; }
 .knowledge-partitions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .knowledge-partitions .map-node { padding: 10px; font-size: 13px; }
 .knowledge-partitions .map-node strong { font-size: 14px; }
 .memory-tools { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .edge-routes { grid-template-columns: minmax(0,1fr); gap: 0; }
 .edge-route { grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr); gap: 7px; font-size: 13px; border-bottom: 1px solid var(--line); padding: 14px 0; }
 .edge-from,.edge-to { padding: 8px; grid-row: 1; }
 .edge-from { grid-column: 1; }
 .edge-to { grid-column: 3; }
 .edge-arrow { display: contents; }
 .edge-arrow small { grid-column: 1 / -1; grid-row: 2; font-size: 14px; text-align: center; color: var(--muted); }
 .edge-arrow > span { position: static; grid-column: 2; grid-row: 1; font-size: 24px; text-align: center; }
 .context-chain { grid-template-columns: minmax(0,1fr); gap: 28px; }
 .context-chain li:not(:last-child)::after { content: '↓'; top: auto; bottom: -27px; right: 50%; }
 .map-rationale,.map-explanations { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .mindmap,.work-flow,.collaboration-map,.constraints-map,.directed-map { padding: 18px 14px; margin-top: 22px; }
 .map-root { margin: 0 0 0 16px; text-align: left; padding: 12px 15px; }
 .map-root::after { left: 15px; height: 20px; bottom: -20px; }
 .map-branches { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; padding: 20px 0 0 32px; }
 .map-branches::before { top: 0; bottom: 0; left: 31px; right: auto; width: 1px; height: auto; }
 .map-branch::before { width: 16px; height: 1px; top: 25px; left: -16px; }
 .map-branch { margin-left: 16px; }
 .map-node { padding: 14px; }
 .map-node strong { font-size: 17px; }
 .flow-step { grid-template-columns: 32px minmax(0,1fr); gap: 12px; }
 .flow-count { width: 32px; height: 36px; font-size: 16px; }
 .flow-step:not(:last-child)::after { left: 15px; top: 38px; }
 .node-detail { grid-template-columns: minmax(0,1fr); gap: 3px; font-size: 13px; }
 .node-detail dt { margin-top: 8px; font-size: 13px; }
 .node-detail dd { margin-bottom: 4px; }
 .failure-return { padding: 10px; }
 .swimlanes { grid-template-columns: minmax(0,1fr); gap: 32px; }
 .swimlane h3 { min-height: 0; }
 .swimlane:not(:last-child)::after { content: '↓'; top: auto; bottom: -32px; right: 50%; font-size: 22px; }
 .constraint-rail > div,.gate-chain { grid-template-columns: minmax(0,1fr); }
 .gate-chain { gap: 25px; }
 .gate-chain .map-node:not(:last-child)::after { display: block; content: '↓'; top: auto; bottom: -26px; right: 50%; font-size: 20px; }
 .comparison-table table { font-size: 14px; }
 .comparison-table th,.comparison-table td { padding: 10px 7px; }
 .comparison-table th:first-child { width: 20%; }
 .glossary { grid-template-columns: minmax(0,1fr); gap: 5px; }
 .glossary dd { margin-bottom: 12px; }
}
