/* ---------- MILO project page ---------- */

:root {
  --ink:        #101828;
  --ink-soft:   #475467;
  --ink-faint:  #7b8494;
  --rule:       #e4e7ec;
  --rule-soft:  #eef1f5;
  --bg:         #ffffff;
  --tint:       #f6f8fb;
  --tint-cool:  #eef2f7;

  --navy:       #003057;   /* Georgia Tech navy */
  --navy-deep:  #00203b;
  --navy-mid:   #1a4d7a;

  --accent:     #e8710a;   /* MILO: marks, bars, rules (Amazon orange, 3.09:1 on white) */
  --accent-ink: #ad4a07;   /* MILO: text (5.59:1 on white) */
  --accent-soft: rgba(232, 113, 10, .08);

  --blue:       #2f6db3;   /* automatically discovered harnesses */
  --teal:       #1a9e74;   /* minimal harness */
  --gray:       #8b93a0;   /* expert-designed harnesses */
  --seed:       #3b4252;   /* Best-of-3 seed */
  --good:       #1b7f3b;

  --grid:       #e6e9ef;
  --maxw:       1120px;

  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Source Serif 4", Charter, "Bitstream Charter", Georgia, serif;
  --mono:    "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0, 32, 59, .05), 0 1px 3px rgba(0, 32, 59, .04);
  --shadow-md: 0 6px 18px rgba(0, 32, 59, .08), 0 1px 3px rgba(0, 32, 59, .05);
  --shadow-lg: 0 18px 48px rgba(0, 32, 59, .12), 0 2px 8px rgba(0, 32, 59, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
a { color: var(--navy); text-decoration: none; border-bottom: 1px solid rgba(0, 48, 87, .26); }
a:hover { border-bottom-color: var(--accent); color: var(--accent-ink); }
b, strong { font-weight: 650; }
.vis-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }

/* ---------- sticky nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 6px 24px rgba(0, 32, 59, .06);
  transform: translateY(-100%); opacity: 0;
  transition: transform .32s cubic-bezier(.2, .7, .2, 1), opacity .28s ease;
}
.nav.show { transform: translateY(0); opacity: 1; }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 58px; }
.nav .mark { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--navy); letter-spacing: .04em; display: inline-flex; align-items: center; gap: 9px; border: 0; flex: none; }
.nav .mark img { width: 22px; height: 22px; border-radius: 6px; }
.nav .links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav .links a {
  border-bottom: none; font-size: 14px; font-weight: 550; color: var(--ink-soft);
  padding: 7px 12px; border-radius: 999px; line-height: 1; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav .links a:hover { color: var(--navy); background: var(--tint-cool); }
.nav .links a.active { color: var(--accent-ink); background: var(--accent-soft); font-weight: 650; }
.nav .nav-aws { height: 22px; width: auto; margin-left: 12px; padding-left: 18px; border-left: 1px solid var(--rule); flex: none; opacity: .9; }
.nav .nav-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); transform-origin: left center; transform: scaleX(0);
}
@media (max-width: 960px) {
  .nav .wrap { gap: 12px; }
  .nav .links { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .nav .links::-webkit-scrollbar { display: none; }
  .nav .links a { font-size: 13.5px; padding: 6px 10px; }
  .nav .nav-aws { display: none; }
}

/* ---------- side rail: replaces the top bar on wide screens, marker slides with the scroll ---------- */
.rail {
  position: fixed; left: 30px; top: 50%; z-index: 40; display: none; flex-direction: column; padding: 6px 0;
  opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(-10px);
  transition: opacity .32s ease, transform .32s cubic-bezier(.2, .7, .2, 1);
}
.rail.show { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.rail::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--rule); }
.rail .rail-marker { position: absolute; left: -1px; top: 0; width: 3px; height: 18px; border-radius: 2px; background: var(--accent); opacity: 0; transition: transform .38s cubic-bezier(.4, 0, .2, 1), opacity .2s; }
.rail.has-current .rail-marker { opacity: 1; }
.rail a { position: relative; display: flex; align-items: baseline; gap: 11px; padding: 7px 4px 7px 20px; border: 0; color: var(--ink-faint); font-size: 12.5px; font-weight: 500; letter-spacing: .01em; line-height: 1.2; white-space: nowrap; transition: color .15s; }
.rail a .rn { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--ink-faint); min-width: 18px; transition: color .15s; }
.rail a:hover, .rail a:focus-visible { color: var(--navy); outline: none; }
.rail a.active { color: var(--navy); font-weight: 650; }
.rail a.active .rn, .rail a:hover .rn { color: var(--accent-ink); }
@media (min-width: 1280px) { .rail { display: flex; } .nav { display: none; } }
@media (min-width: 1280px) and (max-width: 1519px) {   /* compact rail: numbers only, the label surfaces as a chip on hover */
  .rail a .rl { position: absolute; left: 44px; top: 50%; transform: translateY(-50%) translateX(-6px); background: #fff; color: var(--navy); font-weight: 600; padding: 4px 9px; border-radius: 7px; box-shadow: var(--shadow-md); border: 1px solid var(--rule); opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease; }
  .rail a:hover .rl, .rail a:focus-visible .rl { opacity: 1; transform: translateY(-50%); }
}

/* ---------- header ---------- */
header {
  position: relative; padding: 58px 0 6px; text-align: center; overflow: hidden;
  background:
    radial-gradient(1100px 380px at 50% -60px, rgba(47, 109, 179, .12), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(0, 48, 87, .085) 1px, transparent 1.5px) 0 0 / 26px 26px,
    linear-gradient(180deg, var(--tint-cool) 0%, rgba(242, 245, 249, .35) 55%, #fff 100%);
}
header::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 62%, #fff 100%);
}
header .wrap { position: relative; z-index: 1; }
header::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent); z-index: 2; }
.hero-brand { position: absolute; top: -4px; right: 28px; display: block; }
.hero-brand img { height: 30px; width: auto; display: block; opacity: .92; }
@media (max-width: 940px) {
  .hero-brand { position: static; margin: 0 auto 22px; }
}
.nav .nav-aws { height: 24px; width: auto; margin-left: 22px; opacity: .9; }
@media (max-width: 860px) { .nav .nav-aws { margin-left: auto; } }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 15px 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--rule); box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 550; color: var(--ink-soft); letter-spacing: .02em; margin-bottom: 22px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(232, 113, 10, .14); }
.badge .sep { color: var(--rule); }
.badge a { color: var(--accent-ink); border-bottom-color: rgba(173, 74, 7, .35); font-weight: 650; }

h1.title {
  font-family: var(--display); font-size: clamp(34px, 5vw, 58px); line-height: 1.08;
  letter-spacing: -.018em; font-weight: 600; margin: 0 auto 18px; color: var(--navy);
  text-wrap: balance; max-width: 980px;
}
h1.title .brand { color: var(--accent-ink); letter-spacing: .02em; }
.tagline { font-size: 17.5px; line-height: 1.6; color: var(--ink-soft); max-width: 940px; margin: 0 auto 28px; text-wrap: balance; }
.tagline em { color: var(--ink); font-style: normal; font-weight: 600; }
.tagline.tagline-result { margin-top: -14px; color: var(--ink-faint); max-width: 900px; }

.authors { font-size: 16.5px; line-height: 1.9; margin: 0 auto 10px; max-width: 900px; color: var(--ink-soft); }
.authors a { border-bottom: none; color: var(--ink); font-weight: 600; }
.authors a:hover { color: var(--accent-ink); }
.authors .au { color: var(--ink); font-weight: 600; }
.authors sup, .affil sup { font-size: 10.5px; color: var(--accent-ink); font-weight: 700; margin-left: 1px; }
.au { display: inline-block; white-space: nowrap; margin-right: 6px; }
.affil { font-size: 15px; color: var(--ink-faint); margin: 0 0 4px; }
.affil .au { margin: 0 11px; }
.note { font-size: 12.5px; color: var(--ink-faint); margin: 0 auto; padding-bottom: 46px; max-width: 820px; line-height: 1.6; }
.note a { color: var(--ink-faint); border-bottom-color: rgba(123, 132, 148, .35); }

.logos {
  display: inline-flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap;
  margin: 22px auto 0; padding: 4px 8px; border-radius: 16px;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--rule); box-shadow: var(--shadow-sm);
}
.logos > span { display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; }
.logos > span + span { border-left: 1px solid var(--rule); }
.logos img { height: 34px; width: auto; display: block; opacity: .95; transition: opacity .25s ease, transform .25s ease; }
.logos img.tall { height: 46px; }
.logos img.short { height: 36px; }
.logos img.wide { height: 24px; }
.logos img:hover { opacity: 1; transform: translateY(-1px); }

/* ---------- buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 22px; }
.btn {
  --brand: var(--navy); --brand-ink: #fff; --brand-edge: #cdd4de;
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px;
  background: #fff; color: var(--brand); font-size: 15px; font-weight: 600; letter-spacing: .005em;
  border: 1px solid var(--brand-edge); box-shadow: var(--shadow-sm);
  transition: background .16s, border-color .16s, color .16s, transform .14s, box-shadow .16s;
}
.btn:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-arxiv  { --brand: #b31b1b; --brand-edge: #e8c4c4; }
.btn-pdf    { --brand: #475569; --brand-edge: #cfd6e0; }
.btn-github { --brand: #24292f; --brand-edge: #ccd1d8; }
.btn-hf     { --brand: #7a5200; --brand-edge: #efd88f; }
.btn-hf:hover { background: #ffd21e; border-color: #e8bb00; color: #1f2328; }
.btn-cite   { --brand: var(--navy); --brand-edge: #cdd4de; }
.btn.soon { border-style: dashed; box-shadow: none; cursor: default; pointer-events: none; opacity: .72; }
.btn.soon .tag-soon {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand);
}
@media (max-width: 540px) { .btn { padding: 10px 15px; font-size: 14px; } }

/* ---------- sections ---------- */
section { padding: 78px 0; }
section.alt { background: var(--tint); }
section + section:not(.alt):not(.statband) { border-top: 1px solid var(--rule-soft); }
.h2row { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; }
.h2row .no {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  color: #fff; background: var(--navy); border-radius: 6px; padding: 4px 9px;
}
h2 { font-family: var(--display); font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.012em; font-weight: 600; margin: 0; color: var(--navy); }
h3 { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.006em; margin: 48px 0 10px; color: var(--navy); }
h3 .qual { color: var(--ink-faint); font-weight: 400; font-family: var(--sans); font-size: 15px; margin-left: 8px; }
h4 { margin: 0 0 8px; font-size: 18px; font-weight: 650; color: var(--navy); }
p { margin: 0 0 17px; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 20px; line-height: 1.58; color: var(--ink); letter-spacing: -.004em; margin-bottom: 22px; }
.abstract { font-size: 17px; line-height: 1.75; color: var(--ink-soft); }
.abstract b { color: var(--ink); }
.two-col-text { columns: 2; column-gap: 40px; column-fill: balance; }
@media (max-width: 860px) { .two-col-text { columns: 1; } }
.kicker {
  display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px;
}

/* ---------- figures ---------- */
figure { margin: 0 0 8px; background: var(--tint); border: 1px solid var(--rule); border-radius: 16px; padding: 0; overflow: hidden; }
figure img { width: 100%; height: auto; display: block; background: #fff; }
.figscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; padding: 18px 18px 10px; }
@media (max-width: 760px) { .figscroll img { min-width: 720px; } }
figcaption { font-size: 14.5px; line-height: 1.62; color: var(--ink-soft); margin: 0; padding: 16px 24px 18px; border-top: 1px solid var(--rule); background: var(--tint); text-align: left; }
figcaption b { color: var(--ink); }
.fignum { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-right: 9px; }
.teaser { padding: 50px 0 0; }
.teaser figure { box-shadow: var(--shadow-md); }
/* Fig. 1 is the interactive walkthrough (static/milo-method.html, 1120x630 stage scaled to fit);
   the static SVG is the no-JS and print fallback */
.figlive { padding: 0; }
.figlive .live-wrap { position: relative; width: 100%; padding-top: 56.25%; }
.figlive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.figlive .figstatic { display: none; padding: 18px 18px 10px; }
@media (max-width: 760px) {
  .figlive .live-wrap { width: 720px; padding-top: 405px; }
  .figlive { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
  .figlive.at-end { -webkit-mask-image: none; mask-image: none; }
}
.fighint { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--ink-faint); }
.fighint a { color: var(--accent-ink); border-bottom-color: rgba(173, 74, 7, .35); }
.fighint a.peek-static { cursor: zoom-in; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
/* press-and-hold peek at the static figure */
.peek { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; background: rgba(0, 32, 59, .58); backdrop-filter: blur(7px) saturate(120%); -webkit-backdrop-filter: blur(7px) saturate(120%); opacity: 0; pointer-events: none; transition: opacity .14s ease-in; }
.peek.on { opacity: 1; transition: opacity .22s ease-out; }
.peek-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 20, 40, .35), 0 2px 10px rgba(0, 20, 40, .12); padding: 18px 18px 12px; max-width: 94vw; max-height: 92vh;
  transform: translateY(12px) scale(.965); transition: transform .14s ease-in; }
.peek.on .peek-card { transform: none; transition: transform .28s cubic-bezier(.2, .75, .2, 1); }   /* rises and settles on press, slips away on release */
@media (prefers-reduced-motion: reduce) { .peek-card, .peek.on .peek-card { transform: none; transition: none; } .peek, .peek.on { transition: opacity .12s linear; } }
.peek-card img { display: block; width: auto; height: auto; max-width: calc(94vw - 36px); max-height: calc(92vh - 62px); }
.peek-label { font-size: 12.5px; color: var(--ink-faint); text-align: center; letter-spacing: .02em; }
.fighint .h-touch, .fighint .h-swipe { display: none; }
@media (hover: none) { .fighint .h-mouse { display: none; } .fighint .h-touch { display: inline; } }
@media (hover: none) and (max-width: 760px) { .fighint .h-swipe { display: inline; } }
.alt figcaption { background: #fff; }

/* ---------- stat band ---------- */
.statband { background: var(--navy-deep); color: #fff; padding: 46px 0 44px; position: relative; margin: 56px auto 0; width: calc(100% - 56px); max-width: calc(var(--maxw) - 56px); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-md); }
.statband::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
.statband .wrap { padding: 0 26px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { position: relative; padding-left: 18px; }
.stat::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--accent); }
.stat .t { display: block; font-size: 12.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: #ff9900; margin-bottom: 8px; }
.stat .k { display: block; font-size: clamp(30px, 2.7vw, 38px); font-weight: 650; line-height: 1.05; letter-spacing: -.02em; color: #fff; }
.stat .k.k-text { font-size: clamp(20px, 1.85vw, 25px); letter-spacing: -.01em; white-space: nowrap; }
.stat .k small { font-size: .5em; font-weight: 600; color: #b7c2d6; letter-spacing: 0; margin-left: 4px; }
.stat .lbl { display: block; margin-top: 10px; font-size: 14px; line-height: 1.5; color: #a9b7cc; }
.stat .lbl b { color: #e6ecf5; font-weight: 600; }


/* ---------- overview: anatomy strip, fact callout, problem box, design choices ---------- */
.anatomy { display: grid; grid-template-columns: 1fr auto 1.35fr auto 1fr; gap: 0; align-items: stretch; margin: 30px 0 18px; }
.an-tile { position: relative; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px 18px; box-shadow: var(--shadow-sm); }
.an-tile .an-k { display: block; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--navy); margin-bottom: 6px; letter-spacing: -.005em; }
.an-tile .an-k i { font-family: var(--display); font-style: italic; }
.an-tile .an-t { display: block; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.an-tile .an-t b { color: var(--ink); }
.an-harness { border: 1.5px solid var(--accent); box-shadow: 0 10px 28px rgba(232, 113, 10, .10), var(--shadow-sm); background: linear-gradient(180deg, #fff, #fffaf4); }
.an-harness .an-tag { position: absolute; top: -11px; left: 18px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 999px; }
.an-arrow { display: flex; align-items: center; justify-content: center; position: relative; width: 108px; }
.an-arrow::before { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1.5px; background: #c3cad6; }
.an-arrow::after { content: ""; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px; border-top: 1.5px solid #c3cad6; border-right: 1.5px solid #c3cad6; transform: translateY(-50%) rotate(45deg); }
.an-arrow span { position: relative; background: var(--bg); padding: 2px 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); text-align: center; line-height: 1.3; }
.fact { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; margin: 0 0 30px; padding: 18px 26px; background: var(--tint); border: 1px solid var(--rule); border-radius: 14px; }
.fact-num { display: inline-flex; align-items: baseline; gap: 10px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
.fact-num .from { font-size: 26px; color: var(--ink-faint); }
.fact-num .arr { font-size: 22px; color: var(--ink-faint); }
.fact-num .to { font-size: 40px; color: var(--navy); }
.fact-body { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.fact-body b { color: var(--ink); }
.defbox { position: relative; margin: 34px 0 0; padding: 24px 28px 22px; background: #f6f5ff; border: 1px solid #e4e1fb; border-left: 3px solid #4877b8; border-radius: 12px; }
.def-tag { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4877b8; margin-bottom: 10px; }
.def-lead { font-family: var(--display); font-size: 20px; line-height: 1.45; color: var(--navy); margin: 0 0 16px; letter-spacing: -.005em; }
.def-lead i { font-style: italic; }
.def-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.def-grid > div { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.def-grid b { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); margin-bottom: 4px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
.choice { display: grid; grid-template-columns: 230px 1fr; gap: 0; background: #fff; border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease; }
.choice:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.choice .pict { background: var(--tint); border-right: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; padding: 18px 12px; }
.choice .pict svg { width: 100%; height: auto; max-width: 200px; overflow: visible; }
.choice-body { padding: 20px 22px 18px; }
.choice-body .kicker { margin-bottom: 6px; }
.choice-body h4 { font-family: var(--display); font-size: 19px; letter-spacing: -.005em; margin-bottom: 10px; }
.choice-body p { font-size: 14.5px; line-height: 1.58; color: var(--ink-soft); margin: 0; padding-left: 26px; position: relative; }
.choice-body p + p { margin-top: 10px; }
.choice-body .now { color: var(--ink); }
.mk { position: absolute; left: 0; top: 2px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800; line-height: 1; }
.mk-x { background: var(--tint-cool); color: var(--ink-faint); }
.mk-ok { background: var(--accent); color: #fff; }
@media (max-width: 1000px) {
  .anatomy { grid-template-columns: 1fr; gap: 6px; }
  .an-arrow { width: auto; height: 34px; }
  .an-arrow::before { left: 50%; right: auto; top: 6px; bottom: 6px; width: 1.5px; height: auto; }
  .an-arrow::after { right: auto; left: 50%; top: auto; bottom: 8px; transform: translateX(-50%) rotate(135deg); }
  .an-arrow span { display: none; }
  .fact { grid-template-columns: 1fr; gap: 10px; }
  .def-grid { grid-template-columns: 1fr; gap: 12px; }
  .choices { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .choice { grid-template-columns: 1fr; }
  .choice .pict { border-right: 0; border-bottom: 1px solid var(--rule); }
  .fact-num .to { font-size: 32px; }
}

/* ---------- cards ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.card {
  position: relative; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 12px;
  padding: 22px 24px; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card.blue { border-left-color: var(--blue); }
.card.blue .tag { color: var(--blue); }
.card h4 { font-family: var(--display); font-size: 19px; letter-spacing: -.005em; }
.card p { font-size: 15.5px; color: var(--ink-soft); margin: 0; line-height: 1.62; }
.card p + p { margin-top: 10px; }
.card p.adapt { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.card p.adapt b { color: var(--accent-ink); }
.card .tag { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.card .math { font-family: var(--display); font-style: italic; }
.card .mono { font-size: 13.5px; color: var(--navy); background: var(--tint); padding: 1px 6px; border-radius: 5px; }

/* problem -> fix pairs */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.pair > div { padding: 20px 22px; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }
.pair .prob { background: var(--tint); border-right: 1px solid var(--rule); }
.pair .tag { display: block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 8px; }
.pair .prob .tag { color: var(--ink-faint); }
.pair .fix .tag { color: var(--accent-ink); }
.pair h4 { font-size: 17px; margin-bottom: 6px; }
@media (max-width: 720px) { .pair { grid-template-columns: 1fr; } .pair .prob { border-right: 0; border-bottom: 1px solid var(--rule); } }

/* ---------- stepper (evolution loop) ---------- */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 28px; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 18px 18px 16px 18px; box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.step h5 { margin: 0 0 6px; font-size: 15.5px; font-weight: 650; color: var(--navy); }
.step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.step:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 50%; width: 6px; height: 6px; border-top: 1.5px solid #b9c3d3; border-right: 1.5px solid #b9c3d3; transform: translateY(-50%) rotate(45deg); }
@media (max-width: 980px) { .stepper { grid-template-columns: repeat(2, 1fr); } .step::after { display: none; } }
@media (max-width: 560px) { .stepper { grid-template-columns: 1fr; } }

/* orchestrator diagnosis -> intervention */
.diag { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.diag > div { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 18px 18px 16px; box-shadow: var(--shadow-sm); }
.diag .d { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-family: var(--mono); }
.diag .dn { font-size: 16px; font-weight: 650; color: var(--navy); margin: 6px 0 12px; }
.diag .arrow { color: #b9c3d3; font-size: 18px; line-height: 1; margin: 0 0 8px; }
.diag .act { display: inline-block; font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 9px; border-radius: 6px; margin-bottom: 8px; }
.diag p { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin: 0; }
@media (max-width: 980px) { .diag { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .diag { grid-template-columns: 1fr; } }

/* ---------- setup strip ---------- */
.setup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 8px; }
.setup > div { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.setup .n { display: block; font-size: 26px; font-weight: 650; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; }
.setup .n small { font-size: 13px; color: var(--ink-faint); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.setup .l { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
@media (max-width: 860px) { .setup { grid-template-columns: repeat(2, 1fr); } }

/* ---------- filter row (segmented controls) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin: 26px 0 18px; }
.filters .flabel { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin-right: 10px; }
.seg { display: inline-flex; background: var(--tint-cool); border: 1px solid var(--rule); border-radius: 10px; padding: 3px; }
.seg button {
  appearance: none; border: 0; background: transparent; padding: 7px 14px; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--navy); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.seg button small { font-weight: 500; color: var(--ink-faint); margin-left: 5px; }
.seg button[aria-pressed="true"] small { color: var(--ink-soft); }
.variants[data-js] > .variant:not(.on) { display: none; }
.variant .variant-title { display: none; }
.variants:not([data-js]) .variant .variant-title { display: block; font-size: 14px; color: var(--ink-faint); margin: 14px 0 6px; }

/* ---------- charts ---------- */
.chart {
  border: 1px solid var(--rule); border-radius: 16px; background: #fff; padding: 0 0 14px;
  margin: 10px 0 12px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.chart .chart-head { margin: 0; padding: 18px 24px 14px; background: var(--tint); border-bottom: 1px solid var(--rule); display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.chart .chart-head > div { flex: 1 1 380px; }
.chart .chart-title { font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--navy); margin: 0 0 4px; letter-spacing: -.008em; }
.chart .chart-sub { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.chart .chart-head .seg { flex: none; margin-bottom: 2px; }
.chart .replay-tag { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.demo-pointer { display: flex; align-items: center; gap: 8px; color: var(--accent-ink); font-weight: 600; }
.demo-pointer .play { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 4.5px 0 4.5px 7px; border-color: transparent transparent transparent var(--accent); flex: none; }
.demo-pointer a { color: var(--accent-ink); border-bottom-color: rgba(173, 74, 7, .35); }
.chart .replay-tag i { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 4.5px 0 4.5px 7px; border-color: transparent transparent transparent var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 14px 24px 2px; font-size: 13.5px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: none; }
.legend i.sw-dot { border-radius: 50%; }
.legend i.sw-diamond { transform: rotate(45deg) scale(.85); border-radius: 2px; }
.legend i.sw-square { border-radius: 2px; transform: scale(.9); }
.legend i.sw-line { height: 3px; width: 18px; border-radius: 2px; }
.legend i.sw-arrow { height: 3px; width: 18px; border-radius: 2px; position: relative; }
.legend i.sw-arrow::after { content: ""; position: absolute; right: -2px; top: -3px; border: 4.5px solid transparent; border-left: 6px solid var(--c); }
.legend i.sw-star { background: none; width: 14px; height: 14px; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: var(--c); }
.plotwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 6px 14px 0; }
.chart .plot { width: 100%; height: auto; display: block; }
.chart svg text { font-family: var(--sans); }
.chart .chart-note { font-size: 13.5px; color: var(--ink-faint); margin: 0; padding: 10px 24px 0; line-height: 1.55; }
.chart .chart-note b { color: var(--ink-soft); }
@media (max-width: 800px) { .chart .plot { min-width: 720px; } }

.tick-line   { stroke: var(--grid); stroke-width: 1; }
.axis-line   { stroke: #c8d0db; stroke-width: 1; }
.tick-label  { fill: #8b93a0; font-size: 11px; font-variant-numeric: tabular-nums; }
.axis-title  { fill: #6d7583; font-size: 11.5px; font-weight: 500; }
.panel-title { fill: var(--navy); font-size: 13px; font-weight: 650; }
.panel-title.pt-ours { fill: var(--accent-ink); }
.group-label { fill: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.val-label   { fill: #6d7583; font-size: 11px; font-variant-numeric: tabular-nums; }
.val-label.hi{ fill: var(--ink); font-weight: 700; }
.pt-label    { fill: var(--ink-soft); font-size: 11.5px; font-weight: 600; }
.pt-label.pt-ours { fill: var(--accent-ink); font-size: 12.5px; font-weight: 700; }
.id-label    { fill: #fff; font-size: 9px; font-weight: 700; pointer-events: none; }
.zone-label  { fill: #b7791f; font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.gain-label  { fill: var(--good); font-size: 11.5px; font-weight: 600; }
.hit { fill: transparent; cursor: pointer; }
.mark { transition: opacity .12s ease; }
.chart.dim .mark:not(.on) { opacity: .35; }

/* tooltip */
#tip {
  position: fixed; z-index: 60; pointer-events: none; opacity: 0; transform: translate(-50%, -100%);
  transition: opacity .1s ease; background: var(--navy-deep); color: #fff; border-radius: 8px; padding: 8px 11px;
  font-size: 12.5px; line-height: 1.45; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 32, 59, .28); max-width: 340px;
}
#tip.on { opacity: 1; }
#tip .t-val { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 7px; }
#tip .t-val i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
#tip .t-name { color: #dbe3ef; }
#tip .t-sub { color: #9fb0c8; font-size: 11.5px; white-space: normal; max-width: 320px; display: block; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 6px 0 14px; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 14px; font-variant-numeric: tabular-nums; }
.tablewrap.small table { min-width: 0; }
table th, table td { padding: 8px 10px; text-align: center; white-space: nowrap; vertical-align: middle; }
table th { font-weight: 650; color: var(--navy); font-size: 13px; }
thead { background: var(--tint); }
thead tr:last-child th { border-bottom: 1px solid var(--rule); }
tbody tr { border-bottom: 1px solid var(--rule-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.row:hover td { background: rgba(47, 109, 179, .05); }
th.spangroup { border-bottom: 1px solid var(--rule); font-weight: 700; font-size: 13.5px; padding-top: 12px; }
td.method, th.method, th.left, td.left { text-align: left; padding-left: 16px; }
td.method { font-weight: 550; color: var(--ink); }
td.method .qual { color: var(--ink-faint); font-weight: 400; font-size: 12.5px; }
.sep { border-left: 1px solid var(--rule); }
tr.grouphead td {
  background: var(--tint-cool); text-align: left; font-weight: 700; font-size: 11.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--navy-mid); padding: 7px 16px;
}
tr.ours td { background: var(--accent-soft); }
tr.ours:hover td { background: rgba(232, 113, 10, .13) !important; }
tr.ours td.method { font-weight: 700; color: var(--accent-ink); }
tr.ours td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
td.num { position: relative; min-width: 72px; }
td.num .v { display: block; line-height: 1.15; }
td.num .ci { display: block; font-size: 10px; color: var(--ink-faint); line-height: 1.1; }
td.num.best .v { font-weight: 750; color: var(--ink); }
td.num.second .v { text-decoration: underline; text-decoration-color: rgba(16, 24, 40, .45); text-underline-offset: 2px; }
td.num.gray .v, td.num.gray .ci { color: #a4abb7; font-style: italic; }
td.num.gray .cellbar i { opacity: .25; }
.cellbar { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 3px; border-radius: 2px; background: var(--rule-soft); overflow: hidden; }
.cellbar i { display: block; height: 100%; width: var(--w); background: var(--blue); opacity: .55; border-radius: 2px; }
tr.ours .cellbar i { background: var(--accent); opacity: .85; }
tr.ours .cellbar { background: rgba(232, 113, 10, .12); }
td.idc, th.idc { width: 34px; padding-left: 12px; padding-right: 0; }
.idm { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-weight: 700; color: #fff; background: var(--gray); font-family: var(--mono); }
.idm-minimal { background: var(--teal); border-radius: 4px; transform: rotate(45deg); }
.idm-minimal::after { content: "0"; transform: rotate(-45deg); }
.idm-minimal { font-size: 0; }
.idm-minimal::after { font-size: 10px; }
.idm-seed { background: var(--seed); border-radius: 4px; }
.idm-auto { background: var(--blue); }
.idm-ours { background: var(--accent); font-size: 12px; }
.dbadge { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; }
.dbadge-expert { background: var(--tint-cool); color: var(--ink-soft); }
.dbadge-auto { background: rgba(47, 109, 179, .10); color: var(--blue); }
.sortbtn { appearance: none; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.sortbtn:hover { color: var(--accent-ink); }
.sortarrow { display: inline-block; width: 0; height: 0; border: 4px solid transparent; border-bottom: 0; border-top: 5px solid #c3cad6; margin-left: 2px; opacity: .8; }
th.sorted-desc .sortarrow { border-top-color: var(--accent); }
th.sorted-asc .sortarrow { border-top: 0; border-bottom: 5px solid var(--accent); }
.tabnote { font-size: 13.5px; color: var(--ink-faint); line-height: 1.6; margin: 0 0 26px; }
.tabnote b { color: var(--ink-soft); }
.tabbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.tabbar .tabtitle { font-size: 15.5px; color: var(--ink-soft); margin: 0; }
.tabbar .tabtitle b { color: var(--navy); font-weight: 650; }
.resetbtn { appearance: none; border: 1px solid var(--rule); background: #fff; color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 8px; cursor: pointer; display: none; }
.resetbtn.show { display: inline-block; }
.resetbtn:hover { color: var(--accent-ink); border-color: var(--accent); }

table.einstein td, table.einstein th { white-space: normal; }
table.einstein td.obj { font-size: 13px; color: var(--ink-soft); min-width: 250px; }
table.einstein th.num { min-width: 96px; }
table.einstein td.mono { font-family: var(--mono); font-size: 13px; }
table.einstein td.ours { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
table.einstein td.ours b { color: var(--accent-ink); font-weight: 800; }
table.einstein th.ours { color: var(--accent-ink); }
table.einstein small.who { display: block; font-family: var(--sans); font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; white-space: nowrap; }
table.einstein th small { display: block; font-weight: 500; color: var(--ink-faint); font-size: 11px; }


/* ---------- demo (run replay) ---------- */
.demo { position: relative; padding: 8px 14px 0; }
.demo-svg { width: 100%; height: auto; display: block; }
.demo-svg text { font-family: var(--sans); }
.demo .dm-edge, .demo .dm-graft, .demo .dm-node { transition: opacity .35s ease; }
.demo .flash rect { animation: badgeflash 1.1s ease; }
@keyframes badgeflash { 0% { fill: #fdebd7; stroke: #e8710a; stroke-opacity: 1; } 100% { fill: #eef2f7; stroke: #33415c; stroke-opacity: .45; } }
.demo-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 6px 4px; }
.demo-btn { appearance: none; border: 1px solid var(--rule); background: #fff; color: var(--navy); font: inherit; font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); }
.demo-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.demo-play { background: var(--navy); color: #fff; border-color: var(--navy); min-width: 96px; justify-content: center; }
.demo-play:hover { background: var(--navy-mid); color: #fff; }
.demo-play .ic-play { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; display: inline-block; }
.demo.playing ~ .demo-ctl .demo-play .ic-play, .demo-card .playing .demo-play .ic-play { border-width: 0; width: 8px; height: 10px; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.demo-slider { flex: 1 1 220px; display: flex; align-items: center; }
.demo-slider input { width: 100%; accent-color: var(--accent); }
.demo-speed button { padding: 5px 11px; font-size: 13px; }
.demo-dl { flex: none; border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--navy); background: #fff; box-shadow: var(--shadow-sm); align-self: flex-end; margin-bottom: 2px; }
.demo-dl:hover { color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 800px) { .demo-svg { min-width: 760px; } .demo { overflow-x: auto; } }
.einstein-stage { padding: 6px 0 0; }
.demo-speed [data-prob] { padding: 6px 12px; font-size: 13px; }

/* ---------- findings ---------- */
.findings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.finding { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.finding .fh { font-weight: 650; color: var(--navy); font-size: 16px; margin: 0 0 6px; display: flex; gap: 10px; align-items: baseline; }
.finding .fh .no { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent-ink); letter-spacing: .06em; }
.finding p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .findings { grid-template-columns: 1fr; } }

/* side-by-side: chart + stat tiles */
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tiles { display: grid; gap: 14px; }
.tile { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.tile .tl { font-size: 13px; color: var(--ink-soft); }
.tile .tv { font-size: 30px; font-weight: 650; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; margin: 6px 0 4px; }
.tile .tv .from { font-size: 16px; font-weight: 500; color: var(--ink-faint); margin-right: 6px; text-decoration: line-through; text-decoration-color: rgba(123, 132, 148, .6); }
.tile .tv .delta { font-size: 14px; font-weight: 700; color: var(--good); margin-left: 8px; }
.tile .td { font-size: 13.5px; color: var(--ink-faint); line-height: 1.5; }
.split > *, .grid2 > *, .grid3 > *, .tiles > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------- taxonomy ladder ---------- */
.ladder { display: grid; gap: 10px; margin-top: 26px; }
.rung { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 16px 20px; box-shadow: var(--shadow-sm); }
.rung .lvl { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.rung .ln { font-weight: 650; color: var(--navy); font-size: 16px; margin-top: 2px; }
.rung .ld { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-block; font-size: 12.5px; font-weight: 550; color: var(--ink-soft); background: var(--tint); border: 1px solid var(--rule); padding: 3px 9px; border-radius: 999px; }
.chip.s { background: rgba(47, 109, 179, .09); color: var(--blue); border-color: rgba(47, 109, 179, .25); }
.chip.ours { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.rung.top { border-left: 3px solid var(--accent); }
.chipkey { font-size: 12.5px; color: var(--ink-faint); margin: 12px 0 0; }
@media (max-width: 720px) { .rung { grid-template-columns: 1fr; } }

/* ---------- bibtex ---------- */
.bibwrap { position: relative; }
pre.bibtex {
  background: var(--navy-deep); border: 1px solid var(--navy-deep); border-radius: 14px; padding: 22px 24px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.65; color: #dbe3ef; margin: 0; box-shadow: var(--shadow-sm);
}
.copybtn { position: absolute; top: 12px; right: 12px; appearance: none; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #dbe3ef; font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.copybtn:hover { background: rgba(255, 255, 255, .16); }
.ack { font-size: 14.5px; color: var(--ink-soft); margin-top: 30px; line-height: 1.65; }

/* ---------- footer ---------- */
footer { padding: 40px 0 68px; text-align: center; font-size: 13.5px; color: var(--ink-faint); border-top: 1px solid var(--rule-soft); }
footer a { color: var(--ink-faint); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .stat, .card, .btn { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  body { font-size: 16px; }
  header { padding-top: 52px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .logos > span { padding: 10px 16px; }
  .logos img { height: 28px; }
  .logos img.tall { height: 36px; }
  .logos img.short { height: 30px; }
  .logos img.wide { height: 20px; }
  section { padding: 54px 0; }
  .statband { padding: 40px 0; }
  .chart .chart-head { padding: 16px 16px 13px; }
  .legend { padding: 12px 16px 2px; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .wrap { padding: 0 18px; }
  h3 .qual { display: block; margin: 2px 0 0; }
  h1.title { font-size: clamp(30px, 9vw, 40px); }
  .lead { font-size: 17.5px; }
  .tagline { font-size: 16.5px; }
  .setup { grid-template-columns: 1fr; }
}
@media print {
  .nav, .rail, #tip, .copybtn, .resetbtn { display: none !important; }
  .reveal { opacity: 1; transform: none; }
  .variants .variant { display: block !important; }
  section { padding: 30px 0; break-inside: avoid; }
  .figlive .live-wrap, .fighint { display: none !important; }
  .figlive .figstatic { display: block; }
  .figlive { -webkit-mask-image: none; mask-image: none; }
}
