/* ============================================================================
   ISOT — Intelligence Standards of Tomorrow / 伊索特SI研究院
   Bilingual edition · Rev B · 2026-10-18
   ----------------------------------------------------------------------------
   Style: NIGHT STUDIO (design-lab) — a deep blue-black instrument bay:
   one 16-column hairline grid phase-locked to the left lane, index numerals
   cut by the section rule, mono readouts, a graduated rail that doubles as
   the index, and a single signal colour (volt yellow #d7fb3d).

   Measured contrast (WCAG 2.1, sRGB relative luminance; worst case = text on
   the lifted panel #101c2b):
     --ink-hi #eaf1fa 15.09:1 · --ink #b3c2d4 9.47:1 · --ink-dim #8296ae 5.66:1
     --volt #d7fb3d 14.52:1 · --volt-ink #0a1206 on --volt 16.11:1
   No external requests: typefaces are local woff2 files + system stacks.
   ========================================================================= */

/* --------------------------------------------------------------- 01 fonts */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/IBMPlexMono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/IBMPlexMono-500.woff2") format("woff2");
}

/* -------------------------------------------------------------- 02 tokens */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #03070d;
  --bg-1: #071019;
  --panel: #0b1521;
  --panel-2: #101c2b;

  /* hairlines */
  --line: rgba(150, 186, 224, 0.14);
  --line-2: rgba(214, 232, 255, 0.3);
  --grid: rgba(150, 186, 224, 0.05);

  /* ink */
  --ink-hi: #eaf1fa;
  --ink: #b3c2d4;
  --ink-dim: #8296ae;

  /* signal */
  --volt: #d7fb3d;
  --volt-deep: #c3e92a;
  --volt-ink: #0a1206;
  --volt-wash: rgba(215, 251, 61, 0.1);

  /* type: 3 roles — display DIN-ish, text Inter, readouts Plex Mono */
  --f-display: "Bahnschrift", "DIN Alternate", "Franklin Gothic Medium",
    "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-text: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", "Consolas", "Cascadia Mono", "SFMono-Regular",
    "DejaVu Sans Mono", ui-monospace, monospace;

  /* scale — every step is 12px x 1.25^n */
  --t1: 12px;
  --t2: 15px;
  --t3: 19px;
  --t4: 23px;
  --t5: 29px;
  --t6: clamp(29px, 3.2vw, 37px);
  --t7: clamp(36px, 5vw, 64px);
  --t8: clamp(84px, 13vw, 190px);

  /* space — 4px base */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* layout — the lane is the first text column, not the shell's outer edge */
  --shell: 1240px;
  --gutter: clamp(18px, 3.4vw, 40px);
  --lane-x: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  --col: 6.25%;
  --gcol: 72px;
  --nav-h: 60px;

  /* section rhythm — deliberately unequal */
  --pad-hero: clamp(40px, 5vw, 64px);
  --pad-sec: clamp(56px, 7vw, 104px);

  /* motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 160ms;
  --dur-2: 280ms;
  --dur-3: 480ms;
  --log-step: 600ms;

  font-synthesis: none;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--t2);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* the measuring grid: sixteen columns phase-locked to the left lane */
.grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--lane-x);
  right: var(--lane-x);
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px);
  background-size: var(--col) var(--gcol);
  background-position: 0 0;
}

/* the two structural lanes sit exactly on the first / last text column */
.lane {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
  z-index: 0;
}
.lane--l { left: var(--lane-x); }
.lane--r { right: var(--lane-x); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ink-hi);
  line-height: 1.04;
  letter-spacing: -0.022em;
}
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
figure { margin: 0; }

::selection { background: var(--volt); color: var(--volt-ink); }

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------- 04 a11y helpers + text */
.skip {
  position: absolute;
  left: var(--lane-x);
  top: -80px;
  z-index: 90;
  padding: 12px 18px;
  background: var(--volt);
  color: var(--volt-ink);
  font: 600 var(--t1) / 1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top var(--dur-1) var(--ease-out);
}
.skip:focus { top: 12px; }

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

.lede {
  font-size: clamp(16px, 1.35vw, 18.75px);
  line-height: 1.62;
  color: var(--ink-hi);
  max-width: 46ch;
}
.volt { color: var(--volt); }
.sp { flex: 1 1 auto; }

h1, h2, h3, .runline b, .tname { text-wrap: balance; }
.lede, .sec-intro, .term dd, .req p, .foot-v, .log-line { text-wrap: pretty; }

/* ------------------------------------------------------- 05 layout shell */
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sec {
  position: relative;
  border-top: 1px solid var(--line);
}
.sec--hero { border-top: 0; }

/* graduation ticks where a section border meets the lanes */
.sec::before,
.sec::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 1px;
  height: 8px;
  background: var(--line-2);
  z-index: 2;
  pointer-events: none;
}
.sec::before { left: var(--lane-x); }
.sec::after { right: var(--lane-x); }
.sec--hero::before,
.sec--hero::after { display: none; }

/* section head — index numeral on the rail, then the title block */
.sec-head { margin-bottom: clamp(28px, 4vw, 52px); }
.sec-meta {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-dim);
}
.sec-num {
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  flex: 0 0 auto;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(38px, 4.4vw, 56px);
  line-height: 0.8;
  letter-spacing: -0.03em;
  color: var(--ink-hi);
  font-variant-numeric: tabular-nums;
}
.sec-num i {
  font: 400 11px/1 var(--f-mono);
  font-style: normal;
  letter-spacing: 0.1em;
  color: var(--volt);
  padding-top: 4px;
}
.sec-name,
.sec-note {
  font-family: var(--f-mono);
  font-size: var(--t1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.sec-name { color: var(--ink); }
.sec-rule {
  flex: 1 1 auto;
  height: 1px;
  min-width: var(--s4);
  background: var(--line);
  align-self: center;
}
.sec-body {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  margin-top: clamp(20px, 2.6vw, 34px);
}
.sec-body h2 {
  grid-column: 1 / 10;
  font-size: var(--t6);
  max-width: 24ch;
}
.sec-intro {
  grid-column: 11 / 17;
  align-self: end;
  font-size: var(--t2);
  color: var(--ink-dim);
  max-width: 58ch;
}
.sec-body--wide h2 {
  grid-column: 1 / 14;
  font-size: var(--t7);
  letter-spacing: -0.028em;
  max-width: 22ch;
}
.sec-body--wide .sec-intro {
  grid-column: 1 / 9;
  margin-top: var(--s4);
  max-width: 52ch;
}

/* ------------------------------------------------------------------ 06 nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 13, 0.86);
  backdrop-filter: blur(12px);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  height: var(--nav-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-hi);
  flex: 0 0 auto;
}
.brand-dot {
  width: 9px;
  height: 9px;
  background: var(--volt);
  box-shadow: 0 0 10px rgba(215, 251, 61, 0.55);
  flex: 0 0 auto;
  transition: transform var(--dur-2) var(--ease-out);
}
.brand:hover .brand-dot,
.brand:focus-visible .brand-dot { transform: scale(1.35); }
.brand-name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--t3);
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-sub {
  font: 400 11px/1 var(--f-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.nav-links a:not(.btn):not(.lang) {
  position: relative;
  font-family: var(--f-mono);
  font-size: var(--t1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 6px 0;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease-out);
}
.nav-links a:not(.btn):not(.lang)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--volt);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-2) var(--ease-out);
}
.nav-links a:not(.btn):not(.lang):hover,
.nav-links a:not(.btn):not(.lang):focus-visible { color: var(--ink-hi); }
.nav-links a:not(.btn):not(.lang):hover::after,
.nav-links a:not(.btn):not(.lang):focus-visible::after,
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.nav-links a[aria-current="true"] { color: var(--ink-hi); }

/* language toggle — the bilingual switch */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 var(--t1) / 1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--volt);
  text-decoration: none;
  border: 1px solid rgba(215, 251, 61, 0.35);
  padding: 7px 11px;
  white-space: nowrap;
  transition: background var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out);
}
.lang:hover, .lang:focus-visible {
  background: var(--volt);
  color: var(--volt-ink);
}
.lang i {
  font-style: normal;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.lang:hover i, .lang:focus-visible i { color: var(--volt-ink); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--volt);
  color: var(--volt-ink);
  background: var(--volt);
  transition: background var(--dur-1) var(--ease-out);
}
.btn:hover, .btn:focus-visible { background: var(--volt-deep); border-color: var(--volt-deep); }
.btn--ghost {
  background: transparent;
  color: var(--ink-hi);
  border-color: var(--line-2);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: var(--panel);
  border-color: var(--volt);
  color: var(--volt);
}

/* reading progress hairline under the nav */
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--volt);
  z-index: 61;
}

/* --------------------------------------------------------------- 07 hero */
.hero { padding: var(--pad-hero) 0 0; }
.hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: var(--t1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--line);
}
.hero-top .live { color: var(--volt); }
.hero-top .live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--volt);
  margin-right: 8px;
  box-shadow: 0 0 8px rgba(215, 251, 61, 0.6);
}

.hero-mark {
  position: relative;
  margin: clamp(20px, 3vw, 36px) 0 var(--s4);
}
.ghost {
  position: absolute;
  right: 0;
  top: -0.18em;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--t8);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(150, 186, 224, 0.16);
  pointer-events: none;
  user-select: none;
}
.mark { display: flex; gap: clamp(6px, 1.6vw, 18px); }
.mark .lt {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.mark .callout {
  font-family: var(--f-mono);
  font-size: clamp(8px, 1.1vw, 11px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  padding-bottom: 8px;
}
.mark .leader {
  width: 1px;
  height: clamp(10px, 2vw, 18px);
  background: var(--line-2);
  margin-bottom: 2px;
}
.mark b {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(64px, 15vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--ink-hi);
}
.mark .lt:nth-child(2) b { color: var(--volt); }
.markwrap { width: fit-content; position: relative; }
.dim {
  position: relative;
  height: 14px;
  margin: 6px 0 clamp(20px, 3vw, 30px);
}
.dim::before {
  content: "";
  position: absolute;
  top: 6px; left: 0; right: 0;
  height: 1px;
  background: var(--ink-dim);
}
.dim i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 14px;
  background: var(--ink-dim);
}
.dim i:first-child { left: 0; }
.dim i:last-child { right: 0; }
.dim .fig {
  position: absolute;
  right: 0; bottom: -16px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}

.hero-name {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s4);
}
.hero-name .fullname {
  font-family: var(--f-display);
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-hi);
}
.hero-name .zhname {
  font-family: var(--f-display);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 600;
  color: var(--volt);
}
.hero-name .zhname::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  background: var(--line-2);
  margin-right: var(--s4);
  vertical-align: -0.08em;
}
.hero .lede { margin-bottom: var(--s3); }
.hero .egg {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: clamp(24px, 3vw, 36px);
}
.hero .egg b { color: var(--volt); font-weight: 500; }

/* fact rail — INPUT / STRUCTURE / OUTPUT */
.factrail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
  margin-bottom: clamp(24px, 3vw, 36px);
}
.fact {
  background: var(--bg);
  padding: var(--s4) var(--s4) var(--s4) 0;
}
.fact:not(:first-child) { padding-left: var(--s4); }
.fact .k {
  display: block;
  font: 500 10px/1 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--volt);
  margin-bottom: 8px;
}
.fact .v {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}

/* CTA row */
.cta-row {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.cta-row .cursor { color: var(--volt); margin-left: 2px; }

/* console — c-bar + log stream + readout rail */
.console {
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  margin-bottom: var(--s7);
}
.c-bar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s4);
  border-bottom: 1px solid var(--line);
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--panel);
}
.c-bar .dot {
  width: 7px; height: 7px;
  background: var(--volt);
  box-shadow: 0 0 8px rgba(215, 251, 61, 0.55);
}
.c-bar b { color: var(--ink); font-weight: 500; }
.c-bar .sp { flex: 1 1 auto; }
.log {
  padding: var(--s3) var(--s4);
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.9;
}
.log-line {
  display: grid;
  grid-template-columns: 4.5em 1fr auto;
  gap: var(--s3);
  align-items: baseline;
  color: var(--ink-dim);
  padding: 3px 0;
  border-bottom: 1px solid rgba(150, 186, 224, 0.07);
}
.log-line:last-child { border-bottom: 0; }
.log-line .tag {
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.log-line .msg { color: var(--ink); }
.log-line .rd {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  white-space: nowrap;
}
.log-line.is-done .tag,
.log-line.is-done .rd { color: var(--volt); }
.log-line.is-run { color: var(--ink-hi); }
.log-line.is-run .msg { color: var(--ink-hi); }
.log-line .bar {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.log-line.is-run .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--volt);
  transform-origin: left center;
  animation: logfill var(--log-step) linear forwards;
}
@keyframes logfill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.readout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.readout .cell {
  background: var(--panel);
  padding: 12px var(--s4);
}
.readout .k {
  display: block;
  font: 500 10px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.readout .v {
  font-family: var(--f-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--volt);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.readout .v small {
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
  margin-left: 6px;
}

/* --------------------------------------------------- 08 ledger (index rows) */
.ledger { border-top: 1px solid var(--ink-dim); }
.lrow {
  display: grid;
  grid-template-columns: 22px 7.5em 1fr auto;
  gap: var(--s4);
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-1) var(--ease-out);
}
.lrow:hover, .lrow:focus-visible { background: var(--panel); }
.lrow .tick {
  position: relative;
  height: 100%;
  min-height: 18px;
}
.lrow .tick::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 9px;
  height: 1px;
  background: var(--ink-dim);
  transition: width var(--dur-2) var(--ease-out),
    background var(--dur-1) var(--ease-out);
}
.lrow:hover .tick::before,
.lrow:focus-visible .tick::before { width: 21px; background: var(--volt); }
.lrow .code {
  font: 500 12px/1.4 var(--f-mono);
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-transform: uppercase;
  transition: color var(--dur-1) var(--ease-out);
}
.lrow:hover .code, .lrow:focus-visible .code { color: var(--volt); }
.lrow .tname {
  font-family: var(--f-display);
  font-size: var(--t3);
  font-weight: 600;
  color: var(--ink-hi);
  letter-spacing: -0.01em;
}
.lrow .tname small {
  display: block;
  font-family: var(--f-text);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-dim);
  letter-spacing: 0;
  margin-top: 3px;
  max-width: 62ch;
}
.lrow .reading {
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.lrow:hover .reading, .lrow:focus-visible .reading { color: var(--volt); }
.lrow .reading.on { color: var(--volt); }

/* ------------------------------------------------------ 09 terms / reqs */
.term {
  margin-bottom: var(--s5);
  max-width: 68ch;
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: var(--s4);
}
.term .tno {
  font: 500 13px/1.6 var(--f-mono);
  color: var(--volt);
}
.term dt {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink-hi);
  letter-spacing: -0.01em;
}
.term dt .en {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-dim);
  margin-left: 10px;
  letter-spacing: 0.02em;
}
.term dd {
  margin: 4px 0 0;
  color: var(--ink);
}
.term .note {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-dim);
}
.term .note b { font-weight: 500; }

.req {
  margin-bottom: var(--s5);
  max-width: 68ch;
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: var(--s4);
}
.req .rno {
  font: 500 13px/1.6 var(--f-mono);
  color: var(--volt);
}
.req p { font-size: 16.5px; color: var(--ink-hi); }
.req p b { font-weight: 600; }
.req .why {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: var(--ink-dim);
}

/* ------------------------------------------------------- 10 spec tables */
.specnote {
  font-size: 14px;
  color: var(--ink-dim);
  margin-bottom: var(--s4);
  max-width: 58ch;
}
table.spec {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--ink-dim);
}
table.spec th {
  font: 500 11px/1 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-align: left;
  padding: 10px var(--s4) 10px 0;
  border-bottom: 1px solid var(--line);
}
table.spec td {
  padding: 13px var(--s4) 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 15.5px;
}
table.spec td:first-child {
  font: 500 13px/1.5 var(--f-mono);
  white-space: nowrap;
  color: var(--ink-hi);
}
table.spec tr:last-child td { border-bottom: 1px solid var(--ink-dim); }
@media(max-width:560px) {
  table.spec thead { display: none; }
  table.spec td { display: block; width: 100%; padding: 10px 0 9px; }
  table.spec td:first-child { padding-bottom: 2px; border-bottom: none; }
  table.spec tr { border-bottom: 1px solid var(--line); }
  table.spec tr:last-child td { border-bottom: 1px solid var(--ink-dim); }
  table.spec td:last-child { padding-top: 2px; }
}

/* ------------------------------------------------------ 11 field cards */
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.field {
  background: var(--bg);
  padding: var(--s5) var(--s4) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-width: 0;
}
.field .fno {
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.16em;
  color: var(--volt);
  text-transform: uppercase;
}
.field h3 {
  font-size: var(--t4);
  letter-spacing: -0.015em;
}
.field h3 .en {
  display: block;
  font: 400 12px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 7px;
}
.field p { font-size: 14.5px; color: var(--ink); }
.field .fstat {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.field .fstat b { color: var(--volt); font-weight: 500; }

/* ------------------------------------------------------ 12 journal log */
.jlist { border-top: 1px solid var(--ink-dim); }
.jentry {
  display: grid;
  grid-template-columns: 8.5em 5.5em 1fr;
  gap: var(--s4);
  padding: var(--s5) 0;
  border-bottom: 1px solid var(--line);
}
.jentry .jdate {
  font: 500 13px/1.5 var(--f-mono);
  color: var(--ink-hi);
  font-variant-numeric: tabular-nums;
}
.jentry .jrev {
  font: 500 12px/1.5 var(--f-mono);
  letter-spacing: 0.1em;
  color: var(--volt);
  text-transform: uppercase;
}
.jentry h3 {
  font-size: var(--t3);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.jentry p { font-size: 14.5px; color: var(--ink); max-width: 62ch; }
.jentry .jtags {
  display: flex;
  gap: var(--s2);
  margin-top: 10px;
  flex-wrap: wrap;
}
.jentry .jtag {
  font: 500 10px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--volt);
  border: 1px solid rgba(215, 251, 61, 0.35);
  padding: 6px 8px;
}

/* ------------------------------------------------------ 13 contact card */
.mailbig {
  display: inline-block;
  font: 500 clamp(19px, 3.4vw, 28px) / 1.2 var(--f-mono);
  color: var(--ink-hi);
  text-decoration: none;
  border-bottom: 2px solid var(--volt);
  padding-bottom: 4px;
  transition: color var(--dur-1) var(--ease-out);
}
.mailbig:hover, .mailbig:focus-visible { color: var(--volt); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.contact-grid .note {
  font-size: 14.5px;
  color: var(--ink-dim);
  margin-top: var(--s4);
  max-width: 52ch;
}

/* ------------------------------------------------------ 14 title block */
.tblock-wrap { margin: clamp(56px, 8vw, 96px) 0 0; }
.tblock {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.2fr;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 12px;
}
.tblock .cell {
  background: var(--bg-1);
  padding: 10px 12px;
  min-width: 0;
}
.tblock .k {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 3px;
}
.tblock .v { font-weight: 500; color: var(--ink-hi); }
.tblock .v .zh {
  font-family: var(--f-text);
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-dim);
  display: block;
  margin-top: 2px;
}

/* ------------------------------------------------------ 15 footer */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  margin-top: var(--s7);
  padding: var(--s6) 0 var(--s7);
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s5);
  margin-bottom: var(--s6);
}
.foot-v .k {
  display: block;
  font: 500 10px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--volt);
  margin-bottom: 8px;
}
.foot-v p, .foot-v a { font-size: 13.5px; color: var(--ink); }
.foot-v a { color: var(--ink-hi); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.foot-v a:hover { color: var(--volt); border-bottom-color: var(--volt); }
.foot-base {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font: 400 11px/1.6 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ------------------------------------------------------ 16 reveal */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; }
  [data-reveal].is-rise { animation: rise var(--dur-3) var(--ease-out) forwards; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  [data-reveal].is-in { opacity: 1; }
  .mark .leader { transform: scaleY(0); animation: drop 0.5s ease forwards; }
  .mark .lt:nth-child(1) .leader { animation-delay: 0.15s; }
  .mark .lt:nth-child(2) .leader { animation-delay: 0.28s; }
  .mark .lt:nth-child(3) .leader { animation-delay: 0.41s; }
  .mark .lt:nth-child(4) .leader { animation-delay: 0.54s; }
  .mark .callout { opacity: 0; animation: fade 0.4s ease forwards; }
  .mark .lt:nth-child(1) .callout { animation-delay: 0.1s; }
  .mark .lt:nth-child(2) .callout { animation-delay: 0.23s; }
  .mark .lt:nth-child(3) .callout { animation-delay: 0.36s; }
  .mark .lt:nth-child(4) .callout { animation-delay: 0.49s; }
  .dim::before { transform: scaleX(0); animation: rule 0.6s 0.5s ease forwards; }
  .dim i { transform: scaleY(0); animation: drop 0.3s 0.55s ease forwards; }
  @keyframes drop { to { transform: scaleY(1); } }
  @keyframes rule { to { transform: scaleX(1); } }
  @keyframes fade { to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------ 17 responsive */
@media(max-width: 900px) {
  .nav-in { height: auto; padding-block: 10px; flex-wrap: wrap; }
  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .sec-body { grid-template-columns: 1fr; }
  .sec-body h2, .sec-body--wide h2 { grid-column: 1; max-width: 26ch; }
  .sec-intro, .sec-body--wide .sec-intro { grid-column: 1; margin-top: var(--s4); }
  .contact-grid { grid-template-columns: 1fr; }
  .factrail { grid-template-columns: 1fr; }
  .fact { padding-left: 0 !important; border-top: 1px solid var(--line); }
  .fact:first-child { border-top: 0; }
}
@media(max-width: 768px) {
  .fields { grid-template-columns: 1fr; }
  .readout { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .jentry { grid-template-columns: 1fr; gap: var(--s2); }
}
@media(max-width: 640px) {
  .brand-sub { display: none; }
  .mark { gap: 4px; }
  .tblock { grid-template-columns: 1fr 1fr; }
}
@media(max-width: 560px) {
  .readout { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .log-line { grid-template-columns: 4.2em 1fr; }
  .log-line .rd { grid-column: 2; }
  .lrow { grid-template-columns: 16px 1fr; }
  .lrow .code { grid-column: 2; }
  .lrow .tname { grid-column: 2; }
  .lrow .reading { grid-column: 2; }
  .term, .req { grid-template-columns: 1fr; gap: var(--s1); }
  .term .tno, .req .rno { margin-bottom: 2px; }
}

/* ---------------------------------------------- 18 sec-body col utilities */
.sec-col { grid-column: 1 / 12; }
.sec-col-full { grid-column: 1 / -1; }
