/* ==========================================================================
   Meridian Tech · 经纬前沿 — Editorial Technology Design System
   Zero external font/CDN dependencies · Light & Dark Themes · Responsive
   ========================================================================== */

:root {
  /* Palette: Light (Warm Alabaster Paper & Precision Ink) */
  --bg-page: #f7f8fa;
  --bg-surface: #ffffff;
  --bg-subtle: #f0f2f6;
  --bg-elevated: #ffffff;
  --bg-code: #0f172a;
  --bg-glass: rgba(255, 255, 255, 0.84);

  --text-primary: #111827;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;

  --accent: #0052ff;
  --accent-hover: #003ecc;
  --accent-soft: rgba(0, 82, 255, 0.08);
  --accent-border: rgba(0, 82, 255, 0.24);

  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.1);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.1);
  --violet: #6d28d9;
  --violet-soft: rgba(109, 40, 217, 0.1);
  --rose: #e11d48;
  --rose-soft: rgba(225, 29, 72, 0.1);

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.14);

  /* Typography */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Spacing & Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --container-max: 1240px;
  --header-h: 64px;
  --transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
  --bg-page: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #192234;
  --bg-elevated: #161f30;
  --bg-code: #060a12;
  --bg-glass: rgba(11, 17, 30, 0.86);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --border-light: #1e293b;
  --border-strong: #334155;

  --accent: #4c8bff;
  --accent-hover: #74a6ff;
  --accent-soft: rgba(76, 139, 255, 0.14);
  --accent-border: rgba(76, 139, 255, 0.34);

  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.14);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.14);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.6);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 220ms ease, color 220ms ease;
}

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

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

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}

/* Top Telemetry Strip */
.telemetry-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-secondary);
}

.telemetry-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  padding: 6px 0;
}

.telemetry-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--emerald);
}

.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-soft);
}

.ticker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  max-width: 560px;
}

.ticker-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.ticker-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  transition: opacity 260ms ease;
}

.telemetry-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .ticker-wrap {
    display: none;
  }
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

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

.brand-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}

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

.nav-link {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background-color var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

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

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  transition: border-color var(--transition), color var(--transition), background-color var(--transition);
}

.search-trigger:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-muted);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-count.hidden {
  display: none;
}

.mobile-menu-btn {
  display: none;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .search-trigger span.search-label,
  .search-trigger .kbd-hint {
    display: none;
  }
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  padding: 12px 20px 18px;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

/* Buttons & Pills */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 82, 255, 0.22);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--accent-border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.tag-blue { background: var(--accent-soft); color: var(--accent); }
.tag-emerald { background: var(--emerald-soft); color: var(--emerald); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-violet { background: var(--violet-soft); color: var(--violet); }
.tag-rose { background: var(--rose-soft); color: var(--rose); }

/* Section Headers */
.section {
  padding: 56px 0;
}

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

.section-border {
  border-top: 1px solid var(--border-light);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 620px;
}

/* ==========================================================================
   Hero Editorial Grid (Home)
   ========================================================================== */
.hero-section {
  padding: 32px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.48fr 1fr;
  gap: 24px;
  align-items: stretch;
}

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

.hero-lead {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.hero-lead:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.hero-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d1526;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-lead:hover .hero-media img {
  transform: scale(1.03);
}

.hero-media-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(11, 17, 30, 0.78);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-body {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-title {
  margin: 12px 0 12px;
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.025em;
}

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

.hero-excerpt {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.72;
}

.hero-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* Right Column: Editor's Picks + KPI Panel */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.picks-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
  flex: 1;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.panel-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.pick-item {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-light);
  transition: transform var(--transition);
}

.pick-item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.pick-item:hover .pick-title {
  color: var(--accent);
}

.pick-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 6px;
}

.pick-title {
  margin: 5px 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  transition: color var(--transition);
}

.pick-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Industry Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

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

@media (max-width: 520px) {
  .metrics-strip {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
  color: var(--text-primary);
}

.metric-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
  font-weight: 600;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Filter Bar & Article Grid
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-surface);
  font-weight: 600;
}

.sort-select {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
}

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

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

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

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-subtle);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.article-card:hover .card-thumb img {
  transform: scale(1.04);
}

.card-cover-svg {
  width: 100%;
  height: 100%;
}

.card-bookmark-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(6px);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.card-bookmark-btn:hover {
  background: rgba(15, 23, 42, 0.88);
  transform: scale(1.06);
}

.card-bookmark-btn.saved {
  background: var(--accent);
  border-color: var(--accent);
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-title {
  margin: 0 0 10px;
  font-size: 17.5px;
  font-weight: 720;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

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

.card-excerpt {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Interactive Tech Radar 2026
   ========================================================================== */
.radar-shell {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  align-items: center;
}

@media (max-width: 960px) {
  .radar-shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

.radar-canvas-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.radar-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  overflow: visible;
}

.radar-blip {
  cursor: pointer;
  transition: transform 180ms ease;
}

.radar-blip:hover circle.blip-core {
  filter: brightness(1.18);
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

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

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

.radar-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.radar-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
}

.radar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.radar-card h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 750;
}

.radar-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.radar-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.radar-stat small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.radar-stat strong {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-primary);
}

.radar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.radar-chip {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.radar-chip:hover {
  border-color: var(--accent-border);
  color: var(--text-primary);
}

.radar-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ==========================================================================
   Special Dossiers & Lab Preview
   ========================================================================== */
.dossier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.dossier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  overflow: hidden;
}

.dossier-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  opacity: 0.85;
}

.dossier-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.dossier-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

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

.dossier-card p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}

/* Lab Quick Widget on Home */
.lab-banner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0b1220 0%, #132240 60%, #0f1b33 100%);
  color: #f8fafc;
  border: 1px solid rgba(76, 139, 255, 0.28);
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .lab-banner {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

.lab-banner p {
  color: #cbd5e1;
}

.mini-calc {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-md);
  padding: 20px;
}

.mini-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

.mini-field label {
  display: block;
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.mini-field select {
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #0b1220;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.mini-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(76, 139, 255, 0.35);
  flex-wrap: wrap;
}

.mini-result-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #60a5fa;
}

/* Newsletter Block */
.newsletter-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 860px) {
  .newsletter-box {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 520px) {
  .input-row {
    flex-direction: column;
  }
}

.input-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.topic-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.topic-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* ==========================================================================
   Article Reader Page
   ========================================================================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  z-index: 90;
  transition: width 60ms linear;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 44px;
  padding: 36px 0 64px;
  align-items: start;
}

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

.article-header {
  margin-bottom: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.article-h1 {
  margin: 12px 0 16px;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.025em;
}

.article-subtitle {
  margin: 0 0 22px;
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 26px;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 30px;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tldr-box {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 32px;
}

.tldr-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.tldr-box ul {
  margin: 0;
  padding-left: 18px;
}

.tldr-box li {
  margin-bottom: 6px;
  font-size: 14.5px;
  color: var(--text-primary);
}

/* Prose Styles */
.prose {
  font-size: var(--prose-size, 16.5px);
  line-height: 1.88;
  color: var(--text-primary);
}

.prose h2 {
  margin: 40px 0 14px;
  font-size: 1.45em;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.35;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  scroll-margin-top: 86px;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.16em;
  font-weight: 700;
}

.prose p {
  margin: 0 0 18px;
}

.prose ul, .prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose blockquote {
  margin: 26px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--emerald);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: normal;
}

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

.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: var(--bg-subtle);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.code-block {
  margin: 24px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-code);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
}

.code-copy-btn {
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #cbd5e1;
  font-size: 11.5px;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
}

/* Sticky Sidebar TOC */
.article-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border-light);
}

.toc-list a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  transition: all var(--transition);
}

.toc-list a:hover {
  color: var(--text-primary);
}

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

/* Article Actions & Comments */
.article-engage {
  margin-top: 38px;
  padding: 22px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.comments-section {
  margin-top: 40px;
}

.comment-item {
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.comment-author {
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   Topics, Timeline & Glossary
   ========================================================================== */
.page-hero {
  padding: 46px 0 32px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-page) 100%);
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border-strong);
  margin: 24px 0;
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-page);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}

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

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

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

.glossary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.glossary-term {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.glossary-term strong {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
}

/* ==========================================================================
   Lab Interactive Tools
   ========================================================================== */
.lab-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.lab-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition);
}

.lab-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.lab-panel {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.lab-panel.active {
  display: block;
}

.lab-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: start;
}

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

.control-group {
  margin-bottom: 16px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.control-label span.val {
  font-family: var(--font-mono);
  color: var(--accent);
}

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

.bar-meter {
  height: 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  overflow: hidden;
  display: flex;
  margin: 10px 0;
}

.bar-seg-weights { background: var(--accent); height: 100%; transition: width 240ms ease; }
.bar-seg-kv { background: var(--emerald); height: 100%; transition: width 240ms ease; }
.bar-seg-overhead { background: var(--amber); height: 100%; transition: width 240ms ease; }

.stat-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.stat-box small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.stat-box strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text-primary);
}

/* ==========================================================================
   Modal (Global Ctrl+K Search) & Bookmarks Drawer & Toast
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.62);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 24px;
}

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

.search-modal {
  width: 100%;
  max-width: 660px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  outline: none;
}

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

.search-result-item {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
}

.search-result-item:hover {
  background: var(--bg-subtle);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.54);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: flex-end;
}

.drawer-backdrop.open {
  display: flex;
}

.drawer-panel {
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-light);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  margin-top: 40px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 48px 0 32px;
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

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

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

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

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

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

.footer-bottom {
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Back to Top */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all var(--transition);
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Print Friendly */
@media print {
  .telemetry-bar, .site-header, .article-sidebar, .article-toolbar, .article-engage, .comments-section, .site-footer, .back-top {
    display: none !important;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  body {
    background: #fff;
    color: #000;
  }
}
