/* ─── DARK THEME (default) ──────────────────────────────────────────────── */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070d;
  --panel: rgba(9, 16, 28, 0.82);
  --panel-strong: rgba(10, 18, 31, 0.96);
  --line: rgba(183, 225, 255, 0.16);
  --line-strong: rgba(94, 240, 255, 0.45);
  --text: #f7fbff;
  --text-secondary: #d5e2f7;
  --muted: #9fb0c8;
  --cyan: #66e8ff;
  --mint: #73ffc3;
  --magenta: #ff78d2;
  --amber: #ffd166;
  --blue: #79a7ff;
  --danger: #ff7d91;
  --danger-bg: rgba(255, 125, 145, 0.1);
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --card-bg: rgba(0, 0, 0, 0.24);
  --btn-bg: rgba(255, 255, 255, 0.045);
  --btn-border: rgba(255, 255, 255, 0.16);
  --input-bg: rgba(0, 0, 0, 0.28);
  --hover-bg: rgba(102, 232, 255, 0.1);
  --glow-1: radial-gradient(circle at 20% 12%, rgba(102, 232, 255, 0.18), transparent 30%);
  --glow-2: radial-gradient(circle at 78% 4%, rgba(255, 120, 210, 0.14), transparent 28%);
  --glow-3: radial-gradient(circle at 72% 78%, rgba(115, 255, 195, 0.1), transparent 28%);
  --bg-gradient: linear-gradient(140deg, #05070d 0%, #0a1220 46%, #05070d 100%);
  --grid-line: rgba(255, 255, 255, 0.035);
  --hero-glow-1: radial-gradient(circle at 70% 28%, rgba(102, 232, 255, 0.22), transparent 24%);
  --hero-glow-2: radial-gradient(circle at 20% 80%, rgba(255, 209, 102, 0.12), transparent 28%);
  --hero-bg: linear-gradient(135deg, rgba(10, 18, 31, 0.92), rgba(5, 7, 13, 0.86));
  --active-glow: radial-gradient(circle at 80% 12%, rgba(255, 120, 210, 0.14), transparent 28%);
  --table-stripe: rgba(255, 255, 255, 0.03);
  --context-bg: rgba(7, 13, 23, 0.96);
  --k-watermark: rgba(102, 232, 255, 0.08);
  --code-bg: rgba(0, 0, 0, 0.3);
  --scrollbar-bg: rgba(255, 255, 255, 0.08);
  --scrollbar-thumb: rgba(255, 255, 255, 0.15);
}

/* ─── LIGHT THEME ───────────────────────────────────────────────────────── */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8ff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(0, 20, 50, 0.14);
  --line-strong: rgba(0, 150, 255, 0.35);
  --text: #0a1628;
  --text-secondary: #1e3a5f;
  --muted: #5a7a9a;
  --cyan: #0098d4;
  --mint: #00a87a;
  --magenta: #c84a8a;
  --amber: #c88a00;
  --blue: #3a7ac8;
  --danger: #d43a4a;
  --danger-bg: rgba(212, 58, 74, 0.08);
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
  --card-bg: rgba(0, 0, 0, 0.04);
  --btn-bg: rgba(0, 0, 0, 0.045);
  --btn-border: rgba(0, 0, 0, 0.14);
  --input-bg: rgba(255, 255, 255, 0.85);
  --hover-bg: rgba(0, 130, 255, 0.08);
  --glow-1: radial-gradient(circle at 20% 12%, rgba(0, 150, 255, 0.08), transparent 30%);
  --glow-2: radial-gradient(circle at 78% 4%, rgba(200, 74, 138, 0.06), transparent 28%);
  --glow-3: radial-gradient(circle at 72% 78%, rgba(0, 168, 122, 0.06), transparent 28%);
  --bg-gradient: linear-gradient(140deg, #f0f5ff 0%, #e8f0fe 46%, #f5f8ff 100%);
  --grid-line: rgba(0, 20, 50, 0.04);
  --hero-glow-1: radial-gradient(circle at 70% 28%, rgba(0, 150, 255, 0.1), transparent 24%);
  --hero-glow-2: radial-gradient(circle at 20% 80%, rgba(200, 138, 0, 0.06), transparent 28%);
  --hero-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 255, 0.86));
  --active-glow: radial-gradient(circle at 80% 12%, rgba(200, 74, 138, 0.08), transparent 28%);
  --table-stripe: rgba(0, 0, 0, 0.02);
  --context-bg: rgba(255, 255, 255, 0.98);
  --k-watermark: rgba(0, 150, 200, 0.06);
  --code-bg: rgba(0, 0, 0, 0.06);
  --scrollbar-bg: rgba(0, 0, 0, 0.06);
  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
}

/* ─── BASE ──────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--glow-1), var(--glow-2), var(--glow-3), var(--bg-gradient);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 78%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, select, textarea { outline: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-bg); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ─── LAYOUT ────────────────────────────────────────────────────────────── */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}
.main {
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 42px) 42px;
}

/* ─── BRAND ─────────────────────────────────────────────────────────────── */
.brand {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.95), rgba(0, 180, 120, 0.85));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 0 28px rgba(0, 200, 255, 0.34);
}
.brand-title {
  display: block;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

/* ─── NAV ───────────────────────────────────────────────────────────────── */
.rail-nav { display: grid; gap: 10px; }
.rail-link {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  transition: 160ms ease;
}
.rail-link .rail-icon { flex-shrink: 0; }
.rail-link:hover,
.rail-link.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: linear-gradient(90deg, var(--hover-bg), rgba(255, 120, 210, 0.08));
}

/* ─── SIDEBAR CARDS ─────────────────────────────────────────────────────── */
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
}
.sidebar-card.compact { margin-top: auto; }
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}
.metric-row strong { color: var(--cyan); }
.prototype-badge {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(115, 255, 195, 0.28);
  border-radius: 999px;
  color: #05100e;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prototype-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.quick-list { display: grid; gap: 8px; }
.quick-button {
  min-height: 38px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  background: var(--btn-bg);
}
.quick-button:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
}

/* ─── HERO ──────────────────────────────────────────────────────────────── */
.hero-grid {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
  gap: 24px;
}
.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border: 1px solid rgba(121, 167, 255, 0.28);
  border-radius: var(--radius);
  padding: clamp(28px, 4.2vw, 48px);
  background: var(--hero-glow-1), var(--hero-glow-2), var(--hero-bg);
  box-shadow: var(--shadow);
}
.hero-copy::after {
  content: "K";
  position: absolute;
  right: clamp(22px, 5vw, 64px);
  bottom: -38px;
  color: var(--k-watermark);
  font-size: clamp(180px, 24vw, 330px);
  font-weight: 950;
  line-height: 0.8;
  pointer-events: none;
}
.eyebrow, .tiny-label {
  margin: 0;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 850;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.pulse-dot, .action-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 18px var(--mint);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse-dot { animation: pulse 2s ease-in-out infinite; }

h1, h2, h3, p { letter-spacing: 0; }
h1 {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 22px 0 0;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1;
}
.hero-text, .section-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.hero-text { margin: 22px 0 0; font-size: clamp(16px, 1.7vw, 19px); }
.hero-actions, .selected-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.section-copy { margin: 16px 0 0; }
.hero-lightning {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 12px;
  background: color-mix(in srgb, var(--input-bg), transparent 28%);
}
.hero-mesh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}
.hero-mesh-head span {
  color: var(--muted);
  font-size: 12px;
}
.hero-mesh-map {
  position: relative;
  min-height: 220px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 56%, rgba(102, 232, 255, 0.18), transparent 28%),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(255, 255, 255, 0.03) 35px 36px),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(255, 255, 255, 0.03) 35px 36px);
}
.hero-mesh-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-bolt {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 0.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 7px currentColor);
  animation: bolt-flow 1.7s linear infinite;
}
.hero-bolt-2, .hero-bolt-5 { stroke: var(--mint); animation-duration: 2.1s; }
.hero-bolt-3 { stroke: var(--magenta); animation-duration: 1.45s; }
.hero-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 118px;
  min-height: 48px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel), transparent 7%);
  transform: translate(-50%, -50%);
  transition: 160ms ease;
}
.hero-node:hover {
  background: var(--hover-bg);
  transform: translate(-50%, -50%) scale(1.04);
}
.hero-node small {
  color: var(--cyan);
  font-size: 10px;
  text-transform: uppercase;
}
.hero-node strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.hero-node-center {
  width: 140px;
  min-height: 62px;
  background: linear-gradient(135deg, rgba(102, 232, 255, 0.25), rgba(115, 255, 195, 0.14)), var(--panel);
  box-shadow: 0 0 34px rgba(102, 232, 255, 0.2);
}
.hero-flow {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 14px;
  background: color-mix(in srgb, var(--input-bg), transparent 28%);
}
.hero-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero-flow-head a {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}
.hero-flow-steps {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.hero-flow-step {
  min-height: 104px;
  display: grid;
  align-content: space-between;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(102, 232, 255, 0.1), transparent 55%),
    var(--btn-bg);
  transition: 160ms ease;
}
.hero-flow-step:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
  transform: translateY(-1px);
}
.hero-flow-step small,
.hero-flow-step span {
  color: var(--muted);
  font-size: 11px;
}
.hero-flow-step strong {
  margin: 7px 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */
.primary-action, .secondary-action, .tab-button, .card-action {
  min-height: 46px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 200, 255, 0.5);
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  font-weight: 900;
  transition: 160ms ease;
  white-space: nowrap;
}
.secondary-action, .tab-button, .card-action {
  color: var(--text);
  border-color: var(--btn-border);
  background: var(--btn-bg);
}
.primary-action:hover, .secondary-action:hover, .tab-button:hover, .card-action:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 34px rgba(0, 200, 255, 0.14);
}
.tab-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber), var(--cyan));
}
.danger { border-color: var(--danger); color: var(--danger); }
.danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.danger-action { min-height: 34px; font-size: 12px; }
.danger-action:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.full { width: 100%; }
.theme-btn.active, .lang-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
}
.theme-toggle-group, .lang-btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-btn { min-width: 44px; }
.compact-input { grid-template-columns: 1fr; }

/* ─── ACTIVE SYSTEM ─────────────────────────────────────────────────────── */
.active-system {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--active-glow), var(--panel-strong);
  box-shadow: var(--shadow);
}
.panel-head, .section-heading, .ai-card-head, .market-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.active-system h2, .section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}
.system-badge {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.95), rgba(0, 180, 120, 0.85));
  color: #fff;
}
.selected-description { min-height: 72px; margin: 24px 0 0; color: var(--text-secondary); line-height: 1.6; }
.power-track {
  height: 12px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}
.power-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--cyan), var(--magenta));
  box-shadow: 0 0 22px rgba(0, 200, 255, 0.7);
  transition: width 240ms ease;
}
.power-meta { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.power-meta strong { color: var(--text); }
.url-line {
  display: block;
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--btn-border);
  color: var(--cyan);
  background: color-mix(in srgb, var(--input-bg), transparent 40%);
  font-size: 12px;
  overflow-wrap: anywhere;
  opacity: 0.7;
}
.url-line:hover { border-color: var(--line-strong); color: var(--text); opacity: 1; }
.selected-synergy {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.selected-synergy span {
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--input-bg), transparent 34%);
  font-size: 12px;
  line-height: 1.35;
}

/* ─── LAUNCHER PANEL ────────────────────────────────────────────────────── */
.launcher-panel, .info-section {
  margin-top: 24px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.toolbar { margin-top: 22px; }
.search-wrap {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.search-wrap input, .search-wrap select {
  width: 100%;
  min-height: 54px;
  border-radius: var(--radius);
  border: 1px solid var(--btn-border);
  padding: 0 16px;
  color: var(--text);
  background: var(--input-bg);
}
.search-wrap input:focus, .search-wrap select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(0, 200, 255, 0.1);
}
.category-tabs { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ─── FAVORITES ─────────────────────────────────────────────────────────── */
.favorite-strip {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.favorite-button {
  min-height: 58px;
  border-radius: var(--radius);
  border: 1px solid var(--btn-border);
  padding: 10px 12px;
  color: var(--text);
  background: var(--btn-bg);
  text-align: left;
  transition: 160ms ease;
}
.favorite-button:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
}
.favorite-button strong, .favorite-button span { display: block; }
.favorite-button span { margin-top: 3px; color: var(--muted); font-size: 12px; }

/* ─── LINK CHECK ────────────────────────────────────────────────────────── */
.link-check-panel {
  margin-top: 18px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 16px;
  background: color-mix(in srgb, var(--panel), var(--input-bg) 42%);
}
.link-check-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.link-check-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}
.link-check-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.link-check-item {
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--btn-bg);
}
.link-check-item span,
.link-check-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.link-check-item strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.link-check-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.link-check-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--cyan), transparent 86%);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  overflow-wrap: anywhere;
}
.link-check-action:hover {
  background: color-mix(in srgb, var(--cyan), transparent 76%);
}

/* ─── CONNECTION WINDOW ─────────────────────────────────────────────────── */
.connection-window {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(102, 232, 255, 0.13), transparent 46%),
    linear-gradient(220deg, rgba(255, 120, 210, 0.11), transparent 48%),
    var(--card-bg);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}
.connection-titlebar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--btn-border);
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}
.window-dots {
  display: inline-flex;
  gap: 6px;
}
.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px currentColor;
}
.window-dots i:nth-child(2) { background: var(--amber); }
.window-dots i:nth-child(3) { background: var(--mint); }
.connection-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(420px, 1.22fr);
  gap: 18px;
  padding: 16px;
}
.connection-copy h3 {
  margin: 8px 0;
  font-size: 26px;
}
.connection-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.connection-reasons {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.connection-reason {
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  transition: 160ms ease;
}
.connection-reason:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
}
.connection-reason strong,
.connection-reason span {
  display: block;
}
.connection-reason span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.connection-map {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 50%, rgba(102, 232, 255, 0.18), transparent 22%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 34px 35px),
    rgba(3, 8, 18, 0.48);
}
.connection-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: url(#boltGlow);
}
.connection-link {
  fill: none;
  stroke: rgba(102, 232, 255, 0.84);
  stroke-width: 2.8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.link-2, .link-3, .link-4, .link-5, .link-6 { stroke: rgba(102, 232, 255, 0.84); }
.bolt-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 15;
  vector-effect: non-scaling-stroke;
  animation: bolt-flow 1.8s linear infinite;
}
.bolt-2, .bolt-3, .bolt-4, .bolt-5, .bolt-6 { stroke: var(--cyan); animation-duration: 1.8s; }
.connection-port {
  fill: var(--cyan);
  stroke: rgba(247, 251, 255, 0.75);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.port-2, .port-3, .port-4, .port-5, .port-6 { fill: var(--cyan); }
.connection-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  width: min(138px, 28%);
  min-height: 56px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel), transparent 9%);
  box-shadow: 0 0 24px rgba(102, 232, 255, 0.12);
  transform: translate(-50%, -50%);
  transition: 160ms ease;
}
.connection-node:hover {
  background: var(--hover-bg);
  transform: translate(-50%, -50%) scale(1.04);
}
.connection-node small {
  color: var(--cyan);
  font-size: 10px;
  text-transform: uppercase;
}
.connection-node strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.center-node {
  width: min(164px, 34%);
  min-height: 72px;
  background: linear-gradient(135deg, rgba(102, 232, 255, 0.24), rgba(115, 255, 195, 0.12)), var(--panel);
  animation: center-node-pulse 2.4s ease-in-out infinite;
}

/* ─── LIVE DECK ─────────────────────────────────────────────────────────── */
.live-deck {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(0, 200, 255, 0.12), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(255, 255, 255, 0.025) 42px 43px),
    var(--card-bg);
}
.live-deck::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(102, 232, 255, 0.12), transparent);
  transform: translateX(-100%);
  animation: scan-line 5.5s linear infinite;
}
.live-deck-main,
.live-feed {
  position: relative;
  z-index: 1;
}
.live-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.live-signal span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 18px var(--mint);
  animation: live-pulse 1.6s ease-in-out infinite;
}
.live-deck h3 {
  margin: 14px 0 8px;
  font-size: 26px;
}
.live-deck p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.live-route {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.live-route-step {
  min-height: 72px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
}
.live-route-step small,
.live-feed-item span,
.system-ticker small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.live-route-step strong,
.live-feed-item strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.live-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.live-feed-item {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--btn-bg), transparent 12%);
  transition: 160ms ease;
}
.live-feed-item:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
  transform: translateY(-1px);
}
.system-ticker {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--input-bg);
}
.ticker-track {
  width: max-content;
  display: flex;
  gap: 10px;
  padding: 10px;
  animation: ticker-slide 36s linear infinite;
}
.system-ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-track a {
  min-width: 168px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--text);
  background: var(--btn-bg);
}
.ticker-track span {
  display: block;
  font-weight: 850;
}

/* ─── LIVE AI RADAR ─────────────────────────────────────────────────────── */
.radar-panel {
  margin-top: 16px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(102, 232, 255, 0.1), transparent 34%),
    linear-gradient(225deg, rgba(115, 255, 195, 0.07), transparent 36%),
    var(--card-bg);
}
.radar-head,
.radar-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.radar-head h3 {
  margin: 7px 0 8px;
  font-size: 26px;
}
.radar-head p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.radar-metrics {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.radar-metrics div,
.direction-card,
.radar-item,
.radar-sources a {
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}
.radar-metrics div {
  padding: 12px;
}
.radar-metrics span,
.radar-subhead span,
.radar-item small,
.radar-sources span {
  color: var(--muted);
  font-size: 12px;
}
.radar-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--cyan);
  font-size: 24px;
}
.radar-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
}
.radar-column {
  min-width: 0;
}
.radar-subhead {
  margin-bottom: 10px;
}
.radar-list {
  display: grid;
  gap: 8px;
}
.radar-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
}
.radar-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(102, 232, 255, 0.14);
  color: var(--cyan);
  font-weight: 900;
}
.radar-item strong,
.direction-card h4 {
  color: var(--text);
}
.radar-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.radar-open {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text);
  background: rgba(102, 232, 255, 0.12);
  font-weight: 850;
}
.direction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.direction-card {
  padding: 12px;
  background: linear-gradient(145deg, rgba(var(--tone-rgb, 102, 232, 255), 0.1), rgba(255, 255, 255, 0.025));
}
.direction-card h4 {
  margin: 0 0 9px;
  font-size: 14px;
}
.direction-card a {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}
.direction-card strong {
  color: var(--cyan);
}
.radar-sources {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radar-sources a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--text);
}

/* ─── CATEGORY GRID ─────────────────────────────────────────────────────── */
.category-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.category-card, .market-card, .missing-chip {
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(var(--tone-rgb, 0, 200, 255), 0.13), var(--btn-bg));
}
.category-card { padding: 16px; }
.category-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.category-title h3 { margin: 0; font-size: 20px; }
.module-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(var(--tone-rgb, 0, 200, 255), 0.18);
  color: var(--text);
}
.ai-list { display: grid; gap: 10px; }
.ai-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--card-bg);
  transition: 160ms ease;
}
.ai-card.selected {
  border-color: rgba(var(--tone-rgb, 0, 200, 255), 0.72);
  box-shadow: 0 0 0 1px rgba(var(--tone-rgb, 0, 200, 255), 0.16);
}
.ai-select { width: 100%; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.ai-card h4 { margin: 0; font-size: 16px; }
.new-pill {
  display: inline-flex;
  margin-left: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--cyan);
  background: rgba(102, 232, 255, 0.1);
  font-size: 10px;
  font-style: normal;
  vertical-align: middle;
}
.ai-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ai-power { flex: 0 0 auto; color: var(--cyan); font-size: 13px; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; }
.card-action { min-height: 38px; padding: 0 10px; font-size: 13px; }
.empty-state {
  border: 1px dashed var(--btn-border);
  border-radius: var(--radius);
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

/* ─── MARKET ────────────────────────────────────────────────────────────── */
.market-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.market-card {
  display: block;
  padding: 18px;
  background: var(--btn-bg);
  color: inherit;
  text-align: left;
  transition: 160ms ease;
}
.market-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--hover-bg);
}
.market-card h3 { margin: 8px 0 0; font-size: 20px; }
.market-card p { color: var(--muted); line-height: 1.5; }
.status-pill {
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--amber);
  background: rgba(255, 209, 102, 0.1);
  font-size: 12px;
  white-space: nowrap;
}

/* ─── MISSING LAYER ─────────────────────────────────────────────────────── */
.missing-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.missing-chip {
  min-height: 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: var(--btn-bg);
  transition: 160ms ease;
}
.missing-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 14px var(--mint);
}
.missing-chip strong { min-width: 0; flex: 1; font-size: 14px; }
.missing-chip small { color: var(--cyan); font-size: 12px; font-weight: 850; }
.missing-chip:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--hover-bg);
}

/* ─── COMPARISON ────────────────────────────────────────────────────────── */
.comparison-table-wrap { overflow-x: auto; margin-top: 18px; }
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.comparison-table th, .comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--btn-border);
}
.comparison-table th {
  color: var(--muted);
  font-weight: 850;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.comparison-table td { color: var(--text); }
.comparison-table tr:nth-child(even) td { background: var(--table-stripe); }
.comparison-table .yes { color: var(--mint); font-weight: 900; }
.comparison-table .no { color: var(--muted); }

/* ─── GROUPS ────────────────────────────────────────────────────────────── */
.groups-controls {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.groups-list { margin-top: 18px; display: grid; gap: 14px; }
.group-card {
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card-bg);
}
.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.group-head h3 { margin: 0; font-size: 18px; }
.group-head span { color: var(--muted); font-size: 12px; text-align: right; }
.group-items { display: flex; flex-wrap: wrap; gap: 8px; }
.group-chip {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  transition: 160ms ease;
}
.group-chip:hover {
  border-color: var(--line-strong);
  background: var(--hover-bg);
}
.group-chip small { color: var(--cyan); font-size: 11px; font-weight: 850; }

/* ─── HISTORY ───────────────────────────────────────────────────────────── */
.history-list { margin-top: 18px; display: grid; gap: 8px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--card-bg);
}
.history-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
}
.history-item strong { flex: 1; }
.history-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.starter-history {
  color: var(--text);
  text-decoration: none;
}
.starter-history .card-action {
  min-height: 34px;
}

/* ─── SETTINGS ──────────────────────────────────────────────────────────── */
.settings-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.setting-card {
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card-bg);
  display: grid;
  gap: 12px;
}
.setting-card.full-width { grid-column: 1 / -1; }
.ops-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ops-card {
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(140deg, rgba(102, 232, 255, 0.1), transparent 55%),
    var(--card-bg);
}
.ops-card span,
.ops-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.ops-card strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--text);
  font-size: 24px;
  overflow-wrap: anywhere;
}
.setting-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.api-key-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.api-key-select {
  min-height: 46px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--text);
  background: var(--input-bg);
  min-width: 140px;
}
.api-key-input {
  flex: 1;
  min-width: 180px;
  min-height: 46px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  padding: 0 16px;
  color: var(--text);
  background: var(--input-bg);
}
.api-key-input:focus, .api-key-select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(0, 200, 255, 0.1);
}
.api-keys-list { margin-top: 12px; display: grid; gap: 8px; }
.api-key-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--card-bg);
}
.api-key-row strong { min-width: 100px; text-transform: capitalize; }
.api-key-row code {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  background: var(--code-bg);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ─── TOAST ─────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  min-width: min(360px, calc(100vw - 44px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  background: var(--context-bg);
  box-shadow: var(--shadow);
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ─── CONTEXT MENU ──────────────────────────────────────────────────────── */
.context-menu {
  position: fixed;
  z-index: 50;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  background: var(--context-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.context-menu button {
  width: 100%;
  border: 0;
  padding: 10px 14px;
  color: var(--text);
  background: transparent;
  text-align: left;
  border-radius: 4px;
  transition: 80ms ease;
}
.context-menu button:hover { background: var(--hover-bg); }

/* ─── ANIMATIONS ────────────────────────────────────────────────────────── */
.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms ease, transform 400ms ease;
}
.animate-in.visible { opacity: 1; transform: translateY(0); }
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(1.35); opacity: 1; }
}
@keyframes bolt-flow {
  to { stroke-dashoffset: -56; }
}
@keyframes center-node-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(102, 232, 255, 0.24); }
  50% { box-shadow: 0 0 38px rgba(102, 232, 255, 0.42); }
}
@keyframes scan-line {
  to { transform: translateX(100%); }
}
@keyframes ticker-slide {
  to { transform: translateX(-50%); }
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { min-height: 460px; }
  .category-grid, .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .connection-body { grid-template-columns: 1fr; }
  .live-deck { grid-template-columns: 1fr; }
  .radar-layout { grid-template-columns: 1fr; }
  .ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .favorite-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .missing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main { padding: 16px; }
  .settings-grid, .groups-controls { grid-template-columns: 1fr; }
  .api-key-form { flex-direction: column; }
  .api-key-select, .api-key-input { width: 100%; }
}
@media (max-width: 640px) {
  .hero-copy, .active-system, .launcher-panel, .info-section { padding: 18px; }
  .hero-copy { min-height: auto; }
  .hero-actions, .section-heading, .panel-head, .radar-head, .radar-subhead { flex-direction: column; align-items: stretch; }
  .primary-action, .secondary-action { width: 100%; }
  .category-grid, .market-grid, .link-check-grid, .favorite-strip, .missing-grid, .rail-nav { grid-template-columns: 1fr; }
  .radar-metrics, .direction-grid { grid-template-columns: 1fr; }
  .radar-item { grid-template-columns: 30px minmax(0, 1fr); }
  .radar-open { grid-column: 1 / -1; text-align: center; }
  .connection-map { min-height: 360px; }
  .connection-node { width: 118px; }
  .hero-mesh-map { min-height: 300px; }
  .hero-node { width: 104px; }
  .hero-flow-steps { grid-template-columns: 1fr; }
  .ops-grid { grid-template-columns: 1fr; }
  .live-route, .live-feed { grid-template-columns: 1fr; }
  .card-actions { grid-template-columns: 1fr; }
  .comparison-table th, .comparison-table td { padding: 8px 10px; font-size: 12px; }
}
