@charset "utf-8";

/* ============================================================================
   347 bytes — design system
   ----------------------------------------------------------------------------
   0. tokens
   1. reset / base
   2. typography
   3. accessibility utilities
   4. masthead
   5. hero
   6. section shell
   7. components
   8. motion hooks
   9. responsive
  10. user preferences / print
   ========================================================================= */

/* == 1. tokens ============================================================ */

:root {
  /* — surfaces (cool near-black, 4 elevations) — */
  --bg:           #07080a;
  --surface-1:    #0b0d10;
  --surface-2:    #111419;
  --surface-3:    #181c22;

  /* — ink ramp (warm paper on cool ground) — */
  --text-1:       #f3f0e9;   /* 18.1:1 on bg — AAA */
  --text-2:       #bab6ad;   /*  9.6:1 — AAA */
  --text-3:       #918e87;   /*  5.6:1 — AA  */
  --text-4:       #6b6963;   /*  3.6:1 — decorative only */

  /* — hairlines — */
  --line:         rgba(243, 240, 233, 0.075);
  --line-mid:     rgba(243, 240, 233, 0.14);
  --line-strong:  rgba(243, 240, 233, 0.26);

  /* — signals: exactly two, used with restraint — */
  --accent:       #e4502a;
  --accent-text:  #ff7850;   /* 6.9:1 on bg — AA for text */
  --accent-wash:  rgba(228, 80, 42, 0.10);
  --accent-line:  rgba(228, 80, 42, 0.42);
  --ok:           #74c3a1;   /* 8.2:1 on bg */
  --ok-wash:      rgba(116, 195, 161, 0.10);

  /* — type — */
  --ff-serif:  "Instrument Serif", "Noto Serif SC Variable", "Songti SC", Georgia, serif;
  --ff-sans:   "Instrument Sans", "Noto Sans SC Variable", -apple-system,
               BlinkMacSystemFont, "Segoe UI", system-ui, "PingFang SC",
               "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --ff-mono:   "Geist Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas,
               "Liberation Mono", "Noto Sans SC Variable", monospace;

  --fs-meta:   clamp(0.6875rem, 0.68rem + 0.06vw, 0.75rem);
  --fs-small:  clamp(0.8125rem, 0.80rem + 0.10vw, 0.875rem);
  --fs-body:   clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --fs-lede:   clamp(1.0625rem, 0.98rem + 0.42vw, 1.3125rem);
  --fs-h3:     clamp(1.0625rem, 1rem + 0.30vw, 1.25rem);
  --fs-h2:     clamp(1.75rem, 1.28rem + 2.10vw, 3rem);
  --fs-num:    clamp(3.5rem, 1.5rem + 9.6vw, 9.5rem);

  /* — space (8px rhythm) — */
  --s-1: 0.5rem;  --s-2: 0.75rem; --s-3: 1rem;   --s-4: 1.5rem;
  --s-5: 2rem;    --s-6: 3rem;    --s-7: 4rem;   --s-8: 6rem;
  --s-9: 8rem;

  --gutter:  clamp(1.25rem, 4vw, 3.5rem);
  --shell:   1360px;
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* == 2. reset / base ====================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: 1.72;
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; border-spacing: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

::selection { background: var(--accent); color: #0a0a0a; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

:where(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  font-family: var(--ff-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* == 3. typography ======================================================== */

/* 中文需要更松的行距与更小的负字距；拉丁相反 */
:root:lang(zh-CN) body { line-height: 1.78; letter-spacing: 0.005em; }
:root:lang(en)    body { line-height: 1.68; letter-spacing: -0.006em; }

.mono {
  font-family: var(--ff-mono);
  font-feature-settings: "tnum" 1, "zero" 1, "ss01" 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.serif { font-family: var(--ff-serif); font-weight: 400; letter-spacing: 0; }

.kicker {
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}

strong, b { font-weight: 600; color: var(--text-1); }
em { font-style: italic; }

/* == 4. accessibility utilities =========================================== */

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 0; left: 0;
  z-index: 999;
  transform: translateY(-120%);
  background: var(--text-1);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border-radius: 0 0 2px 0;
  transition: transform 0.2s var(--ease);
}
.skip:focus { transform: translateY(0); }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

main:focus { outline: none; }

/* 触摸目标最小 44px */
button, [role="button"], a.btn { min-height: 44px; }

/* == 5. masthead ========================================================== */

.grain {
  position: fixed;
  inset: -60%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  will-change: transform;
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 100;
  pointer-events: none;
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.nav[data-stuck="true"] {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom-color: var(--line);
}

.nav-in {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-small);
  text-decoration: none;
  color: var(--text-1);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex: none;
}

.nav ul {
  display: flex;
  gap: 1.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav ul a {
  position: relative;
  display: inline-block;
  padding-block: 0.4rem;
  font-size: var(--fs-small);
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.35s var(--ease);
}
.nav ul a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--ease);
}
.nav ul a:hover { color: var(--text-1); }
.nav ul a:hover::after,
.nav ul a[aria-current="true"]::after { transform: scaleX(1); }
.nav ul a[aria-current="true"] { color: var(--text-1); }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  min-height: 36px;
  background: none;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.lang:hover { border-color: var(--line-strong); background: var(--surface-2); }
.lang-on { color: var(--text-1); }
.lang-off { color: var(--text-3); }
.lang-sep { color: var(--text-4); }

/* == 6. hero ============================================================== */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 8.5rem var(--s-8);
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 32rem at 84% 4%, var(--accent-wash), transparent 62%),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 6));
  -webkit-mask-image: linear-gradient(#000 0 58%, transparent 100%);
  mask-image: linear-gradient(#000 0 58%, transparent 100%);
  opacity: 0.85;
  pointer-events: none;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.hero-eyebrow .rule {
  width: clamp(28px, 6vw, 64px);
  height: 1px;
  background: var(--line-strong);
  flex: none;
}

.display {
  margin: 0;
  font-size: clamp(1.75rem, 1rem + 3.4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display .line {
  display: block;
  overflow: hidden;
  padding-block: 0.06em;
}
.display .line > span { display: inline-block; }

.display .numline {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.5rem, 1.5vw, 1.1rem);
  margin-top: clamp(0.4rem, 1.5vw, 1rem);
  line-height: 0.78;
}
.big {
  display: inline-block;
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: var(--fs-num);
  line-height: 0.74;
  letter-spacing: -0.045em;
  font-feature-settings: "lnum" 1;
  color: var(--text-1);
  will-change: transform, opacity;
}
.big-unit {
  font-family: var(--ff-mono);
  font-size: clamp(0.8125rem, 0.6rem + 0.9vw, 1.125rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--text-3);
  padding-bottom: clamp(0.4rem, 1.6vw, 1.4rem);
}

.lede {
  max-width: 30em;
  margin-top: clamp(1.75rem, 3.5vw, 2.75rem);
  font-size: var(--fs-lede);
  line-height: 1.66;
  color: var(--text-2);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: var(--line);
  border-block: 1px solid var(--line);
}
.facts > div {
  background: var(--bg);
  padding-block: var(--s-3);
  padding-right: var(--s-4);
}
.facts dt {
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.55rem;
}
.facts dd {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-2);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.facts dd.is-hash { font-family: var(--ff-mono); font-size: 0.72rem; color: var(--text-3); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  align-self: flex-start;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-block: 0.5rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.4s var(--ease);
}
.scroll-cue:hover { color: var(--text-1); }
.scroll-cue .arrow {
  width: 30px; height: 1px;
  background: currentColor;
  position: relative;
  flex: none;
}
.scroll-cue .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
}

/* == 7. section shell ===================================================== */

.sec {
  border-top: 1px solid var(--line);
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.sec--tint { background: var(--surface-1); }

.sec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 62rem) {
  .sec-grid {
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
  }
}

.sec-aside { align-self: start; }
@media (min-width: 62rem) {
  .sec-aside { position: sticky; top: 6.5rem; }
}
.sec-num {
  font-family: var(--ff-serif);
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent-text);
  margin-bottom: 0.5rem;
}
.sec-kicker {
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sec-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.sec-title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.018em;
  max-width: 22em;
}
.sec-sub {
  margin-top: var(--s-3);
  max-width: 34em;
  font-size: var(--fs-body);
  color: var(--text-2);
}

/* == 8. components ======================================================== */

/* — pull quote / framing — */
.pull {
  font-family: var(--ff-serif);
  font-size: clamp(1.375rem, 1rem + 1.6vw, 2.125rem);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--text-1);
  max-width: 24em;
  text-wrap: pretty;
}

/* — stat strip — */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.stat { background: var(--bg); padding: var(--s-3); }
.stat-v {
  display: block;
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-k {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  color: var(--text-3);
}

/* — archive tree — */
.tree {
  border: 1px solid var(--line-mid);
  background: linear-gradient(180deg, rgba(243, 240, 233, 0.02), transparent 45%);
  padding: clamp(1.25rem, 3vw, 1.9rem);
}
.tree-node {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-block: 0.4rem;
  font-size: var(--fs-small);
}
.tree-ico {
  width: 13px; height: 13px;
  border: 1px solid var(--text-3);
  border-radius: 2px;
  flex: none;
}
.tree-node--file .tree-ico { border-color: var(--accent); position: relative; }
.tree-node--file .tree-ico::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--accent);
  opacity: 0.6;
}
.tree-name { font-family: var(--ff-mono); color: var(--text-1); }
.tree-meta { margin-left: auto; font-family: var(--ff-mono); font-size: var(--fs-meta); color: var(--text-3); }
.tree-tag {
  font-family: var(--ff-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  border: 1px solid var(--accent-line);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  white-space: nowrap;
}
.tree-branch {
  width: 1px;
  height: 26px;
  margin-left: 6px;
  background: var(--line-mid);
  transform-origin: top;
}
.tree-node--file { padding-left: 22px; position: relative; }
.tree-node--file::before {
  content: "";
  position: absolute;
  left: 6px; top: 50%;
  width: 14px; height: 1px;
  background: var(--line-mid);
}
.tree-void {
  margin-left: 22px;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.03em;
  color: var(--text-3);
}

/* — scale comparison — */
.cmp { margin-top: clamp(2.5rem, 6vw, 4rem); }
.cmp-row {
  display: grid;
  grid-template-columns: minmax(8rem, 15rem) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding-block: 0.6rem;
}
.cmp-label { font-size: var(--fs-small); color: var(--text-2); }
.cmp-track { height: 2px; background: var(--line-mid); position: relative; overflow: hidden; }
.cmp-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: var(--text-3);
  transform-origin: 0 50%;
}
.cmp-bar--full { background: linear-gradient(90deg, var(--text-2), rgba(243, 240, 233, 0.08)); }
.cmp-val { font-family: var(--ff-mono); font-size: var(--fs-meta); color: var(--text-3); white-space: nowrap; }

/* — document block (readme) — */
.doc {
  margin: 0;
  border: 1px solid var(--line-mid);
  background:
    linear-gradient(180deg, rgba(243, 240, 233, 0.025), transparent 32%),
    var(--surface-1);
  box-shadow: 0 40px 90px -60px rgba(0, 0, 0, 0.95);
}
.doc-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem clamp(1rem, 2.4vw, 1.75rem);
  border-bottom: 1px solid var(--line);
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.doc-body {
  margin: 0;
  padding: clamp(1.35rem, 3.2vw, 2.75rem);
  font-family: var(--ff-mono);
  font-size: clamp(0.8125rem, 0.72rem + 0.42vw, 1rem);
  line-height: 2.1;
  color: #cfd2cd;
  overflow-wrap: anywhere;
}
mark.e {
  background-color: transparent;
  background-image: linear-gradient(var(--accent-wash), var(--accent-wash));
  background-size: var(--hl, 0%) 100%;
  background-repeat: no-repeat;
  background-position: 0 82%;
  color: #fff;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 1px;
}
mark.e::after {
  content: attr(data-n);
  font-size: 0.62em;
  font-weight: 600;
  color: var(--accent-text);
  vertical-align: super;
  margin-left: 0.2em;
  letter-spacing: 0;
}
mark.ok {
  background: none;
  color: var(--ok);
  border-bottom: 1px dotted rgba(116, 195, 161, 0.55);
  cursor: help;
}
.doc-foot {
  padding: 0.85rem clamp(1rem, 2.4vw, 1.75rem);
  border-top: 1px solid var(--line);
  font-size: var(--fs-meta);
  line-height: 1.7;
  color: var(--text-3);
}

/* — tables — */
.tbl-wrap { overflow-x: auto; }
.tbl {
  width: 100%;
  min-width: 38rem;
  font-size: var(--fs-small);
}
.tbl caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 0.9rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tbl th {
  text-align: left;
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line-mid);
  white-space: nowrap;
}
.tbl td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.65;
  color: var(--text-2);
}
.tbl tbody tr:hover { background: rgba(243, 240, 233, 0.022); }
.tbl .col-n { width: 2.6rem; color: var(--text-3); font-family: var(--ff-mono); font-size: var(--fs-meta); }
.tbl .is-code { font-family: var(--ff-mono); font-size: 0.78rem; }
.bad { color: var(--accent-text); border-bottom: 1px solid var(--accent-line); }
.good { color: var(--ok); }
.tbl--compact { min-width: 0; }
.tbl--compact td:first-child { width: 11rem; font-family: var(--ff-mono); color: var(--accent-text); }

/* — verdict block — */
.verdict {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
@media (min-width: 48rem) {
  .verdict { grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
}
.verdict-num {
  font-family: var(--ff-serif);
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  line-height: 0.85;
  letter-spacing: -0.035em;
  display: flex;
  align-items: baseline;
  gap: 0.08em;
}
.verdict-num .slash { color: var(--text-4); font-size: 0.5em; }
.verdict-num .den { font-size: 0.42em; color: var(--text-3); }
.verdict p { max-width: 32em; color: var(--text-2); }
.verdict p + p { margin-top: var(--s-3); }

/* — licence quote — */
.quote {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  padding: clamp(1.15rem, 3vw, 2rem);
  border-left: 2px solid var(--accent);
  background: var(--accent-wash);
}
.quote p {
  font-family: var(--ff-mono);
  font-size: var(--fs-small);
  line-height: 1.95;
  color: var(--text-2);
}
.quote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

/* — requirement list — */
.reqs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.reqs li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.req-mark {
  width: 1.65rem; height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent-text);
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  line-height: 1;
  flex: none;
}
.reqs h3 { font-size: var(--fs-h3); font-weight: 600; margin-bottom: 0.3rem; }
.reqs p { font-size: var(--fs-small); color: var(--text-2); max-width: 40em; }

/* — provenance list — */
.prov {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  background: var(--surface-1);
}
.prov dl { margin: 0; }
.prov-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 40rem) {
  .prov-row { grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); gap: 1.2rem; align-items: baseline; }
}
.prov-row:last-child { border-bottom: 0; }
.prov dt {
  font-family: var(--ff-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.prov dd {
  margin: 0;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.prov dd.is-ok { color: var(--ok); }

/* — json block — */
.json {
  margin: 0;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border: 1px solid var(--line-mid);
  background: #0a0c0e;
  font-family: var(--ff-mono);
  font-size: clamp(0.6875rem, 0.62rem + 0.30vw, 0.8125rem);
  line-height: 1.9;
  color: #c4c9c4;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

/* — clock — */
.clock {
  border-block: 1px solid var(--line);
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.clock-cap {
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: clamp(1rem, 2.4vw, 1.75rem);
}
.clock-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(1rem, 4vw, 3rem);
  flex-wrap: wrap;
}
.clock-d { display: flex; align-items: baseline; gap: clamp(0.6rem, 2vw, 1.5rem); }
.clock-d .u {
  display: flex;
  align-items: baseline;
  gap: 0.16em;
  font-size: clamp(3rem, 1rem + 8.4vw, 7.5rem);
}
.clock-d b {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: 1em;
  line-height: 0.78;
  letter-spacing: -0.04em;
  font-feature-settings: "lnum" 1;
}
.clock-d i {
  font-style: normal;
  font-size: 0.18em;
  font-weight: 500;
  line-height: 1;
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.clock-t {
  display: flex;
  align-items: baseline;
  gap: 0.04em;
  font-family: var(--ff-mono);
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
  font-weight: 400;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.clock-t .cksec { color: var(--text-1); transition: opacity 0.5s var(--ease); }
.clock-t i { font-style: normal; color: var(--text-4); margin-inline: 0.1em; }

.clock-bar {
  height: 1px;
  background: var(--line-mid);
  position: relative;
  overflow: hidden;
  margin-top: clamp(1.25rem, 2.8vw, 2rem);
}
.clock-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--accent);
}

.clock-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  margin-top: 1rem;
  font-family: var(--ff-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.clock-meta .cal { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-2); }
.cal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-4);
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.clock[data-cal="ok"] .cal-dot { background: var(--ok); box-shadow: 0 0 10px rgba(116, 195, 161, 0.6); }
.clock[data-cal="fail"] .cal-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent-line); }
.clock-meta .sep { color: var(--text-4); }
.clock-note {
  margin-top: 1.1rem;
  font-size: var(--fs-meta);
  line-height: 1.7;
  color: var(--text-3);
  max-width: 56em;
}

/* — timeline — */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before {
  content: "";
  position: absolute;
  left: 3px; top: 0.5rem; bottom: 1.5rem;
  width: 1px;
  background: var(--line-mid);
  transform-origin: top;
  transform: scaleY(var(--tl, 1));
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  padding: 1.35rem 0 1.35rem 2.25rem;
}
@media (min-width: 40rem) {
  .tl-item { grid-template-columns: 9rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); align-items: start; }
}
.tl-item + .tl-item { border-top: 1px solid var(--line); }
.tl-dot {
  position: absolute;
  left: 0; top: 1.85rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-date {
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding-top: 0.15rem;
}
.tl-body h3 { font-size: var(--fs-h3); font-weight: 600; margin-bottom: 0.35rem; }
.tl-body h3.mono { font-family: var(--ff-mono); font-size: 0.8rem; }
.tl-body p { font-size: var(--fs-small); color: var(--text-2); max-width: 40em; }

/* — buttons — */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--line-mid);
  border-radius: 2px;
  background: none;
  color: var(--text-1);
  font-size: var(--fs-small);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.btn .mono { font-size: 0.66rem; color: var(--text-3); }
.btn--ghost { color: var(--text-2); }

/* — code — */
.code-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 56rem) { .code-grid { grid-template-columns: 1fr 1fr; } }
.code { border: 1px solid var(--line-mid); background: #0a0c0e; min-width: 0; }
.code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.code-bar .kicker { font-size: 0.625rem; }
.copy {
  border: 1px solid var(--line-mid);
  border-radius: 2px;
  background: none;
  color: var(--text-2);
  font-family: var(--ff-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.copy:hover { color: var(--text-1); border-color: var(--line-strong); }
.copy[data-done="true"] { color: var(--ok); border-color: rgba(116, 195, 161, 0.5); background: var(--ok-wash); }
.code pre { margin: 0; padding: 1rem 0.9rem; overflow-x: auto; }
.code code {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: #c4c9c4;
  white-space: pre;
  tab-size: 2;
}

/* — closing — */
.closing p {
  font-size: var(--fs-lede);
  line-height: 1.68;
  color: var(--text-2);
  max-width: 30em;
}
.closing p + p { margin-top: var(--s-4); }
.closing strong { color: var(--text-1); }

.note {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  background: var(--surface-1);
}
.note p { font-size: var(--fs-meta); line-height: 1.8; color: var(--text-3); }
.note strong { color: var(--text-2); }

/* — footer — */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface-1);
  padding-block: clamp(2.5rem, 6vw, 4rem) var(--s-5);
}
.foot-grid { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 48rem) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot h2 {
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.9rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.foot li { font-size: var(--fs-small); color: var(--text-2); }
.foot a {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.foot a:hover { color: var(--text-1); border-bottom-color: var(--accent); }
.foot-end {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--ff-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.05em;
  color: var(--text-3);
}

/* == 9. motion hooks ====================================================== */

html.js .reveal { opacity: 0; }
html.js .display .line > span { transform: translateY(105%); }
html.js .tree-node,
html.js .tree-branch,
html.js .tree-void { opacity: 0; }
html.js .doc-body { opacity: 0; }
html.js .cmp-bar { transform: scaleX(0); }
html.js .tl { --tl: 0; }

/* == 10. responsive ======================================================= */

@media (max-width: 62rem) {
  .nav ul { display: none; }
}

@media (max-width: 40rem) {
  .hero { min-height: auto; padding-block: 7rem var(--s-7); }
  .clock-body { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .cmp-row { grid-template-columns: 1fr auto; gap: 0.35rem 1rem; }
  .cmp-track { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr; }
  .facts > div { padding-right: 0; }
}

/* == 11. user preferences / print ========================================= */

@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .tree-node,
  html.js .tree-branch,
  html.js .tree-void,
  html.js .doc-body { opacity: 1 !important; transform: none !important; }
  html.js .display .line > span { transform: none !important; }
  html.js .cmp-bar { transform: scaleX(1) !important; }
  html.js .tl { --tl: 1 !important; }
  mark.e { --hl: 100% !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(243, 240, 233, 0.22);
    --line-mid: rgba(243, 240, 233, 0.34);
    --line-strong: rgba(243, 240, 233, 0.5);
    --text-2: #d8d4cb;
    --text-3: #b4b0a7;
  }
}

@media (forced-colors: active) {
  .progress, .grain { display: none; }
  .btn, .copy, .lang { border: 1px solid ButtonBorder; }
}

@media print {
  :root { --bg: #fff; --text-1: #000; --text-2: #222; --text-3: #444; --line: #ccc; --line-mid: #bbb; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .nav, .progress, .grain, .scroll-cue, .actions, .copy, .lang { display: none !important; }
  .sec, .hero { break-inside: auto; padding-block: 1.5rem; }
  .doc, .tree, .prov, .json, .code { break-inside: avoid; border-color: #999; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* == 12. inline code & misc (rewrite additions) =========================== */

code {
  font-family: var(--ff-mono);
  font-size: 0.9em;
  background: rgba(243, 240, 233, 0.065);
  padding: 0.08em 0.34em;
  border-radius: 2px;
  overflow-wrap: anywhere;
}
pre code, .json code {
  background: none;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
  overflow-wrap: normal;
}
.json { border-radius: 0; }

.sec-main { min-width: 0; }

/* 二级行内说明 */
p > code, dd > code { color: var(--text-1); }

/* 列表在 sematic 结构下的缩进归零 */
ul, ol { margin: 0; }

/* 关键词高亮但不过度着色 */
.bad, .good { font-weight: 500; }

@media (max-width: 40rem) {
  .display { letter-spacing: -0.01em; }
  .big { letter-spacing: -0.03em; }
}

/* == 13. byte matrix (411 bytes as 411 cells) ============================= */

.bytegrid {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 42rem;
}
.byte {
  aspect-ratio: 1;
  background: rgba(243, 240, 233, 0.16);
  border-radius: 1px;
}
.byte--space { background: rgba(243, 240, 233, 0.07); }
.byte--err { background: var(--accent); box-shadow: 0 0 6px var(--accent-line); }
.byte--ok  { background: var(--ok); }

@media (max-width: 48rem) {
  .bytegrid { grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2.5px; }
}

/* == 14. footer integrity panel (low emphasis) =========================== */

.integrity {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.integrity h2 { margin-bottom: 0.75rem; }
.integrity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.verify-btn {
  min-height: 32px;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: none;
  color: var(--text-3);
  font-family: var(--ff-mono);
  font-size: 0.625rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.verify-btn:hover:not(:disabled) { color: var(--text-2); border-color: var(--line-mid); }
.verify-btn:disabled { opacity: 0.5; cursor: progress; }

.verify-summary {
  font-family: var(--ff-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--text-4);
}
.verify-summary[data-state="ok"] { color: var(--ok); }
.verify-summary[data-state="bad"] { color: var(--accent-text); }

.verify-bar {
  height: 1px;
  background: var(--line);
  margin-top: 0.75rem;
  position: relative;
  overflow: hidden;
}
.verify-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--text-3);
  transition: width 0.2s linear;
}

.verify-out {
  margin: 0.85rem 0 0;
  max-height: 11rem;
  overflow: auto;
  font-family: var(--ff-mono);
  font-size: 0.625rem;
  line-height: 1.75;
  color: var(--text-4);
  white-space: pre;
}
