/* ═══════════════════════════════════════════════════════════════════
   MoneroUSD Live TPS Benchmark — visual system
   Monero orange (#FF6600) on deep black, glass + glow, 60fps motion.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --bg:            #060606;
  --bg-2:          #0c0c0e;
  --surface:       rgba(255,255,255,0.035);
  --surface-2:     rgba(255,255,255,0.06);
  --border:        rgba(255,255,255,0.08);
  --border-bright: rgba(255,102,0,0.35);

  --accent:        #FF6600;
  --accent-2:      #FF8533;
  --accent-3:      #FFB066;
  --accent-deep:   #E63a00;
  --accent-soft:   rgba(255,102,0,0.12);

  --text:          #f6f6f7;
  --text-2:        #b6b6bd;
  --text-3:        #76767e;

  --ok:            #22c55e;

  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  --ui:   'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.grad {
  background: linear-gradient(100deg, var(--accent-3), var(--accent) 55%, var(--accent-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── ambient background ─────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 46px 46px,
    radial-gradient(ellipse 80% 50% at 50% -10%, #15100a 0%, var(--bg) 60%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; top: -20%; left: 50%; transform: translateX(-50%);
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(255,102,0,0.16) 0%, rgba(255,102,0,0.04) 35%, transparent 65%);
  filter: blur(20px); pointer-events: none;
  animation: glowdrift 14s ease-in-out infinite alternate;
}
@keyframes glowdrift { from { opacity:.7; transform: translateX(-50%) scale(1);} to { opacity:1; transform: translateX(-50%) scale(1.12);} }

/* ── header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(6,6,6,0.6);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.brand-text { font-weight: 700; letter-spacing: .2px; font-size: 16px; }
.brand-sub { color: var(--accent); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 14px; }
.net-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--accent-3);
  background: var(--accent-soft); border: 1px solid var(--border-bright);
  padding: 5px 11px; border-radius: var(--r-pill);
}
.net-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1.8s ease-in-out infinite; }
.header-link { font-size: 13px; color: var(--text-2); font-weight: 500; }
.header-link:hover { color: var(--accent); }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:.35;} }

main { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 80px; }

/* ── hero ───────────────────────────────────────────────────────── */
.hero { text-align: center; padding: clamp(40px, 7vw, 84px) 0 18px; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px;
  color: var(--accent); opacity: .85; margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(34px, 6vw, 64px); line-height: 1.04; font-weight: 800;
  letter-spacing: -1.5px; margin: 0 0 18px;
}
.hero-sub {
  max-width: 660px; margin: 0 auto; color: var(--text-2);
  font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

/* ── the gauge ──────────────────────────────────────────────────── */
.gauge-stage { display: flex; flex-direction: column; align-items: center; padding: 24px 0 8px; }
.gauge-wrap {
  position: relative; width: min(440px, 86vw); aspect-ratio: 1;
  display: grid; place-items: center;
}
.gauge-aura {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,102,0,0.28), transparent 62%);
  filter: blur(26px); opacity: .55;
  transition: opacity .4s ease, transform .4s ease;
}
.gauge { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 14; }
.gauge-arc {
  fill: none; stroke-width: 14; stroke-linecap: round;
  /* circumference = 2*pi*150 ≈ 942.48 — driven frame-by-frame in app.js */
  stroke-dasharray: 942.48; stroke-dashoffset: 942.48;
}
.gauge-ticks line { stroke: rgba(255,255,255,0.12); stroke-width: 2; }
.gauge-ticks line.major { stroke: rgba(255,176,102,0.35); stroke-width: 2.5; }
.gauge-dot {
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 14px rgba(255,102,0,.6));
}
.target-marker line { stroke: #fff; stroke-width: 2.5; opacity: .55; }

.gauge-center { position: relative; z-index: 2; text-align: center; pointer-events: none; }
.tps-value {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(44px, 11vw, 84px); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -2px;
  background: linear-gradient(180deg, #fff, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(255,102,0,.25);
}
.tps-label { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-3); margin-top: 8px; }
.tps-peak { font-family: var(--mono); font-size: 12px; color: var(--accent-3); margin-top: 12px; opacity: .9; }
.solana-flag {
  margin-top: 12px; display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  color: #fff; padding: 5px 12px; border-radius: var(--r-pill);
  background: linear-gradient(100deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 22px rgba(255,102,0,.55); animation: flagpop .5s cubic-bezier(.22,1.4,.4,1);
}
@keyframes flagpop { from{ transform: scale(.6); opacity:0;} to{ transform: scale(1); opacity:1;} }

/* running state intensifies the aura */
.gauge-wrap.running .gauge-aura { opacity: .9; animation: auraPulse 1.4s ease-in-out infinite; }
@keyframes auraPulse { 0%,100%{ transform: scale(1); opacity:.6;} 50%{ transform: scale(1.07); opacity:1;} }

/* ── launch ─────────────────────────────────────────────────────── */
.launch-row { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 14px; }
.btn-launch {
  position: relative; border: none; cursor: pointer;
  font-family: var(--ui); font-size: 16px; font-weight: 700; color: #fff;
  padding: 15px 34px; border-radius: var(--r-pill);
  background: linear-gradient(100deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 30px rgba(255,102,0,.4), inset 0 1px 0 rgba(255,255,255,.25);
  overflow: hidden; transition: transform .12s ease, box-shadow .2s ease;
}
.btn-launch:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(255,102,0,.55), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-launch:active { transform: translateY(0); }
.btn-launch:disabled { cursor: default; filter: grayscale(.2) brightness(.85); transform: none; }
.btn-launch-glow {
  position: absolute; top: 0; left: -60%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg); animation: sheen 3.2s ease-in-out infinite;
}
@keyframes sheen { 0%{ left:-60%;} 55%,100%{ left:140%;} }
.btn-launch.is-running { background: linear-gradient(100deg, #3a2410, #241a10); box-shadow: 0 4px 18px rgba(0,0,0,.5); }
.run-status { font-family: var(--mono); font-size: 13px; color: var(--text-3); text-align: center; max-width: 560px; }
.run-status.err { color: #f87171; }
.run-status.ok { color: var(--accent-3); }

/* Live pill — shown in place of the launch button while the shared run is live.
   Intentionally not a button: one shared engine ⇒ no viewer-facing stop. */
.live-pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 15px; font-weight: 600; color: #fff;
  padding: 13px 26px; border-radius: var(--r-pill);
  background: linear-gradient(100deg, rgba(34,197,94,.12), rgba(255,102,0,.10));
  border: 1px solid rgba(255,102,0,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 18px rgba(0,0,0,.4);
}
.live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: livepulse 1.6s ease-out infinite;
}
@keyframes livepulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  70%  { box-shadow: 0 0 0 9px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.shared-note {
  font-family: var(--ui); font-size: 12.5px; line-height: 1.5; color: var(--text-3);
  text-align: center; max-width: 540px; margin: 10px auto 0;
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ── stat strip ─────────────────────────────────────────────────── */
.stat-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  margin-top: 52px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 20px 16px; text-align: center;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.stat-card:hover { border-color: var(--border-bright); transform: translateY(-2px); background: var(--surface-2); }
.stat-num {
  font-family: var(--mono); font-size: clamp(22px, 3vw, 30px); font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--text);
  letter-spacing: -1px;
}
.stat-cap { font-size: 11.5px; letter-spacing: .4px; color: var(--text-3); margin-top: 8px; line-height: 1.3; }

/* ── panels ─────────────────────────────────────────────────────── */
.panel {
  margin-top: 44px; padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0.015));
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.panel-head h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; letter-spacing: -.6px; margin: 0 0 8px; }
.panel-head p { color: var(--text-2); margin: 0; font-size: 15px; line-height: 1.55; }
.panel-head.row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0; }
.proof-step {
  position: relative; padding: 22px 18px 18px;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--r-md);
}
.proof-n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 14px rgba(255,102,0,.4); margin-bottom: 14px;
}
.proof-step h3 { font-size: 15.5px; margin: 0 0 8px; font-weight: 700; }
.proof-step p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0; }
.proof-step code { font-family: var(--mono); color: var(--accent-3); background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }

/* formula */
.formula {
  margin-top: 8px; padding: 26px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,102,0,0.08), transparent 70%), rgba(0,0,0,0.25);
  border: 1px solid var(--border-bright); border-radius: var(--r-md);
}
.formula-label { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.formula-body { display: inline-flex; align-items: center; gap: 16px; font-family: var(--mono); }
.f-term { color: var(--accent-3); font-size: clamp(16px, 2.4vw, 22px); font-weight: 700; }
.f-eq { color: var(--text-3); font-size: 22px; }
.f-frac { display: inline-flex; flex-direction: column; align-items: center; }
.f-top, .f-bot { font-size: clamp(13px, 1.9vw, 17px); padding: 4px 10px; color: var(--text); }
.f-mul { color: var(--accent); padding: 0 4px; }
.f-bar { width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.f-bot { color: var(--text-2); }
.formula-note { margin-top: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; max-width: 620px; margin-left: auto; margin-right: auto; }
.formula-note strong { color: var(--accent-3); }

/* live feed */
.feed-panel .panel-head { margin-bottom: 18px; }
.feed-hint { font-size: 12.5px; color: var(--text-3); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); margin-left: 8px; animation: blink 1.2s ease-in-out infinite; vertical-align: middle; }
.feed { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.feed-empty { color: var(--text-3); font-size: 14px; text-align: center; padding: 36px 0; }
.feed-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  padding: 12px 14px; background: rgba(255,255,255,0.025); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-family: var(--mono); font-size: 13px;
  animation: rowIn .35s cubic-bezier(.22,1,.36,1);
  transition: border-color .2s ease, background .2s ease;
}
.feed-row:hover { border-color: var(--border-bright); background: var(--surface-2); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px);} to { opacity:1; transform: none;} }
.fr-block { color: var(--accent-3); font-weight: 700; }
.fr-hash { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-count { color: var(--text); }
.fr-count b { color: var(--accent); }
.fr-link { color: var(--accent); font-size: 12px; }
.fr-link:hover { text-decoration: underline; }

/* footer */
.site-footer {
  max-width: 1100px; margin: 30px auto 0; padding: 26px clamp(16px,4vw,40px) 40px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 12.5px; color: var(--text-3);
}
.site-footer a:hover { color: var(--accent); }
.foot-sep { opacity: .4; }

/* ── responsive ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .feed-row { grid-template-columns: auto 1fr auto; }
  .fr-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .12s !important; }
}

/* ═══ Cas's Formula ═══════════════════════════════════════════════ */
.cas-panel {
  text-align: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255,102,0,0.10), transparent 70%),
    linear-gradient(180deg, var(--surface), rgba(255,255,255,0.015));
  border-color: var(--border-bright);
}
.cas-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--text-3); margin-bottom: 10px; }
.cas-title { font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; letter-spacing: -.6px; margin: 0 0 26px; }
.cas-equation {
  display: inline-flex; align-items: center; justify-content: center; gap: 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  padding: 14px 0 6px;
}
.cas-T { font-size: clamp(44px, 8vw, 76px); font-weight: 700; color: var(--accent-3); text-shadow: 0 0 28px rgba(255,102,0,.4); }
.cas-eq { font-size: clamp(34px, 6vw, 56px); color: var(--text-3); }
.cas-frac { display: inline-flex; flex-direction: column; align-items: center; }
.cas-num, .cas-den { font-size: clamp(34px, 6vw, 60px); font-weight: 700; line-height: 1.1; padding: 2px 18px; }
.cas-num { color: #fff; }
.cas-den { color: var(--accent); }
.cas-bar { width: 100%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 12px rgba(255,102,0,.5); }
.cas-cond { font-size: clamp(15px, 2.4vw, 22px); color: var(--text-2); align-self: flex-end; padding-bottom: 10px; }
.cas-read { font-size: 14.5px; color: var(--text-2); margin: 6px 0 30px; }
.cas-read em { color: var(--accent-3); font-style: normal; font-weight: 700; }

.cas-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 auto 26px; max-width: 820px; text-align: left; }
.cas-term { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: rgba(255,255,255,0.025); border: 1px solid var(--border); border-radius: var(--r-md); }
.cas-sym { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--accent-3); line-height: 1; flex-shrink: 0; width: 30px; text-align: center; }
.cas-def { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.cas-def b { color: var(--text); }
.cas-def em { color: var(--accent-3); font-style: normal; }

.cas-insight {
  max-width: 760px; margin: 0 auto 30px; padding: 20px 24px; text-align: left;
  font-size: 14.5px; line-height: 1.6; color: var(--text-2);
  background: rgba(255,102,0,0.06); border: 1px solid var(--border-bright); border-radius: var(--r-md);
  position: relative;
}
.cas-insight b { color: var(--accent-3); font-weight: 700; }
.cas-insight-mark { font-family: var(--mono); font-size: 22px; color: var(--accent); font-weight: 700; margin-right: 8px; }

.cas-flow { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 22px); flex-wrap: wrap; margin-top: 8px; }
.cas-node { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 140px; }
.cas-node-cap { font-size: 12px; color: var(--text-3); }
.cas-node-cap b { color: var(--accent-3); }
.cas-dots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; width: 96px; height: 64px; place-content: center; }
.cas-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(255,102,0,.6); opacity: .85; animation: casdot 2.4s ease-in-out infinite; }
@keyframes casdot { 0%,100%{ opacity:.35;} 50%{ opacity:1;} }
.cas-arrow { font-size: 26px; color: var(--accent); opacity: .7; }
.cas-proof-badge {
  font-family: var(--mono); font-weight: 700; font-size: 16px; color: #fff;
  padding: 18px 22px; border-radius: var(--r-md);
  background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 22px rgba(255,102,0,.45); width: 96px; height: 64px; display: grid; place-content: center;
}
.cas-tau { font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--accent-3);
  width: 96px; height: 64px; display: grid; place-content: center;
  border: 1px solid var(--border-bright); border-radius: var(--r-md); background: var(--accent-soft); }

/* ═══ Privacy & Post-Quantum stack ═══════════════════════════════ */
.pq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.pq-card {
  padding: 22px 20px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.pq-card:hover { border-color: var(--border-bright); transform: translateY(-3px); background: var(--surface-2); }
.pq-card-accent { background: rgba(255,102,0,0.06); border-color: var(--border-bright); }
.pq-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-content: center; margin-bottom: 14px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border-bright); }
.pq-ic svg { width: 22px; height: 22px; }
.pq-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 9px; }
.pq-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0; }
.pq-card p em { color: var(--accent-3); font-style: normal; }
.pq-card p b { color: var(--text); }

@media (max-width: 860px) {
  .cas-legend { grid-template-columns: 1fr; }
  .pq-grid { grid-template-columns: 1fr; }
}
