/* ============================================================
   Prime Agent — launch page
   dark research-lab aesthetic · Space Grotesk + Instrument Serif + IBM Plex Mono
   ============================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif-400i.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --bg: #060708;
  --bg-2: #0a0d10;
  --bg-3: #0d1114;
  --ink: #e9eef1;
  --ink-2: #aab4bc;
  --muted: #6e7982;
  --hairline: rgba(233, 238, 241, 0.09);
  --hairline-2: rgba(233, 238, 241, 0.16);
  --pa: #57f2a3;
  --pa-dim: rgba(87, 242, 163, 0.12);
  --pa-line: rgba(87, 242, 163, 0.35);
  --blue: #2ea3ff;
  --amber: #ffb454;
  --red: #ff6f6f;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --wrap: 1160px;
  --wrap-wide: 1280px;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 340;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(87, 242, 163, 0.28); color: #f4fff9; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0.01em; }
.accent { color: var(--pa); }
.warn { color: var(--amber); }

a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.wrap--wide { max-width: var(--wrap-wide); }

/* ---------- progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90;
  background: transparent; pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--pa), var(--blue));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 32px;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(6, 7, 8, 0.72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 500; font-size: 15px; letter-spacing: 0.02em;
  white-space: nowrap; flex: none;
}
.nav__mark { width: 24px; height: 24px; color: var(--pa); flex: none; }
.nav__tag {
  font-family: var(--mono); font-size: 10px; color: var(--pa);
  border: 1px solid var(--pa-line); border-radius: 999px; padding: 2px 7px;
  letter-spacing: 0.06em;
}
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  text-decoration: none; font-size: 13.5px; color: var(--ink-2);
  padding: 7px 11px; border-radius: 8px; letter-spacing: 0.02em;
  transition: color 0.25s, background 0.25s;
}
.nav__links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav__links a.is-active { color: var(--pa); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__star { display: inline-flex; align-items: center; gap: 5px; }
.nav__burger {
  display: none; width: 40px; height: 40px; border: 1px solid var(--hairline-2);
  background: transparent; border-radius: 10px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 500; font-size: 14.5px; letter-spacing: 0.02em;
  text-decoration: none; border-radius: 999px; padding: 13px 24px;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--solid {
  background: var(--pa); color: #04120a;
  box-shadow: 0 0 0 0 rgba(87, 242, 163, 0);
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 10px 32px -8px rgba(87, 242, 163, 0.45); }
.btn--ghost { border-color: var(--hairline-2); color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { border-color: var(--pa-line); background: var(--pa-dim); transform: translateY(-2px); }

:focus-visible { outline: 2px solid var(--pa); outline-offset: 3px; border-radius: 4px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px 0 90px; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52% 42% at 72% 18%, rgba(87, 242, 163, 0.07), transparent 70%),
    radial-gradient(40% 36% at 18% 80%, rgba(46, 163, 255, 0.05), transparent 70%);
}
.hero__inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-2);
  border: 1px solid var(--hairline-2); border-radius: 999px; padding: 8px 16px;
  background: rgba(255, 255, 255, 0.02);
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pa); box-shadow: 0 0 12px var(--pa); animation: blink 2.6s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero__title {
  margin: 34px 0 26px;
  font-size: clamp(2.9rem, 7.2vw, 5.9rem);
  font-weight: 500; line-height: 1.02; letter-spacing: -0.035em;
}
.hero__title span { display: block; }
.hero__title .serif-i { color: var(--pa); letter-spacing: -0.01em; }

.hero__lede { max-width: 640px; font-size: clamp(1.02rem, 1.6vw, 1.22rem); color: var(--ink-2); font-weight: 330; }
.hero__lede strong { color: var(--ink); font-weight: 500; }

/* swap module */
.swap {
  position: relative; margin: 44px 0 0; max-width: 720px;
  border: 1px solid var(--hairline-2); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  padding: 20px 22px 26px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.swap__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.swap__label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.swap__note { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--muted); }
.swap__row {
  display: grid; grid-template-columns: 150px 1fr 62px 16px;
  align-items: center; gap: 14px; padding: 7px 0;
}
.swap__name { font-size: 13.5px; color: var(--ink-2); }
.swap__row--hero .swap__name { color: var(--ink); font-weight: 500; }
.swap__track { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); overflow: hidden; position: relative; }
.swap__bar { height: 100%; width: 0; border-radius: 999px; }
.swap__bar--off { background: linear-gradient(90deg, #3a4248, #59636c); }
.swap__bar--pa { background: linear-gradient(90deg, #1f8f5c, var(--pa)); box-shadow: 0 0 18px rgba(87, 242, 163, 0.35); }
.swap__val { font-size: 15px; text-align: right; }
.swap__pct { font-size: 12px; color: var(--muted); }
.swap__pct.accent, .swap__val.accent { color: var(--pa); }
.swap__baseline { position: relative; height: 22px; margin-top: 10px; border-top: 1px dashed rgba(255, 180, 84, 0.5); }
.swap__baseline span {
  position: absolute; top: -9px; transform: translateX(-100%);
  font-family: var(--mono); font-size: 10.5px; color: var(--amber);
  background: var(--bg); padding: 0 8px 0 2px; white-space: nowrap; letter-spacing: 0.05em;
}

.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }

/* terminal */
.term {
  margin-top: 46px; max-width: 720px;
  border: 1px solid var(--hairline-2); border-radius: var(--r);
  background: rgba(4, 6, 7, 0.8); overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.term__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.025); }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3138; }
.term__bar i:nth-child(1) { background: #ff5f57; } .term__bar i:nth-child(2) { background: #febc2e; } .term__bar i:nth-child(3) { background: #28c840; }
.term__title { margin-left: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.05em; }
.term__body {
  padding: 18px 20px 20px; font-size: 12.8px; line-height: 1.75;
  min-height: 210px; white-space: pre-wrap; word-break: break-word;
  color: var(--ink-2);
}
.term__body .t-cmd { color: var(--ink); }
.term__body .t-ok { color: var(--pa); }
.term__body .t-dim { color: var(--muted); }
.term__body .t-cursor { display: inline-block; width: 7px; height: 14px; background: var(--pa); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }

.hero__scrollcue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 24px; height: 40px; border: 1.5px solid var(--hairline-2); border-radius: 999px; z-index: 2;
}
.hero__scrollcue span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--pa); animation: cue 2s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- ticker ---------- */
.ticker { border-block: 1px solid var(--hairline); padding: 14px 0; overflow: hidden; background: var(--bg-2); }
.ticker__track { display: flex; gap: 34px; width: max-content; animation: tick 36s linear infinite; }
.ticker__track span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ticker__track i { color: var(--pa); font-style: normal; font-size: 9px; align-self: center; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 130px 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--hairline); }
.section__head { max-width: 780px; margin-bottom: 64px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__num {
  display: inline-block; font-size: 12px; color: var(--pa); letter-spacing: 0.2em;
  border: 1px solid var(--pa-line); border-radius: 999px; padding: 5px 13px; margin-bottom: 22px;
}
.section__title { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.028em; }
.section__title--xl { font-size: clamp(2.2rem, 5.4vw, 4.1rem); }
.section__title .serif-i { color: var(--pa); }
.section__lede { margin-top: 20px; color: var(--ink-2); font-size: clamp(1rem, 1.4vw, 1.13rem); max-width: 640px; font-weight: 330; }
.section__head--center .section__lede { margin-inline: auto; }
.section__lede b, .section__lede strong { color: var(--ink); font-weight: 500; }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar {
  border: 1px solid var(--hairline); border-radius: var(--r); padding: 30px 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--pa-line); box-shadow: 0 24px 60px -30px rgba(87, 242, 163, 0.18); }
.pillar__icon { width: 44px; height: 44px; color: var(--pa); margin-bottom: 20px; }
.pillar__icon svg { width: 100%; height: 100%; }
.pillar h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 10px; }
.pillar p { font-size: 14.5px; color: var(--ink-2); font-weight: 330; margin-bottom: 16px; }
.pillar p em { color: var(--ink); font-style: normal; border-bottom: 1px solid var(--pa-line); }
.pillar code { font-size: 12px; color: var(--pa); background: var(--pa-dim); border: 1px solid var(--pa-line); border-radius: 7px; padding: 4px 9px; display: inline-block; }

.factrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; border-top: 1px solid var(--hairline); padding-top: 44px; }
.fact__num { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 500; letter-spacing: -0.02em; display: inline; }
.fact__unit { font-size: 1.2rem; color: var(--pa); margin-left: 4px; }
.fact__lbl { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- RLM diagram ---------- */
.rlm {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px;
  align-items: stretch;
}
.rlm__code {
  border: 1px solid var(--hairline-2); border-radius: var(--r); overflow: hidden;
  background: #04060a; display: flex; flex-direction: column;
}
.rlm__file { padding: 11px 16px; font-size: 11px; color: var(--muted); letter-spacing: 0.06em; border-bottom: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.02); }
.rlm__code pre { padding: 22px 20px; font-size: 13.2px; line-height: 1.8; overflow-x: auto; color: var(--ink-2); flex: 1; }
.c-kw { color: var(--pa); } .c-str { color: #ffd28a; } .c-num { color: var(--blue); } .c-cm { color: #5b6770; font-style: italic; }

.rlm__stage { border: 1px solid var(--hairline); border-radius: var(--r); background: radial-gradient(80% 80% at 50% 0%, rgba(87, 242, 163, 0.04), transparent), var(--bg-3); }
.rlm__svg { display: block; width: 100%; height: auto; }
.rlm__edge { fill: none; stroke: rgba(233, 238, 241, 0.22); stroke-width: 1.3; stroke-dasharray: 5 6; }
.rlm__edge--ret { stroke: rgba(87, 242, 163, 0.35); }
.rlm__kernelring { fill: #070b0e; stroke: var(--pa); stroke-width: 1.4; }
.rlm__tk { fill: var(--ink); font: 500 12px var(--mono); }
.rlm__tk2 { fill: var(--muted); font: 400 7.5px var(--mono); }
.rlm__sub rect { fill: #0a0f12; stroke: var(--hairline-2); }
.rlm__sub text { fill: var(--ink-2); font: 500 10.5px var(--mono); }
.rlm__sub .rlm__tsub { fill: var(--muted); font-size: 8.5px; }
.rlm__sub.is-live rect { stroke: var(--pa); }
.rlm__result rect { fill: rgba(87, 242, 163, 0.1); stroke: var(--pa-line); }
.rlm__result text { fill: var(--pa); font: 500 10.5px var(--mono); }
.rlm__pulse { opacity: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.chip {
  font-size: 13px; color: var(--ink-2); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 8px 15px; background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s, color 0.3s;
}
.chip b { color: var(--pa); font-family: var(--mono); font-weight: 500; margin-right: 6px; font-size: 12px; }
.chip:hover { border-color: var(--pa-line); color: var(--ink); }

/* ---------- refine loop ---------- */
.refine { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.refine__core {
  position: relative; aspect-ratio: 1.35; border: 1px solid var(--hairline);
  border-radius: var(--r); background: radial-gradient(60% 60% at 50% 55%, rgba(87, 242, 163, 0.05), transparent), var(--bg-3);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.refine__base {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--pa-line); background: #08110c; border-radius: 12px; padding: 14px 20px;
  box-shadow: 0 0 44px rgba(87, 242, 163, 0.12);
}
.refine__base b { font-family: var(--mono); font-size: 13px; font-weight: 500; display: block; }
.refine__base small { color: var(--muted); font-size: 11.5px; }
.refine__lock { color: var(--pa); display: flex; }
.refine__orbit { position: absolute; inset: 0; }
.refine__sat {
  --a: 0deg;
  position: absolute; top: 50%; left: 50%;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
  background: rgba(10, 14, 16, 0.9); border: 1px solid var(--hairline-2);
  border-radius: 999px; padding: 6px 12px; white-space: nowrap;
  animation: sat-orbit 26s linear infinite;
}
.refine__core { container-type: inline-size; }
.refine__sat--2 { --a: 90deg; }
.refine__sat--3 { --a: 180deg; }
.refine__sat--4 { --a: 270deg; }
@keyframes sat-orbit {
  from { transform: translate(-50%,-50%) rotate(var(--a)) translateY(-34cqw) rotate(calc(var(--a) * -1)); }
  to   { transform: translate(-50%,-50%) rotate(calc(var(--a) + 360deg)) translateY(-34cqw) rotate(calc((var(--a) + 360deg) * -1)); }
}
.refine__orbit::before {
  content: ""; position: absolute; inset: 16%;
  border: 1px dashed rgba(233, 238, 241, 0.14); border-radius: 50%;
}
.refine__steps { list-style: none; display: grid; gap: 0; }
.refine__steps li { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.refine__steps li:first-child { padding-top: 0; }
.refine__steps li:last-child { border-bottom: 0; }
.refine__steps span { font-size: 12.5px; color: var(--pa); letter-spacing: 0.06em; }
.refine__steps p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); font-weight: 330; }

/* ---------- ARC section ---------- */
.section--arc {
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(46, 163, 255, 0.05), transparent),
    radial-gradient(60% 50% at 50% 100%, rgba(87, 242, 163, 0.05), transparent),
    #05070a;
  border-block: 1px solid var(--hairline);
}
.arc { border: 1px solid var(--hairline-2); border-radius: 18px; background: rgba(3, 5, 7, 0.7); padding: 12px; box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9); }
.arc__svg { display: block; width: 100%; height: auto; }

.arc__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.stat { border-left: 2px solid var(--pa-line); padding-left: 18px; }
.stat__num { font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-weight: 500; letter-spacing: -0.02em; }
.stat__sign { font-size: 1.1rem; margin-left: 2px; }
.stat__lbl { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.arc__note { margin-top: 36px; font-size: 14px; color: var(--muted); max-width: 620px; }
.section__head--center + .arc { margin-top: 8px; }
.arc__note, .pair { margin-inline: auto; }

.pair { margin-top: 56px; max-width: 720px; border: 1px solid var(--hairline); border-radius: var(--r); background: rgba(255, 255, 255, 0.02); padding: 22px 24px 18px; }
.pair__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pair__head span:first-child { font-size: 13px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.pair__delta { color: var(--pa); font-size: 13px; }
.pair__row { display: grid; grid-template-columns: 140px 1fr 58px 16px; align-items: center; gap: 14px; padding: 6px 0; }
.pair__name { font-size: 13px; color: var(--ink-2); }
.pair__track { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.pair__bar { height: 100%; width: 0; border-radius: 999px; }
.pair__bar--off { background: linear-gradient(90deg, #3a4248, #59636c); }
.pair__bar--pa { background: linear-gradient(90deg, #1f8f5c, var(--pa)); }
.pair__val { font-size: 14px; text-align: right; }
.pair__pct { font-size: 11px; color: var(--muted); }
.pair__cap { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* ---------- duels ---------- */
.duels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.duel { border: 1px solid var(--hairline); border-radius: var(--r); padding: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent); transition: transform 0.4s var(--ease), border-color 0.4s; }
.duel:hover { transform: translateY(-4px); border-color: var(--pa-line); }
.duel header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.duel__model { font-size: 12px; color: var(--ink-2); letter-spacing: 0.06em; }
.duel__score { font-size: 15px; color: var(--muted); font-family: var(--mono); }
.duel__score b { font-size: 26px; font-weight: 500; }
.duel__pips { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin-bottom: 18px; }
.duel__pips i { aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, 0.07); transition: background 0.5s var(--ease), box-shadow 0.5s; }
.duel__pips i.on { background: var(--pa); box-shadow: 0 0 10px rgba(87, 242, 163, 0.4); }
.duel footer { display: flex; justify-content: space-between; font-size: 12.5px; }
.duel__pa { color: var(--pa); font-family: var(--mono); letter-spacing: 0.05em; }
.duel__vs { color: var(--muted); }

.oolong { margin-top: 44px; border: 1px solid var(--hairline); border-radius: var(--r); padding: 26px 28px 34px; background: rgba(255, 255, 255, 0.02); }
.oolong__cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 46px; }
.oolong__scale { position: relative; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.oolong__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, rgba(87, 242, 163, 0.15), rgba(87, 242, 163, 0.45)); }
.oolong__mark { position: absolute; top: -8px; transform: translateX(-50%); text-align: center; }
.oolong__mark i { display: block; width: 2px; height: 28px; margin: 0 auto; background: var(--ink-2); }
.oolong__mark span { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; color: var(--ink-2); }
.oolong__mark--pa i { background: var(--pa); box-shadow: 0 0 12px var(--pa); height: 36px; margin-top: -8px; }
.oolong__mark--pa span { color: var(--pa); top: 34px; }
.honest { margin-top: 30px; font-size: 14px; color: var(--muted); }
.honest b, .honest strong { color: var(--ink-2); }

/* ---------- cases ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.case { border: 1px solid var(--hairline); border-radius: var(--r); overflow: hidden; background: var(--bg-3); display: flex; flex-direction: column; transition: transform 0.4s var(--ease), border-color 0.4s; }
.case:hover { transform: translateY(-4px); border-color: var(--hairline-2); }
.case--warn { border-color: rgba(255, 180, 84, 0.28); }
.case--warn:hover { border-color: rgba(255, 180, 84, 0.55); }
.case h3 { font-size: 18px; font-weight: 500; padding: 0 24px; margin-bottom: 8px; }
.case p { font-size: 14px; color: var(--ink-2); font-weight: 330; padding: 0 24px 26px; }
.case p b { color: var(--ink); font-weight: 500; }
.case p b.warn { color: var(--amber); }
.case__art { position: relative; height: 168px; margin-bottom: 22px; overflow: hidden; border-bottom: 1px solid var(--hairline); background: #04070a; }
.case__art pre { position: absolute; inset: 0; padding: 20px; font-size: 11.5px; line-height: 1.7; color: rgba(233, 238, 241, 0.5); }
.case__art--gpu pre { color: rgba(46, 163, 255, 0.55); }
.case__scan { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(87, 242, 163, 0.09) 48%, rgba(87, 242, 163, 0.22) 50%, rgba(87, 242, 163, 0.09) 52%, transparent 100%); background-size: 100% 300%; animation: scan 4.5s linear infinite; }
.case--warn .case__scan { display: none; }
@keyframes scan { from { background-position: 0 -150%; } to { background-position: 0 250%; } }

.fac { position: absolute; inset: 0; padding: 22px 20px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.fac__row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; }
.fac__row span { font-size: 10.5px; font-family: var(--mono); color: var(--muted); letter-spacing: 0.03em; }
.fac__row b { font-size: 13px; text-align: right; color: var(--ink-2); }
.fac__row b.warn { color: var(--amber); }
.fac__track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.fac__bar { height: 100%; width: 0; border-radius: 999px; }
.fac__bar--ok { background: linear-gradient(90deg, #1f8f5c, var(--pa)); }
.fac__bar--cheat { background: linear-gradient(90deg, #8f5a1f, var(--amber)); box-shadow: 0 0 14px rgba(255, 180, 84, 0.4); }

/* ---------- matrix ---------- */
.matrix { position: relative; border: 1px solid var(--hairline-2); border-radius: var(--r); background: rgba(255, 255, 255, 0.015); }
.matrix__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
.matrix::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 52px;
  border-radius: 0 var(--r) var(--r) 0;
  background: linear-gradient(270deg, rgba(8, 11, 13, 0.95), transparent);
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
@media (max-width: 1020px) { .matrix::after { opacity: 1; } }
.matrix__table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13.8px; }
.matrix__table th, .matrix__table td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.matrix__table thead th { font-size: 12px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding-top: 20px; padding-bottom: 14px; font-weight: 500; }
.matrix__table thead th small { text-transform: none; letter-spacing: 0; color: var(--muted); }
.matrix__table tbody th { font-weight: 500; font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.matrix__table tbody tr:last-child th, .matrix__table tbody tr:last-child td { border-bottom: 0; }
.matrix__table td { color: var(--ink-2); font-weight: 330; }
.matrix__table td b { color: var(--ink); font-weight: 500; }
.matrix__table td b.accent { color: var(--pa); }
.matrix__table .is-pa { background: linear-gradient(180deg, rgba(87, 242, 163, 0.055), rgba(87, 242, 163, 0.02)); }
.matrix__table thead .is-pa { border-bottom: 1px solid var(--pa-line); }
.matrix__pa { color: var(--pa); }
.matrix__span { text-align: center; font-style: italic; color: var(--muted) !important; }
.matrix__table tbody tr { transition: background 0.25s; }
.matrix__table tbody tr:hover td:not(.is-pa) { background: rgba(255, 255, 255, 0.02); }
.matrix__foot { margin-top: 26px; font-size: 14px; color: var(--muted); max-width: 760px; }
.matrix__foot b { color: var(--amber); font-weight: 500; }

/* ---------- caveats ---------- */
.caveats { border-top: 1px solid var(--hairline); }
.caveat { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--hairline); align-items: start; }
.caveat__num { font-size: 13px; color: var(--amber); border: 1px solid rgba(255, 180, 84, 0.4); width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.caveat p { font-size: 16.5px; color: var(--ink-2); font-weight: 330; max-width: 780px; }
.caveat p b { color: var(--ink); font-weight: 500; }
.caveat p em { color: var(--ink); }

/* ---------- install ---------- */
.section--install {
  background:
    radial-gradient(50% 46% at 50% 100%, rgba(87, 242, 163, 0.07), transparent),
    var(--bg-2);
  border-top: 1px solid var(--hairline);
}
.install { max-width: 860px; margin: 0 auto; }
.install__cmd {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  border: 1px solid var(--pa-line); border-radius: var(--r);
  background: #050b08; padding: 18px 20px;
  box-shadow: 0 0 60px rgba(87, 242, 163, 0.08);
}
.install__cmd code { font-size: clamp(11px, 2vw, 14.5px); color: var(--pa); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.install__cmd code::-webkit-scrollbar { display: none; }
.install__copy {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hairline-2);
  border-radius: 9px; padding: 8px 13px; cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.install__copy:hover { color: var(--pa); border-color: var(--pa-line); }
.install__copy.is-copied { color: var(--pa); border-color: var(--pa); background: var(--pa-dim); }
.install__steps { list-style: none; margin: 34px 0; display: grid; gap: 14px; }
.install__steps li { display: flex; gap: 14px; align-items: baseline; color: var(--ink-2); font-size: 15px; }
.install__steps li > span { color: var(--pa); font-size: 12.5px; flex: none; width: 20px; }
.install__steps code { font-size: 13px; color: var(--pa); background: var(--pa-dim); padding: 2px 7px; border-radius: 6px; }
.install__links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 64px 0 48px; background: #040506; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; align-items: start; }
.footer__brand { display: flex; gap: 16px; max-width: 460px; }
.footer__brand .nav__mark { width: 34px; height: 34px; flex: none; margin-top: 2px; }
.footer__brand p { font-size: 13.5px; color: var(--muted); }
.footer__brand a { color: var(--pa); text-decoration: none; border-bottom: 1px solid var(--pa-line); }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; transition: color 0.25s; }
.footer__links a:hover { color: var(--pa); }
.footer__fine { grid-column: 1 / -1; font-size: 11px; color: #49525a; letter-spacing: 0.04em; border-top: 1px solid var(--hairline); padding-top: 26px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav__links {
    position: fixed; inset: 62px 12px auto 12px; z-index: 79;
    flex-direction: column; gap: 2px; padding: 12px;
    background: rgba(8, 10, 12, 0.96); border: 1px solid var(--hairline-2);
    border-radius: 14px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .nav__links a { padding: 12px 14px; font-size: 15px; }
  .nav__burger { display: flex; }
  .pillars, .duels, .cases { grid-template-columns: 1fr 1fr; }
  .factrow, .arc__stats { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .rlm, .refine { grid-template-columns: 1fr; }
  .cases .case:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .nav { padding: 12px 16px; }
  .nav__star { display: none; }
  .nav__brand { font-size: 14px; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.09em; padding: 7px 13px; }
  .hero { padding-top: 118px; }
  .swap { padding: 16px 16px 22px; }
  .swap__row { grid-template-columns: 108px 1fr 52px 12px; gap: 10px; }
  .swap__name { font-size: 11.5px; }
  .swap__baseline span { font-size: 9.5px; transform: translateX(-96%); }
  .pillars, .duels, .cases, .factrow, .arc__stats { grid-template-columns: 1fr; }
  .cases .case:last-child { grid-column: auto; }
  .section { padding: 88px 0; }
  .arc { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .arc__svg { min-width: 640px; }
  .arc::after {
    content: "scroll \2192";
    position: sticky; float: right; right: 0; top: 0;
    display: block; margin: 2px 6px 0 0;
    font: 500 9.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted); pointer-events: none;
  }
  .pair { padding: 18px 16px 14px; }
  .pair__row { grid-template-columns: 100px 1fr 48px 12px; gap: 10px; }
  .caveat { grid-template-columns: 1fr; gap: 12px; }
  .install__cmd { flex-direction: column; align-items: stretch; }
  .install__copy { justify-content: center; }
  .footer__inner { grid-template-columns: 1fr; }
  .term__body { font-size: 11.5px; min-height: 190px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}
