:root {
  color-scheme: light;
  --paper: #FAFAF8;
  --card: #FFFFFF;
  --line: #E5E7EB;
  --ink: #0F1E36;
  --body: #334155;
  --muted: #64748B;
  --gold: #B8934D;
  --gold-ink: #795923;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(18px, 4vw, 48px);
  --space: clamp(48px, 8vw, 96px);
}
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #08111F;
  --card: #0E1A2D;
  --line: #1E2E47;
  --ink: #F1F5F9;
  --body: #CBD5E1;
  --muted: #94A3B8;
  --gold: #D4AF6A;
  --gold-ink: #D4AF6A;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 6.5rem; }
body { background: var(--paper); color: var(--body); font: 1rem/1.6 var(--sans); margin: 0; }
h1, h2, h3, p, ol, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(3.1rem, 5.35vw, 4.65rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { font-size: clamp(2.05rem, 3.5vw, 3.15rem); line-height: 1.12; letter-spacing: -.035em; }
h3 { font-size: 1.55rem; line-height: 1.23; letter-spacing: -.023em; }
:root[lang="zh-CN"] {
  --display: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}
:lang(zh-CN):is(h1,h2,h3) { font-weight: 600; line-height: 1.24; letter-spacing: -.015em; }
:root[lang="zh-CN"] .wordmark strong { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif; }
:root[lang="zh-CN"] .philosophy { font-style: normal; font-weight: 500; }
:root[lang="zh-CN"] .ledger strong { font-weight: 600; }
:root[lang="zh-CN"] .principles li { font-weight: 500; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: fixed; z-index: 20; background: var(--card); padding: .5rem 1rem; }

/* The masthead keeps the same reading order on all five pages. */
.mast { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.mast-inner, .primary, .wordmark, .utilities, .seg, .actions, .access, .foot { display: flex; align-items: center; }
.mast-inner { min-height: 78px; justify-content: space-between; gap: 1rem; }
.wordmark { gap: 9px; flex-shrink: 0; line-height: 1; color: var(--ink); }
.wordmark strong { font: 600 1.08rem/1.1 var(--display); letter-spacing: .07em; }
.wordmark small { display: block; margin-top: 5px; font: .75rem/1 var(--sans); letter-spacing: .27em; }
.ai-init { color: var(--gold-ink); }
[data-theme="dark"] .wordmark img { background: #F4F2EC; padding: 3px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(184, 147, 77, .35); }
.primary { gap: clamp(12px, 1.65vw, 24px); }
.primary a { font-size: .88rem; padding: 8px 0 6px; border-bottom: 2px solid transparent; white-space: nowrap; }
.primary a[aria-current="page"] { border-color: var(--gold); font-weight: 600; color: var(--ink); }
.primary a:hover, .text-link:hover, .back:hover, .contents a:hover { color: var(--gold-ink); }
.utilities { gap: 9px; }
.seg { gap: 1px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.seg button { border: 0; background: transparent; border-radius: 4px; padding: .32rem .42rem; font-size: .78rem; line-height: 1.15; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button:hover:not([aria-pressed="true"]) { background: var(--line); }
.portal, .explore, .text-link, .back { font-size: .87rem; font-weight: 600; }
.portal { white-space: nowrap; color: var(--ink); }
.portal::after { content: "↗"; margin-inline-start: .35em; color: var(--gold-ink); }
.portal:hover, .explore:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero, .chapter { display: grid; align-items: center; gap: clamp(32px, 5vw, 70px); padding-block: var(--space); }
.hero { grid-template-columns: 1.13fr .87fr; }
.chapter { grid-template-columns: 1.6fr .8fr; }
.kicker, .index, .ticker, .period { font-family: var(--mono); }
.kicker { display: flex; align-items: center; gap: .7rem; color: var(--gold-ink); font-size: .8rem; font-weight: 600; letter-spacing: .1em; margin-bottom: 1.5rem; }
.kicker::before { content: ""; width: 30px; height: 1px; background: var(--gold); }
.philosophy { margin-block: 1.35rem .85rem; color: var(--ink); font: italic 1.35rem/1.45 var(--display); }
.intro { max-width: 62ch; line-height: 1.75; }
.chapter .intro { margin-top: 1.4rem; }
.actions, .access { gap: 24px; flex-wrap: wrap; margin-top: 1.7rem; }
.button { background: var(--ink); color: var(--paper); font-weight: 600; font-size: .9rem; padding: .7rem 1.15rem; border-radius: 6px; border: 1px solid var(--ink); }
.button:hover { border-color: var(--gold); }
.text-link { color: var(--ink); border-bottom: 1px solid var(--gold); }
.contents { border-top: 2px solid var(--gold); padding-top: .9rem; }
.contents h2 { color: var(--muted); font: 600 .83rem var(--sans); margin-bottom: .5rem; letter-spacing: .03em; }
.contents a { display: block; padding: .65rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }

/* A measured axonometric section through the arms and their shared axis. */
.plate { background: #101F33; color: #D8E2EB; padding: clamp(18px, 2.4vw, 36px); border-radius: 8px; }
.plate svg { display: block; width: 100%; height: auto; }
.plate .plane { fill: #233951; stroke: #9AABB8; }
.plate .side { fill: #15283B; stroke: #8299A9; }
.plate .mesh { fill: none; stroke: #667D91; stroke-width: .65; }
.plate .datum { fill: none; stroke: #708191; stroke-dasharray: 3 5; stroke-width: .8; }
.plate .leadline { fill: none; stroke: #B8934D; stroke-width: .9; }
.plate .orbit { fill: none; stroke: #D4AF6A; stroke-width: 2; }
.plate .gold-node { fill: #D4AF6A; }
.plate text { fill: #E6CE9C; font: 12px var(--mono); letter-spacing: 1.4px; }
.plate figcaption { font: .87rem/1.5 var(--display); color: #E4E8EB; border-top: 1px solid #49596A; margin-top: 14px; padding-top: 13px; }
.section { padding-block: var(--space); border-top: 1px solid var(--line); }
.section h2 { margin-bottom: clamp(22px, 3vw, 38px); }
.grid, .system-grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2, .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; padding: clamp(19px, 2.1vw, 28px); border: 1px solid var(--line); background: var(--card); border-radius: 8px; }
.card p { margin-top: .95rem; line-height: 1.65; }
.index, .ticker { display: inline-block; color: var(--gold-ink); font-size: .85rem; }
.card .index, .ticker { margin-bottom: 1.4rem; }
.ticker { align-self: flex-start; border: 1px solid var(--line); padding: .15rem .48rem; border-radius: 4px; }
.arm { display: flex; flex-direction: column; }
.arm h3 small { display: block; font-size: .86rem; margin-top: .4rem; letter-spacing: .06em; color: var(--muted); }
.arm h4 { color: var(--ink); font-size: .88rem; font-weight: 600; margin: 1.35rem 0 0; }
.arm p { margin: .45rem 0 1.6rem; }
.arm .explore { align-self: flex-start; margin-top: auto; }
.arm:focus-within, .arm:hover { border-color: var(--gold); }
.explore { color: var(--gold-ink); }
.callout { border-left: 2px solid var(--gold); padding: .45rem 0 .45rem 1.25rem; margin-top: 2rem; max-width: 80ch; }
.callout strong { color: var(--ink); }
.callout p { margin-top: .3rem; }
.ledger, .principles, .flow { list-style: none; padding: 0; }
.ledger li { display: grid; grid-template-columns: 50px 1.1fr .85fr 2fr; gap: 20px; align-items: baseline; padding: 20px 14px; border-top: 1px solid var(--line); }
.ledger strong { font: 1.35rem var(--display); color: var(--ink); }
.period { font-size: .85rem; color: var(--muted); }
.ledger li:last-child { background: var(--card); border-block: 1px solid var(--gold); }
.band { background: #0B1628; --ink: #F8FAFC; --body: #CBD5E1; --line: #344457; --gold-ink: #D4AF6A; color: var(--body); }
.spot-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 90px); }
.spot-grid .explore { display: inline-block; margin-top: 1.3rem; }
.system-grid > div { border-top: 1px solid var(--line); padding: .9rem 0; }
.system-grid h3 { font-size: 1.25rem; }
.system-grid > div > span { color: #AAB7C7; font-size: .9rem; }
.principles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 36px; }
.principles li { display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink); font: 1.3rem var(--display); }
.essay { max-width: 75ch; font-size: 1.08rem; line-height: 1.8; }
.essay + .essay { margin-top: 1em; }
.flow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.5rem; color: var(--ink); }
.flow li:not(:last-child)::after { content: "→"; margin-left: 10px; color: var(--gold-ink); }
.profile { display: flex; gap: clamp(20px, 4vw, 64px); background: #0B1628; color: #CBD5E1; border-radius: 8px; padding: clamp(24px, 4vw, 52px); }
.profile h3 { color: #F8FAFC; margin-bottom: .8rem; }
.monogram { font: 3.4rem/1 var(--display); color: #D4AF6A; }
.access { padding: 1.4rem; border: 1px solid var(--line); background: var(--card); border-radius: 8px; }
footer { border-top: 1px solid var(--line); }
.foot { justify-content: space-between; gap: 16px; min-height: 95px; }
.foot > span { font-family: var(--display); }
.foot i { color: var(--gold-ink); padding: 0 .35em; }

@media (max-width: 1000px) {
  .mast-inner { flex-wrap: wrap; padding: 12px 0 8px; gap: 8px 18px; }
  .primary { order: 3; width: 100%; }
  html { scroll-padding-top: 8rem; }
  .cols-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 740px) {
  .hero, .chapter, .spot-grid { grid-template-columns: 1fr; }
  .hero, .chapter { gap: 28px; }
  .plate { width: min(100%, 470px); }
  .cols-3 { grid-template-columns: 1fr; }
  .ledger li { grid-template-columns: 38px 1fr; gap: 4px 12px; }
  .ledger .period, .ledger li > span:last-child { grid-column: 2; }
}
@media (max-width: 600px) {
  .mast-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 0 8px; }
  .utilities { display: contents; }
  .wordmark { gap: 5px; margin-right: auto; }
  .wordmark img { width: 27px; height: 27px; }
  .wordmark strong { font-size: .86rem; letter-spacing: .025em; }
  .wordmark small { font-size: .65rem; margin-top: 2px; }
  .seg button { padding: 5px 5px; font-size: .74rem; }
  .primary { order: 3; flex: 1 1 auto; width: auto; flex-wrap: wrap; gap: 2px 12px; }
  .primary a, .mast .portal { font-size: .8rem; }
  .mast .portal { order: 4; margin-left: auto; padding: 4px 0; }
  .cols-2, .cols-4, .principles { grid-template-columns: 1fr; }
  .profile { flex-direction: column; }
  .foot { flex-wrap: wrap; padding: 20px 0; }
}
@media (max-width: 380px) {
  html { scroll-padding-top: 10rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .primary a, .arm, .button { transition: border-color .15s ease, color .15s ease; }
}
