/* ==========================================================================
   奶昔·Nexitally (nai-xi.com) — Original Cyber-Telemetry Design System
   Zero external dependencies · High-contrast dark infrastructure aesthetic
   ========================================================================== */

:root {
  --bg-0: #040711;
  --bg-1: #080e1d;
  --bg-2: #0d162b;
  --surface: rgba(13, 22, 43, 0.72);
  --surface-strong: rgba(15, 25, 48, 0.92);
  --surface-hover: rgba(20, 34, 64, 0.85);
  --border: rgba(148, 163, 184, 0.14);
  --border-bright: rgba(56, 189, 248, 0.36);

  --text-1: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --cyan: #22d3ee;
  --sky: #38bdf8;
  --indigo: #818cf8;
  --violet: #a78bfa;
  --mint: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;

  --grad-brand: linear-gradient(135deg, #22d3ee 0%, #38bdf8 48%, #818cf8 100%);
  --grad-glow: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.13), transparent 45%);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.65);
  --shadow-cyan: 0 10px 32px -8px rgba(34, 211, 238, 0.35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --container: 1220px;
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-1);
  background: var(--bg-0);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Ambient Cyber Grid + Aurora Backdrop */
.bg-canvas-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(ellipse 70% 45% at 85% 5%, rgba(129, 140, 248, 0.13), transparent 58%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(52, 211, 153, 0.07), transparent 65%),
    var(--bg-0);
}

.bg-grid-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 25%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 25%, #000 35%, transparent 100%);
}

/* Top Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
  z-index: 120;
  transition: width 0.08s linear;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #04101d;
  padding: 10px 16px;
  font-weight: 700;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; border-radius: 8px; }

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(4, 7, 17, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(4, 7, 17, 0.9);
  border-bottom-color: rgba(56, 189, 248, 0.2);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand:hover .brand-mark { transform: rotate(8deg) scale(1.06); }

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name strong {
  font-size: 16px;
  background: linear-gradient(90deg, #f8fafc 20%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-name small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-1);
  background: rgba(56, 189, 248, 0.1);
}
.nav-links a.active {
  color: var(--cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  color: #03101c;
  background: var(--grad-brand);
  box-shadow: var(--shadow-cyan);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.38) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -6px rgba(34, 211, 238, 0.55);
}
.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 14px;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 10px;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-1);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(4, 7, 17, 0.96);
  backdrop-filter: blur(22px);
  z-index: 95;
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.mobile-drawer.open { display: flex; animation: fadeIn 0.22s ease; }
.mobile-drawer a {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.55);
  font-size: 15px;
  font-weight: 500;
}
.mobile-drawer .drawer-cta {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================================================
   Hero Section & Interactive Backbone Topology
   ========================================================================== */
.hero {
  position: relative;
  padding: 72px 0 64px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.28);
  font-size: 13px;
  font-weight: 600;
  color: #a5f3fc;
  margin-bottom: 22px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulseRing 2.2s infinite;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.text-gradient {
  background: linear-gradient(95deg, #ffffff 0%, #7dd3fc 42%, #818cf8 82%, #34d399 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerGrad 7s ease-in-out infinite alternate;
}

.hero-lead {
  font-size: 17px;
  line-height: 1.78;
  color: var(--text-2);
  margin: 0 0 28px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-2);
}
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-trust svg {
  width: 16px;
  height: 16px;
  color: var(--mint);
}

/* Live Topology Telemetry Panel */
.topology-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(13, 24, 48, 0.88), rgba(6, 11, 24, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.topology-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.topology-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
}

.topology-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10.5;
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.09), transparent 65%),
    linear-gradient(180deg, rgba(8, 14, 29, 0.3), rgba(4, 7, 17, 0.75));
}

#backboneCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.topology-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(6, 11, 24, 0.94);
  border: 1px solid rgba(34, 211, 238, 0.45);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-1);
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease;
  white-space: nowrap;
  z-index: 5;
}

.topology-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.topo-stat {
  padding: 14px 16px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}
.topo-stat:last-child { border-right: none; }
.topo-stat label {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.topo-stat strong {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--text-1);
}
.topo-stat strong em {
  font-style: normal;
  font-size: 12px;
  color: var(--mint);
  margin-left: 4px;
}

/* ==========================================================================
   Metrics Ribbon
   ========================================================================== */
.metrics-strip {
  padding: 18px 0 36px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-box {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.metric-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-glow);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.metric-box:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
}
.metric-box:hover::before { opacity: 1; }

.metric-num {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.1;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.metric-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.metric-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ==========================================================================
   Sections & Cards
   ========================================================================== */
.section {
  padding: 72px 0;
  position: relative;
}

.section-tight { padding: 48px 0; }

.section-head {
  max-width: 720px;
  margin-bottom: 42px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-glow);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 20px 48px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(34, 211, 238, 0.12);
}
.card:hover::before { opacity: 1; }

.card-featured {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(165deg, rgba(16, 32, 62, 0.9), rgba(9, 16, 33, 0.94));
  box-shadow: 0 20px 56px -20px rgba(34, 211, 238, 0.28);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(129, 140, 248, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--cyan);
  margin-bottom: 18px;
  font-size: 20px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.card p {
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.72;
}

.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
}
.card-link span { transition: transform 0.2s ease; }
.card:hover .card-link span { transform: translateX(4px); }

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #7dd3fc;
}
.badge-mint {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}
.badge-indigo {
  background: rgba(129, 140, 248, 0.14);
  border-color: rgba(129, 140, 248, 0.34);
  color: #c7d2fe;
}
.badge-amber {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--text-2);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--mint);
  font-weight: 800;
}

/* ==========================================================================
   Interactive Route Simulator Widget
   ========================================================================== */
.sim-panel {
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(13, 23, 46, 0.9), rgba(6, 10, 22, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.24);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.sim-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
}

.sim-field label {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--cyan);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sim-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(5, 9, 20, 0.9);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
}
.sim-select:focus { border-color: var(--cyan); }

.sim-hops {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(4, 7, 17, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 20px;
}

.hop-node {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(15, 25, 48, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
}
.hop-node small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.hop-node strong {
  font-size: 15px;
  color: var(--text-1);
}

.hop-line {
  position: relative;
  height: 3px;
  min-width: 44px;
  background: rgba(56, 189, 248, 0.2);
  border-radius: 99px;
  overflow: hidden;
}
.hop-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), #fff);
  animation: packetFlow 1.4s linear infinite;
}

.sim-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.sim-metric {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
}
.sim-metric span {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.sim-metric strong {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--cyan);
}

/* ==========================================================================
   Pricing Switcher & Cards
   ========================================================================== */
.billing-switch {
  display: inline-flex;
  padding: 5px;
  border-radius: 14px;
  background: rgba(13, 22, 43, 0.9);
  border: 1px solid var(--border);
  gap: 4px;
  margin-bottom: 34px;
}
.billing-btn {
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.billing-btn.active {
  background: var(--grad-brand);
  color: #04101c;
  box-shadow: 0 6px 20px -6px rgba(34, 211, 238, 0.6);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 6px;
}
.price-currency {
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
}
.price-amount {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-1);
}
.price-period {
  font-size: 13px;
  color: var(--text-3);
}
.price-note {
  font-size: 12.5px;
  color: var(--mint);
  font-family: var(--font-mono);
  margin-bottom: 18px;
  min-height: 20px;
}

/* ==========================================================================
   Subpage Hero, Breadcrumb & Article Prose
   ========================================================================== */
.page-hero {
  padding: 52px 0 38px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: radial-gradient(ellipse 75% 80% at 50% 0%, rgba(34, 211, 238, 0.1), transparent 72%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb span[aria-current="page"] { color: var(--cyan); }

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.page-hero .lead {
  max-width: 780px;
  margin: 0 0 22px;
  font-size: 16.5px;
  color: var(--text-2);
}

.prose-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 36px;
  align-items: start;
}

.prose-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.prose-card h2 {
  margin: 30px 0 14px;
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.prose-card h2:first-child { margin-top: 0; }
.prose-card h3 {
  margin: 22px 0 10px;
  font-size: 17px;
  color: #bae6fd;
}
.prose-card p {
  margin: 0 0 15px;
  color: var(--text-2);
  font-size: 15px;
}
.prose-card ul, .prose-card ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-2);
  font-size: 15px;
}
.prose-card li { margin-bottom: 8px; }
.prose-card strong { color: var(--text-1); }

.code-block {
  margin: 16px 0 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #03060f;
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: #bae6fd;
  overflow-x: auto;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.side-box {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.side-box h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text-1);
}
.side-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.side-links a:hover {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   Tables, Tabs, FAQ Accordions, Timeline
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
th {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  background: rgba(8, 15, 32, 0.85);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(56, 189, 248, 0.04); }

/* Filter Pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}
.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-pill.active,
.filter-pill:hover {
  color: var(--cyan);
  border-color: var(--border-bright);
  background: rgba(34, 211, 238, 0.12);
}

.search-input {
  width: 100%;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(5, 9, 20, 0.9);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 14.5px;
  outline: none;
}
.search-input:focus { border-color: var(--cyan); }

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.faq-item.open { border-color: var(--border-bright); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text-1);
  font-size: 15.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}
.faq-q .faq-icon {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--cyan);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}
.faq-a-inner {
  padding: 0 22px 20px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), rgba(129, 140, 248, 0.2));
}
.timeline-item {
  position: relative;
  padding: 22px 26px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.16);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 6px;
}

/* CTA Banner */
.cta-banner {
  position: relative;
  padding: 52px 44px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.22), transparent 52%),
    radial-gradient(circle at 15% 80%, rgba(129, 140, 248, 0.2), transparent 55%),
    linear-gradient(145deg, rgba(13, 24, 48, 0.96), rgba(6, 10, 22, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.34);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
}
.cta-banner p {
  margin: 0;
  color: var(--text-2);
  max-width: 600px;
}

/* ==========================================================================
   Footer (Rich Sitemap Matrix for Bing Crawlability)
   ========================================================================== */
.site-footer {
  margin-top: 64px;
  padding: 64px 0 36px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(8, 14, 29, 0.5), rgba(3, 6, 14, 0.96));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 44px;
}

.footer-brand p {
  margin: 14px 0 18px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.75;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-size: 13.5px;
  color: var(--text-2);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--text-1); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* Back to top */
.back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(8, 14, 29, 0.9);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 90;
}
.back-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { background: rgba(34, 211, 238, 0.16); transform: translateY(-2px); }

/* ==========================================================================
   Scroll Reveal & Keyframes
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes shimmerGrad {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes packetFlow {
  0% { left: -45%; }
  100% { left: 105%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .prose-layout { grid-template-columns: 1fr; }
  .sidebar-stack { position: static; }
  .cta-banner { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
}

@media (max-width: 820px) {
  .nav-links, .nav-actions { display: none; }
  .menu-toggle { display: inline-flex; }
  .sim-controls { grid-template-columns: 1fr; }
  .sim-hops { grid-template-columns: 1fr; }
  .hop-line { height: 26px; width: 3px; min-width: 0; margin: 0 auto; }
  .sim-results { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .prose-card { padding: 24px 20px; }
  .hero { padding: 48px 0 42px; }
}
