/* ==========================================================================
   jichang.eu.cc - 量子星链机场测评实验室 | Futuristic Cyber-Telemetry UI
   ========================================================================== */

:root {
  --bg-obsidian: #060913;
  --bg-deep: #0b1120;
  --bg-surface: rgba(15, 23, 42, 0.72);
  --bg-surface-solid: #0f172a;
  --bg-surface-hover: rgba(24, 36, 65, 0.85);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-glow: rgba(0, 240, 255, 0.35);

  --cyan: #00f0ff;
  --cyan-dim: rgba(0, 240, 255, 0.12);
  --violet: #7c3aed;
  --violet-bright: #a78bfa;
  --violet-dim: rgba(124, 58, 237, 0.16);
  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.14);
  --rose: #f43f5e;
  --rose-dim: rgba(244, 63, 94, 0.14);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 32px rgba(0, 240, 255, 0.12), 0 12px 32px rgba(0, 0, 0, 0.45);
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-obsidian);
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(0, 240, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 70% 45% at 85% 5%, rgba(124, 58, 237, 0.14), transparent 60%),
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #7df9ff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code,
pre {
  font-family: var(--font-mono);
}

code {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.18);
  color: #67e8f9;
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  font-size: 0.88em;
}

pre {
  background: #040710;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--cyan);
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e2e8f0;
  margin: 1.25rem 0;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-tight {
  padding: 2rem 0;
}

/* Top Telemetry Banner */
.telemetry-bar {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.08), rgba(124, 58, 237, 0.1), rgba(16, 185, 129, 0.08));
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.45rem 0;
}

.telemetry-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.telemetry-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.3); }
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 19, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(124, 58, 237, 0.3));
  border: 1px solid rgba(0, 240, 255, 0.45);
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

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

.brand-name {
  font-size: 1.05rem;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: var(--cyan-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-trigger:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.mobile-menu-btn {
  display: none;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 1080px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(6, 9, 19, 0.98);
    border-bottom: 1px solid var(--border-glow);
    padding: 1rem 1.25rem;
    gap: 0.4rem;
  }
  .main-nav.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #6366f1);
  color: #030712;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  color: #030712;
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(0, 240, 255, 0.45);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--border-glow);
  color: var(--cyan);
}

.btn-outline:hover {
  background: var(--cyan-dim);
  color: #fff;
}

.btn-sm {
  padding: 0.42rem 0.9rem;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-cyan { background: var(--cyan-dim); color: var(--cyan); border-color: rgba(0, 240, 255, 0.3); }
.badge-violet { background: var(--violet-dim); color: #c4b5fd; border-color: rgba(124, 58, 237, 0.35); }
.badge-emerald { background: var(--emerald-dim); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }
.badge-amber { background: var(--amber-dim); color: #fcd34d; border-color: rgba(245, 158, 11, 0.35); }
.badge-rose { background: var(--rose-dim); color: #fda4af; border-color: rgba(244, 63, 94, 0.35); }

/* Glass Cards */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: var(--shadow-glow);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.25rem;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 3.6vw, 3rem);
  line-height: 1.22;
  margin: 0 0 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.gradient-text {
  background: linear-gradient(95deg, #ffffff 10%, #00f0ff 55%, #a78bfa 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.metric-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--cyan);
}

.metric-lbl {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.hero-visual-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.32);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.16), 0 24px 48px rgba(0, 0, 0, 0.6);
  background: var(--bg-deep);
}

.hero-visual-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-visual-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, transparent, rgba(6, 9, 19, 0.94) 55%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

/* Section Headers */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  font-weight: 800;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin: 0.35rem 0 0;
  max-width: 72ch;
}

/* Filter Pills & Airport Grid */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.filter-btn {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
  font-weight: 600;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
}

.cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

@media (max-width: 1024px) {
  .cards-grid,
  .cards-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .cards-grid,
  .cards-grid-2,
  .cards-grid-4 {
    grid-template-columns: 1fr;
  }
}

.airport-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.airport-rank {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(124, 58, 237, 0.22));
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--cyan);
}

.airport-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  padding-right: 3.5rem;
}

.airport-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.airport-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  font-size: 0.83rem;
}

.spec-item {
  background: rgba(6, 9, 19, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
}

.spec-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.spec-item strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.score-bar-wrap {
  margin: 0.25rem 0;
}

.score-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}

.score-bar-track {
  height: 7px;
  background: rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet-bright));
}

/* Interactive Telemetry Lab & Calculator */
.lab-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
}

@media (max-width: 920px) {
  .lab-panel {
    grid-template-columns: 1fr;
  }
}

.isp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.isp-tab {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
}

.isp-tab.active {
  background: var(--violet-dim);
  border-color: var(--violet-bright);
  color: #fff;
}

.calc-form {
  display: grid;
  gap: 0.95rem;
}

.calc-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.calc-group input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

.calc-group select {
  width: 100%;
  background: #060913;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

.calc-result {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(10, 15, 29, 0.85);
  margin: 1.25rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 680px;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: middle;
}

th {
  background: rgba(15, 23, 42, 0.96);
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

tr:hover td {
  background: rgba(0, 240, 255, 0.04);
}

/* Two-Column Content Layout (Reviews, Hubs, Guides) */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--cyan);
}

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

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

.article-main {
  min-width: 0;
}

.article-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--emerald));
}

.article-hero h1 {
  margin: 0.65rem 0 0.9rem;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.28;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.article-body {
  background: rgba(11, 17, 32, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

@media (max-width: 640px) {
  .article-hero,
  .article-body {
    padding: 1.25rem;
  }
}

.article-body h2 {
  font-size: 1.45rem;
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  scroll-margin-top: 90px;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.65rem;
  color: var(--cyan);
  scroll-margin-top: 90px;
}

.article-body p {
  margin: 0.85rem 0;
  color: var(--text-secondary);
}

.article-body ul,
.article-body ol {
  margin: 0.85rem 0;
  padding-left: 1.35rem;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 0.45rem;
}

.article-body figure {
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #060913;
}

.article-body figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

/* Callout Boxes */
.callout {
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  margin: 1.35rem 0;
  border: 1px solid;
}

.callout-tip {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

.callout-warn {
  background: rgba(245, 158, 11, 0.09);
  border-color: rgba(245, 158, 11, 0.38);
}

.callout-info {
  background: rgba(0, 240, 255, 0.07);
  border-color: rgba(0, 240, 255, 0.3);
}

.callout-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #fff;
}

.pros-cons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

@media (max-width: 720px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }
}

.pros-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

.cons-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

/* Sidebar Sticky TOC & Ranking */
.sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.toc-box,
.side-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.toc-box h3,
.side-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  color: var(--cyan);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.toc-list a {
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 0.3rem 0.55rem;
  border-left: 2px solid transparent;
  border-radius: 4px;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: rgba(0, 240, 255, 0.06);
}

.mini-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.86rem;
}

.mini-rank-item:last-child {
  border-bottom: none;
}

/* SVG Telemetry Wrapper */
.svg-diagram {
  margin: 1.5rem 0;
  padding: 1rem;
  background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.08), rgba(6, 9, 19, 0.95));
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-lg);
}

.svg-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.svg-caption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.faq-item {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
}

.faq-item summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 1.2rem;
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 1.2rem 1.1rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(10px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 2rem;
}

.search-modal.open {
  display: flex;
}

.search-panel {
  width: 100%;
  max-width: 680px;
  background: #0b1120;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
}

.search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
}

.search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.6rem;
}

.search-hit {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.search-hit:hover {
  background: var(--cyan-dim);
}

.search-hit-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.search-hit-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  background: #040710;
  border-top: 1px solid var(--border-subtle);
  padding: 3.25rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2.25rem;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.footer-col h4 {
  color: #fff;
  margin: 0 0 0.85rem;
  font-size: 0.94rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.footer-links a {
  color: var(--text-muted);
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}
