/* ============================================================
   Self-Context — Glacial Light / Instrument-Panel Noir
   Inspired by Nerfies & EnvHarness academic restraint
   Three voices: Google Sans Flex · Literata · Google Sans Code
   Dual accent: Conventional Harness (amber/salmon) ⟷ Self-Context (emerald-teal)
   ============================================================ */
:root, [data-theme="light"] {
  --bg0: #FFFFFF;
  --bg1: #FAFAFB;
  --bg2: #F6F7F9;
  --panel: #FFFFFF;
  --panel-2: #FFFFFF;
  --line: #E9EAEE;
  --line-2: #D7DAE0;
  --ink: #24292F;
  --ink-2: #4B5158;
  --ink-3: #7A828C;

  --sc: #147558;
  --sc-deep: #0F5B44;
  --base: #B5701F;
  --base-deep: #8F5613;
  --mid: #2456B0;
  --red: #C94848;
  --salmon: #EE9180;
  --salmon-2: #DB7663;
  --onsc: #FFFFFF;

  --card-a: #FFFFFF;
  --card-b: #EEF6F3;
  --fillA-bg: #D3D9E1;
  --fillA-ink: #59636F;
  --hud-bg: rgba(255, 255, 255, .92);
}

[data-theme="dark"] {
  --bg0: #0D1117;
  --bg1: #11161D;
  --bg2: #161B22;
  --panel: #141A21;
  --panel-2: #161C24;
  --line: #262C36;
  --line-2: #39414D;
  --ink: #E6EDF3;
  --ink-2: #A8B3BF;
  --ink-3: #7A8491;

  --sc: #47C297;
  --sc-deep: #29946E;
  --base: #EFA75B;
  --base-deep: #C07E2F;
  --mid: #79A8F5;
  --red: #F07070;
  --salmon: #F09E8C;
  --salmon-2: #D9836F;
  --onsc: #FFFFFF;

  --card-a: #13221E;
  --card-b: #0D1815;
  --fillA-bg: #4A5563;
  --fillA-ink: #C4CDD8;
  --hud-bg: rgba(13, 17, 23, .92);
}

:root {
  --sc-ghost: color-mix(in srgb, var(--sc) 9%, transparent);
  --base-ghost: color-mix(in srgb, var(--base) 11%, transparent);
  --sc-line: color-mix(in srgb, var(--sc) 52%, transparent);
  --base-line: color-mix(in srgb, var(--base) 52%, transparent);

  --display: 'Google Sans Flex', 'Google Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans', system-ui, -apple-system, sans-serif;
  --sans: 'Google Sans Flex', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --read: 'Literata', 'Noto Serif SC', 'Songti SC', 'Noto Serif', Georgia, 'Times New Roman', serif;
  --mono: 'Google Sans Code', 'Roboto Mono', ui-monospace, 'SFMono-Regular', Menlo, 'Noto Sans SC', monospace;
  --measure: 780px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-fast: .14s;
  --t-base: .24s;
  --t-slow: .5s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-h, 62px) + 14px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  font-optical-sizing: auto;
  font-synthesis-weight: none;
  overflow-x: hidden;
  transition: background-color .35s, color .35s;
}
::selection { background: color-mix(in srgb, var(--sc) 18%, transparent); }
a { color: var(--sc); text-decoration: none; transition-timing-function: var(--ease); }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sc); outline-offset: 2px; border-radius: 6px; }
code {
  font-family: var(--mono);
  font-size: .86em;
  letter-spacing: -.005em;
  background: var(--bg2);
  padding: 1.5px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Circular theme wipe via View Transitions */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ============================================================
   HUD NAV
   ============================================================ */
.hud {
  position: sticky; top: 0; left: 0; right: 0; z-index: 90;
  background: var(--hud-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.hud.scrolled {
  background: var(--hud-bg);
  border-color: var(--line);
  box-shadow: 0 1px 8px rgba(15, 20, 30, .05);
}
.hud-in {
  max-width: 1240px; margin: 0 auto; padding: 11px 24px;
  display: flex; align-items: center; gap: 16px;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 17px;
  letter-spacing: .01em; color: var(--ink); white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 9px; text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark .mark { width: 22px; height: 22px; flex: none; }

.hud-nav { display: flex; gap: 15px; margin-left: auto; align-items: center; flex-wrap: nowrap; }
.hud-nav a {
  position: relative; white-space: nowrap;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; color: var(--ink-2);
}
.hud-nav a:hover { color: var(--sc); text-decoration: none; }
.hud-nav a:not(.navbtn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px;
  background: var(--sc); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}
.hud-nav a:not(.navbtn):hover::after { transform: scaleX(1); }
.navbtn {
  border: 1px solid var(--line-2); border-radius: 7px;
  padding: 5.5px 11px !important; color: var(--ink) !important;
}
.navbtn:hover { border-color: var(--sc); color: var(--sc) !important; }
.tbtn {
  cursor: pointer; background: none; border: 1px solid var(--line-2); color: var(--ink-2);
  padding: 5.5px 10px; border-radius: 7px; font-family: var(--mono); font-size: 11.5px;
  white-space: nowrap; transition: all .2s var(--ease);
}
.tbtn:hover { border-color: var(--sc); color: var(--sc); }
.tbtn.lang-btn {
  color: var(--sc-deep); border-color: var(--sc-line); background: var(--sc-ghost); font-weight: 600;
}
[data-theme="dark"] .tbtn.lang-btn { color: var(--sc); }

/* Mobile Sub-Nav Strip — strictly hidden on desktop, flex only on <=760px */
.hud .mob-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 7px 14px;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hud .mob-nav::-webkit-scrollbar { display: none; }
.hud .mob-nav a {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
  white-space: nowrap; flex-shrink: 0;
}
.hud .mob-nav a:hover { color: var(--sc); text-decoration: none; }

@media (max-width: 1180px) {
  .hud-nav { gap: 11px; }
  .hud-nav a.hide-m { display: none; }
}
@media (max-width: 980px) { .hud-nav a.hide-s { display: none; } }
@media (max-width: 760px) {
  .hud-nav a[href^="#"], .hud-nav a.hide-xs { display: none; }
  .hud-in { padding: 9px 14px; gap: 8px; }
  .hud-nav { gap: 6px; }
  .navbtn { padding: 5px 9px !important; font-size: 11px !important; }
  .tbtn { padding: 5px 8.5px; font-size: 11px; }
  .hud .mob-nav { display: flex; }
}

/* ============================================================
   HERO + DUAL INTERACTIVE SHOWCASE (.herofigs)
   ============================================================ */
.hero { position: relative; display: block; padding: 38px 24px 36px; overflow: hidden; }
@media (max-width: 760px) {
  .hero { padding: 24px 16px 26px; }
}
.hero-in { position: relative; max-width: 1180px; margin: 0 auto; width: 100%; text-align: center; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px;
}
.eyebrow b { color: var(--sc); font-weight: 600; }

.papertitle {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(25px, 3.6vw, 37px);
  max-width: 1040px; margin-inline: auto; text-wrap: balance;
  line-height: 1.15; letter-spacing: -.026em; color: var(--ink);
}
.papertitle .grad, .tagline .grad { color: var(--sc); }

.authors {
  margin: 16px auto 0; max-width: 1020px; text-wrap: balance;
  font-size: 14.8px; line-height: 1.78; color: var(--ink-2);
}
.authors b { color: var(--ink); font-weight: 600; }
.authors sup { color: var(--ink-3); font-size: .68em; }
.affils {
  margin: 8px auto 0; font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-3); letter-spacing: .015em; line-height: 1.68; max-width: 980px;
}
.affils sup { font-size: .75em; }
.fnotes {
  margin: 7px auto 0; font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-3); opacity: .92;
}
.tagline {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(19px, 2.25vw, 26px);
  line-height: 1.32; margin: 28px auto 0; max-width: 840px;
  letter-spacing: -.02em; color: var(--ink);
}

.cta { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.bicon { width: 16px; height: 16px; flex: 0 0 auto; display: block; }
.btn-hero {
  display: inline-flex; align-items: center; gap: 9px; line-height: 1;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  padding: 11px 22px; border-radius: 999px;
  border: 1px solid var(--ink); color: var(--bg0); background: var(--ink);
  transition: all .2s var(--ease); text-decoration: none;
}
.btn-hero:hover {
  background: color-mix(in srgb, var(--ink) 84%, var(--bg0));
  border-color: color-mix(in srgb, var(--ink) 84%, var(--bg0));
  color: var(--bg0); text-decoration: none; transform: translateY(-1px);
}
.btn-hero:active { transform: translateY(1px) scale(.995); }
.btn-hero.primary {
  position: relative; overflow: hidden;
  background: var(--sc-deep); border-color: var(--sc-deep); color: #fff; font-weight: 600;
}
.btn-hero.primary:hover { background: var(--sc); border-color: var(--sc); color: #fff; }
[data-theme="dark"] .btn-hero.primary { background: var(--sc-deep); border-color: var(--sc-deep); color: #fff; }
.btn-hero.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -45%; width: 34%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg); transition: left .55s ease;
}
.btn-hero.primary:hover::after { left: 125%; }

/* Dual Hero Panels */
.vpanel {
  margin-top: 30px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 26px 20px;
  box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
  transition: box-shadow var(--t-slow) var(--ease);
}
@media (max-width: 600px) {
  .vpanel { padding: 18px 16px 16px; border-radius: 14px; }
}
.vtitle {
  font-family: var(--mono); font-size: 11px; letter-spacing: .13em; line-height: 1.45;
  color: var(--ink-3); margin-bottom: 18px; text-align: left; text-transform: uppercase;
}
.herofigs {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px; max-width: 1180px; margin: 32px auto 0; align-items: stretch;
}
@media (max-width: 980px) { .herofigs { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.herofigs .heropanel { margin: 0; height: 100%; max-width: none; text-align: left; }

.vchart { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px); padding: 4px 4px 0; }
.vgroup { min-width: 0; }
.vplot {
  position: relative; height: 236px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 6px;
  align-items: end; justify-items: center;
  border-bottom: 1.5px solid var(--line-2);
  background: repeating-linear-gradient(to top, color-mix(in srgb, var(--line) 72%, transparent) 0 1px, transparent 1px 46px);
}
@media (max-width: 540px) {
  .vchart { gap: 8px; padding: 4px 0 0; }
  .vplot { height: 210px; gap: 4px; padding: 0 2px; }
}
.vcol { position: relative; width: 100%; max-width: 44px; height: 100%; cursor: pointer; }
.vfill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  border-radius: 8px 8px 0 0;
  transition: height 1.9s cubic-bezier(.26, .82, .3, 1);
}
.vpanel.noanim .vfill, .vpanel.noanim .vval, .vpanel.noanim .vdelta { transition: none !important; }
.vcol.a .vfill { background: var(--fillA-bg); }
.vcol.b .vfill { background: linear-gradient(180deg, var(--salmon), var(--salmon-2)); }
.vcol.c .vfill {
  background: linear-gradient(180deg, var(--sc), var(--sc-deep));
  box-shadow: 0 4px 16px -6px color-mix(in srgb, var(--sc) 42%, transparent);
}
.vcol.c .vfill::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.32), transparent 44%);
}
.vval {
  position: absolute; left: 50%; translate: -50% 0; bottom: 8px; z-index: 2;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; opacity: 0;
  transition: bottom 1.9s cubic-bezier(.26, .82, .3, 1), opacity .55s ease 1s;
}
.vval.in { opacity: 1; }
.vcol.c .vval { color: var(--sc-deep); font-size: 11.5px; font-weight: 700; }
[data-theme="dark"] .vcol.c .vval { color: var(--sc); }

.vdelta {
  position: absolute; left: 50%; translate: -50% 0; bottom: 8px; z-index: 3;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; line-height: 1.2;
  font-variant-numeric: tabular-nums;
  padding: 2.5px 7px; border-radius: 11px; white-space: nowrap;
  color: var(--onsc); background: linear-gradient(120deg, var(--sc-deep), var(--sc));
  box-shadow: 0 3px 12px -4px color-mix(in srgb, var(--sc) 68%, transparent);
  opacity: 0; scale: .72;
  transition: bottom 1.9s cubic-bezier(.26, .82, .3, 1), opacity .5s ease 1.55s, scale .55s cubic-bezier(.2, .9, .3, 1.4) 1.55s;
}
.vdelta.in { opacity: 1; scale: 1; }
@media (max-width: 640px) {
  .vval { font-size: 9.5px; }
  .vcol.c .vval { font-size: 10px; }
  .vdelta { font-size: 8.5px; padding: 2px 5px; }
  .vcol.c .vdelta { left: auto; right: 0; translate: 0 0; }
}
.vglab {
  margin-top: 10px; text-align: center; font-family: var(--mono);
  font-size: 11px; color: var(--ink-2); letter-spacing: .01em; line-height: 1.3;
}
@media (max-width: 540px) { .vglab { font-size: 9.5px; } }
.legend {
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-start;
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  color: var(--ink-2); margin-top: 16px;
}
.legend i {
  display: inline-block; width: 8px; height: 16px;
  border-radius: 3px 3px 1.5px 1.5px; vertical-align: -3px; margin-right: 7px;
}
.sw.swa { background: var(--fillA-bg); }
.sw.swb { background: linear-gradient(180deg, var(--salmon), var(--salmon-2)); }
.sw.swc {
  background: linear-gradient(180deg, var(--sc), var(--sc-deep));
  box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--sc) 52%, transparent);
}

/* Right Hero Panel: Self-Drawing Cumulative Curve */
.lpanel { display: flex; flex-direction: column; }
.lchart { width: 100%; display: block; margin-top: 2px; overflow: visible; }
.lchart .gl { stroke: var(--line); stroke-width: 1; }
.lchart .ax-l { stroke: var(--line-2); stroke-width: 1.2; }
.lchart .ax { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.lchart .axt { font-family: var(--sans); font-size: 11.5px; font-weight: 600; fill: var(--ink-2); }
.lchart .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.lchart .dot, .lchart .endlab, .lchart .endnote, .lchart .endval { opacity: 0; }
.lchart .endlab { font-family: var(--sans); font-size: 12px; font-weight: 600; }
.lchart .endnote { font-family: var(--sans); font-size: 10.5px; font-weight: 500; }
.lchart .endval { font-family: var(--mono); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lchart .sm .ln { stroke: color-mix(in srgb, var(--fillA-bg) 78%, var(--ink-3)); }
.lchart .sm .dot { fill: color-mix(in srgb, var(--fillA-bg) 78%, var(--ink-3)); }
.lchart .sm .endlab, .lchart .sm .endval, .lchart .sm .endnote { fill: var(--ink-3); }
.lchart .lt .ln { stroke: var(--salmon-2); }
.lchart .lt .dot { fill: var(--salmon-2); }
.lchart .lt .endlab, .lchart .lt .endval, .lchart .lt .endnote { fill: var(--salmon-2); }
[data-theme="dark"] .lchart .lt .endlab, [data-theme="dark"] .lchart .lt .endval, [data-theme="dark"] .lchart .lt .endnote { fill: var(--salmon); }
.lchart .eh .ln { stroke: var(--sc-deep); stroke-width: 2.8; }
[data-theme="dark"] .lchart .eh .ln { stroke: var(--sc); }
.lchart .eh .dot { fill: var(--sc-deep); }
[data-theme="dark"] .lchart .eh .dot { fill: var(--sc); }
.lchart .eh .endlab, .lchart .eh .endval, .lchart .eh .endnote { fill: var(--sc-deep); }
[data-theme="dark"] .lchart .eh .endlab, [data-theme="dark"] .lchart .eh .endval, [data-theme="dark"] .lchart .eh .endnote { fill: var(--sc); }
.lchart .guide { stroke: var(--sc-line); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity .5s ease; }
.lchart.in .dot, .lchart.in .endlab, .lchart.in .endnote, .lchart.in .endval, .lchart.in .guide { opacity: 1; }
.lfoot {
  margin-top: auto; padding-top: 10px; font-family: var(--read); font-size: 13px;
  line-height: 1.55; color: var(--ink-3);
}
.lfoot b { color: var(--ink-2); }

/* ============================================================
   SECTIONS & THREE-VOICE TYPOGRAPHY
   ============================================================ */
.sec {
  max-width: 1180px; margin: 0 auto; padding: 58px 26px 46px;
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}
@media (max-width: 760px) {
  .sec { padding: 40px 16px 34px; }
}
.sec-head { max-width: 920px; }
.secno {
  font-family: var(--mono); font-size: 12px; letter-spacing: .15em; color: var(--sc);
  display: inline-flex; align-items: center; gap: 12px; text-transform: uppercase;
}
.secno::after { content: ""; width: 56px; height: 1px; background: linear-gradient(90deg, var(--sc), transparent); }
h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(25px, 2.9vw, 35px); line-height: 1.14;
  letter-spacing: -.022em; margin-top: 12px; color: var(--ink);
}
h3 {
  font-family: var(--display); font-size: 20px; font-weight: 700;
  letter-spacing: -.015em; margin-top: 38px; color: var(--ink);
}
.lead {
  margin-top: 16px; font-family: var(--read); font-optical-sizing: auto;
  font-size: 17.5px; line-height: 1.74; color: var(--ink-2); max-width: var(--measure);
}
.lead b, strong { color: var(--ink); font-weight: 600; }

/* Scroll reveal — small threshold & gentle shift so mobile never shows blank gaps */
.rv { opacity: 0; transform: translateY(10px); }
.rv.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }

/* ============================================================
   01 · THE IDEA — TWO-SIDED SPINE LEDGER (.anal) + FIGURE 1
   ============================================================ */
.anal {
  position: relative; margin-top: 34px; padding: 6px clamp(14px, 3.4vw, 40px) 28px;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--base) 5.5%, transparent), transparent 44%),
    linear-gradient(270deg, color-mix(in srgb, var(--sc) 6%, transparent), transparent 44%),
    var(--panel);
  box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
}
.anal::before {
  content: ""; position: absolute; left: 50%; top: 72px; bottom: 32px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}
.agrid { display: grid; grid-template-columns: 1fr minmax(108px, 146px) 1fr; align-items: center; }
.ahead { padding: 24px 0 18px; }
.ah {
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: .12em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.ah.l { grid-column: 1; justify-content: flex-end; text-align: right; color: var(--base-deep); padding-right: 22px; }
.ah.r { grid-column: 3; color: var(--sc-deep); padding-left: 22px; }
[data-theme="dark"] .ah.l { color: var(--base); }
[data-theme="dark"] .ah.r { color: var(--sc); }
.ah .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.ah.l .dot { background: var(--base); }
.ah.r .dot { background: var(--sc); }
.ours {
  font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: .12em;
  padding: 2.5px 8px; border-radius: 10px; border: 1px solid var(--sc-line);
  color: var(--sc-deep); background: var(--sc-ghost); text-transform: none;
}
[data-theme="dark"] .ours { color: var(--sc); }
.arow { padding: 14px 0; }
.arow + .arow { border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent); }
.akey {
  grid-column: 2; justify-self: center; position: relative; z-index: 1;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; line-height: 1.35; padding: 5px 10px;
  background: var(--panel); border-radius: 8px;
}
.aval {
  grid-row: 1; font-size: 15px; line-height: 1.52; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: color var(--t-base) var(--ease);
}
.aval.l { grid-column: 1; text-align: right; padding-right: 22px; }
.aval.r { grid-column: 3; padding-left: 22px; }
.aval b { color: var(--ink); font-weight: 600; }
.arow:hover .aval { color: var(--ink); }
.aout { padding-top: 18px; }
.aout .aval { font-family: var(--display); font-weight: 700; font-size: clamp(15px, 1.45vw, 17.5px); }
.aout .aval.l { color: var(--base-deep); }
.aout .aval.r { color: var(--sc-deep); }
[data-theme="dark"] .aout .aval.l { color: var(--base); }
[data-theme="dark"] .aout .aval.r { color: var(--sc); }

@media (max-width: 740px) {
  .anal { padding: 4px 16px 22px; }
  .anal::before { display: none; }
  .agrid { grid-template-columns: 1fr; row-gap: 7px; }
  .ahead { padding: 20px 0 4px; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .ah { font-size: 11px; letter-spacing: .08em; gap: 7px; }
  .ah.l { grid-column: 1; justify-content: flex-start; text-align: left; padding: 0; }
  .ah.r { grid-column: 2; padding: 0; }
  .ours { display: none; }
  .akey { grid-column: 1; justify-self: start; padding: 0; background: none; font-size: 9px; }
  .aval { grid-row: auto; font-size: 13.5px; padding: 0 0 0 13px; }
  .aval.l { grid-column: 1; text-align: left; border-left: 2px solid var(--base-line); }
  .aval.r { grid-column: 1; border-left: 2px solid var(--sc-line); }
}

figure.paper-fig {
  margin: 34px 0 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 22px 18px;
  box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
}
figure.paper-fig .img-sheet {
  background: #ffffff; border-radius: 10px; padding: 12px;
  border: 1px solid var(--line); overflow: hidden;
}
figure.paper-fig img { display: block; width: 100%; height: auto; }
figcaption, .figcap {
  font-family: var(--read); font-size: 13.5px; line-height: 1.65;
  color: var(--ink-3); margin-top: 14px;
}
figcaption b, .figcap b { color: var(--ink-2); }
.fnum {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sc); margin-right: 8px; font-weight: 600;
}

/* ============================================================
   02 · PLAYGROUND — LIVE IN-BROWSER SELF-CONTEXT SANDBOX
   ============================================================ */
.boot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 28px; padding: 11px 16px; border-radius: 10px;
  border: 1px solid var(--sc-line); background: var(--sc-ghost);
  font-family: var(--mono); font-size: 12px; color: var(--sc-deep);
}
[data-theme="dark"] .boot { color: var(--sc); }
.boot .metrics { display: flex; gap: 16px; flex-wrap: wrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.boot .metrics b { color: var(--ink); }

.pg-grid {
  display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, .94fr);
  gap: 18px; margin-top: 14px; align-items: stretch;
}
@media (max-width: 1020px) { .pg-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
  transition: box-shadow var(--t-slow) var(--ease);
  display: flex; flex-direction: column;
}
.phead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 5%, transparent), transparent);
}
.phead h5 {
  font-size: 12px; font-family: var(--mono); font-weight: 600;
  letter-spacing: .06em; color: var(--ink); text-transform: uppercase;
}
.phead .tag { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.dual { display: grid; grid-template-columns: 1.08fr .92fr; flex: 1; }
@media (max-width: 680px) { .dual { grid-template-columns: 1fr; } }
.view { padding: 14px 15px; min-width: 0; display: flex; flex-direction: column; }
.view + .view { border-left: 1px solid var(--line); }
@media (max-width: 680px) { .view + .view { border-left: none; border-top: 1px solid var(--line); } }
.vhead {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.vhead .badge2 {
  font-size: 9.5px; padding: 2px 7px; border-radius: 20px;
  border: 1px solid var(--line-2); color: var(--ink-3); text-transform: none; letter-spacing: 0;
}
.view.obs .vhead { color: var(--sc-deep); }
[data-theme="dark"] .view.obs .vhead { color: var(--sc); }
.view.obs .vhead .badge2 { border-color: var(--sc-line); color: var(--sc-deep); }
[data-theme="dark"] .view.obs .vhead .badge2 { color: var(--sc); }

/* Turn cards & Graph nodes inside Playground */
.sublabel {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin: 10px 0 6px;
}
.sublabel:first-of-type { margin-top: 0; }
.turn-list { display: flex; flex-direction: column; gap: 6px; }
.tcard {
  border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px;
  background: var(--bg1); font-size: 12px; line-height: 1.45; cursor: pointer;
  transition: all .18s var(--ease);
}
.tcard:hover { border-color: var(--sc); transform: translateY(-1px); }
.tcard .thdr {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tcard .thdr .sz { color: var(--ink-3); font-weight: 500; }
.tcard .tbody {
  margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tcard.folded {
  border-style: dashed; border-color: var(--base); background: var(--base-ghost);
}
.tcard.folded .thdr { color: var(--base-deep); }
[data-theme="dark"] .tcard.folded .thdr { color: var(--base); }
.tcard.raw-ro { cursor: default; opacity: .88; }
.tcard.raw-ro:hover { border-color: var(--line-2); transform: none; }

.gnode-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.gnode {
  border: 1px solid var(--sc-line); border-radius: 8px; padding: 6px 9px;
  background: linear-gradient(170deg, var(--card-a), var(--card-b));
  font-family: var(--mono); font-size: 11px; line-height: 1.42; color: var(--ink);
}
.gnode .gid { color: var(--sc-deep); font-weight: 700; margin-right: 5px; }
[data-theme="dark"] .gnode .gid { color: var(--sc); }
.gnode .gtype {
  font-size: 9.5px; padding: 1px 5px; border-radius: 4px;
  background: var(--sc-ghost); color: var(--sc-deep); margin-right: 6px;
}
[data-theme="dark"] .gnode .gtype { color: var(--sc); }

.ht-invariants {
  margin-top: auto; padding-top: 12px;
}
.inv-box {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px;
  background: var(--bg1); display: flex; flex-direction: column; gap: 6px;
}
.inv-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
}
.inv-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-row b.ok { color: var(--sc-deep); }
[data-theme="dark"] .inv-row b.ok { color: var(--sc); }

.verdict {
  margin: 12px 15px; padding: 10px 13px; border-radius: 9px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5;
  border: 1px solid var(--line); background: var(--bg2); color: var(--ink-2);
}
.verdict.ok { border-color: var(--sc-line); color: var(--sc-deep); background: var(--sc-ghost); }
[data-theme="dark"] .verdict.ok { color: var(--sc); }
.verdict.err { border-color: var(--red); color: var(--red); }

.tabs { display: flex; gap: 4px; padding: 10px 12px 0; flex-wrap: wrap; }
.tab {
  font-family: var(--mono); font-size: 11px; padding: 6px 10px;
  border-radius: 8px 8px 0 0; border: 1px solid transparent; border-bottom: none;
  background: transparent; color: var(--ink-3); cursor: pointer; transition: all .15s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--bg2); color: var(--sc-deep); border-color: var(--line); font-weight: 600; }
[data-theme="dark"] .tab.active { color: var(--sc); }
.editor {
  width: 100%; flex: 1; min-height: 220px; background: var(--bg2); border: none;
  border-top: 1px solid var(--line); outline: none; resize: vertical;
  font-family: var(--mono); font-size: 12px; line-height: 1.62;
  color: var(--ink); padding: 14px; tab-size: 2;
}
.docline {
  font-family: var(--read); font-size: 13px; color: var(--ink-2);
  padding: 11px 14px; line-height: 1.58; border-top: 1px solid var(--line);
}
.docline code { color: var(--sc-deep); background: none; border: none; padding: 0; font-size: .92em; }
[data-theme="dark"] .docline code { color: var(--sc); }
.toolbar {
  display: flex; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--line);
  flex-wrap: wrap; align-items: center;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 8.5px 13px; border-radius: 9px; border: 1px solid var(--line-2);
  color: var(--ink); background: transparent; transition: all .18s var(--ease); cursor: pointer;
}
.btn:hover { border-color: var(--sc); color: var(--sc); }
.btn.primary {
  background: linear-gradient(120deg, var(--sc-deep), var(--sc) 140%);
  border-color: transparent; color: var(--onsc); font-weight: 600;
}
.btn.primary:hover { color: var(--onsc); filter: brightness(1.06); }
.status { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-left: auto; }
.status.ok { color: var(--sc-deep); }
[data-theme="dark"] .status.ok { color: var(--sc); }
.status.err { color: var(--red); }

.stack-view { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 12px; align-items: center; }
.stack-chip {
  font-family: var(--mono); font-size: 10.5px; padding: 3.5px 9px; border-radius: 20px;
  border: 1px solid var(--sc-line); background: var(--sc-ghost); color: var(--sc-deep);
}
[data-theme="dark"] .stack-chip { color: var(--sc); }
.empty-stack { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* ============================================================
   03 · ARCHITECTURE & TRAJECTORIES — TABBED VECTOR STAGE
   ============================================================ */
.stage-shell {
  margin-top: 26px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
}
.stage-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg1);
}
.stage-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.stab {
  font-family: var(--mono); font-size: 11.5px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2);
  cursor: pointer; transition: all .18s var(--ease);
}
.stab:hover { border-color: var(--sc); color: var(--ink); }
.stab[aria-selected="true"] {
  border-color: var(--sc); background: var(--sc-ghost); color: var(--sc-deep); font-weight: 600;
}
[data-theme="dark"] .stab[aria-selected="true"] { color: var(--sc); }

.stage-sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.subbtn {
  font-family: var(--mono); font-size: 10.5px; padding: 5px 9px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-3);
  cursor: pointer; transition: all .16s var(--ease);
}
.subbtn:hover { color: var(--ink); border-color: var(--line-2); }
.subbtn[aria-pressed="true"] { border-color: var(--sc-line); color: var(--sc-deep); background: var(--sc-ghost); }
[data-theme="dark"] .subbtn[aria-pressed="true"] { color: var(--sc); }
.ext-link { font-family: var(--mono); font-size: 11px; color: var(--sc); padding: 4px 8px; white-space: nowrap; }

.frame-wrap { position: relative; width: 100%; background: var(--bg1); }
.frame-wrap iframe {
  display: none; width: 100%; height: clamp(580px, 66vh, 660px); border: none; background: var(--bg1);
}
.frame-wrap iframe.active { display: block; }
@media (max-width: 760px) {
  .stage-bar { padding: 10px 12px; }
  .stab { font-size: 10.5px; padding: 6px 10px; }
}

/* ============================================================
   04 · RESULTS — 9-METHOD EXPLORER + ABLATIONS + .morep
   ============================================================ */
.res-controls {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.seg-group {
  display: inline-flex; background: var(--bg2); padding: 3px;
  border-radius: 9px; border: 1px solid var(--line); gap: 2px; flex-wrap: wrap;
}
.seg-btn {
  font-family: var(--mono); font-size: 11.5px; padding: 6px 11px; border-radius: 7px;
  border: none; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: all .16s var(--ease);
}
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-pressed="true"] {
  background: var(--panel); color: var(--sc-deep); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
[data-theme="dark"] .seg-btn[aria-pressed="true"] { color: var(--sc); }

.bar-scroll {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px;
}
.bar-inner { min-width: 600px; }

.bhead {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px;
  margin-bottom: 10px; text-align: center;
}
.bh { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bh .nm {
  font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh .vr { font-family: var(--mono); font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bh.ours .nm { color: var(--sc-deep); font-weight: 700; }
[data-theme="dark"] .bh.ours .nm { color: var(--sc); }
.bh.van .nm { color: var(--salmon-2); }
[data-theme="dark"] .bh.van .nm { color: var(--salmon); }

.plot9 {
  position: relative; height: 276px;
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px;
  align-items: end; padding: 0 6px;
  border-bottom: 1.5px solid var(--line-2);
  background: repeating-linear-gradient(to top, color-mix(in srgb, var(--line) 72%, transparent) 0 1px, transparent 1px 54px);
}
.bar {
  position: relative; height: 100%; display: flex; align-items: flex-end;
  justify-content: center; cursor: pointer;
}
.bar .bfill {
  width: 100%; max-width: 48px; height: 0; border-radius: 8px 8px 0 0;
  background: var(--fillA-bg);
  transition: height .85s cubic-bezier(.22, 1, .36, 1);
}
.bar.van .bfill { background: linear-gradient(180deg, var(--salmon), var(--salmon-2)); }
.bar.ours .bfill {
  background: linear-gradient(180deg, var(--sc), var(--sc-deep));
  box-shadow: 0 4px 16px -6px color-mix(in srgb, var(--sc) 45%, transparent);
}
.bar.on .bfill { height: var(--h); }
.bar .bval {
  position: absolute; bottom: calc(var(--h) + 7px); z-index: 2;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--ink-2); opacity: 0;
  transition: opacity .35s ease .3s;
}
.bar.on .bval { opacity: 1; }
.bar.ours .bval { color: var(--sc-deep); font-weight: 700; }
[data-theme="dark"] .bar.ours .bval { color: var(--sc); }
.arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 3; }
.arcpath { fill: none; stroke: var(--sc); stroke-width: 1.7; stroke-dasharray: 4 4; }
.archead { fill: var(--sc); }
.arclabel {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  fill: var(--sc-deep); text-anchor: middle;
}
[data-theme="dark"] .arclabel { fill: var(--sc); }

@media (max-width: 720px) {
  .plot9 { gap: 6px; height: 244px; }
  .bar .bval { font-size: 10.5px; }
}

.tbl-toggle { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.tbl-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data-tbl { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
table.data-tbl th, table.data-tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data-tbl th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); background: var(--bg1);
}
table.data-tbl td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
table.data-tbl th.n { text-align: right; }
table.data-tbl tr.ours-row { background: var(--sc-ghost); font-weight: 600; }
table.data-tbl tr.ours-row td { color: var(--sc-deep); }
[data-theme="dark"] table.data-tbl tr.ours-row td { color: var(--sc); }

/* Ablations & Operation Mix 2-Column Grid */
.abl-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 18px; margin-top: 20px; align-items: stretch;
}
@media (max-width: 920px) { .abl-grid { grid-template-columns: 1fr; } }
.abl-rows { display: flex; flex-direction: column; gap: 13px; margin-top: 8px; }
.abl-r { display: grid; grid-template-columns: 176px 1fr 54px; align-items: center; gap: 12px; }
@media (max-width: 560px) { .abl-r { grid-template-columns: 132px 1fr 46px; gap: 8px; } }
.abl-lbl { font-size: 13px; font-weight: 600; color: var(--ink); }
.abl-lbl small { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--ink-3); }
.abl-track { height: 12px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.abl-fill { height: 100%; border-radius: inherit; background: var(--fillA-bg); }
.abl-r.ours .abl-fill { background: linear-gradient(90deg, var(--sc-deep), var(--sc)); }
.abl-val { font-family: var(--mono); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.abl-r.ours .abl-val { color: var(--sc-deep); }
[data-theme="dark"] .abl-r.ours .abl-val { color: var(--sc); }

.op-bars { display: flex; flex-direction: column; gap: 11px; margin-top: 10px; }
.op-row { display: grid; grid-template-columns: 84px 1fr 58px; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; }
.op-bar { height: 9px; border-radius: 5px; background: var(--bg2); overflow: hidden; }
.op-bar i { display: block; height: 100%; border-radius: inherit; background: var(--sc); }
.op-bar.rev i { background: var(--mid); }
.op-bar.prn i { background: var(--base); }

/* EnvHarness-style "Also in the paper" (.morep) */
.morep {
  margin-top: 24px; border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px 18px;
  background: color-mix(in srgb, var(--sc) 4%, var(--bg0));
}
.morep h4 { font-family: var(--display); font-size: 15px; font-weight: 700; margin: 0 0 16px; letter-spacing: .01em; }
.mrow4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1020px) { .mrow4 { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 560px) { .mrow4 { grid-template-columns: 1fr; gap: 14px; } }
.mitem b {
  display: block; font-family: var(--display); font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--sc-deep); margin-bottom: 5px;
}
[data-theme="dark"] .mitem b { color: var(--sc); }
.mitem span { font-family: var(--read); font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.mfoot {
  margin: 18px 0 0; font-family: var(--read); font-size: 13px;
  color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px;
}

/* ============================================================
   05 · DISCUSSION, 06 · GATEWAY & CODE, 07 · CITE & FOOTER
   ============================================================ */
.disc-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
  gap: 24px; margin-top: 22px; align-items: start;
}
@media (max-width: 940px) { .disc-grid { grid-template-columns: 1fr; gap: 18px; } }
.take p {
  font-family: var(--read); font-optical-sizing: auto;
  font-size: 16.5px; line-height: 1.78; color: var(--ink-2); margin: 0 0 16px;
}
.take p:last-child { margin-bottom: 0; }
.take b { color: var(--ink); font-weight: 600; }

.scope-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
}
.scope-card h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sc); margin-bottom: 12px;
}
.scope-list { display: flex; flex-direction: column; gap: 11px; }
.scope-item {
  padding-left: 11px; border-left: 2px solid var(--sc-line);
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
}
.scope-item b { display: block; font-family: var(--sans); font-size: 13px; color: var(--ink); margin-bottom: 2px; }

.code-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px; margin-top: 22px;
}
@media (max-width: 900px) { .code-grid { grid-template-columns: 1fr; } }
.code-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
  display: flex; flex-direction: column;
}
.code-card pre {
  font-family: var(--mono); font-size: 12px; line-height: 1.65; flex: 1;
  padding: 16px 18px; color: var(--ink); background: var(--bg2);
  overflow-x: auto; margin: 0;
}

.cite-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: 18px; margin-top: 20px; align-items: stretch;
}
@media (max-width: 920px) { .cite-grid { grid-template-columns: 1fr; } }

.bib-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
  display: flex; flex-direction: column;
}
.bib-card pre {
  font-family: var(--mono); font-size: 12px; line-height: 1.68; flex: 1;
  background: var(--bg2); padding: 16px 18px; color: var(--ink-2);
  margin: 0; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}
.copy-bib { padding: 5.5px 11px; font-size: 11.5px; background: var(--panel); flex-shrink: 0; }

.res-links-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 1px 3px rgba(15, 20, 30, .05);
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.res-links-card h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sc); margin-bottom: 10px;
}
.rlink-list { display: flex; flex-direction: column; gap: 8px; }
.rlink {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg1); font-family: var(--mono); font-size: 12px; color: var(--ink);
  transition: all .16s var(--ease);
}
.rlink:hover { border-color: var(--sc); color: var(--sc); text-decoration: none; transform: translateX(2px); }
.rlink span { color: var(--ink-3); font-size: 11px; }
.cite-note {
  font-family: var(--read); font-size: 12.5px; line-height: 1.55; color: var(--ink-3);
  border-top: 1px solid var(--line); padding-top: 10px;
}

footer.site-foot {
  border-top: 1px solid var(--line); margin-top: 32px; padding: 36px 26px 44px;
  background: var(--bg1);
}
.foot-in { max-width: 1180px; margin: 0 auto; }
.foot-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: center; }
.org-strip { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.org {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  font-family: var(--display); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: all .18s var(--ease);
}
.org:hover { border-color: var(--sc); color: var(--sc); text-decoration: none; transform: translateY(-1px); }
.org img { height: 24px; width: auto; display: block; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; }
.foot-btm {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
}

/* Floating Tooltip (compatible with static/js/tooltips.js) */
.tip {
  position: fixed; z-index: 120; pointer-events: none; opacity: 0;
  max-width: 310px; padding: 9px 12px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: 0 8px 26px -8px rgba(0, 0, 0, .22);
  font-family: var(--sans); font-size: 12.5px; line-height: 1.48; color: var(--ink-2);
  transition: opacity .15s ease;
}
.tip[data-open="true"], .tip.open, .tip.on { opacity: 1; }
.tip .t { display: block; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.tip .v { font-family: var(--mono); font-weight: 600; color: var(--sc-deep); }
[data-theme="dark"] .tip .v { color: var(--sc); }
.tip-close { display: none; }
