/* 
 * Chameleon Layout Engine for whyhere.net/explore
 *
 * 4 Pre-built responsive shells driven by [data-shell="..."]
 * 1. editorial_almanac (Swiss literary zine)
 * 2. boutique_catalog (Minimalist brutalist inventory)
 * 3. field_observation_log (Academic anthropological archive)
 * 4. procedural_sanctuary (Atmospheric node for late-night visitors)
 */

:root {
  --shell-bg: #F7F5F0;
  --shell-surface: #EBE6DD;
  --shell-text: #181816;
  --shell-accent: #9E3B24;
  --shell-border: rgba(0, 0, 0, 0.12);
  --font-serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Courier New", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Inter", sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--shell-bg);
  color: var(--shell-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ========================================================
   MICROFICHE / PRINT ALIGNMENT CALIBRATION LOADER
   ======================================================== */
.calibration-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  text-align: center;
  background-color: var(--shell-bg);
  transition: opacity 0.45s ease;
}

.calibration-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

.microfiche-frame {
  max-width: 580px;
  width: 100%;
  border: 1px solid var(--shell-border);
  padding: 3rem 2rem;
  background-color: var(--shell-surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.microfiche-header {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--shell-accent);
  margin-bottom: 1.5rem;
}

.microfiche-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.microfiche-gauge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--shell-text);
  opacity: 0.75;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--shell-accent);
  animation: pulseAnimation 1.4s infinite ease-in-out;
}

@keyframes pulseAnimation {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ========================================================
   MAIN SITE SKELETON
   ======================================================== */
.site-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem;
  display: none;
}

.site-header {
  border-bottom: 2px solid var(--shell-text);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.header-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--shell-border);
  margin-bottom: 1.25rem;
}

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.site-subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 0.5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 3rem;
  align-items: start;
}

/* ========================================================
   NODE ARTICLE CONTENT & TYPOGRAPHY
   ======================================================== */
.node-article {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.node-meta-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--shell-accent);
  margin-bottom: 0.5rem;
}

.node-headline {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.18;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.node-subhead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--shell-text);
  opacity: 0.9;
  line-height: 1.45;
  transition: opacity 0.4s ease;
}

.node-subhead.gaslight-transition {
  color: var(--shell-accent);
  font-weight: 600;
  animation: glowPulse 2s ease-in-out;
}

@keyframes glowPulse {
  0% { opacity: 0.2; }
  100% { opacity: 1; }
}

.node-body {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  font-size: 1.15rem;
  line-height: 1.75;
}

.lead-paragraph:first-of-type::first-letter {
  font-size: 3.5rem;
  float: left;
  line-height: 0.8;
  padding-right: 0.6rem;
  padding-top: 0.2rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--shell-accent);
}

.node-nav-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--shell-border);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nav-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.inline-narrative-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--shell-accent);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 4px;
  width: fit-content;
  transition: var(--transition-fast);
}

.inline-narrative-link:hover,
.inline-narrative-link:focus-visible {
  background-color: var(--shell-accent);
  color: #ffffff;
  transform: translateX(4px);
}

/* ========================================================
   SIDEBAR & WIDGET CARDS
   ======================================================== */
.content-aside {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-card {
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shell-accent);
  border-bottom: 1px solid var(--shell-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.widget-body {
  font-size: 0.95rem;
  line-height: 1.6;
}

.widget-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.widget-list li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.widget-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--shell-accent);
}

/* ========================================================
   FOOTER & LIVE FOOTNOTES
   ======================================================== */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--shell-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footnote-text {
  color: var(--shell-text);
  opacity: 0.85;
}

.footnote-warning {
  color: var(--shell-accent);
  font-weight: 600;
}

.live-marginalia {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: var(--shell-accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

.live-marginalia.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================================
   TECHNICAL REVEAL DOSSIER SECTION (#reveal-dossier)
   ======================================================== */
.reveal-dossier-section {
  margin-top: 4rem;
  padding: 2.5rem;
  background-color: var(--shell-surface);
  border: 2px solid var(--shell-accent);
}

.reveal-heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--shell-accent);
}

.reveal-intro {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 760px;
}

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

.dossier-card {
  border: 1px solid var(--shell-border);
  background-color: var(--shell-bg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dossier-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.dossier-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--shell-text);
  word-break: break-word;
}

.dossier-detail {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ========================================================
   SHELL 1: EDITORIAL ALMANAC (Swiss Literary Zine)
   ======================================================== */
body[data-shell="editorial_almanac"] {
  --font-serif: "Playfair Display", "Instrument Serif", "Georgia", serif;
}

body[data-shell="editorial_almanac"] .content-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 3.5rem;
}

body[data-shell="editorial_almanac"] .sidebar-card {
  border-left: 3px solid var(--shell-accent);
}

/* ========================================================
   SHELL 2: BOUTIQUE CATALOG (Minimalist Brutalist Store)
   ======================================================== */
body[data-shell="boutique_catalog"] {
  --shell-bg: #121214;
  --shell-surface: #1E1E22;
  --shell-text: #EDEDED;
  --shell-accent: #E05A47;
  --shell-border: #333338;
  --font-serif: "JetBrains Mono", monospace;
  --font-sans: "JetBrains Mono", monospace;
}

body[data-shell="boutique_catalog"] .site-header {
  border-bottom: 2px dashed var(--shell-accent);
}

body[data-shell="boutique_catalog"] .node-headline {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

body[data-shell="boutique_catalog"] .sidebar-card {
  border: 2px solid var(--shell-border);
}

body[data-shell="boutique_catalog"] .lead-paragraph:first-of-type::first-letter {
  all: unset;
}

/* ========================================================
   SHELL 3: FIELD OBSERVATION LOG (Academic Dossier)
   ======================================================== */
body[data-shell="field_observation_log"] {
  --shell-bg: #F4F3EF;
  --shell-surface: #E7E5DF;
  --shell-text: #212120;
  --shell-accent: #2B5B84;
  --shell-border: #D0CECA;
}

body[data-shell="field_observation_log"] .content-grid {
  grid-template-columns: 280px minmax(0, 1fr);
}

body[data-shell="field_observation_log"] .content-aside {
  order: -1;
  position: sticky;
  top: 2rem;
}

/* Redaction styling that reveals on hover */
.redacted {
  background-color: var(--shell-text);
  color: var(--shell-text);
  padding: 0 0.25rem;
  border-radius: 2px;
  cursor: help;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.redacted:hover {
  background-color: rgba(43, 91, 132, 0.15);
  color: var(--shell-accent);
}

/* ========================================================
   SHELL 4: PROCEDURAL SANCTUARY (Atmospheric Late Night)
   ======================================================== */
body[data-shell="procedural_sanctuary"] {
  --shell-bg: #0C0E14;
  --shell-surface: #151822;
  --shell-text: #D8DEE9;
  --shell-accent: #88C0D0;
  --shell-border: rgba(136, 192, 208, 0.15);
  background: radial-gradient(circle at 50% 0%, #171B26 0%, #0C0E14 70%);
}

body[data-shell="procedural_sanctuary"] .site-header {
  border-bottom: 1px solid var(--shell-accent);
}

body[data-shell="procedural_sanctuary"] .node-headline {
  text-shadow: 0 0 24px rgba(136, 192, 208, 0.25);
}

body[data-shell="procedural_sanctuary"] .sidebar-card {
  backdrop-filter: blur(8px);
  background-color: rgba(21, 24, 34, 0.7);
}

/* ========================================================
   DYNAMIC PER-NODE LAYOUT MODES & BESPOKE HTML ELEMENTS
   ======================================================== */

/* --- LAYOUT MODE: TERMINAL (Monochrome CRT Screen) --- */
body[data-layout="terminal"] {
  --shell-bg: #090B0E;
  --shell-surface: #10141B;
  --shell-text: #33FF33;
  --shell-accent: #00FF66;
  --shell-border: #1B3822;
  font-family: var(--font-mono);
}

body[data-layout="terminal"] .site-title,
body[data-layout="terminal"] .node-headline {
  font-family: var(--font-mono);
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}

.terminal-window {
  background-color: #06080A;
  border: 1px solid var(--shell-accent);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.15);
  margin-top: 1rem;
}

.terminal-bar {
  background-color: #111814;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--shell-border);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #33FF33;
  opacity: 0.7;
}

.term-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--shell-accent);
}

.terminal-screen {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  color: #33FF33;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
}

.term-line {
  margin-bottom: 0.4rem;
}

.term-line.prompt {
  color: #00FF66;
  font-weight: 700;
}

.term-line.output {
  opacity: 0.9;
  padding-left: 0.5rem;
}

.term-cursor {
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* --- LAYOUT MODE: DOSSIER (Declassified Surveillance Memo) --- */
body[data-layout="dossier"] {
  --shell-bg: #EAE6DC;
  --shell-surface: #DFD9CC;
  --shell-text: #222220;
  --shell-accent: #A62424;
  --shell-border: #BBB4A2;
}

.dossier-paper {
  background: #F4EFE6;
  border: 1px solid #C8C2B0;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  margin-top: 1.5rem;
}

.stamp-classified {
  display: inline-block;
  border: 3px solid #A62424;
  color: #A62424;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  padding: 0.4rem 0.85rem;
  transform: rotate(-2deg);
  margin-bottom: 1.5rem;
}

.dossier-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.dossier-table th {
  text-align: left;
  border-bottom: 2px solid #222220;
  padding: 0.5rem;
  background-color: rgba(0, 0, 0, 0.04);
}

.dossier-table td {
  border-bottom: 1px solid #D0CABA;
  padding: 0.6rem 0.5rem;
}

.dossier-note {
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.7;
}

/* --- LAYOUT MODE: OPTICAL (Subpixel Acuity Bench) --- */
body[data-layout="optical"] {
  --shell-bg: #000000;
  --shell-surface: #111111;
  --shell-text: #FFFFFF;
  --shell-accent: #FFFFFF;
  --shell-border: #333333;
}

.optical-bench {
  background-color: #050505;
  border: 1px solid #333;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.eye-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
}

.chart-line.line-1 { font-size: 3rem; }
.chart-line.line-2 { font-size: 2.25rem; }
.chart-line.line-3 { font-size: 1.5rem; opacity: 0.9; }
.chart-line.line-4 { font-size: 1rem; opacity: 0.8; letter-spacing: 0.15em; }
.chart-line.line-5 { font-size: 0.8rem; opacity: 0.7; letter-spacing: 0.1em; }
.chart-line.line-6 { font-size: 0.65rem; opacity: 0.5; letter-spacing: 0.05em; }

.grating-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.ronchi-grating {
  width: 100%;
  height: 60px;
  background: repeating-linear-gradient(
    90deg,
    #FFFFFF,
    #FFFFFF 2px,
    #000000 2px,
    #000000 4px
  );
  border: 1px solid #444;
}

.grating-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.6;
}

/* --- LAYOUT MODE: ACOUSTIC (Silicon Resonance Chamber) --- */
body[data-layout="acoustic"] {
  --shell-bg: #0D1117;
  --shell-surface: #161B22;
  --shell-text: #C9D1D9;
  --shell-accent: #58A6FF;
  --shell-border: #30363D;
}

.acoustic-chamber {
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  padding: 2rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

.frequency-meter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.meter-dial {
  background-color: var(--shell-bg);
  border: 1px solid var(--shell-border);
  padding: 1.25rem;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.meter-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.meter-freq {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--shell-accent);
}

.audio-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.audio-toggle-btn {
  background-color: var(--shell-accent);
  color: #0D1117;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.audio-toggle-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.audio-toggle-btn.active {
  background-color: #FF5555;
  color: #FFFFFF;
}

.audio-hint {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --- SVG SILICON & ROUTE BOX STYLING --- */
.bespoke-hardware-teardown {
  margin-top: 1.5rem;
}

.schematic-panel {
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

.silicon-svg {
  width: 100%;
  height: auto;
  min-width: 480px;
}

.bespoke-annotation {
  font-size: 0.95rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.network-route-box {
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  padding: 1.5rem;
  border-radius: 6px;
  margin-top: 1.5rem;
}

.route-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--shell-accent);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
}

.ascii-route {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre;
}

/* ========================================================
   ORIGIN & REFERRER INTERCEPT ARTIFACTS
   ======================================================== */
.origin-intercept-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 6px;
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  font-family: var(--font-mono);
}

.origin-intercept-card .intercept-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.origin-intercept-card .origin-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.origin-intercept-card .origin-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--shell-border);
}

.origin-intercept-card .intercept-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.origin-intercept-card .intercept-meta strong {
  font-size: 0.9rem;
  color: var(--shell-accent);
  letter-spacing: 0.05em;
}

.origin-intercept-card .intercept-meta span {
  font-size: 0.8rem;
  opacity: 0.8;
}

.origin-intercept-card .intercept-desc {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  opacity: 0.85;
  line-height: 1.45;
}

.github-intercept { border-left: 4px solid #24292e; }
.hn-intercept { border-left: 4px solid #ff6600; }
.reddit-intercept { border-left: 4px solid #ff4500; }
.x-intercept { border-left: 4px solid #1d9bf0; }
.google-intercept { border-left: 4px solid #4285f4; }
.whyhere-intercept { border-left: 4px solid var(--shell-accent); }
.direct-intercept { border-left: 4px solid #888888; }

.stealth-radar-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--shell-accent);
  display: inline-block;
  animation: pulseAnimation 1.5s infinite;
}

.dossier-favicon {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  margin-left: 0.4rem;
  border-radius: 3px;
  display: inline-block;
}

/* ========================================================
   EXPANDED CHAMELEON SHELLS: 6 RADICALLY DIVERSE PARADIGMS
   ======================================================== */

/* --- SHELL 5: HACKER BBS TERMINAL (Retro Phosphor CRT Workspace) --- */
body[data-shell="hacker_bbs_terminal"] {
  --shell-bg: #050805;
  --shell-surface: #0a110a;
  --shell-text: #33ff66;
  --shell-accent: #00ff66;
  --shell-border: #153318;
  font-family: var(--font-mono);
  background-color: #050805;
  background-image: radial-gradient(circle at 50% 50%, #0d1a0d 0%, #050805 100%);
}

body[data-shell="hacker_bbs_terminal"] .site-header {
  border: 1px solid var(--shell-border);
  background-color: #0b140b;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.1);
}

body[data-shell="hacker_bbs_terminal"] .site-title {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.6);
}

body[data-shell="hacker_bbs_terminal"] .node-headline {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}

/* --- SHELL 6: CLASSIFIED SURVEILLANCE DESK (Cold War Manila Dossier) --- */
body[data-shell="classified_surveillance_desk"] {
  --shell-bg: #D8D0C0;
  --shell-surface: #EFE9DC;
  --shell-text: #1E1E1C;
  --shell-accent: #B22222;
  --shell-border: #B8AC96;
  font-family: "Courier Prime", monospace;
  background: #CFC5B2;
}

body[data-shell="classified_surveillance_desk"] .site-wrapper {
  background-color: #FAF6ED;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), inset 0 0 80px rgba(184, 172, 150, 0.2);
  border: 1px solid #B4A68C;
  border-top: 14px solid #B22222;
  position: relative;
}

body[data-shell="classified_surveillance_desk"] .site-title {
  font-family: "Courier Prime", monospace;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* --- SHELL 7: BRUTALIST ANTI-DESIGN (Avant-Garde Kinetic Cyber-Zine) --- */
body[data-shell="brutalist_anti_design"] {
  --shell-bg: #DFFF00;
  --shell-surface: #FFFFFF;
  --shell-text: #000000;
  --shell-accent: #000000;
  --shell-border: #000000;
  font-family: var(--font-mono);
}

body[data-shell="brutalist_anti_design"] .site-wrapper {
  background-color: #DFFF00;
  border: 4px solid #000000;
  box-shadow: 12px 12px 0 #000000;
}

body[data-shell="brutalist_anti_design"] .site-header {
  background-color: #000000;
  color: #DFFF00;
  padding: 1.5rem;
  border-bottom: 4px solid #000000;
}

body[data-shell="brutalist_anti_design"] .site-title {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 3rem;
  color: #DFFF00;
  text-transform: uppercase;
}

body[data-shell="brutalist_anti_design"] .sidebar-card,
body[data-shell="brutalist_anti_design"] .node-article {
  border: 3px solid #000000;
  background-color: #FFFFFF;
  box-shadow: 6px 6px 0 #000000;
}

/* --- SHELL 8: ASTRONOMICAL ALMANAC (1888 Celestial Engraving Press) --- */
body[data-shell="astronomical_almanac"] {
  --shell-bg: #F4EFE6;
  --shell-surface: #EAE3D2;
  --shell-text: #201D1A;
  --shell-accent: #7A2818;
  --shell-border: #C8BEA8;
  font-family: "Playfair Display", "Georgia", serif;
}

body[data-shell="astronomical_almanac"] .site-wrapper {
  border: 2px solid #8C7C60;
  outline: 6px double #C8BEA8;
  outline-offset: -8px;
  background-color: #FAF7F0;
}

body[data-shell="astronomical_almanac"] .node-headline {
  font-family: "Instrument Serif", serif;
  font-size: 2.8rem;
  font-style: italic;
}

body[data-shell="astronomical_almanac"] .lead-paragraph:first-of-type::first-letter {
  font-size: 3.8rem;
  float: left;
  line-height: 0.85;
  padding-right: 0.75rem;
  color: var(--shell-accent);
  font-family: "Playfair Display", serif;
}

/* ========================================================
   LIVING INTERACTIVE WIDGETS
   ======================================================== */

/* --- INTERACTIVE TERMINAL CLI EMULATOR --- */
.terminal-interactive-box {
  background-color: #060907;
  border: 1px solid #1a3820;
  box-shadow: 0 0 25px rgba(0, 255, 102, 0.12);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.terminal-output {
  padding: 1.25rem;
  max-height: 280px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #33ff66;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0.2) 1px,
    transparent 1px,
    transparent 2px
  );
}

.terminal-output .prompt {
  color: #00ff66;
  font-weight: 700;
  margin-top: 0.5rem;
}

.terminal-output .prompt-hint {
  opacity: 0.7;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.terminal-output .error {
  color: #ff5555;
}

.term-link {
  color: #00ffff;
  text-decoration: underline;
  cursor: pointer;
}

.terminal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background-color: #0b140d;
  border-top: 1px solid #1a3820;
  border-bottom: 1px solid #1a3820;
}

.term-chip {
  background-color: #122416;
  color: #33ff66;
  border: 1px solid #234d28;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.term-chip:hover {
  background-color: #00ff66;
  color: #060907;
}

.terminal-form {
  display: flex;
  align-items: center;
  background-color: #060907;
  padding: 0.65rem 1rem;
  gap: 0.5rem;
}

.term-prompt-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #00ff66;
  font-weight: 700;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #33ff66;
}

/* --- REAL-TIME WEBAUDIO OSCILLOSCOPE --- */
.oscilloscope-canvas {
  width: 100%;
  max-width: 600px;
  height: 120px;
  background-color: #090e0b;
  border: 1px solid #1b3822;
  border-radius: 6px;
  display: block;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

/* --- CLASSIFIED REDACTION SCRATCH-OFF --- */
.redacted-wipe {
  background-color: #1a1a18;
  color: transparent;
  padding: 0 0.4rem;
  border-radius: 2px;
  user-select: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  display: inline-block;
}

.redacted-wipe:hover,
.redacted-wipe.uncovered {
  background-color: rgba(178, 34, 34, 0.15);
  color: #B22222;
  user-select: text;
}

/* --- SPEECH SYNTHESIS WHISPER BUTTON --- */
.speech-whisper-btn {
  background-color: transparent;
  color: var(--shell-accent);
  border: 1px solid var(--shell-accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.speech-whisper-btn:hover {
  background-color: var(--shell-accent);
  color: var(--shell-bg);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.3);
}

.speech-whisper-btn.speaking {
  background-color: #FF5555;
  color: #FFFFFF;
  border-color: #FF5555;
  animation: pulseSpeech 1s infinite alternate;
}

@keyframes pulseSpeech {
  from { transform: scale(1); box-shadow: 0 0 5px #FF5555; }
  to { transform: scale(1.03); box-shadow: 0 0 18px #FF5555; }
}

/* --- SHANNON ENTROPY / UNIQUENESS GAUGE --- */
.entropy-gauge {
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.entropy-title {
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.entropy-val {
  color: var(--shell-accent);
}

.entropy-uniqueness {
  color: #00ffff;
  font-weight: 600;
}

/* --- WEBRTC TRANSCEIVER BOX --- */
.webrtc-box {
  background-color: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--shell-accent);
  padding: 0.6rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dossier-action-bar {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--shell-border);
}

/* ========================================================
   RANDOM VISUAL PLATES & MULTI-SOURCE GALLERY STRIPS
   ======================================================== */
.random-visual-plate {
  margin: 1.5rem 0;
  border: 1px solid var(--shell-border);
  background-color: var(--shell-surface);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.visual-plate-frame {
  position: relative;
  width: 100%;
  background: #0c0e12;
  overflow: hidden;
}

.visual-plate-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease, transform 0.5s ease;
}

.visual-plate-frame:hover .visual-plate-img {
  transform: scale(1.015);
}

.visual-plate-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.plate-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #e5e7eb;
  letter-spacing: 0.08em;
}

.plate-shuffle-btn,
.strip-refresh-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.15s ease;
}

.plate-shuffle-btn:hover,
.strip-refresh-btn:hover {
  background: var(--shell-accent);
  border-color: var(--shell-accent);
  transform: translateY(-1px);
}

.visual-plate-caption {
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  opacity: 0.85;
}

.visual-plate-caption a {
  color: var(--shell-accent);
  text-decoration: underline;
}

.random-gallery-strip {
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 6px;
}

.gallery-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--shell-accent);
  margin-bottom: 0.85rem;
}

.gallery-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.strip-cell {
  border: 1px solid var(--shell-border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--shell-bg);
}

.strip-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.strip-tag {
  display: block;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.8;
}

/* ========================================================
   LOCAL AREA NEWS WIRE INTERCEPT CARD
   ======================================================== */
.local-news-intercept-card {
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem;
  background-color: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-left: 4px solid var(--shell-accent);
  border-radius: 5px;
  font-family: var(--font-mono);
}

.news-wire-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
  color: var(--shell-accent);
}

.wire-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseAnimation 1.4s infinite;
}

.wire-source-tag {
  margin-left: auto;
  font-size: 0.7rem;
  opacity: 0.75;
}

.news-wire-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.wire-bullet {
  color: var(--shell-accent);
  margin-right: 0.35rem;
}

/* ========================================================
   INTERACTIVE TOY CHAMBERS (DARKROOM, SHORTWAVE, THEREMIN,
   COLLIDER, TAROT, CIPHER, SIGNAL LOCK)
   ======================================================== */
.toy-darkroom-lab,
.toy-shortwave-rig,
.toy-theremin-chamber,
.toy-collider-box,
.toy-tarot-table,
.toy-cipher-desk,
.toy-signal-lock {
  margin: 1.5rem 0;
  padding: 1.35rem;
  background-color: #0b0e14;
  color: #e5e7eb;
  border: 1px solid #262f3f;
  border-radius: 8px;
  font-family: var(--font-mono);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.darkroom-toolbar,
.theremin-header,
.collider-toolbar,
.tarot-controls-bar,
.cipher-header,
.signal-lock-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #1f2937;
  font-size: 0.8rem;
}

.darkroom-filter-group,
.collider-mode-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.darkroom-btn,
.collider-mode-btn,
.darkroom-new-photo-btn,
.theremin-power-btn,
.collider-burst-btn,
.tarot-shuffle-btn,
.cipher-crack-btn,
.signal-autosync-btn,
.shortwave-audio-btn {
  background: #161f2e;
  color: #e5e7eb;
  border: 1px solid #334155;
  padding: 0.38rem 0.7rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.darkroom-btn.active,
.collider-mode-btn.active,
.theremin-power-btn.active,
.shortwave-audio-btn.active,
.darkroom-new-photo-btn:hover,
.tarot-shuffle-btn:hover,
.cipher-crack-btn:hover,
.signal-autosync-btn:hover,
.collider-burst-btn:hover {
  background: #00ff88;
  color: #050806;
  border-color: #00ff88;
}

.darkroom-viewport {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #05070a;
  border: 1px solid #1e293b;
}

.darkroom-main-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease, filter 0.15s ease;
}

.darkroom-hud {
  position: absolute;
  bottom: 0.5rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  font-size: 0.7rem;
  color: #00ff88;
}

.darkroom-sliders,
.signal-lock-sliders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.slider-control {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
}

.darkroom-source-links {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #1f2937;
  font-size: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.darkroom-source-links a {
  color: #38bdf8;
}

/* Shortwave Radio */
.shortwave-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #050a08;
  border: 1px solid #163a24;
  padding: 0.85rem 1.15rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

.freq-number {
  font-size: 2rem;
  font-weight: 800;
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.freq-unit {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-left: 0.4rem;
}

.signal-strength-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 24px;
}

.sig-bar {
  width: 6px;
  height: 40%;
  background: #1f2937;
  border-radius: 2px;
}
.sig-bar:nth-child(2) { height: 55%; }
.sig-bar:nth-child(3) { height: 70%; }
.sig-bar:nth-child(4) { height: 85%; }
.sig-bar:nth-child(5) { height: 100%; }
.sig-bar.active {
  background: #00ff88;
  box-shadow: 0 0 6px #00ff88;
}

.shortwave-tuner-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.shortwave-slider {
  flex: 1;
}

.shortwave-decode-box {
  background: #07100c;
  border: 1px solid #1b432c;
  padding: 0.9rem 1rem;
  border-radius: 5px;
}

.decode-status {
  font-size: 0.72rem;
  color: #00ff88;
  margin-bottom: 0.35rem;
}

.decode-message {
  font-size: 0.92rem;
  color: #f3f4f6;
  line-height: 1.5;
}

/* Theremin & Collider & Signal Lock Canvas */
.theremin-canvas,
.collider-canvas,
.signal-lock-canvas {
  width: 100%;
  height: 240px;
  background: #05080d;
  border: 1px solid #1e293b;
  border-radius: 6px;
  display: block;
  cursor: crosshair;
}

.theremin-readout,
.collider-footer {
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #93c5fd;
}

/* Tarot Spread */
.tarot-spread-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.tarot-card {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.tarot-card:hover {
  transform: translateY(-4px);
  border-color: #00ff88;
}

.tarot-card-front {
  padding: 2rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
}

.tarot-card.flipped .tarot-card-front {
  display: none;
}

.tarot-card-back {
  display: none;
}

.tarot-card.flipped .tarot-card-back {
  display: block;
}

.tarot-numeral {
  font-size: 0.85rem;
  color: #f59e0b;
}

.tarot-glyph {
  font-size: 2.4rem;
  color: #00ff88;
}

.tarot-art {
  width: 100%;
  height: 135px;
  object-fit: cover;
  display: block;
}

.tarot-reading {
  padding: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.tarot-reading strong {
  display: block;
  color: #f59e0b;
  margin-bottom: 0.3rem;
}

/* Cipher Desk */
.cipher-wheel-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
}

.cipher-screen {
  background: #050806;
  border: 1px solid #1b3b24;
  color: #00ff88;
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  line-height: 1.55;
  word-break: break-word;
}

.cipher-status {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: #fbbf24;
}

.cipher-status.decrypted {
  color: #00ff88;
  font-weight: 700;
}

.signal-unlock-reward {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid #00ff88;
  border-radius: 6px;
  color: #00ff88;
  font-size: 0.82rem;
}

/* Sidebar Reality Control Deck */
.reality-btn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0.85rem 0;
}

.reality-action-btn {
  background: var(--shell-accent);
  color: #ffffff;
  border: none;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.reality-action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.toy-launcher-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.45rem;
}

.toy-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.toy-nav-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.28rem 0.55rem;
  background: var(--shell-bg);
  color: var(--shell-text);
  border: 1px solid var(--shell-border);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.toy-nav-chip:hover {
  background: var(--shell-accent);
  color: #ffffff;
}

/* ========================================================
   DYNAMIC LOADING RITUALS (#calibration-screen)
   ======================================================== */
.calib-ritual-canvas {
  width: 100%;
  max-width: 420px;
  height: 140px;
  margin: 1.25rem auto;
  display: block;
  background: #06080c;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.ritual-reticle {
  background-color: #070508;
  color: #f3e8ee;
}
.ritual-reticle .microfiche-frame {
  background-color: #0e0a10;
  border-color: #ff3355;
  box-shadow: 0 0 35px rgba(255, 51, 85, 0.16);
}

.ritual-shortwave {
  background-color: #040906;
  color: #d1fae5;
}
.ritual-shortwave .microfiche-frame {
  background-color: #07120c;
  border-color: #00ff88;
  box-shadow: 0 0 35px rgba(0, 255, 136, 0.14);
}

.ritual-hexboot {
  background-color: #050505;
  color: #38bdf8;
}
.ritual-hexboot .microfiche-frame {
  background-color: #0a0f16;
  border-color: #0284c7;
}
.calib-hex-stream {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: left;
  background: #03070b;
  color: #38bdf8;
  padding: 0.85rem 1rem;
  border: 1px solid #1e293b;
  border-radius: 4px;
  margin: 1.15rem 0;
  overflow-x: auto;
}

.ritual-deaddrop .calib-redact-strip {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin: 1.25rem 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.08);
  border: 1px dashed var(--shell-border);
}
.calib-blackout {
  background: var(--shell-text);
  color: var(--shell-text);
  padding: 0 0.25rem;
  user-select: none;
}

.calib-moire-grid {
  width: 100%;
  height: 110px;
  margin: 1.25rem 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--shell-border);
  background: repeating-radial-gradient(
    circle at 50% 50%,
    transparent 0,
    transparent 4px,
    var(--shell-text) 5px,
    transparent 6px
  );
}
.calib-moire-layer {
  position: absolute;
  inset: -20%;
  background: repeating-radial-gradient(
    circle at 48% 52%,
    transparent 0,
    transparent 5px,
    var(--shell-accent) 6px,
    transparent 7px
  );
  animation: moireDrift 5s infinite alternate ease-in-out;
}
@keyframes moireDrift {
  0% { transform: translate(-8px, -4px) rotate(0deg) scale(1); }
  100% { transform: translate(10px, 6px) rotate(6deg) scale(1.06); }
}

.calib-eye-ring {
  width: 96px;
  height: 96px;
  margin: 1.35rem auto;
  border-radius: 50%;
  border: 2px solid var(--shell-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(158, 59, 36, 0.25);
  animation: eyeBreathe 2.6s infinite ease-in-out;
}
.calib-eye-pupil {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--shell-text);
}
@keyframes eyeBreathe {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.12); }
}

/* ========================================================
   DYNAMIC STRUCTURAL TOPOLOGIES (body[data-topology="..."])
   Breaks rigid layout structure so each visit/node mutates
   the spatial framework of the site itself.
   ======================================================== */

/* 1. MONOLITH: Single narrow altar column, aside cards scattered below in a horizontal strip */
body[data-topology="topology-monolith"] .site-wrapper {
  max-width: 780px;
}
body[data-topology="topology-monolith"] .content-grid {
  grid-template-columns: 1fr;
  gap: 2.25rem;
}
body[data-topology="topology-monolith"] .content-aside {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  border-top: 2px solid var(--shell-border);
  padding-top: 1.5rem;
}

/* 2. INVERTED: Aside telemetry column on the left, header compressed at bottom-right */
body[data-topology="topology-inverted"] .content-grid {
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 2.5rem;
}
body[data-topology="topology-inverted"] .content-aside {
  order: -1;
}
body[data-topology="topology-inverted"] .site-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  border-bottom-style: dashed;
}

/* 3. PANOPTICON: Wide full-bleed command grid with floating peripheral cards */
body[data-topology="topology-panopticon"] .site-wrapper {
  max-width: 1440px;
}
body[data-topology="topology-panopticon"] .content-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 2rem;
}
body[data-topology="topology-panopticon"] .node-header {
  border-left: 4px solid var(--shell-accent);
  padding-left: 1.25rem;
}

/* 4. SCATTER: Offset asymmetric zine layout with slight angular tension */
body[data-topology="topology-scatter"] .node-article {
  padding: 1.25rem;
  border: 1px dashed var(--shell-border);
}
body[data-topology="topology-scatter"] .sidebar-card:nth-child(odd) {
  transform: translateX(-6px);
}
body[data-topology="topology-scatter"] .sidebar-card:nth-child(even) {
  transform: translateX(6px);
}

/* 5. FRACTURE: Split-horizon layout where header and pathways fracture across columns */
body[data-topology="topology-fracture"] .site-header {
  border-bottom: none;
  border-left: 6px solid var(--shell-text);
  padding-left: 1.5rem;
  margin-bottom: 1.75rem;
}
body[data-topology="topology-fracture"] .node-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* ========================================================
   DISCOVERABLE BEHAVIORAL & ENVIRONMENTAL LEDGER (node_ledger)
   ======================================================== */
.subtle-ledger-trigger {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(158, 59, 36, 0.45);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.subtle-ledger-trigger:hover {
  color: var(--shell-accent);
  border-bottom-color: var(--shell-accent);
}

.toy-ledger-dossier {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: #090c12;
  color: #e5e7eb;
  border: 1px solid #263142;
  border-radius: 8px;
  font-family: var(--font-mono);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
}

.ledger-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid #1e293b;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.ledger-live-badge {
  color: #ef4444;
  font-weight: 700;
  animation: pulseAnimation 1.4s infinite;
}

.ledger-canvas-wrap {
  margin-bottom: 1.35rem;
}

.ledger-trajectory-canvas {
  width: 100%;
  height: 220px;
  background: #05080c;
  border: 1px solid #1e293b;
  border-radius: 6px;
  display: block;
}

.ledger-canvas-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.45rem;
}

.ledger-grid-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.ledger-panel {
  background: #0d131c;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 1rem;
}

.ledger-panel.ledger-full-width {
  margin-top: 0.5rem;
}

.ledger-panel-title {
  font-size: 0.75rem;
  color: #00ff88;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed #1e293b;
}

.ledger-kv-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.76rem;
}

.ledger-kv-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.ledger-kv-list dt {
  color: #94a3b8;
}

.ledger-kv-list dd {
  color: #f8fafc;
  font-weight: 600;
  text-align: right;
}

.ledger-trail-box {
  font-size: 0.78rem;
  color: #38bdf8;
  line-height: 1.5;
  padding: 0.5rem;
  background: #06090e;
  border: 1px solid #1e293b;
  border-radius: 4px;
  word-break: break-word;
}

.ledger-sub-note {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.ledger-matrix-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.65rem 1.25rem;
  font-size: 0.75rem;
}

.ledger-matrix-table > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ledger-matrix-table span {
  color: #94a3b8;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.ledger-matrix-table strong {
  color: #e2e8f0;
  font-weight: 500;
}

/* ========================================================
   PALIMPSEST (residue of the previous visit)
   ======================================================== */
.palimpsest-ghost {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  mix-blend-mode: difference;
}

.palimpsest-whisper {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 41;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 2.5s ease;
}
.palimpsest-whisper.visible {
  opacity: 0.55;
}
.palimpsest-whisper:hover {
  opacity: 1;
}
.palimpsest-whisper a {
  color: var(--shell-text);
  text-decoration: none;
}
.palimpsest-erase {
  background: none;
  border: none;
  color: var(--shell-text);
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ========================================================
   RESPONSIVE LAYOUT & MOBILE FIXES
   ======================================================== */
@media (max-width: 860px) {
  .site-wrapper {
    padding: 1rem 0.75rem;
  }

  /* Force single column on mobile, overcoming topology specificity */
  body[data-topology] .content-grid,
  body[data-shell] .content-grid,
  .content-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  body[data-topology="topology-inverted"] .content-main,
  body[data-topology="topology-panopticon"] .content-main,
  .content-main {
    order: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .content-aside {
    order: 1 !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body[data-shell="field_observation_log"] .content-aside {
    order: 1 !important;
    position: static !important;
  }

  .site-title {
    font-size: 2rem;
  }

  .node-headline {
    font-size: 1.7rem;
  }

  /* Responsive interactive canvases */
  .signal-lock-canvas,
  .signal-canvas,
  #signal-lock-canvas,
  .radar-canvas,
  .wiretap-canvas,
  .astrolabe-canvas,
  .seismo-canvas,
  .trajectory-canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    touch-action: none !important;
  }

  .signal-slider-row,
  .darkroom-sliders,
  .shortwave-tuner-row {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  /* Enlarge range slider touch thumbs on mobile */
  input[type="range"] {
    min-height: 44px;
  }
}

/* ========================================================
   AMBIENT PROCEDURAL CANVAS BACKDROP
   ======================================================== */
.ambient-backdrop-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.75;
}

/* ========================================================
   SIGNAL CLEARANCE HUD & BADGES
   ======================================================== */
.clearance-hud-pill {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  z-index: 100;
  background: rgba(14, 18, 24, 0.88);
  border: 1px solid var(--shell-accent, #00ff88);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), 0 0 10px rgba(0, 255, 136, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--shell-text, #e4e4e7);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clearance-hud-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55), 0 0 14px rgba(0, 255, 136, 0.35);
}

.clearance-hud-pill .hud-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clearance-hud-pill .hud-icon {
  color: var(--shell-accent, #00ff88);
  font-size: 0.85rem;
}

.clearance-hud-pill .hud-label {
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.clearance-hud-pill .hud-counter {
  background: var(--shell-accent, #00ff88);
  color: #000;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.clearance-hud-pill .hud-sigils-strip {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.clearance-hud-pill .hud-sigil-tag {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.45);
  color: #00ff88;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
}

.clearance-hud-pill .hud-empty {
  opacity: 0.5;
  font-size: 0.65rem;
}

@media (max-width: 640px) {
  .clearance-hud-pill {
    top: auto;
    bottom: 0.85rem;
    right: 0.85rem;
    font-size: 0.65rem;
    padding: 0.25rem 0.65rem;
  }
  .clearance-hud-pill .hud-sigils-strip {
    display: none;
  }
}

/* Clearance Restricted Node Screen */
.clearance-restricted-node {
  background: rgba(20, 10, 10, 0.92);
  border: 1px solid #d94e3b;
  border-radius: 8px;
  padding: 2.5rem 1.75rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(217, 78, 59, 0.25);
}

.clearance-lock-seal .lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.clearance-lock-seal .lock-explanation {
  max-width: 520px;
  margin: 1.25rem auto 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* ========================================================
   TOUCH & MOBILE CONTROLS (PHASE SHIFT PUZZLE)
   ======================================================== */
.toy-signal-lock {
  background: rgba(8, 12, 16, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.signal-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: #38bdf8;
}

.signal-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #38bdf8;
  transition: all 0.3s ease;
}

.signal-badge.locked {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.signal-canvas {
  width: 100%;
  height: 200px;
  background: #04070a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  display: block;
  touch-action: none;
  cursor: grab;
}

.signal-canvas:active {
  cursor: grabbing;
}

.signal-controls {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.signal-slider-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.signal-slider-row .slider-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 65px;
}

.stepper-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: background 0.15s ease;
}

.stepper-btn:hover,
.stepper-btn:active {
  background: var(--shell-accent, #00ff88);
  color: #000;
}

.signal-slider,
input[type="range"] {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--shell-accent, #00ff88);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
  cursor: pointer;
}

.signal-sync-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
}

.signal-sync-btn:hover {
  background: #38bdf8;
  color: #000;
}

.signal-unlock-reward,
.radar-unlock-reward,
.wiretap-unlock-reward,
.astrolabe-unlock-reward,
.breach-unlock-reward,
.seismo-unlock-reward,
.anomaly-unlock-reward {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid #00ff88;
  border-radius: 4px;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  animation: rewardPulse 2s infinite ease-in-out;
}

@keyframes rewardPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(0, 255, 136, 0.2); }
  50% { box-shadow: 0 0 18px rgba(0, 255, 136, 0.45); }
}

/* ========================================================
   THE 6 PROCEDURAL DOM ARCHITECTURES
   ======================================================== */

/* 1. ARCH-CONSOLE */
.arch-console {
  background: #0d1117;
  border: 1px solid #238636;
  border-radius: 8px;
  box-shadow: inset 0 0 24px rgba(0, 255, 136, 0.08), 0 8px 30px rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  overflow: hidden;
}

.console-top-strip {
  background: #161b22;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.console-status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

.console-status-led.blinking {
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.console-grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

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

.telemetry-hex-dump {
  background: #040608;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: #38bdf8;
  margin-bottom: 1rem;
}

/* 2. ARCH-BROADSHEET */
.arch-broadsheet {
  background: #fbf9f4;
  color: #1a1a1a;
  border: 2px solid #2a2a2a;
  padding: 2rem 1.75rem;
  font-family: var(--font-serif, "Playfair Display", Georgia, serif);
}

.broadsheet-masthead {
  border-bottom: 3px double #222;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.broadsheet-top-line,
.broadsheet-dateline {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid #444;
  padding: 0.35rem 0;
  margin-bottom: 0.65rem;
}

.broadsheet-title {
  font-size: 2.85rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0.5rem 0;
}

.broadsheet-columns-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1.75rem;
}

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

.broadsheet-prose.with-drop-caps p:first-of-type::first-letter {
  font-size: 3.5rem;
  float: left;
  line-height: 0.8;
  margin: 0.1rem 0.5rem 0 0;
  font-weight: 900;
}

.broadsheet-weather-box {
  border: 1px solid #222;
  padding: 0.85rem;
  background: #f3efe6;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
}

/* 3. ARCH-SPATIAL-MAP */
.arch-spatial-map {
  background: #080d14;
  border: 1px solid #00a8ff;
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.spatial-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 168, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 255, 0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.spatial-coords-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #00a8ff;
  font-weight: 700;
}

.spatial-compass-rose {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 168, 255, 0.12);
  border: 1px solid #00a8ff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

/* 4. ARCH-DECK */
.arch-deck {
  background: #110e1a;
  border: 1px solid #a855f7;
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.15);
}

.deck-arcana-sigil {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #c084fc;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.deck-cards-spread {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.deck-card {
  background: #1e192c;
  border: 1px solid #7e22ce;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.deck-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.deck-card .card-glyph {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: #d8b4fe;
}

.deck-card .card-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.deck-card .card-desc {
  font-size: 0.78rem;
  opacity: 0.85;
}

/* 5. ARCH-DOSSIER */
.arch-dossier {
  background: #2b261f;
  color: #ece8df;
  border: 1px solid #8c7653;
  border-radius: 6px;
  padding: 2rem 1.75rem;
  position: relative;
  font-family: var(--font-mono, monospace);
}

.dossier-folder-tab {
  position: absolute;
  top: -24px;
  left: 20px;
  background: #8c7653;
  color: #000;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.25rem 0.85rem;
  border-radius: 4px 4px 0 0;
}

.dossier-stamp-classified {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  border: 3px solid #d94e3b;
  color: #d94e3b;
  font-weight: 900;
  font-size: 1.3rem;
  padding: 0.25rem 0.85rem;
  transform: rotate(-12deg);
  letter-spacing: 0.1em;
  opacity: 0.85;
}

.dossier-metadata-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  border-top: 1px dashed #8c7653;
  border-bottom: 1px dashed #8c7653;
  padding: 0.5rem 0;
  margin: 1rem 0 1.5rem;
  font-size: 0.75rem;
  color: #d4a373;
}

/* 6. ARCH-SANCTUM */
.arch-sanctum {
  background: #0a0a0c;
  border: 1px solid #eab308;
  border-radius: 8px;
  padding: 2rem 1.75rem;
  text-align: center;
}

.sanctum-sacred-geometry {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

.geometry-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(234, 179, 8, 0.45);
  border-radius: 50%;
  animation: rotateSlow 24s infinite linear;
}

.geometry-ring.ring-inner {
  inset: 12px;
  border-style: solid;
  border-color: rgba(234, 179, 8, 0.75);
  animation-direction: reverse;
  animation-duration: 16s;
}

.geometry-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #eab308;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================================
   THE 6 NEW INTERACTIVE TOY/GAME CHAMBERS
   ======================================================== */

/* RADAR SCOPE */
.toy-radar-scope {
  background: #040806;
  border: 1px solid #00ff88;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.radar-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 0.75rem;
}

.radar-canvas {
  width: 100%;
  height: 280px;
  display: block;
  border-radius: 4px;
}

.radar-controls {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
}

.radar-ping-btn {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid #00ff88;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
}

/* WIRETAP RIG */
.toy-wiretap-rig {
  background: #080c12;
  border: 1px solid #38bdf8;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.wiretap-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  margin-bottom: 0.75rem;
}

.wiretap-canvas {
  width: 100%;
  height: 180px;
  display: block;
  border-radius: 4px;
}

.wiretap-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.wiretap-output-terminal {
  background: #030508;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.85rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.5;
}

/* ASTROLABE STATION */
.toy-astrolabe-station {
  background: #0a0805;
  border: 1px solid #c59b27;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.astrolabe-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e0c068;
  margin-bottom: 0.75rem;
}

.astrolabe-canvas {
  width: 100%;
  height: 260px;
  display: block;
  border-radius: 4px;
}

.astrolabe-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* BREACH DECK */
.toy-breach-deck {
  background: #0d0f14;
  border: 1px solid #f43f5e;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
}

.breach-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  color: #f43f5e;
}

.breach-buffer {
  background: #181d24;
  border: 1px solid #f43f5e;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
}

.breach-matrix-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-width: 360px;
  margin: 0 auto;
}

.breach-cell {
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 0;
  border-radius: 4px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.breach-cell.selectable {
  border-color: #f43f5e;
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.12);
}

.breach-cell.selectable:hover {
  background: #f43f5e;
  color: #000;
}

.breach-matrix-grid.breach-success .breach-cell {
  border-color: #00ff88;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.15);
}

/* SEISMOGRAPH BAY */
.toy-seismograph-bay {
  background: #080a0f;
  border: 1px solid #06b6d4;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.seismo-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #06b6d4;
  margin-bottom: 0.75rem;
}

.seismo-canvas {
  width: 100%;
  height: 190px;
  display: block;
  border-radius: 4px;
}

.seismo-controls {
  margin-top: 1rem;
}

/* ANOMALY LAB */
.toy-anomaly-lab {
  background: #0f1117;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
}

.anomaly-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.anomaly-comparator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .anomaly-comparator-grid {
    grid-template-columns: 1fr;
  }
}

.anomaly-plate-pane {
  background: #1a1e27;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.anomaly-plate-pane .pane-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.anomaly-plate-pane .pane-frame {
  position: relative;
}

.comparator-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.comparator-img.decaying-intercept {
  animation: anomaly-exposure-decay 7s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes anomaly-exposure-decay {
  0% {
    filter: brightness(1) contrast(1) saturate(1);
    opacity: 1;
  }
  15% {
    filter: brightness(1.2) contrast(1.1) saturate(1.05);
    opacity: 0.98;
  }
  50% {
    filter: brightness(0.72) contrast(1.3) saturate(0.55) sepia(0.3);
    opacity: 0.85;
  }
  85% {
    filter: brightness(0.42) contrast(1.6) saturate(0.2) sepia(0.65) hue-rotate(180deg);
    opacity: 0.65;
  }
  100% {
    filter: brightness(0.22) contrast(1.9) saturate(0.05) sepia(0.85) hue-rotate(220deg);
    opacity: 0.45;
  }
}

.anomaly-hotspot {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.3s ease;
}

.anomaly-hotspot.hotspot-1 { top: 22%; left: 32%; }
.anomaly-hotspot.hotspot-2 { top: 58%; left: 66%; }
.anomaly-hotspot.hotspot-3 { top: 72%; left: 16%; }

.anomaly-hotspot.found {
  border: 1px solid rgba(255, 68, 68, 0.4);
  background: radial-gradient(circle, rgba(255, 68, 68, 0.25) 0%, transparent 70%);
}

/* LIVE TELEMETRY & KINEMATICS SIDEBAR MONITOR */
.reality-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.live-telemetry-monitor-card {
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(8, 13, 22, 0.85);
}

.live-monitor-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.monitor-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 0.25rem;
}

.monitor-row span {
  color: #94a3b8;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.monitor-row strong {
  color: #38bdf8;
  text-align: right;
  font-weight: 600;
}

.monitor-dossier-link {
  display: block;
  text-align: center;
  padding: 0.45rem 0.6rem;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 4px;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.monitor-dossier-link:hover {
  background: rgba(0, 255, 136, 0.22);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.25);
}

/* SEISMOGRAPH 8-STEP PULSE SEQUENCER & EXTRA CONTROLS */
.seismo-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.seismo-slider {
  flex: 1;
}

.seismo-power-btn,
.wiretap-btn {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid #06b6d4;
  color: #67e8f9;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.seismo-sequencer {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.seismo-step-btn {
  background: #111827;
  border: 1px solid #334155;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.45rem 0;
  border-radius: 4px;
  cursor: pointer;
  touch-action: manipulation;
}

.seismo-step-btn.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: #06b6d4;
  color: #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

/* ========================================================
   SEALED CONVERGENCE VAULT & GRAND FINALE REVEAL
   ======================================================== */
.vault-gate-sealed-node {
  background: radial-gradient(circle at 50% 10%, rgba(35, 12, 12, 0.95), rgba(10, 8, 12, 0.98));
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  padding: 2.5rem 1.75rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7), 0 0 32px rgba(239, 68, 68, 0.2);
  margin-bottom: 2.5rem;
}

.vault-gate-header {
  text-align: center;
  margin-bottom: 2rem;
}

.vault-lock-crest {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.6));
}

.vault-clearance-pill {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.vault-gate-briefing {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #e2e8f0;
}

.vault-warning-text {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #fca5a5;
  font-family: var(--font-mono);
  text-align: left;
}

.vault-chambers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.vault-chamber-card {
  background: rgba(18, 22, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.vault-chamber-card:hover {
  transform: translateY(-2px);
}

.vault-chamber-card.locked {
  border-color: rgba(239, 68, 68, 0.35);
}

.vault-chamber-card.unlocked {
  border-color: rgba(0, 255, 136, 0.5);
  background: rgba(8, 28, 20, 0.75);
}

.vault-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.vault-card-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  opacity: 0.6;
}

.vault-card-sigil {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
}

.vault-chamber-card.unlocked .vault-card-sigil {
  color: #00ff88;
}

.vault-card-title {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: #f8fafc;
}

.vault-card-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.vault-card-status {
  margin-top: auto;
}

.vault-status-tag.verified {
  display: inline-block;
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid #00ff88;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.vault-chamber-link {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.vault-chamber-link:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.vault-gate-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================================
   GRAND FINALE REVEAL NODE
   ======================================================== */
.grand-finale-reveal-node {
  background: radial-gradient(circle at 50% 5%, rgba(6, 32, 24, 0.95), rgba(8, 12, 16, 0.98));
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 12px;
  padding: 3rem 2rem;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 255, 136, 0.25);
  margin-bottom: 3rem;
}

.finale-hero-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.finale-crest-icon {
  font-size: 3.8rem;
  color: #00ff88;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.6));
}

.finale-status-pill {
  display: inline-block;
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid #00ff88;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.4rem 1.25rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.finale-mission-statement {
  background: rgba(12, 20, 24, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  font-size: 1.05rem;
  color: #cbd5e1;
}

.finale-section-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #38bdf8;
  letter-spacing: 0.08em;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 0.5rem;
}

.finale-quote {
  border-left: 3px solid #00ff88;
  background: rgba(0, 255, 136, 0.08);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 0;
  color: #a7f3d0;
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

.finale-medals-banner {
  background: rgba(8, 16, 20, 0.9);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.finale-medals-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: #00ff88;
  margin: 0 0 1.25rem;
}

.finale-sigils-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.75rem;
}

.finale-sigil-medal {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.finale-sigil-medal .medal-glyph {
  color: #00ff88;
  font-size: 1.1rem;
}

.finale-sigil-medal .medal-tag {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  color: #00ff88;
}

.finale-sigil-medal .medal-name {
  font-size: 0.7rem;
  color: #94a3b8;
  text-align: center;
}

.finale-dossier-wrap {
  margin-bottom: 2.5rem;
}

.finale-dossier-subhead {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: -0.5rem 0 1.5rem;
}

.finale-dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.finale-dossier-panel {
  background: rgba(14, 18, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.25rem;
}

.dossier-panel-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #f1f5f9;
  margin: 0 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
}

.dossier-kv-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.85rem;
}

.dossier-kv-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.dossier-kv-list dt {
  color: #94a3b8;
  font-weight: 500;
}

.dossier-kv-list dd {
  font-family: var(--font-mono);
  color: #38bdf8;
  font-weight: 600;
  text-align: right;
  margin: 0;
}

.finale-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.finale-btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.finale-btn-primary {
  background: #00ff88;
  color: #041208;
  border: 1px solid #00ff88;
}

.finale-btn-primary:hover {
  background: #00cc6a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.4);
}

.finale-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid #ef4444;
}

.finale-btn-danger:hover {
  background: rgba(239, 68, 68, 0.35);
}

.finale-btn-secondary {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
}

.finale-btn-secondary:hover {
  background: #334155;
}

/* ========================================================
   FANO PLANE MINIMAP & PROJECTIVE TOPOLOGY
   ======================================================== */
.fano-plane-card {
  background: rgba(10, 16, 22, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.fano-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.fano-spotit-badge {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.fano-svg-container {
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
}

.fano-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.fano-line {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1.5;
  fill: none;
}

.fano-line.fano-edge {
  stroke: rgba(56, 189, 248, 0.4);
}

.fano-line.fano-median {
  stroke: rgba(0, 255, 136, 0.35);
}

.fano-line.fano-incircle {
  stroke: rgba(245, 158, 11, 0.4);
  stroke-dasharray: 4, 3;
}

.fano-node-group {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.fano-node-group:hover .fano-point-circle {
  fill: #38bdf8;
  stroke: #fff;
  r: 16;
}

.fano-point-circle {
  fill: #0f172a;
  stroke: #38bdf8;
  stroke-width: 1.8;
  transition: all 0.2s ease;
}

.fano-point-text {
  fill: #f8fafc;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}

.fano-node-group.active .fano-point-circle {
  fill: #00ff88;
  stroke: #fff;
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.8));
  animation: fano-pulse 2s infinite ease-in-out;
}

.fano-node-group.active .fano-point-text {
  fill: #022c22;
}

@keyframes fano-pulse {
  0%, 100% { stroke-width: 2; }
  50% { stroke-width: 4; stroke: #38bdf8; }
}

.fano-caption {
  font-size: 0.72rem;
  line-height: 1.4;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.65rem;
}

/* ========================================================
   IP ADDRESS INGRESS TUMBLER COMBINATION LOCK (node_combolock)
   ======================================================== */
.toy-combolock-bay {
  background: radial-gradient(circle at 50% 20%, rgba(30, 24, 12, 0.95), rgba(8, 10, 14, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  padding: 1.75rem 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.15);
}

.combolock-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 1.5rem;
}

.combolock-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.combolock-badge.locked {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.combolock-dials-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tumbler-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.tumbler-wheel {
  width: 68px;
  height: 64px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 50%, #1e293b 100%);
  border: 2px solid #fbbf24;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 10px rgba(245, 158, 11, 0.3);
}

.tumbler-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.05em;
}

.tumbler-step-btn {
  background: #1e293b;
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tumbler-step-btn:hover {
  background: #fbbf24;
  color: #0f172a;
}

.octet-dot {
  font-size: 2rem;
  color: #fbbf24;
  align-self: center;
}

.combolock-clue-bar {
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

.combolock-unlock-reward {
  margin-top: 1.25rem;
  padding: 0.85rem;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid #00ff88;
  border-radius: 6px;
  text-align: center;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ========================================================
   MUNICIPAL CAD BLOTTER & HISTORICAL CADASTRE (node_municipal)
   ======================================================== */
.toy-municipal-blotter {
  background: rgba(14, 18, 24, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.municipal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 1rem;
}

.cad-live-badge {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid #00ff88;
  color: #00ff88;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.municipal-wiki-card {
  background: rgba(30, 41, 59, 0.4);
  border-left: 3px solid #38bdf8;
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0 6px 6px 0;
}

.wiki-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #f1f5f9;
}

.wiki-card-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #94a3b8;
}

.cad-filter-bar {
  margin-bottom: 1rem;
}

.cad-search-input {
  width: 100%;
  background: #090d12;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
}

.cad-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.cad-dispatch-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
}

.cad-entry-row {
  background: #090d12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
}

.cad-timestamp {
  color: #38bdf8;
  font-weight: 700;
  white-space: nowrap;
}

.cad-text {
  color: #cbd5e1;
}

/* ========================================================
   FANO MAP RECONNAISSANCE CHAMBER (node_fanomap)
   ======================================================== */
.toy-fanomap-chamber {
  background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.95), rgba(4, 8, 16, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.12);
}

.fanomap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 1.25rem;
}

.fanomap-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.fanomap-recon-dispatch {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
}

.fanomap-svg-wrap {
  display: flex;
  justify-content: center;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.fanomap-svg-wrap .fano-plane-card {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: 360px;
  width: 100%;
}

.fanomap-intel-card {
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.fanomap-intel-card h4 {
  color: #38bdf8;
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
}

.fanomap-warning-text {
  color: #f87171;
  margin-top: 0.75rem;
  line-height: 1.45;
}

.fanomap-chambers-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fanomap-chambers-index span {
  color: #94a3b8;
  font-size: 0.75rem;
  width: 100%;
}

.fanomap-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.fanomap-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

/* ========================================================
   HISTORIC CADASTRE CHRONOMETER (node_chronometer)
   ======================================================== */
.toy-chronometer-station {
  background: radial-gradient(circle at 50% 20%, rgba(40, 30, 10, 0.95), rgba(12, 10, 6, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  padding: 1.75rem 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(245, 158, 11, 0.15);
}

.chrono-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 1.5rem;
}

.chrono-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.chrono-badge.locked {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.chrono-drums-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.chrono-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.chrono-step-btn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chrono-step-btn:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #fbbf24;
}

.chrono-wheel {
  background: #000000;
  border: 2px solid #d97706;
  border-radius: 6px;
  width: 54px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.chrono-action-row {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.chrono-lever-btn {
  background: linear-gradient(180deg, #b45309, #78350f);
  border: 1px solid #f59e0b;
  color: #fef3c7;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.chrono-lever-btn:hover {
  background: linear-gradient(180deg, #d97706, #92400e);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.chrono-unlock-reward {
  margin-top: 1.25rem;
  padding: 0.85rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid #00ff88;
  border-radius: 6px;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
}

/* ========================================================
   HELMHOLTZ MAGNETIC COIL (node_helmholtz)
   ======================================================== */
.toy-helmholtz-bay {
  background: radial-gradient(circle at 50% 20%, rgba(10, 20, 35, 0.95), rgba(4, 8, 16, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 1.75rem 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15);
}

.helmholtz-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 1rem;
}

.helmholtz-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.helmholtz-badge.locked {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.helmholtz-canvas {
  width: 100%;
  max-width: 580px;
  height: 220px;
  display: block;
  margin: 0 auto 1.25rem auto;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
}

.helmholtz-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.helmholtz-slider {
  flex: 1;
  max-width: 320px;
  accent-color: #38bdf8;
}

.helmholtz-readout {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #38bdf8;
  min-width: 60px;
}

.helmholtz-unlock-reward {
  margin-top: 1.25rem;
  padding: 0.85rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid #00ff88;
  border-radius: 6px;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
}

/* ========================================================
   AUDIO DAC RESONANT BRIDGE (node_bridge)
   ======================================================== */
.toy-bridge-deck {
  background: radial-gradient(circle at 50% 20%, rgba(6, 25, 20, 0.95), rgba(2, 10, 8, 0.98));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 10px;
  padding: 1.75rem 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.15);
}

.bridge-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 1rem;
}

.bridge-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.bridge-badge.locked {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.bridge-canvas {
  width: 100%;
  max-width: 580px;
  height: 220px;
  display: block;
  margin: 0 auto 1.25rem auto;
  background: #010a06;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
}

.bridge-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.bridge-slider {
  flex: 1;
  max-width: 280px;
  accent-color: #10b981;
}

.bridge-readout {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #10b981;
  min-width: 65px;
}

.bridge-unlock-reward {
  margin-top: 1.25rem;
  padding: 0.85rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid #00ff88;
  border-radius: 6px;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
}

/* ========================================================
   TELEPRINTER WIRE RELAY (node_teleprinter)
   ======================================================== */
.toy-teleprinter-bay {
  background: radial-gradient(circle at 50% 20%, rgba(30, 20, 15, 0.95), rgba(10, 8, 6, 0.98));
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 10px;
  padding: 1.75rem 1.25rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(249, 115, 22, 0.15);
}

.teleprinter-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #f97316;
  margin-bottom: 1rem;
}

.teleprinter-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.teleprinter-badge.locked {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.teleprinter-tape-window {
  background: #0a0805;
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.teleprinter-tape {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #fdba74;
  white-space: pre-wrap;
  word-break: break-all;
}

.teleprinter-dialer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.dialer-buffer-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #94a3b8;
}

.dialer-digits {
  color: #fb923c;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.15em;
}

.dialer-clear-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.dialer-keys-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 320px;
}

.dial-key-btn {
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fdba74;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dial-key-btn:hover {
  background: rgba(249, 115, 22, 0.35);
  border-color: #fb923c;
  color: #ffffff;
}

.dial-key-submit {
  background: linear-gradient(180deg, #ea580c, #c2410c);
  border: 1px solid #f97316;
  color: #fff7ed;
  padding: 0 1rem;
  height: 44px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.teleprinter-unlock-reward {
  margin-top: 1.25rem;
  padding: 0.85rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid #00ff88;
  border-radius: 6px;
  color: #00ff88;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
}





