/* =========================================================
   Quartet4D — project page
   ========================================================= */
:root {
  --bg: #fcfbff;
  --bg-tint: #f6f3fd;
  --surface: #ffffff;
  --ink: #1a1730;
  --ink-2: #3c3852;
  --muted: #6b6782;
  --faint: #9a96ad;
  --line: #e8e4f1;
  --line-2: #d9d3e8;

  --violet: #8b72e0;
  --violet-d: #5f48b8;
  --violet-m: #a993ef;
  --violet-s: #ddd2fb;
  --lav: #f4effe;
  --lav-2: #e9e0fd;

  --orange: #f0956a;
  --orange-s: #fdeadf;
  --blue: #6f9fe6;
  --blue-s: #e6effd;
  --teal: #6cc3b4;
  --green: #5cb88a;
  --red: #ec8b8b;

  --c-ours: #9b84ec;
  --c-gsm: #f5b38f;
  --c-geosr: #8fd3c5;
  --c-base: #c3cee0;
  --c-world: #f7c29b;
  --peach: #fde3d3;
  --mint: #dcf3ee;
  --sky: #e2ecfd;
  --pink: #fbe2ec;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(30, 20, 70, .05), 0 1px 1px rgba(30, 20, 70, .03);
  --shadow-2: 0 10px 30px -12px rgba(50, 30, 110, .18), 0 2px 6px rgba(50, 30, 110, .05);
  --shadow-3: 0 30px 70px -28px rgba(50, 30, 110, .35), 0 6px 18px rgba(50, 30, 110, .07);

  --sans: "Google Sans", "Google Sans Text", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas, svg { max-width: 100%; display: block; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet-d); }
b, strong { color: var(--ink); font-weight: 600; }
[hidden] { display: none !important; }
::selection { background: var(--lav-2); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding-inline: 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 253, .78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 16px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.3px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand:hover { color: var(--ink); }
.brand em { font-style: normal; color: var(--violet); }
.brand-mark { width: 24px; height: 24px; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: 14px; color: var(--muted); padding: 6px 11px; border-radius: 999px; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-tint); }
.nav-links a.active { color: var(--violet-d); background: var(--lav); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 760px; z-index: -1;
  background:
    radial-gradient(38% 46% at 80% 36%, rgba(190, 172, 246, .34), transparent 70%),
    radial-gradient(26% 34% at 62% 8%, rgba(252, 205, 222, .38), transparent 70%),
    radial-gradient(30% 36% at 8% 6%, rgba(253, 214, 190, .36), transparent 70%),
    radial-gradient(28% 30% at 30% 78%, rgba(196, 236, 226, .38), transparent 70%);
}
.hero { padding: 48px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 8px; align-items: center; }
@media (min-width: 1200px) { .hero .stage { margin-right: -72px; width: calc(100% + 72px); } }
.qa-card {
  position: absolute; z-index: 3; max-width: 64%; padding: 12px 16px 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 18px 40px -18px rgba(80, 60, 150, .35), 0 2px 8px rgba(80, 60, 150, .08);
  font-size: 14.5px; line-height: 1.45; color: var(--ink); font-weight: 500;
  opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; pointer-events: none;
}
.qa-card.on { opacity: 1; transform: none; }
.qa-card.q { left: 4%; top: 6%; }
.qa-card.a { right: 0; bottom: 14%; width: 46%; max-width: 46%; }
.qa-card .t { background: var(--peach); color: #c0683a; padding: 0 .25em; border-radius: 4px; }
.qa-card .r { background: var(--lav-2); color: var(--violet-d); padding: 0 .25em; border-radius: 4px; }
.qa-card.a b { color: var(--violet-d); }
.qa-tag { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #f3a7bd, #b99cf4); margin-top: 1px; }
.qa-card.a .qa-tag { background: linear-gradient(135deg, #86d0c4, #9b84ec); }
.qa-sub { grid-column: 2; display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: -8px; }
.scroll-cue { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 26px; height: 40px; border: 2px solid var(--violet-s); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--violet-m); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }
.cmp { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.cmp > div { position: relative; height: 18px; }
.cmp i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w) * 1%); border-radius: 0 6px 6px 0; background: var(--c-base); transition: width 1.2s cubic-bezier(.2, .8, .2, 1) .2s; }
.cmp i.o { background: linear-gradient(90deg, #d8cbfb, #9b84ec); }
.cmp span { position: relative; font-size: 11.5px; line-height: 18px; padding-left: 8px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.stat .v span[data-count] { background: linear-gradient(120deg, #2a2346, #6e57c9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.venue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--violet);
  background: var(--lav); border: 1px solid var(--lav-2); padding: 4px 12px 4px 10px; border-radius: 999px;
}
.venue i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px rgba(106, 76, 194, .18); }
.logo {
  font-size: clamp(56px, 8.4vw, 104px); font-weight: 700; letter-spacing: -.045em; line-height: 1;
  color: var(--ink); margin: 22px 0 0;
}
.logo span { color: var(--violet-m); background: linear-gradient(115deg, #8b72e0 10%, #b99cf4 55%, #f3a7bd 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title {
  font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.02em; line-height: 1.18;
  color: var(--ink); margin: 18px 0 0;
}
.hl { background: linear-gradient(transparent 58%, var(--lav-2) 58%, var(--lav-2) 92%, transparent 92%); padding: 0 .08em; }
.subtitle { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); margin: 14px 0 0; line-height: 1.5; max-width: 34em; }
.subtitle b { color: var(--violet-d); font-weight: 600; }

.authors { margin-top: 26px; font-size: 15.5px; color: var(--ink-2); line-height: 1.8; }
.authors .anon { color: var(--muted); font-style: italic; }
.affil { font-size: 13.5px; color: var(--faint); margin-top: 2px; }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  font-size: 14px; font-weight: 600; border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1);
  transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); color: var(--ink); border-color: var(--violet-s); }
.btn:disabled { font-family: inherit; color: #797979; background: #f2f2f2; border-color: #dedede; box-shadow: none; transform: none; cursor: default; }
.btn:disabled svg { filter: grayscale(1); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: linear-gradient(135deg, #2a2346, #4a3d7a); color: #fff; border-color: transparent; }
.btn.primary:hover { background: linear-gradient(135deg, #352d57, #5a4b92); color: #fff; }
.btn.soon { color: var(--faint); cursor: default; }
.btn.soon:hover { transform: none; box-shadow: var(--shadow-1); border-color: var(--line-2); }
.btn.soon small { font-size: 11px; font-weight: 500; background: var(--bg-tint); padding: 1px 7px; border-radius: 99px; }

/* 3D hero stage */
.stage {
  position: relative; aspect-ratio: 1 / .92; width: 100%;
  border-radius: 28px;
}
.stage .stage-mask canvas, #hero-ov { width: 100% !important; height: 100% !important; }
.stage-mask {
  -webkit-mask-image: radial-gradient(50% 50% at 50% 48%, #000 55%, transparent 98%);
  mask-image: radial-gradient(50% 50% at 50% 48%, #000 55%, transparent 98%);
  position: absolute; inset: 0;
}
.stage-legend {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  font-size: 12.5px; color: var(--muted); background: rgba(255, 255, 255, .8); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; white-space: nowrap; width: max-content; max-width: 100%;
}
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.stage-hint { position: absolute; top: 10px; right: 12px; font-size: 12px; color: var(--faint); display: flex; gap: 6px; align-items: center; }
.stage-hint svg { width: 14px; height: 14px; }

/* ---------- sections ---------- */
section { padding: 88px 0; }
section.tint { background: radial-gradient(60% 40% at 0% 0%, rgba(253, 227, 211, .45), transparent 70%), radial-gradient(50% 40% at 100% 10%, rgba(220, 243, 238, .6), transparent 70%), linear-gradient(180deg, var(--bg-tint), var(--bg) 92%); }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet);
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .6; }
.eyebrow .num { font-family: var(--mono); color: var(--faint); letter-spacing: 0; }
h2.sec {
  font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15;
  color: var(--ink); margin: 14px 0 0; max-width: 22em;
}
h2.sec em { font-style: normal; color: var(--violet); }
.lede { font-size: 18px; color: var(--muted); margin: 16px 0 0; max-width: 44em; line-height: 1.6; }
.lede b { color: var(--ink-2); }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: 0; line-height: 1.3; }
.small { font-size: 14px; color: var(--muted); }
.mono { font-family: var(--mono); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}

/* ---------- TL;DR + video ---------- */
.video-card { margin-top: 0; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow-3); background: #0f0d1a; border: 1px solid var(--line); }
.video-card video { width: 100%; aspect-ratio: 1920 / 1212; background: #f4f1fb; }
.tldr {
  background: linear-gradient(120deg, #fff 60%, #fbf7ff) !important;
  margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  padding: 22px 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); position: relative;
}
.tldr::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: linear-gradient(var(--violet-m), #f3a7bd); }
.tldr .tag { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--violet); background: var(--lav); padding: 3px 9px; border-radius: 6px; margin-top: 3px; }
.tldr p { margin: 0; font-size: 17.5px; color: var(--ink-2); line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.stat {
  padding: 20px 20px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.stat .v { font-size: 42px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 16px; font-weight: 600; color: var(--violet); margin-left: 6px; letter-spacing: 0; }
.stat .k { font-size: 13.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.stat .k b { color: var(--ink-2); }
.stat::after { content: ""; position: absolute; right: -34px; top: -34px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(var(--acc, var(--lav-2)), transparent 70%); opacity: .9; }
.stat:nth-child(2) { --acc: var(--peach); }
.stat:nth-child(3) { --acc: var(--mint); }
.stat:nth-child(4) { --acc: var(--sky); }

.abstract { margin-top: 56px; display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.abstract p { margin: 0; font-size: 16.5px; color: var(--ink-2); text-align: justify; hyphens: auto; }
.abstract .eyebrow { margin-top: 4px; }

/* ---------- Motivation ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.persp-card { padding: 22px; display: flex; flex-direction: column; }
.persp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); background: transparent; border: 0;
  padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--violet-d); box-shadow: 0 1px 3px rgba(40, 20, 90, .14); }
.road { margin-top: 14px; border-radius: var(--r); background: linear-gradient(#f7f5fc, #f1edf9); border: 1px solid var(--line); overflow: hidden; }
.road svg { width: 100%; height: auto; }
.answer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 12px; }
.answer-row .q { font-size: 14.5px; color: var(--muted); }
.answer-pill {
  font-weight: 700; font-size: 18px; color: var(--violet-d); background: var(--lav); border: 1px solid var(--lav-2);
  padding: 6px 16px; border-radius: 999px; min-width: 96px; text-align: center; transition: transform .25s;
}
.answer-pill.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.12); } }

.qcard { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.qcard .quote { font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.qcard .quote .t { background: var(--orange-s); color: #c0683a; padding: 0 .25em; border-radius: 4px; }
.qcard .quote .r { background: var(--lav-2); color: var(--violet-d); padding: 0 .25em; border-radius: 4px; }
.decomp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.decomp > div { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--bg); }
.decomp .lbl { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.decomp .lbl.t { color: var(--orange); }
.decomp .lbl.r { color: var(--violet); }
.decomp .val { font-size: 15.5px; color: var(--ink); margin-top: 4px; font-weight: 500; }
.decomp .sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.qcard .arrow { text-align: center; color: var(--faint); font-size: 13px; }
.formula {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 16px; border-radius: var(--r); background: linear-gradient(120deg, #f6f2ff, #fdf6f0); border: 1px solid var(--line);
  font-size: 22px; color: var(--ink);
}
.formula .math { font-family: "Latin Modern Math", "STIX Two Math", "Cambria Math", Georgia, serif; font-size: 25px; }
.formula .math i { font-style: italic; }
.formula .math .o { color: var(--orange); }
.formula .math .v { color: var(--violet); }

/* controlled study */
.study { margin-top: 36px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: stretch; }
.study .card { padding: 24px 26px; }
.chart-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.chart-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.study-takeaway { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.big-delta { font-size: 64px; font-weight: 700; letter-spacing: -.04em; color: var(--violet); line-height: 1; }
.big-delta small { font-size: 22px; letter-spacing: 0; margin-left: 4px; }
.variant-list { display: flex; flex-direction: column; gap: 10px; }
.variant { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; font-size: 15px; }
.variant i { width: 12px; height: 12px; border-radius: 4px; }
.variant .d { font-size: 13px; color: var(--muted); display: block; line-height: 1.4; }
.variant .n { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.variant.best .n { color: var(--violet); }

/* ---------- Method ---------- */
.pipeline-card { margin-top: 36px; padding: 18px; }
.stage-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stage-tab {
  font: inherit; text-align: left; cursor: pointer; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; color: var(--muted); transition: all .2s; position: relative; overflow: hidden;
}
.stage-tab .n { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.stage-tab .t { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink-2); line-height: 1.3; margin-top: 2px; }
.stage-tab:hover { border-color: var(--violet-s); }
.stage-tab[aria-selected="true"] { background: var(--lav); border-color: var(--violet-s); }
.stage-tab[aria-selected="true"] .t { color: var(--violet-d); }
.stage-tab[aria-selected="true"] .n { color: var(--violet); }
.stage-tab .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--violet); }
.stage-tab[aria-selected="true"] .bar { animation: tabbar 7s linear forwards; }
.pipeline-card.paused .stage-tab .bar { animation: none; width: 0; }
@keyframes tabbar { to { width: 100%; } }
.pipe-svg-wrap { margin-top: 14px; overflow-x: auto; border-radius: var(--r); background: linear-gradient(180deg, #fdfcff, #f8f6fd); border: 1px solid var(--line); }
.pipe-svg-wrap svg { min-width: 860px; width: 100%; height: auto; }
.pipe-caption {
  margin-top: 14px; padding: 14px 18px; border-left: 3px solid var(--violet); background: var(--lav); border-radius: 0 12px 12px 0;
  font-size: 15px; color: var(--ink-2); min-height: 74px;
}
.pipe-caption b { color: var(--violet-d); }

/* pipeline svg focus states */
.pipe .grp { transition: opacity .45s ease, filter .45s ease; }
.pipe[data-focus="a"] .grp:not(.ga),
.pipe[data-focus="b"] .grp:not(.gb),
.pipe[data-focus="c"] .grp:not(.gc) { opacity: .22; filter: grayscale(.8); }
.pipe .flow { stroke-dasharray: 5 6; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -22; } }

.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.step { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.steps3 .step:nth-child(2) .badge { background: linear-gradient(135deg, var(--peach), #fff1e8); color: #c0683a; }
.steps3 .step:nth-child(3) .badge { background: linear-gradient(135deg, var(--sky), var(--mint)); color: #4f7fcf; }
.step .badge {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: var(--violet-d); background: linear-gradient(135deg, var(--lav-2), var(--pink)); margin-bottom: 14px;
}
.step h3 { font-size: 17.5px; }
.step p { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* structured output + explorer */
.method-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; margin-top: 64px; align-items: start; }
.schema {
  border-radius: var(--r-lg); overflow: hidden; background: #221d3a; color: #d8d3ee; box-shadow: var(--shadow-3);
  font-family: var(--mono); font-size: 13.5px;
}
.schema-head { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #1f1b36; border-bottom: 1px solid #2c2748; }
.schema-head i { width: 10px; height: 10px; border-radius: 50%; background: #3a3456; }
.schema-head span { margin-left: 8px; font-size: 12px; color: #8f88ad; }
.schema-q { padding: 16px 18px 6px; color: #f0ecff; font-family: var(--sans); font-size: 15px; line-height: 1.5; }
.schema-q .lab { font-family: var(--mono); font-size: 11.5px; color: #8f88ad; display: block; margin-bottom: 4px; }
.schema-body { padding: 8px 18px 18px; line-height: 2; min-height: 252px; }
.schema-body .row { display: flex; gap: 10px; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.schema-body .row.on { opacity: 1; transform: none; }
.schema-body .k { color: #a99be0; min-width: 168px; }
.schema-body .v { color: #fff; }
.schema-body .v.vseg { color: #ffb27a; }
.schema-body .v.vcam { color: #8ab4ff; }
.schema-body .grp-sep { height: 6px; }
.schema-tabs { display: flex; gap: 6px; padding: 0 18px 16px; flex-wrap: wrap; }
.schema-tabs button {
  font: inherit; font-family: var(--sans); font-size: 12.5px; color: #b9b2d6; background: #231f3d; border: 1px solid #332d52;
  border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.schema-tabs button[aria-pressed="true"] { background: #e9e3ff; color: #2b2056; border-color: #e9e3ff; }

.explorer { padding: 20px; }
.explorer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ex-panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); overflow: hidden; position: relative; }
.ex-panel .cap { position: absolute; top: 8px; left: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ex-panel canvas { width: 100%; aspect-ratio: 1; }
.ex-controls { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; margin-top: 14px; font-size: 13.5px; }
.ex-controls .lab { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.ex-readout { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.ex-readout .eq { font-family: var(--mono); font-size: 13px; color: var(--ink-2); background: var(--bg-tint); padding: 4px 10px; border-radius: 8px; }
.timeline { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.timeline input { flex: 1; accent-color: var(--violet); }
.round {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; color: var(--ink); flex: none;
}
.round svg { width: 14px; height: 14px; }

/* features */
.features { margin-top: 64px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; align-items: center; }
.feat-vec { display: flex; gap: 3px; flex-wrap: nowrap; margin-top: 16px; }
.feat-vec span { flex: 1; height: 38px; border-radius: 5px; position: relative; transition: transform .2s, opacity .2s; }
.feat-vec span:hover { transform: translateY(-3px); }
.feat-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin-top: 18px; }
.feat-legend div { display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.feat-legend i { width: 12px; height: 12px; border-radius: 3px; margin-top: 5px; }
.feat-legend b { display: block; }
.feat-legend span { color: var(--muted); font-size: 13px; line-height: 1.45; display: block; }
.tok-flow { padding: 22px; }
.tok-flow svg { width: 100%; height: auto; }

/* ---------- Results ---------- */
.res-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.filter-row .lab { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-right: 2px; }
.bench-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.bench { padding: 20px 20px 14px; }
.bench .chart-title { display: flex; justify-content: space-between; align-items: baseline; }
.bench .chart-title .gain { font-size: 13px; font-weight: 600; color: var(--violet); background: var(--lav); padding: 2px 8px; border-radius: 99px; }
.bars { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 42px; gap: 10px; align-items: center; font-size: 13px; position: relative; }
.bar-row .nm { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row.ours .nm { color: var(--ink); font-weight: 600; }
.bar-track { position: relative; height: 14px; background: var(--bg-tint); border-radius: 4px; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }
.bar-row.ours .val { color: var(--ink); font-weight: 700; }
.refline { position: absolute; top: -5px; bottom: -5px; width: 0; border-left: 1.5px dashed #a9a4bd; }
.ref-note { font-size: 12px; color: var(--muted); margin-top: 12px; display: flex; align-items: center; gap: 6px; }
.ref-note i { width: 14px; border-top: 1.5px dashed #a9a4bd; }
.legend-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 14px; }

.tip {
  position: fixed; z-index: 100; pointer-events: none; background: #1d1a31; color: #fff; font-size: 12.5px; padding: 7px 10px;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .12s; white-space: nowrap;
}
.tip b { color: #fff; }

.val-wrap { margin-top: 28px; display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.donut-card { padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut-card svg { width: 190px; height: 190px; }
.donut-card .sub { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.cat-card { padding: 22px 22px 16px; }
.dots { margin-top: 12px; }
.dot-row { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; height: 38px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.dot-row:last-child { border-bottom: 0; }
.dot-row .nm { color: var(--ink-2); }
.dot-track { position: relative; height: 100%; }
.dot-track .rng { position: absolute; top: 50%; height: 2px; background: var(--line-2); transform: translateY(-50%); }
.dot-track .d { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px #fff; transition: left .6s cubic-bezier(.2, .8, .2, 1); cursor: default; }
.dot-track .d.ours { width: 14px; height: 14px; z-index: 2; }
.dot-track .lbl-ours { position: absolute; top: 50%; transform: translate(10px, -50%); font-size: 12.5px; font-weight: 700; color: var(--violet-d); transition: left .6s cubic-bezier(.2, .8, .2, 1); }
.axis-row { display: grid; grid-template-columns: 170px 1fr; gap: 14px; font-size: 11.5px; color: var(--faint); }
.axis-row .ticks { position: relative; height: 18px; }
.axis-row .ticks span { position: absolute; transform: translateX(-50%); }

details.more { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
details.more summary {
  cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 600; font-size: 15px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--violet); transition: transform .2s; }
details.more[open] summary::after { transform: rotate(45deg); }
.tbl-wrap { overflow-x: auto; padding: 0 18px 18px; }
table.res { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 860px; }
table.res th, table.res td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.res th { font-weight: 600; color: var(--muted); font-size: 12px; }
table.res td:first-child, table.res th:first-child { text-align: left; }
table.res tr.grp td { background: var(--bg-tint); font-weight: 600; color: var(--muted); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
table.res tr.ours td { background: #f6f2ff; }
table.res tr.ours td:first-child { color: var(--violet-d); font-weight: 600; }
table.res .b { font-weight: 700; color: var(--ink); }
table.res .u { text-decoration: underline; text-underline-offset: 3px; }
table.res .muted { color: var(--faint); }

/* ---------- Analysis ---------- */
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.an-grid .card { padding: 22px; }
.an-grid h3 { margin: 0; font-size: 17px; }
.an-grid .chart-sub { margin: 3px 0 0; }
.an-grid .legend-row { gap: 6px 14px; font-size: 12px; }
.an-scores, .matrix { width: 100%; margin-top: 16px; font-variant-numeric: tabular-nums; }
.an-scores { border-collapse: collapse; font-size: 14px; }
.an-scores th, .an-scores td { padding: 10px 7px; text-align: right; }
.an-scores th:first-child, .matrix th:first-child { text-align: left; }
.an-grid table thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.an-scores tr { border-bottom: 1px solid var(--line); }
.an-scores tbody th { font-weight: 500; }
.an-scores tbody tr:last-child { background: var(--lav); color: var(--violet-d); }
.an-scores tbody tr:last-child > * { font-weight: 700; }
.an-method { display: inline-flex; gap: 8px; align-items: baseline; }
.an-method i { flex: 0 0 9px; height: 9px; border-radius: 50%; }
.an-finding { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.an-finding strong { color: var(--violet-d); }
.gbars, .gbar-x { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(4px, 1vw, 14px); }
.gbars { height: 126px; margin-top: 20px; border-bottom: 1px solid var(--line-2); }
.gbar-cols { display: flex; justify-content: center; align-items: flex-end; gap: clamp(2px, .4vw, 6px); }
.gcol { flex: 1; min-width: 0; max-width: 28px; position: relative; border-radius: 4px 4px 0 0; }
.gcol:last-child { background-image: linear-gradient(0deg,#b8a6f4,#8f76e6); }
.gcol .lv { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 3px; white-space: nowrap; font-size: clamp(10px, 1vw, 12px); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.gcol:last-child .lv { color: var(--violet-d); font-weight: 700; }
.gbar-x { margin-top: 6px; text-align: center; font-size: 12.5px; color: var(--muted); }
.necessity-axis { position: relative; display: flex; align-items: center; gap: 8px; margin: 4px 8% 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.necessity-axis::before, .necessity-axis::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.necessity-axis span::after { content: ""; position: absolute; right: 0; top: 50%; width: 6px; height: 6px; border-top: 1px solid; border-right: 1px solid; transform: translateY(-50%) rotate(45deg); }
.matrix { border-spacing: 4px; table-layout: fixed; }
.matrix th { font-size: 13px; font-weight: 500; line-height: 1.3; }
.matrix td { height: 49px; border-radius: 9px; text-align: center; color: var(--ink); font-weight: 700; font-size: 21px; }
#formul { margin-top: 21px; }
.hbar { display: grid; grid-template-columns: 160px 1fr 46px; gap: 12px; align-items: center; font-size: 13.5px; margin-top: 12px; }
.hbar .tr { height: 26px; background: var(--bg-tint); border-radius: 6px; position: relative; overflow: hidden; }
.hbar .fl { position: absolute; inset: 0 auto 0 0; border-radius: 0 6px 6px 0; width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.hbar .vv { font-weight: 700; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.hbar.scale { margin-top: 5px; }
.hbar .ticks { grid-column: 2; position: relative; height: 19px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.hbar .ticks span { position: absolute; transform: translateX(-50%); }
.hbar .ticks span::before { content: ""; display: block; width: 1px; height: 4px; margin: 0 auto 1px; background: var(--line-2); }
.nec-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.nec { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); }
.nec .lv { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nec .ds { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.nec .nn { font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 8px; font-variant-numeric: tabular-nums; }
.nec .nn small { font-size: 12px; font-weight: 600; color: var(--violet); }

/* ---------- Qualitative ---------- */
.qual-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.chip {
  font: inherit; font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); transition: all .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.chip img { width: 26px; height: 18px; object-fit: cover; border-radius: 4px; }
.chip:hover { border-color: var(--violet-s); }
.chip[aria-pressed="true"] { background: var(--lav); border-color: var(--violet-s); color: var(--violet-d); box-shadow: 0 0 0 3px rgba(139,114,224,.12); }
.qual-card { margin-top: 16px; padding: 20px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
.qual-media { position: relative; border-radius: var(--r); overflow: hidden; background: #ece8f5; aspect-ratio: 16 / 10; }
.qual-media canvas, .qual-media img, .qual-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qual-media .fr { position: absolute; left: 10px; bottom: 10px; font-family: var(--mono); font-size: 11.5px; color: #fff; background: rgba(20, 16, 40, .6); padding: 2px 8px; border-radius: 6px; }
.qual-q { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.qual-q::before { content: "Q"; font-family: var(--mono); font-size: 11.5px; color: #fff; background: var(--violet); border-radius: 5px; padding: 1px 6px; margin-right: 8px; vertical-align: 2px; }
.ground-grid { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 6px; margin-top: 14px; font-size: 12.5px; align-items: center; justify-content: start; }
.ground-grid .gk { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.gpill { font-family: var(--mono); font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--bg-tint); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.gpill.t { background: var(--orange-s); color: #9b4610; border-color: #f4d3bb; }
.gpill.r { background: var(--lav); color: var(--violet-d); border-color: var(--lav-2); }
.traj-box { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); position: relative; }
.traj-box canvas { width: 100%; aspect-ratio: 1.6; }
.traj-box .cap { position: absolute; bottom: 8px; left: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.choice { font-size: 13px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.choice .who { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.choice .who span { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; }
.choice .who .ok { background: #e3f4ea; color: #1f7a4a; }
.choice .who .no { background: #fbe7e5; color: #a8392f; }
.choice.correct { border-color: #b9e1c9; background: #f4fbf7; }

/* flip grid */
.flip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.flip { border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.flip .fm { aspect-ratio: 4/3; background: #ece8f5; position: relative; }
.flip .fm canvas, .flip .fm img, .flip .fm video { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip .ft { aspect-ratio: 1.25; border-top: 1px solid var(--line); background: var(--bg); }
.flip .ft canvas { width: 100%; height: 100%; }
.flip .fl { padding: 10px 12px 12px; }
.flip .fl .n { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.flip .fl .a { font-size: 13.5px; color: var(--ink); font-weight: 600; margin-top: 2px; display: flex; justify-content: space-between; gap: 8px; }
.flip .fl .a .ok { color: var(--green); }

/* ---------- Citation ---------- */
.bib { position: relative; margin-top: 22px; }
.bib pre {
  margin: 0; padding: 22px 24px; border-radius: var(--r-lg); background: #221d3a; color: #dcd6f5; font-family: var(--mono);
  font-size: 13.5px; line-height: 1.7; overflow-x: auto;
}
.bib button {
  position: absolute; top: 12px; right: 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: #dcd6f5;
  background: #2a2547; border: 1px solid #3a3460; border-radius: 8px; padding: 5px 11px; cursor: pointer;
}
.bib button:hover { background: #352f58; }

footer { padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--faint); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pipe .flow { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media screen and (min-width: 981px) and (hover: hover) and (pointer: fine) {
  html { scroll-padding-top: 90px; }
  body > nav, body > main, body > footer { zoom: 1.25; }
}
@media (max-width: 980px) {
  .qa-card { font-size: 13px; max-width: 80%; }
  .qa-card.a { max-width: 70%; }
  .hero-grid, .two, .study, .method-row, .features, .an-grid, .qual-card, .val-wrap { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .bench-grid { grid-template-columns: 1fr; }
  .steps3 { grid-template-columns: 1fr; }
  .abstract { grid-template-columns: 1fr; gap: 12px; }
  .flip-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { max-width: 560px; margin: 0 auto; }
  .stage-tabs { grid-template-columns: repeat(2, 1fr); }
  .nec-levels { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  section { padding: 64px 0; }
  .wrap, .wrap-narrow { padding-inline: 16px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 30px; }
  .decomp { grid-template-columns: 1fr; }
  .dot-row, .axis-row { grid-template-columns: 110px 1fr; }
  .explorer-grid { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .tldr { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hbar { grid-template-columns: 120px 1fr 40px; }
}

/* punch line band */
.punch { padding: 40px 0 96px; text-align: center; }
.punch-line { margin: 0 auto; max-width: 22em; font-size: clamp(26px, 3.6vw, 44px); font-weight: 700; letter-spacing: -.025em; line-height: 1.3; color: var(--ink); }
.punch-line .w1 { background: linear-gradient(transparent 60%, var(--peach) 60%, var(--peach) 92%, transparent 92%); }
.punch-line .w2 { background: linear-gradient(115deg, #8b72e0, #b99cf4 50%, #f3a7bd); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* abstract (collapsible) */
details.more.abs { margin-top: 28px; }
.abs-body { padding: 0 22px 20px; }
.abs-body p { margin: 0; font-size: 15.5px; color: var(--ink-2); text-align: justify; hyphens: auto; }
/* answer chip */
.answer-chip { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(120deg, var(--mint), #f3fbf8); border: 1px solid #cdebe3; }
.answer-chip span { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #3e9a8a; }
.answer-chip b { font-size: 17px; color: var(--ink); }
.pill-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.pill-big { font-size: 22px; font-weight: 700; color: var(--violet-d); background: linear-gradient(120deg, var(--lav), var(--pink)); padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.road { background: #eef7f1; }

#hero-rel { grid-column: 1 / -1; width: 100%; height: 88px; margin-top: 4px; border-radius: 10px; background: linear-gradient(180deg, #fbf9ff, #f6f2fe); }

/* --- overflow guards (phone widths) --- */
.hero-grid > *, .two > *, .study > *, .method-row > *, .features > *, .an-grid > *, .qual-card > *, .val-wrap > *, .bench-grid > * { min-width: 0; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.schema-body .row { flex-wrap: wrap; column-gap: 10px; row-gap: 0; }
.ex-readout .eq { max-width: 100%; overflow-x: auto; white-space: nowrap; }
@media (max-width: 560px) {
  .schema-body .k { min-width: 128px; }
  .schema { font-size: 12.5px; }
  .ex-controls { grid-template-columns: 1fr; }
  .qa-card { font-size: 12px; padding: 9px 11px; }
  .qa-card.q { max-width: 86%; }
  .qa-card.a { width: 58%; max-width: 58%; bottom: 12%; }
  .qa-sub { display: none; }
  #hero-rel { height: 64px; }
  .stage-hint { display: none; }
  .filter-row { flex-direction: column; align-items: flex-start; }
}

/* ===================== v3 ===================== */
/* punch line: one sentence per line on desktop */
.punch-line { max-width: none; }
.punch-line .ln { display: block; }
@media (min-width: 900px) { .punch-line { font-size: clamp(28px, 3vw, 42px); } .punch-line .ln { white-space: nowrap; } }

/* motivation */
.motiv { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin-top: 36px; align-items: stretch; }
.motiv > * { min-width: 0; }
.motiv-scene { padding: 20px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, #fff, #fbfaff); }
.motiv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.motiv-svg { border-radius: 18px; overflow: hidden; border: 1px solid #e3efe7; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.motiv-svg svg { width: 100%; height: auto; display: block; }
.motiv-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 14.5px; color: var(--muted); }
.big-ans { font-size: 24px; font-weight: 700; letter-spacing: -.01em; padding: 6px 22px; border-radius: 999px; min-width: 110px; text-align: center; transition: background .4s, color .4s; }
.big-ans.a { background: linear-gradient(120deg, #efe9fe, #e5dcfd); color: #6a52c8; }
.big-ans.b { background: linear-gradient(120deg, #e8f1fe, #d9e7fc); color: #4f7fcf; }
.motiv-q { padding: 24px; display: flex; flex-direction: column; gap: 14px; justify-content: center; background: radial-gradient(80% 60% at 100% 0%, rgba(253, 227, 211, .5), transparent 70%), radial-gradient(70% 50% at 0% 100%, rgba(233, 225, 254, .7), transparent 70%), #fff; }
.mq-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-d); background: var(--lav); padding: 4px 11px; border-radius: 999px; }
.motiv-q .quote { font-size: 21px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.motiv-q .quote .t { background: var(--peach); color: #c0683a; padding: 0 .25em; border-radius: 5px; }
.motiv-q .quote .r { background: var(--lav-2); color: var(--violet-d); padding: 0 .25em; border-radius: 5px; }
.mq-map { display: flex; flex-direction: column; gap: 10px; }
.mq-row { display: grid; grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.75); border: 1px solid var(--line); }
.mq-row .ico { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.mq-row.t .ico { background: var(--peach); }
.mq-row.r .ico { background: var(--lav); }
.mq-row .ico .dot { width: 14px; height: 14px; border-radius: 50%; background: #f0956a; box-shadow: 0 0 0 4px #fff, 0 0 0 6px #f8c6a6; }
.mq-row .ico svg { width: 32px; height: 24px; }
.mq-row .lab { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mq-row.t .lab { color: #d9774a; } .mq-row.r .lab { color: var(--violet-d); }
.mq-row b { grid-column: 2; font-size: 16px; }
.mq-row .sym { grid-row: 1 / 3; grid-column: 3; font-family: "Latin Modern Math", "STIX Two Math", Georgia, serif; font-style: italic; font-size: 20px; color: var(--muted); }

/* finding: variant rows with input diagrams */
.variant-list { gap: 10px; }
.vrow { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.vrow.best { border-color: #ddd1fb; background: linear-gradient(120deg, #fff, #f8f5ff); box-shadow: 0 10px 26px -14px rgba(120, 90, 220, .35); }
.vrow .mini { width: 96px; height: auto; }
.vname { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.vchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ic { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 1.6; }
.ic.v { background: #efe9fe; color: #6a52c8; } .ic.q { background: #e3f6f1; color: #3e9a8a; }
.ic.w { background: #f1eff6; color: #6b6782; } .ic.r { background: #fff; color: #7a60d6; border: 1px dashed #c8b8f8; }
.ic.t { background: linear-gradient(120deg, #fdece2, #efe9fe); color: #8a4fb0; }
.vval { font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.vrow.best .vval { color: var(--violet-d); }

/* grounding demo */
.gd-wrap { margin-top: 72px; }
.gd { margin-top: 20px; padding: 18px; }
.gd-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gd-tab { font: inherit; text-align: left; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font-size: 13.5px; line-height: 1.4; transition: all .2s; }
.gd-tab .n { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: #c9c4d8; border-radius: 7px; padding: 2px 7px; margin-top: 1px; }
.gd-tab:hover { border-color: var(--violet-s); }
.gd-tab[aria-pressed="true"] { background: linear-gradient(120deg, #fbf9ff, #f3eefe); border-color: #d6c9fa; box-shadow: 0 8px 22px -14px rgba(120, 90, 220, .45); color: var(--ink); }
.gd-tab[aria-pressed="true"] .n { background: linear-gradient(135deg, #b99cf4, #9b84ec); }
.gd-tab .t { background: var(--peach); color: #c0683a; padding: 0 .2em; border-radius: 4px; font-weight: 600; }
.gd-tab .r { background: var(--lav-2); color: var(--violet-d); padding: 0 .2em; border-radius: 4px; font-weight: 600; }
.gd-grid { display: grid; grid-template-columns: 1.15fr 24px .8fr 24px 1fr; gap: 10px; margin-top: 16px; align-items: stretch; }
.gd-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gd-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.gd-h span { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; color: var(--violet-d); background: var(--lav); }
.gd-h small { font-weight: 500; color: var(--faint); font-size: 12px; }
.gd-canvas { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fdfcff; }
.gd-canvas canvas { width: 100%; aspect-ratio: 1.15; display: block; }
.gd-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.gd-arrow { align-self: center; height: 24px; position: relative; }
.gd-arrow::before { content: ""; position: absolute; inset: 0; background: no-repeat center / 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9a6f6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.gd-mid { justify-content: flex-start; }
.gd-fields { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: linear-gradient(180deg, #faf8ff, #f6f2fe); border: 1px solid #ece4fd; flex: 1; justify-content: center; }
.gf { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); animation: gfIn .5s both; animation-delay: var(--d); }
@keyframes gfIn { from { opacity: 0; transform: translateY(6px); } }
.gf .k { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .04em; }
.gf .pill { align-self: flex-start; font-family: var(--mono); font-size: 12.5px; padding: 3px 10px; border-radius: 8px; }
.gf .pill.t { background: #fdece2; color: #c0683a; }
.gf .pill.r { background: #efe9fe; color: #6a52c8; }
.gf .pill.m { background: #f4f2f8; color: #6b6782; font-size: 11.5px; }
.gf { flex-direction: row; flex-wrap: wrap; align-items: center; }
.gf .k { width: 100%; }
.gd-answer { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, var(--mint), #f3fbf8); border: 1px solid #cdebe3; }
.gd-answer .lab { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #3e9a8a; }
.gd-answer b { font-size: 18px; color: var(--ink); }
.gd-answer .why { font-size: 12.5px; color: var(--muted); }
.gd.swap .gd-answer { animation: gfIn .5s both .25s; }
@media (max-width: 980px) {
  .motiv { grid-template-columns: 1fr; }
  .gd-tabs { grid-template-columns: 1fr 1fr; }
  .gd-grid { grid-template-columns: 1fr; }
  .gd-arrow { transform: rotate(90deg); }
}
@media (max-width: 560px) { .gd-tabs { grid-template-columns: 1fr; } .vrow { grid-template-columns: 72px 1fr auto; } .vrow .mini { width: 72px; } }

/* pipeline: focus states for JS-built groups */
.pipe .grp { transition: opacity .45s ease, filter .45s ease; }
.pipe-svg-wrap svg { min-width: 900px; }
.study { align-items: center; }
.study > .card { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.features { grid-template-columns: 1fr; margin-top: 56px; }
.features .feat-legend { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 760px) { .features .feat-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- v4: reference accents follow the (blue-teal) reference frustum ---- */
.gpill.r, .gf .pill.r { background: #e3f1f8 !important; color: #46677d !important; border-color: #c4e0ec !important; }
.qa-card .r, .motiv-q .quote .r, .gd-tab .r, .qcard .quote .r { background: #e3f1f8 !important; color: #46677d !important; }
.mq-row.r .ico { background: #e3f1f8; } .mq-row.r .lab { color: #46677d; }
.ic.r { color: #46677d; border-color: #a8cde1; }
.big-ans.a { background: linear-gradient(120deg, #e3f1f8, #d3eaf7); color: #46677d; }
.big-ans.b { background: linear-gradient(120deg, #efe9fe, #e5dcfd); color: #6a52c8; }

/* radar */
.radar-card { margin-top: 18px; padding: 22px; }
.radar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.radar-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.radar-legend button { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.radar-legend button i { width: 9px; height: 9px; border-radius: 50%; }
.radar-legend button[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.radar-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 8px; }
.radar-svg { width: 100%; height: auto; }
.radar-svg .rs { transition: opacity .35s; }
.radar-lab { cursor: pointer; outline: none; }
.radar-readout { padding: 18px; border-radius: 16px; background: linear-gradient(180deg, #fbf9ff, #f5f1fe); border: 1px solid #ece4fd; }
.radar-readout .rt { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.radar-readout .rr { display: grid; grid-template-columns: 112px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.radar-readout .rr .nm { display: flex; gap: 7px; align-items: center; color: var(--ink-2); }
.radar-readout .rr .nm i { width: 9px; height: 9px; border-radius: 50%; }
.radar-readout .rr .bar { height: 10px; border-radius: 5px; background: #ede9f6; position: relative; overflow: hidden; }
.radar-readout .rr .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.radar-readout .rr b { text-align: right; font-variant-numeric: tabular-nums; }
.radar-readout .rr.ours .nm { font-weight: 700; color: var(--violet-d); }
@media (max-width: 860px) { .radar-body { grid-template-columns: 1fr; } }
/* qualitative verdict strip */
.verdict { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.vd { padding: 10px 12px; background: #fff; border-right: 1px solid var(--line); }
.vd:last-child { border-right: 0; }
.vd .m { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.vd .m em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.vd.no .m em { background: #fbe7e5; color: #b6463c; }
.vd.ok .m em { background: #e3f4ea; color: #1f7a4a; }
.vd b { display: block; font-size: 15.5px; margin-top: 3px; color: var(--ink); line-height: 1.3; }
.vd.no b { color: var(--muted); font-weight: 600; }
.vd.ours { background: linear-gradient(120deg, #f6f2ff, #efe9fe); }
.vd.ours b { color: var(--violet-d); }
.traj-box canvas { aspect-ratio: 1.45; }
@media (max-width: 560px) { .verdict { grid-template-columns: 1fr; } .vd { border-right: 0; border-bottom: 1px solid var(--line); } }

/* tennis motivation card */
.tennis { margin-top: 36px; padding: 22px; background: radial-gradient(60% 80% at 100% 0%, rgba(227, 241, 248, .7), transparent 70%), #fff; }
.tn-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tn-head h3 { position: relative; top: -3px; font-size: 26px; margin-top: 10px; letter-spacing: -.02em; }
.tn-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.tn-video { position: relative; border-radius: 16px; overflow: hidden; background: #ece8f5; aspect-ratio: 16 / 9; }
.tn-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tn-video .fr { position: absolute; left: 10px; bottom: 10px; font-family: var(--mono); font-size: 11.5px; color: #fff; background: rgba(20, 16, 40, .55); padding: 2px 8px; border-radius: 6px; }
.tn-plot { position: relative; border-radius: 16px; border: 1px solid var(--line); background: #fdfcff; min-height: 260px; }
.tn-plot canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tn-plot .cap { position: absolute; left: 12px; top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.tn-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 14px; font-size: 15px; color: var(--muted); }
.tn-ans { font-size: 34px; font-weight: 700; letter-spacing: -.025em; background: linear-gradient(115deg, #8b72e0, #b99cf4 55%, #f3a7bd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tn-ans.pop { animation: pop .4s ease; }
@media (max-width: 860px) { .tn-body { grid-template-columns: 1fr; } }

/* ===================== v4b ===================== */
/* dark impact band (results) */
.dark-band { background: radial-gradient(60% 50% at 85% 0%, rgba(155, 120, 230, .22), transparent 70%), radial-gradient(40% 40% at 0% 100%, rgba(117, 223, 202, .08), transparent 70%), #211e30; color: #fcfaff; }
.dark-band .eyebrow { color: #cbb6ff; } .dark-band .eyebrow .num { color: #9b8aaa; }
.dark-band h2.sec { color: #fff; } .dark-band .lede { color: #cbc3d6; } .dark-band .lede b { color: #fff; }
.dk-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); margin-top: 40px; align-items: start; }
.dk-grid h3 { color: #fff; font-size: 21px; letter-spacing: -.02em; }
.dk-key { display: flex; gap: 16px; margin-top: 10px; font-size: 12.5px; color: #cbc3d6; }
.dk-key span::before { content: ""; display: inline-block; width: 14px; height: 6px; border-radius: 0 3px 3px 0; margin-right: 6px; vertical-align: 1px; }
.dk-key .k-gsm::before { background: #a6a2b6; } .dk-key .k-ours::before { background: #d5b1ff; }
.dk-row { display: grid; grid-template-columns: 30% 1fr 15%; align-items: center; padding: 13px 2px; border-bottom: 1px solid #4d4259; }
.dk-name { font-weight: 600; color: #fff; font-size: 15px; } .dk-name small { display: block; font-size: 12px; font-weight: 400; color: #c9bfd4; }
.dk-pair { display: flex; flex-direction: column; gap: 4px; }
.dk-pair span { display: flex; align-items: center; gap: 6px; }
.dk-pair i { display: block; height: 7px; width: 0; border-radius: 0 4px 4px 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.dk-pair .b-gsm i { background: #a6a2b6; } .dk-pair .b-ours i { background: linear-gradient(90deg, #b89cf5, #d5b1ff); }
.dk-pair b { font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; } .b-gsm b { color: #c4bccf; } .b-ours b { color: #f2e6ff; }
.dk-gain { text-align: right; font-weight: 700; color: #ddc8ff; font-variant-numeric: tabular-nums; font-size: 16px; }
.dk-foot { color: #a89fb6; font-size: 12.5px; margin: 18px 0 0; line-height: 1.5; }
.dk-radar { margin: 0; border-left: 1px solid #51475c; padding-left: clamp(18px, 3vw, 48px); min-width: 0; }
.dk-radar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dk-radar-head span { font-size: 12px; color: #cfc2d9; }
.dark-band .radar-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dark-band .radar-legend button { display: flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid #62566f; background: #332c40; color: #fff; font: 600 12px var(--sans); border-radius: 6px; cursor: pointer; text-decoration: none; opacity: 1; }
.dark-band .radar-legend button i { width: 8px; height: 8px; border-radius: 50%; background: var(--trace); }
.dark-band .radar-legend button[aria-pressed="false"] { background: transparent; color: #b6acc2; border-style: dashed; }
.dark-band .radar-legend button[aria-pressed="false"] i { background: transparent; border: 1px solid var(--trace); }
#radar .radar-svg { display: block; width: 100%; height: auto; max-height: 338px; overflow: visible; }
.radar-scale { fill: #b6abc2; font: 10px var(--mono); paint-order: stroke; stroke: #292232; stroke-width: 3px; }
.radar-series { transition: opacity .3s; }
.radar-traces { transform-origin: 270px 170px; transform: scale(.15); opacity: 0; transition: transform .9s cubic-bezier(.16,.85,.25,1), opacity .6s; }
.radar-traces.in-view { transform: scale(1); opacity: 1; }
.axis-choice { cursor: pointer; outline: none; }
.axis-sector { fill: transparent; }
.axis-choice[aria-pressed="true"] .axis-sector { fill: rgba(224, 198, 255, .06); }
.axis-choice text { font: 500 12.5px var(--sans); fill: #e0d9e9; paint-order: stroke; stroke: #272132; stroke-width: 2.4px; }
.axis-choice[aria-pressed="true"] text { fill: #fff; font-weight: 700; }
.dark-band .radar-readout { border-top: 1px solid #584d62; padding: 10px 0 0; background: none; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
.dark-band .radar-readout strong { color: #fff; font-size: 14px; }
.dark-band .radar-readout > div { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12.5px; color: #d8cede; }
.dark-band .radar-readout span i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--trace); margin-right: 6px; }
.dark-band .radar-readout b { color: #fff; font-variant-numeric: tabular-nums; }
.dark-band .radar-readout em { font-style: normal; color: #9f95ad; font-size: 11.5px; margin-left: 2px; }
@media (max-width: 900px) { .dk-grid { grid-template-columns: 1fr; } .dk-radar { border-left: 0; border-top: 1px solid #51475c; padding: 20px 0 0; } }

/* Quartet4D-Val category cards */
.val-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.vcard { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 12px; transition: transform .2s, box-shadow .2s; }
.vcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.vcard.big { background: linear-gradient(150deg, #fbf9ff, #f1ebfe); border-color: #e3d9fb; }
.vc-top { display: flex; gap: 12px; align-items: center; min-height: 48px; }
.vc-ico { width: 56px; height: 40px; flex: none; border-radius: 10px; background: #f7f5fc; }
.vc-name { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.vcard.big .vc-name { font-size: 18px; }
.vc-ex { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; line-height: 1.35; }
.vc-bars { display: flex; flex-direction: column; gap: 6px; }
.vc-row { display: grid; grid-template-columns: 82px 1fr 34px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.vc-row .tr { height: 8px; border-radius: 4px; background: #f1eef7; position: relative; overflow: hidden; }
.vc-row .tr i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: #d6d1e3; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.vc-row[data-k="gsm"] .tr i { background: #a8ddd3; } .vc-row[data-k="geosr"] .tr i { background: #c3d7f3; }
.vc-row.ours { color: var(--ink); font-weight: 700; } .vc-row.ours .tr i { background: linear-gradient(90deg, #cdbdf9, #9b84ec); }
.vc-row b { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.vc-row.ours b { color: var(--violet-d); font-weight: 700; }
.vc-gain { margin-top: auto; font-size: 12px; color: var(--muted); }
.vc-gain b { font-size: 15px; color: var(--violet-d); }
@media (max-width: 980px) { .val-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .val-grid { grid-template-columns: 1fr; } }

#hero-rel { height: 118px !important; }
.qa-card.a { width: 44% !important; max-width: 44% !important; bottom: 10% !important; }

/* ===================== motivation (v5) ===================== */
.motiv-band { background: radial-gradient(50% 60% at 0% 10%, rgba(233, 225, 254, .9), transparent 70%), radial-gradient(45% 50% at 100% 30%, rgba(220, 243, 238, .7), transparent 70%), linear-gradient(180deg, #f6f3fd, var(--bg)); }
.mv-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.mv-big { font-size: clamp(56px, 7.4vw, 104px); font-weight: 700; letter-spacing: -.055em; line-height: .98; color: var(--ink); margin: 18px 0 0; }
.mv-big em { font-style: italic; background: linear-gradient(115deg, #7a5bd4, #a990e6); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.mv-copy p { font-size: 19px; color: var(--muted); margin: 22px 0 0; max-width: 26em; line-height: 1.55; }
.mv-copy p b { color: var(--ink); }
.mv-lab { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.motiv-scene { padding: 0 !important; gap: 0 !important; overflow: hidden; }
.motiv-scene .motiv-top { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.motiv-scene .motiv-svg { border-radius: 0; border: 0; }
.motiv-scene .motiv-foot { padding: 14px 20px; border-top: 1px solid var(--line); }
.motiv-scene .big-ans { background: none !important; padding: 0; min-width: 0; font-size: 26px; color: #6a52c8; }
.motiv-scene .big-ans.b { color: #4f7fcf; }
.mv-study { margin-top: 96px; }
.mv-study-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.mv-mid { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; color: var(--ink); margin: 14px 0 0; }
.mv-study-head p { color: var(--muted); font-size: 16px; margin: 16px 0 0; max-width: 34em; }
.mv-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid #e3d9fb; border-radius: 18px; background: linear-gradient(150deg, #fff, #f6f1ff); overflow: hidden; }
.mv-nums > div { padding: 18px 20px; } .mv-nums > div + div { border-left: 1px solid #e9e2fb; }
.mv-nums span { display: block; font-size: 12.5px; color: var(--muted); }
.mv-nums b { display: block; font-size: clamp(38px, 4vw, 52px); font-weight: 700; letter-spacing: -.04em; color: #8f8aa3; line-height: 1.1; margin-top: 4px; }
.mv-nums b small { font-size: .55em; }
.mv-nums .best b { color: #6a52c8; }
.mv-nums em { grid-column: 1 / -1; font-style: normal; font-weight: 700; font-size: 13.5px; color: #6a52c8; padding: 10px 20px; border-top: 1px solid #e9e2fb; background: rgba(239, 233, 254, .6); }
.variant-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.vrow.vcol { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; align-items: start; gap: 10px; padding: 14px; }
.vrow.vcol .mini { width: 100%; }
.vrow.vcol .vval { font-size: 26px; }
.mv-chart { margin-top: 14px; padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.mv-table { font-size: 13.5px; }
.mv-table .mt-h, .mv-table .mt-r { display: grid; grid-template-columns: 1fr 70px 56px; gap: 8px; padding: 11px 6px; border-bottom: 1px solid var(--line); align-items: center; }
.mv-table .mt-h { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.mv-table .mt-h span:not(:first-child), .mv-table .mt-r > :not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.mv-table .mt-r span:first-child { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.mv-table .mt-r i { width: 9px; height: 9px; border-radius: 50%; }
.mv-table .mt-r.best { background: linear-gradient(90deg, #f3eefe, #faf8ff); border-radius: 10px; border-bottom-color: transparent; }
.mv-table .mt-r.best span:first-child, .mv-table .mt-r.best b { color: #6a52c8; font-weight: 700; }
@media (max-width: 980px) { .mv-hero, .mv-study-head, .mv-chart { grid-template-columns: 1fr; } .variant-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .variant-row { grid-template-columns: 1fr; } .mv-nums b { font-size: 34px; } }

/* ===================== v5: Val (supplementary-video style) ===================== */
.val-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 14px; margin-top: 24px; }
.v-overall { border-radius: 20px; border: 1px solid #e3d9fb; background: linear-gradient(160deg, #fff, #f5effe); padding: 22px 20px; display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.vo-title { text-align: center; font-size: 22px; font-weight: 700; color: #6a52c8; }
.vo-ring { position: relative; width: min(184px, 100%); margin: 14px auto 18px; aspect-ratio: 1; }
.vo-ring svg { width: 100%; height: 100%; }
.vo-arc { transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1); }
.vo-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.vo-num b { font-size: 48px; font-weight: 700; letter-spacing: -.04em; background: linear-gradient(120deg, #7a5bd4, #a990e6); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.vo-num span { font-size: 14px; font-weight: 600; color: #6a52c8; margin-top: 4px; }
.vo-rows { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.vo-r { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 8px; column-gap: 10px; row-gap: 4px; font-size: 14px; color: var(--ink-2); }
.vo-r b { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.vo-r .tr { grid-column: 1; height: 7px; border-radius: 4px; background: #efecf5; position: relative; overflow: hidden; }
.vo-r .tr i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.vo-r[data-k="sft"] i { background: #d3d6df; } .vo-r[data-k="geosr"] i { background: #a8ddd3; } .vo-r[data-k="gsm"] i { background: #f7c3a3; }
.vo-r.ours { color: #6a52c8; font-weight: 700; } .vo-r.ours b { color: #6a52c8; font-weight: 700; font-size: 20px; } .vo-r.ours i { background: linear-gradient(90deg, #c7b5f6, #9b84ec); }
.v-cats { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.v-cat { grid-column: span 3; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-1); padding-bottom: 12px; transition: transform .2s, box-shadow .2s; }
.v-cat.wide { grid-column: span 4; }
.v-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.vc-head { height: 76px; background: linear-gradient(180deg, var(--tint), #fff); }
.vc-head canvas { width: 100%; height: 100%; display: block; }
.vc-t { text-align: center; font-size: 16px; font-weight: 700; color: var(--ink); margin: 2px 0 10px; color: var(--ink); }
.v-cat .vc-t { color: var(--ink); }
.vr { display: grid; grid-template-columns: 52px 1fr 40px; gap: 8px; align-items: center; padding: 3px 14px; font-size: 12px; color: var(--muted); }
.vr .tr { height: 8px; border-radius: 4px; background: #f1eff6; position: relative; overflow: hidden; }
.vr .tr i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.vr[data-k="sft"] i { background: #d3d6df; } .vr[data-k="geosr"] i { background: #a8ddd3; } .vr[data-k="gsm"] i { background: #f7c3a3; }
.vr b { text-align: right; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.vr.ours { color: #6a52c8; font-weight: 700; font-size: 13px; } .vr.ours .tr { height: 12px; border-radius: 6px; } .vr.ours i { background: linear-gradient(90deg, #c7b5f6, #9b84ec); border-radius: 6px; }
.vr.ours b { color: #6a52c8; font-weight: 700; font-size: 15px; }
@media (max-width: 1080px) { .val-grid { grid-template-columns: 1fr !important; } .v-cat, .v-cat.wide { grid-column: span 6; } }
@media (max-width: 560px) { .v-cat, .v-cat.wide { grid-column: span 12; } }
/* study cards: tidier minis */
.vrow.vcol .mini { width: 100%; height: 112px; }

/* overview dark performance panel */
.dark-card { margin-top: 24px; border-radius: 26px; padding: clamp(22px, 3vw, 36px); box-shadow: 0 30px 70px -30px rgba(40, 20, 90, .55); }
.dark-card .dc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.dark-card .dc-head h3 { color: #fff; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.025em; margin-top: 10px; }
.dark-card .dc-head p { margin: 0; max-width: 30em; color: #cbc3d6; font-size: 15px; }
.dark-card .dc-head p b { color: #fff; }
.dark-card .dk-grid { margin-top: 26px; }

/* ===================== consistency pass ===================== */
/* one heading scale for all section openers */
h2.sec { font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -.03em; }
.mv-big { font-size: clamp(54px, 6.8vw, 96px); }
.mv-mid { font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -.03em; }
/* every card: same radius, border and shadow */
.card, .vcard, .v-cat, .v-overall, .vrow, .tennis, .gd { border-radius: 20px; }
.card { border-color: #ebe7f3; box-shadow: 0 1px 2px rgba(30, 20, 70, .04), 0 12px 32px -18px rgba(60, 40, 130, .22); }
/* chart titles / subtitles share one style */
.chart-title, .vc-t, .vo-title, .tn-head h3 { letter-spacing: -.01em; }
.chart-sub, .gd-h small { color: var(--muted); }
/* small uppercase labels */
.mv-lab, .mq-tag, .cap, .tn-plot .cap, .gd-answer .lab, .answer-chip span { letter-spacing: .1em; }
/* segmented controls look the same everywhere */
.seg { background: #f3f0fa; border-color: #e7e2f2; }
.seg button[aria-pressed="true"] { color: #5f48b8; box-shadow: 0 1px 2px rgba(40, 20, 90, .08), 0 2px 8px -2px rgba(40, 20, 90, .12); }
/* feature strip in pastel */
.feat-vec span { border-radius: 7px; height: 34px; }
/* Ours is always the violet gradient, baselines flat */
.bar-row.ours .bar-fill, .vc-row.ours .tr i { background: linear-gradient(90deg, #cdbdf9, #9b84ec) !important; }

/* motivation: answer colour follows the selected person */
.motiv-scene .big-ans.a { color: #4d7a94 !important; }
.motiv-scene .big-ans.b { color: #6a58a4 !important; }
#motiv-seg button[data-p="A"][aria-pressed="true"] { color: #46677d; }
#motiv-seg button[data-p="B"][aria-pressed="true"] { color: #6a58a4; }

/* controlled study on the dark panel */
.mv-study.dark-card { margin-top: 96px; }
.mv-study .eyebrow { color: #cbb6ff; }
.mv-study .mv-mid { color: #fff; }
.mv-study .mv-study-head p { color: #cbc3d6; }
.mv-study .mv-nums { background: #2b2639; border-color: #4d4259; }
.mv-study .mv-nums > div + div { border-left-color: #4d4259; }
.mv-study .mv-nums span { color: #b8aec6; }
.mv-study .mv-nums b { color: #8f86a3; }
.mv-study .mv-nums .best b { color: #d5b1ff; }
.mv-study .mv-nums em { background: rgba(213, 177, 255, .08); border-top-color: #4d4259; color: #d5b1ff; }
.mv-study .vrow { background: #2b2639; border-color: #4d4259; box-shadow: none; }
.mv-study .vrow.best { background: linear-gradient(150deg, #352d4d, #2b2639); border-color: #6b5a8f; box-shadow: 0 0 0 1px rgba(213, 177, 255, .15), 0 18px 40px -20px rgba(155, 120, 230, .5); }
.mv-study .vname { color: #fff; }
.mv-study .vval { color: #e9e3f5; }
.mv-study .vrow.best .vval { color: #d5b1ff; }
.mv-study .mini > rect:first-child { fill: #332c40; stroke: #4d4259; }
.mv-study .ic.v { background: #3a3150; color: #d6c9ff; } .mv-study .ic.q { background: #233a37; color: #9fe0d2; }
.mv-study .ic.w { background: #3a3448; color: #d0c8dd; } .mv-study .ic.r { background: transparent; color: #a8cde1; border-color: #5f8fa8; }
.mv-study .ic.t { background: linear-gradient(120deg, #4a3654, #3a3160); color: #f0d9ff; }
.mv-study .mv-chart { background: #2b2639; border-color: #4d4259; box-shadow: none; }
.mv-study .mv-chart .chart-title { color: #fff; } .mv-study .mv-chart .chart-sub { color: #b8aec6; }
.mv-study #study-chart line { stroke: #463d55 !important; }
.mv-study #study-chart text { fill: #a89fb6 !important; }
.mv-study .mv-table .mt-h, .mv-study .mv-table .mt-r { border-bottom-color: #4d4259; grid-template-columns: 1fr 64px; }
.mv-study .mv-table .mt-h { color: #a89fb6; }
.mv-study .mv-table .mt-r span:first-child, .mv-study .mv-table .mt-r b { color: #e9e3f5; }
.mv-study .mv-table .mt-r.best { background: rgba(213, 177, 255, .1); }
.mv-study .mv-table .mt-r.best span:first-child, .mv-study .mv-table .mt-r.best b { color: #d5b1ff; }
.mv-table .mt-h, .mv-table .mt-r { grid-template-columns: 1fr 64px; }
/* controlled study on dark: higher contrast */
.mv-study .eyebrow { color: #e2d2ff; }
.mv-study .eyebrow::before { background: #e2d2ff; opacity: .8; }
.mv-study .mv-study-head p { color: #ddd6e8; }
.mv-study .mv-nums span { color: #d6cfe2; }
.mv-study .mv-nums b { color: #e6e1ee; }
.mv-study .mv-nums .best b { color: #dcc3ff; }
.mv-study .mv-nums em { color: #e8d6ff; }
.mv-study .vrow { background: #312b42; border-color: #5a4f6c; }
.mv-study .vname { color: #fff; font-size: 15px; }
.mv-study .vval { color: #fff; }
.mv-study .mini > rect:first-child { fill: #f7f5fc; stroke: #f7f5fc; }
.mv-study .ic.v { background: #e9e1fd; color: #5f48b8; } .mv-study .ic.q { background: #d9f2ec; color: #2f7f71; }
.mv-study .ic.w { background: #ebe8f1; color: #4b4560; } .mv-study .ic.r { background: #e3f1f8; color: #46677d; border-color: #a8cde1; }
.mv-study .ic.t { background: linear-gradient(120deg, #fdece2, #efe9fe); color: #6a3f96; }
.mv-study .mv-chart { background: #312b42; border-color: #5a4f6c; }
.mv-study .mv-chart .chart-sub, .mv-study #study-chart text { color: #d6cfe2; fill: #d6cfe2 !important; }
.mv-study #study-chart line { stroke: #574d68 !important; }
.mv-study .mv-table .mt-h { color: #cfc6dc; }
.mv-study .mv-table .mt-r span:first-child, .mv-study .mv-table .mt-r b { color: #fff; }
.mv-study .mv-table .mt-r.best span:first-child, .mv-study .mv-table .mt-r.best b { color: #e2c9ff; }
.mv-study .mv-table .mt-r.best { background: rgba(213, 177, 255, .16); }

/* results scoreboard */
.board { margin-top: 26px; padding: 22px 24px; }
.board-key { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted); align-items: center; }
.board-key .dot { width: 9px; height: 9px; border-radius: 50%; } .board-key .dot.big { width: 11px; height: 11px; }
.board-key .ref { width: 0; height: 12px; border-left: 2px dashed #a9a4bd; border-radius: 0; }
.board-key .note { color: var(--faint); margin-left: auto; }
.board-grid { display: grid; grid-template-columns: 130px repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.bh { padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.bh b { display: block; font-size: 17px; color: var(--ink); } .bh span { display: block; font-size: 12px; color: var(--muted); }
.bh em { display: inline-block; margin-top: 6px; font-style: normal; font-size: 11px; color: #8f8aa3; border: 1px dashed #cfcadb; border-radius: 6px; padding: 1px 6px; }
.bb { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.bb.top b { color: var(--violet-d); }
.bc { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bc.top, .bb.top { background: linear-gradient(90deg, #faf8ff, #f6f2fe); }
.bc-num { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bc-num b { font-size: 28px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.bc.top .bc-num b { background: linear-gradient(120deg, #6a52c8, #a990e6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bc-num .gain { font-size: 12.5px; font-weight: 700; color: #6a52c8; background: var(--lav); padding: 1px 8px; border-radius: 99px; }
.bc-num .beat { font-size: 10.5px; font-weight: 700; color: #3e9a8a; background: #e3f6f1; padding: 1px 7px; border-radius: 99px; }
.strip { position: relative; height: 22px; margin-top: 10px; }
.strip .rail { position: absolute; left: 0; right: 0; top: 10px; height: 2px; border-radius: 2px; background: #eeebf5; }
.strip .span { position: absolute; top: 9px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #e0d6fb, #b9a6f6); transform-origin: left; transform: scaleX(0); transition: transform .9s cubic-bezier(.2,.8,.2,1) .2s; }
.strip .ref { position: absolute; top: 2px; height: 18px; border-left: 2px dashed #b8b3c9; }
.strip .d { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; cursor: default; }
.strip .d.ours { top: 3px; width: 16px; height: 16px; margin-left: -8px; background: #9b84ec; box-shadow: 0 0 0 2.5px #fff, 0 4px 10px rgba(120, 90, 220, .35); }
.board-grid.in .strip .span { transform: scaleX(1); }
@media (max-width: 860px) { .board-grid { grid-template-columns: 90px repeat(3, minmax(150px, 1fr)); overflow-x: auto; } .bc-num b { font-size: 22px; } }
.qual-ori { position: absolute; right: 10px; bottom: 10px; width: 132px; height: 104px; border-radius: 12px; background: rgba(255,255,255,.86); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 8px 20px -10px rgba(40,20,90,.4); padding: 6px 8px 4px; }
.qual-ori span { display: block; font-size: 10px; font-weight: 700; color: #46677d; letter-spacing: .02em; }
.qual-ori canvas { width: 100%; height: 78px; display: block; }
.verdict.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vd .m:only-child { }
.verdict.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qual-ori { width: 140px; height: 112px; }
.qual-ori span { white-space: nowrap; }
.qual-ori canvas { height: 86px; }
/* TL;DR emphasis */
.tldr { display: block !important; margin: 40px 0 0; padding: clamp(26px, 3.4vw, 40px) clamp(26px, 4vw, 48px) !important; border-radius: 26px;
  background: radial-gradient(60% 120% at 100% 0%, rgba(253, 227, 211, .55), transparent 70%), radial-gradient(60% 120% at 0% 100%, rgba(227, 241, 248, .7), transparent 70%), linear-gradient(120deg, #fbf9ff, #f3eefe) !important;
  border: 1px solid #e3d9fb; box-shadow: 0 24px 60px -34px rgba(90, 60, 180, .45); }
.tldr::before { display: none; }
.tldr .tag { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; color: #fff; background: linear-gradient(135deg, #9b84ec, #b99cf4); padding: 4px 12px; border-radius: 999px; margin: 0; }
.tldr .tl-lead { margin: 16px 0 0; font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; color: var(--ink); }
.tldr .tl-lead em { font-style: normal; background: linear-gradient(115deg, #7a5bd4, #a990e6 55%, #f3a7bd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tldr .tl-body { margin: 14px 0 0; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.6; color: var(--ink-2); max-width: 46em; }
.tldr .tl-body .t { background: var(--peach); color: #b3602f; font-weight: 600; padding: 0 .25em; border-radius: 5px; }
.tldr .tl-body .r { background: #e3f1f8; color: #46677d; font-weight: 600; padding: 0 .25em; border-radius: 5px; }
.dark-card { margin-top: 56px !important; }

/* ===================== v6 ===================== */
.tldr { margin: 0 0 28px !important; }
/* tennis: three panels */
.tn-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) !important; }
.tn-plot.rel { border-color: #d6c9fa; background: linear-gradient(180deg, #fcfbff, #f6f2fe); }
.tn-coord { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #6a58a4; background: #f1ecfe; border: 1px solid #ddd1fb; padding: 7px 14px; border-radius: 999px; }
.tn-coord::before { content: "Expressed in"; font-weight: 500; color: var(--muted); font-size: 14px; }
.tn-coord.cam { color: #46677d; background: #e3f1f8; border-color: #c4e0ec; }
@media (max-width: 980px) { .tn-body { grid-template-columns: 1fr !important; } }
/* results: grouped bars */
.rc-key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; font-size: 13px; color: var(--muted); }
.rc-key i { width: 18px !important; height: 8px !important; border-radius: 4px !important; }
.rc-key i.ref { width: 0 !important; height: 14px !important; border-left: 2px dashed #b3adc6; border-radius: 0 !important; background: none !important; }
.rc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.rc { padding: 20px 20px 10px; }
.rc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rc-head b { font-size: 18px; color: var(--ink); } .rc-head span { font-size: 13px; color: var(--muted); }
.rc-head em { margin-left: auto; font-style: normal; font-size: 11px; color: #8f8aa3; border: 1px dashed #cfcadb; border-radius: 6px; padding: 1px 6px; }
.rc-row { display: grid; grid-template-columns: 84px 1fr 44px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rc-row.hl .rc-name { color: var(--violet-d); font-weight: 700; }
.rc-name { font-size: 12.5px; color: var(--ink-2); }
.rc-bars { position: relative; display: flex; flex-direction: column; gap: 4px; }
.rc-bars span { position: relative; height: 15px; display: flex; align-items: center; }
.rc-bars span i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 0 7px 7px 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.rc-grid.in .rc-bars span i { width: var(--w); }
.rc-bars .b0 i { background: #e6e3ee; } .rc-bars .b1 i { background: linear-gradient(90deg, #d8cbfb, #9b84ec); }
.rc-bars em, .rc-bars b { position: relative; padding-left: 7px; font-size: 11px; font-style: normal; white-space: nowrap; }
.rc-bars em { color: #6b6782; } .rc-bars b { color: #fff; font-size: 11.5px; }
.rc-bars .ref { position: absolute; top: -3px; bottom: -3px; height: auto; width: 0; border-left: 2px dashed #b3adc6; }
.rc-gain { font-size: 13px; font-weight: 700; color: #6a52c8; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .rc-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tn-foot { flex-wrap: wrap; } .tn-ans { font-size: 28px; } .tn-coord { font-size: 14px; } }

/* ===================== v7 ===================== */
.authors { margin-top: 24px; }
.au-list { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 16px; }
.au-list a { color: var(--ink); font-weight: 500; } .au-list a:hover { color: var(--violet-d); }
.au-list sup { color: var(--violet); font-size: 11px; margin-left: -12px; margin-right: 2px; }
.authors .affil { display: flex; gap: 16px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.authors .affil sup { color: var(--violet); margin-right: 2px; }
.au-note { margin-top: 6px; font-size: 12px; color: var(--faint); }
.dk-seg { background: #2b2639 !important; border-color: #4d4259 !important; }
.dk-seg button { color: #cbc3d6 !important; } .dk-seg button[aria-pressed="true"] { background: #f1ecfe !important; color: #4f36a0 !important; }
.dark-card .dc-head h3 em { font-style: normal; background: linear-gradient(115deg, #c7b0ff, #e9b8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dk-key { display: flex; flex-wrap: wrap; gap: 6px 14px !important; }
.dk-key span::before { background: var(--c) !important; }
.dk-row { grid-template-columns: max-content minmax(0, 1fr); column-gap: clamp(16px, 2vw, 28px); padding: 12px 2px !important; }
.dk-stack { display: flex; flex-direction: column; gap: 3px; }
.dk-stack span { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: 6px; }
.dk-stack i { display: block; height: 6px; width: 0; border-radius: 0 3px 3px 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.dk-stack span { position: relative; } .dk-stack span::after { content: none; }
.dk-stack b { font-size: 11px; font-weight: 500; color: #c4bccf; text-align: right; font-variant-numeric: tabular-nums; }
.dk-stack .b-ours b { color: #fff; font-weight: 700; } .dk-stack .b-ours i { height: 8px; }
.dk-stack .b-gpt i { background: repeating-linear-gradient(90deg, #8f86a3 0 3px, transparent 3px 6px) !important; height: 2px; }
.dk-stack .b-gpt b { color: #a89fb6; }
/* tennis boxes */
.tn-plot.world { background: #fafafb; border-color: #e5e5ea; }
.tn-plot.world .cap { color: #8f8f99; }
.tn-plot.rel { background: linear-gradient(180deg, #faf7ff, #f1ebfe) !important; border: 1.5px solid #cdbcf8 !important; }
.tn-plot.rel .cap { color: #6a52c8; }
/* results: aligned rows */
.rc-grid { gap: 14px; }
.rc { padding: 18px 18px 12px; }
.rc-head em { display: none; }
.rc-g { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 12px 0 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.rc-g:first-of-type { border-top: 0; padding-top: 0; }
.rc-row { display: grid !important; grid-template-columns: 104px 1fr 38px !important; gap: 8px !important; align-items: center; padding: 3px 0 !important; border: 0 !important; }
.rc-name { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-track { position: relative; height: 9px; border-radius: 5px; background: #f3f1f8; overflow: hidden; }
.rc-track i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 5px; background: #d3cfdf; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.rc-grid.in .rc-track i { width: var(--w); }
.rc-row.base .rc-track i { background: #c3cee0; } .rc-row.prop .rc-track i { background: #e7dff5; }
.rc-row.ours .rc-name, .rc-row.ours .rc-val { color: var(--violet-d); font-weight: 700; }
.rc-row.ours .rc-track i { background: linear-gradient(90deg, #cdbdf9, #9b84ec); }
.rc-val { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.au-list { gap: 2px 16px !important; }
.au { white-space: nowrap; } .au sup { margin-left: 1px !important; margin-right: 0 !important; font-size: 10.5px; }

/* ===================== v8 ===================== */
.tn-foot { justify-content: flex-end !important; }
.tn-pair { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.dark-band .radar-readout { margin-top: 10px; }
.dk-stack i { transition: width .7s cubic-bezier(.2,.8,.2,1) !important; }
.dk-stack .b-base b, .dk-stack .b-geo b, .dk-stack .b-gsm b { color: #9c94aa; }
.steps-coarse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.steps-coarse > div { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.steps-coarse b { color: var(--violet); font-size: 16px; }
@media (max-width: 860px) { .steps-coarse { grid-template-columns: 1fr; } }
.vrow.vcol .mini { width: 100%; height: auto; }
.verdict.one { grid-template-columns: 1fr; }

.btn.weights { cursor: default; }
.btn.weights svg { width: 23px; height: 23px; }
.dk-key .key-gpt::before { width: 20px; background: none !important; height: 0; border-radius: 0; border-top: 2px dashed var(--c); }
.dk-row { grid-template-columns: minmax(108px, 29%) minmax(0, 1fr); }
#radar { margin-top: 16px; }
#results .val-grid { margin-top: 26px; }
@media (max-width: 600px) {
  .dk-row { grid-template-columns: minmax(96px, auto) minmax(0, 1fr); }
}
@media (min-width: 900px) { .punch-line .ln { white-space: normal; } }

.road-observer { transition: opacity .25s; }
.pipeline-card { margin-top: 20px; }
