/* ============================================================
   TERRAPHIM: WARP DRIVE THEME
   OKLCH colour system, mobile-first, Space Grotesk typography
   ============================================================ */

:root {
  /* OKLCH colour system -- deep void navy */
  --void:         oklch(0.08 0.025 260);
  --void-deep:    oklch(0.06 0.03 260);
  --surface:      oklch(0.12 0.02 260 / 0.75);
  --surface-solid: oklch(0.12 0.025 260);
  --panel:        oklch(0.14 0.025 260 / 0.82);
  --panel-hover:  oklch(0.18 0.03 260 / 0.88);
  --border:       oklch(0.30 0.05 250 / 0.25);
  --border-bright: oklch(0.45 0.08 250 / 0.35);

  /* Accent palette -- amber/orange matching logo */
  --warp-blue:    oklch(0.72 0.16 70);
  --warp-bright:  oklch(0.78 0.18 55);
  --warp-streak:  oklch(0.88 0.10 65);
  --electric:     oklch(0.62 0.20 60);
  --amber:        oklch(0.72 0.16 70);
  --amber-dim:    oklch(0.58 0.12 70);
  --green:        oklch(0.72 0.18 155);
  --green-dim:    oklch(0.55 0.12 155);
  --red:          oklch(0.60 0.22 25);

  /* Text hierarchy */
  --text-bright:  oklch(0.90 0.02 250);
  --text:         oklch(0.72 0.03 250);
  --text-dim:     oklch(0.48 0.03 250);
  --text-muted:   oklch(0.30 0.02 250);

  /* System */
  --radius: 4px;
  --radius-lg: 8px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --transition: 0.2s var(--ease-out);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Onest', system-ui, -apple-system, sans-serif;
  background: var(--void);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Warp tunnel canvas ---- */
.warp-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* CSS fallback for reduced motion */
.star-field-fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 10% 15%, var(--warp-streak) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 45%, oklch(0.70 0.08 225) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 20%, var(--warp-streak) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 75%, oklch(0.65 0.10 240) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 35%, var(--warp-streak) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 60%, oklch(0.60 0.06 230) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 80%, var(--warp-streak) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 50%, oklch(0.75 0.08 220) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 10%, var(--warp-streak) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 90%, oklch(0.55 0.06 250) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 85%, var(--warp-streak) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 55%, oklch(0.70 0.08 235) 0%, transparent 100%);
}

/* Vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, oklch(0.04 0.02 260 / 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--warp-blue);
  color: var(--void-deep);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---- Main content layer ---- */
main {
  position: relative;
  z-index: 10;
}

/* ============================================================
   HERO -- MOBILE FIRST
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem 3rem;
}

.hero-logo {
  width: 64px;
  height: auto;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out) 0.1s forwards;
}

.hero-overline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out) 0.2s forwards;
}

.hero-overline i { margin-right: 0.4rem; }

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text-bright);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out) 0.35s forwards;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--amber), oklch(0.78 0.18 55));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 540px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out) 0.5s forwards;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out) 0.65s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-logo,
.hero-overline,
.hero-title,
.hero-subtitle,
.hero-actions { transform: translateY(12px); }

.scroll-hint {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out) 1s forwards;
  transform: translateY(0);
}

.scroll-hint span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.scroll-chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.scroll-chevrons i {
  color: var(--warp-blue);
  font-size: 0.5rem;
  opacity: 0.3;
  animation: pulse 2s ease infinite;
}
.scroll-chevrons i:nth-child(2) { animation-delay: 0.15s; }
.scroll-chevrons i:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--warp-blue), var(--electric));
  color: var(--void-deep);
  box-shadow: 0 0 20px oklch(0.72 0.16 70 / 0.3);
}
.btn-primary:hover { box-shadow: 0 0 30px oklch(0.72 0.16 70 / 0.5); }

.btn-ghost {
  background: transparent;
  color: var(--text-bright);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  border-color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.08);
}

/* ============================================================
   HYPERDRIVE STATS
   ============================================================ */
.hyperdrive {
  padding: 2rem 1.25rem;
}

.hyperdrive-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.hyperdrive-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--warp-blue), transparent);
}

.hyperdrive-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hyperdrive-header i {
  font-size: 1.2rem;
  color: var(--warp-blue);
}

.hyperdrive-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.charge-pct {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--warp-bright);
}

.gauge {
  width: 100%;
  height: 24px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
}

.gauge-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--electric), var(--warp-blue), var(--warp-bright));
  border-radius: var(--radius);
  transition: width 0.3s var(--ease-out);
  box-shadow: 0 0 16px oklch(0.72 0.16 70 / 0.4);
}

.gauge-segments {
  position: absolute;
  inset: 0;
  display: flex;
}

.gauge-segments span {
  flex: 1;
  border-right: 1px solid oklch(0.20 0.02 260 / 0.3);
}
.gauge-segments span:last-child { border-right: none; }

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-bright);
}
.stat-value.blue { color: var(--warp-bright); }
.stat-value.amber { color: var(--amber); }
.stat-value.green { color: var(--green); }

/* ============================================================
   SECTION SHARED STYLES
   ============================================================ */
.section {
  padding: 3rem 1.25rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-inner .section-subtitle {
  margin-inline: auto;
}

.section-overline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.section-overline i { margin-right: 0.4rem; }

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text);
  max-width: 540px;
  margin-bottom: 2rem;
}

/* ============================================================
   WAYPOINTS / CORE CAPABILITIES
   ============================================================ */
.waypoints-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.waypoint {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.waypoint:hover {
  border-color: var(--border-bright);
}

.waypoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.waypoint-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.waypoint-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: oklch(0.72 0.16 70 / 0.1);
  border: 1px solid oklch(0.72 0.16 70 / 0.2);
  color: var(--warp-blue);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.waypoint-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

.waypoint-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}

/* Clickable waypoint cards */
a.waypoint-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.waypoint-link .waypoint {
  cursor: pointer;
  transition: border-color var(--transition), transform 0.2s ease, box-shadow 0.2s ease;
}

a.waypoint-link:hover .waypoint,
a.waypoint-link:focus-visible .waypoint {
  border-color: var(--warp-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px oklch(0.72 0.16 70 / 0.15);
}

.waypoint-cta {
  display: block;
  margin-top: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--warp-blue);
  letter-spacing: 0.05em;
  opacity: 0.6;
  transition: opacity var(--transition);
}

a.waypoint-link:hover .waypoint-cta {
  opacity: 1;
}

/* ============================================================
   SYSTEM READOUTS
   ============================================================ */
.systems-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.system-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.system-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.system-card-header i {
  color: var(--warp-blue);
  font-size: 0.85rem;
}

.system-card-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  flex: 1;
}

.status-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
}
.status-badge.online {
  color: var(--green);
  background: oklch(0.72 0.18 155 / 0.1);
  border: 1px solid oklch(0.72 0.18 155 / 0.2);
}
.status-badge.secure {
  color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.1);
  border: 1px solid oklch(0.72 0.16 70 / 0.2);
}

.system-card-body {
  padding: 1rem 1.25rem;
}

.system-card-body > p {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 1rem;
}

.metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.metric-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 6rem;
}

.metric-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s var(--ease-out);
}
.metric-bar-fill.green { background: var(--green); }
.metric-bar-fill.blue { background: var(--warp-blue); }
.metric-bar-fill.amber { background: var(--amber); }

.metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-bright);
  min-width: 4rem;
  text-align: right;
}

/* ---- Side panels (indicators) ---- */
.indicators-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  text-align: left;
}

.indicator-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.indicator-panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.indicator-panel-title i {
  color: var(--warp-blue);
  font-size: 0.7rem;
}

.indicator-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.indicator-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green-dim); }
.indicator-dot.blue { background: var(--warp-blue); box-shadow: 0 0 6px oklch(0.72 0.16 70 / 0.4); }
.indicator-dot.amber { background: var(--amber); box-shadow: 0 0 6px var(--amber-dim); }

.indicator-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text);
  flex: 1;
}

.indicator-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-bright);
}

/* ============================================================
   HONEST COMPARISON TABLE
   ============================================================ */
.comparison {
  padding: 3rem 1.25rem;
}

.comparison-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.comparison-inner .section-subtitle {
  margin-inline: auto;
}

.comparison-table {
  text-align: left;
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  table-layout: fixed;
}

.comparison-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-bright);
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.comparison-table thead th:first-child {
  width: 60%;
}

.comparison-table thead th.col-centre {
  text-align: center;
  width: 20%;
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.comparison-table tbody tr:nth-child(even) {
  background: oklch(0.10 0.015 260 / 0.3);
}

.comparison-table tbody td {
  padding: 0.65rem 1rem;
  vertical-align: middle;
}

.comparison-table tbody td.feature-name {
  color: var(--text-bright);
  font-weight: 500;
}

.comparison-table tbody td.cell-centre {
  text-align: center;
  font-size: 1rem;
}

.comparison-table .fa-check { color: var(--green); }
.comparison-table .fa-xmark { color: var(--red); }
.comparison-table .fa-minus { color: var(--text-dim); }

.comparison-table tfoot td {
  padding: 0.75rem 1rem;
  border-top: 2px solid var(--border-bright);
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.9rem;
}

.table-legend {
  margin-top: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ============================================================
   ROLES
   ============================================================ */
.roles-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.role-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.role-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.role-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: oklch(0.72 0.16 70 / 0.1);
  border: 1px solid oklch(0.72 0.16 70 / 0.2);
  color: var(--amber);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.role-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

.role-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  background: oklch(0.72 0.16 70 / 0.08);
  border: 1px solid oklch(0.72 0.16 70 / 0.15);
  color: var(--amber-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   DEPLOY TARGETS
   ============================================================ */
.deploy-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.deploy-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.deploy-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: oklch(0.72 0.18 155 / 0.1);
  border: 1px solid oklch(0.72 0.18 155 / 0.2);
  color: var(--green);
  font-size: 1rem;
  flex-shrink: 0;
}

.deploy-content { flex: 1; }

.deploy-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.35rem;
}

.deploy-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.deploy-card a {
  color: var(--warp-blue);
  text-decoration: none;
  transition: color var(--transition);
}

.deploy-card a:hover {
  color: var(--warp-bright);
  text-decoration: underline;
}

.deploy-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.deploy-badge.native {
  color: var(--green);
  background: oklch(0.72 0.18 155 / 0.1);
  border: 1px solid oklch(0.72 0.18 155 / 0.15);
}
.deploy-badge.wasm {
  color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.1);
  border: 1px solid oklch(0.72 0.16 70 / 0.15);
}
.deploy-badge.rust {
  color: var(--amber);
  background: oklch(0.72 0.16 70 / 0.1);
  border: 1px solid oklch(0.72 0.16 70 / 0.15);
}

/* ============================================================
   INSTALL
   ============================================================ */
.install {
  padding: 3rem 1.25rem;
}

.install-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.install-inner .section-subtitle {
  margin-inline: auto;
}

.install-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
  text-align: left;
}

.install-method {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.install-method-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.install-method-header i {
  font-size: 1.1rem;
  color: var(--warp-blue);
  width: 1.5rem;
  text-align: center;
}

.install-method-header h3,
.install-method-header h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0;
}

/* ---- Install groups ---- */
.install-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.install-group-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--warp-blue);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.install-group-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: -0.5rem 0 1rem;
}

.install-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0.5rem 0 0;
}

.install-note a {
  color: var(--warp-blue);
  text-decoration: underline;
}

/* ---- Platform detection banner ---- */
.platform-detect {
  max-width: 600px;
  margin: 0 auto 2rem;
  border: 1px solid var(--warp-blue);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  background: rgba(0, 178, 255, 0.05);
}

.platform-detect-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.platform-detect-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-bright);
  font-size: 0.9rem;
}

.platform-detect-info i {
  color: var(--warp-blue);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.all-platforms {
  margin-top: 0.75rem;
}

.all-platforms summary {
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
}

.platform-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.25rem;
}

.platform-list li a {
  font-size: 0.75rem;
  color: var(--warp-blue);
  text-decoration: none;
}

.platform-list li a:hover {
  text-decoration: underline;
}

.install-method .install-block {
  padding: 0.75rem 1rem;
  overflow: hidden;
}

.install-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.install-comment {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.install-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: left;
}

.command-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.prompt-symbol {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--warp-blue);
  user-select: none;
}

.prompt-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-bright);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.copy-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.copy-btn:hover {
  color: var(--warp-blue);
  border-color: var(--warp-blue);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 3rem 1.25rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.footer-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--warp-blue); }

.footer-coord {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
}

/* ============================================================
   TOP BAR: unified nav bar, hidden on mobile (<900px)
   ============================================================ */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: oklch(0.08 0.025 260 / 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 0.25rem;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.topbar-logo {
  height: 24px;
  width: auto;
}

.topbar-brand span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.topbar-link {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--transition);
}

.topbar-link:hover {
  color: var(--text-bright);
}

.topbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--warp-blue);
  opacity: 0;
  transition: opacity var(--transition);
}

.topbar-link:hover::after {
  opacity: 1;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  margin-right: 1rem;
  flex-shrink: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.s-green { background: var(--green); box-shadow: 0 0 6px var(--green); }

.status-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.topbar-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.topbar-search:hover {
  color: var(--warp-blue);
  border-color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.08);
}

/* ============================================================
   MOBILE NAV (shown below 900px)
   ============================================================ */
.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: oklch(0.08 0.025 260 / 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 100;
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.mobile-nav-logo {
  height: 22px;
  width: auto;
}

.mobile-nav-brand span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
}

.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-burger,
.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.nav-burger:hover,
.nav-search-btn:hover {
  color: var(--warp-blue);
  border-color: var(--warp-blue);
}

.nav-burger i,
.nav-search-btn i {
  font-size: 0.85rem;
}

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 52px; left: 0; right: 0;
  background: oklch(0.07 0.025 260 / 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 0.5rem 0;
}

.nav-mobile-menu.is-open { display: block; }

.nav-mobile-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.nav-mobile-menu a:hover {
  color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.06);
  padding-left: 1.5rem;
}

/* Hide mobile nav on wide screens where topbar shows */
@media (min-width: 900px) {
  .mobile-nav { display: none; }
  .nav-mobile-menu { display: none !important; }
  .topbar { display: block; }
}

/* Top padding for fixed nav */
main { padding-top: 52px; }

/* ============================================================
   BLOG / POST LISTING
   ============================================================ */
.page-header {
  padding: 4rem 1.25rem 2rem;
  text-align: center;
}

.page-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.post-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition);
}

.post-card:hover {
  border-color: var(--border-bright);
}

.post-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: var(--text-bright);
  text-decoration: none;
  transition: color var(--transition);
}
.post-card-title a:hover { color: var(--warp-blue); }

.post-card-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-card-meta i {
  margin-right: 0.25rem;
  color: var(--warp-blue);
}

.post-card-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.post-card-read-more {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--warp-blue);
  text-decoration: none;
  transition: color var(--transition);
}
.post-card-read-more:hover { color: var(--warp-bright); }
.post-card-read-more i { margin-left: 0.3rem; font-size: 0.7rem; }

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tag-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: border-color var(--transition), color var(--transition);
}

.tag-pill.category {
  color: var(--amber-dim);
  background: oklch(0.72 0.16 70 / 0.08);
  border: 1px solid oklch(0.72 0.16 70 / 0.15);
}
.tag-pill.category:hover {
  color: var(--amber);
  border-color: oklch(0.72 0.16 70 / 0.3);
}

.tag-pill.tag {
  color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.08);
  border: 1px solid oklch(0.72 0.16 70 / 0.15);
}
.tag-pill.tag:hover {
  color: var(--warp-bright);
  border-color: oklch(0.72 0.16 70 / 0.3);
}

/* ============================================================
   SINGLE POST / DOC PAGE
   ============================================================ */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.article-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
}

.article-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.article-description {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.article-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.article-meta i {
  margin-right: 0.25rem;
  color: var(--warp-blue);
}

/* ---- Prose content ---- */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-bright);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.prose h1 { font-size: 1.8rem; }
.prose h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose h4 { font-size: 1rem; }

.prose p { margin-bottom: 1rem; }

.prose a {
  color: var(--warp-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.prose a:hover { color: var(--warp-bright); }

.prose strong { color: var(--text-bright); }

.prose ul, .prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li { margin-bottom: 0.35rem; }

.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: oklch(0.10 0.02 260 / 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.1rem 0.35rem;
  color: var(--warp-bright);
}

.prose pre {
  background: oklch(0.08 0.02 260);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--text-bright);
  white-space: pre-wrap;
  word-break: break-all;
}

.prose blockquote {
  border-left: 3px solid var(--warp-blue);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: oklch(0.10 0.02 260 / 0.4);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.prose blockquote p { margin-bottom: 0; }

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.prose table th,
.prose table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.prose table th {
  background: var(--surface);
  color: var(--text-bright);
  font-weight: 600;
}

.prose table tr:nth-child(even) {
  background: oklch(0.10 0.015 260 / 0.3);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ---- TOC sidebar ---- */
.article-layout {
  display: block;
}

.toc-sidebar {
  display: none;
}

/* ---- Pagination (prev/next) ---- */
.post-pagination {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-pagination a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-bright);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}

.post-pagination a:hover {
  border-color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.08);
}

.post-pagination a i {
  color: var(--warp-blue);
}

/* ---- List pagination ---- */
.list-pagination {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.list-pagination a,
.list-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}

.list-pagination a {
  color: var(--text);
  border: 1px solid var(--border);
}

.list-pagination a:hover {
  color: var(--text-bright);
  border-color: var(--warp-blue);
  background: oklch(0.72 0.16 70 / 0.08);
}

.list-pagination .is-current {
  color: var(--void-deep);
  background: var(--warp-blue);
  border: 1px solid var(--warp-blue);
  font-weight: 600;
}

/* ============================================================
   SEARCH MODAL
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal.is-active { display: flex; }

.modal-background {
  position: absolute;
  inset: 0;
  background: oklch(0.04 0.02 260 / 0.8);
}

.modal-card {
  position: relative;
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

.modal-card-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
}

.modal-card-body .control input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-bright);
  outline: none;
  transition: border-color var(--transition);
}

.modal-card-body .control input:focus {
  border-color: var(--warp-blue);
}

.modal-card-body .control input::placeholder {
  color: var(--text-dim);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close::before { content: '\00d7'; }
.modal-close:hover { color: var(--text-bright); }

.search-result {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.search-result:last-child { border-bottom: none; }

.search-result-link { text-decoration: none; }

.search-result-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.search-result-body {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.search-no-results {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  padding: 1rem 0;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
}

.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 700;
  color: var(--warp-blue);
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.3;
}

.error-message {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.error-subtitle {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 2rem;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .warp-canvas { display: none; }
  .star-field-fallback { display: block; }
}

/* ============================================================
   RESPONSIVE: TABLET (600px+)
   ============================================================ */
@media (min-width: 600px) {
  .hero { padding: 4rem 2rem 4rem; }
  .section { padding: 4rem 2rem; }
  .hyperdrive { padding: 3rem 2rem; }
  .hyperdrive-panel { padding: 2rem; }
  .comparison { padding: 4rem 2rem; }
  .install { padding: 4rem 2rem; }
  .footer { padding: 4rem 2rem 2rem; }
  .page-header { padding: 5rem 2rem 2rem; }
  .post-list { padding: 0 2rem 3rem; max-width: 860px; }
  .article-container { padding: 0 2rem 3rem; }
  .article-box { padding: 2.5rem 2rem; }

  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .indicators-stack {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
  }

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

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

  .deploy-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .install-methods {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   RESPONSIVE: DESKTOP (900px+)
   ============================================================ */
@media (min-width: 900px) {
  .hero { padding: 6rem 2rem 4rem; }
  .hero-subtitle { font-size: 1.1rem; }

  .hyperdrive-panel { padding: 2.5rem; }

  .stats-row {
    grid-template-columns: repeat(5, 1fr);
  }

  .charge-pct { font-size: 2rem; }

  .waypoints-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

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

  .systems-grid {
    grid-template-columns: 1fr;
  }

  .indicators-stack {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .comparison-table { font-size: 0.9rem; }
  .comparison-table thead th { font-size: 0.75rem; }

  .install-methods {
    grid-template-columns: repeat(3, 1fr);
  }

  /* TOC sidebar on desktop */
  .article-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
  }

  .article-layout .article-container {
    max-width: none;
    padding: 0;
  }

  .toc-sidebar {
    display: block;
    position: sticky;
    top: 60px;
    align-self: start;
  }

  .toc-sidebar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
  }

  .toc-sidebar ul {
    list-style: none;
    padding: 0;
  }

  .toc-sidebar li { margin-bottom: 0.25rem; }

  .toc-sidebar a {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--transition);
  }

  .toc-sidebar a:hover,
  .toc-sidebar a.is-active {
    color: var(--warp-blue);
  }

  .toc-sidebar ul ul {
    padding-left: 0.75rem;
    margin-top: 0.25rem;
  }
}

/* ============================================================
   RESPONSIVE: WIDE (1200px+)
   ============================================================ */
@media (min-width: 1200px) {
  .section { padding: 5rem 3rem; }
  .hero { padding: 6rem 3rem 5rem; }

  /* Wider nav link spacing on large screens */
  .topbar-link { padding: 0 1.25rem; }
}

/* ============================================================
   RESPONSIVE: 2K+ (1800px+)
   Larger fonts and wider content for high-res displays
   ============================================================ */
@media (min-width: 1800px) {
  body { font-size: 1.1rem; }

  .hero-logo { width: 88px; }
  .hero-title { font-size: clamp(3rem, 5vw, 5.5rem); }
  .hero-subtitle { font-size: 1.25rem; max-width: 680px; }
  .hero-overline { font-size: 0.8rem; }

  .section-title { font-size: 2.5rem; }
  .section-overline { font-size: 0.75rem; }
  .section-subtitle { font-size: 1.1rem; }

  .waypoint-grid { max-width: 1200px; }
  .waypoint { padding: 2rem; }
  .waypoint h3 { font-size: 1.1rem; }
  .waypoint p { font-size: 0.95rem; }

  .comparison { max-width: 1000px; margin-inline: auto; }
  .comparison-table { font-size: 1rem; }
  .comparison-table thead th { font-size: 0.8rem; }
  .comparison-table tbody td.cell-centre { font-size: 1.15rem; }
  .comparison-table th, .comparison-table td { padding: 0.9rem 1.25rem; }

  .system-card { padding: 2rem; }
  .system-card h3 { font-size: 1.15rem; }

  .role-card h3 { font-size: 1.15rem; }
  .role-card p { font-size: 0.95rem; }

  .deploy-grid { max-width: 1000px; }

  .topbar-brand span { font-size: 0.95rem; }
  .topbar-link { font-size: 0.9rem; padding: 0 1.5rem; }
  .topbar-logo { height: 28px; }
  .status-label { font-size: 0.75rem; }

  .post-list { max-width: 960px; }
  .post-card { padding: 2rem; }
  .post-card-title { font-size: 1.65rem; }
  .post-card-summary { font-size: 1.1rem; }
  .post-card-meta { font-size: 0.85rem; }
  .post-card-read-more { font-size: 1rem; }
  .tag-pill { font-size: 0.75rem; }

  .article-box { padding: 3rem; }
  .article-box h1 { font-size: 2.5rem; }
  .article-meta { font-size: 0.85rem; }
  .prose { font-size: 1.15rem; }
  .prose h2 { font-size: 1.7rem; }
  .prose h3 { font-size: 1.4rem; }

  .page-header { padding: 4rem 2rem 2rem; }
  .page-header .section-title { font-size: 2.5rem; }

  .footer { font-size: 0.9rem; }
  .footer-brand { font-size: 1.1rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body { background: white; color: #222; }
  body::after { display: none; }
  .warp-canvas, .star-field-fallback { display: none; }
  .topbar, .mobile-nav, .scroll-hint, .gauge, .gauge-fill, .gauge-segments { display: none; }
  .btn { border: 1px solid #ccc; color: #222; background: none; box-shadow: none; }
  .waypoint, .system-card, .role-card, .deploy-card, .indicator-panel, .hyperdrive-panel, .install-block {
    background: #f9f9f9; border: 1px solid #ddd;
  }
  .post-card, .article-box { background: #f9f9f9; border: 1px solid #ddd; }
}
