/* ==============================================================================
   AL-RAZZI OS — MASTERCLASS SCIENTIFIC & ARCHITECTURAL MONOGRAPH
   Design System: Clinical Precision × Editorial Magazine × Reactive 3D Instrument
   Palette: Obsidian Ink (#070B0F) · Optical Ice (#8AD4E6) · Clinical Verdigris (#6FD1B0) · Rhazes Brass (#D8B278)
   Typography: Space Grotesk · Newsreader (Editorial Serif) · DM Sans · IBM Plex Mono · IBM Plex Sans Arabic
   ============================================================================== */

:root {
  /* Core Surfaces */
  --canvas: #070b0f;
  --canvas-deep: #04070a;
  --surface: #0d151d;
  --surface-raised: #13202b;
  --surface-elevated: #182836;
  --surface-overlay: rgba(10, 17, 24, 0.92);
  --surface-glass: rgba(13, 21, 29, 0.74);

  /* Architectural Hairlines & Borders */
  --line: rgba(208, 228, 236, 0.11);
  --line-light: rgba(208, 228, 236, 0.22);
  --line-strong: #2f4754;
  --border: rgba(208, 228, 236, 0.16);

  /* Editorial Ink & Accents */
  --text: #ecf2f5;
  --text-pure: #ffffff;
  --off-white: #f4f8fa;
  --obsidian: #070b0f;
  --muted: #95a8b3;
  --titanium: #849ba8;
  --c-titanium-muted: #849ba8;
  --c-titanium-bright: #d7e7ee;

  /* Chromatic Instrument Signals */
  --ice: #8ad4e6;
  --ice-bright: #b6ebfa;
  --ice-glow: rgba(138, 212, 230, 0.32);
  --accent: #8ad4e6;

  --safe: #6fd1b0;
  --safe-glow: rgba(111, 209, 176, 0.26);

  --amber: #d8b278;
  --caution: #d8b278;
  --caution-glow: rgba(216, 178, 120, 0.24);

  --danger: #e87a7a;
  --danger-glow: rgba(232, 122, 122, 0.22);

  /* Typography Stacks */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-arabic: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'DM Sans', sans-serif;

  /* Geometry & Motion */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --space-unit: 8px;
  --masthead-height: 36px;
  --header-height: 70px;
  --trans: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);

  font-synthesis: none;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--canvas);
  scroll-padding-top: 112px;
}

body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Selection styling */
::selection {
  background: rgba(138, 212, 230, 0.28);
  color: var(--text-pure);
}

/* Arabic RTL Typography Override */
html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: var(--font-arabic);
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .serif-italic {
  font-family: var(--font-arabic);
  font-style: normal;
  line-height: 1.3;
  letter-spacing: 0 !important;
}

/* Ambient Atmospheric Light Wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 80% 14%, rgba(138, 212, 230, 0.085) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 12% 38%, rgba(216, 178, 120, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 92%, rgba(111, 209, 176, 0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: -2;
}

/* Fine Architectural Blueprint Grid */
.site-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.14;
  background-image:
    linear-gradient(to right, transparent calc(100% - 1px), rgba(138, 212, 230, 0.16) 100%),
    linear-gradient(to bottom, transparent calc(100% - 1px), rgba(138, 212, 230, 0.16) 100%);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 15%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 15%, transparent 95%);
}

/* Screen Reader Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 9999;
  background: var(--ice);
  color: var(--obsidian);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: var(--radius-xs);
  text-decoration: none;
}
.skip-link:focus {
  left: 20px;
}

/* Reading Progress Hairline */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--amber) 0%, var(--ice) 52%, var(--safe) 100%);
  box-shadow: 0 0 12px var(--ice-glow);
  z-index: 1000;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* Layout Container */
.section-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: clamp(20px, 4.5vw, 76px);
  padding-right: clamp(20px, 4.5vw, 76px);
  position: relative;
  z-index: 2;
}

/* ==============================================================================
   EDITORIAL TYPOGRAPHY & MAGAZINE ACCENTS
   ============================================================================== */
h1, h2, h3, h4 {
  color: var(--text-pure);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
}

h1 em, h2 em, .serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ice);
  letter-spacing: -0.015em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast), opacity var(--trans-fast), border-color var(--trans-fast), background var(--trans-fast);
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
}

.eyebrow, .micro {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--titanium);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(208, 228, 236, 0.12);
  background: rgba(13, 21, 29, 0.65);
  backdrop-filter: blur(8px);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 10px var(--safe);
  flex-shrink: 0;
}

.status-dot.pulse {
  animation: pulse-dot 2.4s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* ==============================================================================
   EDITORIAL JOURNAL MASTHEAD RIBBON
   ============================================================================== */
.editorial-masthead {
  min-height: var(--masthead-height);
  padding: 6px clamp(20px, 4.5vw, 76px);
  background: rgba(4, 7, 10, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--titanium);
  position: relative;
  z-index: 102;
}

.masthead-left,
.masthead-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.masthead-issue {
  color: var(--amber);
  font-weight: 600;
}

.masthead-sep {
  opacity: 0.35;
}

.masthead-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--safe);
}

.reader-mode-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(19, 32, 43, 0.65);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
}

.reader-mode-btn {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--muted);
  transition: all var(--trans-fast);
}

.reader-mode-btn.active {
  background: var(--ice);
  color: var(--obsidian);
  font-weight: 600;
}

/* Concise Reader Mode (hides deep raw tables/1000 cards when user selects Visual Primer mode) */
body.reader-mode-concise .deep-monograph-section {
  display: none;
}

/* ==============================================================================
   MASTER STICKY TOPBAR & NAVIGATION
   ============================================================================== */
.topbar {
  min-height: var(--header-height);
  padding: 0 clamp(20px, 4.5vw, 76px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(7, 11, 15, 0.84);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition: background var(--trans), box-shadow var(--trans);
}

.topbar.scrolled {
  background: rgba(5, 9, 13, 0.95);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  letter-spacing: 0.08em;
  color: var(--text-pure);
  flex-shrink: 0;
}

.brandmark {
  display: inline-grid;
  place-items: center;
  height: 36px;
  width: 36px;
  border: 1px solid rgba(138, 212, 230, 0.45);
  border-radius: 9px;
  color: var(--ice);
  font-size: 1.15rem;
  font-weight: 700;
  background: radial-gradient(circle at 35% 25%, #203947 0%, #0a1218 85%);
  box-shadow: inset 0 0 12px rgba(138, 212, 230, 0.2), 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform var(--trans), border-color var(--trans);
}

.brand:hover .brandmark {
  transform: rotate(-4deg) scale(1.05);
  border-color: var(--ice);
}

.brand span i {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--amber);
  font-weight: 500;
  font-size: 0.98em;
  margin-inline-start: 3px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
}

.primary-nav a {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.03em;
  padding: 8px 4px;
  position: relative;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--text-pure);
}

.primary-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ice), var(--safe));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--trans);
}

.primary-nav a:hover::after,
.primary-nav a.active::after {
  transform: scaleX(1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cmd-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-light);
  background: rgba(19, 32, 43, 0.55);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  transition: all var(--trans-fast);
}

.cmd-trigger-btn:hover {
  border-color: var(--ice);
  color: var(--text-pure);
  background: var(--surface-raised);
}

.cmd-trigger-btn kbd {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(7, 11, 15, 0.85);
  border: 1px solid var(--line);
  color: var(--ice);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(13, 21, 29, 0.75);
  border-radius: var(--radius-sm);
  padding: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.lang-btn {
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  color: var(--muted);
  transition: all var(--trans-fast);
}

.lang-btn.active {
  background: var(--surface-elevated);
  color: var(--ice);
  font-weight: 600;
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  border: 1px solid rgba(138, 212, 230, 0.35);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  background: linear-gradient(135deg, rgba(24, 40, 54, 0.8), rgba(13, 21, 29, 0.9));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-cta:hover {
  border-color: var(--ice);
  color: var(--ice);
  box-shadow: 0 0 18px rgba(138, 212, 230, 0.2);
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ==============================================================================
   FLOATING CHAPTER INDEX RAIL (MAGAZINE MARGINALIA)
   ============================================================================== */
.chapter-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 6px;
  border-radius: 999px;
  background: rgba(7, 11, 15, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

html[dir="rtl"] .chapter-rail {
  right: auto;
  left: 18px;
}

.chapter-rail a {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--titanium);
  position: relative;
  transition: all var(--trans-fast);
}

.chapter-rail a:hover,
.chapter-rail a.active {
  background: var(--ice);
  color: var(--obsidian);
  font-weight: 700;
  box-shadow: 0 0 12px var(--ice-glow);
}

.chapter-rail a::before {
  content: attr(data-label);
  position: absolute;
  right: 36px;
  white-space: nowrap;
  background: rgba(7, 11, 15, 0.95);
  border: 1px solid var(--line-light);
  color: var(--text-pure);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.66rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: all var(--trans-fast);
}

html[dir="rtl"] .chapter-rail a::before {
  right: auto;
  left: 36px;
  transform: translateX(-6px);
}

.chapter-rail a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 1360px) {
  .chapter-rail {
    display: none;
  }
}

/* ==============================================================================
   BUTTONS & INTERACTIVE ACTIONS
   ============================================================================== */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  min-height: 48px;
  transition: transform var(--trans), background var(--trans), border-color var(--trans), box-shadow var(--trans), color var(--trans);
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: linear-gradient(135deg, #dff4fa 0%, #9ad9e9 100%);
  color: #061017;
  border: 1px solid #b6ebfa;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(138, 212, 230, 0.2);
}

.button-primary:hover {
  background: linear-gradient(135deg, #ffffff 0%, #c2eef9 100%);
  box-shadow: 0 10px 30px rgba(138, 212, 230, 0.36);
}

.button-secondary {
  border: 1px solid var(--line-light);
  background: rgba(13, 21, 29, 0.78);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.button-secondary:hover {
  background: var(--surface-raised);
  border-color: var(--ice);
  color: var(--ice);
}

.button-ghost {
  border: 1px solid rgba(216, 178, 120, 0.28);
  background: rgba(216, 178, 120, 0.06);
  color: var(--amber);
}

.button-ghost:hover {
  color: var(--text-pure);
  border-color: var(--amber);
  background: rgba(216, 178, 120, 0.16);
}

/* ==============================================================================
   HERO MAGAZINE COVER & 3D INSTRUMENT STAGE
   ============================================================================== */
.hero {
  min-height: calc(100vh - var(--header-height) - var(--masthead-height));
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.05fr);
  align-items: center;
  padding-top: 44px;
  padding-bottom: 72px;
  gap: clamp(28px, 4vw, 56px);
  position: relative;
}

.hero-shader-wrap {
  position: absolute;
  inset: 0 -4vw;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  opacity: 0.38;
  mask-image: radial-gradient(ellipse 80% 75% at 62% 48%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 62% 48%, #000 10%, transparent 78%);
}

#hero-shader-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-copy {
  z-index: 10;
}

.hero h1 {
  font-size: clamp(2.9rem, 5.4vw, 5.75rem);
  line-height: 0.97;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
  font-weight: 600;
}

.hero h1 span[data-i18n="hero_h1_1"],
.hero h1 span[data-i18n="hero_h1_3"] {
  color: var(--text-pure);
}

.hero h1 span[data-i18n="hero_h1_2"] {
  color: var(--muted);
  font-weight: 400;
}

.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ice);
  text-shadow: 0 0 36px rgba(138, 212, 230, 0.25);
}

.hero-deck {
  max-width: 560px;
  font-size: clamp(1.02rem, 1.22vw, 1.16rem);
  line-height: 1.72;
  color: #b5c6cf;
  margin-bottom: 28px;
}

/* Interactive Hero Fact Ledger Strip */
.hero-ledger-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 28px 0 30px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(11, 18, 25, 0.78);
  backdrop-filter: blur(12px);
}

.ledger-metric {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  transition: all var(--trans-fast);
}

.ledger-metric:hover {
  background: rgba(138, 212, 230, 0.08);
  border-color: rgba(138, 212, 230, 0.28);
  transform: translateY(-2px);
}

.ledger-metric strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.1;
}

.ledger-metric span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--titanium);
  text-transform: uppercase;
  margin-top: 4px;
}

.hero-footnote {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--titanium);
  letter-spacing: 0.09em;
  margin-top: 28px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.foot-sep {
  color: var(--line-strong);
  padding: 0 4px;
}

/* 3D System Stage & Controls */
.hero-system {
  min-width: 0;
  position: relative;
  z-index: 5;
}

.orb-shell {
  width: 100%;
  height: min(44vw, 540px);
  min-height: 420px;
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(138, 212, 230, 0.24);
  background:
    radial-gradient(circle at 50% 45%, rgba(22, 40, 54, 0.55) 0%, rgba(7, 11, 15, 0.95) 78%);
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 48px rgba(0, 0, 0, 0.65);
}

.orb-shell::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(138, 212, 230, 0.1);
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
}

#orb-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: grab;
}

#orb-canvas:active {
  cursor: grabbing;
}

#orb-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Fallback 2D schematic */
.orb-fallback {
  position: absolute;
  inset: 8%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.orb-fallback .fallback-rings {
  width: 65%;
  height: 65%;
  position: absolute;
  border: 1px dashed rgba(138, 212, 230, 0.35);
  border-radius: 50%;
}

.orb-fallback .r1 { transform: rotate(30deg) scaleX(0.5); }
.orb-fallback .r2 { transform: rotate(-35deg) scaleY(0.45); }
.orb-fallback .r3 { transform: rotate(85deg) scaleX(0.65); }

.fallback-core {
  border: 1px solid var(--ice);
  border-radius: 50%;
  height: 110px;
  width: 110px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--ice);
  background: radial-gradient(circle at 40% 30%, #1e353f 0%, #0d151c 70%);
  box-shadow: 0 0 30px rgba(138, 212, 230, 0.25);
}

.orbit-crosshair {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ice);
  opacity: 0.45;
  z-index: 3;
  pointer-events: none;
}
.orbit-crosshair-tl { top: 16px; left: 18px; }
.orbit-crosshair-tr { top: 16px; right: 18px; }
.orbit-crosshair-bl { bottom: 44px; left: 18px; }
.orbit-crosshair-br { bottom: 44px; right: 18px; }

.orb-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  color: var(--ice);
  border: 1px solid var(--line-light);
  background: rgba(7, 11, 15, 0.86);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  z-index: 4;
  pointer-events: none;
}
.top-chip { top: 16px; right: 18px; }
.bottom-chip { bottom: 46px; left: 18px; color: var(--muted); }

.orb-tooltip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -120%);
  z-index: 12;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-pure);
  border: 1px solid var(--ice);
  background: rgba(7, 11, 15, 0.94);
  padding: 7px 13px;
  white-space: nowrap;
  border-radius: var(--radius-xs);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 14px rgba(138, 212, 230, 0.25);
  pointer-events: none;
}

.orb-phase-indicator {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--titanium);
  background: rgba(7, 11, 15, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-light);
  padding: 5px 11px;
  border-radius: var(--radius-xs);
}

.orb-phase-indicator.active {
  color: var(--ice);
  border-color: var(--ice);
}

.orb-phase-indicator.verified {
  color: var(--safe);
  border-color: var(--safe);
}

.orb-exploded-hud {
  position: absolute;
  top: 50px;
  left: 18px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--amber);
  background: rgba(13, 21, 29, 0.9);
  border: 1px solid var(--amber);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  pointer-events: none;
  display: none;
  z-index: 6;
  text-align: center;
}

.orb-exploded-hud.active {
  display: block;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* 3D Evidence Core Telemetry HUD */
.orb-telemetry-hud {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(7, 11, 15, 0.88);
  border: 1px solid rgba(138, 212, 230, 0.22);
  border-radius: var(--radius-xs);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--titanium);
  z-index: 8;
  pointer-events: none;
}

.orb-telemetry-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.orb-telemetry-item strong {
  color: var(--ice);
  font-weight: 600;
}

/* Selected Domain Card beneath 3D Core */
.orb-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  margin-top: 12px;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color var(--trans);
}

.orb-context:hover {
  border-color: var(--line-light);
}

.orb-context h2 {
  font-size: 1.18rem;
  margin: 4px 0 3px;
  font-weight: 600;
  color: var(--text-pure);
}

.orb-context p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.orb-context-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.orb-context a,
.orb-filter-jump {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ice);
  border: 1px solid rgba(138, 212, 230, 0.3);
  background: rgba(138, 212, 230, 0.06);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition: all var(--trans-fast);
}

.orb-context a:hover,
.orb-filter-jump:hover {
  border-color: var(--ice);
  background: rgba(138, 212, 230, 0.16);
  color: var(--text-pure);
}

.orb-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px 0;
}

.orb-controls-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orb-controls-nav button {
  border: 1px solid var(--line-light);
  background: var(--surface);
  color: var(--text);
  width: 34px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  transition: all var(--trans-fast);
}

.orb-controls-nav button:hover {
  border-color: var(--ice);
  color: var(--ice);
  background: var(--surface-raised);
}

#orb-index {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ice);
  min-width: 54px;
  text-align: center;
  font-weight: 600;
}

.orb-mode-select {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.orb-mode-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 6px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-xs);
  color: var(--muted);
  transition: all var(--trans-fast);
}

.orb-mode-btn:hover {
  border-color: var(--line-light);
  color: var(--text-pure);
}

.orb-mode-btn.active {
  background: var(--surface-elevated);
  border-color: var(--ice);
  color: var(--ice);
  font-weight: 600;
}

#btn-mode-exploded.active {
  border-color: var(--amber) !important;
  color: var(--amber) !important;
  background: rgba(216, 178, 120, 0.16) !important;
  box-shadow: 0 0 16px rgba(216, 178, 120, 0.3);
}

/* Shading & Camera Controls Bar */
.orb-shading-bar {
  width: 100%;
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.orb-shading-btn {
  background: rgba(13, 21, 29, 0.85);
  border: 1px solid var(--line);
  color: var(--titanium);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.orb-shading-btn:hover {
  border-color: var(--ice);
  color: var(--off-white);
  background: rgba(138, 212, 230, 0.12);
}

.orb-shading-btn.active {
  border-color: var(--ice);
  color: var(--obsidian);
  background: var(--ice);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(138, 212, 230, 0.32);
}

/* ==============================================================================
   EDITORIAL MAGAZINE SPREAD: THE 60-SECOND VISUAL PRIMER & KERNEL MESH
   ============================================================================== */
.editorial-primer {
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--line);
}

.magazine-spread {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.editorial-article h2 {
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.editorial-lead {
  font-size: 1.08rem;
  line-height: 1.82;
  color: #c5d4dc;
  margin-bottom: 20px;
}

/* Authentic Magazine Drop Cap */
html[lang="en"] .editorial-lead.dropcap::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 4.1rem;
  line-height: 0.82;
  padding-right: 14px;
  padding-top: 6px;
  color: var(--amber);
  font-weight: 600;
}

.editorial-body {
  font-size: 0.96rem;
  line-height: 1.78;
  color: var(--muted);
  margin-bottom: 24px;
}

.editorial-pullquote {
  margin: 28px 0;
  padding: 22px 26px;
  border-inline-start: 3px solid var(--amber);
  background: linear-gradient(90deg, rgba(216, 178, 120, 0.08) 0%, transparent 100%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.editorial-pullquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1.7vw, 1.48rem);
  line-height: 1.45;
  color: var(--text-pure);
  margin-bottom: 8px;
}

.editorial-pullquote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  text-transform: uppercase;
}

/* Interactive Paradigm Comparator Card */
.comparator-panel {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #101b24 0%, #0a1117 100%);
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.comparator-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: rgba(5, 9, 13, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}

.comparator-tab {
  padding: 10px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  transition: all var(--trans-fast);
}

.comparator-tab.active[data-comp="governed"] {
  background: rgba(111, 209, 176, 0.16);
  color: var(--safe);
  border: 1px solid rgba(111, 209, 176, 0.45);
  font-weight: 600;
}

.comparator-tab.active[data-comp="ungoverned"] {
  background: rgba(232, 122, 122, 0.15);
  color: var(--danger);
  border: 1px solid rgba(232, 122, 122, 0.45);
  font-weight: 600;
}

.comp-flow-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comp-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(13, 21, 29, 0.75);
  transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.comp-step:hover {
  transform: translateX(4px);
  border-color: var(--line-light);
}

.comp-step-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.comp-step.good .comp-step-badge {
  background: rgba(111, 209, 176, 0.14);
  color: var(--safe);
  border: 1px solid rgba(111, 209, 176, 0.35);
}

.comp-step.bad .comp-step-badge {
  background: rgba(232, 122, 122, 0.14);
  color: var(--danger);
  border: 1px solid rgba(232, 122, 122, 0.35);
}

.comp-step h4 {
  font-size: 0.96rem;
  margin-bottom: 4px;
}

.comp-step p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Interactive 5-Kernel Teaming Mesh Matrix */
.kernel-mesh-bar {
  margin-top: 56px;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(16, 27, 37, 0.9), rgba(9, 15, 21, 0.95));
}

.kernel-mesh-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.kernel-pills-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.kernel-node-btn {
  text-align: start;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
}

.kernel-node-btn:hover,
.kernel-node-btn.active {
  border-color: var(--ice);
  background: var(--surface-raised);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.kernel-node-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ice), var(--safe));
}

.kernel-node-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ice);
  display: block;
  margin-bottom: 6px;
}

.kernel-node-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-pure);
  display: block;
  margin-bottom: 4px;
}

.kernel-node-role {
  font-size: 0.76rem;
  color: var(--muted);
  display: block;
  line-height: 1.4;
}

.kernel-inspector-readout {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(138, 212, 230, 0.22);
  background: rgba(6, 10, 14, 0.78);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.kernel-inspector-readout p {
  font-size: 0.88rem;
  color: var(--text);
  max-width: 760px;
}

.kernel-inspector-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--safe);
}

/* ==============================================================================
   STATEMENT / CORE PRINCIPLE
   ============================================================================== */
.statement {
  padding-top: 84px;
  padding-bottom: 92px;
  border-top: 1px solid var(--line);
}

.statement-line {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 3.05rem);
  line-height: 1.24;
  letter-spacing: -0.035em;
  max-width: 1220px;
  margin-bottom: 48px;
  font-weight: 500;
}

.statement-line span {
  color: var(--muted);
}

.statement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.statement-card {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(18, 30, 40, 0.88) 0%, rgba(11, 18, 25, 0.96) 100%);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}

.statement-card:hover {
  border-color: rgba(138, 212, 230, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.statement-card .micro {
  color: var(--ice);
  margin-bottom: 12px;
  display: block;
}

.statement-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.statement-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

.statement-card code,
.statement-card pre {
  display: block;
  margin-top: 14px;
  padding: 11px 14px;
  background: rgba(5, 9, 13, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ice);
  overflow-x: auto;
}

.statement-card p code {
  display: inline;
  padding: 2px 6px;
  margin: 0;
  font-size: 0.78em;
}

.fine-rule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--titanium);
  letter-spacing: 0.11em;
}

/* ==============================================================================
   SHARED SECTION HEADERS
   ============================================================================== */
.section-top {
  display: grid;
  grid-template-columns: 1fr 0.52fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 48px;
}

.section-top h2 {
  font-size: clamp(2.35rem, 4.2vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
  margin: 0;
  font-weight: 600;
}

.section-top p:not(.eyebrow) {
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--muted);
  margin: 0;
}

.section-top p code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  color: var(--ice);
  background: rgba(138, 212, 230, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.architecture,
.mission,
.capabilities,
.usecases,
.evidence,
.theories-section,
.protocols-section,
.adrs-section,
.cards-1000-section,
.onboarding,
.research-section,
.docs-section {
  padding-top: 96px;
  padding-bottom: 104px;
  border-top: 1px solid var(--line);
}

/* ==============================================================================
   LAYERED ARCHITECTURE SECTION
   ============================================================================== */
.architecture-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 24px;
}

.architecture-diagram {
  padding: 30px;
  background: linear-gradient(145deg, #101c25 0%, #0a1218 100%);
  border: 1px solid var(--line-light);
  min-height: 520px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.architecture-diagram::before {
  content: "";
  inset: 0;
  position: absolute;
  opacity: 0.1;
  background-image:
    linear-gradient(#62818c 1px, transparent 1px),
    linear-gradient(90deg, #62818c 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.arch-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.arch-view-toggle {
  display: flex;
  gap: 6px;
}

.arch-view-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--muted);
  background: var(--surface);
  transition: all var(--trans-fast);
}

.arch-view-btn.active {
  background: var(--ice);
  border-color: var(--ice);
  color: var(--obsidian);
  font-weight: 600;
}

.arch-bridge {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 22px;
  z-index: 2;
}

.arch-tile {
  border: 1px solid var(--line);
  background: rgba(13, 22, 30, 0.92);
  border-radius: var(--radius-md);
  min-height: 146px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: all var(--trans);
}

.arch-tile:hover,
.arch-tile.active {
  border-color: var(--ice);
  background: linear-gradient(160deg, #172a37 0%, #0f1c26 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(138, 212, 230, 0.14);
}

.arch-tile::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--ice);
  opacity: 0.55;
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

html[dir="rtl"] .arch-tile::after {
  right: auto;
  left: -18px;
  content: "←";
}

.arch-tile:nth-child(3n)::after {
  display: none;
}

.arch-tile small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ice);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.arch-tile strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-pure);
}

.arch-tile span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.arch-under {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed var(--line-light);
}

.arch-under-chip {
  border: 1px solid rgba(138, 212, 230, 0.25);
  padding: 9px 14px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(16, 33, 43, 0.85);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.arch-under-chip:hover,
.arch-under-chip.active {
  background: var(--ice);
  color: var(--obsidian);
  font-weight: 600;
}

.arch-aside {
  padding: 32px;
  border: 1px solid var(--line-light);
  background: linear-gradient(165deg, #121f2a 0%, #0b131a 100%);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.arch-aside h3 {
  font-size: 1.65rem;
  margin: 12px 0 14px;
  line-height: 1.18;
}

.arch-aside p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.72;
  margin-bottom: 18px;
}

.arch-details-box {
  background: rgba(5, 9, 13, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
}

.arch-details-box dt {
  color: var(--titanium);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.arch-details-box dd {
  color: var(--ice);
  margin-bottom: 12px;
  word-break: break-word;
}

.arch-details-box dd:last-child {
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ice);
  margin-top: 16px;
}

.text-link:hover {
  color: var(--text-pure);
  text-decoration: underline;
}

/* ==============================================================================
   SEARCH INPUTS & FILTER PILLS (UNIFIED ACROSS ALL SECTIONS)
   ============================================================================== */
.cap-tools,
.theories-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrap,
.theory-search-wrap {
  flex: 1;
  min-width: 260px;
}

.search-wrap {
  border: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0 18px;
  min-height: 50px;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.search-wrap:focus-within {
  border-color: var(--ice);
  box-shadow: 0 0 16px rgba(138, 212, 230, 0.2);
}

.search-icon {
  font-size: 1.15rem;
  color: var(--ice);
}

.search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-pure);
  width: 100%;
  font-size: 0.94rem;
  min-width: 0;
}

.search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  font-size: 0.92rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--ice);
  box-shadow: 0 0 16px rgba(138, 212, 230, 0.2);
}

.search-wrap input::placeholder,
.search-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.tool-button {
  border: 1px solid var(--line-light);
  color: var(--text);
  background: var(--surface);
  padding: 0 18px;
  min-height: 50px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.tool-button:hover {
  background: var(--surface-raised);
  border-color: var(--ice);
  color: var(--ice);
}

.filter-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-pill,
.filter-chip,
.filter-wrap button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(13, 21, 29, 0.65);
  padding: 8px 14px;
  border-radius: 999px;
  transition: all var(--trans-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-pill:hover,
.filter-chip:hover,
.filter-wrap button:hover {
  border-color: var(--ice);
  color: var(--text-pure);
  background: var(--surface-raised);
}

.filter-pill.active,
.filter-chip.active,
.filter-wrap button.active,
.filter-wrap button[aria-pressed="true"] {
  background: var(--ice);
  color: var(--obsidian);
  border-color: var(--ice);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(138, 212, 230, 0.28);
}

.cap-count {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 16px;
  color: var(--titanium);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

/* ==============================================================================
   SIMULATED MISSION COMPONENT
   ============================================================================== */
.mission-panel {
  border: 1px solid var(--line-light);
  background: linear-gradient(140deg, #11202b 0%, #0a1219 100%);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 46px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.mission-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.demo-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
  border: 1px solid rgba(216, 178, 120, 0.5);
  background: rgba(216, 178, 120, 0.1);
  padding: 6px 13px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.mission-templates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mission-template-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: var(--radius-xs);
  transition: all var(--trans-fast);
}

.mission-template-btn:hover {
  border-color: var(--ice);
  color: var(--text-pure);
}

.mission-template-btn.active {
  background: var(--ice);
  border-color: var(--ice);
  color: var(--obsidian);
  font-weight: 600;
}

.mission-visual {
  margin: 44px 0 38px;
  position: relative;
}

.mission-line {
  height: 3px;
  background: rgba(208, 228, 236, 0.14);
  border-radius: 99px;
  position: relative;
  top: 20px;
  z-index: 1;
}

.mission-line-fill {
  height: 3px;
  border-radius: 99px;
  display: block;
  background: linear-gradient(90deg, var(--ice), var(--safe));
  width: 16.6%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 14px var(--ice-glow);
}

.mission-dots {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.mission-dots button,
.mission-dot {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-light);
  background: #101e28;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: all var(--trans);
}

.mission-dots button:hover {
  border-color: var(--ice);
  color: var(--text-pure);
  transform: scale(1.08);
}

.mission-dots button.active,
.mission-dots button[aria-current="step"] {
  color: var(--obsidian);
  background: var(--ice);
  border-color: var(--ice);
  font-weight: 700;
  box-shadow: 0 0 20px var(--ice-glow);
  transform: scale(1.1);
}

.mission-dots button.done {
  border-color: var(--safe);
  color: var(--safe);
  background: rgba(111, 209, 176, 0.14);
}

.mission-detail {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 32px;
  align-items: stretch;
}

.mission-detail h3 {
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  margin: 6px 0 12px;
}

.mission-detail p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.72;
  font-size: 0.95rem;
}

.mission-telemetry {
  background: rgba(4, 8, 12, 0.88);
  border: 1px solid rgba(111, 209, 176, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.mission-telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--titanium);
  margin-bottom: 12px;
  font-size: 0.68rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

#mission-telemetry-state {
  color: var(--ice);
  font-weight: 600;
}

.mission-telemetry-log {
  white-space: pre-wrap;
  color: var(--safe);
  line-height: 1.6;
  max-height: 150px;
  overflow-y: auto;
  flex: 1;
}

.mission-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.mission-note {
  font-size: 0.76rem;
  color: var(--titanium);
  margin: 0;
}

/* ==============================================================================
   CAPABILITY UNIVERSE CARDS & REACTIVE SPOTLIGHT
   ============================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.cap-card,
.theory-card,
.adr-card,
.card-1000-item,
.use-card,
.evidence-card {
  position: relative;
  overflow: hidden;
}

/* Subtle cursor-reactive glow on cards */
.cap-card::before,
.theory-card::before,
.adr-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--spot-x, 50%) var(--spot-y, 0%), rgba(138, 212, 230, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cap-card:hover::before,
.theory-card:hover::before,
.adr-card:hover::before {
  opacity: 1;
}

.cap-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(165deg, #111d27 0%, #0b131a 100%);
  padding: 24px;
  min-height: 248px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
  cursor: pointer;
}

.cap-card:hover {
  border-color: var(--ice);
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55), 0 0 20px rgba(138, 212, 230, 0.12);
}

.card-head,
.theory-badge-row,
.adr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.card-head .category-tag {
  color: var(--ice);
  font-weight: 500;
}

.maturity-tag,
.status-boundary-chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--line-light);
  background: rgba(132, 155, 168, 0.12);
  color: var(--titanium);
}

.maturity-green,
.maturity-code-present,
.chip-tested,
.status-boundary-runnable {
  background: rgba(111, 209, 176, 0.14);
  color: var(--safe);
  border-color: rgba(111, 209, 176, 0.4);
}

.chip-code,
.maturity-local-test,
.status-boundary-simulated {
  background: rgba(138, 212, 230, 0.14);
  color: var(--ice);
  border-color: rgba(138, 212, 230, 0.4);
}

.chip-specified,
.maturity-planned,
.status-boundary-research {
  background: rgba(216, 178, 120, 0.14);
  color: var(--amber);
  border-color: rgba(216, 178, 120, 0.4);
}

.cap-card h3 {
  font-size: 1.16rem;
  margin: 14px 0 8px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cap-card p {
  font-size: 0.84rem;
  line-height: 1.62;
  color: var(--muted);
  margin-bottom: 16px;
  flex: 1;
}

.source-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  background: rgba(5, 9, 13, 0.72);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--titanium);
  margin-bottom: 12px;
  overflow: hidden;
}

.source-tag code {
  color: var(--ice);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.inspect-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ice);
  font-weight: 500;
}

.cap-card:hover .inspect-btn {
  color: var(--text-pure);
}

.show-more-row {
  text-align: center;
  margin-top: 36px;
}

/* ==============================================================================
   FORMAL CYBERNETIC THEORIES (T01–T30)
   ============================================================================== */
.theories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.theory-card {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #111d27 0%, #0a1219 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--trans);
  cursor: pointer;
}

.theory-card:hover {
  border-color: var(--ice);
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(138, 212, 230, 0.12);
}

.theory-code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ice);
  background: rgba(138, 212, 230, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(138, 212, 230, 0.3);
}

.theory-card-title {
  font-size: 1.14rem;
  font-weight: 600;
  margin: 14px 0 8px;
  color: var(--text-pure);
  line-height: 1.32;
}

.theory-math {
  background: rgba(4, 8, 12, 0.92);
  border: 1px solid rgba(138, 212, 230, 0.18);
  border-inline-start: 3px solid var(--ice);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ice-bright);
  margin: 10px 0 14px;
  overflow-x: auto;
}

.theory-card-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.62;
  margin-bottom: 16px;
  flex: 1;
}

.theory-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--titanium);
}

.theory-card-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theory-link-arrow {
  color: var(--ice);
  white-space: nowrap;
}

/* ==============================================================================
   GOVERNED EXECUTION PROTOCOLS (P01–P24)
   ============================================================================== */
.proto-table-wrap,
.reality-table-wrap {
  margin-top: 24px;
  border: 1px solid var(--line-light);
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.proto-table,
.reality-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: start;
}

.proto-table th,
.reality-table th {
  background: rgba(5, 9, 13, 0.92);
  padding: 15px 18px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--titanium);
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line-light);
  white-space: nowrap;
}

.proto-table td,
.reality-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.proto-row {
  cursor: pointer;
  transition: background var(--trans-fast);
}

.proto-table tr:hover td,
.reality-table tr:hover td {
  background: rgba(138, 212, 230, 0.05);
}

.proto-table code,
.reality-table code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ice);
}

.tier-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-block;
}

.tier-t0, .tier-badge.t0 { background: rgba(132, 155, 168, 0.16); color: var(--c-titanium-bright); border: 1px solid var(--titanium); }
.tier-t1, .tier-badge.t1 { background: rgba(138, 212, 230, 0.16); color: var(--ice); border: 1px solid var(--ice); }
.tier-t2, .tier-badge.t2 { background: rgba(111, 209, 176, 0.16); color: var(--safe); border: 1px solid var(--safe); }
.tier-t3, .tier-badge.t3 { background: rgba(216, 178, 120, 0.16); color: var(--amber); border: 1px solid var(--amber); }
.tier-t4, .tier-badge.t4 { background: rgba(232, 122, 122, 0.16); color: var(--danger); border: 1px solid var(--danger); }

/* ==============================================================================
   ARCHITECTURAL DECISION RECORDS (ADR-001–ADR-012)
   ============================================================================== */
.adrs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.adr-card {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #111d27 0%, #0b131a 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--trans);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.adr-card:hover {
  border-color: var(--safe);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.adr-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--amber);
}

.adr-proposal {
  font-size: 1.12rem;
  margin: 14px 0 14px;
  line-height: 1.35;
}

.adr-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.adr-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ice);
  display: block;
  margin-bottom: 3px;
}

.adr-val {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ==============================================================================
   1,000-CARD SUBSTRATE EXPLORER
   ============================================================================== */
.series-tabs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.series-tab-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--trans-fast);
}

.series-tab-btn .tab-count {
  background: rgba(132, 155, 168, 0.2);
  color: var(--titanium);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
}

.series-tab-btn:hover {
  border-color: var(--ice);
  color: var(--text-pure);
}

.series-tab-btn.active {
  background: var(--ice);
  border-color: var(--ice);
  color: var(--obsidian);
  font-weight: 600;
}

.series-tab-btn.active .tab-count {
  background: rgba(7, 11, 15, 0.22);
  color: var(--obsidian);
}

.cards-1000-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.card-1000-item {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #101b24 0%, #0b1218 100%);
  border-radius: var(--radius-sm);
  padding: 18px;
  transition: all var(--trans);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  min-height: 162px;
}

.card-1000-item:hover {
  border-color: var(--ice);
  transform: translateY(-3px);
  background: #13222e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.card-1000-header,
.card-1000-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-1000-id,
.card-1000-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ice);
  font-weight: 700;
}

.card-1000-series {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-1000-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-pure);
  line-height: 1.4;
  margin: 10px 0 8px;
}

.card-1000-slug {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-arrow {
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ==============================================================================
   REAL USE CASES & EVIDENCE TRUST LAYER
   ============================================================================== */
.use-grid,
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.use-card {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #111d27 0%, #0b131a 100%);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--trans), transform var(--trans);
}

.use-card:hover {
  border-color: var(--ice);
  transform: translateY(-3px);
}

.use-card .use-number {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  line-height: 1;
  color: var(--amber);
  margin-bottom: 18px;
}

.use-card h3 {
  font-size: 1.18rem;
  margin-bottom: 10px;
}

.use-card p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.66;
  margin-bottom: 18px;
  flex: 1;
}

.use-card .use-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--safe);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  letter-spacing: 0.06em;
}

/* Holographic Badges 4-Column Grid */
.holo-badges-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px 0;
}

.holo-badge-3d {
  width: 100%;
}

.holo-badge-3d .holo-badge-inner {
  width: 100%;
  min-height: 92px;
}

.evidence-card {
  border: 1px solid var(--line);
  border-top: 2px solid var(--ice);
  background: linear-gradient(165deg, #111d27 0%, #0b131a 100%);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.evidence-step {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ice);
  margin-bottom: 14px;
}

.evidence-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.evidence-card p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.66;
  flex: 1;
  margin-bottom: 18px;
}

.evidence-card a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ice);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.evidence-card a:hover {
  color: var(--text-pure);
}

/* Audit Tables */
.audit-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.audit-box {
  border: 1px solid var(--line-light);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  overflow-x: auto;
}

.audit-box h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text-pure);
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.audit-box h4 span:last-child {
  color: var(--amber);
  font-weight: 400;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.audit-table th {
  text-align: start;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--titanium);
  border-bottom: 1px solid var(--line);
}

.audit-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(208, 228, 236, 0.06);
  color: var(--muted);
}

.audit-table td code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ice);
}

.audit-table tr:hover td {
  background: rgba(138, 212, 230, 0.04);
}

.badge-immutable {
  color: var(--safe);
  background: rgba(111, 209, 176, 0.12);
  border: 1px solid rgba(111, 209, 176, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
}

.badge-risk {
  color: var(--amber);
  background: rgba(216, 178, 120, 0.12);
  border: 1px solid rgba(216, 178, 120, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
}

.policy-note {
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(216, 178, 120, 0.3);
  background: rgba(216, 178, 120, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.policy-symbol {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.policy-note p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.68;
}

.policy-note strong {
  color: var(--text-pure);
}

/* ==============================================================================
   ONBOARDING STEPS & ONE-CLICK CODE COPY
   ============================================================================== */
.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.step-card {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #111d27 0%, #0b131a 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--trans), transform var(--trans);
}

.step-card:hover {
  border-color: var(--ice);
  transform: translateY(-3px);
}

.step-card .step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  margin-bottom: 14px;
  display: block;
  letter-spacing: 0.08em;
}

.step-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.58;
  margin-bottom: 16px;
  flex: 1;
}

.code-block-wrap {
  position: relative;
}

.step-card pre,
.statement-card pre {
  background: rgba(4, 8, 12, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--safe);
  overflow-x: auto;
  line-height: 1.55;
  position: relative;
}

.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(19, 32, 43, 0.92);
  border: 1px solid var(--line-light);
  color: var(--muted);
  opacity: 0.85;
  transition: all var(--trans-fast);
  z-index: 3;
}

.copy-code-btn:hover,
.copy-code-btn.copied {
  border-color: var(--safe);
  color: var(--safe);
  opacity: 1;
}

/* ==============================================================================
   UNIVERSAL MODAL DRAWER & COMMAND PALETTE (CTRL+K)
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 600;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans);
}

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

.modal-sheet {
  background: linear-gradient(165deg, #13212d 0%, #0b131a 100%);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8);
  transform: translateY(18px) scale(0.98);
  transition: transform var(--trans);
}

.modal-backdrop.open .modal-sheet {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

html[dir="rtl"] .modal-close {
  right: auto;
  left: 20px;
}

.modal-close:hover {
  border-color: var(--ice);
  color: var(--text-pure);
}

/* Command Palette */
.cmd-palette-sheet {
  max-width: 640px;
  padding: 0;
  overflow: hidden;
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 9, 13, 0.75);
}

.cmd-input-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-pure);
  font-size: 1rem;
}

.cmd-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}

.cmd-result-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  text-align: start;
  transition: background var(--trans-fast);
}

.cmd-result-item:hover,
.cmd-result-item:focus {
  background: rgba(138, 212, 230, 0.12);
}

.cmd-result-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-pure);
}

.cmd-result-item small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.cmd-result-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  color: var(--ice);
  white-space: nowrap;
}

/* ==============================================================================
   CLOSING & INSTITUTIONAL FOOTER
   ============================================================================== */
.closing {
  padding-top: 120px;
  padding-bottom: 140px;
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.closing h2 {
  font-size: clamp(2.8rem, 5.4vw, 5.6rem);
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.closing p:not(.eyebrow) {
  font-size: 1.08rem;
  color: var(--muted);
  margin-bottom: 34px;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.closing .actions {
  position: relative;
  z-index: 1;
}

.closing-watermark {
  position: absolute;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 580px;
  font-weight: 600;
  line-height: 1;
  right: -20px;
  bottom: -150px;
  color: rgba(138, 212, 230, 0.035);
  pointer-events: none;
  user-select: none;
}

html[dir="rtl"] .closing-watermark {
  right: auto;
  left: -20px;
}

.footer {
  padding-top: 52px;
  padding-bottom: 58px;
  border-top: 1px solid var(--line);
  background: var(--canvas-deep);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-brand-col {
  max-width: 400px;
}

.footer-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.68;
  margin-top: 14px;
}

.footer-links-grid {
  display: flex;
  gap: clamp(28px, 5vw, 68px);
  flex-wrap: wrap;
}

.footer-links-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-pure);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links-col ul {
  list-style: none;
}

.footer-links-col li {
  margin-bottom: 10px;
}

.footer-links-col a {
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-links-col a:hover {
  color: var(--ice);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--titanium);
}

/* Ambient 3D Cyber Particle Lattice Canvas */
#ambient-cyber-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* Progressive Scroll Reveal Animation */
html.js-ready .reveal-section {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js-ready .reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card-empty {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-light);
  border-radius: var(--radius-md);
}

/* ==============================================================================
   RESPONSIVE BREAKPOINTS & MOBILE DRAWER
   ============================================================================== */
@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
    gap: 36px;
  }
  .orb-shell {
    height: 480px;
  }
  .magazine-spread,
  .architecture-grid,
  .mission-detail,
  .audit-tables-grid {
    grid-template-columns: 1fr;
  }
  .kernel-pills-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cards,
  .theories-grid,
  .adrs-grid,
  .use-grid,
  .statement-grid,
  .onboarding-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards-1000-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .section-top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 960px) {
  .editorial-masthead {
    display: none;
  }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    background: rgba(6, 10, 15, 0.98);
    border-bottom: 1px solid var(--line-light);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.75);
    z-index: 200;
  }
  .primary-nav.mobile-open {
    display: flex;
  }
  .primary-nav a {
    padding: 12px 10px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .holo-badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-ledger-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kernel-pills-row,
  .cards-1000-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 64px;
  }
  .cmd-trigger-btn span {
    display: none;
  }
  .hero h1 {
    font-size: clamp(2.45rem, 9.5vw, 3.3rem);
  }
  .hero-ledger-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .orb-shell {
    height: 380px;
    min-height: 340px;
  }
  .orb-telemetry-hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 9px;
  }
  .orb-context {
    flex-direction: column;
    align-items: flex-start;
  }
  .cards,
  .theories-grid,
  .adrs-grid,
  .cards-1000-grid,
  .use-grid,
  .evidence-grid,
  .statement-grid,
  .onboarding-steps,
  .holo-badges-grid,
  .kernel-pills-row,
  .arch-bridge {
    grid-template-columns: 1fr;
  }
  .arch-tile::after {
    display: none !important;
  }
  .actions .button {
    width: 100%;
  }
  .mission-dots button,
  .mission-dot {
    width: 30px;
    height: 30px;
    font-size: 0.68rem;
  }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js-ready .reveal-section {
    opacity: 1 !important;
    transform: none !important;
  }
}
