:root {
  --bg-deep: #020811;
  --bg-step: rgba(4, 18, 38, 0.96);
  --bg-card: rgba(0, 200, 255, 0.06);
  --bg-input: rgba(0, 12, 34, 0.9);
  --border: rgba(0, 180, 255, 0.22);
  --border-strong: rgba(0, 180, 255, 0.4);
  --accent: #00c8ff;
  --accent-soft: rgba(0, 200, 255, 0.5);
  --text: #c8dff0;
  --bright: #e8f4ff;
  --dim: #6a8aaa;
  --ok: #00e87a;
  --warn: #f5c842;
  --danger: #ff5f5f;
  --pink: #ff6fa8;
  --teal: #2EE5A8;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
}

#starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 100px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0, 180, 255, 0.25); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 232, 122, 0.3); }
  50%      { box-shadow: 0 0 40px rgba(0, 232, 122, 0.6); }
}

/* === HEADER === */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.seal-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.seal {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 0 14px rgba(0, 200, 255, 0.4));
  animation: sealBreath 4s ease-in-out infinite;
}

/* The whole seal gently breathes (subtle scale + glow pulse) */
@keyframes sealBreath {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 14px rgba(0, 200, 255, 0.4));
  }
  50% {
    transform: scale(1.015);
    filter: drop-shadow(0 0 22px rgba(0, 200, 255, 0.65));
  }
}

/* Outer dashed ring + satellite orbit are rotated via SMIL animateTransform inside the SVG itself —
   that approach has built-in center-point parameters (rotate angle cx cy) so the rotation pivots correctly
   around the seal center regardless of CSS transform-box quirks. */

/* FPGA chip pulses like an active processor (color pulse only, no rotation) */
.seal-chip {
  animation: sealChipPulse 1.5s ease-in-out infinite;
}

@keyframes sealChipPulse {
  0%, 100% {
    fill: rgba(0, 200, 255, 0.1);
    stroke: rgba(0, 200, 255, 0.7);
  }
  50% {
    fill: rgba(0, 200, 255, 0.25);
    stroke: rgba(0, 240, 255, 1);
  }
}

/* Cardinal star points twinkle independently */
.seal-star {
  animation: sealTwinkle 2.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.seal-star-1 { animation-delay: 0s; }
.seal-star-2 { animation-delay: 0.6s; }
.seal-star-3 { animation-delay: 1.2s; }
.seal-star-4 { animation-delay: 1.8s; }

@keyframes sealTwinkle {
  0%, 100% {
    opacity: 0.4;
    r: 2.2;
  }
  50% {
    opacity: 1;
    r: 3.2;
  }
}

.kicker {
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 60px rgba(0, 200, 255, 0.35);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.hero-sub {
  font-size: clamp(15px, 3vw, 24px);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 12px;
  margin-bottom: 16px;
}

.hero-tagline {
  color: var(--dim);
  font-size: 17px;
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto 24px;
}

.credit {
  display: inline-block;
  padding: 14px 24px;
  background: rgba(0, 200, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 8px auto 0;
}

.credit-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.credit-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--bright);
  margin-bottom: 4px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
}

.credit-title {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.6;
}

/* === STEP CARDS === */
.step {
  background: var(--bg-step);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 20px;
  animation: fadein 0.5s ease;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 200, 255, 0.15);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.step-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

.step-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bright);
  margin-bottom: 12px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
}

.step-lede {
  font-size: 15px;
  color: var(--dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* === MECHANISM CELL CARDS === */
.cell-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.cell-card {
  padding: 18px 20px;
  background: rgba(0, 12, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.cell-build { border-left: 3px solid var(--teal); }
.cell-resorb { border-left: 3px solid var(--pink); }

.cell-head {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cell-head i { font-size: 16px; }

.cell-build .cell-head { color: var(--teal); }
.cell-resorb .cell-head { color: var(--pink); }

.cell-role {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.cell-card p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.quote {
  padding: 16px 20px;
  background: rgba(0, 200, 255, 0.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
}

.quote cite {
  display: block;
  font-size: 12px;
  color: var(--dim);
  font-style: normal;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* === STEP 3 ↔ 4 BRIDGE === */
.step-bridge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -8px 0 12px;
  padding: 0 10px;
}

.step-bridge-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.step-bridge-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent);
  padding: 6px 14px;
  background: rgba(0, 200, 255, 0.08);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  white-space: nowrap;
}

.step-bridge-label i {
  font-size: 14px;
  animation: bridgeArrow 1.8s ease-in-out infinite;
}

.step-bridge-label i:last-child { animation-delay: 0.2s; }

@keyframes bridgeArrow {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%      { transform: translateY(3px); opacity: 1; }
}

/* === SIMULATOR STATUS BANNER === */
.sim-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 12, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--dim);
  transition: all 0.3s;
}

.sim-status-banner i {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.sim-status-banner.loaded {
  background: rgba(0, 200, 255, 0.1);
  border-color: var(--accent);
  color: var(--bright);
  box-shadow: 0 0 24px rgba(0, 200, 255, 0.2);
}

.sim-status-banner.loaded i { animation: statusPulse 1.4s ease-in-out infinite; }

@keyframes statusPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

#simulator.highlight {
  animation: simHighlight 1.2s ease-out;
}

@keyframes simHighlight {
  0%   { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.7); border-color: var(--accent); }
  100% { box-shadow: 0 0 40px 8px rgba(0, 200, 255, 0); border-color: var(--border); }
}

@media (max-width: 700px) {
  .step-bridge { gap: 8px; }
  .step-bridge-label { font-size: 9px; letter-spacing: 1px; padding: 5px 10px; }
}

/* === STEP 2 — INTERACTIVE EVIDENCE === */
.evidence-stage {
  background: rgba(0, 200, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.evidence-bone-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.evidence-bone-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 12px;
  color: #6BC8FF;
  transition: color 0.4s;
}

.evidence-bone-tag.degrading { color: var(--warn); }
.evidence-bone-tag.degraded { color: var(--pink); }

.evidence-bone {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}

.ev-struts line, .ev-nodes circle {
  transition: opacity 0.3s, stroke 0.4s, fill 0.4s;
}

.evidence-readout {
  text-align: center;
}

.evidence-bmd {
  font-size: 56px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  color: #6BC8FF;
  line-height: 1;
  text-shadow: 0 0 24px rgba(91, 184, 255, 0.4);
  transition: color 0.3s, text-shadow 0.3s;
}

.evidence-bmd span {
  font-size: 0.5em;
  color: var(--dim);
  font-weight: 400;
}

.evidence-bmd.degraded {
  color: var(--pink);
  text-shadow: 0 0 24px rgba(255, 111, 168, 0.5);
}

.evidence-bmd-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--dim);
  margin-top: 6px;
  font-weight: 600;
}

.evidence-delta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text);
  margin-top: 10px;
  padding: 4px 10px;
  background: rgba(0, 12, 34, 0.6);
  border-radius: 100px;
  display: inline-block;
}

.evidence-controls {
  background: rgba(0, 12, 34, 0.5);
  border-radius: 10px;
  padding: 16px 18px;
}

.evidence-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.evidence-time-row label {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 1.5px;
  font-weight: 600;
}

.evidence-time-marks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--dim);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

@media (max-width: 700px) {
  .evidence-bone-wrap { grid-template-columns: 1fr; gap: 12px; }
  .evidence-bone { max-width: 180px; }
  .evidence-bmd { font-size: 44px; }
  .evidence-time-marks span:nth-child(2),
  .evidence-time-marks span:nth-child(4),
  .evidence-time-marks span:nth-child(6) { display: none; }
}

/* === STEP 3 — CLICKABLE WORLDS === */
.world {
  padding: 20px 18px;
  background: rgba(0, 12, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}

button.world-clickable {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  color: inherit;
}

button.world-clickable:hover {
  background: rgba(0, 200, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 200, 255, 0.15);
}

button.world-clickable:active {
  transform: translateY(-1px);
}

button.world-clickable.flash {
  border-color: var(--accent);
  background: rgba(0, 200, 255, 0.18);
  box-shadow: 0 0 32px rgba(0, 200, 255, 0.55);
  animation: worldFlash 0.6s ease-out;
}

@keyframes worldFlash {
  0%   { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.7); }
  100% { box-shadow: 0 0 32px 8px rgba(0, 200, 255, 0); }
}

.world-cta {
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 200, 255, 0.06);
  transition: all 0.2s;
}

button.world-clickable:hover .world-cta {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}

.world-cta i { font-size: 12px; }

/* === METRICS === */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric {
  padding: 14px 18px;
  background: rgba(0, 200, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.metric-label {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.metric-num {
  font-size: 22px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 4px;
}

.metric-bad { color: var(--pink); }
.metric-good { color: var(--teal); }

.metric-cite {
  font-size: 11px;
  color: var(--dim);
}

/* === WORLDS === */
.worlds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.world-planet {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  position: relative;
}

.planet-earth {
  background: radial-gradient(circle at 30% 30%, #6BC8FF 0%, #1F6BB5 50%, #0A2D52 100%);
  box-shadow: inset -8px -8px 14px rgba(0, 0, 0, 0.5), 0 0 16px rgba(91, 184, 255, 0.3);
}
.planet-earth::before { content: ''; position: absolute; width: 18px; height: 13px; background: #4CB14A; border-radius: 50% 60% 40% 50%; top: 18px; left: 14px; opacity: 0.85; }
.planet-earth::after { content: ''; position: absolute; width: 12px; height: 16px; background: #4CB14A; border-radius: 60% 40% 50% 50%; top: 36px; right: 12px; opacity: 0.75; }

.planet-mars {
  background: radial-gradient(circle at 30% 30%, #FF8E5C 0%, #C24A1C 60%, #3D1408 100%);
  box-shadow: inset -8px -8px 14px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 142, 92, 0.3);
}
.planet-mars::before { content: ''; position: absolute; width: 5px; height: 5px; background: #5A1F0E; border-radius: 50%; top: 18px; left: 18px; box-shadow: 12px 8px 0 -1px #5A1F0E, -2px 18px 0 1px #5A1F0E, 16px 24px 0 -2px #5A1F0E; }

.planet-moon {
  background: radial-gradient(circle at 30% 30%, #F5F0E0 0%, #B8B0A0 60%, #4A4538 100%);
  box-shadow: inset -8px -8px 14px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 240, 224, 0.3);
}
.planet-moon::before { content: ''; position: absolute; width: 7px; height: 7px; background: #5A5448; border-radius: 50%; top: 14px; left: 14px; box-shadow: 14px 10px 0 -1px #5A5448, -2px 22px 0 1px #5A5448, 18px 26px 0 -2px #5A5448; opacity: 0.7; }

.world-iss {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--pink);
  background: rgba(255, 111, 168, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 111, 168, 0.25);
}

.world-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--bright);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.world-g {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 10px;
}

.world-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.world-badge.measured {
  background: rgba(46, 229, 168, 0.12);
  color: var(--teal);
  border: 1px solid rgba(46, 229, 168, 0.35);
}

.world-badge.unknown {
  background: rgba(245, 200, 66, 0.1);
  color: var(--warn);
  border: 1px solid rgba(245, 200, 66, 0.35);
}

.world-badge i { font-size: 12px; }

.world p {
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
}

/* === SIMULATOR === */
.presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.preset {
  padding: 10px 14px;
  background: rgba(0, 180, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preset:hover {
  background: rgba(0, 200, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.preset i { font-size: 14px; }

.controls {
  background: rgba(0, 12, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.control-row label {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 1.5px;
  min-width: 70px;
  font-weight: 600;
}

.control-row input[type="range"] { flex: 1; }

.readout {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--bright);
  min-width: 70px;
  text-align: right;
}

.control-buttons {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.btn-play, .btn-reset {
  padding: 12px 18px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-play {
  background: rgba(0, 200, 255, 0.15);
  color: var(--accent);
}

.btn-play:hover {
  background: rgba(0, 200, 255, 0.25);
  box-shadow: 0 0 16px rgba(0, 200, 255, 0.3);
}

.btn-play.playing {
  background: rgba(0, 232, 122, 0.15);
  border-color: rgba(0, 232, 122, 0.5);
  color: var(--ok);
}

.btn-reset {
  background: rgba(0, 180, 255, 0.05);
  color: var(--dim);
  border-color: var(--border);
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-play i, .btn-reset i { font-size: 16px; }

.canvas-wrap {
  background: rgba(0, 12, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.legend {
  display: flex;
  gap: 18px;
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  flex-wrap: wrap;
}

.legend span { display: flex; align-items: center; gap: 5px; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-build { background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.dot-resorb { background: var(--pink); box-shadow: 0 0 6px var(--pink); }
.dot-mineral { background: #f5c842; box-shadow: 0 0 6px #f5c842; }

#bone-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #0d0a08;
  border-radius: 6px;
  border: 1px solid rgba(232, 212, 168, 0.15);
}

/* === AGE ESTIMATOR === */
.age-step {
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.08), rgba(4, 18, 38, 0.96));
  border-color: rgba(0, 200, 255, 0.4);
}

.age-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin: 14px 0 16px;
}

.age-input-block {
  text-align: left;
}

.age-input-label, .age-output-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--dim);
  font-weight: 600;
  margin-bottom: 8px;
}

.age-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.age-input-row input { flex: 1; }

.age-input-row span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  min-width: 40px;
  text-align: right;
}

.age-arrow {
  font-size: 24px;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
}

.age-output { text-align: right; }

.age-output-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
}

.age-output-delta {
  font-size: 12px;
  color: var(--dim);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.age-foot {
  font-size: 11px;
  color: var(--dim);
  padding-top: 14px;
  border-top: 1px solid rgba(0, 200, 255, 0.15);
  line-height: 1.7;
}

.age-foot em {
  color: var(--warn);
  font-style: italic;
}

/* === SOURCES === */
.sources {
  display: grid;
  gap: 10px;
}

.source {
  display: block;
  padding: 16px 20px;
  background: rgba(0, 12, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}

.source:hover {
  border-color: var(--accent);
  background: rgba(0, 200, 255, 0.06);
  transform: translateX(4px);
}

.source-meta {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.source-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bright);
  margin-bottom: 6px;
  line-height: 1.5;
}

.source-authors {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 6px;
}

.source-doi {
  font-size: 11px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === FOOTER === */
.footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  font-size: 12px;
  color: rgba(0, 180, 255, 0.3);
  letter-spacing: 1px;
  line-height: 1.8;
  border-top: 1px solid rgba(0, 180, 255, 0.1);
}

.footer-credit {
  display: block;
  margin-top: 8px;
  color: var(--dim);
  font-size: 11px;
}

.footer-credit a {
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* === RANGE INPUTS === */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 180, 255, 0.18);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.6);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.6);
}

/* === MUSIC CONTROL === */
.music-control {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(4, 18, 38, 0.85);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 200, 255, 0.2);
}

.music-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 200, 255, 0.4);
}

.music-btn.playing {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: transparent;
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 200, 255, 0.4); }
  50%      { box-shadow: 0 0 32px rgba(0, 200, 255, 0.7); }
}

.music-panel {
  background: rgba(4, 18, 38, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 14px;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.music-control:hover .music-panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.music-info { line-height: 1.3; }
.music-title { font-size: 11px; font-weight: 600; color: var(--bright); }
.music-artist { font-size: 10px; color: var(--dim); margin-top: 2px; }

.music-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.music-volume i { font-size: 13px; }

.music-volume input[type="range"] {
  width: 70px;
  height: 4px;
}

.music-volume input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.music-volume input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

/* === RESPONSIVE === */
@media (max-width: 700px) {
  .page { padding: 24px 12px 80px; }
  .step { padding: 20px 18px; }
  .seal { width: 110px; height: 110px; }
  .cell-pair { grid-template-columns: 1fr; }
  .bone-row { grid-template-columns: 1fr; gap: 16px; }
  .bone-arrow { transform: rotate(90deg); }
  .age-row { grid-template-columns: 1fr; gap: 14px; }
  .age-arrow { transform: rotate(90deg); text-align: center; }
  .age-output { text-align: center; }
  .age-output-num { font-size: 38px; }
  .control-buttons { grid-template-columns: 1fr; }
  .music-panel { display: none; }
}
