/* ═══════════════════════════════════════════════════════════════════
   THE BURNING CAT — V2 stylesheet
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0503;
  --bg-2: #14090a;
  --primary: #ff4a00;        /* molten orange */
  --primary-glow: rgba(255, 74, 0, 0.55);
  --ember: #ffb84a;
  --ember-hot: #ffcc44;
  --text: #f5e6d3;
  --text-dim: #8a7060;
  --card-bg: rgba(20, 9, 10, 0.85);
  --border: rgba(255, 74, 0, 0.2);
  --success: #10b981;
  --terminal: #22d67a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
body {
  background:
    radial-gradient(ellipse at top, rgba(255, 74, 0, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at bottom, rgba(255, 74, 0, 0.06) 0%, transparent 60%),
    var(--bg);
}

/* Ambient fire background */
.fire-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 90%, rgba(255, 74, 0, 0.08), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(255, 184, 74, 0.06), transparent 45%);
}

/* ─── PIPELINE HUD ──────────────────────────────────────────────── */
.hud {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(10, 5, 3, 0.98), rgba(20, 9, 10, 0.92));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1.5rem;
}
.hud-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
}
.hud-cycle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Alfa Slab One', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}
.hud-label {
  color: var(--text-dim);
}
.hud-cycle-num {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
}
.hud-stages {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}
.hud-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 60px;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.hud-stage-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-dim);
  border: 2px solid transparent;
  transition: all 0.3s;
}
.hud-stage-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  font-weight: 700;
}
.hud-stage-line {
  width: 20px;
  height: 1px;
  background: var(--text-dim);
  opacity: 0.4;
}
.hud-stage.active {
  opacity: 1;
}
.hud-stage.active .hud-stage-dot {
  background: var(--primary);
  border-color: var(--ember);
  box-shadow: 0 0 15px var(--primary-glow), 0 0 30px var(--primary-glow);
  animation: hudPulse 1s ease-in-out infinite;
}
.hud-stage.active .hud-stage-label {
  color: var(--ember);
  text-shadow: 0 0 8px var(--primary-glow);
}
.hud-stage.complete {
  opacity: 0.85;
}
.hud-stage.complete .hud-stage-dot {
  background: var(--success);
  border-color: var(--success);
}
@keyframes hudPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.3); }
}
.hud-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.hud-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.hud-status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.hud-status-dot.active {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: hudPulse 1s ease-in-out infinite;
}

/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  overflow: hidden;
  z-index: 1;
}
.hero-cat {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: brightness(0.9) contrast(1.15);
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 5, 3, 0.35) 0%, transparent 30%, transparent 70%, rgba(10, 5, 3, 0.98) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  width: 100%;
}
.title {
  font-family: 'Alfa Slab One', serif;
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: 0.05em;
  line-height: 1;
  background:
    linear-gradient(180deg,
      #fff2cc 0%,
      #ffcc44 25%,
      #ff8a1a 55%,
      #ff4a00 80%,
      #5c1a04 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 rgba(60, 20, 4, 0.8))
          drop-shadow(0 8px 30px rgba(255, 74, 0, 0.5));
  margin-bottom: 0.5rem;
  animation: titleGlow 4s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 4px 0 rgba(60, 20, 4, 0.8)) drop-shadow(0 8px 30px rgba(255, 74, 0, 0.5)); }
  50%      { filter: drop-shadow(0 4px 0 rgba(60, 20, 4, 0.8)) drop-shadow(0 8px 45px rgba(255, 138, 26, 0.9)); }
}
.ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--ember);
  letter-spacing: 0.2em;
  margin-bottom: 1.75rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9), 0 0 20px rgba(255, 184, 74, 0.5);
}

/* CA row */
.ca-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(10, 5, 3, 0.85);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
}
.ca-label { color: var(--ember); font-weight: 700; }
.ca-value { color: var(--text); word-break: break-all; }
.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ember);
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  border-radius: 3px;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.copy-btn:hover { background: var(--primary); color: var(--bg); border-color: var(--primary); }

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.btn {
  padding: 0.9rem 1.8rem;
  font-family: 'Alfa Slab One', serif;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  border: 2px solid;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}
.btn.primary {
  background: linear-gradient(180deg, #ff8a1a 0%, #ff4a00 55%, #a3320a 100%);
  color: #1a0800;
  border-color: #ff8a1a;
  box-shadow: 0 0 25px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn.secondary {
  background: transparent;
  color: var(--ember);
  border-color: var(--primary);
}
.btn.secondary:hover {
  background: var(--primary);
  color: var(--bg);
  transform: translateY(-2px);
}
.hero-tagline {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.6;
  opacity: 0.85;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

/* ─── DASHBOARD ─────────────────────────────────────────────────── */
.dashboard {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-row {
  display: grid;
  grid-template-columns: 0.7fr 3fr 0.7fr;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.hero-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-stat .stat-label {
  font-family: 'Alfa Slab One', serif;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}
.hero-stat .stat-number.countdown {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--primary);
  text-shadow: 0 0 15px var(--primary-glow);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.hero-stat .stat-number.small {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.hero-stat .stat-sub {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-top: 0.35rem;
  word-break: break-word;
}
.hero-stat .stat-sub span { color: var(--ember); }

@media (max-width: 800px) {
  .hero-row { grid-template-columns: 1fr; }
}

.supply-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.supply-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(255, 74, 0, 0.12), transparent 60%);
  pointer-events: none;
}
.supply-label {
  font-family: 'Alfa Slab One', serif;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.supply-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 30px var(--primary-glow);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: visible;
  transition: color 0.3s;
}
.supply-number.pulse {
  animation: pulseFire 1.2s ease-out;
}
@keyframes pulseFire {
  0%   { color: #fff2cc; text-shadow: 0 0 60px #ffcc44, 0 0 90px #ff8a1a; }
  100% { color: var(--primary); text-shadow: 0 0 30px var(--primary-glow); }
}
.burned-pct {
  font-family: 'Alfa Slab One', serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: 0.12em;
  color: var(--ember);
  text-shadow:
    0 0 20px rgba(255, 184, 74, 0.6),
    0 0 40px rgba(255, 74, 0, 0.35);
  margin-top: 0.25rem;
  animation: burnedPctPulse 3s ease-in-out infinite;
}
@keyframes burnedPctPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(255, 184, 74, 0.6), 0 0 40px rgba(255, 74, 0, 0.35); }
  50%      { text-shadow: 0 0 30px rgba(255, 184, 74, 0.9), 0 0 60px rgba(255, 74, 0, 0.6); }
}

/* ─── GRADUATION GAUGE (industrial dashboard style) ─────────────── */
.graduation-wrap {
  background: linear-gradient(180deg, rgba(20, 9, 10, 0.9), rgba(10, 5, 3, 0.95));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}
.graduation-wrap.hidden { display: none; }
.graduation-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 50%, rgba(255, 74, 0, 0.08), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0, transparent 40px, rgba(255,74,0,0.02) 40px, rgba(255,74,0,0.02) 41px);
  pointer-events: none;
}
.graduation-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  position: relative;
}
.graduation-title {
  font-family: 'Alfa Slab One', serif;
  color: var(--text);
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  text-shadow: 0 0 15px var(--primary-glow);
}
.graduation-status {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ember);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.graduation-gauge {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  position: relative;
}
.gauge-info {
  min-width: 160px;
}
.gauge-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  text-shadow: 0 0 25px var(--primary-glow), 0 0 50px rgba(255, 74, 0, 0.4);
  letter-spacing: -0.03em;
}
.gauge-sub {
  margin-top: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.gauge-sub-value {
  color: var(--ember);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 184, 74, 0.5);
}

.gauge-track {
  position: relative;
  height: 40px;
}
.gauge-track::before {
  content: "";
  position: absolute;
  inset: 8px 0;
  background: linear-gradient(180deg, #0a0402 0%, #1a0b06 100%);
  border: 1px solid rgba(255, 74, 0, 0.25);
  border-radius: 4px;
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.9), inset 0 -1px 0 rgba(255, 74, 0, 0.15);
}
.gauge-fill {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: var(--therm-pct, 0%);
  background:
    linear-gradient(90deg,
      #a3320a 0%,
      #ff4a00 40%,
      #ff8a1a 75%,
      #ffcc44 95%,
      #fff2cc 100%);
  border-radius: 4px 0 0 4px;
  box-shadow:
    inset 0 0 12px rgba(255, 240, 200, 0.4),
    0 0 25px rgba(255, 74, 0, 0.6),
    0 0 50px rgba(255, 138, 26, 0.3);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}
.gauge-fire {
  position: absolute;
  right: -3px;
  top: -6px;
  bottom: -6px;
  width: 12px;
  background: radial-gradient(circle, rgba(255, 240, 200, 0.9) 0%, rgba(255, 138, 26, 0.6) 40%, transparent 80%);
  filter: blur(3px);
  animation: gaugeFireFlicker 0.15s ease-in-out infinite alternate;
}
@keyframes gaugeFireFlicker {
  0%   { transform: scaleY(1); opacity: 0.9; }
  100% { transform: scaleY(1.15); opacity: 1; }
}
.gauge-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.gauge-marks {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  right: 0;
  pointer-events: none;
}
.gauge-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 74, 0, 0.35);
  transform: translateX(-50%);
}
.gauge-tick::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -3px;
  width: 7px;
  height: 5px;
  background: rgba(255, 74, 0, 0.4);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}
.gauge-tick span {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  white-space: nowrap;
  font-weight: 700;
}
.gauge-tick.end span {
  color: var(--ember);
  text-shadow: 0 0 8px rgba(255, 184, 74, 0.5);
}

.gauge-footer {
  grid-column: 1 / -1;
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}
.gauge-label {
  color: var(--text-dim);
}
.gauge-target {
  color: var(--ember);
  text-shadow: 0 0 8px rgba(255, 184, 74, 0.4);
}

@media (max-width: 800px) {
  .graduation-gauge { grid-template-columns: 1fr; }
  .gauge-info { min-width: unset; text-align: center; }
}

/* ─── TROPHY (post-grad) ────────────────────────────────────────── */
.trophy-wrap {
  background: linear-gradient(180deg, rgba(255, 204, 68, 0.08), var(--card-bg));
  border: 1px solid var(--ember);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  margin: 2rem 0;
  text-align: center;
  display: none;
  box-shadow: 0 0 40px rgba(255, 184, 74, 0.15);
}
.trophy-wrap.visible { display: block; animation: trophyReveal 1s ease-out; }
@keyframes trophyReveal {
  0%   { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}
.trophy-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 204, 68, 0.7));
}
.trophy-title {
  font-family: 'Alfa Slab One', serif;
  font-size: 2rem;
  color: var(--ember-hot);
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px rgba(255, 184, 74, 0.8);
  margin-bottom: 0.25rem;
}
.trophy-sub {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  text-transform: uppercase;
}
.trophy-date {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ember);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ─── THE FUSE ──────────────────────────────────────────────────── */
.fuse-container {
  position: relative;
  margin: 1rem 0 1.5rem;
  padding: 1.25rem 0.5rem 1rem;
}
.fuse-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}
.fuse-title {
  font-family: 'Alfa Slab One', serif;
  color: var(--text);
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  text-shadow: 0 0 15px var(--primary-glow);
}
.fuse-subtitle {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ember);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fuse-track {
  position: relative;
  height: 75px;
  width: 100%;
}
.fuse-rope {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #1a0b06 0%, #0a0402 50%, #1a0b06 100%),
    repeating-linear-gradient(90deg,
      transparent 0, transparent 3px,
      rgba(255,74,0,0.03) 3px, rgba(255,74,0,0.03) 6px);
  border: 1px solid rgba(255, 74, 0, 0.15);
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.9),
    inset 0 -1px 0 rgba(255, 74, 0, 0.1),
    0 2px 4px rgba(0,0,0,0.5);
  overflow: hidden;
}
.fuse-rope::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--fuse-burned, 0%);
  background:
    linear-gradient(90deg,
      #0a0402 0%,
      #2a0d02 15%,
      #5c1a04 45%,
      #a3320a 75%,
      #ff6a1a 92%,
      #ffcc44 99%,
      #fff2cc 100%);
  box-shadow:
    inset 0 0 12px rgba(255, 240, 200, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 74, 0, 0.6),
    0 0 60px rgba(255, 138, 26, 0.3);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.fuse-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fuse-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}
.fuse-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.5s;
}
.fuse-marker-ring {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a0d02 25%, #0a0402 100%);
  border: 2px solid rgba(255, 74, 0, 0.35);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.9),
    0 0 0 3px rgba(0,0,0,0.5),
    0 2px 4px rgba(0,0,0,0.5);
  transition: all 0.6s;
  position: relative;
  z-index: 2;
}
.fuse-marker-label {
  position: absolute;
  bottom: -28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ember);
  letter-spacing: 0.1em;
  transition: color 0.5s;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255, 184, 74, 0.6), 0 0 16px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.9);
}
.fuse-marker-title {
  position: absolute;
  top: -28px;
  font-family: 'Alfa Slab One', serif;
  font-size: 0.7rem;
  color: var(--text);
  letter-spacing: 0.12em;
  opacity: 0.7;
  transition: all 0.5s;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.98), 0 2px 4px rgba(0, 0, 0, 0.98);
  padding: 0.15rem 0.35rem;
  background: rgba(10, 5, 3, 0.85);
  border-radius: 3px;
  border: 1px solid rgba(255, 74, 0, 0.15);
}
/* Rotate titles that would collide on the right side */
.fuse-marker[data-pct="75"] .fuse-marker-title,
.fuse-marker[data-pct="80"] .fuse-marker-title {
  transform: translateX(-40%) rotate(-25deg);
  transform-origin: right center;
  top: -32px;
}
.fuse-marker[data-pct="69"] .fuse-marker-title {
  transform: translateX(-25%) rotate(-15deg);
  transform-origin: right center;
  top: -30px;
}
.fuse-marker.hit .fuse-marker-ring {
  background: radial-gradient(circle, #ffcc44 20%, #ff4a00 60%, #5c1a04 100%);
  border-color: var(--ember);
  box-shadow:
    inset 0 0 8px #fff2cc,
    0 0 25px var(--primary),
    0 0 50px rgba(255, 74, 0, 0.6),
    0 0 0 3px rgba(255, 74, 0, 0.2);
}
.fuse-marker.hit .fuse-marker-label {
  color: #ffcc44;
  text-shadow: 0 0 12px var(--ember), 0 0 24px rgba(255, 74, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.9);
}
.fuse-marker.hit .fuse-marker-title {
  color: var(--ember-hot);
  opacity: 1;
  border-color: var(--ember);
  background: rgba(20, 9, 10, 0.95);
  text-shadow: 0 0 12px rgba(255, 204, 68, 0.7), 0 2px 4px rgba(0, 0, 0, 0.9);
}
.fuse-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.fuse-current {
  color: var(--primary);
  font-weight: 700;
  text-shadow: 0 0 6px var(--primary-glow);
}

/* ─── MILESTONE BANNER ──────────────────────────────────────────── */
.milestone-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  text-align: center;
}
.milestone-banner.show {
  animation: milestoneBannerShow 4s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  visibility: visible;
}
.milestone-banner-inner {
  padding: 3rem 5rem;
  background: radial-gradient(ellipse at center, rgba(20, 9, 10, 0.95) 0%, rgba(10, 5, 3, 0.98) 100%);
  border: 2px solid var(--primary);
  box-shadow:
    0 0 80px var(--primary-glow),
    0 0 150px rgba(255, 74, 0, 0.3),
    inset 0 0 40px rgba(255, 74, 0, 0.2);
}
.milestone-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: var(--ember);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}
.milestone-title {
  font-family: 'Alfa Slab One', serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--primary);
  letter-spacing: 0.15em;
  text-shadow: 0 0 30px var(--primary-glow), 0 0 60px rgba(255, 74, 0, 0.5), 0 0 90px rgba(255, 74, 0, 0.3);
}
@keyframes milestoneBannerShow {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  8%   { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  15%  { transform: translate(-50%, -50%) scale(1); }
  85%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); visibility: hidden; }
}

body.milestone-flash::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 74, 0, 0.35) 0%, transparent 70%);
  z-index: 9998;
  pointer-events: none;
  animation: screenFlash 1s ease-out;
}
@keyframes screenFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  100% { opacity: 0; }
}
body.milestone-shake { animation: screenShake 0.4s ease-in-out; }
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  15%      { transform: translate(-4px, 2px); }
  30%      { transform: translate(3px, -3px); }
  45%      { transform: translate(-3px, -2px); }
  60%      { transform: translate(4px, 3px); }
  75%      { transform: translate(-2px, 4px); }
}

/* ─── STAT ROW ──────────────────────────────────────────────────── */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.75rem;
  text-align: center;
}
.stat-card.mini { padding: 0.75rem; }
.stat-label {
  font-family: 'Alfa Slab One', serif;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  margin-bottom: 0.35rem;
}
.stat-number.tiny {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ember);
  text-shadow: 0 0 10px rgba(255, 184, 74, 0.4);
}

/* ─── ASH LEDGER ────────────────────────────────────────────────── */
.ledger {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.ledger-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.ledger-title {
  font-family: 'Alfa Slab One', serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--ember);
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px rgba(255, 184, 74, 0.5);
  margin-bottom: 0.5rem;
}
.ledger-sub {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.ledger-window {
  background: #030100;
  border: 1px solid rgba(34, 214, 122, 0.25);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(34, 214, 122, 0.08), inset 0 0 30px rgba(0, 0, 0, 0.6);
  max-height: 400px;
  display: flex;
  flex-direction: column;
}
.ledger-window-header {
  background: linear-gradient(180deg, #1a1613 0%, #0f0c0a 100%);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(34, 214, 122, 0.15);
}
.ledger-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.ledger-dot.red { background: #ff5f56; }
.ledger-dot.yellow { background: #ffbd2e; }
.ledger-dot.green { background: #27c93f; }
.ledger-window-title {
  margin-left: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.ledger-feed {
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--terminal);
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
}
.ledger-line {
  margin-bottom: 0.25rem;
  opacity: 0;
  animation: ledgerAppear 0.5s ease-out forwards;
  text-shadow: 0 0 6px rgba(34, 214, 122, 0.3);
}
.ledger-line.initial { color: var(--text-dim); font-style: italic; opacity: 1; }
.ledger-line .time { color: var(--text-dim); }
.ledger-line .cycle { color: var(--ember); font-weight: 700; }
.ledger-line .verb { color: #ffcc44; text-shadow: 0 0 8px rgba(255, 204, 68, 0.4); }
.ledger-line .usd { color: var(--primary); font-weight: 700; text-shadow: 0 0 6px var(--primary-glow); }
@keyframes ledgerAppear {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ─── CEREMONY (graduation full-screen) ─────────────────────────── */
.ceremony {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 3, 0.97);
  opacity: 0;
}
.ceremony.playing {
  display: flex;
  animation: ceremonyEnter 8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes ceremonyEnter {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}
.ceremony-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 138, 26, 0.85) 0%, rgba(255, 74, 0, 0.4) 40%, transparent 75%);
  animation: ceremonyFlash 2s ease-out;
}
@keyframes ceremonyFlash {
  0%   { opacity: 0; transform: scale(0.2); }
  30%  { opacity: 1; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(2); }
}
.ceremony-content {
  position: relative;
  text-align: center;
  z-index: 2;
  animation: ceremonyContent 8s ease-out;
}
@keyframes ceremonyContent {
  0%   { opacity: 0; transform: scale(0.5); }
  15%  { opacity: 1; transform: scale(1.1); }
  25%  { transform: scale(1); }
  85%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}
.ceremony-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ember);
  font-size: clamp(0.85rem, 1.5vw, 1.15rem);
  letter-spacing: 0.35em;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 184, 74, 0.6);
}
.ceremony-title {
  font-family: 'Alfa Slab One', serif;
  font-size: clamp(4rem, 12vw, 9rem);
  background: linear-gradient(180deg, #fff2cc 0%, #ffcc44 25%, #ff8a1a 55%, #ff4a00 80%, #5c1a04 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(255, 74, 0, 0.7));
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 1rem;
}
.ceremony-sub {
  font-family: 'Alfa Slab One', serif;
  color: var(--text);
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  letter-spacing: 0.2em;
  text-shadow: 0 0 20px var(--primary-glow);
}

/* ─── FOOTER ────────────────────────────────────────────────────── */
.footer {
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}
.footer-content { max-width: 900px; margin: 0 auto; }
.footer-line { margin-bottom: 1rem; font-size: 0.85rem; }
.footer-label { color: var(--text-dim); font-family: 'JetBrains Mono', monospace; margin-right: 0.5rem; }
.footer-value.mono { font-family: 'JetBrains Mono', monospace; color: var(--ember); word-break: break-all; }
.footer-tagline {
  font-family: 'Alfa Slab One', serif;
  color: var(--primary);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px var(--primary-glow);
  margin-top: 1rem;
}
