/* ==========================================================================
   TIME TRAVELER'S DIGEST — $50,000 PREMIUM DESIGN SYSTEM
   UX/UI Architecture: Dark Futuristic Glassmorphism, Editorial Sci-Fi & WebGL
   ========================================================================== */

:root {
  --bg-deep: #05070e;
  --bg-card: rgba(11, 16, 30, 0.82);
  --bg-card-hover: rgba(16, 24, 46, 0.92);
  --bg-surface: #0a0e1a;
  
  --gold-primary: #e8b23a;
  --gold-light: #f5d77f;
  --gold-dark: #b8860b;
  
  --cyan-portal: #00d4ff;
  --cyan-glow: rgba(0, 212, 255, 0.4);
  
  --red-alert: #ef4444;
  --red-crimson: #c23b2e;
  --red-dark: #8d0000;
  
  --ink-pure: #faf9f5;
  --ink-dim: #9aa2b1;
  --ink-muted: #5e6676;
  
  --border-gold: rgba(232, 178, 58, 0.28);
  --border-cyan: rgba(0, 212, 255, 0.28);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --font-head: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-comic: 'Bebas Neue', Impact, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: 'Clash Display', Georgia, serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--ink-pure);
  font-family: var(--font-head);
  overflow-x: hidden;
}

body {
  background-color: var(--bg-deep);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background WebGL & Overlays */
#webgl-hero-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 99;
  opacity: 0.22;
}

.content-wrapper {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   NAVIGATION & TOP BAR (EXACT REFERENCE REPLICATION)
   ========================================================================== */
.ttd-navbar {
  background: rgba(5, 7, 14, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink-pure);
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(232, 178, 58, 0.4));
}

.brand-title-group {
  display: flex;
  flex-direction: column;
}

.brand-main-title {
  font-family: var(--font-comic);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--ink-pure);
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

/* Nav Menu Categories */
.nav-categories {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-cat-link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-cat-link:hover {
  color: var(--ink-pure);
}

.nav-cat-link.active {
  color: var(--ink-pure);
  font-weight: 700;
}

.nav-cat-link.active::before {
  content: '';
  position: absolute;
  left: -0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background-color: var(--gold-primary);
}

.nav-cat-link.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
}

/* Universe Mode Selector Pill */
.universe-toggle-pill {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 3px;
  margin-left: 1rem;
}

.universe-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.25s ease;
}

.universe-btn.active {
  background: var(--gold-primary);
  color: #05070e;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(232, 178, 58, 0.5);
}

/* Top Right Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--ink-dim);
}

.search-timeline-input {
  background: rgba(12, 16, 30, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--ink-pure);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 12px 6px 30px;
  width: 170px;
  transition: all 0.25s ease;
}

.search-timeline-input:focus {
  outline: none;
  border-color: var(--cyan-portal);
  box-shadow: 0 0 10px var(--cyan-glow);
  width: 210px;
}

.btn-subscribe-red {
  background: #e62020;
  color: #ffffff;
  font-family: var(--font-comic);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 18px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(230, 32, 32, 0.4);
  transition: all 0.2s ease;
}

.btn-subscribe-red:hover {
  background: #ff3333;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230, 32, 32, 0.6);
}

/* Tricolor Brand Flag Badge */
.tricolor-flag-badge {
  display: flex;
  width: 18px;
  height: 24px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.flag-stripe-red { flex: 1; background: #c23b2e; }
.flag-stripe-yellow { flex: 1; background: #e8b23a; }
.flag-stripe-blue { flex: 1; background: #00d4ff; }

/* ==========================================================================
   SUBHEADER MOTTO BANNER
   ========================================================================== */
.sub-hero-motto-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem 0.5rem;
}

.motto-left, .motto-right {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}

.motto-left { color: rgba(255, 255, 255, 0.75); }
.motto-right { color: rgba(255, 255, 255, 0.6); text-align: right; }

/* ==========================================================================
   MAIN HERO DUAL CARD SECTION (EXACT UX/UI REPLICATION)
   ========================================================================== */
.hero-experience-section {
  padding: 0.5rem 2.5rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 24px;
  gap: 1.5rem;
  align-items: stretch;
}

/* Left Box: Archival Video Box */
.archival-video-box {
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  position: relative;
}

.video-header-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  background: rgba(5, 8, 16, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-tag-recording {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-pure);
}

.recording-red-dot {
  width: 9px;
  height: 9px;
  background-color: var(--red-alert);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red-alert);
  animation: pulseRecording 1.6s infinite ease-in-out;
}

@keyframes pulseRecording {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.hud-division-label {
  color: var(--ink-dim);
  font-weight: 400;
}

.hud-meta-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.ttd-id-stamp {
  color: var(--ink-dim);
  letter-spacing: 0.12em;
}

.hud-date-badge {
  background: var(--gold-primary);
  color: #05070e;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}

/* Video Player Media Viewport */
.video-media-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.video-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.video-media-viewport:hover .video-poster-img {
  transform: scale(1.02);
}

/* Big Play Overlay Button */
.center-play-button-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 5;
}

.center-play-button-overlay svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
  margin-left: 4px;
}

.video-media-viewport:hover .center-play-button-overlay {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 25px rgba(232, 178, 58, 0.6);
}

.video-media-viewport:hover .center-play-button-overlay svg {
  fill: #05070e;
}

/* Video Player Bottom Controls */
.video-controls-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(5, 8, 16, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-ctrl {
  background: transparent;
  border: none;
  color: var(--ink-pure);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-ctrl:hover {
  color: var(--gold-primary);
}

.time-readout {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-pure);
  letter-spacing: 0.08em;
}

.video-scrub-container {
  flex: 1;
  margin: 0 1rem;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.video-scrub-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--cyan-portal);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan-portal);
}

.video-scrub-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan-portal);
}

/* Right Box: Field Transmission Card */
.field-transmission-box {
  background: rgba(8, 12, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  position: relative;
}

.transmission-badge-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.badge-num-red {
  background: #e62020;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
}

.transmission-type-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 600;
}

.transmission-headline {
  font-family: var(--font-head);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.transmission-synopsis {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-dim);
  margin-bottom: 1.4rem;
}

/* Metadata Grid Table */
.transmission-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.25rem;
}

.meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.meta-value {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-pure);
}

.classification-badge-yellow {
  background: var(--gold-primary);
  color: #05070e;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  display: inline-block;
  font-size: 0.68rem;
  text-align: center;
}

.transmission-pullquote {
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.4rem;
}

/* Field Actions */
.transmission-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-blue-transcript {
  background: #1d4ed8;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 18px;
  border: none;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
}

.btn-blue-transcript:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
  color: #fff;
}

.btn-notes-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-pure);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-notes-link:hover {
  color: var(--gold-primary);
}

/* Far Right Colorful Accent Bars */
.geometric-accent-flag {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  justify-content: center;
}

.accent-block {
  width: 18px;
  border-radius: 2px;
  transform: skewY(-15deg);
}

.accent-block.blue { height: 75px; background: #00d4ff; }
.accent-block.yellow { height: 60px; background: #e8b23a; }
.accent-block.red { height: 85px; background: #e62020; }

/* ==========================================================================
   TEMPORAL SIGNAL ANALYSIS BOTTOM HUD (EXACT REPLICATION)
   ========================================================================== */
.temporal-signal-hud {
  background: rgba(6, 10, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 1rem 1.5rem 1.25rem;
  margin-top: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.hud-signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.6rem;
}

.signal-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signal-blue-dot {
  width: 8px;
  height: 8px;
  background-color: var(--cyan-portal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan-portal);
}

.signal-anomaly-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red-alert);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.signal-anomaly-center:hover {
  transform: scale(1.05);
}

.signal-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.status-cyan-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #06b6d4;
  border-radius: 50%;
  margin-right: 4px;
}

.status-green-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  margin-right: 4px;
}

/* Timeline Analyzer Track */
.timeline-analyzer-track {
  position: relative;
  padding: 1.5rem 0.5rem 1.75rem;
}

.track-line {
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  width: 100%;
  position: relative;
}

.track-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.tick-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.tick-time:hover {
  color: var(--cyan-portal);
}

/* Interactive Timeline Nodes */
.timeline-node-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 10;
}

.node-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #05070e;
  transition: all 0.2s ease;
}

.node-dot.blue { background: #00d4ff; box-shadow: 0 0 10px #00d4ff; }
.node-dot.red { background: #ef4444; box-shadow: 0 0 12px #ef4444; width: 14px; height: 14px; animation: pulseAnomaly 1.2s infinite; }
.node-dot.cyan { background: #06b6d4; box-shadow: 0 0 10px #06b6d4; }

@keyframes pulseAnomaly {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px #ef4444; }
  50% { transform: scale(1.3); box-shadow: 0 0 20px #ef4444; }
}

.node-label-top {
  position: absolute;
  bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.node-label-top.blue { color: #00d4ff; left: 0; transform: none; }
.node-label-top.cyan { color: #06b6d4; right: 0; transform: none; }

/* Three Telemetry Cards Row */
.telemetry-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 180px 120px;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

.telemetry-card {
  display: flex;
  gap: 0.75rem;
  background: rgba(12, 16, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 0.6rem 0.85rem;
}

.telemetry-bar-indicator {
  width: 3px;
  border-radius: 2px;
  align-self: stretch;
}

.telemetry-bar-indicator.blue { background: #00d4ff; }
.telemetry-bar-indicator.red { background: #ef4444; }
.telemetry-bar-indicator.cyan { background: #06b6d4; }

.telemetry-body {
  display: flex;
  flex-direction: column;
}

.telemetry-time-stamp {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-dim);
}

.telemetry-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-pure);
  text-transform: uppercase;
}

.telemetry-desc {
  font-size: 0.74rem;
  color: var(--ink-dim);
  line-height: 1.35;
}

/* Signal Integrity Gauge */
.signal-gauge-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gauge-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

.gauge-pct {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #00d4ff;
}

.equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.eq-bar {
  flex: 1;
  background: #00d4ff;
  border-radius: 1px;
  animation: eqJump 1.2s infinite ease-in-out;
}

.eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 75%; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 95%; animation-delay: 0.2s; }
.eq-bar:nth-child(4) { height: 60%; animation-delay: 0.4s; }
.eq-bar:nth-child(5) { height: 85%; animation-delay: 0.15s; }
.eq-bar:nth-child(6) { height: 100%; animation-delay: 0.5s; }
.eq-bar:nth-child(7) { height: 70%; animation-delay: 0.25s; }
.eq-bar:nth-child(8) { height: 50%; animation-delay: 0.35s; }

@keyframes eqJump {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}

/* Archive Reference Stamp Badge */
.archive-stamp-badge {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stamp-code {
  font-family: var(--font-comic);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  line-height: 1;
}

.stamp-archive-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--ink-pure);
}

.stamp-ref-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   CHARACTER DOSSIERS SECTION (STRICT 5 MAIN CHARACTERS)
   ========================================================================== */
.character-dossiers-section {
  padding: 4rem 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.section-kicker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.kicker-gold-dot {
  width: 7px;
  height: 7px;
  background-color: var(--gold-primary);
  border-radius: 50%;
}

.section-main-heading {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subheading-lore {
  font-size: 1rem;
  color: var(--ink-dim);
  max-width: 720px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.dossier-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.dossier-card {
  background: rgba(12, 16, 28, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dossier-card:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 12px 35px rgba(232, 178, 58, 0.2), inset 0 1px 0 rgba(232, 178, 58, 0.3);
  transform: translateY(-4px);
}

.dossier-card-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #000;
}

.dossier-card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: portraitDrift 15s ease-in-out infinite;
}

@keyframes portraitDrift {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.1) translate(-2%, 1.5%); }
  100% { transform: scale(1) translate(0, 0); }
}

.dossier-card-portrait::after {
  content: '';
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(232, 178, 58, 0.18) 50%, transparent 58%);
  animation: lightSweep 15s linear infinite;
}

@keyframes lightSweep {
  0% { transform: translateX(-55%); }
  100% { transform: translateX(55%); }
}

.dossier-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dossier-character-name {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink-pure);
  margin-bottom: 0.25rem;
}

.dossier-character-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold-primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dossier-character-lore {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-dim);
  margin-bottom: 1.25rem;
  flex: 1;
}

.dossier-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-dossier-inspect {
  background: transparent;
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-dossier-inspect:hover {
  background: var(--gold-primary);
  color: #05070e;
}

/* Empty 6th Slot: Open Receiver Seat */
.dossier-card.open-seat {
  border-style: dashed;
  border-color: rgba(232, 178, 58, 0.4);
  background: rgba(10, 14, 24, 0.5);
}

.open-seat-art {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(232, 178, 58, 0.12), transparent 70%);
}

.open-seat-art svg {
  width: 50%;
  height: auto;
  opacity: 0.6;
}

/* ==========================================================================
   SOLFEGGIO FREQUENCY RESONATOR MATRIX
   ========================================================================== */
.solfeggio-matrix-section {
  padding: 3rem 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.solfeggio-keys-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.solfeggio-key {
  background: rgba(12, 18, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.solfeggio-key:hover, .solfeggio-key.active {
  background: rgba(232, 178, 58, 0.15);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(232, 178, 58, 0.3);
  transform: translateY(-2px);
}

.solfeggio-hz {
  font-family: var(--font-comic);
  font-size: 1.5rem;
  color: var(--gold-primary);
}

.solfeggio-seg-name {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-pure);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.solfeggio-role {
  font-size: 0.65rem;
  color: var(--ink-dim);
  line-height: 1.2;
}

/* ==========================================================================
   MODAL DIALOGS & DRAWERS
   ========================================================================== */
.ttd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ttd-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.ttd-modal-content {
  background: #080c16;
  border: 1.5px solid var(--border-gold);
  border-radius: 8px;
  max-width: 820px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  position: relative;
  padding: 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 1.25rem;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--gold-primary);
}

/* Transcript Synchronized Drawer */
.transcript-cue-item {
  display: flex;
  gap: 1.25rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.transcript-cue-item:hover, .transcript-cue-item.active {
  background: rgba(0, 212, 255, 0.08);
  border-left: 3px solid var(--cyan-portal);
}

.cue-timestamp {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan-portal);
  font-weight: 700;
  min-width: 45px;
}

.cue-speaker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.cue-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-pure);
}

/* ==========================================================================
   FOOTER (TRI-FOOTER & CANONICAL SIGNATURE)
   ========================================================================== */
footer.ttd-site-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 8, 14, 0.95);
  padding: 3rem 2.5rem 6rem;
  position: relative;
  z-index: 10;
}

.footer-inner-wrap {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-author-provenance {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 820px;
}

.footer-tri-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(6, 9, 18, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-gold);
}

.tri-link {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tri-link:hover {
  color: var(--ink-pure);
}

.tri-separator {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .hero-main-grid {
    grid-template-columns: 1fr;
  }
  .geometric-accent-flag {
    display: none;
  }
  .telemetry-cards-row {
    grid-template-columns: 1fr 1fr;
  }
  .solfeggio-keys-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-categories {
    display: none;
  }
  .sub-hero-motto-bar {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .telemetry-cards-row {
    grid-template-columns: 1fr;
  }
  .transmission-headline {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   AFROCENTRIC PROFESSORCLOCK HERO STAGE & DOSSIER 000 STYLING
   ========================================================================== */

.pclk-000-hero-stage {
  background: radial-gradient(circle at 30% 20%, rgba(26, 18, 5, 0.95), rgba(5, 8, 18, 0.98)),
              url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M20 0v40M0 20h40" stroke="rgba(232,178,58,0.04)" stroke-width="1"/></svg>');
  border: 2px solid var(--gold-primary);
  border-radius: 8px;
  box-shadow: 0 0 45px rgba(232, 178, 58, 0.18), inset 0 0 30px rgba(0, 0, 0, 0.8);
  padding: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.pclk-000-hero-stage::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), var(--cyan-portal), var(--gold-primary), transparent);
}

.pclk-000-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 992px) {
  .pclk-000-grid {
    grid-template-columns: 1fr;
  }
}

.pclk-sidebar-card {
  background: rgba(8, 12, 26, 0.92);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.pclk-dossier-num-badge {
  font-family: var(--font-comic);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--gold-primary);
  text-shadow: 0 0 15px rgba(232, 178, 58, 0.4);
  letter-spacing: 2px;
}

.pclk-meta-list {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  line-height: 1.8;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(232, 178, 58, 0.2);
  padding-top: 0.75rem;
}

.pclk-meta-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding: 2px 0;
}

.pclk-meta-list strong {
  color: var(--gold-light);
}

.pclk-hero-portrait-wrap {
  position: relative;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 1rem;
}

.pclk-hero-portrait-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  filter: contrast(1.08) brightness(1.02);
  transition: transform 0.4s ease;
}

.pclk-hero-portrait-wrap:hover .pclk-hero-portrait-img {
  transform: scale(1.03);
}

.pclk-quote-box {
  background: rgba(232, 178, 58, 0.06);
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--gold-primary);
  border-radius: 4px;
  padding: 1.25rem;
  margin: 1rem 0;
  position: relative;
}

.pclk-quote-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--gold-light);
  line-height: 1.5;
}

.pclk-quote-author {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-primary);
  text-align: right;
  margin-top: 0.5rem;
}

.pclk-intelligence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1.25rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .pclk-intelligence-grid {
    grid-template-columns: 1fr;
  }
}

.pclk-intel-item h6 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-portal);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  letter-spacing: 1px;
}

.pclk-intel-item p {
  font-size: 0.86rem;
  color: var(--ink-dim);
  line-height: 1.5;
  margin: 0;
}

/* Photo Gallery Strip */
.pclk-gallery-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-gold);
  padding-top: 1.25rem;
}

@media (max-width: 768px) {
  .pclk-gallery-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pclk-gallery-card {
  position: relative;
  border: 1px solid rgba(232, 178, 58, 0.3);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  aspect-ratio: 16/10;
  transition: all 0.3s ease;
}

.pclk-gallery-card:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(232, 178, 58, 0.4);
  transform: translateY(-2px);
}

.pclk-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pclk-gallery-card-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(5, 8, 18, 0.88);
  padding: 4px 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Accessibility & Focus Indicators */
:focus-visible {
  outline: 2px solid var(--cyan-portal) !important;
  outline-offset: 3px !important;
}

/* Reduced Motion Compliance */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #canvas-container {
    opacity: 0.25 !important;
  }
}


/* ==========================================================================
   DIEGETIC SCI-FI UI, HOLOGRAPHIC CARDS & CRT THEMES
   ========================================================================== */

/* CRT & Terminal Theme Variants */
body.theme-amber {
  --cyan-portal: #ffb000;
  --cyan-glow: rgba(255, 176, 0, 0.4);
  --gold-primary: #ffcc00;
  --border-cyan: rgba(255, 176, 0, 0.35);
  --accent-primary: #ffb000;
}

body.theme-matrix {
  --cyan-portal: #00ff66;
  --cyan-glow: rgba(0, 255, 102, 0.4);
  --gold-primary: #33ff88;
  --border-cyan: rgba(0, 255, 102, 0.35);
  --accent-primary: #00ff66;
}

/* Reduced Motion Mode */
body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}
body.reduced-motion .crt-overlay {
  display: none !important;
}

/* Accessible Focus Rings */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan-portal, #00d4ff) !important;
  outline-offset: 3px !important;
}

/* Holographic Card Styles */
.holo-card {
  position: relative;
  background: rgba(11, 16, 30, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
  perspective: 800px;
}
.holo-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 16px 36px rgba(0, 212, 255, 0.18), 0 0 20px rgba(232, 178, 58, 0.22);
  border-color: var(--cyan-portal);
}
.holo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 212, 255, 0.03) 3px, rgba(0, 212, 255, 0.03) 4px);
  pointer-events: none;
  opacity: 0.6;
}

/* Classified Redacted Blocks & Paywall Triggers */
.classified-redacted {
  position: relative;
  background: rgba(239, 68, 68, 0.12);
  border: 1px dashed rgba(239, 68, 68, 0.4);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-top: 0.75rem;
  cursor: pointer;
  overflow: hidden;
}
.classified-redacted::before {
  content: 'CLASSIFIED // DTSA CLEARANCE REQUIRED';
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--red-alert);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.classified-bar {
  display: inline-block;
  background: #111;
  color: #111;
  user-select: none;
  padding: 0 4px;
  border-radius: 2px;
  letter-spacing: 2px;
  transition: all 0.2s ease;
}
.classified-redacted:hover .classified-bar {
  background: rgba(239, 68, 68, 0.3);
  color: var(--ink-pure);
}

/* Judge Lens HUD */
#hud-judge-lens {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(5, 7, 14, 0.95);
  border: 1px solid var(--cyan-portal);
  box-shadow: 0 12px 36px rgba(0,0,0,0.8), 0 0 20px rgba(0,212,255,0.25);
  border-radius: 8px;
  padding: 1.25rem;
  width: 320px;
  z-index: 9999;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-pure);
  backdrop-filter: blur(16px);
}
.hud-metric-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hud-metric-val {
  color: var(--cyan-portal);
  font-weight: 700;
}

/* Command Palette Search Overlay */
#modal-cmd-search {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 14, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.cmd-box {
  background: #0d1326;
  border: 1px solid var(--cyan-portal);
  box-shadow: 0 24px 60px rgba(0,0,0,0.9), 0 0 30px rgba(0,212,255,0.3);
  border-radius: 8px;
  width: 680px;
  max-width: 92vw;
  overflow: hidden;
}
.cmd-input {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  outline: none;
}
.cmd-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.75rem;
}
.cmd-item {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}
.cmd-item:hover, .cmd-item.selected {
  background: rgba(0, 212, 255, 0.15);
  color: #fff;
}

/* Diagnostic Boot Screen */
#diagnostic-boot-screen {
  position: fixed;
  inset: 0;
  background: #030509;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  color: var(--cyan-portal);
  padding: 2rem;
}
.boot-progress-bar {
  width: 320px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1.5rem;
}
.boot-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--cyan-portal);
  transition: width 0.1s linear;
}
