:root {
  --bg: #000000;
  --bg-elevated: #0a0a0d;
  --surface: rgba(255, 255, 255, 0.038);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #6e6e73;
  --accent: #2997ff;
  --emerald: #30d158;
  --amber: #ff9f0a;
  --crimson: #ff453a;
  --violet: #bf5af2;
  --radius: 18px;
  --max-w: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans SC", "Noto Sans Arabic", "Noto Sans Devanagari", sans-serif;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
}
.brand-logo { width: 24px; height: 24px; display: block; flex: none; color: #fff; }
.brand-word { display: inline-flex; gap: 0.6em; }
.brand-sub { color: var(--text-tertiary); font-weight: 400; }
.nav-links { display: flex; gap: 1.45rem; align-items: center; flex-wrap: wrap; }
.nav-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.18s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }

.lang-select {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.34rem 0.85rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.lang-select option { background: #111115; color: #fff; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 23rem;
  text-align: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 100%;
  transform-origin: 58% 38%;
  animation: kenburns 48s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08) translate3d(-1%, 0.5%, 0); }
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 62% 48% at 50% 50%, rgba(0,0,0,0.62), rgba(0,0,0,0.25) 60%, transparent 80%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 22%, rgba(0,0,0,0.05) 80%, rgba(0,0,0,0.55) 96%, #000 100%);
}
.reveal { transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.js-reveal .reveal:not(.is-visible) { opacity: 0; transform: translateY(24px); }
.hero-inner > .reveal:nth-child(2) { transition-delay: .08s; }
.hero-inner > .reveal:nth-child(3) { transition-delay: .16s; }
.hero-inner > .reveal:nth-child(4) { transition-delay: .24s; }
.hero-inner > .reveal:nth-child(5) { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .hero-photo { animation: none; }
  .reveal { transition: opacity .4s ease; }
  .js-reveal .reveal:not(.is-visible) { transform: none; }
  html { scroll-behavior: auto; }
}
.hero-inner { position: relative; max-width: 920px; margin: 0 auto; }
.hero-brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
}
.hero-mark { width: 64px; height: 64px; display: block; margin-bottom: 1.4rem; color: #fff; }
.hero-wordmark {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  padding-inline-start: 0.42em;
  color: #fff;
  line-height: 1.1;
}
.hero-wordmark span { color: var(--text-tertiary); font-weight: 400; }
.hero-tagline {
  margin-top: 0.7rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-inline-start: 0.28em;
  color: #8e95a3;
}
.hero h1 {
  margin: 0 auto 1.4rem;
  max-width: 15ch;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #ffffff 60%, #e5e5ea 100%);
  filter: drop-shadow(0 2px 24px rgba(0,0,0,0.55));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(1rem, 1.75vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2.6rem;
  line-height: 1.58;
}
.hero .hero-sub { color: #e8e8ed; text-shadow: 0 1px 14px rgba(0,0,0,0.85); }
.hero .hero-tagline, .hero .hero-wordmark span { color: #c7c7cc; }
.stats-wrap { padding: 2.5rem 1.5rem 0; }
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.hero-agent { margin-top: 1.7rem; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.agent-oneline {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  padding: 0.42rem 0.45rem 0.42rem 0.95rem;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
}
.agent-oneline-lbl {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ec4ff;
  font-weight: 600;
  white-space: nowrap;
}
.agent-oneline code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #f5f5f7;
  direction: ltr;
}
.agent-oneline-copy { border-radius: 999px !important; padding: 0.28rem 0.8rem !important; }
.agent-oneline-hint {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(232, 232, 237, 0.72);
  text-shadow: 0 1px 10px rgba(0,0,0,0.8);
}
.btn-primary {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 999px;
  padding: 0.78rem 1.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.78rem 1.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.35); }

.stats-strip {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 0;
  gap: 1rem;
}
.stat-item { text-align: center; }
.stat-num { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.03em; color: #fff; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* Focus Swarm Mission Banner */
.swarm-banner {
  max-width: var(--max-w);
  margin: 1.8rem auto 0;
  padding: 0 1.5rem;
}
.swarm-card {
  background: linear-gradient(135deg, rgba(41, 151, 255, 0.12) 0%, rgba(191, 90, 242, 0.08) 55%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(41, 151, 255, 0.32);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.swarm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.3rem;
}
.swarm-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}
.swarm-title { margin: 0 0 0.25rem; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; }
.swarm-sub { margin: 0; font-size: 0.86rem; color: #d1d1d6; max-width: 720px; }
.swarm-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; }

/* Main Workspace */
.container { max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem 5rem; }

.top-bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}
.domain-bar { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.domain-pill {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.44rem 0.92rem;
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}
.domain-pill:hover { color: #fff; border-color: var(--border-strong); }
.domain-pill.active { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.pill-count { opacity: 0.62; font-size: 0.74rem; margin-inline-start: 0.28rem; }

.lens-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lens-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.34rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.lens-btn.active { background: var(--accent); color: #fff; }

/* Impact Rank Bar (Civilization -> Paradigm -> Nobel -> Frontier) */
.impact-bar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.impact-pill {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.38rem 0.78rem;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.16s ease;
}
.impact-pill:hover { border-color: var(--border-strong); color: #fff; }
.impact-pill.active { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.impact-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-civilization { background: #ff375f; box-shadow: 0 0 8px rgba(255, 55, 95, 0.85); }
.dot-paradigm { background: #bf5af2; box-shadow: 0 0 8px rgba(191, 90, 242, 0.85); }
.dot-nobel { background: #2997ff; box-shadow: 0 0 8px rgba(41, 151, 255, 0.75); }
.dot-frontier { background: #8e8e93; }

.impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  white-space: nowrap;
}
.impact-civilization { background: rgba(255, 55, 95, 0.14); color: #ff6482; border: 1px solid rgba(255, 55, 95, 0.36); }
.impact-paradigm { background: rgba(191, 90, 242, 0.14); color: #d78dff; border: 1px solid rgba(191, 90, 242, 0.34); }
.impact-nobel { background: rgba(41, 151, 255, 0.14); color: #64b5ff; border: 1px solid rgba(41, 151, 255, 0.32); }
.impact-frontier { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid var(--border); }

.rwi-pill { border-color: rgba(48, 209, 88, 0.35); color: #8ee5a8; }
.rwi-pill:hover { border-color: rgba(48, 209, 88, 0.6); color: #fff; }
.rwi-pill.active { background: rgba(48, 209, 88, 0.16); color: #fff; border-color: rgba(48, 209, 88, 0.55); }
.rwi-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(48, 209, 88, 0.1);
  color: #7ee09a;
  border: 1px solid rgba(48, 209, 88, 0.28);
}
.card-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.related-box {
  margin: 0 0 1.2rem;
  padding: 0.95rem 1.05rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}
.related-head {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.related-item {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #e8e8ed;
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.4;
}
.related-item:first-of-type { border-top: 0; }
.related-item:hover { color: #fff; }
.related-id { flex-shrink: 0; font-family: var(--mono); font-size: 0.72rem; color: var(--text-tertiary); }
.related-links { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 0.75rem; font-size: 0.8rem; }
.related-links a { color: #8ab9ff; text-decoration: none; }
.related-links a:hover { color: #fff; }
.related-dead { color: var(--crimson); }
.agent-start-card {
  margin: 0 0 1.75rem;
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(41, 151, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.agent-start-title { margin: 0.35rem 0 0.55rem; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.03em; color: #fff; }
.agent-start-card > p { margin: 0 0 1rem; color: var(--text-secondary); line-height: 1.6; font-size: 0.95rem; }
.agent-start-cli { margin-top: 0; }

.toolbar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.search-input {
  flex: 1;
  min-width: 240px;
  background: var(--bg-elevated);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.search-input:focus { border-color: var(--accent); }
.select-ctrl {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.72rem 0.95rem;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.select-ctrl option { background: #111115; color: #fff; }

.result-meta {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Cards Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1.15rem; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.048) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.03) 100%);
}
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.card-kicker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); }
.card-title { margin: 0.25rem 0 0; font-size: 1.04rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.34; color: #fff; }
.card-desc {
  margin: 0;
  font-size: 0.86rem;
  color: #d1d1d6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tier-badge { font-size: 0.67rem; font-weight: 600; padding: 0.24rem 0.58rem; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.tier1_formal { background: rgba(48, 209, 88, 0.14); color: var(--emerald); border: 1px solid rgba(48, 209, 88, 0.30); }
.tier2_simulation { background: rgba(41, 151, 255, 0.14); color: var(--accent); border: 1px solid rgba(41, 151, 255, 0.30); }
.tier3_hybrid_lab { background: rgba(255, 159, 10, 0.14); color: var(--amber); border: 1px solid rgba(255, 159, 10, 0.30); }

.dead-badge {
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 69, 58, 0.14);
  color: var(--crimson);
  border: 1px solid rgba(255, 69, 58, 0.32);
  white-space: nowrap;
}
.audit-badge { display: inline-flex; align-items: center; gap: 0.32rem; font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 999px; }
.audit-verified { background: rgba(48, 209, 88, 0.12); color: var(--emerald); border: 1px solid rgba(48, 209, 88, 0.28); }
.audit-open { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid var(--border); }

.impact-teaser {
  background: rgba(255, 255, 255, 0.03);
  border-inline-start: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
[dir="rtl"] .impact-teaser { border-radius: 10px 0 0 10px; }
.impact-teaser-lbl { display: block; font-size: 0.67rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.22rem; }

.card-foot {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.card-cta { color: #fff; font-weight: 500; }
.live-dot { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--emerald); font-weight: 600; }
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }

/* Graveyard & Leaderboard Views */
.section-intro { max-width: 760px; margin: 0 auto 2rem; text-align: center; }
.section-intro h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; margin: 0 0 0.55rem; }
.section-intro p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

.lb-rules {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.2rem 0 2rem;
}
.lb-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.36rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.lb-pill strong { color: #fff; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-table th, .lb-table td {
  padding: 1rem 1.15rem;
  text-align: start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.88rem;
}
.lb-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.03);
}
.lb-row { cursor: pointer; transition: background 0.15s; }
.lb-row:hover { background: rgba(255, 255, 255, 0.06); }

.sf-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; background: rgba(255, 255, 255, 0.03); border-radius: 10px; padding: 0.6rem; }
.sf-m-lbl { font-size: 0.66rem; color: var(--text-tertiary); display: block; }
.sf-m-val { font-size: 0.86rem; font-weight: 600; color: #fff; }

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.how-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.how-step { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 0.6rem; }
.how-card h3 { margin: 0 0 0.5rem; font-size: 1.12rem; letter-spacing: -0.02em; }
.how-card p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }

.load-more-wrap { text-align: center; margin-top: 2rem; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal-backdrop.hidden { display: none; }
.modal {
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0c0c0f;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.85);
}
.modal-close {
  position: sticky;
  top: 0;
  float: inline-end;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.22); }
.modal-title { margin: 0.4rem 0 0.85rem; font-size: clamp(1.35rem, 2.5vw, 1.85rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.22; padding-inline-end: 2.5rem; }

.plain-box { background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; padding: 1.2rem 1.35rem; margin-bottom: 1.3rem; }
.plain-box-lbl { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald); margin-bottom: 0.45rem; }
.plain-box-txt { margin: 0; font-size: 1.02rem; color: #f5f5f7; line-height: 1.6; }

.tech-box { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border); border-radius: 16px; padding: 1.1rem 1.3rem; margin-bottom: 1.3rem; }
.tech-box-lbl { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 0.4rem; }
.tech-box-txt { margin: 0; font-size: 0.9rem; color: #d1d1d6; line-height: 1.58; }

.dead-box {
  background: rgba(255, 69, 58, 0.06);
  border: 1px solid rgba(255, 69, 58, 0.26);
  border-radius: 16px;
  padding: 1.15rem 1.3rem;
  margin-bottom: 1.3rem;
}
.dead-box-lbl { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--crimson); margin-bottom: 0.65rem; }
.dead-item { padding: 0.6rem 0; border-top: 1px solid rgba(255, 69, 58, 0.14); font-size: 0.86rem; }
.dead-item:first-of-type { border-top: none; padding-top: 0; }

.ms-box {
  background: rgba(48, 209, 88, 0.05);
  border: 1px solid rgba(48, 209, 88, 0.24);
  border-radius: 16px;
  padding: 1.15rem 1.3rem;
  margin-bottom: 1.3rem;
}
.ms-box-lbl { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald); margin-bottom: 0.65rem; }
.ms-row { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.55rem 0; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 0.86rem; }
.ms-row:first-of-type { border-top: none; padding-top: 0; }

.cascade-box {
  background: linear-gradient(145deg, rgba(41, 151, 255, 0.09) 0%, rgba(191, 90, 242, 0.06) 100%);
  border: 1px solid rgba(41, 151, 255, 0.28);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.35rem;
}
.cascade-head { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.1rem; }
.cascade-list { position: relative; display: flex; flex-direction: column; gap: 1.15rem; padding-inline-start: 1.75rem; }
.cascade-list::before { content: ""; position: absolute; inset-inline-start: 6px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, #ffffff 0%, var(--accent) 50%, var(--violet) 100%); }
.cascade-node { position: relative; }
.cascade-node::before { content: ""; position: absolute; inset-inline-start: -1.75rem; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #0c0c0f; border: 2.5px solid var(--accent); }
.cascade-node.n1::before { border-color: #ffffff; }
.cascade-node.n3::before { border-color: var(--violet); box-shadow: 0 0 10px rgba(191, 90, 242, 0.75); }
.cascade-step-lbl { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.25rem; }
.cascade-node.n2 .cascade-step-lbl { color: var(--accent); }
.cascade-node.n3 .cascade-step-lbl { color: var(--violet); }
.cascade-step-txt { font-size: 0.94rem; color: #f5f5f7; line-height: 1.52; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.85rem; margin-bottom: 1.35rem; }
.detail-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; }
.detail-panel-lbl { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 0.35rem; }
.detail-panel-val { font-size: 0.88rem; color: #fff; }

.prompt-wrap { background: #050507; border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1.2rem; }
.prompt-pre { margin: 0.45rem 0 0; font-family: var(--mono); font-size: 0.77rem; color: #93c5fd; white-space: pre-wrap; word-break: break-word; direction: ltr; text-align: left; }
.modal-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.hidden { display: none !important; }

footer { border-top: 1px solid var(--border); padding: 2.5rem 1.5rem; text-align: center; color: var(--text-tertiary); font-size: 0.82rem; }

@media (max-width: 780px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .grid { grid-template-columns: 1fr; }
  .modal { padding: 1.35rem; }
  .hero { padding: 4.5rem 1.25rem 4rem; }
  .hero-brand-lockup { margin-bottom: 2.2rem; }
  .hero-mark { width: 52px; height: 52px; }
  .hero-cta button { flex: 1 1 100%; max-width: 320px; }
  .brand-sub { display: none; }
  .hero-photo { object-position: 50% 100%; transform-origin: 50% 36%; }
  .hero { padding-bottom: 13rem; }
  .agent-oneline { border-radius: 16px; padding: 0.7rem 0.85rem; }
  .agent-oneline-hint { text-align: center; max-width: 22rem; }
  .stats-wrap { padding-top: 1.5rem; }
}

/* =====================================================================
   Design system v2 — Apple × Tesla (sections, map, interactions)
   ===================================================================== */
:root {
  --bg: #000;
  --bg-elevated: #0a0a0c;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --radius: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}
html, body { background: #000; }
::selection { background: rgba(41, 151, 255, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
button { -webkit-tap-highlight-color: transparent; }
.btn-primary, .btn-ghost, .chip, .domain-pill, .impact-pill, .lens-btn, .legend-item, .nav-link, .drawer-link, .footer-link {
  transition: transform .18s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease), box-shadow .25s var(--ease);
}
.btn-primary:active, .btn-ghost:active, .chip:active, .domain-pill:active, .impact-pill:active, .legend-item:active, .podium-card:active { transform: scale(0.97); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-decoration: none !important; }
.btn-sm { padding: .45rem 1rem !important; font-size: .78rem !important; }
.mono { font-family: var(--mono); }

/* ---- Nav ---- */
.nav { transition: background-color .3s var(--ease), border-color .3s var(--ease); border-bottom-color: transparent; }
.nav.scrolled { background: rgba(0, 0, 0, 0.72); border-bottom-color: rgba(255, 255, 255, 0.08); }
.nav-links { position: relative; gap: 1.6rem; }
.nav-link { position: relative; z-index: 1; font-size: .8rem; letter-spacing: .01em; }
.nav-link.active { color: #fff; }
.nav-indicator {
  position: absolute; left: 0; bottom: -19px; height: 1.5px; width: 0;
  background: #fff; border-radius: 2px; opacity: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
}
.nav-right { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: none; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.05); position: relative; cursor: pointer; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), top .35s var(--ease); }
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 21px; }
.nav-toggle.open span:first-child { top: 18px; transform: rotate(45deg); }
.nav-toggle.open span:last-child { top: 18px; transform: rotate(-45deg); }
.mobile-drawer {
  position: fixed; inset: 60px 0 0 0; z-index: 39;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.mobile-drawer.open { opacity: 1; visibility: visible; }
.drawer-inner { display: flex; flex-direction: column; padding: 1.5rem 1.75rem; gap: .15rem; }
.drawer-link {
  text-align: start; background: none; border: 0; color: #f5f5f7; font: inherit;
  font-size: 1.65rem; font-weight: 600; letter-spacing: -.03em; padding: .6rem 0; cursor: pointer; text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transform: translateY(8px); opacity: 0; transition: transform .45s var(--ease), opacity .45s var(--ease), color .2s;
}
.mobile-drawer.open .drawer-link { transform: none; opacity: 1; }
.mobile-drawer.open .drawer-link:nth-child(2) { transition-delay: .03s; }
.mobile-drawer.open .drawer-link:nth-child(3) { transition-delay: .06s; }
.mobile-drawer.open .drawer-link:nth-child(4) { transition-delay: .09s; }
.mobile-drawer.open .drawer-link:nth-child(5) { transition-delay: .12s; }
.mobile-drawer.open .drawer-link:nth-child(6) { transition-delay: .15s; }
.drawer-link.active { color: var(--accent); }
body.drawer-open { overflow: hidden; }

/* ---- Stats & Swarm ---- */
.stats-strip {
  background: rgba(255, 255, 255, 0.025) !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
  padding: 1.8rem 1rem !important;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.stat-item { position: relative; }
.stat-item + .stat-item::before { content: ""; position: absolute; inset-inline-start: -0.5rem; top: 15%; bottom: 15%; width: 1px; background: var(--border); }
.stat-num { font-variant-numeric: tabular-nums; font-weight: 600; font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -.045em; }
.stat-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); margin-top: .35rem; }
.swarm-banner { margin-top: 1.25rem; }
.swarm-card {
  position: relative; overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 24px; padding: 1.6rem 1.8rem;
}
.swarm-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 160px at 0% 0%, rgba(41, 151, 255, 0.10), transparent 70%);
}
.swarm-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); }
.swarm-kicker { color: #d4d4d8; letter-spacing: .16em; font-weight: 600; font-size: .68rem; }
.swarm-kicker::before { background: #30d158; box-shadow: 0 0 0 3px rgba(48, 209, 88, .18); animation: livepulse 2.4s ease-in-out infinite; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 6px rgba(48, 209, 88, 0); } }
.swarm-title { font-size: 1.3rem; font-weight: 600; letter-spacing: -.03em; }
.swarm-sub { color: var(--text-secondary); }

/* ---- Workspace & filters ---- */
.container { padding-top: 3.5rem; }
#view-controls { margin-bottom: .25rem; }
.domain-pill { background: transparent; border-color: var(--border); color: var(--text-secondary); padding: .5rem 1rem; }
.domain-pill:hover { background: var(--surface-2); color: #fff; }
.domain-pill.active { background: #fff; color: #000; border-color: #fff; }
.domain-pill.active .pill-count { color: #52525b; opacity: 1; }
.pill-count { font-variant-numeric: tabular-nums; }
.lens-switch { background: rgba(255,255,255,.05); border-color: var(--border); }
.lens-btn.active { background: #fff; color: #000; box-shadow: 0 1px 8px rgba(0,0,0,.4); }
.impact-pill { border-radius: 999px; background: transparent; }
.impact-pill.active { background: var(--surface-2); border-color: var(--border-strong); }
.dot-civilization { background: #ff453a; box-shadow: none; }
.dot-paradigm { background: #bf5af2; box-shadow: none; }
.dot-nobel { background: #2997ff; box-shadow: none; }
.toolbar-sticky {
  position: sticky; top: 60px; z-index: 30;
  margin: 0 -1.5rem 1rem; padding: .7rem 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.toolbar { margin: 0; }
.search-wrap { position: relative; flex: 1; min-width: 240px; display: flex; }
.search-ico { position: absolute; inset-inline-start: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; }
.search-input {
  width: 100%; border-radius: 999px; padding: .72rem 1.1rem; padding-inline-start: 2.6rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.search-input:focus { border-color: rgba(41,151,255,.6); background: rgba(255,255,255,.07); box-shadow: 0 0 0 4px rgba(41,151,255,.15); }
.select-ctrl { border-radius: 999px; background: rgba(255,255,255,.05); padding: .72rem 1rem; }
.result-meta { color: var(--text-tertiary); font-size: .78rem; }

/* ---- Cards ---- */
.grid { gap: 1rem; }
.card, .gy-item, .how-card, .podium-card {
  --mx: 50%; --my: 0%;
  position: relative; isolation: isolate;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .35s var(--ease);
}
.card::before, .gy-item::before, .how-card::before, .podium-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,255,255,.07), transparent 45%);
  opacity: 0; transition: opacity .35s var(--ease);
}
.card:hover, .gy-item:hover, .podium-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02);
}
.card:hover::before, .gy-item:hover::before, .how-card:hover::before, .podium-card:hover::before { opacity: 1; }
.card { padding: 1.5rem; gap: .85rem; }
.card-kicker { font-size: .66rem; letter-spacing: .12em; color: var(--text-tertiary); font-weight: 500; }
.card-title { font-size: 1.08rem; font-weight: 600; letter-spacing: -.022em; }
.card-desc { color: #a1a1aa; font-size: .87rem; line-height: 1.55; }
.impact-teaser { background: rgba(255,255,255,.025); border-inline-start: 1.5px solid rgba(41,151,255,.6); color: #d4d4d8; }
.impact-teaser-lbl { color: #8ab9ff; letter-spacing: .12em; font-weight: 500; }
.card-foot { border-top: 1px solid rgba(255,255,255,.06); padding-top: .85rem; color: var(--text-tertiary); }
.card-cta { color: #fff; opacity: .55; transition: opacity .25s, transform .25s var(--ease); }
.card:hover .card-cta, .gy-item:hover .card-cta { opacity: 1; transform: translateX(2px); }
.impact-badge, .tier-badge, .audit-badge, .dead-badge { font-weight: 500; letter-spacing: .02em; }
.impact-civilization { background: rgba(255, 69, 58, .08); color: #ff7a70; border-color: rgba(255, 69, 58, .25); }
.impact-paradigm { background: rgba(191, 90, 242, .08); color: #d29cf5; border-color: rgba(191, 90, 242, .25); }
.impact-nobel { background: rgba(41, 151, 255, .08); color: #7cb8ff; border-color: rgba(41, 151, 255, .25); }
.tier1_formal { background: rgba(255,255,255,.06); color: #f4f4f5; border-color: rgba(255,255,255,.22); }
.tier2_simulation { background: rgba(41,151,255,.08); color: #7cb8ff; border-color: rgba(41,151,255,.25); }
.tier3_hybrid_lab { background: rgba(161,161,170,.08); color: #a1a1aa; border-color: rgba(161,161,170,.22); }
.sf-card.flash { border-color: rgba(41,151,255,.7); box-shadow: 0 0 0 4px rgba(41,151,255,.18); }
.load-more-wrap .btn-ghost { min-width: 200px; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 4.5rem 1rem; color: var(--text-secondary); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state svg { width: 44px; height: 44px; color: #52525b; margin-bottom: 1rem; }
.empty-state h3 { margin: 0 0 .35rem; color: #fff; font-weight: 600; letter-spacing: -.02em; }
.empty-state p { margin: 0 0 1.25rem; font-size: .9rem; }

/* view transition */
.view-enter { animation: viewIn .55s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Section intros ---- */
.section-intro { max-width: 760px; margin: 1rem 0 2.5rem; text-align: start; }
.section-kicker { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
.section-intro h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.04; margin: 0 0 1rem; }
.section-intro p { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ---- Graveyard ---- */
.gy-controls { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 2rem; }
.gy-controls .search-wrap { max-width: 520px; }
.chip-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); border-radius: 999px; padding: .42rem .9rem; font: inherit; font-size: .76rem; text-transform: capitalize; cursor: pointer; }
.chip:hover { color: #fff; border-color: var(--border-strong); }
.chip.active { background: #fff; color: #000; border-color: #fff; }
.chip.active .pill-count { color: #52525b; }
.gy-list { position: relative; display: flex; flex-direction: column; gap: 1rem; }
.gy-item { display: grid; grid-template-columns: 28px 1fr; gap: 1rem; padding: 1.5rem 1.6rem; cursor: pointer; }
.gy-rail { position: relative; display: flex; justify-content: center; }
.gy-rail::before { content: ""; position: absolute; top: 18px; bottom: -2.6rem; width: 1px; background: linear-gradient(var(--border), transparent); }
.gy-item:last-child .gy-rail::before { display: none; }
.gy-rail span { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; border: 1.5px solid #71717a; background: #000; box-shadow: 0 0 0 4px #000; }
.gy-item:hover .gy-rail span { border-color: #ff6961; }
.gy-meta { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .7rem; letter-spacing: .06em; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: .5rem; }
.gy-title { margin: 0 0 .75rem; font-size: 1.12rem; font-weight: 600; letter-spacing: -.022em; line-height: 1.35; color: #fff; }
.gy-reason { font-size: .9rem; line-height: 1.6; color: #a1a1aa; padding: .85rem 1rem; border-radius: 12px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.05); }
.gy-reason-lbl { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: #ff8a80; margin-bottom: .3rem; font-weight: 600; }
.gy-foot { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; font-size: .78rem; color: var(--text-tertiary); }
.gy-by { flex: 1; }
.tag { font-size: .68rem; padding: .22rem .65rem; border-radius: 999px; text-transform: capitalize; letter-spacing: .02em; }
.tag-dead { color: #ff8a80; background: rgba(255,69,58,.07); border: 1px solid rgba(255,69,58,.22); }

/* ---- Leaderboard ---- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.75rem; align-items: end; }
.podium-2 { grid-template-columns: repeat(2, minmax(0, 360px)); }
.podium-1 { grid-template-columns: minmax(0, 420px); }
.podium-card { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: 2rem 1.25rem 1.6rem; font: inherit; color: #fff; cursor: pointer; text-align: center; }
.podium-card.rank-1 { padding-top: 2.6rem; border-color: rgba(255,255,255,.22); background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); }
.podium-card.rank-1::after { content: ""; position: absolute; left: 20%; right: 20%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, #fff, transparent); }
.podium-rank { font-size: .7rem; letter-spacing: .2em; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.podium-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 1.3rem; margin: .4rem 0; color: #000; }
.rank-1 .podium-avatar { background: linear-gradient(145deg, #fff, #c7c7cc); box-shadow: 0 0 30px rgba(255,255,255,.25); }
.rank-2 .podium-avatar { background: linear-gradient(145deg, #d4d4d8, #8e8e93); }
.rank-3 .podium-avatar { background: linear-gradient(145deg, #c9a27e, #7a5a40); }
.podium-handle { font-weight: 600; letter-spacing: -.01em; }
.podium-badge { font-size: .72rem; color: var(--text-secondary); }
.podium-points { margin-top: .4rem; font-size: .8rem; color: var(--text-tertiary); }
.podium-points strong { font-size: 1.9rem; font-weight: 600; letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums; margin-inline-end: .2rem; }
.lb-rules { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.25rem; }
.lb-pill { background: transparent; border: 1px solid var(--border); border-radius: 999px; font-size: .74rem; color: var(--text-secondary); padding: .38rem .85rem; }
.lb-pill strong { color: #fff; font-weight: 600; }
.lb-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); font-weight: 500; background: rgba(255,255,255,.02); }
.lb-table th, .lb-table td { padding: 1rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.06); text-align: start; font-size: .86rem; }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table .num { text-align: end; font-variant-numeric: tabular-nums; }
.lb-row { cursor: pointer; transition: background-color .2s; }
.lb-row:hover { background: rgba(255,255,255,.035); }
.rank-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .78rem; font-weight: 600; border: 1px solid var(--border); color: #d4d4d8; font-variant-numeric: tabular-nums; }
.rank-num.r1 { background: #fff; color: #000; border-color: #fff; }
.rank-num.r2 { background: #a1a1aa; color: #000; border-color: #a1a1aa; }
.rank-num.r3 { background: #9a7656; color: #000; border-color: #9a7656; }
.lb-handle { font-weight: 600; color: #fff; }
.lb-sub { font-size: .76rem; color: var(--text-secondary); margin-top: .15rem; }
.lb-badge { color: #7cb8ff; }
.lb-points { color: #fff; font-size: 1rem; }
.lb-models { font-size: .8rem; color: var(--text-secondary); }
.lb-note { margin-top: 1rem; font-size: .78rem; color: var(--text-tertiary); }

/* ---- How it works ---- */
.how-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.how-card { padding: 2rem 1.6rem; }
.how-num { font-size: 3.2rem; font-weight: 200; letter-spacing: -.05em; line-height: 1; color: #fff; margin-bottom: 1.4rem; font-variant-numeric: tabular-nums; }
.how-step { font-size: .66rem; letter-spacing: .18em; color: var(--accent); font-weight: 600; margin-bottom: .6rem; text-transform: uppercase; }
.how-card h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.025em; margin: 0 0 .6rem; }
.how-card p { color: var(--text-secondary); line-height: 1.6; font-size: .9rem; }
.cli-card { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #050506; }
.cli-head { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.025); }
.cli-dots { display: inline-flex; gap: 6px; }
.cli-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3f3f46; display: block; }
.cli-title { flex: 1; font-size: .74rem; color: var(--text-tertiary); letter-spacing: .04em; }
.cli-pre { margin: 0; padding: 1.25rem 1.4rem; font-family: var(--mono); font-size: .84rem; line-height: 1.9; color: #e4e4e7; overflow-x: auto; direction: ltr; text-align: left; }
.cli-prompt { color: var(--accent); user-select: none; }

/* ---- Modal ---- */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.modal-backdrop.is-open { opacity: 1; }
.modal {
  background: #0a0a0c !important; border: 1px solid rgba(255,255,255,.1) !important; border-radius: 28px !important;
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.9);
  transform: translateY(18px) scale(.97); opacity: 0;
  transition: transform .45s var(--spring), opacity .3s var(--ease);
}
.modal-backdrop.is-open .modal { transform: none; opacity: 1; }
.modal-close { border-radius: 999px !important; background: rgba(255,255,255,.07) !important; border: 1px solid var(--border) !important; transition: background-color .2s, transform .2s var(--ease); }
.modal-close:hover { background: rgba(255,255,255,.14) !important; transform: rotate(90deg); }
.modal-title { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; font-weight: 600 !important; letter-spacing: -.04em !important; line-height: 1.12 !important; }
.plain-box, .tech-box, .cascade-box, .ms-box, .dead-box, .detail-panel, .prompt-wrap { border-radius: 16px !important; border-color: rgba(255,255,255,.08) !important; }
.plain-box { background: rgba(41,151,255,.05) !important; }
.modal-actions { position: sticky; bottom: -1px; z-index: 2; margin: 0 -2rem; padding: 1rem 2rem .4rem; background: rgba(10,10,12,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(255,255,255,.07); }
.card-header { flex-direction: column-reverse; align-items: flex-start; gap: .7rem; }
.card-header > div { width: 100%; }
.card-foot { flex-wrap: wrap; gap: .5rem; }
@media (max-width: 780px) { .modal-actions { margin: 0 -1.35rem; padding: .9rem 1.35rem .4rem; } }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 1.5rem 2.5rem; color: var(--text-tertiary); font-size: .8rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-size: .78rem; font-weight: 500; letter-spacing: .3em; }
.footer-brand .dim { color: var(--text-tertiary); font-weight: 400; }
.footer-mark { width: 22px; height: 22px; color: #fff; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-link { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; color: var(--text-secondary); cursor: pointer; text-decoration: none !important; }
.footer-link:hover, .footer-link.active { color: #fff; }
.footer-note { max-width: var(--max-w); margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.06); text-align: start; }

@media (max-width: 780px) {
  .nav-toggle { display: inline-block; }
  .nav .lang-select { padding: .3rem .6rem; font-size: .72rem; }
  .stats-strip { grid-template-columns: repeat(2, 1fr) !important; row-gap: 1.4rem !important; }
  .stat-item:nth-child(3)::before { display: none; }
  .toolbar-sticky { margin: 0 -1.5rem .75rem; padding: .6rem 1rem; }
  .toolbar .select-ctrl { flex: 1 1 40%; }
  .search-wrap { min-width: 100%; }
  .gy-item { grid-template-columns: 18px 1fr; padding: 1.2rem 1.1rem; gap: .7rem; }
  .podium, .podium-2, .podium-1 { grid-template-columns: 1fr; }
  .podium-card.rank-1 { order: -1; }
  .lb-wrap { border: 0; background: none; overflow: visible; }
  .lb-table thead { display: none; }
  .lb-table, .lb-table tbody, .lb-table tr, .lb-table td { display: block; width: 100%; }
  .lb-table tr { border: 1px solid var(--border); border-radius: 18px; padding: .6rem 1rem; margin-bottom: .75rem; background: var(--surface); }
  .lb-table td { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; text-align: end !important; }
  .lb-table td::before { content: attr(data-label); color: var(--text-tertiary); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; text-align: start; flex: none; }
  .lb-table td > div { text-align: end; }
  .modal { border-radius: 24px 24px 0 0 !important; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Hero lockup legibility (over the galaxy) */
.hero-brand-lockup { position: relative; isolation: isolate; padding: 1.4rem 2.6rem 1.2rem; }
.hero-brand-lockup::before {
  content: ""; position: absolute; inset: -30% -25%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0,0,0,.78), rgba(0,0,0,.45) 55%, transparent);
}
.hero .hero-wordmark { font-size: 1.12rem; font-weight: 600; letter-spacing: .4em; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 18px rgba(0,0,0,.85); }
.hero .hero-wordmark span { color: #fff !important; opacity: 1 !important; font-weight: 400; }
.hero .hero-tagline { font-size: .8rem; font-weight: 600; letter-spacing: .3em; color: #f2f2f7 !important; margin-top: .85rem; text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 14px rgba(0,0,0,.9); }
.hero .hero-mark { filter: drop-shadow(0 0 14px rgba(0,0,0,.85)); }
@media (max-width: 780px) {
  .hero .hero-wordmark { font-size: 1rem; letter-spacing: .3em; }
  .hero .hero-tagline { font-size: .74rem; letter-spacing: .24em; }
  .hero-brand-lockup { padding: 1rem 1.2rem; }
}

/* Gallery-inspired micro-interactions: spring press, action pills, copy burst */
.btn-primary:active, .btn-ghost:active, .chip:active, .domain-pill:active, .impact-pill:active, .legend-item:active, .card-action:active { transform: scale(.94); transition-duration: .08s; }
.btn-primary, .btn-ghost, .chip, .domain-pill, .impact-pill, .legend-item, .card-action { transition-timing-function: var(--spring); }
.card-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: -.15rem; }
.card-action {
  position: relative; background: rgba(255,255,255,.04); border: 1px solid var(--border); color: #d4d4d8;
  border-radius: 999px; padding: .32rem .75rem; font: inherit; font-size: .72rem; cursor: pointer;
  transition: transform .3s var(--spring), background-color .2s, border-color .2s, color .2s;
}
.card-action:hover { background: rgba(255,255,255,.09); border-color: var(--border-strong); color: #fff; }
.card-action .mono { color: var(--text-tertiary); margin-inline-start: .25rem; }
.burst { position: relative; }
.burst::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  border: 1.5px solid rgba(41,151,255,.9); animation: burst .55s var(--ease) forwards;
}
@keyframes burst { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .card:hover, .gy-item:hover, .podium-card:hover { transform: none; }
}

/* =====================================================================
   v2 — multi-page site: page shells, home sections, explore cards,
   pipeline, 404 and the full-viewport Science Map.
   ===================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
#site-nav { view-transition-name: site-nav; }
header.nav { display: block; min-height: 60px; }
.brand, .footer-brand { color: #fff; text-decoration: none !important; }
.nav-link { text-decoration: none !important; }
main { animation: page-in .55s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- page shells ---- */
.page-main { padding-top: clamp(3rem, 7vw, 5.5rem); min-height: calc(100vh - 60px); }
.page-head { max-width: 820px; margin: 0 0 2.4rem; }
.page-title, .section-intro h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 600; letter-spacing: -.05em; line-height: 1.02; margin: 0 0 1.1rem; color: #fff; }
.page-sub { font-size: clamp(1.02rem, 1.6vw, 1.22rem); color: var(--text-secondary); line-height: 1.6; margin: 0; max-width: 680px; }
.section-intro { max-width: 820px; margin: 0 0 2.6rem; }
.page-view { display: block; }

/* ---- home ---- */
.home-section { padding-top: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: 0; }
.home-section:last-of-type { padding-bottom: clamp(4rem, 8vw, 6rem); }
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.home-title { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; margin: 0 0 .7rem; color: #fff; max-width: 760px; }
.home-sub { color: var(--text-secondary); margin: 0; max-width: 620px; font-size: 1.02rem; }
.home-head-cta { white-space: nowrap; }
.cta-count { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.card { text-align: start; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.explore-card {
  position: relative; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--border); color: #fff; text-decoration: none !important; min-height: 330px;
  transition: transform .45s var(--spring), border-color .3s var(--ease), background .3s var(--ease);
}
.explore-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.08), transparent 45%); }
.explore-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.explore-card:hover::before { opacity: 1; }
.explore-card:active { transform: scale(.98); }
.explore-art { height: 150px; display: grid; place-items: center; border-bottom: 1px solid rgba(255,255,255,.06);
  background: radial-gradient(120% 90% at 50% 0%, rgba(41,151,255,.08), transparent 60%); }
.explore-map .explore-art { background: radial-gradient(120% 90% at 50% 10%, rgba(255,55,95,.12), rgba(41,151,255,.06) 50%, transparent 75%); }
.explore-graveyard .explore-art { background: radial-gradient(120% 90% at 50% 0%, rgba(255,69,58,.1), transparent 60%); }
.explore-art svg { width: 78%; height: auto; transition: transform .6s var(--spring); }
.explore-card:hover .explore-art svg { transform: scale(1.05); }
.explore-body { padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.explore-stat { font-size: 2rem; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.explore-body h3 { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.explore-body p { margin: 0; color: var(--text-secondary); font-size: .9rem; line-height: 1.5; flex: 1; }
.explore-go { margin-top: .9rem; font-size: .82rem; color: var(--accent); }
.explore-go span { display: inline-block; transition: transform .3s var(--spring); }
.explore-card:hover .explore-go span { transform: translateX(4px); }

/* ---- graveyard links ---- */
a.gy-item { color: inherit; text-decoration: none !important; }
a.gy-item:hover .card-cta { color: #fff; }

/* ---- pipeline (How It Works) ---- */
.pipeline { margin-top: clamp(3.5rem, 8vw, 6rem); }
.pipe-title { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; margin: 0 0 .8rem; color: #fff; }
.pipe-sub { color: var(--text-secondary); margin: 0 0 2rem; max-width: 640px; font-size: 1.02rem; }
.pipe-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: s; position: relative; }
.pipe-step { position: relative; padding: 1.5rem 1.4rem; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.pipe-step::after { content: ""; position: absolute; top: 2.15rem; right: -1rem; width: 1rem; height: 1px; background: var(--border-strong); }
.pipe-step:last-child::after { display: none; }
.pipe-idx { display: inline-flex; width: 34px; height: 34px; border-radius: 999px; align-items: center; justify-content: center; font-family: var(--mono); font-size: .75rem; border: 1px solid var(--border-strong); color: #fff; margin-bottom: 1rem; }
.pipe-step h3 { margin: 0 0 .45rem; font-size: 1rem; font-weight: 600; }
.pipe-step p { margin: 0; color: var(--text-secondary); font-size: .88rem; line-height: 1.55; }
.pipe-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.pipe-tier { padding: 1.3rem 1.4rem; border-radius: 22px; border: 1px solid var(--border); background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: .7rem; align-items: flex-start; }
.pipe-tier p { margin: 0; color: var(--text-secondary); font-size: .88rem; flex: 1; }
.pipe-count { font-size: .82rem; color: var(--text-tertiary); }
.pipe-count strong { color: #fff; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-inline-end: .2rem; }

/* ---- 404 ---- */
.nf { display: grid; place-items: center; text-align: center; }
.nf-inner { max-width: 620px; display: flex; flex-direction: column; align-items: center; }
.nf-mark { width: 64px; height: 64px; color: #fff; margin-bottom: 1.6rem; }
.nf .hero-cta { margin-top: 2rem; justify-content: center; }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.18); border-top-color: #fff; display: inline-block; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .pipe-steps { grid-template-columns: repeat(2, 1fr); }
  .pipe-step::after { display: none; }
}
@media (max-width: 780px) {
  .explore-grid, .pipe-steps, .pipe-tiers { grid-template-columns: 1fr; }
  .explore-card { min-height: 0; }
  .explore-art { height: 120px; }
  .home-head-cta { width: 100%; }
  .page-main { padding-top: 2.4rem; }
}

/* =====================================================================
   Science Map — full viewport canvas
   ===================================================================== */
body.page-map { overflow: hidden; height: 100vh; height: 100dvh; overscroll-behavior: none; }
.page-map header.nav { position: fixed; left: 0; right: 0; top: 0; background: rgba(0,0,0,.35); border-bottom-color: rgba(255,255,255,.06); }
.page-map main { animation: none; }
.map-stage { position: fixed; inset: 0; overflow: hidden; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.map-stage.dragging { cursor: grabbing; }
.map-stage.pointing { cursor: pointer; }
#sky { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--text-secondary); font-size: .85rem; letter-spacing: .02em; background: #000; z-index: 6; transition: opacity .8s var(--ease), visibility .8s; }
.map-loading.done { opacity: 0; visibility: hidden; }

.map-hud { position: absolute; z-index: 5; pointer-events: none; }
.map-hud > * { pointer-events: auto; }
.map-hud-top { top: 84px; left: 40px; right: 40px; display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
.map-heading { pointer-events: none; }
.map-heading .section-kicker { margin-bottom: .45rem; text-shadow: 0 1px 10px #000; }
.map-h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.9); max-width: 520px; }
.map-toolbar { display: flex; gap: .6rem; align-items: flex-start; }
.glass { background: rgba(14,14,18,.62); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border: 1px solid rgba(255,255,255,.1); }
.map-search, .map-filter-btn, .map-controls, .map-jump, .map-filter-pop, .map-results, .map-hover, .map-inspector, .map-legend {
  background: rgba(14,14,18,.62); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border: 1px solid rgba(255,255,255,.1);
}
.map-search { position: relative; display: flex; align-items: center; width: min(360px, 34vw); height: 44px; border-radius: 999px; padding: 0 .9rem 0 2.5rem; transition: border-color .2s, box-shadow .3s var(--ease); }
.map-search:focus-within { border-color: rgba(41,151,255,.6); box-shadow: 0 0 0 4px rgba(41,151,255,.15); }
.map-search .search-ico { position: absolute; left: .95rem; width: 17px; height: 17px; color: var(--text-secondary); }
.map-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: .9rem; }
.map-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.map-kbd { font-family: var(--mono); font-size: .7rem; color: var(--text-tertiary); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: .05rem .4rem; }
.map-search:focus-within .map-kbd { display: none; }
.map-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; border-radius: 18px; padding: .35rem; display: none; max-height: 60vh; overflow: auto; box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.map-results.show { display: block; animation: pop-in .22s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.mr-item { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; color: #fff; font: inherit; text-align: start; padding: .6rem .7rem; border-radius: 12px; cursor: pointer; }
.mr-item:hover, .mr-item.active { background: rgba(255,255,255,.08); }
.mr-item i, .jump-pill i, .mf-chip i, .insp-kicker i, .insp-link i, .mh-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; display: inline-block; }
.mr-name { flex: 1; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-kind { font-size: .72rem; color: var(--text-tertiary); white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.mr-foot, .mr-empty { font-size: .74rem; color: var(--text-tertiary); padding: .5rem .7rem .4rem; }

.map-filter-wrap { position: relative; }
.map-filter-btn { height: 44px; border-radius: 999px; display: inline-flex; align-items: center; gap: .5rem; padding: 0 1.05rem; color: #fff; font: inherit; font-size: .86rem; cursor: pointer; transition: transform .18s var(--ease), border-color .2s; }
.map-filter-btn svg { width: 17px; height: 17px; }
.map-filter-btn:hover { border-color: var(--border-strong); }
.map-filter-btn:active { transform: scale(.96); }
.map-filter-count { min-width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 .3rem; }
.map-filter-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; border-radius: 20px; padding: .9rem; display: none; box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.map-filter-pop.open { display: block; animation: pop-in .22s var(--ease); }
.mf-group + .mf-group { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.07); }
.mf-lbl { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: .5rem; }
.mf-chip { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; color: var(--text-tertiary); font: inherit; font-size: .85rem; padding: .45rem .5rem; border-radius: 10px; cursor: pointer; text-align: start; transition: background .2s, color .2s; }
.mf-chip small { margin-inline-start: auto; font-size: .72rem; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.mf-chip.on { color: #fff; }
.mf-chip:not(.on) i, .mf-chip:not(.on) .tier-dot { opacity: .25; box-shadow: none; }
.mf-chip:hover { background: rgba(255,255,255,.06); }
.tier-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; padding: 0 !important; border: 0 !important; }
.tier-dot.tier1_formal { background: #fff; box-shadow: 0 0 8px #fff; }
.tier-dot.tier2_simulation { background: #8cc4ff; box-shadow: 0 0 8px #2997ff; }
.tier-dot.tier3_hybrid_lab { background: #8e8e93; }
.mf-reset { margin-top: .8rem; width: 100%; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.mf-reset:hover { background: rgba(255,255,255,.08); }

.map-controls { position: absolute; z-index: 5; right: 40px; bottom: 96px; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; transition: right .5s var(--ease); }
.map-controls button { width: 44px; height: 42px; background: none; border: 0; color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.map-controls button + button { border-top: 1px solid rgba(255,255,255,.07); }
.map-controls button:hover { background: rgba(255,255,255,.08); }
.map-controls button:active { background: rgba(255,255,255,.14); }
.map-controls svg { width: 18px; height: 18px; }

.map-legend { position: absolute; z-index: 4; left: 40px; bottom: 96px; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; max-width: min(640px, 60vw); padding: .6rem 1rem; border-radius: 16px; font-size: .74rem; color: var(--text-secondary); }
.map-legend > span { display: inline-flex; align-items: center; gap: .45rem; }
.lg-star { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lg-star.t1 { background: #fff; box-shadow: 0 0 10px 2px rgba(255,255,255,.7); }
.lg-star.t2 { background: #8cc4ff; box-shadow: 0 0 8px rgba(41,151,255,.8); }
.lg-star.t3 { background: #6e6e73; }
.lg-size i { display: inline-block; border-radius: 50%; background: rgba(255,255,255,.55); }
.lg-size i:nth-child(1) { width: 4px; height: 4px; } .lg-size i:nth-child(2) { width: 7px; height: 7px; } .lg-size i:nth-child(3) { width: 10px; height: 10px; }
.lg-hint { color: var(--text-tertiary); }

.map-jump { position: absolute; z-index: 5; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; gap: .25rem; padding: .3rem; border-radius: 999px; max-width: calc(100vw - 32px); overflow-x: auto; scrollbar-width: none; transition: transform .5s var(--ease); }
.map-jump::-webkit-scrollbar { display: none; }
.jump-pill { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: .8rem; padding: .55rem .95rem; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, transform .18s var(--ease); }
.jump-pill:hover { color: #fff; background: rgba(255,255,255,.07); }
.jump-pill.active { color: #000; background: #fff; }
.jump-pill:active { transform: scale(.95); }

.map-hover { position: absolute; z-index: 7; left: 0; top: 0; max-width: 300px; border-radius: 16px; padding: .8rem .95rem; pointer-events: none; opacity: 0; transition: opacity .15s; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.map-hover.show { opacity: 1; }
.mh-kicker { display: flex; align-items: center; gap: .45rem; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: .35rem; }
.mh-title { font-size: .98rem; font-weight: 600; color: #fff; letter-spacing: -.01em; line-height: 1.3; }
.mh-meta { font-size: .78rem; color: var(--text-secondary); margin-top: .3rem; }
.mh-hint { font-size: .74rem; color: var(--accent); margin-top: .45rem; }

.map-inspector { position: absolute; z-index: 8; top: 76px; right: 16px; bottom: 16px; width: min(420px, 34vw); border-radius: 26px; transform: translateX(calc(100% + 32px)); transition: transform .55s var(--ease); display: flex; flex-direction: column; box-shadow: 0 40px 80px rgba(0,0,0,.6); background: rgba(12,12,16,.78); }
.map-inspector.open { transform: none; }
.inspecting .map-controls { right: calc(min(420px, 34vw) + 40px); }
.inspecting .map-hud-top { right: calc(min(420px, 34vw) + 40px); }
.insp-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.05); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; z-index: 2; transition: background .2s, transform .18s var(--ease); }
.insp-close:hover { background: rgba(255,255,255,.12); }
.insp-close:active { transform: scale(.92); }
.insp-body { overflow-y: auto; padding: 1.6rem 1.5rem 1.5rem; flex: 1; overscroll-behavior: contain; }
.insp-kicker { display: flex; align-items: center; gap: .5rem; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 2.5rem .7rem 0; }
.insp-title { margin: 0 0 .8rem; font-size: 1.7rem; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; color: #fff; }
.insp-badges { margin-bottom: 1.1rem; }
.insp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.07); border-radius: 16px; overflow: hidden; margin-bottom: 1.4rem; }
.insp-stat { background: rgba(10,10,14,.85); padding: .85rem .9rem; display: flex; flex-direction: column; gap: .15rem; }
.insp-stat-val { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.insp-stat-val small { font-size: .7rem; color: var(--text-tertiary); font-weight: 400; margin-inline-start: .1rem; }
.insp-stat-lbl { font-size: .68rem; color: var(--text-tertiary); letter-spacing: .04em; }
.insp-h { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-tertiary); font-weight: 600; margin: 1.4rem 0 .65rem; display: flex; align-items: center; gap: .5rem; }
.insp-count { color: #fff; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.insp-tasks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.insp-tasks li { font-size: .86rem; color: #d1d1d6; line-height: 1.5; padding-inline-start: .9rem; position: relative; }
.insp-tasks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: var(--text-tertiary); }
.insp-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.insp-chips span { font-size: .72rem; color: var(--text-secondary); border: 1px solid rgba(255,255,255,.09); border-radius: 999px; padding: .25rem .6rem; }
.insp-links { display: flex; flex-direction: column; gap: 2px; }
.insp-link { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; color: #fff; font: inherit; font-size: .86rem; text-align: start; padding: .55rem .6rem; border-radius: 12px; cursor: pointer; transition: background .2s; }
.insp-link span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-link small { color: var(--text-tertiary); font-size: .72rem; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.insp-link:hover { background: rgba(255,255,255,.07); }
.insp-problems { display: flex; flex-direction: column; gap: .5rem; }
.insp-problem { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "id arrow" "title arrow" "meta arrow"; gap: .2rem .8rem; padding: .85rem .95rem; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.025); color: #fff; text-decoration: none !important; transition: border-color .2s, background .2s, transform .3s var(--spring); }
.insp-problem:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.05); transform: translateX(2px); }
.insp-pid { grid-area: id; font-size: .68rem; color: var(--text-tertiary); }
.insp-ptitle { grid-area: title; font-size: .88rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.insp-pmeta { grid-area: meta; font-size: .7rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: .35rem; }
.insp-arrow { grid-area: arrow; align-self: center; color: var(--accent); }
.insp-loading { display: flex; align-items: center; gap: .6rem; color: var(--text-secondary); font-size: .84rem; padding: .6rem 0; }
.insp-empty { color: var(--text-secondary); font-size: .85rem; margin: 0; }
.insp-cta { margin-top: 1.3rem; width: 100%; justify-content: center; display: inline-flex; text-decoration: none !important; }

@media (max-width: 780px) {
  .map-hud-top { top: 70px; left: 12px; right: 12px; flex-direction: column; gap: .6rem; }
  .map-heading .section-kicker { display: none; }
  .map-h1 { font-size: 1.25rem; }
  .map-toolbar { width: 100%; }
  .map-search { flex: 1; width: auto; }
  .map-kbd { display: none; }
  .map-filter-btn span[data-ui] { display: none; }
  .map-filter-btn { padding: 0 .9rem; }
  .map-filter-pop { width: min(300px, calc(100vw - 24px)); }
  .map-legend { display: none; }
  .map-controls { right: 12px; bottom: 84px; }
  .map-controls button { width: 42px; height: 40px; }
  #map-full { display: none; }
  .map-jump { bottom: max(14px, env(safe-area-inset-bottom)); }
  .map-inspector { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 56vh; border-radius: 24px; transform: translateY(calc(100% + 24px)); }
  .map-inspector.open { transform: none; }
  .inspecting .map-controls, .inspecting .map-hud-top { right: 12px; }
  .inspecting .map-jump { transform: translate(-50%, 160%); }
  .inspecting .map-controls { bottom: calc(56vh + 20px); }
  .insp-body { padding: 1.3rem 1.2rem; }
  .insp-title { font-size: 1.4rem; }
  .map-hover { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
  .map-inspector, .map-controls, .map-jump { transition: none; }
}

/* ==== Full-page cosmos (home) ==== */
.cosmos { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: #000;
  --cosmos-reveal: 0; --cosmos-shift: 0px; contain: strict; }
.cosmos picture, .cosmos-photo { position: absolute; inset: -4% 0; width: 100%; height: 108%; display: block; }
.cosmos-photo { object-fit: cover; object-position: 50% 45%;
  opacity: calc(0.12 + 0.88 * var(--cosmos-reveal));
  transform: translate3d(0, var(--cosmos-shift), 0) scale(1.02); will-change: transform, opacity;
  backface-visibility: hidden; }
.cosmos.is-ready .cosmos-photo { transition: opacity .25s linear; }
.cosmos-stars { position: absolute; inset: 0; opacity: calc(0.35 + 0.45 * var(--cosmos-reveal));
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 68% 32%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 74%, rgba(255,214,224,.85), transparent 60%),
    radial-gradient(1px 1px at 86% 82%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 24% 52%, rgba(255,255,255,.6), transparent 60%);
  background-size: 260px 260px, 340px 340px, 420px 420px, 300px 300px, 380px 380px;
  animation: cosmos-twinkle 7s ease-in-out infinite alternate; }
@keyframes cosmos-twinkle { from { filter: brightness(.7); } to { filter: brightness(1.25); } }
.cosmos-veil { position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 75% 60% at 50% 48%, rgba(0,0,0,.42), rgba(0,0,0,.18) 70%, rgba(0,0,0,.05) 100%),
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.12) 30%, rgba(0,0,0,.2) 70%, rgba(0,0,0,.6) 100%); }
@media (prefers-reduced-motion: reduce) {
  .cosmos-stars { animation: none; }
  .cosmos-photo { transform: none; transition: none !important; }
}
/* Hero: ridge stays framed, its dark foreground melts into the cosmos */
body.page-home { background: transparent; }
body.page-home .hero-shade { background:
    radial-gradient(ellipse 62% 48% at 50% 50%, rgba(0,0,0,0.62), rgba(0,0,0,0.25) 60%, transparent 80%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 22%, rgba(0,0,0,0.05) 80%, rgba(3,3,5,0.7) 94%, #030305 100%); }
/* the ridge's dark ground continues below the hero, then dissolves into space */
body.page-home .stats-wrap { position: relative; }
body.page-home .stats-wrap::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: clamp(320px, 42vh, 440px);
  z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #030305 0%, rgba(3,3,5,.92) 18%, rgba(3,3,5,.6) 48%, rgba(3,3,5,.22) 75%, transparent 100%); }
body.page-home main, body.page-home .home-section, body.page-home .stats-wrap { background: transparent; }
/* Frosted glass surfaces */
body.page-home .stats-strip, body.page-home .swarm-card, body.page-home .card, body.page-home .explore-card {
  background: linear-gradient(180deg, rgba(22,20,26,.62), rgba(10,10,14,.58));
  border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 18px 50px -24px rgba(0,0,0,.8); }
body.page-home .stats-strip { border-radius: 22px; padding: 1.5rem 1.25rem; border-top: 1px solid rgba(255,255,255,.12) !important; border-bottom: 1px solid rgba(255,255,255,.12) !important; }
body.page-home .swarm-card { background: linear-gradient(135deg, rgba(41,151,255,.16) 0%, rgba(20,16,30,.62) 50%, rgba(10,10,14,.6) 100%); border-color: rgba(41,151,255,.34); }
body.page-home .card:hover, body.page-home .explore-card:hover { border-color: rgba(255,255,255,.24);
  background: linear-gradient(180deg, rgba(30,27,36,.7), rgba(14,13,18,.66)); }
body.page-home .stat-label, body.page-home .card p, body.page-home .home-sub { color: #c7c7cc; }
body.page-home .home-title, body.page-home .section-kicker, body.page-home .home-sub { text-shadow: 0 1px 2px rgba(0,0,0,.8), 0 0 24px rgba(0,0,0,.75); }
body.page-home .site-footer { background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.78));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top-color: rgba(255,255,255,.1); margin-top: 3rem; }
@media (max-width: 780px) {
  body.page-home .stats-strip, body.page-home .swarm-card, body.page-home .card, body.page-home .explore-card {
    -webkit-backdrop-filter: blur(12px) saturate(130%); backdrop-filter: blur(12px) saturate(130%); }
  body.page-home .stats-strip { margin: 0 .25rem; }
}

/* ---- Agent box (problem modal) ---- */
.agent-box { padding: 1.1rem 1.15rem 1rem; }
.agent-meta { display: flex; flex-wrap: wrap; gap: .45rem .9rem; margin: .55rem 0 .9rem; font-size: .74rem; }
.agent-meta div { display: flex; gap: .4rem; align-items: baseline; }
.agent-meta span { color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; }
.agent-meta code { font-family: var(--mono); color: #f2f2f7; }
.agent-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.agent-step { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(0,0,0,.35); overflow: hidden; }
.agent-step-head { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem .1rem .7rem; font-size: .76rem; color: #e5e5ea; font-weight: 600; }
.agent-step-num { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .66rem; background: rgba(41,151,255,.18); color: #8cc8ff; flex: none; }
.agent-copy { margin-inline-start: auto; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #e5e5ea; font: inherit; font-size: .68rem; font-weight: 500; padding: .22rem .6rem; border-radius: 999px; cursor: pointer; }
.agent-copy:hover { background: rgba(255,255,255,.12); color: #fff; }
.agent-cmd { direction: ltr; text-align: left; margin: 0; padding: .35rem .75rem .6rem; font-family: var(--mono); font-size: .74rem; line-height: 1.5; color: #d1d1d6; white-space: pre-wrap; word-break: normal; overflow-wrap: break-word; }
.agent-cmd .cli-prompt { color: #30d158; user-select: none; }
.agent-note { margin: .75rem 0 0; font-size: .74rem; color: var(--text-secondary); line-height: 1.5; }

.flow-box { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; background: linear-gradient(180deg, rgba(41,151,255,.06), rgba(255,255,255,.015)); }
.flow-title { margin: .3rem 0 1.1rem; font-size: clamp(1.3rem, 2.4vw, 1.7rem); letter-spacing: -.02em; color: #fff; }
.flow-steps { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.flow-steps li { border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: .9rem; background: rgba(0,0,0,.3); }
.flow-steps strong { display: block; color: #fff; font-size: .86rem; margin: .45rem 0 .25rem; font-family: var(--mono); }
.flow-steps p { margin: 0; font-size: .78rem; color: var(--text-secondary); line-height: 1.5; }
.flow-num { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; background: rgba(41,151,255,.18); color: #8cc8ff; }
.flow-cmd { border-radius: 12px; background: #050506; border: 1px solid rgba(255,255,255,.08); padding: .9rem 1rem; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 780px) { .flow-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .flow-steps { grid-template-columns: 1fr; } }

/* ---- Leaderboard v2: progress + avatars ---- */
.lb-progress { border: 1px solid var(--border); border-radius: 20px; padding: 1.25rem 1.4rem 1.1rem; margin: 0 0 2rem; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); }
.lb-progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; }
.lb-progress-total { font-size: .8rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.lb-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); }
.lb-bar .seg { display: block; height: 100%; transition: width .8s var(--ease); }
.seg-solved { background: #30d158; }
.seg-prog { background: linear-gradient(90deg, #ff9f0a, #ffd60a); }
.seg-open { background: rgba(255,255,255,.22); }
.lb-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .85rem; font-size: .84rem; color: var(--text-secondary); align-items: center; }
.lb-legend strong { color: #fff; font-variant-numeric: tabular-nums; }
.lb-legend em { font-style: normal; color: var(--text-tertiary); margin-inline-start: .2rem; font-variant-numeric: tabular-nums; }
.lb-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: .4rem; vertical-align: middle; }
.lb-legend-sub { margin-inline-start: auto; font-size: .76rem; color: var(--text-tertiary); }
.lb-progress-note { margin: .7rem 0 0; font-size: .74rem; color: var(--text-tertiary); line-height: 1.5; }
.lb-avatar { position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: linear-gradient(135deg, #2c2c34, #15151a); border: 1px solid rgba(255,255,255,.14); }
.lb-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-initials { font-size: calc(var(--s) * .36); font-weight: 600; color: #e5e5ea; letter-spacing: .02em; }
.podium-card .lb-avatar { margin: .2rem auto .6rem; }
.podium-sub { display: block; font-size: .74rem; color: var(--text-tertiary); margin: .15rem 0 .45rem; font-family: var(--mono); }
.lb-who { display: flex; align-items: center; gap: .75rem; }
.lb-rich .lb-sub { font-family: var(--mono); font-size: .74rem; }
.lb-row.is-ref { opacity: .78; }
.lb-empty { margin: 1rem 0 0; font-size: .84rem; color: var(--text-secondary); }
.lb-empty code { font-family: var(--mono); font-size: .78rem; color: #d1d1d6; }
@media (max-width: 780px) { .lb-legend-sub { margin-inline-start: 0; width: 100%; } }

/* ---- Formal verification · Lean 4 ---- */
.lean-box { border: 1px solid rgba(94, 92, 230, .38); border-radius: 16px; padding: 1.15rem 1.3rem; margin-bottom: 1.3rem; background: linear-gradient(180deg, rgba(94, 92, 230, .10), rgba(255, 255, 255, .015)); }
.lean-head { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: .85rem; }
.lean-logo { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #5e5ce6, #2997ff); }
.lean-lbl { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #c7c6ff; margin-bottom: .2rem; }
.lean-sub { font-size: .84rem; color: var(--text-secondary); line-height: 1.5; }
.lean-sub code, .lean-how code, .lean-box code { font-family: var(--mono); font-size: .78em; color: #e5e5ea; background: rgba(255,255,255,.06); padding: .05rem .3rem; border-radius: 5px; }
.lean-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .55rem; }
.lean-item { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: .7rem .85rem; background: rgba(0,0,0,.28); }
.lean-item-top { display: flex; flex-wrap: wrap; gap: .4rem .5rem; align-items: center; }
.lean-name { color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; border-bottom: 1px solid rgba(140, 200, 255, .35); }
.lean-name:hover { color: #8cc8ff; }
.lean-chip { font-size: .66rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: var(--text-secondary); white-space: nowrap; }
.lean-established { color: #30d158; border-color: rgba(48,209,88,.4); }
.lean-active { color: #64d2ff; border-color: rgba(100,210,255,.4); }
.lean-pilot, .lean-statement, .lean-map { color: #ffd60a; border-color: rgba(255,214,10,.38); }
.lean-emerging { color: #ff9f0a; border-color: rgba(255,159,10,.38); }
.lean-archival { color: #8e8e93; }
.lean-scope { margin: .35rem 0 .25rem; font-size: .82rem; color: #d1d1d6; line-height: 1.5; }
.lean-meta { font-size: .74rem; color: var(--text-tertiary); line-height: 1.45; }
.lean-note, .lean-tools { font-size: .8rem; color: var(--text-secondary); margin: .2rem 0 .7rem; line-height: 1.5; }
.lean-tools strong { color: #e5e5ea; font-weight: 600; }
.lean-quick { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: #050506; padding: .6rem .8rem; margin-bottom: .7rem; }
.lean-quick-head { display: flex; justify-content: space-between; align-items: center; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: .35rem; }
.lean-quick .agent-cmd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.lean-credits { margin: 0; font-size: .74rem; color: var(--text-tertiary); line-height: 1.5; }
.lean-credits a, .lean-how-p a { color: #8cc8ff; }
.lean-how-p { font-size: .9rem; color: var(--text-secondary); line-height: 1.6; margin: 0 0 1rem; max-width: 70ch; }
.lean-how-p strong { color: #fff; }
.lean-rules { margin: 0 0 1rem; padding-inline-start: 1.1rem; font-size: .84rem; color: #d1d1d6; line-height: 1.65; }
.lean-eco { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: 0 0 1.1rem; }
.lean-eco-col { border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: .85rem .95rem; background: rgba(0,0,0,.3); }
.lean-eco-col h3 { margin: 0 0 .5rem; font-size: .82rem; letter-spacing: .02em; color: #fff; }
.lean-eco-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.lean-eco-col li { font-size: .8rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.lean-eco-col a { color: #d1d1d6; text-decoration: none; }
.lean-eco-col a:hover { color: #8cc8ff; }

/* In-silico verification (RDKit / BioPython) */
.insilico-box { border-color: rgba(48, 209, 88, .36); background: linear-gradient(180deg, rgba(48, 209, 88, .09), rgba(255, 255, 255, .015)); }
.insilico-logo { background: linear-gradient(135deg, #30d158, #0a84ff); font-size: 1.3rem; }
.insilico-box .lean-scope strong, .insilico-box .lean-meta strong { color: #e5e5ea; font-weight: 600; }
.insilico-honest { border-left: 2px solid rgba(48, 209, 88, .55); padding-left: .7rem; }
.insilico-how .lean-eco-col li { display: block; font-size: .8rem; line-height: 1.45; color: var(--text-secondary); }
.insilico-how .lean-eco-col li strong { color: #ff8a80; font-weight: 600; }
.insilico-formats { margin: .1rem 0 .45rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.insilico-formats code { font-family: var(--mono); font-size: .72rem; color: #e5e5ea; background: rgba(255,255,255,.06); padding: .05rem .3rem; border-radius: 5px; }

/* ---- Live Activity Feed (homepage + leaderboard) ---- */
.live-feed-banner {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}
.live-feed--page { margin: 0 0 2.6rem; }
.live-feed-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.35rem 1.5rem 1.25rem;
}
.live-feed-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 160px at 0% 0%, rgba(48, 209, 88, 0.08), transparent 70%);
}
.live-feed-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  pointer-events: none;
}
.live-home-title {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #fff;
  position: relative;
}
.live-page-intro { margin: 0 0 1rem; position: relative; }
.live-page-title {
  margin: 0 0 .4rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  color: #fff;
}
.live-page-intro p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .92rem;
  max-width: 620px;
}
.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 1.05rem;
}
.live-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #d4d4d8;
}
.live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(48, 209, 88, .18);
  animation: livepulse 2.4s ease-in-out infinite;
  flex: none;
}
.live-head-actions {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}
.live-updated {
  font-size: .72rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.live-refresh { padding: .32rem .85rem !important; font-size: .74rem !important; }
.live-counters {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) minmax(12rem, 1.6fr) minmax(6rem, 1fr);
  gap: .75rem 1rem;
  position: relative;
  margin-bottom: 1.1rem;
  padding: .85rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.live-counter { text-align: center; position: relative; min-width: 0; }
.live-counter + .live-counter::before {
  content: "";
  position: absolute;
  inset-inline-start: -0.5rem;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--border);
}
.live-counter-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -.04em;
  color: #fff;
  line-height: 1.15;
}
.live-counter-verifiers {
  font-size: clamp(.84rem, 1.6vw, 1.05rem);
  letter-spacing: -.01em;
  font-weight: 600;
  padding-top: .25rem;
  color: #f5f5f7;
}
.live-slash { color: var(--text-tertiary); font-weight: 400; }
.live-counter-lbl {
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: .35rem;
}
.live-counter-sub {
  font-size: .7rem;
  color: var(--text-secondary);
  margin-top: .15rem;
  letter-spacing: 0;
  text-transform: none;
}
.live-list { display: grid; gap: .4rem; position: relative; }
.live-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem .85rem;
  align-items: start;
  padding: .7rem .75rem;
  border-radius: 14px;
  text-decoration: none !important;
  color: inherit;
  border: 1px solid transparent;
  transition: background-color .18s ease, border-color .18s ease;
}
.live-item:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
.live-item-link { color: #fff !important; text-decoration: none !important; }
.live-item-link:hover { color: #fff !important; text-decoration: underline !important; }
.live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .15rem;
  padding: .16rem .5rem;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.live-badge-open { color: #7cc4ff; background: rgba(41,151,255,.12); border-color: rgba(41,151,255,.28); }
.live-badge-checking { color: #ffd60a; background: rgba(255,159,10,.12); border-color: rgba(255,159,10,.32); }
.live-badge-merged { color: #30d158; background: rgba(48,209,88,.12); border-color: rgba(48,209,88,.28); }
.live-badge-closed, .live-badge-idle { color: #a1a1a6; background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.live-badge-failed { color: #ff6961; background: rgba(255,69,58,.12); border-color: rgba(255,69,58,.3); }
.live-item-body { display: grid; gap: .2rem; min-width: 0; }
.live-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .55rem;
  color: #fff;
  font-size: .9rem;
  font-weight: 550;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.live-pid {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #9ec4ff !important;
  background: rgba(41,151,255,.12);
  border: 1px solid rgba(41,151,255,.22);
  border-radius: 6px;
  padding: .05rem .35rem;
  text-decoration: none !important;
  pointer-events: auto;
}
.live-pid:hover { background: rgba(41,151,255,.22); }
.live-item-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  font-size: .75rem;
  color: var(--text-secondary);
}
.live-avatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.08); }
.live-handle { color: #e5e5ea; font-weight: 500; }
.live-dot-sep { color: var(--text-tertiary); }
.live-pr-num { color: var(--text-tertiary) !important; font-variant-numeric: tabular-nums; margin-inline-start: .15rem; text-decoration: none !important; }
.live-pr-num:hover { color: #fff !important; }
.live-empty {
  position: relative;
  text-align: center;
  padding: .9rem .5rem 1rem;
}
.live-empty p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: .95rem;
}
.live-empty-actions { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.live-curl {
  margin-top: .8rem;
  font-size: .78rem;
}
.live-curl code {
  font-family: var(--mono);
  color: #f5f5f7;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: .28rem .55rem;
}
.live-ci {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .8rem;
  margin-top: .95rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .8rem;
}
.live-ci-lbl {
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
}
.live-ci-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .6rem;
  color: inherit;
  text-decoration: none !important;
}
.live-ci-link:hover .live-ci-name { color: #fff; }
.live-ci-name { color: #e5e5ea; font-weight: 500; }
.live-ci time { color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.live-note {
  position: relative;
  margin: .75rem 0 0;
  font-size: .74rem;
  color: var(--text-tertiary);
}
.live-feed[aria-busy="true"] .live-refresh { opacity: .55; pointer-events: none; }

body.page-home .live-feed-card {
  background: linear-gradient(180deg, rgba(22,20,26,.62), rgba(10,10,14,.58));
  border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 18px 50px -24px rgba(0,0,0,.8);
}

@media (max-width: 780px) {
  .live-counters { grid-template-columns: 1fr 1fr; }
  .live-counter:nth-child(3) { grid-column: 1 / -1; }
  .live-counter:nth-child(3)::before { display: none; }
  .live-item { grid-template-columns: 1fr; gap: .4rem; }
  .live-badge { margin-top: 0; width: fit-content; }
  body.page-home .live-feed-card {
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    backdrop-filter: blur(12px) saturate(130%);
  }
  .live-feed-banner { padding: 0 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .live-pulse { animation: none; }
}

/* ---------- Per-problem "Live · Active PR" badge + modal banner ---------- */
.pr-live-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  color: #30d158;
  background: rgba(48, 209, 88, .12);
  border: 1px solid rgba(48, 209, 88, .34);
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.pr-live-badge:hover, .pr-live-badge:focus-visible { background: rgba(48, 209, 88, .2); border-color: rgba(48, 209, 88, .6); }
.pr-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 3px rgba(48, 209, 88, .18);
  animation: livepulse 2s ease-in-out infinite;
  flex: none;
}
.card.has-live-pr { border-color: rgba(48, 209, 88, .32); box-shadow: 0 0 0 1px rgba(48, 209, 88, .12), 0 8px 28px -14px rgba(48, 209, 88, .35); }
.pr-live-banner {
  margin: 0 0 1.1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(48, 209, 88, .12), rgba(48, 209, 88, .04));
  border: 1px solid rgba(48, 209, 88, .32);
}
.pr-live-banner-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .86rem; }
.pr-live-banner-head strong { color: #30d158; font-weight: 700; }
.pr-live-banner-title { color: var(--text, #f5f5f7); }
.pr-live-banner-sub { margin: .35rem 0 .55rem; font-size: .78rem; color: #a1a1a6; line-height: 1.45; }
.pr-live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pr-live-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem;
  padding: .45rem .6rem; border-radius: 10px;
  background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .06);
  color: inherit; text-decoration: none; font-size: .8rem;
}
.pr-live-list a:hover, .pr-live-list a:focus-visible { border-color: rgba(48, 209, 88, .45); }
.pr-live-num { color: #30d158; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-live-ttl { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.pr-live-meta { color: #a1a1a6; font-size: .72rem; }
@media (max-width: 640px) {
  .pr-live-badge { font-size: .64rem; padding: .18rem .5rem; }
  .pr-live-banner { padding: .75rem .8rem; }
}
@media (prefers-reduced-motion: reduce) { .pr-live-dot { animation: none; } }

/* ---- Precision gauges (live activity + catalog stats) ---- */
:root {
  --rose: #ff6b81;
  --rose-deep: #ff453a;
}
.us-gauges,
.live-gauges,
.stats-strip--gauges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .35rem .5rem;
  align-items: start;
}
.live-gauges {
  position: relative;
  margin-bottom: 1.1rem;
  padding: .35rem 0 .95rem;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.stats-strip--gauges {
  gap: .4rem .6rem;
  padding: 1.15rem .6rem 1.05rem !important;
}
.stats-strip--gauges .stat-item,
.stats-strip--gauges .stat-item + .stat-item::before { display: none; }
.us-gauge {
  --p: 0;
  --arc-len: 348.54;
  position: relative;
  min-width: 0;
  text-align: center;
  padding: .15rem .1rem .2rem;
  border-radius: 18px;
  transition: transform .45s var(--spring, cubic-bezier(.34, 1.4, .64, 1)), background-color .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.us-gauge:hover, .us-gauge:focus-visible {
  background: rgba(255,255,255,.03);
  transform: translateY(-2px);
}
.us-gauge-dial { position: relative; width: 100%; max-width: 200px; margin: 0 auto; }
.us-gauge-svg { display: block; width: 100%; height: auto; overflow: visible; }
.us-gauge-track {
  stroke: rgba(255,255,255,.12);
  stroke-width: 5.2;
  stroke-linecap: round;
  transition: stroke .3s ease, stroke-width .35s var(--ease);
}
.us-gauge-fill {
  stroke-width: 5.6;
  stroke-linecap: round;
  stroke-dasharray: var(--arc-len);
  stroke-dashoffset: calc(var(--arc-len) * (1 - var(--p, 0)));
  transition: stroke-dashoffset 1.15s var(--spring, cubic-bezier(.34, 1.4, .64, 1)), stroke-width .35s var(--ease);
}
.us-gauge-fill.us-gauge-glow {
  stroke-width: 8.5;
  opacity: .38;
}
.us-gauge-sheen {
  stroke: rgba(255,255,255,.72);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 10 40;
  stroke-dashoffset: 0;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.35));
}
.us-gauge.is-on .us-gauge-sheen { opacity: .85; animation: us-gauge-sheen 2.7s linear 1.05s infinite; }
.us-gauge-spark-path { stroke: none; fill: none; }
.us-gauge-tick {
  stroke: rgba(255,255,255,.22);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: .55;
  transform-origin: 100px 108px;
  transition: opacity .3s ease, stroke .3s ease, stroke-width .3s ease;
}
.us-gauge-tick.is-major { stroke: rgba(255,255,255,.48); stroke-width: 1.35; opacity: .85; }
.us-gauge:hover .us-gauge-tick, .us-gauge:focus-visible .us-gauge-tick { opacity: .9; }
.us-gauge:hover .us-gauge-tick.is-major, .us-gauge:focus-visible .us-gauge-tick.is-major { stroke-width: 1.6; opacity: 1; }
.us-gauge:hover .us-gauge-fill, .us-gauge:focus-visible .us-gauge-fill { stroke-width: 6.6; }
.us-gauge:hover .us-gauge-fill.us-gauge-glow, .us-gauge:focus-visible .us-gauge-fill.us-gauge-glow { stroke-width: 10; opacity: .5; }
.us-gauge:hover .us-gauge-track, .us-gauge:focus-visible .us-gauge-track { stroke-width: 4.4; stroke: rgba(255,255,255,.18); }
.us-gauge-readout {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: 72%;
  pointer-events: none;
}
.us-gauge-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(1.15rem, 2.3vw, 1.7rem);
  letter-spacing: -.045em;
  color: #fff;
  line-height: 1;
}
.stats-strip--gauges .us-gauge-num { font-size: clamp(1.2rem, 2.6vw, 1.85rem); }
.us-gauge-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-top: -.15rem;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  line-height: 1.25;
}
.us-gauge-sub {
  margin-top: .2rem;
  font-size: .68rem;
  line-height: 1.35;
  color: var(--text-secondary);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  max-width: 16rem;
  margin-left: auto;
  margin-right: auto;
}
.us-gauge-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(48, 209, 88, .18);
  animation: livepulse 2.4s ease-in-out infinite;
  flex: none;
}
/* Tones: emerald live, rose/crimson galaxy, silver monochrome */
.us-gauge[data-tone="live"] .us-g-a { stop-color: #7dffb3; }
.us-gauge[data-tone="live"] .us-g-b { stop-color: #30d158; }
.us-gauge[data-tone="rose"] .us-g-a { stop-color: #ffd0d6; }
.us-gauge[data-tone="rose"] .us-g-b { stop-color: #ff453a; }
.us-gauge[data-tone="crimson"] .us-g-a { stop-color: #ffb4a8; }
.us-gauge[data-tone="crimson"] .us-g-b { stop-color: #ff2d55; }
.us-gauge[data-tone="silver"] .us-g-a { stop-color: #ffffff; }
.us-gauge[data-tone="silver"] .us-g-b { stop-color: #c7c7cc; }
.us-gauge[data-tone="live"] .us-gauge-tick.is-major { stroke: rgba(48, 209, 88, .7); }
.us-gauge[data-tone="rose"] .us-gauge-tick.is-major,
.us-gauge[data-tone="crimson"] .us-gauge-tick.is-major { stroke: rgba(255, 107, 129, .7); }
@keyframes us-gauge-sheen {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -50; }
}

/* Harmonized live badge: a tiny precision ring around the pulse */
.pr-live-meter {
  position: relative;
  width: 14px; height: 14px;
  display: inline-grid; place-items: center;
  flex: none;
}
.pr-live-meter svg { position: absolute; inset: 0; width: 14px; height: 14px; }
.pr-live-meter-track { fill: none; stroke: rgba(48, 209, 88, .28); stroke-width: 1.4; }
.pr-live-meter-fill {
  fill: none;
  stroke: #30d158;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 18 28;
  transform-origin: 8px 8px;
  animation: pr-live-sweep 2.8s linear infinite;
}
.pr-live-badge .pr-live-dot, .pr-live-banner .pr-live-dot { position: relative; z-index: 1; }
.pr-live-meter .pr-live-dot { width: 6px; height: 6px; }

@media (max-width: 780px) {
  .live-gauges, .stats-strip--gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem .25rem; }
  .stats-strip--gauges { padding: .85rem .35rem .7rem !important; }
  .us-gauge { padding: .05rem 0 .15rem; }
  .us-gauge-num { font-size: clamp(1.2rem, 6vw, 1.55rem); }
  .us-gauge-label { font-size: .6rem; letter-spacing: .1em; }
  .us-gauge-sub { font-size: .64rem; }
  .live-feed-card:has(.live-gauges) .live-counters { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .us-gauge, .us-gauge-fill, .us-gauge-track, .us-gauge-tick { transition: none; }
  .us-gauge:hover, .us-gauge:focus-visible { transform: none; }
  .us-gauge-live, .pr-live-meter-fill { animation: none; }
  .us-gauge.is-on .us-gauge-sheen { animation: none; opacity: .35; }
}
@keyframes pr-live-sweep { to { transform: rotate(360deg); } }

.live-feed-card:has(.live-gauges) .live-counters { display: none !important; }
