/* Stylesheet for the crawler-facing pages. It is served from disk, not baked into
   the image, so restyling never needs a rebuild. The admin console has its own
   sheet (admin/app.css); the brand accent here is deliberately the same teal. */

:root {
  --brand: #0f6a5c;
  --brand-ink: #0a4a3f;
  --brand-soft: #e9f4f1;
  --brand-line: #c6e2da;
  /* Aliases used by the rail links. They were referenced but never defined, so
     those links silently fell back to the inherited colour. */
  --accent: var(--brand);
  --accent-soft: rgba(15, 106, 92, .28);

  --warm: #f7f4ee;
  --warm-2: #efeade;

  --ink: #23282e;
  --ink-2: #45525f;
  --muted: #5c6670;
  /* 4.6:1 on the paper background at 12px — the old #8a94a0 was barely 3:1. */
  --faint: #6b7280;

  --line: #e6e9ee;
  --line-2: #f1f3f7;
  --bg: #fafaf7;
  --paper: #fff;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Noto Serif SC", "Songti SC", "Times New Roman", serif;

  --r-s: 7px;
  --r-m: 10px;
  --r-l: 16px;
  --shadow: 0 1px 2px rgba(35, 40, 46, .05);
  --shadow-lift: 0 1px 2px rgba(35, 40, 46, .05), 0 10px 28px -14px rgba(35, 40, 46, .14);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.75 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-ink); text-decoration-color: rgba(15, 106, 92, .35); text-underline-offset: 3px; }
a:hover { color: var(--brand); text-decoration-color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }

/* Keyboard users land here first; it is off-screen until focused. */
.skip {
  position: absolute;
  left: .75rem;
  top: -3rem;
  z-index: 50;
  padding: .55rem .9rem;
  background: var(--paper);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-s);
  box-shadow: var(--shadow-lift);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top .15s;
}
.skip:focus { top: .75rem; }

/* Reading progress on long-form pages. Pure CSS: the fill is driven by
   animation-timeline, so there is no script, no layout thrash and nothing for a
   crawler to execute. Without scroll-timeline support the bar simply stays
   empty, which is why it is decorative (aria-hidden) in the first place. */
.readbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  background: rgba(15, 106, 92, .08);
  pointer-events: none;
}
.readbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, #2fb39b 62%, #7ff0dd 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
@supports (animation-timeline: scroll()) {
  .readbar i {
    /* auto duration is what maps the animation onto the scroll range; the 0s
       default would make the bar jump to its end state instead. */
    animation: readbar-fill linear both;
    animation-duration: auto;
    animation-timeline: scroll(root block);
  }
}
@keyframes readbar-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; }

/* ── chrome ─────────────────────────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 3.25rem;
  padding: 0 clamp(1rem, 4vw, 2rem);
  background: rgba(250, 250, 247, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark img { width: 22px; height: 22px; display: block; }
.wordmark:hover { color: var(--brand-ink); }

header.site nav { display: flex; gap: 1.25rem; margin-left: auto; }
header.site nav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .12s;
}
header.site nav a:hover { color: var(--brand-ink); }

main.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2rem) 4rem;
}
main.wrap.wide { max-width: 68rem; }
/* Only the home page carries .hero as a direct child. Widen its container for
   a more composed first screen, without stretching article prose past 46rem. */
main.wrap.wide:has(> .hero) { max-width: 76rem; }

footer.site {
  background: #1c2321;
  color: #aeb8b4;
  padding: 2.5rem clamp(1rem, 4vw, 2rem) 2rem;
}
footer.site .foot-grid {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  align-items: start;
}
footer.site p { margin: 0; font-size: 13.5px; }
footer.site .fbrand { color: #f2f4f3; font-weight: 650; font-size: 14.5px; margin-bottom: .45rem; }
footer.site .fdesc { max-width: 30rem; line-height: 1.65; }
footer.site nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: flex-end; }
footer.site nav a { color: #cfd8d4; text-decoration: none; font-size: 13.5px; }
footer.site nav a:hover { color: #fff; }
footer.site .fnote {
  max-width: 68rem;
  margin: 1.75rem auto 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 12.5px;
  line-height: 1.6;
  color: #8b9691;
}
footer.site .machine-note {
  max-width: 68rem;
  margin: .4rem auto 0;
  font: 500 11px/1.6 var(--mono);
  letter-spacing: .02em;
  color: #75817c;
}
footer.site .machine-note a { color: #93a8a2; text-decoration: none; }
footer.site .machine-note a:hover { color: #cfd8d4; text-decoration: underline; }

/* ── home page ──────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, .6fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(15, 106, 92, .16) 0%, transparent 55%),
    radial-gradient(80% 90% at 0% 110%, rgba(151, 100, 10, .07) 0%, transparent 60%),
    linear-gradient(180deg, #fbf8f2 0%, var(--warm) 100%);
  border: 1px solid var(--warm-2);
  border-radius: var(--r-l);
  padding: clamp(1.8rem, 5vw, 3.2rem) clamp(1.25rem, 4vw, 2.75rem) clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: .5rem;
  overflow: hidden;
}
/* 一层很淡的点阵，只在右上角显出来：近看才发现有纹理，不抢标题。 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(35, 40, 46, .13) 1px, transparent 1.1px);
  background-size: 17px 17px;
  -webkit-mask-image: radial-gradient(60% 55% at 88% 6%, #000 0%, transparent 72%);
  mask-image: radial-gradient(60% 55% at 88% 6%, #000 0%, transparent 72%);
  opacity: .55;
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2.05rem, 5.4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.022em;
  margin: .8rem 0 .85rem;
  text-wrap: balance;
}
.hero .lede {
  max-width: 40rem;
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink-2);
}
/* 数据条：等宽小字 + 衬线大数字，像报告封面上的计数行。 */
.hero .counts {
  grid-column: 1 / -1;
  margin: 1.6rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(35, 40, 46, .1);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 0;
}
.hero .counts span {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  padding-right: 1.35rem;
  margin-right: 1.35rem;
  border-right: 1px solid rgba(35, 40, 46, .12);
}
.hero .counts span:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.hero .counts b {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

/* Evidence snapshot: a quiet data panel on the right of the hero. It borrows
   the claim's own numbers, so the first screen carries substance rather than a
   slogan — no stock photography, no illustration, no marketing language. */
.hero-evidence {
  padding: 1.1rem 1.2rem 1.2rem;
  background: rgba(255, 255, 255, .74);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
}
.he-label {
  display: block;
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .75rem;
}
.he-stat { display: flex; align-items: baseline; gap: .7rem; margin: 0 0 .6rem; }
.he-stat b {
  font: 600 2.3rem/1 var(--serif);
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}
.he-stat span { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.he-meta {
  margin: 0 0 .8rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line);
  font: 500 11.5px/1.4 var(--mono);
  color: var(--muted);
}
.he-link { font-size: 13px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.he-link:hover { text-decoration: underline; }

.kicker {
  display: inline-block;
  font: 600 12px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--brand-soft);
  padding: .35rem .55rem;
  border-radius: var(--r-s);
}

.shelf { padding: 2.25rem 0 .5rem; }
.shelf h2 { font-size: 1.4rem; margin: 0 0 .35rem; letter-spacing: -.012em; }
.shelf .sub { margin: 0 0 1.25rem; font-size: 14.5px; color: var(--muted); }

/* Findings are the page's one dark plate: flat deep ink with a single thin teal
   rule. The old cyan glow and technical grid read as a tech demo; the numbers
   should carry the weight, not the lighting. The copy is unchanged — still plain
   server-rendered text, identical for readers and crawlers. */
#findings {
  position: relative;
  isolation: isolate;
  margin: 2.75rem 0 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.4rem) clamp(1.15rem, 3.5vw, 2.1rem) clamp(1.5rem, 3vw, 2.1rem);
  border-radius: calc(var(--r-l) + 4px);
  background: linear-gradient(160deg, #16201e 0%, #101816 100%);
  border: 1px solid rgba(143, 217, 201, .18);
  color: #e7efec;
  overflow: hidden;
  box-shadow: 0 14px 32px -24px rgba(13, 30, 27, .5);
}
#findings::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--brand) 0%, rgba(143, 217, 201, .55) 55%, transparent 100%);
  opacity: .8;
  pointer-events: none;
}
#findings h2 { color: #f2f8f6; font-size: clamp(1.35rem, 2.6vw, 1.68rem); }
#findings .sub { color: #93a8a2; }
#findings .cards { gap: 1rem; }
#findings .card {
  padding: 1.25rem 1.3rem;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .105);
  box-shadow: none;
}
#findings .card:hover {
  border-color: rgba(143, 217, 201, .42);
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 12px 26px -20px rgba(0, 0, 0, .65);
}
#findings .card .stat { color: #8ed9c9; font-size: 1.7rem; }
#findings .card .stat small { color: #7f9791; }
#findings .card .stat .srest { color: #93a8a2; }
#findings .card .ct { color: #f1f7f5; font-family: var(--serif); font-size: 1.14rem; line-height: 1.32; }
a.card:hover .ct { color: var(--brand-ink); }
#findings a.card:hover .ct { color: #a7e7d9; }
#findings .card .cd { color: #9db1ab; }
#findings .card .cev { color: #c9ded8; }
#findings .card .cm { color: #7e948e; }

/* The caveats sit directly under the number instead of in a footer nobody
   reaches. Calm paper surface, not a warning banner. */
.reading-note {
  margin: .35rem 0 .25rem;
  padding: .85rem 1.05rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-line);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}
.reading-note strong { color: var(--ink-2); font-weight: 600; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: .9rem;
}
.card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.1rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
  transition: border-color .12s, box-shadow .12s;
}
a.card { color: inherit; text-decoration: none; }
.card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-lift); }
.card .stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .55rem;
  font: 600 1.5rem/1.1 var(--serif);
  color: var(--brand-ink);
  letter-spacing: 0;
}
.card .stat b { font-weight: 600; font-variant-numeric: tabular-nums; }
.card .stat small {
  flex: 0 0 100%;
  font: 600 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
}
.card .stat .srest {
  flex: 0 0 100%;
  margin-top: .1rem;
  font: 500 11.5px/1.55 var(--mono);
  letter-spacing: .01em;
  color: var(--muted);
}
.card .ct {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--ink);
}
a.card:hover .ct { color: var(--brand-ink); }
.card .cd { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.card .cev {
  margin: .15rem 0 0;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: .01em;
  color: var(--ink-2);
}
.card .cm {
  margin: auto 0 0;
  padding-top: .55rem;
  font: 500 12px/1 var(--mono);
  color: var(--faint);
}

ul.people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: .9rem 1.5rem;
}
ul.people li { display: flex; align-items: center; gap: .7rem; }
ul.people .who {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
ul.people .who:hover { color: var(--brand-ink); }
ul.people .t { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* Articles read as a magazine table of contents, not a data grid: serif titles,
   a two-line standfirst, and a quiet mono byline on the right. */
ul.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
ul.rows li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .3rem 1.5rem;
  align-items: baseline;
  padding: 1.3rem 1rem;
  margin: 0 -1rem;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-s);
  transition: background-color .16s ease, transform .18s ease;
}
ul.rows .rt {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -.014em;
  color: var(--ink);
  text-decoration: none;
  text-wrap: pretty;
}
ul.rows .rt:hover { color: var(--brand-ink); }
ul.rows .rd {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.58;
  color: var(--muted);
}
ul.rows .rm {
  font: 500 11.5px/1.6 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  text-align: right;
}
@media (hover: hover) {
  ul.rows li:hover {
    background: linear-gradient(90deg, rgba(15, 106, 92, .06), rgba(15, 106, 92, 0) 78%);
    transform: translateX(2px);
  }
  ul.rows li:hover .rt { color: var(--brand-ink); }
}

/* Blissbot feed: a quiet list where source and provenance are readable at a
   glance. External links are deliberately understated — no bright badges. */
ul.feed-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .25rem .9rem;
  align-items: baseline;
  padding: .95rem .2rem;
  border-bottom: 1px solid var(--line);
}
.feed-row .ft {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  text-wrap: pretty;
}
a.ft:hover { color: var(--brand-ink); text-decoration: underline; }
.feed-row .fd { grid-column: 2 / -1; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.feed-row .fm { grid-column: 2 / -1; font: 500 11px/1.5 var(--mono); letter-spacing: .02em; color: var(--faint); }
/* Video rows on /publications: a quiet 16:9 frame, loaded only when scrolled to. */
.feed-video { grid-column: 2 / -1; margin: .7rem 0 .2rem; }
.feed-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--warm);
}
.fpill {
  display: inline-block;
  padding: .2rem .5rem;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  font: 600 10.5px/1.2 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brand-ink);
  white-space: nowrap;
}
.fpill.f-external { border-color: var(--line); background: var(--warm); color: var(--muted); }
.fpill.f-platform { border-color: var(--line); background: var(--paper); color: var(--ink-2); }
.faq-list h3 { margin: 1rem 0 .35rem; font: 600 1rem/1.4 var(--serif); color: var(--ink); }
.faq-list p { margin: 0 0 1rem; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.feed-more { margin: 1rem 0 0; font-size: 13.5px; }
.feed-more a { color: var(--brand-ink); text-decoration: none; }
.feed-more a:hover { text-decoration: underline; }
.feed-filters { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.5rem 0 .5rem; }
.feed-filters .fg { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.feed-filters .fg b { font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.feed-filters .fg a {
  padding: .25rem .55rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s, 4px);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
}
.feed-filters .fg a:hover { border-color: var(--brand-line); color: var(--brand-ink); }
.feed-filters .fg a.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

.empty-note {
  padding: 2rem 0;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  border-top: 1px solid var(--line);
}

/* ── document pages ─────────────────────────────────────────────────────── */

.doc-head { padding-bottom: 0; margin-bottom: 1.75rem; }
.cover {
  margin: 0 0 1.6rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: var(--warm-2);
  box-shadow: var(--shadow-lift);
}
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.doc-head h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.2;
  margin: .75rem 0 .9rem;
}
.doc-head .kicker { background: none; padding: 0; color: var(--brand-ink); }

.standfirst {
  margin: -.15rem 0 1rem;
  font-size: 1.13rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.byline .sep { color: #c2c8d0; }
.byline a { color: var(--ink-2); text-decoration: none; }
.byline a:hover { color: var(--brand-ink); }
.byline .verified { color: var(--brand-ink); font-weight: 550; }
.byline .verified a { color: var(--brand-ink); }
.byline time { font-variant-numeric: tabular-nums; }

i.mono, .byline i, ul.people i {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font: 600 10.5px/1 var(--mono);
  font-style: normal;
  letter-spacing: .01em;
  flex: none;
}
.byline i { width: 1.35rem; height: 1.35rem; font-size: 9.5px; }
.author-card i.mono { width: 2.6rem; height: 2.6rem; font-size: 13px; }

.claim {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.35rem;
  background: var(--warm);
  border: 1px solid var(--warm-2);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  font-size: 1.12rem;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink);
}

.elsewhere { margin: 1.25rem 0 0; font-size: 14px; }
.elsewhere a {
  display: inline-block;
  margin-right: .85rem;
  padding: .25rem .6rem;
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
}
.elsewhere a:hover { border-color: var(--brand-line); color: var(--brand-ink); }

/* ── document two-column layout: reading column + sticky rail ───────────── */

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15.5rem;
  gap: 2.75rem;
  align-items: start;
}
.doc-main { min-width: 0; }

.rail {
  position: sticky;
  top: 4.5rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.railbox {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: .95rem 1.05rem;
  box-shadow: var(--shadow);
}
.railbox h2 {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .65rem;
}
.railbox ul { list-style: none; margin: 0; padding: 0; }

.railbox .kv li { padding: .45rem 0; border-top: 1px solid var(--line-2); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.railbox .kv li:first-child { border-top: 0; padding-top: 0; }
.railbox .kv b {
  display: block;
  font: 600 10px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: .2rem;
}
.railbox .kv a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft, rgba(15,106,92,.25)); word-break: break-all; }
.railbox .kv a:hover { border-bottom-color: var(--accent); }
.railstudy { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); margin: -.3rem 0 .55rem; }

.railbox .toc li { padding: .24rem 0; }
.railbox .toc a {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  text-decoration: none;
  border-left: 2px solid var(--line);
  padding-left: .6rem;
}
.railbox .toc a:hover { color: var(--brand-ink); border-left-color: var(--brand); }

.rail-who { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.rail-who:hover { border-color: var(--brand-line); }
.rail-who .w b { display: block; font-size: 14px; font-weight: 620; color: var(--ink); }
.rail-who .r { display: block; font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: .1rem; }

/* ── article body ───────────────────────────────────────────────────────── */

.prose { font-size: 17.5px; line-height: 1.8; color: #2a323a; }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 2.6rem 0 .85rem;
  scroll-margin-top: 4.5rem;
}
.prose h3 { font-size: 1.15rem; margin: 2rem 0 .6rem; }
.prose h4 { font-size: 1rem; font-family: var(--sans); font-weight: 620; margin: 1.5rem 0 .4rem; }
.prose p { margin: 0 0 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.prose li { margin: .35rem 0; }
.prose li::marker { color: var(--brand); }
.prose a { color: var(--brand-ink); }
.prose strong { font-weight: 620; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.25rem 0; }
.prose blockquote {
  margin: 1.6rem 0;
  padding: .9rem 1.2rem;
  background: var(--warm);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-m); border: 1px solid var(--line); }
.prose code { font: 400 .88em/1.5 var(--mono); background: var(--line-2); padding: .1em .35em; border-radius: 4px; }
.prose pre {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  background: #23282e;
  color: #e8ecf1;
  border-radius: var(--r-m);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table {
  width: 100%;
  margin: 1.6rem 0;
  border-collapse: collapse;
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
}
.prose th, .prose td {
  text-align: left;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--line);
}
.prose thead th {
  font: 600 11px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: #d8dde5;
}
.prose tbody tr:last-child td { border-bottom: 0; }

/* ── end-of-page blocks ─────────────────────────────────────────────────── */

.refs {
  margin-top: 2.5rem;
  padding: 1.15rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}
.refs h2 {
  font: 600 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .8rem;
}
.refs ul { list-style: none; margin: 0; padding: 0; }
.refs li { padding: .6rem 0; border-top: 1px solid var(--line-2); }
.refs li:first-child { border-top: 0; padding-top: 0; }
.refs li a { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); }
.refs li a:hover { color: var(--brand-ink); text-decoration: none; }
.refs .t { display: block; margin-top: .2rem; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.author-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9rem;
  align-items: start;
  margin-top: 1.25rem;
  padding: 1.2rem 1.3rem;
  background: var(--warm);
  border: 1px solid var(--warm-2);
  border-radius: var(--r-m);
}
.author-card .n { margin: 0; font-size: 15.5px; font-weight: 620; }
.author-card .n a { color: var(--ink); text-decoration: none; }
.author-card .n a:hover { color: var(--brand-ink); }
.author-card .r { margin: .2rem 0 0; font-size: 13.5px; color: var(--brand-ink); }
.author-card .bio { margin: .55rem 0 0; font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.author-card .more { margin: .7rem 0 0; font-size: 13.5px; }
.author-card .more a { color: var(--muted); text-decoration: none; }
.author-card .more a:hover { color: var(--brand-ink); }

/* ── narrow ─────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .doc-grid { grid-template-columns: 1fr; gap: 2rem; }
  .rail { position: static; }
}

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-evidence { max-width: 26rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  main.wrap { padding-top: 1.5rem; }
  .prose { font-size: 16.5px; }
  header.site nav { gap: .9rem; }
  header.site nav a { font-size: 13.5px; }
  .hero { padding: 1.4rem 1.1rem; }
  .hero .counts { gap: .4rem 1.1rem; }
  .hero .counts span { padding-right: 0; margin-right: 0; border-right: 0; }
  .hero .counts b { font-size: 1.25rem; }
  #findings { margin: 2rem 0 1rem; padding: 1.3rem 1.05rem; border-radius: var(--r-l); }
  .author-card { grid-template-columns: 1fr; }
  ul.rows li {
    padding: 1.05rem .75rem;
    margin: 0 -.75rem;
  }
  ul.rows .rt { font-size: 1.12rem; }
  ul.rows .rd { grid-column: 1 / -1; white-space: normal; }
  ul.rows .rm { grid-column: 1 / -1; margin-top: .15rem; text-align: left; }
  footer.site .foot-grid { grid-template-columns: 1fr; }
  footer.site nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .readbar { display: none; }
  ul.rows li:hover { transform: none; }
}

/* ── topic rail ──────────────────────────────────────────────────────────── */

.topics {
  margin: 1.25rem 0 .5rem;
  padding: 1rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
}
.topics h2 {
  font: 600 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .3rem;
}
.topics .sub { margin: 0 0 .85rem; font-size: 13.5px; color: var(--muted); }
.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .6rem;
}
.topic-list li {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .3rem .65rem;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  line-height: 1.4;
}
.topic-list a { color: var(--brand-ink); text-decoration: none; }
.topic-list a:hover { color: var(--brand); text-decoration: underline; }
.topic-list span { font: 500 11px/1 var(--mono); color: var(--faint); }
