/* GEO 先生 — site styles
   Palette sampled from the portrait: night fog, archive paper, gas-lamp amber (accent only). */

:root {
  --ink: #0c1218;
  --ink-2: #131c25;
  --ink-3: #1c2834;
  --ink-line: rgba(214, 223, 231, 0.14);
  --fog: #8d9aa6;
  --fog-2: #b8c2cb;
  --mist: #e3e8ec;

  --paper: #eeebe4;
  --paper-2: #e6e2d9;
  --card: #f6f4ef;
  --text: #131a21;
  --text-2: #3f4a55;
  --text-3: #66717c;
  --line: rgba(19, 26, 33, 0.13);
  --line-2: rgba(19, 26, 33, 0.26);

  --lamp: #e0a458;
  --lamp-ink: #8a5a1e;

  --sig-own: #2b4c6e;
  --sig-third: #4f6b5c;
  --sig-stale: #b07a22;
  --sig-guess: #a3452d;

  --serif-tc: "Noto Serif TC", "Songti TC", serif;
  --sans-tc: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --latin: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --r1: 2px; --r2: 6px;
  --gutter: clamp(16px, 4vw, 56px);
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans-tc);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, .rec__title, .route__title {
  text-wrap: balance;
  word-break: keep-all; /* break CJK headings at punctuation/spaces, not mid-word */
  overflow-wrap: anywhere;
}
p, li, dd, .route__desc { text-wrap: pretty; }
.nw { white-space: nowrap; }
a { color: inherit; }
sup { line-height: 0; font-size: 0.68em; }
sup a {
  font-family: var(--mono); text-decoration: none; color: var(--lamp-ink);
  padding: 0 1px; margin-left: 1px;
}
sup a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: var(--r1); }

.skip {
  position: absolute; left: var(--s4); top: -60px; z-index: 100;
  background: var(--lamp); color: var(--ink); padding: var(--s2) var(--s4);
  font-weight: 700; text-decoration: none; border-radius: var(--r1);
}
.skip:focus { top: var(--s4); }

/* ───────── top bar ───────── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--mist);
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.top.is-solid {
  background: rgba(12, 18, 24, 0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: var(--ink-line);
}
.top__in {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
  padding: 0 var(--gutter); height: 64px;
  display: flex; align-items: center; gap: var(--s6);
}
.mark { display: inline-flex; align-items: baseline; gap: var(--s2); text-decoration: none; }
.mark__zh { font-family: var(--serif-tc); font-weight: 900; font-size: 19px; letter-spacing: 0.06em; }
.mark__en { font-family: var(--latin); font-style: italic; font-size: 15px; color: var(--fog-2); }
.top__nav { display: flex; gap: var(--s5); margin-left: auto; font-size: 14px; letter-spacing: 0.08em; }
.top__nav a { text-decoration: none; color: var(--fog-2); transition: color .2s; }
.top__nav a:hover { color: #fff; }
.top__out {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-decoration: none;
  border: 1px solid var(--ink-line); padding: 6px 12px; border-radius: var(--r1);
  display: inline-flex; gap: 6px; transition: border-color .2s, color .2s;
}
.top__out:hover { border-color: var(--lamp); color: var(--lamp); }

/* ───────── hero ───────── */
.hero {
  position: relative; overflow: hidden;
  min-height: max(680px, 100svh);
  background: var(--ink);
  color: var(--mist);
  display: grid;
  grid-template-rows: 1fr auto;
}
.hero__portrait {
  position: absolute; margin: 0; top: 0; right: 0; bottom: 0;
  width: min(62vw, 1120px);
}
.hero__portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%;
  animation: focus-pull 2.2s var(--ease) both;
}
.hero__portrait::before, .hero__portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
}
.hero__portrait::before {
  background: linear-gradient(90deg, var(--ink) 0%, rgba(12, 18, 24, .82) 14%, rgba(12, 18, 24, .2) 42%, rgba(12, 18, 24, 0) 60%);
  z-index: 1;
}
.hero__portrait::after {
  background:
    linear-gradient(0deg, var(--ink) 0%, rgba(12, 18, 24, .7) 16%, rgba(12, 18, 24, 0) 40%),
    linear-gradient(180deg, rgba(12, 18, 24, .55) 0%, rgba(12, 18, 24, 0) 16%);
  z-index: 1;
}
@keyframes focus-pull {
  from { filter: blur(10px) saturate(.7); transform: scale(1.05); opacity: .4; }
  to { filter: none; transform: none; opacity: 1; }
}
.hero__fog {
  position: absolute; inset: auto -20% 0 -20%; height: 46%; pointer-events: none; z-index: 2;
  background:
    radial-gradient(40% 60% at 30% 70%, rgba(184, 194, 203, .10), transparent 70%),
    radial-gradient(35% 50% at 70% 80%, rgba(184, 194, 203, .08), transparent 70%);
  animation: drift 38s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

.hero__in {
  position: relative; z-index: 3;
  align-self: center;
  width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
  padding: 120px var(--gutter) var(--s8);
}
.hero__eyebrow {
  margin: 0 0 var(--s5);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--lamp);
}
.hero__title {
  margin: 0;
  font-family: var(--serif-tc); font-weight: 900;
  font-size: clamp(64px, 9.6vw, 152px); line-height: 1.02; letter-spacing: 0.02em;
  color: #f4f1ea;
}
.hero__latin {
  display: block; margin-top: var(--s3);
  font-family: var(--latin); font-style: italic; font-weight: 400;
  font-size: clamp(24px, 2.6vw, 38px); letter-spacing: 0.01em; color: var(--fog-2);
}
.hero__lead {
  max-width: 30em; margin: var(--s6) 0 0;
  font-size: clamp(17px, 1.35vw, 19px); line-height: 1.95; color: #d3dae0;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); margin-top: var(--s7); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s5);
  font-size: 15px; font-weight: 500; letter-spacing: 0.08em; text-decoration: none;
  border-radius: var(--r1); transition: background-color .2s, color .2s, transform .2s;
}
.btn--lamp { background: var(--lamp); color: var(--ink); }
.btn--lamp:hover { background: #ebb672; transform: translateY(-1px); }

.link-out {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px var(--s2);
  font-size: 15px; text-decoration: none; color: var(--mist);
  border-bottom: 1px solid var(--ink-line); padding-bottom: 4px;
  transition: border-color .2s;
}
.link-out:hover { border-color: var(--lamp); }
.link-out__host { font-family: var(--mono); font-size: 13px; color: var(--lamp); }

.dossier {
  position: relative; z-index: 3;
  margin: 0 auto; width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter));
  padding: 0 var(--gutter) var(--s6);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.dossier__cell { border-top: 1px solid var(--ink-line); padding: var(--s4) var(--s4) 0 0; }
.dossier dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fog);
}
.dossier dd { margin: 6px 0 0; font-size: 15px; color: var(--mist); }

/* ───────── brand reel (full-bleed looping clip) ───────── */
.reel { position: relative; background: #f2f3f5; }
.reel__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.reel__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: opacity .6s var(--ease); }
.reel.is-playing .reel__poster { opacity: 0; }
/* The iframe is taller than the 16:9 frame: YouTube letterboxes the clip into
   the middle and draws its title bar / logo in the bars, which overflow crops. */
.reel__player { position: absolute; left: 0; right: 0; top: -96px; bottom: -96px; z-index: 1; }
.reel__player iframe { display: block; width: 100%; height: 100%; border: 0; }
/* HQ: laid out at 2x and scaled back, so YouTube's size-capped auto quality can reach 2160p. */
.reel__player.is-hq { right: auto; bottom: auto; width: 200%; height: calc(200% + 384px); transform: scale(.5); transform-origin: 0 0; }
.reel__q { position: absolute; left: 12px; bottom: 12px; z-index: 4; font: 12px/1.4 var(--mono); background: rgba(12, 18, 24, .85); color: var(--lamp); padding: 4px 8px; border-radius: var(--r1); }
.reel__shield { position: absolute; inset: 0; z-index: 3; }
.reel__yt { position: absolute; right: var(--gutter); bottom: var(--s5); z-index: 4; color: var(--text); }
.reel__ctrl { position: absolute; right: var(--gutter); bottom: var(--s5); z-index: 4; display: flex; gap: var(--s2); }
.reel__btn {
  font: inherit; font-size: 13px; letter-spacing: .06em; cursor: pointer;
  min-height: 36px; padding: 0 var(--s4); border-radius: 999px;
  background: rgba(12, 18, 24, .78); color: #f4f1ea; border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s;
}
.reel__btn:hover { background: rgba(12, 18, 24, .92); }
.reel__btn[aria-pressed="true"] { background: var(--lamp); color: var(--ink); border-color: transparent; }
@media (max-width: 760px) {
  .reel__player { top: -48px; bottom: -48px; }
  .reel__ctrl { bottom: var(--s2); right: var(--s2); }
  .reel__btn { min-height: 32px; font-size: 12px; padding: 0 var(--s3); }
}

/* ───────── sections ───────── */
.sec { padding: var(--s10) 0; border-top: 1px solid var(--line); }
.sec--tint { background: var(--paper-2); }
.sec__in {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5);
}
.sec__label {
  grid-column: 1 / span 3;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 96px; align-self: start;
}
.no { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--lamp-ink); }
.sec__name { font-size: 14px; letter-spacing: 0.12em; color: var(--text-3); }
.sec__body { grid-column: 4 / span 9; min-width: 0; }
.sec__body > p { max-width: 38em; }

.h2 {
  margin: 0 0 var(--s5);
  font-family: var(--serif-tc); font-weight: 900;
  font-size: clamp(34px, 4.4vw, 60px); line-height: 1.22; letter-spacing: 0.02em;
}
.h2--sm { font-size: clamp(28px, 3vw, 40px); }
.h3 {
  margin: var(--s9) 0 var(--s5);
  font-family: var(--serif-tc); font-weight: 600; font-size: 24px; letter-spacing: 0.04em;
}
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.8; color: var(--text); margin: 0 0 var(--s5); }
.sec__body p { color: var(--text-2); }
.sec__body p.lede { color: var(--text); }

.quote {
  margin: var(--s8) 0 0; padding: var(--s2) 0 var(--s2) var(--s6);
  border-left: 2px solid var(--lamp);
  max-width: 36em;
}
.quote p {
  margin: 0; color: var(--text);
  font-family: var(--serif-tc); font-weight: 600;
  font-size: clamp(21px, 2vw, 27px); line-height: 1.7;
}
.quote footer {
  margin-top: var(--s4);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--text-3);
}

/* ───────── probe (lens demo) ───────── */
.probe {
  margin-top: var(--s7);
  overflow: hidden; /* the lens slides under the head/legend and never leaves the card */
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  box-shadow: 0 1px 0 rgba(19, 26, 33, .04), 0 24px 48px -32px rgba(19, 26, 33, .35);
}
.probe__head, .probe__legend, .probe__foot { position: relative; z-index: 2; background: var(--card); }
.probe__head {
  display: flex; align-items: baseline; gap: var(--s3);
  padding: var(--s4) var(--s6); border-bottom: 1px solid var(--line);
}
.probe__tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--lamp-ink); border: 1px solid currentColor; padding: 1px 6px; border-radius: var(--r1);
  flex: none;
}
.probe__q { font-size: 15px; color: var(--text-2); text-wrap: pretty; }
.probe__stage {
  --x: 50%; --y: 50%; --r: 96px;
  position: relative;
  padding: var(--s7) var(--s6);
  cursor: crosshair;
  touch-action: pan-y;
}
.probe__text {
  margin: 0; max-width: none;
  font-family: var(--serif-tc); font-weight: 600;
  font-size: clamp(19px, 1.9vw, 25px); line-height: 2;
  color: var(--text);
}
.probe__text span { transition: color .3s; }
.probe__xray {
  position: absolute; inset: 0; padding: inherit;
  background:
    linear-gradient(rgba(43, 76, 110, .05) 1px, transparent 1px) 0 0 / 100% 18px,
    linear-gradient(90deg, rgba(43, 76, 110, .05) 1px, transparent 1px) 0 0 / 18px 100%,
    #fbfaf6;
  clip-path: circle(0 at var(--x) var(--y));
  transition: clip-path .5s var(--ease);
  pointer-events: none;
}
.probe.is-on .probe__xray { clip-path: circle(var(--r) at var(--x) var(--y)); transition: none; }
.probe.is-all .probe__xray { clip-path: circle(150% at 50% 50%); transition: clip-path .7s var(--ease); }
.sig { font: inherit; color: inherit; padding: 0; background: none; border-radius: 1px; }
.sig--own { background: rgba(43, 76, 110, .14); box-shadow: inset 0 -2px 0 var(--sig-own); }
.sig--third { background: rgba(79, 107, 92, .14); box-shadow: inset 0 -2px 0 var(--sig-third); }
.sig--stale { background: rgba(176, 122, 34, .16); box-shadow: inset 0 -2px 0 var(--sig-stale); }
.sig--guess { background: rgba(163, 69, 45, .13); box-shadow: inset 0 -2px 0 var(--sig-guess); text-decoration: underline wavy rgba(163, 69, 45, .55); text-underline-offset: 7px; text-decoration-thickness: 1px; }

.probe__lens {
  position: absolute; left: var(--x); top: var(--y);
  width: calc(var(--r) * 2); height: calc(var(--r) * 2);
  margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  border-radius: 50%;
  border: 3px solid #b88a4c;
  box-shadow: 0 0 0 1px rgba(19, 26, 33, .5), inset 0 0 0 1px rgba(255, 255, 255, .5), 0 18px 32px -14px rgba(19, 26, 33, .55);
  pointer-events: none;
  opacity: 0; transform: scale(.85);
  transition: opacity .3s, transform .3s var(--ease);
}
.probe__lens::after {
  content: ""; position: absolute;
  width: 14px; height: 64px; border-radius: 7px;
  background: linear-gradient(90deg, #4a3527, #6b4c36 45%, #3a291e);
  left: 50%; top: 50%;
  transform: rotate(-45deg) translate(-50%, calc(var(--r) + 2px));
  transform-origin: 0 0;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5);
}
.probe.is-on .probe__lens { opacity: 1; transform: none; }
.probe.is-all .probe__lens { opacity: 0; }

.probe__legend {
  list-style: none; margin: 0; padding: var(--s4) var(--s6) var(--s2);
  border-top: 1px solid var(--line);
  display: grid; gap: 2px;
  counter-reset: k;
}
.probe__legend li {
  display: grid; grid-template-columns: 14px minmax(0, 1.2fr) minmax(0, 1.3fr) auto;
  align-items: baseline; gap: var(--s3);
  padding: 10px var(--s3); margin: 0 calc(var(--s3) * -1);
  border-radius: var(--r1);
  font-size: 14px; line-height: 1.6;
  transition: background-color .25s;
}
.probe__legend li.is-active { background: rgba(224, 164, 88, .16); }
.dot { width: 10px; height: 10px; border-radius: 50%; align-self: center; }
.dot--own { background: var(--sig-own); }
.dot--third { background: var(--sig-third); }
.dot--stale { background: var(--sig-stale); }
.dot--guess { background: var(--sig-guess); }
.probe__phrase { color: var(--text); }
.probe__src { color: var(--text-2); }
.probe__type { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--text-3); white-space: nowrap; }
.probe__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  padding: var(--s3) var(--s6) var(--s5);
}
.probe__toggle {
  font: inherit; font-size: 14px; letter-spacing: 0.06em; cursor: pointer;
  background: transparent; color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r1);
  min-height: 40px; padding: 0 var(--s4);
  transition: background-color .2s, border-color .2s;
}
.probe__toggle:hover { border-color: var(--text); }
html:not(.js) .probe__toggle { display: none; }
.probe__toggle[aria-pressed="true"] { background: var(--text); color: var(--card); border-color: var(--text); }
.probe__note { font-size: 13px; color: var(--text-3); }
.after { margin-top: var(--s7); }

/* ───────── method ───────── */
.sides {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--s7);
  border-top: 1px solid var(--line-2);
}
.side { padding: var(--s5) var(--s5) var(--s5) 0; border-right: 1px solid var(--line); }
.side + .side { padding-left: var(--s5); }
.side:last-child { border-right: 0; }
.side__idx { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--lamp-ink); }
.side__title { margin: var(--s2) 0 var(--s3); font-family: var(--serif-tc); font-weight: 900; font-size: 26px; letter-spacing: 0.04em; }
.side p { font-size: 15px; line-height: 1.85; margin: 0; }
.side__link {
  display: inline-block; margin-top: var(--s4);
  font-family: var(--mono); font-size: 13px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line-2); padding-bottom: 2px;
}
.side__link:hover { border-color: var(--lamp-ink); color: var(--lamp-ink); }

.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s7); }
.rules li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s3); padding: var(--s5) 0; border-top: 1px solid var(--line); }
.rules__no { font-family: var(--mono); font-size: 13px; color: var(--lamp-ink); padding-top: 4px; }
.rules h4 { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: 0.04em; }
.rules p { margin: 0; font-size: 15px; line-height: 1.85; }

/* ───────── records ───────── */
.rec { padding: var(--s7) 0; border-top: 1px solid var(--line-2); }
.rec:first-of-type { margin-top: var(--s7); }
.rec__meta {
  display: flex; flex-wrap: wrap; gap: 6px var(--s5); margin: 0 0 var(--s3);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--text-3);
}
.rec__meta time { color: var(--lamp-ink); }
.rec__title {
  margin: 0 0 var(--s4); max-width: 26em;
  font-family: var(--serif-tc); font-weight: 900;
  font-size: clamp(23px, 2.3vw, 31px); line-height: 1.45; letter-spacing: 0.02em;
}
.rec > p { max-width: 40em; }
.rec__point {
  margin: var(--s5) 0 0; padding: var(--s4) var(--s5);
  background: var(--card); border-left: 2px solid var(--text);
  color: var(--text) !important; font-size: 16px;
}
.rec__point b { display: block; margin-bottom: 2px; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.12em; color: var(--text-3); }
.rec__limit { margin: var(--s4) 0 0; font-size: 13px; line-height: 1.75; color: var(--text-3) !important; }
.rec--pending .rec__title { color: var(--text-2); }
.pending { color: var(--lamp-ink); }
.pending::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); margin-right: 8px; vertical-align: 1px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.matrix {
  margin-top: var(--s6);
  border: 1px solid var(--line); border-radius: var(--r2); background: var(--card);
  overflow: hidden;
}
.matrix__cap {
  margin: 0; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--s4);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-3) !important;
}
.matrix__hint { display: none; color: var(--lamp-ink); }
.matrix__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.matrix thead th {
  font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.02em;
  color: var(--text-2); text-align: center; padding: var(--s3) var(--s2);
  border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.matrix thead th:first-child { text-align: left; padding-left: var(--s5); }
.matrix tbody th[scope="row"] {
  text-align: left; font-weight: 500; padding: 9px var(--s5); white-space: nowrap; color: var(--text);
  position: sticky; left: 0; background: var(--card);
}
.matrix td { text-align: center; padding: 9px var(--s2); }
.matrix tbody tr:not(.grp) { border-bottom: 1px solid var(--line); }
.matrix tbody tr:not(.grp):hover { background: rgba(224, 164, 88, .1); }
.matrix tbody tr:not(.grp):hover th { background: #f3ecdf; }
.matrix .grp th {
  text-align: left; padding: var(--s4) var(--s5) 6px;
  font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.16em; color: var(--lamp-ink);
  background: var(--paper);
}

.c {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  vertical-align: middle; font-style: normal;
  overflow: hidden; text-indent: 100%; white-space: nowrap; /* text stays for screen readers */
}
.c--x { background: var(--text); }
.c--p { background: linear-gradient(90deg, var(--text) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--text); }
.c--o { box-shadow: inset 0 0 0 1.5px var(--text-3); }

.legend { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: 13px; color: var(--text-3); }
.legend li { display: inline-flex; align-items: center; gap: var(--s2); }

.dots-list { margin: var(--s5) 0 0; display: grid; gap: var(--s3); }
.dots-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: var(--s4); }
.dots-row dt { font-family: var(--mono); font-size: 13px; color: var(--text); }
.dots-row dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s4); min-width: 0; }
.dots {
  --cell: 11px; --gap: 3px;
  display: block; flex: none;
  width: calc(57 * var(--cell)); max-width: 100%; height: calc(var(--cell) - var(--gap));
  background: linear-gradient(90deg, var(--text) 0 calc(var(--n) * var(--cell)), rgba(19, 26, 33, .14) 0);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(var(--cell) - var(--gap)), transparent 0 var(--cell));
  mask: repeating-linear-gradient(90deg, #000 0 calc(var(--cell) - var(--gap)), transparent 0 var(--cell));
}
.dots-num { font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ───────── profile ───────── */
.sec--dark { background: var(--ink); color: var(--mist); border-top: 0; }
.sec--dark .no { color: var(--lamp); }
.sec--dark .sec__name { color: var(--fog); }
.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); align-items: start; }
.profile__photo { margin: 0; position: relative; }
.profile__photo img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: var(--r1); filter: saturate(.9); }
.profile__photo::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  background: linear-gradient(0deg, rgba(12, 18, 24, .45), transparent 35%);
}
.profile .h2 { color: #f4f1ea; }
.profile__latin { display: block; margin-top: var(--s2); font-family: var(--latin); font-style: italic; font-weight: 400; font-size: clamp(20px, 2vw, 28px); color: var(--fog-2); }
.facts { margin: var(--s6) 0 var(--s7); }
.facts > div { display: grid; grid-template-columns: 88px 1fr; gap: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--ink-line); }
.facts > div:last-child { border-bottom: 1px solid var(--ink-line); }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--fog); padding-top: 4px; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.8; color: var(--mist); }
.facts a { color: var(--lamp); text-decoration: none; border-bottom: 1px solid rgba(224, 164, 88, .4); }
.link-out--light { color: var(--mist); }

/* ───────── faq ───────── */
.faq { border-top: 1px solid var(--line-2); margin-top: var(--s5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); }
.qa { padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.qa h3 { margin: 0 0 var(--s2); font-size: 18px; font-weight: 700; letter-spacing: 0.03em; }
.qa p { margin: 0; font-size: 15px; line-height: 1.85; }
.faq a { color: var(--lamp-ink); }

/* ───────── buttons on paper ───────── */
.btn--ink { background: var(--text); color: var(--card); border: 0; cursor: pointer; font-family: inherit; }
.btn--ink:hover { background: #26313c; transform: translateY(-1px); }
.btn--ink:disabled { opacity: .55; cursor: progress; transform: none; }

/* ───────── record teasers (home) ───────── */
.teasers {
  list-style: none; margin: var(--s7) 0 var(--s6); padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4);
}
.teaser {
  height: 100%; display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s5); background: var(--card);
  border: 1px solid var(--line); border-top: 2px solid var(--text); border-radius: var(--r1);
  text-decoration: none; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.teaser:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -28px rgba(19, 26, 33, .5); border-color: var(--line-2); border-top-color: var(--lamp-ink); }
.teaser__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--text-3); }
.teaser__title { font-family: var(--serif-tc); font-weight: 900; font-size: 19px; line-height: 1.5; letter-spacing: .02em; color: var(--text); word-break: keep-all; overflow-wrap: anywhere; }
.teaser__go { margin-top: auto; font-size: 14px; color: var(--lamp-ink); }
.rec__no {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--lamp-ink);
  border: 1px solid currentColor; border-radius: var(--r1); padding: 0 6px; line-height: 1.7;
}

/* ───────── sub-page head (records/) ───────── */
.top__nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -1px 0 var(--lamp); }
.page-head { background: var(--ink); color: var(--mist); padding: 136px 0 var(--s8); }
.page-head__in { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.crumbs { display: flex; gap: var(--s2); font-size: 13px; color: var(--fog); margin-bottom: var(--s6); }
.crumbs a { color: var(--fog-2); text-decoration: none; }
.crumbs a:hover { color: var(--lamp); }
.page-head__eyebrow { margin: 0 0 var(--s4); font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--lamp); }
.page-head__title { margin: 0; font-family: var(--serif-tc); font-weight: 900; font-size: clamp(44px, 6vw, 84px); line-height: 1.15; letter-spacing: .02em; color: #f4f1ea; }
.page-head__lede { max-width: 34em; margin: var(--s5) 0 0; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.9; color: #d3dae0; }

.toc ol { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: grid; grid-template-columns: 44px 1fr; gap: var(--s2);
  padding: 6px 0; font-size: 14px; line-height: 1.55; color: var(--text-2); text-decoration: none;
  border-top: 1px solid var(--line);
}
.toc a:hover { color: var(--text); }
.toc__no { font-family: var(--mono); font-size: 12px; color: var(--lamp-ink); padding-top: 1px; }
.sec--records .sec__body > .rec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rec { scroll-margin-top: 88px; }
.rec__limit a { color: inherit; }
.next {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6);
  margin-top: var(--s7); padding: var(--s6); background: var(--card); border: 1px solid var(--line); border-radius: var(--r2);
}
.next__q { margin: 0; font-family: var(--serif-tc); font-weight: 600; font-size: 20px; color: var(--text) !important; }

/* ───────── contact form ───────── */
.contact { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s7); align-items: start; }
.contact__intro p { font-size: 16px; }
.contact__alt a { color: var(--lamp-ink); }
.form, .form-done {
  grid-column: 2;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r2);
  padding: var(--s6);
  box-shadow: 0 24px 48px -36px rgba(19, 26, 33, .4);
}
.form[hidden], .form-done[hidden] { display: none; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 var(--s4); min-width: 0; border: 0; padding: 0; }
.field > label, .field legend { font-size: 14px; font-weight: 500; color: var(--text); padding: 0; }
.field legend { margin-bottom: var(--s2); }
.req { color: var(--sig-guess); }
.opt { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-left: 4px; font-weight: 400; }
.field input, .field textarea {
  font: inherit; font-size: 16px; line-height: 1.6; color: var(--text);
  background: #fdfcf9; border: 1px solid var(--line-2); border-radius: var(--r1);
  padding: 10px 12px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 132px; }
.field input::placeholder { color: #9aa3ab; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(224, 164, 88, .35); }
.was-validated .field input:invalid, .was-validated .field textarea:invalid { border-color: var(--sig-guess); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 7px 14px; font-size: 14px; line-height: 1.4;
  border: 1px solid var(--line-2); border-radius: 999px; background: #fdfcf9; color: var(--text-2);
  transition: background-color .2s, color .2s, border-color .2s;
}
.chips label:hover span { border-color: var(--text); }
.chips input:checked + span { background: var(--text); border-color: var(--text); color: var(--card); }
.chips input:focus-visible + span { outline: 2px solid var(--lamp); outline-offset: 2px; }
.was-validated .field--topics:has(input:invalid) .chips span { border-color: var(--sig-guess); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s2); }
.form__foot .btn { min-width: 140px; }
.form__note { margin: 0; font-size: 13px; color: var(--text-3) !important; }
.form__note a { color: inherit; }
.form__status { margin: var(--s3) 0 0; min-height: 1.6em; font-size: 14px; color: var(--text-2) !important; }
.form__status.is-error { color: var(--sig-guess) !important; }
.form-done { border-left: 3px solid var(--lamp); }
.form-done:focus { outline: none; }
.form-done__title { margin: 0 0 var(--s2); font-family: var(--serif-tc); font-weight: 900; font-size: 24px; color: var(--text) !important; }
.form-done p:last-child { margin: 0; }

/* ───────── routes ───────── */
.routes { background: var(--paper); border-top: 1px solid var(--line); padding: var(--s9) 0; }
.routes__in {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5);
}
.route {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: var(--s6) var(--s6) var(--s6) var(--s6);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r2);
  text-decoration: none; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.route:hover { border-color: var(--text); transform: translateY(-2px); box-shadow: 0 18px 36px -28px rgba(19, 26, 33, .5); }
.route__host { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--lamp-ink); }
.route__title { font-family: var(--serif-tc); font-weight: 900; font-size: 24px; letter-spacing: 0.04em; }
.route__desc { font-size: 15px; color: var(--text-2); line-height: 1.75; }
.route__go { position: absolute; top: var(--s5); right: var(--s5); font-size: 18px; color: var(--text-3); transition: color .25s, transform .25s var(--ease); }
.route:hover .route__go { color: var(--text); transform: translate(2px, -2px); }
.route--quiet { background: transparent; }

/* ───────── refs ───────── */
.refs { padding: var(--s8) 0 var(--s9); border-top: 1px solid var(--line); }
.refs__in { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.refs__title { margin: 0 0 var(--s4); font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; color: var(--text-3); }
.refs ol { margin: 0; padding-left: 1.6em; display: grid; gap: var(--s2); max-width: 64em; }
.refs li { font-size: 13px; line-height: 1.75; color: var(--text-2); padding-left: 4px; }
.refs li::marker { font-family: var(--mono); color: var(--lamp-ink); }
.refs li:target { background: rgba(224, 164, 88, .16); }
.refs a { color: var(--text); }
.refs .back { text-decoration: none; color: var(--lamp-ink); margin-left: 4px; }
.refs__own { margin: var(--s4) 0 0; font-size: 13px; color: var(--text-3); }

/* ───────── footer ───────── */
.foot { background: var(--ink); color: var(--fog-2); }
.foot__in {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s7) var(--gutter);
  display: grid; grid-template-columns: 1fr auto; gap: var(--s5) var(--s6); align-items: end;
}
.foot__brand { display: flex; flex-direction: column; gap: 4px; color: var(--mist); }
.foot__sub { font-size: 13px; color: var(--fog); letter-spacing: 0.08em; }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-family: var(--mono); font-size: 13px; }
.foot__links a { text-decoration: none; color: var(--fog-2); }
.foot__links a:hover { color: var(--lamp); }
.foot__legal { grid-column: 1 / -1; margin: 0; padding-top: var(--s5); border-top: 1px solid var(--ink-line); font-size: 12px; color: var(--fog); letter-spacing: 0.06em; }

/* ───────── reveal ───────── */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ───────── responsive ───────── */
@media (max-width: 1024px) {
  .top__nav { gap: var(--s4); }
  .sec__label { grid-column: 1 / -1; position: static; flex-direction: row; gap: var(--s3); margin-bottom: var(--s5); }
  .sec__body { grid-column: 1 / -1; }
  .profile { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: var(--s6); }
  .toc { flex-direction: column !important; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: var(--s5); }
}
@media (max-width: 860px) {
  .top__nav { display: none; }
  .top__out { margin-left: auto; }
  .sides { grid-template-columns: 1fr; }
  .side, .side + .side { padding: var(--s5) 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .rules { grid-template-columns: 1fr; }
  .routes__in { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .dots { --cell: 8px; --gap: 2px; }
  .teasers { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: var(--s5); }
  .form, .form-done { grid-column: 1; }
  .dossier { grid-template-columns: repeat(2, 1fr); row-gap: var(--s4); }
  .probe__legend li { grid-template-columns: 14px minmax(0, 1fr); row-gap: 0; }
  .probe__legend .probe__src, .probe__legend .probe__type { grid-column: 2; font-size: 13px; }
  .probe__legend .probe__type { font-size: 11px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { min-height: 0; display: block; }
  .hero__portrait { position: relative; width: 100%; height: 76svh; min-height: 460px; max-height: 720px; }
  .hero__portrait img { object-position: 50% 12%; }
  .hero__portrait::before { background: linear-gradient(180deg, rgba(12, 18, 24, .55) 0%, rgba(12, 18, 24, 0) 18%); }
  .hero__portrait::after { background: linear-gradient(0deg, var(--ink) 0%, rgba(12, 18, 24, .85) 18%, rgba(12, 18, 24, 0) 46%); }
  .hero__fog { height: 30%; }
  .hero__in { margin-top: -150px; padding-top: 0; padding-bottom: var(--s7); }
  .hero__eyebrow { font-size: 11px; letter-spacing: 0.14em; }
  .hero__actions { margin-top: var(--s6); flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { width: 100%; }
  .dossier { padding-bottom: var(--s7); }
  .sec { padding: var(--s9) 0 var(--s8); }
  .probe__head, .probe__legend, .probe__foot { padding-left: var(--s4); padding-right: var(--s4); }
  .probe__stage { --r: 72px; padding: var(--s6) var(--s4); }
  .profile { grid-template-columns: 1fr; }
  .profile__photo { max-width: 360px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .dots-row { grid-template-columns: 1fr; gap: 4px; }
  .dots { --cell: 5px; --gap: 1.5px; }
  .matrix__hint { display: inline; }
  .foot__in { grid-template-columns: 1fr; }
  .form { padding: var(--s5) var(--s4); }
  .form__grid { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
  .page-head { padding-top: 112px; }
  .next { padding: var(--s5); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
