/* Bitcoin 3D Spiral — styles for the spiral hero + companion panels.
   Variables (--bg, --gold, --orange, --cream, --muted, --border) come from
   the parent template. Only add here what's spiral-specific. */

.spiral-eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.spiral-heading {
  font-family: "Cinzel", serif;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--cream);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.spiral-lead {
  color: #806850;
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ── 3D stage ────────────────────────────────────────────────────── */
.spiral-stage {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 560px;
  max-height: 900px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, #14100820 0%, transparent 70%),
    #070709;
  border: 1px solid #1E1A12;
  border-radius: 3px;
  overflow: hidden;
}

.spiral-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

/* CSS2DRenderer overlay for psychology labels + tooltips. */
.spiral-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Phase labels on the outer perimeter (billboarded). */
.phase-label {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #9A8060;
  text-transform: uppercase;
  text-shadow: 0 0 10px #06060880, 0 0 20px #06060860;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  user-select: none;
}

.phase-label.current {
  color: var(--orange);
  text-shadow: 0 0 12px #F7931A80, 0 0 24px #F7931A40;
}

/* Price-decade ring labels ($1 / $10 / $100 / $1K / $10K / $100K). */
.price-ring-label {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cream);
  background: #0A0A0EC0;
  padding: 2px 6px;
  border-radius: 1px;
  text-shadow: 0 0 8px #000000A0;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  user-select: none;
  pointer-events: none;
  border: 1px solid #6A584060;
  box-shadow: 0 0 10px #00000060;
  opacity: 0.85;
}

/* Cardinal cycle-axis labels — year groupings at 12/3/6/9 o'clock,
   matching the Rational Root cheat sheet's cardinal annotation. */
.cycle-axis-label {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  background: transparent;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  user-select: none;
  pointer-events: none;
  text-shadow: 0 0 8px #00000080, 0 0 14px #D4AF3730;
  opacity: 0.78;
}

/* Halving ring labels + event pin tooltips. */
.spiral-pin-label {
  background: #0D0D11F0;
  border: 1px solid #2A2620;
  padding: 8px 12px;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  color: var(--cream);
  letter-spacing: 0.08em;
  white-space: nowrap;
  transform: translate(-50%, -140%);
  pointer-events: none;
  border-radius: 2px;
  box-shadow: 0 8px 24px #00000060;
}
.spiral-pin-label .spl-date {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.15em;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.spiral-pin-label .spl-title {
  color: var(--gold);
  margin-bottom: 2px;
}
.spiral-pin-label .spl-price {
  color: var(--orange);
  font-size: 9px;
}

/* Controls bar (top-right overlay). */
.spiral-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 10;
  max-width: calc(100% - 32px);
  justify-content: flex-end;
}
.spiral-btn {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 13px;
  border: 1px solid #2A2620;
  background: #0D0D11CC;
  color: #A09070;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.18s ease;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.spiral-btn:hover {
  border-color: var(--gold);
  color: var(--cream);
}
.spiral-btn.active {
  border-color: var(--orange);
  color: var(--orange);
}

/* Status + legend bar across the bottom of the stage. */
.spiral-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 10;
  background: #0A0A0EA0;
  padding: 10px 14px;
  border: 1px solid #1E1A12;
  border-radius: 2px;
  backdrop-filter: blur(6px);
}
.spiral-status .ss-row { display: flex; gap: 12px; }
.spiral-status .ss-dim { color: #3A3020; }

.spiral-legend {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: #0A0A0EA0;
  padding: 10px 14px;
  border: 1px solid #1E1A12;
  border-radius: 2px;
  backdrop-filter: blur(6px);
  z-index: 10;
}
.mayer-gradient {
  width: 120px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #1f9d55 0%, #4ade80 20%, #eab308 45%,
    #f59e0b 65%, #f7931a 80%, #dc2626 100%);
}
.rainbow-gradient {
  width: 140px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #3730A3 0%, #2563EB 14%, #0EA5E9 28%, #22C55E 45%,
    #EAB308 60%, #F59E0B 75%, #EF4444 88%, #831843 100%);
}

.spiral-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  background: #07070990;
  z-index: 20;
}

.spiral-banner {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #E0A060;
  background: #2A200FCC;
  border: 1px solid #6A500F;
  padding: 8px 12px;
  border-radius: 2px;
  display: none;
  z-index: 10;
}

.spiral-timebox {
  position: absolute;
  top: 64px;
  left: 16px;
  width: min(280px, calc(100% - 32px));
  background: #060608E8;
  border: 1px solid #3A2D18;
  border-left: 2px solid var(--orange);
  padding: 13px 14px;
  border-radius: 2px;
  z-index: 10;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 36px #00000070;
  display: none;
}
.spiral-timebox.playing,
.spiral-timebox.complete {
  display: block;
}
.st-kicker {
  font-family: "Space Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B9AA88;
  margin-bottom: 7px;
}
.st-date {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
}
.st-price {
  font-family: "Cinzel", serif;
  font-size: 28px;
  line-height: 1.05;
  color: var(--cream);
  margin: 4px 0 9px;
}
.st-progress {
  height: 5px;
  background: #211A10;
  border: 1px solid #342614;
  overflow: hidden;
  margin-bottom: 8px;
}
.st-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transition: width 0.12s linear;
}
.st-story-title {
  font-family: "Cinzel", serif;
  font-size: 16px;
  line-height: 1.2;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin: 2px 0 4px;
}
.st-story-copy {
  color: #D1C29C;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 9px;
}
.st-caption {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #AA9B7B;
}

.journey-label {
  background: #060608E8;
  border: 1px solid #F7931A80;
  border-left: 2px solid var(--orange);
  padding: 8px 10px;
  min-width: 150px;
  font-family: "Space Mono", monospace;
  box-shadow: 0 12px 30px #00000080, 0 0 18px #F7931A22;
  transform: translate(-50%, -140%);
  pointer-events: none;
  border-radius: 2px;
}
.journey-label .jl-date {
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.journey-label .jl-price {
  color: var(--cream);
  font-family: "Cinzel", serif;
  font-size: 17px;
  line-height: 1.1;
}
.journey-label .jl-count {
  color: #AA9B7B;
  font-size: 8px;
  letter-spacing: 0.08em;
  margin-top: 3px;
}
.journey-label .jl-era {
  color: var(--orange);
  font-size: 8px;
  letter-spacing: 0.1em;
  margin-top: 4px;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .spiral-timebox {
    top: auto;
    bottom: 78px;
  }
}

/* ── Companion row ───────────────────────────────────────────────── */
.spiral-companions {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
}
@media (max-width: 980px) {
  .spiral-companions {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: #0A0A0E;
  border: 1px solid #1E1A12;
  border-radius: 2px;
  padding: 22px;
}
.panel-eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Live state card */
.live-price {
  font-family: "Cinzel", serif;
  font-size: 38px;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.live-asof {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.live-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid #18161060;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: #806850;
  letter-spacing: 0.06em;
}
.live-stat .key {
  color: #504030;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 9px;
}
.live-stat .value {
  color: var(--cream);
}
.live-stat .value.accent-gold { color: var(--gold); }
.live-stat .value.accent-orange { color: var(--orange); }

.mayer-gauge {
  margin-top: 18px;
  text-align: center;
}
.mayer-gauge-label {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 8px;
}
.mayer-gauge svg { display: block; margin: 0 auto; }

/* 2D wheel */
.wheel-panel svg { display: block; width: 100%; height: auto; }

/* LPPL invariant panel */
.invariant-panel {
  grid-column: 1 / -1;
}
.invariant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 20px;
  margin-bottom: 18px;
}
@media (max-width: 720px) {
  .invariant-grid { grid-template-columns: 1fr 1fr; }
  .inv-cell-wide { grid-column: 1 / -1; }
}
.inv-cell {
  background: #0E0D11;
  border: 1px solid #18161060;
  padding: 14px 16px;
  border-radius: 2px;
}
.inv-value {
  font-family: "Cinzel", serif;
  font-size: 28px;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 8px;
}
.inv-value.inv-accent { color: var(--orange); }
.inv-key {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  color: #A09070;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.inv-sub {
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-left: 4px;
  text-transform: none;
  font-size: 9px;
}
.invariant-bar {
  margin-bottom: 14px;
}
.bar-track {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, #DC262640 0%, #22C55E80 50%, #DC262640 100%);
  border-radius: 4px;
  margin: 6px 0 4px 0;
  border: 1px solid #1E1A12;
}
.bar-center {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 50%;
  width: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}
.bar-needle {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 3px;
  background: var(--orange);
  box-shadow: 0 0 8px #F7931A80;
  transform: translateX(-50%);
  transition: left 0.4s ease;
}
.bar-labels {
  display: flex;
  justify-content: space-between;
  font-family: "Space Mono", monospace;
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.invariant-foot {
  display: flex;
  justify-content: space-between;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  color: #806850;
  letter-spacing: 0.08em;
  padding-top: 10px;
  border-top: 1px solid #18161060;
}
.invariant-foot b { color: var(--cream); font-weight: normal; }

/* Event feed */
.event-feed {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}
.event-feed::-webkit-scrollbar { width: 3px; }
.event-feed::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }
.event-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #18161060;
  cursor: pointer;
  transition: background 0.18s ease;
}
.event-row:first-child { border-top: none; }
.event-row:hover { background: #11110C; }
.event-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid currentColor;
  background: #06060840;
}
.event-body { flex: 1; min-width: 0; }
.event-date {
  font-family: "Space Mono", monospace;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.event-title {
  font-family: "Cinzel", serif;
  font-size: 13px;
  color: var(--cream);
  margin-bottom: 2px;
}
.event-desc {
  font-size: 12px;
  color: #6A5840;
  line-height: 1.5;
}
