@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* ==========================================================================
   1. Design System & CSS Variables (Theme Configurations)
   ========================================================================== */
:root {
  color-scheme: light;
  
  /* Color Palette - Light Mode (Mainstream Doc Standard - Refined Teal/Slate) */
  --bg: #FAFBFD;        /* Ultra-soft off-white with tiny cool tint for elegant document feel */
  --paper: #FFFFFF;     /* Pure white surfaces for clean panel hierarchy */
  --ink: #0F172A;       /* Slate 900 (Elegant charcoal for high readability) */
  --muted: #475569;     /* Slate 600 (Muted descriptive text) */
  --line: #E2E8F0;      /* Slate 200 (Crisp, modern border line) */
  --soft: #F1F5F9;      /* Slate 100 (Secondary background highlights) */
  
  --accent: #0D9488;    /* Vibrant Teal (Teal 600) for excellent contrast and warmth */
  --accent-dark: #0F766E; /* Teal 700 (Active/hover color) */
  --accent-light: #CCFBF1; /* Teal 100 (Soft background highlight) */
  --accent-glow: rgba(13, 148, 136, 0.06); /* Soft teal glow overlay */
  
  --warn: #D97706;      /* Rich Amber */
  --warn-light: #FEF3C7; /* Amber 50 */
  --danger: #E11D48;    /* Modern Rose/Crimson */
  --danger-light: #FFE4E6; /* Rose 50 */
  
  --code-bg: #0F172A;
  --code-header: #1E293B;
  --code-text: #F8FAFC;
  
  /* High-Fidelity Premium Shadows */
  --shadow-sm: 0 1px 2px rgba(13, 148, 136, 0.02), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.03), 0 2px 6px rgba(13, 148, 136, 0.02);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.06), 0 8px 20px -8px rgba(13, 148, 136, 0.03);
  --radius: 12px;
  --header-height: 64px;
  --max-content: 720px;
  
  /* Typography Scale */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  --font-mono: 'Fira Code', 'SFMono-Regular', Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  
  /* Color Palette - Dark Mode (Premium Obsidian Cyber Navy) */
  --bg: #090E17;        /* Premium deep obsidian space black with blue tint */
  --paper: #111A2E;     /* Deep Slate/Navy panels */
  --line: #1E293B;      /* Slate 800 borders */
  --soft: #1E293B;      /* Slate 800 backgrounds */
  --ink: #F8FAFC;       /* Slate 50 high-readability text */
  --muted: #94A3B8;     /* Slate 400 muted description text */
  
  --accent: #E0FFFF;    /* Exact requested Light Cyan (#E0FFFF) glowing accent */
  --accent-dark: #38BDF8; /* Sky 400 (Vibrant highlight on dark) */
  --accent-light: rgba(224, 255, 255, 0.08); /* Exact rgb(224, 255, 255) overlay */
  --accent-glow: rgba(224, 255, 255, 0.12);
  
  --warn: #F59E0B;      /* Amber 500 */
  --warn-light: rgba(245, 158, 11, 0.12);
  --danger: #F43F5E;    /* Rose 500 */
  --danger-light: rgba(244, 63, 94, 0.12);
  
  --code-bg: #030712;
  --code-header: #0B0F19;
  --code-text: #E5E7EB;
  
  /* Premium Dark Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(224, 255, 255, 0.02);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(224, 255, 255, 0.03);
}

/* ==========================================================================
   2. Base Elements & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ==========================================================================
   3. Layout Structure
   ========================================================================== */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height);
}

/* Global Glassmorphic Top Nav */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .app-header {
  background: rgba(11, 15, 25, 0.7);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  border: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  border: 1.5px solid var(--line);
  transition: all 0.2s ease;
}

[data-theme="dark"] .brand-logo {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.brand:hover .brand-logo {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
  border-color: var(--accent);
}

.brand-text-container {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--soft);
  padding: 1px 6px;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 2px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  border: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--accent);
  background: var(--soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Switcher Button */
.theme-switch {
  appearance: none;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
}

.theme-switch:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

.theme-switch svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-switch .sun-icon { display: block; }
.theme-switch .moon-icon { display: none; }
[data-theme="dark"] .theme-switch .sun-icon { display: none; }
[data-theme="dark"] .theme-switch .moon-icon { display: block; }

/* Main Content Workspace */
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 240px;
  gap: 36px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 72px;
  width: 100%;
}

/* ==========================================================================
   4. Side Navigation & TOC
   ========================================================================== */
/* Left Directory Tree */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  max-height: calc(100vh - var(--header-height) - 64px);
  overflow-y: auto;
  align-self: start;
}

.dir-group {
  margin-bottom: 24px;
}

.dir-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 12px;
}

.dir-links {
  padding: 0;
  margin: 0;
  list-style: none;
}

.dir-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: 0;
}

.dir-links a:hover {
  color: var(--ink);
  background: var(--soft);
}

.dir-links a.current {
  color: var(--accent);
  background: var(--soft);
  font-weight: 600;
  border-left: 2.5px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding-left: 9.5px;
}

/* Right Local Page Table of Contents */
.toc-container {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  max-height: calc(100vh - var(--header-height) - 64px);
  overflow-y: auto;
  align-self: start;
}

.toc {
  padding: 16px;
  border-left: 1px solid var(--line);
}

.toc-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin: 0 0 14px;
}

.toc-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-links a {
  display: block;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
  border: 0;
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -13px;
  transition: all 0.2s ease;
}

.toc-links a:hover {
  color: var(--accent);
}

.toc-links a.active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

/* ==========================================================================
   5. Hero Section (Header of Docs)
   ========================================================================== */
.hero {
  grid-column: 1 / -1;
  background: radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
              linear-gradient(135deg, #FAFBFD 0%, #EEF2FF 100%);
  color: var(--ink);
  padding: 48px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="dark"] .hero {
  background: radial-gradient(circle at 80% 20%, rgba(224, 255, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 40%),
              linear-gradient(135deg, #090E17 0%, #111A2E 100%);
  border-color: rgba(255, 255, 255, 0.04);
}

.hero-inner {
  max-width: 1000px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: 0.05em;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.hero-lede {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 780px;
  margin: 18px 0 0;
}

.hero-nav {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-nav a {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.hero-nav a:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* Header Grid Panel */
.truth-bar,
.doc-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 32px;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .truth-bar,
[data-theme="dark"] .doc-cards {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
}

.truth-item,
.doc-card {
  padding: 20px;
  background: var(--paper);
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .truth-item,
[data-theme="dark"] .doc-card {
  background: rgba(11, 15, 25, 0.6);
}

.truth-item strong,
.doc-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.truth-item span,
.doc-card span {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  display: block;
}

/* ==========================================================================
   6. Core Article Content
   ========================================================================== */
main {
  min-width: 0;
}

.prose-container {
  max-width: var(--max-content);
  margin: 0 auto;
}

section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 56px;
  box-shadow: none;
  transition: none;
}

section:hover {
  box-shadow: none;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--ink);
}

h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 28px 0 12px;
  color: var(--ink);
}

h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--accent-dark);
}

p {
  margin: 0 0 16px;
  color: var(--ink);
  opacity: 0.95;
}

ul, ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

li {
  margin: 8px 0;
}

/* Bold accent style */
strong {
  font-weight: 600;
  color: var(--ink);
}

/* ==========================================================================
   7. Specialized Presentation Cards (Redesigned)
   ========================================================================== */
/* Step Grid (2 Columns) */
.step-grid,
.grid,
.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.step-card,
.item,
.scene-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover,
.item:hover,
.scene-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.step-card b,
.item strong,
.scene-card h4 {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.scene-card .scene-role {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

/* Seven-Step Route Diagram */
.route {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.route-step {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
  transition: all 0.25s ease;
}

.route-step:hover {
  border-color: var(--accent);
  background: var(--paper);
  transform: scale(1.03);
}

.route-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.route-step span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

/* Flow Grid (3 columns) */
.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.flow div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  transition: all 0.25s ease;
}

.flow div:hover {
  border-color: var(--accent);
  background: var(--paper);
}

.flow b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.78rem;
  margin-right: 6px;
}

/* Formula Grid (4 columns) */
.formula-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}

.formula-item {
  padding: 20px 14px;
  background: var(--paper);
  text-align: center;
  transition: background-color 0.25s ease;
}

.formula-item:hover {
  background: var(--soft);
}

.formula-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: 1rem;
}

.formula-item span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Unique Card Types */
.mode-card {
  margin: 20px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.mode-card .mode-quote {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0 0 10px;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
}

.mode-card .mode-effect {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Checklist Cards */
.checklist,
.combo-steps,
.micro-steps {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.checklist {
  grid-template-columns: repeat(2, 1fr);
}

.checklist li,
.combo-steps li,
.micro-steps li {
  margin: 0;
  padding: 16px 16px 16px 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  position: relative;
  transition: all 0.25s ease;
}

.checklist li:hover,
.combo-steps li:hover,
.micro-steps li:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Custom numbers and checkmarks using CSS Counters */
.micro-steps, .combo-steps {
  counter-reset: custom-counter;
}

.micro-steps li::before,
.combo-steps li::before {
  counter-increment: custom-counter;
  content: counter(custom-counter);
  position: absolute;
  left: 14px;
  top: 17px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 20px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: var(--paper);
}

.checklist li.checked::after {
  content: "✓";
  position: absolute;
  left: 19px;
  top: 17px;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
}

/* Badges list */
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-green { background: var(--accent-light); color: var(--accent-dark); }
.badge-blue { background: var(--soft); color: var(--muted); }
.badge-amber { background: var(--warn-light); color: var(--warn); }
.badge-red { background: var(--danger-light); color: var(--danger); }

/* ==========================================================================
   8. Modern High-Fidelity Callout Notices
   ========================================================================== */
.notice {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-glow);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}

.notice.warn {
  border-left-color: var(--warn);
  background: rgba(217, 119, 6, 0.04);
}

.notice.danger {
  border-left-color: var(--danger);
  background: rgba(220, 38, 38, 0.04);
}

.notice strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.notice ul {
  margin-bottom: 0;
}

/* ==========================================================================
   9. macOS Window Terminal Mockup & Code Blocks
   ========================================================================== */
.prompt-card {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* macOS colored system pills */
.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--code-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.prompt-head::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF5F56;
  box-shadow: 20px 0 0 #FFBD2E, 40px 0 0 #27C93F;
}

.prompt-head strong {
  color: #E2E8F0;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  margin-left: 56px;
  margin-right: auto;
}

.prompt-tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid var(--accent);
  color: #93C5FD;
  font-size: 0.72rem;
  font-weight: 700;
}

.copy-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #E2E8F0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 6px 12px;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.copy-btn:active {
  transform: scale(0.96);
}

/* Faux terminal body */
pre {
  margin: 0;
  padding: 20px 24px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

/* Inline single backticks standardizer */
code {
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-weight: 500;
  word-break: break-word;
}

/* ==========================================================================
   10. Figure Shots & Lightbox Trigger
   ========================================================================== */
.shot {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease;
}

.shot:hover {
  border-color: var(--accent);
  cursor: zoom-in;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.shot figcaption {
  padding: 12px 18px;
  color: var(--muted);
  background: var(--soft);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Image Zoom Lightbox Overlay CSS */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ==========================================================================
   11. Data Tables
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: var(--paper);
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}

th {
  background: var(--soft);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

/* ==========================================================================
   12. Footer & Meta Sources
   ========================================================================== */
.sources {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer a {
  color: var(--muted);
  border: 0;
}

.footer a:hover {
  color: var(--accent);
}

/* ==========================================================================
   13. Responsive Media Queries
   ========================================================================== */
/* Mobile Navigation Button */
.menu-toggle {
  display: none;
  appearance: none;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.menu-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
  }
  
  .toc-container {
    display: none;
  }
}

@media (max-width: 980px) {
  .menu-toggle {
    display: flex;
  }
  
  .layout {
    grid-template-columns: 1fr;
    padding-top: 16px;
  }
  
  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: -280px;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--paper);
    border-right: 1px solid var(--line);
    padding: 24px;
    z-index: 90;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .sidebar.active {
    left: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  }
  
  .hero-nav {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .truth-bar,
  .doc-cards {
    grid-template-columns: 1fr;
    gap: 1px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 32px 20px;
  }
  
  section {
    padding: 24px 20px;
  }
  
  .step-grid,
  .grid,
  .scene-grid,
  .checklist {
    grid-template-columns: 1fr;
  }
  
  .route {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .formula-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .prompt-head {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .prompt-head strong {
    margin-left: 0;
    margin-top: 12px;
  }
}
