/* =====================================================================
   Frontier — AI Intelligence Dashboard
   styles.css · Apple-glass / macOS aesthetic
   ===================================================================== */

:root {
  --bg: #06070d;
  --bg-2: #0b0e1a;
  --bg-image: url("../images/frontier-lighthouse-bg-clean.png");
  --beam-image: url("../images/lighthouse-beam.png");
  --ink: #eef1f8;
  --ink-soft: #aab2c8;
  --ink-dim: #79829c;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-soft: rgba(255, 255, 255, 0.07);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.40);
  --radius: 22px;
  --radius-sm: 14px;
  --accent: #7aa2ff;
  --accent-2: #b78bff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --blur: 18px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #eef1f8;
  --bg-2: #dfe5f2;
  --ink: #11151f;
  --ink-soft: #3d465b;
  --ink-dim: #66708a;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-2: rgba(255, 255, 255, 0.72);
  --stroke: rgba(15, 20, 40, 0.10);
  --stroke-soft: rgba(15, 20, 40, 0.06);
  --shadow: 0 20px 50px rgba(40, 60, 120, 0.18);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(6, 7, 13, 0.12) 0%, rgba(6, 7, 13, 0.54) 34%, rgba(6, 7, 13, 0.86) 72%, rgba(6, 7, 13, 0.94) 100%),
    linear-gradient(180deg, rgba(6, 7, 13, 0.22), rgba(6, 7, 13, 0.78)),
    radial-gradient(1100px 640px at 82% -12%, rgba(120, 90, 255, 0.10), transparent 60%),
    radial-gradient(820px 560px at -2% 8%, rgba(60, 140, 255, 0.09), transparent 55%),
    var(--bg-image) left center / cover no-repeat,
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.1px;
}
html[data-theme="light"] body {
  background:
    linear-gradient(90deg, rgba(238, 241, 248, 0.36) 0%, rgba(238, 241, 248, 0.72) 42%, rgba(238, 241, 248, 0.88) 100%),
    linear-gradient(180deg, rgba(238, 241, 248, 0.40), rgba(238, 241, 248, 0.86)),
    radial-gradient(1100px 640px at 82% -12%, rgba(120, 90, 255, 0.14), transparent 60%),
    radial-gradient(820px 560px at -2% 8%, rgba(60, 140, 255, 0.12), transparent 55%),
    var(--bg-image) left center / cover no-repeat,
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

/* ---------- Ambient aurora (subtle, slow) ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; filter: blur(50px) saturate(80%); opacity: 0.72; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; opacity: 0.08; mix-blend-mode: screen; animation: float 52s ease-in-out infinite; will-change: transform; }
.blob-1 { width: 44vw; height: 44vw; left: -10vw; top: -8vw; background: radial-gradient(circle, #5b8cff, transparent 66%); }
.blob-2 { width: 38vw; height: 38vw; right: -12vw; top: 6vw; background: radial-gradient(circle, #b06bff, transparent 66%); animation-delay: -14s; }
.blob-3 { width: 34vw; height: 34vw; left: 22vw; bottom: -18vw; background: radial-gradient(circle, #19d3c5, transparent 66%); animation-delay: -28s; }
.blob-4 { width: 26vw; height: 26vw; right: 12vw; bottom: -12vw; background: radial-gradient(circle, #ff7aa2, transparent 66%); animation-delay: -40s; }
html[data-theme="light"] .blob { opacity: 0.12; mix-blend-mode: normal; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(1.6vw, 2vh) scale(1.04); }
  66% { transform: translate(-1.6vw, -1.4vh) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------- Background motion layer ---------- */
.scene-motion {
  --scene-aspect: 1.77683;
  --scene-w: max(100vw, calc(100vh * var(--scene-aspect)));
  --scene-h: calc(var(--scene-w) / var(--scene-aspect));
  --scene-top: calc((100vh - var(--scene-h)) / 2);
  --lantern-x: calc(var(--scene-w) * 0.157);
  --lantern-y: calc(var(--scene-top) + var(--scene-h) * 0.214);
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.lighthouse-glow {
  position: absolute;
  left: var(--lantern-x);
  top: var(--lantern-y);
  width: clamp(94px, calc(var(--scene-w) * 0.11), 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(255, 238, 190, 0.78) 0 2.4%, rgba(255, 205, 124, 0.28) 9%, rgba(255, 194, 113, 0.10) 34%, transparent 68%),
    conic-gradient(from 88deg, transparent 0 28%, rgba(255, 221, 156, 0.16) 34%, transparent 42% 100%);
  filter: blur(2px);
  mix-blend-mode: screen;
  opacity: 0.52;
  animation: beacon-lens 13.8s linear infinite;
}
.lighthouse-glow::before {
  content: "";
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 204, 0.88), rgba(255, 190, 100, 0.30) 46%, transparent 70%);
  filter: blur(1.5px);
  animation: beacon-core 13.8s linear infinite;
}
.lighthouse-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64%;
  height: 14%;
  border-radius: 999px;
  transform: translate(-50%, -50%) rotate(-4deg);
  background: linear-gradient(90deg, transparent, rgba(255, 230, 176, 0.42), transparent);
  filter: blur(2px);
  animation: beacon-lens-streak 13.8s linear infinite;
}
.lighthouse-beam {
  position: absolute;
  left: var(--lantern-x);
  top: var(--lantern-y);
  width: clamp(320px, calc(var(--scene-w) * 0.52), 900px);
  height: clamp(92px, calc(var(--scene-h) * 0.17), 210px);
  transform: translateY(-50%) rotate(0deg);
  transform-origin: 0 50%;
  background: var(--beam-image) 0 50% / 100% 100% no-repeat;
  filter: blur(1.5px);
  mix-blend-mode: screen;
  opacity: 0.42;
  animation: lighthouse-sweep 13.8s linear infinite;
  will-change: transform, opacity, filter;
}
.lighthouse-beam::after {
  content: "";
  position: absolute;
  left: 0;
  top: 46%;
  width: 78%;
  height: 10%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 237, 194, 0.34), rgba(255, 221, 166, 0.16) 38%, transparent 100%);
  filter: blur(2px);
  opacity: 0.55;
}
.cloud-drift {
  position: absolute;
  left: 0;
  width: var(--scene-w);
  height: calc(var(--scene-h) * 0.34);
  opacity: 0.11;
  filter: blur(16px);
  mix-blend-mode: screen;
  background:
    linear-gradient(7deg, transparent 18%, rgba(133, 157, 174, 0.10) 42%, transparent 70%),
    linear-gradient(-5deg, transparent 28%, rgba(82, 107, 126, 0.12) 50%, transparent 74%);
  animation: cloud-drift 116s steps(14, end) infinite alternate;
  will-change: transform;
}
.cloud-drift-a {
  top: calc(var(--scene-top) + var(--scene-h) * 0.02);
  --cloud-start: -3vw;
  --cloud-end: 4vw;
}
.cloud-drift-b {
  top: calc(var(--scene-top) + var(--scene-h) * 0.17);
  height: calc(var(--scene-h) * 0.28);
  opacity: 0.07;
  --cloud-start: 8vw;
  --cloud-end: -3vw;
  animation-duration: 148s;
}
.water-shimmer {
  position: absolute;
  left: -5vw;
  right: -5vw;
  bottom: 0;
  height: clamp(180px, calc(var(--scene-h) * 0.31), 430px);
  background:
    repeating-linear-gradient(176deg, transparent 0 22px, rgba(150, 194, 211, 0.065) 23px 25px, transparent 26px 54px),
    linear-gradient(180deg, transparent, rgba(70, 116, 136, 0.10));
  background-size: 220px 86px, auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.25) 18%, #000 70%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.25) 18%, #000 70%);
  mix-blend-mode: screen;
  opacity: 0.12;
  animation: water-shimmer 18s steps(9, end) infinite;
  will-change: background-position, transform;
}
.wave-splash {
  position: absolute;
  width: clamp(46px, calc(var(--scene-w) * 0.038), 82px);
  height: clamp(18px, calc(var(--scene-h) * 0.022), 34px);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 18% 70%, rgba(206, 230, 238, 0.30), transparent 34%),
    radial-gradient(ellipse at 54% 54%, rgba(165, 205, 220, 0.20), transparent 45%),
    radial-gradient(ellipse at 82% 72%, rgba(225, 238, 242, 0.18), transparent 32%);
  filter: blur(2.5px);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.74);
  animation: wave-splash 7.5s steps(5, end) infinite;
  will-change: opacity, transform;
}
.wave-splash-a {
  left: calc(var(--scene-w) * 0.085);
  top: calc(var(--scene-top) + var(--scene-h) * 0.88);
}
.wave-splash-b {
  left: calc(var(--scene-w) * 0.17);
  top: calc(var(--scene-top) + var(--scene-h) * 0.90);
  animation-delay: -2.6s;
  animation-duration: 8.8s;
}
.wave-splash-c {
  left: calc(var(--scene-w) * 0.30);
  top: calc(var(--scene-top) + var(--scene-h) * 0.86);
  opacity: 0;
  animation-delay: -5.1s;
  animation-duration: 10.4s;
}
@keyframes lighthouse-sweep {
  0%, 100% {
    opacity: 0.42;
    filter: blur(1.4px);
    transform: perspective(920px) translateY(-50%) rotate(-3.5deg) rotateY(4deg) scaleX(1.04) scaleY(0.88);
  }
  9% {
    opacity: 0.14;
    filter: blur(4.5px);
    transform: perspective(920px) translateY(-50%) rotate(0.5deg) rotateY(-48deg) scaleX(0.78) scaleY(0.58);
  }
  18%, 74% {
    opacity: 0;
    filter: blur(10px);
    transform: perspective(920px) translateY(-50%) rotate(3deg) rotateY(-84deg) scaleX(0.46) scaleY(0.38);
  }
  84% {
    opacity: 0.07;
    filter: blur(7px);
    transform: perspective(920px) translateY(-50%) rotate(-7deg) rotateY(72deg) scaleX(0.66) scaleY(0.46);
  }
  92% {
    opacity: 0.30;
    filter: blur(2.4px);
    transform: perspective(920px) translateY(-50%) rotate(-5deg) rotateY(26deg) scaleX(0.94) scaleY(0.72);
  }
}
@keyframes beacon-lens {
  0%, 100% { opacity: 0.68; transform: translate(-50%, -50%) scale(1.05); }
  10% { opacity: 0.46; transform: translate(-50%, -50%) scale(0.98); }
  22%, 74% { opacity: 0.36; transform: translate(-50%, -50%) scale(0.94); }
  88% { opacity: 0.50; transform: translate(-50%, -50%) scale(1.00); }
  94% { opacity: 0.62; transform: translate(-50%, -50%) scale(1.04); }
}
@keyframes beacon-core {
  0%, 100% { opacity: 1; transform: scale(1.08); }
  18%, 76% { opacity: 0.38; transform: scale(0.82); }
  92% { opacity: 0.86; transform: scale(1.02); }
}
@keyframes beacon-lens-streak {
  0%, 100% { opacity: 0.72; transform: translate(-50%, -50%) rotate(-4deg) scaleX(1); }
  14%, 78% { opacity: 0.18; transform: translate(-50%, -50%) rotate(-4deg) scaleX(0.46); }
  92% { opacity: 0.56; transform: translate(-50%, -50%) rotate(-4deg) scaleX(0.82); }
}
@keyframes cloud-drift {
  from { transform: translate3d(var(--cloud-start), 0, 0); }
  to { transform: translate3d(var(--cloud-end), -1vh, 0); }
}
@keyframes water-shimmer {
  from { background-position: 0 0, 0 0; transform: translate3d(0, 0, 0); }
  to { background-position: 220px 86px, 0 0; transform: translate3d(1.2vw, 0.24vh, 0); }
}
@keyframes wave-splash {
  0%, 53%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.70); }
  60% { opacity: 0.10; transform: translate3d(0, -1px, 0) scale(0.90); }
  72% { opacity: 0.24; transform: translate3d(4px, -6px, 0) scale(1.08); }
  86% { opacity: 0.06; transform: translate3d(9px, -10px, 0) scale(1.28); }
}
@media (max-width: 720px) {
  .scene-motion { opacity: 0.62; }
  .lighthouse-beam { opacity: 0.16; }
  .cloud-drift { opacity: 0.06; }
  .water-shimmer, .wave-splash { opacity: 0.07; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-motion * { animation: none !important; }
  .lighthouse-beam {
    opacity: 0.14;
    transform: perspective(920px) translateY(-50%) rotate(-4deg) rotateY(24deg) scaleX(0.8) scaleY(0.7);
  }
  .cloud-drift, .water-shimmer, .wave-splash { transform: none; }
  .wave-splash { opacity: 0; }
}

/* ---------- Glass primitive ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* ---------- Shared icon button ---------- */
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--stroke);
  background: var(--glass-2); color: var(--ink); font-size: 16px; cursor: pointer;
  transition: transform .15s, background .2s;
}
.icon-btn:hover { transform: scale(1.08); background: var(--stroke); }

/* ---------- Hero top: centered brand + theme toggle ---------- */
.hero-top { position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.hero-brand { display: inline-flex; align-items: baseline; gap: 9px; }
.hero-brand .logo { font-size: 18px; color: var(--accent); filter: drop-shadow(0 0 8px rgba(122,162,255,.6)); }
.hero-brand .brandname { font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.hero-brand .brandname .tld { color: var(--accent); }
.theme-in-hero { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.theme-in-hero:hover { transform: translateY(-50%) scale(1.08); }   /* resize in place, stay centered */

/* ---------- Search + results dropdown ---------- */
.searchwrap { position: relative; display: flex; align-items: center; margin-bottom: 22px; }
.search-ico { position: absolute; left: 16px; color: var(--ink-dim); font-size: 16px; pointer-events: none; }
#search {
  width: 100%; padding: 13px 16px 13px 42px; border-radius: 13px;
  background: rgba(0,0,0,0.18); border: 1px solid var(--stroke-soft);
  color: var(--ink); font-size: 14px; font-family: var(--font); outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
html[data-theme="light"] #search { background: rgba(255,255,255,0.55); }
#search::placeholder { color: var(--ink-dim); }
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122,162,255,.18); }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--glass-2); backdrop-filter: blur(var(--blur)) saturate(160%); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--stroke); border-radius: 14px; box-shadow: var(--shadow);
  padding: 6px; max-height: 380px; overflow-y: auto;
}
.search-results[hidden] { display: none; }
.sr-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: none; background: transparent; color: var(--ink); cursor: pointer; border-radius: 10px; text-align: left; font-family: var(--font); transition: background .12s; }
.sr-item:hover, .sr-item.active { background: var(--glass); }
.sr-name { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sr-name b { font-weight: 700; font-size: 14px; }
.sr-name small { font-size: 11.5px; color: var(--ink-dim); }
.sr-score { font-family: var(--mono); font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sr-empty { padding: 16px; color: var(--ink-dim); font-size: 13px; text-align: center; }

/* ---------- Elo explainer ---------- */
.elo-details { border: 1px solid var(--stroke-soft); border-radius: var(--radius-sm); background: var(--glass); overflow: hidden; }
.elo-details summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 13.5px; list-style: none; display: flex; align-items: center; gap: 8px; user-select: none; }
.elo-details summary::-webkit-details-marker { display: none; }
.elo-details summary::after { content: "▾"; margin-left: auto; color: var(--ink-dim); transition: transform .2s; }
.elo-details[open] summary::after { transform: rotate(180deg); }
.elo-details summary:hover { color: var(--ink); }
.ee-sum-ico { color: var(--accent-2); }
.ee-sum-hint { color: var(--ink-dim); font-weight: 500; font-size: 12px; }
.elo-explainer { padding: 2px 16px 18px; }
.ee-lede { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.5; max-width: 760px; }
.ee-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 10px; }
.ee-step { display: flex; gap: 11px; padding: 12px; border-radius: 11px; background: var(--glass); border: 1px solid var(--stroke-soft); }
.ee-n { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 800; font-size: 13px; color: #06110a; background: linear-gradient(120deg, var(--accent), var(--accent-2)); }
.ee-step b { display: block; font-size: 13px; margin-bottom: 3px; }
.ee-step span { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.ee-formula { margin: 14px 0; padding: 13px 15px; border-radius: 11px; background: rgba(0,0,0,.22); border: 1px solid var(--stroke-soft); display: flex; flex-direction: column; gap: 6px; }
html[data-theme="light"] .ee-formula { background: rgba(255,255,255,.5); }
.ee-flab { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-dim); }
.ee-formula code { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.ee-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.ee-notes li { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.ee-notes b { color: var(--ink); }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 22px 14px 60px; }
.container, .footer { position: relative; z-index: 1; }

/* ---------- Live prediction-markets panel (inline, top of radar) ---------- */
.live-markets { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--stroke-soft); }
.lm-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.rail-title { font-weight: 700; font-size: 15px; }
.rail-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: .6px; color: var(--good); }
.rail-live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@media (prefers-reduced-motion: reduce) { .rail-live .pulse { animation: none; } }
.lm-updated { margin-left: auto; font-size: 10.5px; color: var(--ink-dim); font-family: var(--mono); }
.rail-live.sample { color: var(--ink-dim); }   /* seed fallback — not a live feed */
.lm-sub { font-size: 11.5px; color: var(--ink-dim); margin: 6px 0 14px; }
/* auto-fill keeps cards a comfortable, consistent width and wraps (3-across → 3+2)
   instead of cramming all of them into one narrow row */
.lm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mk-card { display: block; padding: 13px 14px; border-radius: 12px; text-decoration: none; color: var(--ink);
  background: var(--tint, var(--glass)); border: 1px solid var(--edge, var(--stroke-soft)); transition: transform .15s, border-color .2s; }
.mk-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.mk-top { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.mk-top .glyph { width: 22px; height: 22px; border-radius: 7px; font-size: 11px; flex-shrink: 0; }
.mk-q { font-size: 13px; font-weight: 700; line-height: 1.25; }
/* multiple outcomes per market — each shows odds + $ on Yes vs No (never aggregated) */
.mk-outcomes { display: flex; flex-direction: column; gap: 11px; margin-bottom: 11px; }
.mk-o { display: flex; flex-direction: column; gap: 5px; }
.mk-o-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; }
.mk-o-label { font-size: 11px; color: var(--ink-soft); white-space: nowrap; font-family: var(--mono); min-width: 64px; }
.mk-o-split { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); }
.mk-o-split i { display: block; height: 100%; transition: width .6s cubic-bezier(.4,1.2,.4,1); }
.mk-o-split .yes { background: var(--good); }
.mk-o-split .no { background: rgba(251,113,133,.55); }
.mk-o-pct { font-family: var(--mono); font-weight: 700; font-size: 13px; text-align: right; white-space: nowrap; min-width: 50px; }
.mk-o-money { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 11px; padding-left: 73px; }
.mk-o-money .yes { color: var(--good); font-weight: 700; }
.mk-o-money .no { color: var(--bad); font-weight: 700; }
.mk-d { font-family: var(--mono); font-size: 10px; font-weight: 700; margin-left: 4px; }
.mk-d.up { color: var(--good); } .mk-d.down { color: var(--bad); }
.mk-more { display: block; font-size: 10.5px; color: var(--ink-dim); margin: 0 0 9px; }
.mk-foot { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--ink-dim); margin-top: 2px; }
.mk-tier { font-family: var(--mono); }
.mk-link { color: var(--accent); }
.rail-consensus { margin-top: 14px; }
.rail-consensus .rc-h { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.rail-consensus .rc-h small { color: var(--ink-dim); font-weight: 500; }
.rail-cbar { display: flex; height: 22px; border-radius: 7px; overflow: hidden; border: 1px solid var(--stroke-soft); }
.rail-cbar i { display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; color: #06110a; min-width: 0; }
.rail-cleg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; }
.rail-cleg span { font-size: 10.5px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; }
.rail-cleg .d { width: 8px; height: 8px; border-radius: 2px; }
.rail-more { display: inline-block; margin-top: 10px; font-size: 11px; color: var(--accent); text-decoration: none; }
.rail-more:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: 30px 30px 26px; margin-bottom: 18px; }
.hero-head h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -0.6px; }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2) 55%, #ff9ec4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { margin: 10px 0 22px; color: var(--ink-soft); font-size: 15px; max-width: 640px; }
.hero .sub em { color: var(--ink); font-style: normal; font-weight: 600; }

/* ---------- Latest-from-each-lab strip ---------- */
.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.latest-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.latest-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; }
.lab {
  position: relative; padding: 15px 15px 16px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  background: var(--lab-tint, var(--glass-2)); border: 1px solid var(--lab-edge, var(--stroke));
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.lab:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0,0,0,.35); }
.lab-top { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.lab-prov { font-size: 11px; color: var(--ink-dim); font-weight: 600; }
.lab-new { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .6px; padding: 3px 7px; border-radius: 999px; color: #04110a; background: var(--good); }
.lab-name { font-weight: 700; font-size: 15.5px; line-height: 1.15; }
.lab-meta { margin-top: 7px; font-size: 11.5px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 3px; }
.lab-meta .lab-elo { font-family: var(--mono); font-weight: 600; }

/* roster freshness / latest-model self-check */
.freshness { margin-top: 11px; font-size: 11.5px; line-height: 1.4; padding: 8px 13px; border-radius: 10px; border: 1px solid var(--stroke-soft); background: var(--glass); color: var(--ink-soft); display: flex; align-items: center; gap: 9px; }
.freshness .fr-ico { font-weight: 800; flex-shrink: 0; }
.freshness b { color: var(--ink); }
.freshness.ok { border-color: rgba(52,211,153,.28); }
.freshness.ok .fr-ico { color: var(--good); }
.freshness.warn { color: var(--ink); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.09); }
.freshness.warn .fr-ico { color: var(--warn); }
.freshness.info { color: var(--ink); border-color: rgba(122,162,255,.32); background: rgba(122,162,255,.08); }
.freshness.info .fr-ico { color: var(--accent); }
.freshness.checking .fr-ico { color: var(--ink-dim); }

/* "can I use it right now?" availability indicators */
.avail-ga { --av: var(--good); } .avail-warn { --av: var(--warn); } .avail-bad { --av: var(--bad); }
.lab-avail { margin-top: 6px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; color: var(--av, var(--good)); }
.lab-avail .av-ico { font-weight: 800; }
.tag.avail-tag { font-weight: 700; color: var(--av); border-color: color-mix(in srgb, var(--av) 35%, transparent); background: color-mix(in srgb, var(--av) 12%, transparent); }
.avail-line { margin: 6px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; color: var(--ink-soft); border: 1px solid color-mix(in srgb, var(--av) 32%, transparent); background: color-mix(in srgb, var(--av) 9%, transparent); }
.avail-line b { color: var(--ink); }
.avail-line .av-ico { color: var(--av); font-weight: 800; }

.hero-divider { height: 1px; background: var(--stroke-soft); margin: 24px 0 20px; }
.recommend-head h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }

.task-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-soft);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.chip:hover { color: var(--ink); border-color: var(--stroke); transform: translateY(-1px); }
.chip.active { color: #08111f; background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; box-shadow: 0 6px 20px rgba(122,162,255,.35); }
html[data-theme="light"] .chip.active { color: #fff; }
.chip .i { font-size: 14px; }

/* ---------- Ranked top-4 recommendation (per task) ---------- */
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-row {
  position: relative; display: grid; grid-template-columns: 40px 38px 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  background: var(--tint, var(--glass)); border: 1px solid var(--edge, var(--stroke-soft));
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.rank-row:hover { transform: translateX(3px); box-shadow: 0 12px 30px rgba(0,0,0,.35); border-color: var(--accent); }
.rank-row .rk { font-family: var(--mono); font-weight: 800; font-size: 22px; text-align: center; color: var(--ink-dim); }
.rank-row.r1 .rk { color: #ffd66e; } .rank-row.r2 .rk { color: #d8dee9; } .rank-row.r3 .rk { color: #e0a06a; }
.rank-mid { min-width: 0; }
.rank-name { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-name .rprov { font-size: 11.5px; color: var(--ink-dim); font-weight: 500; }
.rank-why { margin-top: 5px; font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-why .sep { color: var(--ink-dim); opacity: .6; }
.rank-why .lead { color: var(--good); font-weight: 600; }
.rank-why .behind { color: var(--ink-dim); }
.rank-why .alert-min { color: var(--bad); font-weight: 600; }
.rank-bar-wrap { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.rank-bar { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.4,1.2,.4,1); }
.rank-right { text-align: right; }
.rank-elo { font-family: var(--mono); font-weight: 800; font-size: 20px; line-height: 1; }
.rank-elo-lab { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-dim); margin-top: 4px; }

.quick-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.qstat { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke-soft); }
.qstat .qico { font-size: 16px; }
.qstat .qk { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-dim); }
.qstat .qv { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.qstat .qv small { font-family: var(--mono); font-weight: 500; color: var(--ink-soft); font-size: 11px; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.pick {
  position: relative; padding: 18px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--stroke); background: var(--glass-2); cursor: pointer; transition: transform .18s, box-shadow .2s;
}
.pick:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,.4); }
.pick .pick-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-dim); }
.pick .pick-model { display: flex; align-items: center; gap: 9px; margin: 10px 0 6px; font-weight: 700; font-size: 16px; }
.pick .pick-why { font-size: 12.5px; color: var(--ink-soft); }
.pick .pick-metric { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.pick .accent-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }

/* provider glyph badge */
.glyph { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; flex-shrink: 0; }

/* ---------- Segmented control ---------- */
.segmented {
  position: relative; display: flex; gap: 2px; padding: 5px; margin: 0 auto 20px;
  border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.seg {
  position: relative; z-index: 2; border: none; background: transparent; color: var(--ink-soft);
  font-family: var(--font); font-weight: 600; font-size: 13.5px; padding: 9px 16px; border-radius: 10px;
  cursor: pointer; white-space: nowrap; transition: color .2s;
}
.seg.active { color: var(--ink); }
.seg-glider {
  position: absolute; z-index: 1; top: 5px; height: calc(100% - 10px); border-radius: 10px;
  background: var(--glass-2); border: 1px solid var(--stroke);
  box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .28s cubic-bezier(.4,1.2,.4,1), width .28s cubic-bezier(.4,1.2,.4,1);
}

/* ---------- Views ---------- */
.view { display: none; animation: fade .3s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Model cards (dashboard) ---------- */
/* ---------- Card sections (proprietary vs open) ---------- */
.card-section { margin-bottom: 26px; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 4px 2px 14px; }
.section-head .sh-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; border: 1px solid var(--stroke); }
.section-head .sh-ico.prop { background: rgba(122,162,255,.12); color: var(--accent); }
.section-head .sh-ico.open { background: rgba(52,211,153,.12); color: var(--good); }
.section-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.section-head .sh-sub { font-size: 12px; color: var(--ink-dim); }
.section-head .sh-count { margin-left: auto; font-size: 12px; color: var(--ink-dim); font-family: var(--mono); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }

/* License chip on cards */
.tag.lic { font-weight: 700; }
.tag.lic-open { color: var(--good); background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.3); }
.tag.lic-prop { color: var(--ink-soft); background: rgba(255,255,255,.06); }
.card {
  position: relative; padding: 20px; border-radius: var(--radius); overflow: hidden;
  /* provider-themed: --accent / --tint / --edge are set inline per card */
  background:
    linear-gradient(180deg, var(--tint, transparent), transparent 42%),
    var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(160%); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--edge, var(--stroke)); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent, var(--accent)); opacity: .9; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 24px 56px rgba(0,0,0,.5); }
.card .glow { position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; opacity: .42; filter: blur(42px); }
.card-top { display: flex; align-items: center; gap: 12px; }
.glyph-lg { width: 40px; height: 40px; border-radius: 11px; font-size: 17px; }
.card-title { font-weight: 700; font-size: 17px; line-height: 1.1; }
.card-prov { font-size: 12px; color: var(--ink-dim); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: auto; box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.status-dot.operational { background: var(--good); box-shadow: 0 0 10px var(--good); }
.status-dot.degraded { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.status-dot.major, .status-dot.outage { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

.card-blurb { margin: 14px 0 12px; font-size: 13px; color: var(--ink-soft); min-height: 36px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--stroke-soft); background: var(--glass); color: var(--ink-soft); }

.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric .k { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-dim); }
.metric .v { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.metric .v small { font-size: 10px; color: var(--ink-dim); font-weight: 500; }

.elo-pill { display: inline-flex; align-items: baseline; gap: 5px; margin-top: 14px; padding: 6px 12px; border-radius: 10px; background: var(--glass-2); border: 1px solid var(--stroke); }
.elo-pill .lab { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-dim); }
.elo-pill .val { font-family: var(--mono); font-weight: 700; font-size: 16px; }

/* ---------- Panels ---------- */
.panel { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.muted { color: var(--ink-dim); font-size: 13px; }
small.muted { font-weight: 500; }

.cat-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-pill { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-soft); cursor: pointer; transition: all .16s; }
.cat-pill:hover { color: var(--ink); }
.cat-pill.active { color: #08111f; background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; }
html[data-theme="light"] .cat-pill.active { color: #fff; }

/* ---------- Leaderboard ---------- */
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.lb-cat-desc { margin: 0 2px 6px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.lb-row {
  display: grid; grid-template-columns: 34px 40px 1fr 110px 90px; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--stroke-soft);
  background: var(--glass); transition: transform .25s, background .2s; cursor: pointer;
}
.lb-row:hover { background: var(--glass-2); transform: translateX(3px); }
.lb-rank { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--ink-dim); text-align: center; }
.lb-row.top1 .lb-rank { color: #ffd66e; } .lb-row.top2 .lb-rank { color: #d8dee9; } .lb-row.top3 .lb-rank { color: #e0a06a; }
.lb-name { font-weight: 600; font-size: 15px; }
.lb-name .lb-prov { font-size: 11.5px; color: var(--ink-dim); font-weight: 500; }
.lb-open { font-size: 9px; font-weight: 800; letter-spacing: .5px; color: var(--good); background: rgba(52,211,153,.14); border: 1px solid rgba(52,211,153,.3); padding: 1px 6px; border-radius: 999px; margin-left: 7px; vertical-align: middle; }

/* License filter (leaderboard) */
.lic-filter { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(0,0,0,.18); border: 1px solid var(--stroke-soft); }
html[data-theme="light"] .lic-filter { background: rgba(255,255,255,.4); }
.lic-filter button { border: none; background: transparent; color: var(--ink-soft); font-family: var(--font); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 9px; cursor: pointer; transition: all .15s; }
.lic-filter button.active { background: var(--glass-2); color: var(--ink); border: 1px solid var(--stroke); }
.lb-bar-wrap { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.lb-bar { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.4,1.2,.4,1); }
.lb-elo { font-family: var(--mono); font-weight: 700; font-size: 16px; text-align: right; }
.lb-delta { font-family: var(--mono); font-size: 12px; text-align: right; }
.delta-up { color: var(--good); } .delta-down { color: var(--bad); } .delta-flat { color: var(--ink-dim); }

/* ---------- Vote / duel ---------- */
.vote-panel .muted { margin: -6px 0 18px; }
.duel { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: stretch; gap: 14px; }
.duel-card {
  padding: 22px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--glass);
  text-align: center; cursor: pointer; transition: transform .18s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden;
}
.duel-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
.duel-card .glyph-lg { margin: 0 auto 12px; }
.duel-card h3 { margin: 0 0 4px; font-size: 18px; }
.duel-card .dp { font-size: 12px; color: var(--ink-dim); }
.duel-card .deloo { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.duel-card .pickbtn { margin-top: 16px; display: inline-block; padding: 9px 18px; border-radius: 10px; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #08111f; font-weight: 700; font-size: 13px; }
html[data-theme="light"] .duel-card .pickbtn { color: #fff; }
.duel-vs { display: grid; place-items: center; font-family: var(--mono); font-weight: 800; color: var(--ink-dim); font-size: 15px; }
.flash-win { animation: win .6s ease; }
@keyframes win { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6);} 100% { box-shadow: 0 0 0 24px rgba(52,211,153,0);} }
.vote-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.ghost-btn, .skip-btn { background: var(--glass); border: 1px solid var(--stroke); color: var(--ink-soft); padding: 7px 14px; border-radius: 10px; font-family: var(--font); font-size: 12.5px; cursor: pointer; transition: all .16s; }
.ghost-btn:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- Pricing ---------- */
.best-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.best { padding: 18px; border-radius: var(--radius-sm); border: 1px solid var(--stroke); background: var(--glass); position: relative; overflow: hidden; }
.best .accent-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.best .best-lab { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-dim); }
.best .best-model { display: flex; align-items: center; gap: 9px; margin: 10px 0 6px; font-weight: 700; font-size: 16px; }
.best .best-num { font-family: var(--mono); font-size: 20px; font-weight: 700; }
.best .best-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* Value comparator — "is cheaper per token really cheaper?" */
.cmp-grid { display: grid; grid-template-columns: 1fr 48px 1fr; align-items: start; gap: 14px; }
.cmp-pick { display: flex; flex-direction: column; gap: 10px; }
.cmp-col { padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--edge, var(--stroke)); background: var(--tint, var(--glass)); }
.cmp-head { display: flex; align-items: center; gap: 9px; font-size: 15px; margin-bottom: 12px; }
.cmp-rows { display: flex; flex-direction: column; gap: 8px; }
.cmp-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-soft); }
.cmp-rows > div b { font-family: var(--mono); color: var(--ink); font-weight: 700; }
.cmp-hero { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--stroke-soft); }
.cmp-hero span { font-weight: 600; color: var(--ink); }
.cmp-hero b { font-size: 18px; }
.cmp-sel { width: 100%; padding: 9px 11px; border-radius: 10px; background: rgba(0,0,0,0.18); border: 1px solid var(--stroke-soft); color: var(--ink); font-family: var(--font); font-size: 13px; cursor: pointer; }
html[data-theme="light"] .cmp-sel { background: rgba(255,255,255,0.55); }
.cmp-vs { display: grid; place-items: center; font-family: var(--mono); font-weight: 800; color: var(--ink-dim); padding-top: 40px; }
.cmp-verdict { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 13px 15px; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--stroke); font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.cmp-verdict b { color: var(--ink); } .cmp-verdict em { color: var(--ink); font-style: italic; }
.cmp-ico { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; font-weight: 800; color: #06110a; background: linear-gradient(120deg, var(--accent), var(--accent-2)); }
@media (max-width: 640px) { .cmp-grid { grid-template-columns: 1fr; } .cmp-vs { padding: 0; } }

.table-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ptable th { text-align: left; padding: 10px 12px; color: var(--ink-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; user-select: none; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.ptable th.num { text-align: right; }
.ptable th:hover { color: var(--ink); }
.ptable th.sorted::after { content: " ↓"; color: var(--accent); }
.ptable th.sorted.asc::after { content: " ↑"; }
.ptable td { padding: 12px; border-bottom: 1px solid var(--stroke-soft); }
.ptable td.num { text-align: right; font-family: var(--mono); }
.ptable tbody tr { transition: background .15s; }
.ptable tbody tr:hover { background: var(--glass); }
.ptable .mname { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.value-bar { display: inline-block; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--good), #a3e635); vertical-align: middle; margin-right: 8px; }

/* ---------- Status ---------- */
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.status-card { padding: 20px; }
.sc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.sc-head .glyph-lg { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
.sc-name { font-weight: 700; font-size: 16px; }
.sc-state { margin-left: auto; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.sc-state.operational { color: var(--good); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); }
.sc-state.degraded { color: var(--warn); background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3); }
.sc-state.major { color: var(--bad); background: rgba(251,113,133,.12); border: 1px solid rgba(251,113,133,.3); }
.sc-uptime { font-size: 12px; color: var(--ink-dim); margin: 8px 0 14px; }
.sparkline { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-bottom: 6px; }
.spark-bar { flex: 1; border-radius: 3px 3px 0 0; min-height: 3px; transition: height .3s; }
.spark-label { font-size: 10.5px; color: var(--ink-dim); margin-bottom: 14px; }
.incidents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.incident { font-size: 12.5px; color: var(--ink-soft); display: flex; gap: 9px; }
.incident .idate { font-family: var(--mono); color: var(--ink-dim); flex-shrink: 0; }
.idot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.idot.minor { background: var(--warn); } .idot.major { background: var(--bad); }
.no-incidents { font-size: 12.5px; color: var(--good); }

/* ---------- Trends chart ---------- */
.chart-wrap { width: 100%; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-note { margin: 10px 2px 0; font-size: 11.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; opacity: .55; transition: opacity .15s; }
.legend-item.on { opacity: 1; color: var(--ink); }
.legend-swatch { width: 14px; height: 4px; border-radius: 2px; }
.movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.mover { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--stroke-soft); background: var(--glass); }
.mover .mtitle { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mover .mval { font-family: var(--mono); font-size: 18px; font-weight: 700; margin-top: 6px; }
.mover .msub { font-size: 12px; color: var(--ink-dim); margin-top: 2px; }

/* ---------- News feed ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--stroke-soft); }
.feed-item:last-child { border-bottom: none; }
.feed-date { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); padding-top: 2px; }
.feed-body h4 { margin: 0 0 4px; font-size: 14.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feed-body p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.ntype { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 3px 9px; border-radius: 999px; }
.ntype.release { color: var(--good); background: rgba(52,211,153,.12); }
.ntype.outage { color: var(--bad); background: rgba(251,113,133,.12); }
.ntype.pricing { color: var(--accent); background: rgba(122,162,255,.14); }
.ntype.deprecation { color: var(--warn); background: rgba(251,191,36,.12); }
.ntype.policy { color: var(--accent-2); background: rgba(183,139,255,.14); }

/* Model alert chip (e.g. regional suspension) */
.alert-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 7px 11px; border-radius: 10px; font-size: 12px; font-weight: 600;
  color: var(--bad); background: rgba(251,113,133,.10); border: 1px solid rgba(251,113,133,.32); }
.alert-chip.in-drawer { width: 100%; box-sizing: border-box; }
.alert-chip a { color: inherit; text-decoration: underline; }

/* ---------- Frontier Index ---------- */
.index-method { padding: 22px; margin-bottom: 16px; }
.im-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.im-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.im-head .im-tag { font-size: 11px; font-weight: 700; color: #06110a; background: linear-gradient(120deg, var(--accent), var(--accent-2)); padding: 4px 10px; border-radius: 999px; }
.im-lede { font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; max-width: 760px; line-height: 1.5; }
.im-weightbar { display: flex; height: 30px; border-radius: 9px; overflow: hidden; border: 1px solid var(--stroke-soft); }
.im-weightbar .wseg { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #06110a; }
.im-comps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.im-comp { padding: 13px 15px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke-soft); border-left: 3px solid var(--cc, var(--accent)); }
.im-comp .ic-top { display: flex; align-items: baseline; gap: 8px; }
.im-comp .ic-label { font-weight: 700; font-size: 13.5px; }
.im-comp .ic-wt { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.im-comp .ic-desc { font-size: 12px; color: var(--ink-soft); margin-top: 6px; line-height: 1.45; }
.im-sources { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 16px; }
.im-sources .ims-lab { font-size: 12px; color: var(--ink-dim); }
.im-note { font-size: 12px; color: var(--ink-dim); margin-top: 14px; line-height: 1.5; border-top: 1px solid var(--stroke-soft); padding-top: 12px; }

.index-list { display: flex; flex-direction: column; gap: 10px; }
.ix-row { padding: 16px 18px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  background: var(--tint, var(--glass)); border: 1px solid var(--edge, var(--stroke-soft));
  transition: transform .18s, box-shadow .2s, border-color .2s; }
.ix-row:hover { transform: translateX(3px); box-shadow: 0 12px 30px rgba(0,0,0,.35); border-color: var(--accent); }
.ix-top { display: grid; grid-template-columns: 30px 36px 1fr auto; align-items: center; gap: 14px; }
.ix-rank { font-family: var(--mono); font-weight: 800; font-size: 18px; color: var(--ink-dim); text-align: center; }
.ix-row.t1 .ix-rank { color: #ffd66e; } .ix-row.t2 .ix-rank { color: #d8dee9; } .ix-row.t3 .ix-rank { color: #e0a06a; }
.ix-name { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ix-name .ix-prov { font-size: 11.5px; color: var(--ink-dim); font-weight: 500; }
.ix-score-wrap { display: flex; align-items: center; gap: 12px; }
.ix-score { font-family: var(--mono); font-weight: 800; font-size: 28px; line-height: 1; }
.ix-score small { font-size: 12px; color: var(--ink-dim); font-weight: 600; }

.grade { font-weight: 800; font-size: 14px; padding: 4px 11px; border-radius: 9px; letter-spacing: .3px; }
.grade-a { color: #04110a; background: linear-gradient(120deg, #7bf1a8, #34d399); }
.grade-b { color: #08111f; background: linear-gradient(120deg, #8fb6ff, #7aa2ff); }
.grade-c { color: #1a1304; background: linear-gradient(120deg, #fcd66e, #fbbf24); }

.ix-meters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 14px; }
.ix-meter .m-k { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-dim); display: flex; justify-content: space-between; }
.ix-meter .m-k b { font-family: var(--mono); color: var(--ink); font-weight: 700; }
.ix-meter .m-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.09); overflow: hidden; margin-top: 5px; }
.ix-meter .m-bar i { display: block; height: 100%; border-radius: 999px; }
.ix-foot { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-top: 13px; }
.ix-verdict { font-size: 12.5px; color: var(--ink-soft); flex: 1; min-width: 220px; }
.ix-conf { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink-dim); white-space: nowrap; }
.ix-conf .cdot { width: 8px; height: 8px; border-radius: 50%; }
.ix-conf.high .cdot { background: var(--good); } .ix-conf.medium .cdot { background: var(--warn); } .ix-conf.emerging .cdot { background: var(--ink-dim); }

/* Frontier Index pill on model cards */
.index-pill { margin-top: 14px; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--stroke); }
.index-pill .ix-score-lg { font-family: var(--mono); font-weight: 800; font-size: 24px; line-height: 1; }
.index-pill .ix-pill-meta { display: flex; flex-direction: column; margin-left: auto; text-align: right; gap: 2px; }
.index-pill .ix-pill-lab { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-dim); }
.index-pill .ix-pill-elo { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }

@media (max-width: 760px) { .ix-meters { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .ix-meters { grid-template-columns: repeat(2, 1fr); } }

/* ---------- On the radar (upcoming, X-sourced) ---------- */
.radar-panel { margin-bottom: 16px; }
.radar-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.radar-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.radar-x { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--stroke); padding: 4px 9px; border-radius: 999px; }
.radar-x .xmark { font-weight: 900; }
.radar-sub { font-size: 12.5px; color: var(--ink-dim); margin: 0 0 16px; }
.radar-sub strong { color: var(--ink-soft); font-weight: 600; }

/* Polymarket consensus strip (best model end of 2026) */
.pm-strip { padding: 15px 16px; border-radius: var(--radius-sm); border: 1px solid var(--stroke); background: var(--glass); margin-bottom: 18px; }
.pm-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pm-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: #06110a; background: linear-gradient(120deg, #7bf1a8, #34d399); padding: 4px 9px; border-radius: 999px; }
.pm-title { font-weight: 700; font-size: 14px; }
.pm-resolve { margin-left: auto; font-size: 11px; color: var(--ink-dim); font-family: var(--mono); }
.pm-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--stroke-soft); }
.pm-seg { display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: #06110a; min-width: 0; overflow: hidden; white-space: nowrap; transition: filter .15s; }
.pm-seg:hover { filter: brightness(1.12); }
.pm-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 11px; }
.pm-leg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.pm-leg b { color: var(--ink); font-family: var(--mono); }
.pm-leg .dot { width: 9px; height: 9px; border-radius: 3px; }
.pm-link { margin-left: auto; font-size: 11.5px; }
.pm-link a, .rc-market a { color: var(--accent); text-decoration: none; }
.pm-link a:hover, .rc-market a:hover { text-decoration: underline; }

/* Per-card Polymarket odds (next model) */
.rc-odds { margin: 10px 0 8px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke-soft); }
.rc-odds-top { display: flex; align-items: baseline; gap: 8px; }
.rc-odds .pmtag { font-size: 9.5px; font-weight: 800; letter-spacing: .5px; color: var(--good); }
.rc-odds .pmnum { font-family: var(--mono); font-weight: 800; font-size: 20px; line-height: 1; }
.rc-odds .pmwin { font-size: 11px; color: var(--ink-dim); margin-left: auto; }
.rc-odds .obar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.10); overflow: hidden; margin: 8px 0 0; }
.rc-odds .obar i { display: block; height: 100%; border-radius: 999px; }
.rc-market { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-dim); margin-top: 6px; }
.rc-nomarket { font-size: 11.5px; color: var(--ink-dim); font-style: italic; margin: 10px 0 8px; }
.radar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.radar-card { position: relative; padding: 16px; border-radius: var(--radius-sm); overflow: hidden; background: var(--tint, var(--glass)); border: 1px solid var(--edge, var(--stroke-soft)); }
.radar-card .accent-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.radar-card .rc-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.rc-name { font-weight: 700; font-size: 15px; }
.rc-eta { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--ink-soft); }
.rc-cred { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.rc-cred.official { color: var(--good); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); }
.rc-cred.reliable { color: var(--accent); background: rgba(122,162,255,.14); border: 1px solid rgba(122,162,255,.3); }
.rc-cred.rumor { color: var(--warn); background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3); }
.rc-note { font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 12px; line-height: 1.45; }
.rc-foot { display: flex; align-items: center; gap: 10px; }
.rc-src { font-size: 11px; color: var(--ink-dim); flex: 1; }
.rc-conf { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-dim); font-family: var(--mono); }
.rc-conf .bar { width: 54px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.10); overflow: hidden; }
.rc-conf .bar i { display: block; height: 100%; border-radius: 999px; }
.radar-foot { margin-top: 14px; font-size: 11.5px; color: var(--ink-dim); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.src-pill { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--stroke-soft); background: var(--glass); color: var(--ink-soft); }

/* ---------- Detail drawer ---------- */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 80; }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); z-index: 90;
  border-radius: var(--radius) 0 0 var(--radius); padding: 26px; overflow-y: auto;
  transform: translateX(105%); transition: transform .34s cubic-bezier(.4,1,.4,1);
}
.drawer.open { transform: none; }
.drawer-close { position: absolute; top: 18px; right: 18px; }
.drawer h2 { margin: 0 0 2px; font-size: 22px; }
.drawer .d-prov { color: var(--ink-dim); font-size: 13px; margin-bottom: 18px; }
.d-section { margin-top: 22px; }
.d-section h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-dim); }
.d-elo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-elo { padding: 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke-soft); }
.d-elo .k { font-size: 11px; color: var(--ink-dim); }
.d-elo .v { font-family: var(--mono); font-weight: 700; font-size: 17px; }

/* ---------- Footer ---------- */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 24px 14px 50px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 12px; color: var(--ink-dim); }
.footer code { font-family: var(--mono); background: var(--glass); padding: 1px 6px; border-radius: 5px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  .searchwrap { order: 3; width: 100%; }
  .duel { grid-template-columns: 1fr; }
  .duel-vs { padding: 6px 0; }
  .lb-row { grid-template-columns: 28px 1fr 70px; }
  .lb-bar-wrap, .lb-delta { display: none; }
  .hero { padding: 24px 18px; }
}
.hidden { display: none !important; }
