/* ==========================================================================
   VOIS P2P LANDING PAGE — "SIGNAL SKY" LIGHT & AMBIENT THEME
   Impeccable Craft Floor Compliant: High Contrast, Daylight Clarity, Ambient Depth
   ========================================================================== */

:root {
  /* Color Palette — Ambient Light & Daylight Surfaces */
  --bg-canvas: #FFFFFF;
  --bg-surface: #F8FAFC;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --bg-subtle: #F1F5F9;

  /* Accent Signatures — Electric Cobalt & Clean Daylight Accents */
  --brand-primary: #1D4ED8;
  --brand-hover: #1E40AF;
  --brand-light: #EFF6FF;
  --brand-border: #BFDBFE;
  --brand-text: #FFFFFF;

  --radar-cyan: #0284C7;
  --radar-cyan-light: #F0F9FF;
  --radar-cyan-border: #BAE6FD;
  --radar-cyan-text: #0369A1;

  --signal-emerald: #059669;
  --signal-emerald-light: #ECFDF5;
  --signal-emerald-border: #A7F3D0;
  --signal-emerald-text: #047857;

  --alert-crimson: #DC2626;
  --alert-crimson-light: #FEF2F2;
  --alert-crimson-border: #FECACA;
  --alert-crimson-text: #991B1B;

  --caution-amber: #D97706;
  --caution-amber-light: #FFFBEB;
  --caution-amber-border: #FDE68A;
  --caution-amber-text: #92400E;

  /* Typography Colors (High Contrast >= 7:1) */
  --text-pure: #0F172A;
  --text-high: #1E293B;
  --text-medium: #334155;
  --text-muted: #64748B;
  --text-ghost: #94A3B8;

  /* Borders & Dividers */
  --border-subtle: #E2E8F0;
  --border-card: #CBD5E1;
  --border-brand: #93C5FD;
  --border-alert: #FCA5A5;

  /* Fonts */
  --font-sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Sizing */
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows (Neutral Ambient Diffusion) */
  --shadow-ambient: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 10px 25px -3px rgba(15, 23, 42, 0.07), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-floating: 0 16px 36px -4px rgba(15, 23, 42, 0.1), 0 6px 14px -2px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --ease-tactical: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-high);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Impeccable Craft Floor: Styled Browser Surfaces */
::selection {
  background-color: var(--brand-light);
  color: var(--brand-primary);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-surface);
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-pure);
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-pure);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background-color: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-primary);
  border-radius: var(--radius-sm);
}

.network-status-badge {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--signal-emerald-text);
  background-color: var(--signal-emerald-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--signal-emerald-border);
}

@media (min-width: 900px) {
  .network-status-badge {
    display: flex;
  }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--signal-emerald);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-medium);
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--brand-primary);
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 700;
  color: #FFFFFF;
  background-color: var(--brand-primary);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: transform 0.15s var(--ease-tactical), background-color 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.nav-cta:hover {
  background-color: var(--brand-hover);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .main-nav .nav-link {
    display: none;
  }
}

/* ==========================================================================
   BUTTONS & COMMON AFFORDANCES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease-tactical);
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.btn-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  background: #1e3a8a;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-left: 4px;
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
  background-color: var(--brand-light);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.125rem;
}

.btn-danger-sm {
  background-color: var(--alert-crimson-light);
  color: var(--alert-crimson-text);
  border: 1px solid var(--alert-crimson-border);
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-danger-sm:hover {
  background-color: var(--alert-crimson);
  color: #FFFFFF;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: calc(85vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 50% 0%, #E0F2FE 0%, #FFFFFF 70%);
}

.hero-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
}

.hero-headline {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-pure);
  margin-bottom: 24px;
}

.hero-subtext {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-medium);
  max-width: 52ch;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* Field Telemetry Bar */
.telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: var(--shadow-ambient);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-value {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
}

.telemetry-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.telemetry-divider {
  width: 1px;
  height: 36px;
  background-color: var(--border-subtle);
}

@media (max-width: 680px) {
  .telemetry-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .telemetry-divider {
    display: none;
  }
}

/* ==========================================================================
   NARRATIVE CHAPTERS
   ========================================================================== */
.narrative-chapter {
  padding: 110px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.narrative-chapter.dark-contrast {
  background-color: var(--bg-surface);
}

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

.chapter-prologue {
  max-width: 780px;
  margin-bottom: 56px;
}

.chapter-title {
  font-size: clamp(1.875rem, 3.5vw, 2.625rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-pure);
  margin-bottom: 16px;
}

.chapter-intro {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-medium);
  max-width: 72ch;
}

/* ==========================================================================
   CHAPTER 1: THE BREAKDOWN (PAIN)
   ========================================================================== */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.breakdown-story {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-ambient);
  transition: transform 0.2s var(--ease-tactical), box-shadow 0.2s ease;
}

.breakdown-story:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.story-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-pure);
}

.story-title-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.story-title-icon.alert-danger { color: var(--alert-crimson); }
.story-title-icon.alert-warning { color: var(--caution-amber); }
.story-title-icon.alert-info { color: var(--radar-cyan); }

.story-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-medium);
}

/* ==========================================================================
   CHAPTER 2: HUMAN TOLL (SUFFERING)
   ========================================================================== */
.suffering-narratives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.narrative-card {
  background-color: var(--bg-card);
  border: 1px solid var(--alert-crimson-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-ambient);
}

.narrative-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--alert-crimson-text);
  background: var(--alert-crimson-light);
  border: 1px solid var(--alert-crimson-border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 14px;
}

.narrative-headline {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 12px;
}

.narrative-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-medium);
}

.stat-callout-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 32px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ambient);
}

.stat-unit {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--alert-crimson);
  letter-spacing: -0.03em;
}

.stat-desc {
  font-size: 0.875rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* ==========================================================================
   CHAPTER 3: THE SOLUTION (RADIO ENGINE)
   ========================================================================== */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.solution-feature {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-ambient);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-tactical);
}

.solution-feature:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.feature-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-pure);
}

.feature-body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-medium);
}

.feature-body strong {
  color: var(--text-pure);
}

.feature-body code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background-color: var(--brand-light);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
}

/* ==========================================================================
   SIMULATOR SECTION
   ========================================================================== */
.simulator-section {
  padding: 100px 24px;
  background: radial-gradient(circle at 50% 20%, #F0F9FF 0%, var(--bg-canvas) 85%);
  border-bottom: 1px solid var(--border-subtle);
}

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

.simulator-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-floating);
}

.sim-header {
  padding: 20px 24px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.sim-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.sim-btn-icon {
  width: 16px;
  height: 16px;
}

.sim-btn-danger {
  background-color: var(--alert-crimson-light);
  color: var(--alert-crimson-text);
  border: 1px solid var(--alert-crimson-border);
}

.sim-btn-danger:hover {
  background-color: var(--alert-crimson);
  color: #FFFFFF;
}

.sim-btn-danger.active {
  background-color: var(--alert-crimson);
  color: #FFFFFF;
}

.sim-btn-primary {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

.sim-btn-primary:hover {
  background-color: var(--brand-hover);
}

.sim-btn-neutral {
  background-color: #FFFFFF;
  color: var(--text-medium);
  border: 1px solid var(--border-subtle);
}

.sim-btn-neutral:hover {
  background-color: var(--bg-surface);
  color: var(--text-pure);
}

.sim-status-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.sim-status-label {
  color: var(--text-muted);
}

.sim-state-value {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.sim-state-value.normal {
  background: var(--signal-emerald-light);
  color: var(--signal-emerald-text);
  border: 1px solid var(--signal-emerald-border);
}

.sim-state-value.blackout {
  background: var(--alert-crimson-light);
  color: var(--alert-crimson-text);
  border: 1px solid var(--alert-crimson-border);
}

.canvas-wrapper {
  position: relative;
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-subtle);
}

#meshCanvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
}

.canvas-legend {
  padding: 12px 24px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-medium);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-color.tower-normal { background-color: var(--brand-primary); }
.legend-color.node-victim { background-color: var(--alert-crimson); }
.legend-color.node-relay { background-color: var(--signal-emerald); }
.legend-color.node-rescue { background-color: var(--caution-amber); }
.legend-color.link-wifi { background-color: var(--brand-primary); }

/* Simulator Submodules: PTT & SOS Tester */
.sim-submodules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  border-top: 1px solid var(--border-subtle);
  background-color: #FFFFFF;
}

.submodule-box {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submodule-box:first-child {
  border-right: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .submodule-box:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

.submodule-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-pure);
}

.submodule-desc {
  font-size: 0.875rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* PTT Button & Wave Area */
.ptt-control-area {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 12px 0 6px;
}

.ptt-trigger-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: #0F172A;
  color: #60A5FA;
  border: 3px solid #3B82F6;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.ptt-trigger-btn:active,
.ptt-trigger-btn.talking {
  transform: scale(0.95);
  background-color: #991B1B;
  color: #FECACA;
  border-color: #EF4444;
}

.ptt-mic-icon {
  width: 32px;
  height: 32px;
}

.ptt-audio-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  flex-grow: 1;
  background-color: var(--bg-surface);
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.wave-bar {
  flex: 1;
  height: 8px;
  background-color: var(--brand-primary);
  border-radius: var(--radius-sm);
  transition: height 0.1s ease;
}

.ptt-audio-wave.active .wave-bar {
  animation: wavePulse 0.4s infinite alternate ease-in-out;
}

.ptt-audio-wave.active .wave-bar:nth-child(2) { animation-delay: 0.08s; }
.ptt-audio-wave.active .wave-bar:nth-child(3) { animation-delay: 0.15s; }
.ptt-audio-wave.active .wave-bar:nth-child(4) { animation-delay: 0.22s; }
.ptt-audio-wave.active .wave-bar:nth-child(5) { animation-delay: 0.12s; }
.ptt-audio-wave.active .wave-bar:nth-child(6) { animation-delay: 0.25s; }
.ptt-audio-wave.active .wave-bar:nth-child(7) { animation-delay: 0.18s; }
.ptt-audio-wave.active .wave-bar:nth-child(8) { animation-delay: 0.05s; }

@keyframes wavePulse {
  0% { height: 8px; background-color: var(--brand-primary); }
  100% { height: 46px; background-color: #38BDF8; }
}

.feedback-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* SOS Presets */
.sos-preset-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.sos-preset-btn {
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sos-preset-btn.active {
  background-color: var(--alert-crimson-light);
  border-color: var(--alert-crimson);
  color: var(--alert-crimson-text);
}

.sos-payload-panel {
  padding: 14px 0 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sos-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.sos-code-pill {
  color: var(--alert-crimson-text);
  font-weight: 700;
}

.sos-dnd-flag {
  color: var(--caution-amber-text);
  font-weight: 700;
}

.sos-payload-json {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-primary);
  white-space: pre-wrap;
  line-height: 1.4;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  padding: 10px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   CHAPTER 4: ARCHITECTURE & SYSTEM BLUEPRINT
   ========================================================================== */
.diagram-feature-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 40px;
  text-align: center;
  box-shadow: var(--shadow-ambient);
}

.technical-img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  border-radius: var(--radius-md);
  display: inline-block;
}

.diagram-caption {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 14px;
  font-style: italic;
}

.tech-spec-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.tech-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-ambient);
}

.tech-card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-pure);
}

.tech-card-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-medium);
}

.packet-wire-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.packet-field {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.type-field {
  background-color: var(--brand-light);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
}

.len-field {
  background-color: var(--caution-amber-light);
  color: var(--caution-amber-text);
  border: 1px solid var(--caution-amber-border);
}

.data-field {
  background-color: var(--signal-emerald-light);
  color: var(--signal-emerald-text);
  border: 1px solid var(--signal-emerald-border);
}

/* ==========================================================================
   CHAPTER 5: BENEFICIARIES & IMPACT
   ========================================================================== */
.impact-beneficiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.beneficiary-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-ambient);
}

.beneficiary-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.3;
}

.beneficiary-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.beneficiary-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9375rem;
  color: var(--text-medium);
  line-height: 1.55;
}

.beneficiary-bullets li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand-primary);
  font-weight: bold;
}

/* ==========================================================================
   CHAPTER 6: BUSINESS MODEL & SCALE
   ========================================================================== */
.business-dual-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.business-model-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.tier-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.tier-civic {
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-card);
}

.tier-enterprise {
  border: 1px solid var(--border-card);
  background-color: var(--bg-surface);
}

.tier-inline-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--brand-light);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
  vertical-align: middle;
  margin-left: 8px;
}

.tier-inline-tag.enterprise {
  background-color: #F1F5F9;
  color: var(--text-medium);
  border-color: #CBD5E1;
}

.tier-name {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-pure);
}

.tier-price {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--brand-primary);
}

.tier-enterprise .tier-price {
  font-size: 1.125rem;
  color: var(--text-medium);
}

.tier-desc {
  font-size: 0.9375rem;
  color: var(--text-medium);
  line-height: 1.55;
}

.tier-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.tier-features li {
  position: relative;
  padding-left: 24px;
  font-size: 0.9375rem;
  color: var(--text-high);
}

.tier-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-primary);
  font-weight: bold;
}

.market-tam-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-ambient);
}

.tam-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tam-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.tam-value {
  font-size: 1.875rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-pure);
}

.tam-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CHAPTER 7: COMPARISON TABLE
   ========================================================================== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  background-color: #FFFFFF;
  box-shadow: var(--shadow-ambient);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: #FFFFFF;
  min-width: 780px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}

.comparison-table th {
  background-color: var(--bg-surface);
  font-weight: 700;
  color: var(--text-pure);
  font-size: 0.875rem;
}

.feature-label {
  font-weight: 600;
  color: var(--text-pure);
}

.highlight-column {
  background-color: var(--brand-light);
  border-left: 1px solid var(--brand-border);
  border-right: 1px solid var(--brand-border);
  color: var(--brand-primary);
}

.comparison-table th.highlight-column {
  background-color: #DBEAFE;
  color: #1E40AF;
}

/* ==========================================================================
   CHAPTER 8: DOWNLOAD HUB
   ========================================================================== */
.download-section {
  background: radial-gradient(circle at 50% 20%, #EFF6FF 0%, var(--bg-canvas) 80%);
}

.download-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.download-card {
  background-color: #FFFFFF;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-floating);
  width: 100%;
}

.download-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.release-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  background-color: var(--brand-primary);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
}

.verified-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  background-color: var(--brand-light);
  color: var(--brand-primary);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
}

.download-title {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 12px;
}

.download-subtitle {
  font-size: 1.0625rem;
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 32px;
}

.download-action-box {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.apk-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.apk-spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.spec-val {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-pure);
  font-weight: 700;
}

.checksum-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checksum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checksum-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-medium);
}

.copy-btn {
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background-color: var(--brand-light);
}

.checksum-code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand-primary);
  word-break: break-all;
  user-select: all;
  font-weight: 600;
}

/* 3-Step Sideload Guide */
.install-instructions {
  padding-top: 36px;
  margin-bottom: 32px;
}

.install-steps-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 20px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.step-head {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-pure);
}

.step-body {
  font-size: 0.875rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* Offline Beaming Feature Card */
.offline-beaming-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background-color: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.beaming-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.beaming-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.beaming-desc {
  font-size: 0.875rem;
  color: var(--text-high);
  line-height: 1.55;
  max-width: 52ch;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #F8FAFC;
  border-top: 1px solid var(--border-subtle);
  padding: 70px 24px 30px;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.logo-icon-sm {
  width: 24px;
  height: 24px;
}

.footer-brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: 0.05em;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-medium);
  line-height: 1.6;
  max-width: 38ch;
}

.footer-col-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-medium);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-privacy-text {
  font-size: 0.8125rem;
  color: var(--text-medium);
  line-height: 1.6;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
