:root {
  --paper: #F6F1E7;
  --paper-2: #FBF7EF;
  --paper-3: #EFE7D8;
  --ink: #1C1B19;
  --ink-soft: #3F3B35;
  --muted: #6E675C;
  --line: #D8CDBD;
  --line-dark: #3A3731;
  --red: #B23A2B;
  --red-deep: #8E2E22;
  --blue: #3E5C6B;
  --sage: #6F7F6A;
  --gold: #C49A4A;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 8px 8px 0 rgba(28, 27, 25, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.nav-open, body.lightbox-open { overflow: hidden; }
::selection { background: var(--red); color: var(--paper); }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}
.skip:focus { top: 12px; }

.shell { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 120;
  background: transparent;
}
.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
}

/* ---------- masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(246, 241, 231, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  border: 1px solid var(--red-deep);
  box-shadow: 3px 3px 0 rgba(28, 27, 25, .18);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; }
.brand-text em { font-family: var(--serif); font-size: 11.5px; font-style: normal; color: var(--muted); margin-top: 3px; letter-spacing: .04em; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a {
  position: relative;
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--ink-soft);
  padding: 6px 0;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--red);
  transition: right .25s ease;
}
.topnav a:hover::after { right: 0; }
.topnav a:hover { color: var(--red-deep); }
.nav-ext { font-family: var(--mono); font-size: 10.5px !important; }
.menu-btn {
  display: none;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 54px 0 28px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(28, 27, 25, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 27, 25, .035) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 78%);
}
.hero > .shell { position: relative; }
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
  padding: clamp(54px, 8vw, 104px) 0 56px;
}
.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--red);
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 8.6vw, 8.2rem);
  line-height: .88;
  letter-spacing: -.045em;
  color: var(--ink);
}
.hero h1 span { color: var(--red); font-style: italic; letter-spacing: -.05em; }
.hero-cn {
  margin: 30px 0 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.55;
  letter-spacing: .02em;
}
.hero-lede {
  max-width: 560px;
  margin: 26px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--red);
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-footnote { margin: 20px 0 0; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: .04em;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn.primary { background: var(--red); border-color: var(--red); color: var(--paper-2); }
.btn.ghost { background: transparent; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn.primary:hover { background: var(--red-deep); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

.hero-plate {
  background: var(--paper-2);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(1.1deg);
  transition: transform .4s ease;
}
.hero-plate:hover { transform: rotate(0deg); }
.plate-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--muted);
}
.stack-mini { list-style: none; margin: 0; padding: 0; }
.stack-mini li {
  display: grid;
  grid-template-columns: 38px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--line);
}
.stack-mini li span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.stack-mini li b { font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: .06em; }
.stack-mini li i { font-family: var(--mono); font-size: 8.5px; font-style: normal; letter-spacing: .08em; color: var(--muted); }
.stack-mini li em { font-size: 10px; font-style: normal; color: var(--muted); }
.stack-mini .layer-human { border-left-color: var(--red); }
.stack-mini .layer-both { border-left-color: var(--sage); }
.stack-mini .layer-ai { border-left-color: var(--blue); background: rgba(62, 92, 107, .045); }
.plate-foot { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.plate-foot p { margin: 0; font-family: var(--serif); font-size: 13px; }
.plate-foot span { font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: .04em; }
.hero-bottom {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero-line { flex: 1; height: 1px; background: var(--line); }

/* ---------- manifesto ---------- */
.manifesto { padding: 88px 0 72px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--red); text-transform: uppercase; }
.manifesto-quote {
  max-width: 1020px;
  margin: 0;
  padding-left: clamp(18px, 3vw, 40px);
  border-left: 4px solid var(--red);
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 44px);
  line-height: 1.55;
  letter-spacing: .01em;
  color: var(--ink);
}
.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 64px;
  border-top: 1px solid var(--ink);
}
.manifesto-grid article { padding: 24px 28px 8px 0; border-right: 1px solid var(--line); }
.manifesto-grid article:last-child { border-right: 0; padding-right: 0; }
.manifesto-grid .num { font-family: var(--mono); font-size: 10px; color: var(--red); letter-spacing: .1em; }
.manifesto-grid h3 { margin: 8px 0 10px; font-family: var(--serif); font-size: 20px; letter-spacing: .02em; }
.manifesto-grid p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--muted); }

/* ---------- section heads ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
  margin-bottom: 54px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.3;
  letter-spacing: .01em;
  font-weight: 700;
}
.section-note {
  margin: 0 0 6px;
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
  letter-spacing: .04em;
}
.section-head.on-dark { border-top-color: var(--paper); }
.section-head.on-dark h2 { color: var(--paper); }
.section-head.on-dark .section-note { color: #A9A093; }
.section-head.on-dark .kicker { color: #D9776A; }

/* ---------- article ---------- */
.article-section { padding: 100px 0 110px; }
.article-layout { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: clamp(36px, 6vw, 84px); justify-content: center; }
.toc { position: sticky; top: 100px; align-self: start; }
.toc-title { margin: 0 0 14px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--muted); }
.toc nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.toc nav a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 11px 0 11px 12px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.toc nav a span { font-family: var(--mono); font-size: 9px; color: var(--red); padding-top: 2px; }
.toc nav a:hover { color: var(--ink); background: rgba(178, 58, 43, .04); }
.toc nav a.active { color: var(--ink); border-left: 2px solid var(--red); background: rgba(178, 58, 43, .05); font-weight: 600; }
.toc-download {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--red-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(178, 58, 43, .4);
  padding-bottom: 3px;
}
.prose {
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 2.05;
  color: var(--ink-soft);
  letter-spacing: .01em;
}
.prose > p { margin: 0 0 1.15em; }
.prose-lede { font-size: 20px; line-height: 1.95; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 2.8em 0 1.1em;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: clamp(24px, 2.8vw, 30px);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: .02em;
}
.prose h2 span { font-family: var(--mono); font-size: 10px; color: var(--red); letter-spacing: .1em; }
.pullquote {
  margin: 1.8em 0 !important;
  padding: 6px 0 6px 24px;
  border-left: 3px solid var(--red);
  font-size: clamp(20px, 2.3vw, 24px);
  line-height: 1.75;
  color: var(--ink);
}
.stage-list { margin: 1.4em 0 1.6em; padding: 0; list-style: none; counter-reset: stage; border-top: 1px solid var(--line); }
.stage-list li {
  counter-increment: stage;
  position: relative;
  padding: 10px 0 10px 42px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.85;
}
.stage-list li::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--red);
}
.stage-list li b { color: var(--ink); }
.question-list { margin: 1.4em 0 1.6em; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.question-list li { position: relative; padding: 10px 0 10px 24px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.question-list li::before { content: "→"; position: absolute; left: 0; color: var(--red); font-family: var(--mono); font-size: 12px; }
.plate { margin: 2.6em 0; padding: 8px; background: var(--paper-2); border: 1px solid var(--ink); }
.plate-img { display: block; overflow: hidden; border: 1px solid var(--line); }
.plate-img img { width: 100%; transition: transform .5s ease; }
.plate-img:hover img { transform: scale(1.012); }
.plate figcaption {
  padding: 12px 6px 4px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}
.plate figcaption span { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: var(--red); }
.prose-sign {
  margin-top: 3em !important;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
}
.prose-sign span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); letter-spacing: .08em; }

/* ---------- atlas ---------- */
.atlas-section { padding: 100px 0 110px; background: var(--ink); color: var(--paper); }
.atlas-shell { border: 1px solid #4A453D; background: #211F1C; }
.atlas-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid #4A453D; }
.atlas-tab {
  flex: 1 1 150px;
  padding: 17px 22px;
  border: 0;
  border-right: 1px solid #4A453D;
  background: transparent;
  color: #B9B0A3;
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  transition: background .2s, color .2s;
}
.atlas-tab:last-child { border-right: 0; }
.atlas-tab span { display: block; margin-top: 4px; font-family: var(--serif); font-size: 15px; letter-spacing: .04em; }
.atlas-tab:hover { background: #2A2722; color: var(--paper); }
.atlas-tab.active { background: var(--paper); color: var(--ink); }
.atlas-intro { margin: 0; padding: 18px 24px; border-bottom: 1px solid #4A453D; color: #B9B0A3; font-size: 12.5px; line-height: 1.8; }
.atlas-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.atlas-rail { border-right: 1px solid #4A453D; max-height: 620px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4A453D transparent; }
.stage-btn {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid #3A3731;
  border-left: 3px solid transparent;
  background: transparent;
  color: #B9B0A3;
  text-align: left;
  transition: background .18s, color .18s, border-color .18s;
}
.stage-btn:hover { background: #2A2722; color: var(--paper); }
.stage-btn.active { background: #2C2924; border-left-color: var(--red); color: var(--paper); }
.stage-num { font-family: var(--mono); font-size: 9px; color: #7E766A; }
.stage-btn.active .stage-num { color: #D9776A; }
.stage-name { font-family: var(--serif); font-size: 14px; letter-spacing: .03em; }
.stage-gate { font-family: var(--mono); font-size: 8px; color: #8E8578; white-space: nowrap; }
.atlas-detail { padding: 32px 36px 28px; min-height: 480px; display: flex; flex-direction: column; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid #3A3731; }
.detail-kicker { margin: 0 0 8px; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: #D9776A; }
.detail-title { margin: 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: .03em; color: var(--paper); }
.detail-title small { display: inline-block; margin-left: 12px; font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: .1em; color: #8E8578; }
.detail-progress { font-family: var(--mono); font-size: 10px; color: #8E8578; white-space: nowrap; padding-top: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; flex: 1; padding: 8px 0; }
.detail-field { padding: 14px 0; border-bottom: 1px solid #332F29; }
.field-label { display: block; margin-bottom: 5px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: #8E8578; }
.field-value { margin: 0; font-size: 13px; line-height: 1.8; color: #D8D0C3; }
.detail-field.is-gate .field-value { color: #E3B25C; font-family: var(--serif); font-size: 15px; }
.detail-field.is-failure .field-value { color: #D9776A; }
.detail-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid #3A3731; }
.nav-btn {
  padding: 8px 14px;
  border: 1px solid #4A453D;
  background: transparent;
  color: #B9B0A3;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  transition: border-color .2s, color .2s;
}
.nav-btn:hover:not(:disabled) { border-color: var(--red); color: var(--paper); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.atlas-foot { display: flex; justify-content: space-between; gap: 16px; padding: 13px 20px; border-top: 1px solid #4A453D; font-family: var(--mono); font-size: 9px; color: #8E8578; letter-spacing: .04em; }

/* ---------- routes ---------- */
.routes-section { padding: 100px 0 110px; border-bottom: 1px solid var(--line); }
.route-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--ink); margin-bottom: 0; }
.route-tab {
  position: relative;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.route-tab:hover { color: var(--ink); background: rgba(28, 27, 25, .045); }
.route-tab.active { background: var(--paper); color: var(--red-deep); border-color: var(--ink); }
.route-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--paper); }
.route-brief {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: start;
  padding: 28px 32px;
  border: 1px solid var(--ink);
  border-top: 0;
  background: var(--paper-2);
}
.brief-label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--red); padding-top: 8px; }
.brief-text { margin: 0; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 25px); line-height: 1.65; color: var(--ink); }
.route-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.route-card { border: 1px solid var(--ink); background: var(--paper-2); padding: 0 0 24px; display: flex; flex-direction: column; }
.route-card.fit { border-top: 5px solid var(--sage); }
.route-card.wrong { border-top: 5px solid var(--red); }
.route-head { padding: 22px 26px 0; }
.route-tag { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: var(--muted); }
.route-tool { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); line-height: 1.3; color: var(--ink); }
.route-why { margin: 12px 0 0; font-size: 13px; line-height: 1.85; color: var(--ink-soft); }
.route-list, .route-checks { margin: 18px 26px 0; padding: 0; list-style: none; }
.route-list li { padding: 7px 0 7px 18px; border-bottom: 1px solid var(--line); font-size: 12px; position: relative; }
.route-list li::before { content: "✓"; position: absolute; left: 0; color: var(--sage); font-family: var(--mono); font-size: 10px; }
.route-checks { margin-top: 14px; }
.route-checks li { position: relative; padding: 4px 0 4px 16px; font-family: var(--mono); font-size: 9.5px; line-height: 1.7; color: var(--muted); }
.route-checks li::before { content: "—"; position: absolute; left: 0; color: var(--red); }
.route-note { margin: 18px 26px 0; padding: 10px 12px; border-left: 2px solid var(--gold); background: rgba(196, 154, 74, .09); font-size: 11px; line-height: 1.7; color: var(--muted); }
.route-trigger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 14px 20px;
  border: 1px dashed var(--muted);
  font-size: 12px;
  color: var(--ink-soft);
}
.trigger-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: var(--red); }
.trigger-text { font-family: var(--serif); font-size: 15px; }

/* ---------- gates ---------- */
.gates-section { padding: 100px 0 110px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.gate-controls { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.gate-cases { display: flex; flex-wrap: wrap; gap: 8px; }
.gate-tab {
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}
.gate-tab:hover { border-color: var(--ink); color: var(--ink); }
.gate-tab.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gate-modes { display: flex; border: 1px solid var(--ink); }
.gate-mode {
  border: 0;
  background: transparent;
  padding: 10px 18px;
  font-size: 11.5px;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.gate-mode + .gate-mode { border-left: 1px solid var(--ink); }
.gate-mode.active { background: var(--red); color: var(--paper); }
.gate-summary { margin: 28px 0 16px; font-family: var(--serif); font-size: clamp(18px, 2.2vw, 24px); line-height: 1.6; color: var(--ink); }
.gate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gate {
  position: relative;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  background: var(--paper);
  padding: 18px 18px 20px;
  min-height: 210px;
  transition: opacity .25s ease, border-color .25s ease;
}
.gate.pass { border-top-color: var(--sage); }
.gate.fail { border-top-color: var(--red); }
.gate.partial { border-top-color: var(--gold); }
.gate.is-muted { opacity: .4; }
.gate-num { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--muted); }
.gate-name { margin: 8px 0 6px; font-family: var(--serif); font-size: 21px; color: var(--ink); }
.gate-status { display: inline-block; margin-bottom: 10px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; padding: 3px 6px; border: 1px solid currentColor; }
.gate.pass .gate-status { color: var(--sage); }
.gate.fail .gate-status { color: var(--red); }
.gate.partial .gate-status { color: var(--gold); }
.gate-detail { margin: 0; font-size: 11.5px; line-height: 1.8; color: var(--muted); }
.gate.is-muted .gate-detail { color: var(--line); }
.gate-verdict {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.gate-verdict.pass { border-left: 6px solid var(--sage); }
.gate-verdict.fail { border-left: 6px solid var(--red); }
.verdict-label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--muted); }
.verdict-main { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; }
.gate-verdict.pass .verdict-main { color: var(--sage); }
.gate-verdict.fail .verdict-main { color: var(--red-deep); }
.verdict-note { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-soft); }

/* ---------- cases ---------- */
.cases-section { padding: 100px 0 110px; }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card { border: 1px solid var(--ink); background: var(--paper-2); transition: transform .25s ease, box-shadow .25s ease; }
.case-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.case-img { position: relative; display: block; border-bottom: 1px solid var(--ink); overflow: hidden; }
.case-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.case-card:hover .case-img img { transform: scale(1.025); }
.case-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  color: var(--ink);
}
.case-body { padding: 22px 22px 24px; }
.case-body h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 21px; line-height: 1.45; }
.case-body > p { margin: 0 0 18px; font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.case-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; }
.case-stats li { display: flex; flex-direction: column; gap: 2px; }
.case-stats b { font-family: var(--mono); font-size: 17px; font-weight: 500; color: var(--ink); }
.case-stats span { font-family: var(--mono); font-size: 8px; color: var(--muted); letter-spacing: .03em; }
.text-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  color: var(--red-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(178, 58, 43, .45);
  padding-bottom: 3px;
}
.text-link:hover { color: var(--red); border-color: var(--red); }
.media-row { display: grid; grid-template-columns: 1.35fr .65fr; gap: 24px; margin-top: 24px; }
.audio-card, .demo-card { border: 1px solid var(--ink); padding: 28px 30px; }
.audio-card { background: var(--paper-2); }
.audio-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.audio-head h3 { margin: 0; font-family: var(--serif); font-size: 24px; }
.audio-badge { font-family: var(--mono); font-size: 8.5px; color: var(--muted); border: 1px solid var(--line); padding: 4px 7px; white-space: nowrap; }
.audio-card > p { margin: 12px 0 4px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.audio-card audio { width: 100%; margin: 14px 0 10px; }
.audio-foot { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 8px; }
.audio-foot span { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.demo-card { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: center; }
.demo-card .kicker { color: #D9776A; }
.demo-card h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 28px; }
.demo-card p { margin: 0 0 22px; font-size: 12px; line-height: 1.8; color: #B9B0A3; }
.demo-card .btn.primary { align-self: flex-start; }
.demo-note { margin-top: 12px; font-family: var(--mono); font-size: 8.5px; color: #8E8578; }

/* ---------- worksheet ---------- */
.worksheet-section { padding: 100px 0 110px; background: var(--paper-3); border-bottom: 1px solid var(--line); }
.ws-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.ws-form { border: 1px solid var(--ink); background: var(--paper-2); padding: 26px 26px 22px; }
.ws-form label { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.ws-form input, .ws-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  resize: vertical;
  transition: border-color .2s, background .2s;
}
.ws-form input:focus, .ws-form textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.ws-form ::placeholder { color: #A69C8C; font-size: 12px; }
.ws-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ws-actions .btn { padding: 11px 16px; font-size: 11px; }
.ws-output { position: sticky; top: 96px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.ws-output-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-dark); font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: #A9A093; }
.ws-output-head div { display: flex; gap: 6px; }
.mini-btn { border: 1px solid #4A453D; background: transparent; color: #B9B0A3; padding: 5px 9px; font-family: var(--mono); font-size: 8.5px; }
.mini-btn:hover { border-color: var(--red); color: var(--paper); }
#wsPreview { margin: 0; padding: 20px; min-height: 520px; max-height: 640px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 10.5px; line-height: 1.85; color: #D8D0C3; }
.ws-hint { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line-dark); font-size: 10.5px; line-height: 1.7; color: #8E8578; }

/* ---------- closing / footer ---------- */
.closing { padding: 110px 0 120px; text-align: center; }
.closing blockquote { margin: 24px auto 40px; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 56px); line-height: 1.45; letter-spacing: .01em; }
.closing-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.site-footer { background: var(--ink); color: var(--paper); padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line-dark); }
.footer-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; margin: 0 0 14px; background: var(--red); color: var(--paper); font-family: var(--serif); font-size: 22px; }
.footer-title { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.4; }
.footer-note { margin: 10px 0 0; font-family: var(--mono); font-size: 9px; color: #8E8578; letter-spacing: .06em; }
.footer-label { margin: 4px 0 14px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; color: #8E8578; text-transform: uppercase; }
.footer-grid a { display: block; margin-bottom: 9px; font-size: 11.5px; color: #B9B0A3; text-decoration: none; }
.footer-grid a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; font-family: var(--mono); font-size: 8.5px; color: #7E766A; letter-spacing: .05em; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 32px; background: rgba(15, 14, 12, .94); }
.lb-inner { max-width: min(1200px, 92vw); max-height: 90vh; display: flex; flex-direction: column; gap: 10px; }
.lb-inner img { max-width: 100%; max-height: 80vh; object-fit: contain; background: var(--paper); border: 1px solid #4A453D; }
#lbCaption { margin: 0; font-size: 11px; color: #B9B0A3; text-align: center; }
.lb-close { position: absolute; top: 18px; right: 22px; width: 40px; height: 40px; border: 1px solid #4A453D; background: transparent; color: var(--paper); font-size: 26px; line-height: 1; }
.lb-close:hover { border-color: var(--red); color: #D9776A; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.hero-plate.reveal { transform: translateY(18px) rotate(1.1deg); }
.hero-plate.reveal.in { transform: rotate(1.1deg); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid > * { min-width: 0; }
  .hero-plate { max-width: 520px; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: none; }
  .prose { max-width: 760px; margin: 0 auto; }
  .atlas-body { grid-template-columns: 1fr; }
  .atlas-rail { display: flex; overflow-x: auto; max-height: none; border-right: 0; border-bottom: 1px solid #4A453D; }
  .stage-btn { min-width: 180px; border-bottom: 0; border-right: 1px solid #3A3731; }
  .stage-gate { display: none; }
  .route-grid { grid-template-columns: 1fr; }
  .gate-grid { grid-template-columns: 1fr 1fr; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .media-row { grid-template-columns: 1fr; }
  .ws-layout { grid-template-columns: 1fr; }
  .ws-output { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 76px; }
  .shell { width: calc(100% - 36px); }
  .masthead-inner { min-height: 64px; }
  .topnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
  }
  .topnav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .topnav a::after { display: none; }
  body.nav-open .topnav { display: flex; }
  .menu-btn { display: block; }
  .hero { padding-top: 34px; }
  .hero-meta span:nth-child(3) { display: none; }
  .hero-grid { padding: 44px 0 36px; gap: 42px; }
  .hero h1 { font-size: clamp(2.2rem, 11vw, 5rem); line-height: .92; letter-spacing: -.05em; }
  .hero-lede { max-width: 100%; }
  .hero-cn { margin-top: 22px; }
  .hero-bottom { font-size: 8px; }
  .hero-bottom span:last-child { display: none; }
  .manifesto { padding: 64px 0 52px; }
  .manifesto-grid { grid-template-columns: 1fr; margin-top: 42px; }
  .manifesto-grid article { padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .manifesto-grid article:last-child { border-bottom: 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 38px; }
  .section-note { text-align: left; }
  .article-section, .atlas-section, .routes-section, .gates-section, .cases-section, .worksheet-section { padding: 68px 0 76px; }
  .prose { font-size: 16.5px; line-height: 1.95; }
  .prose h2 { font-size: 23px; }
  .article-layout { gap: 0; }
  .atlas-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .atlas-tab { border-bottom: 1px solid #4A453D; font-size: 9px; padding: 13px 16px; }
  .atlas-tab:nth-child(2n) { border-right: 0; }
  .atlas-intro { padding: 14px 16px; font-size: 11.5px; }
  .atlas-detail { padding: 22px 18px 20px; min-height: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-title small { display: block; margin: 4px 0 0; }
  .atlas-foot { font-size: 8px; padding: 10px 14px; }
  .route-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .route-tab { white-space: nowrap; padding: 11px 14px; font-size: 9px; }
  .route-brief { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .brief-label { padding-top: 0; }
  .route-head, .route-list, .route-checks, .route-note { padding-left: 20px; padding-right: 20px; margin-left: 0; margin-right: 0; }
  .route-list, .route-checks { margin-top: 16px; }
  .route-note { margin-top: 16px; }
  .gate-grid { grid-template-columns: 1fr; }
  .gate { min-height: 0; }
  .gate-verdict { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .case-grid { grid-template-columns: 1fr; }
  .case-card:hover { transform: none; box-shadow: none; }
  .media-row { gap: 16px; }
  .audio-card, .demo-card { padding: 22px; }
  .ws-form { padding: 20px; }
  .ws-row.two { grid-template-columns: 1fr; gap: 0; }
  .ws-output-head { flex-direction: column; align-items: flex-start; }
  #wsPreview { min-height: 360px; padding: 16px; font-size: 9.5px; }
  .closing { padding: 76px 0 84px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; }
  .lightbox { padding: 16px; }
}

@media (max-width: 350px) {
  .masthead-inner { gap: 16px; }
  .brand { gap: 8px; }
  .brand-text strong { font-size: 9px; letter-spacing: .08em; }
  .brand-text em { font-size: 10px; }
  .menu-btn { padding: 7px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-plate, .hero-plate.reveal, .hero-plate.reveal.in { transform: none; }
}
