:root {
  color-scheme: dark;
  --background: #071017;
  --surface: #0c1821;
  --surface-raised: #11212c;
  --surface-soft: #0a141c;
  --border: #20343f;
  --border-strong: #315060;
  --text: #edf5f7;
  --muted: #8fa5af;
  --muted-strong: #b8c8ce;
  --blue: #52a9ff;
  --blue-open: #173a54;
  --gold: #e2bb68;
  --gold-open: #45391f;
  --orange: #de8453;
  --pink: #d37ba2;
  --olive: #99ad68;
  --danger: #e78b83;
  --radius: 18px;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--background); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

button, select { font: inherit; }

a { color: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  border-radius: 8px;
  background: var(--text);
  color: var(--background);
  padding: 10px 14px;
  transition: top 120ms ease;
}

.skip-link:focus { top: 16px; }

.shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 0 32px 36px;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.brand strong { display: block; font-size: 16px; letter-spacing: 0.22em; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--blue);
  border-radius: 50%;
}

.brand-mark span {
  position: absolute;
  width: 7px;
  height: 7px;
  right: 0;
  top: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(226, 187, 104, 0.55);
}

.topbar-actions, .controls, .legend, footer { display: flex; align-items: center; }
.topbar-actions { gap: 12px; }

.status, .docs-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted-strong);
  font-size: 12px;
  text-decoration: none;
}

.status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.status-live span { background: var(--olive); box-shadow: 0 0 10px rgba(153, 173, 104, 0.55); }
.status-error span { background: var(--danger); }
.docs-link:hover { color: var(--text); border-color: var(--border-strong); }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 52px 0 34px;
}

.eyebrow, .panel-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; max-width: 720px; font-size: clamp(34px, 4vw, 62px); line-height: 1.03; letter-spacing: -0.045em; }
h2 { margin-bottom: 4px; font-size: 20px; letter-spacing: -0.02em; }
.hero-copy { margin-bottom: 0; max-width: 680px; color: var(--muted-strong); font-size: 16px; }

.controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.controls label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }

select, button {
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: 0;
}

select {
  min-width: 154px;
  appearance: none;
  background: var(--surface-raised);
  color: var(--text);
  padding: 0 38px 0 12px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

button {
  align-self: end;
  cursor: pointer;
  background: var(--text);
  color: var(--background);
  padding: 0 16px;
  font-weight: 700;
}

button:hover { background: #dce9ec; }
button:disabled { cursor: wait; opacity: 0.55; }
select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.error-banner {
  margin-bottom: 20px;
  border: 1px solid rgba(231, 139, 131, 0.5);
  border-radius: 12px;
  background: rgba(231, 139, 131, 0.08);
  color: #ffd6d2;
  padding: 13px 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card, .panel, .methodology {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 146px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 15px;
  padding: 18px;
}

.metric-card p { margin-bottom: 14px; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.metric-card strong { display: block; font-size: clamp(27px, 2.4vw, 38px); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.metric-card span { display: block; margin-top: 12px; color: var(--muted); font-size: 11px; }
.metric-accent { border-color: #275775; background: #0e202d; }
.metric-accent strong { color: #86c7ff; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid-primary { grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.8fr); }
.panel { min-width: 0; border-radius: var(--radius); padding: 22px; }
.panel-heading { min-height: 58px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading p:not(.panel-kicker) { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.legend { gap: 14px; color: var(--muted-strong); font-size: 11px; white-space: nowrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 3px; border-radius: 3px; }
.legend-attempts { background: var(--blue); }
.legend-plays { background: var(--gold); }

.chart { min-height: 280px; margin-top: 16px; }
.chart svg { display: block; width: 100%; height: 280px; overflow: visible; }
.chart-grid { stroke: #20333d; stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font-size: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-attempts { stroke: var(--blue); }
.chart-line-plays { stroke: var(--gold); stroke-dasharray: 5 5; }
.chart-dot-attempts { fill: var(--surface); stroke: var(--blue); stroke-width: 2; }
.chart-dot-plays { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }

.bar-chart { display: grid; align-content: start; gap: 15px; min-height: 250px; margin-top: 20px; }
.bar-row { display: grid; grid-template-columns: minmax(86px, 0.7fr) minmax(100px, 1.5fr) 42px; align-items: center; gap: 10px; }
.bar-label { overflow: hidden; color: var(--muted-strong); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; border-radius: 5px; background: #172730; overflow: hidden; }
.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; background: var(--blue); }
.bar-fill.success { background: var(--olive); }
.bar-fill.failure { background: var(--orange); }
.bar-fill.escape { background: var(--gold); }
.bar-fill.aborted, .bar-fill.interrupted { background: var(--pink); }
.bar-value { color: var(--text); text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.panel-levels { min-width: 0; }
.table-scroll { width: 100%; overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
th, td { border-bottom: 1px solid var(--border); padding: 12px 10px; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(82, 169, 255, 0.035); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.level-cell { min-width: 150px; }
.level-cell strong { display: block; color: var(--text); font-size: 12px; }
.level-cell span { color: var(--muted); font-size: 10px; }
.table-link {
  height: auto;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  padding: 2px;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(82, 169, 255, 0.42);
  text-underline-offset: 3px;
}
.table-link:hover { background: transparent; color: #9dd1ff; }
.outcome-pill, .replay-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.2;
  text-transform: capitalize;
}
.outcome-pill.success { border-color: rgba(153, 173, 104, 0.45); color: #cbd9a9; }
.outcome-pill.failure { border-color: rgba(222, 132, 83, 0.48); color: #f3b18c; }
.replay-pill.available { border-color: rgba(82, 169, 255, 0.45); color: #9dd1ff; }
.empty-state { min-height: 170px; place-items: center; color: var(--muted); font-size: 13px; }
.empty-state:not([hidden]) { display: grid; }
.chart-empty { min-height: 240px; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; }

.recent-panel { margin-bottom: 18px; }

.methodology {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  border-radius: var(--radius);
  padding: 24px;
}

.methodology dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; }
.methodology dt { color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.methodology dd { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

footer {
  justify-content: space-between;
  gap: 20px;
  padding: 24px 2px 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

noscript { display: block; padding: 20px; background: #301a1a; color: white; text-align: center; }

.detail-view[hidden] { display: none; }
.detail-view { min-height: calc(100vh - 126px); }
.detail-shell { width: 100%; padding: 28px 0 44px; }
.detail-toolbar { display: flex; align-items: center; min-height: 44px; margin-bottom: 18px; }
.detail-back {
  align-self: auto;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-color: var(--border);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--muted-strong);
  padding: 0 14px;
  font-size: 11px;
}
.detail-back:hover { border-color: var(--border-strong); background: #18303f; color: var(--text); }

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding: 4px 2px 28px;
}

.detail-header h1 { margin: 0; font-size: clamp(38px, 5vw, 68px); line-height: 1; }
.detail-header p:not(.panel-kicker) { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.detail-content { padding: 28px 0 0; }
.detail-loading { min-height: 520px; display: grid; place-items: center; color: var(--muted); }
.detail-error { border: 1px solid rgba(231, 139, 131, 0.5); border-radius: 12px; color: #ffd6d2; padding: 18px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: start;
}

.detail-column { display: grid; gap: 16px; min-width: 0; }
.detail-section { border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); padding: 18px; }
.detail-section h3 { margin: 0 0 3px; font-size: 15px; }
.detail-section > p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.detail-section .table-scroll { margin-top: 10px; }

.detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.detail-metric { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); padding: 13px; }
.detail-metric span { display: block; color: var(--muted); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
.detail-metric strong { display: block; margin-top: 6px; font-size: 19px; font-variant-numeric: tabular-nums; }

.level-map {
  position: relative;
  min-height: 680px;
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
  background: #050b10;
}
.level-map svg { display: block; width: 100%; height: 680px; }
.map-boundary { fill: none; stroke: #20343f; stroke-width: 1; stroke-dasharray: 6 7; }
.map-grid { stroke: #13242e; stroke-width: 0.7; }
.map-gravity { fill: none; stroke: #315060; stroke-width: 0.8; stroke-dasharray: 3 5; }
.map-body { stroke-width: 1.4; }
.map-body.earth { fill: #244b64; stroke: #72b8e9; }
.map-body.planet { fill: #315a67; stroke: #8ebcc5; }
.map-body.sun { fill: #b8913f; stroke: #f0cf7d; }
.map-body.blackHole { fill: #020306; stroke: #d37ba2; stroke-width: 3; }
.map-body.meteorite { fill: #4a5055; stroke: #a7b0b5; }
.map-body.whiteHole { fill: #dce9ec; stroke: #ffffff; }
.map-body.wormhole { fill: #2e254c; stroke: #aa8be4; stroke-width: 3; }
.map-body.pulsar { fill: #5a2645; stroke: #e090b5; }
.map-body.lagrangePoint { fill: #99ad68; stroke: #d1dea9; }
.map-body.slingshot { fill: #6b3c25; stroke: #de8453; }
.map-body.cosmicString { fill: #31737b; stroke: #8fd9df; }
.map-body-label { fill: #b8c8ce; font-size: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-anchor: middle; text-transform: uppercase; }
.map-velocity { stroke: #8fa5af; stroke-width: 1.3; marker-end: url(#map-arrow); }
.map-ship-start { fill: #52a9ff; stroke: #d8ecff; stroke-width: 1.4; }
.map-flight-path { fill: none; stroke: #52a9ff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.map-flight-path-shadow { fill: none; stroke: #071017; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.map-event { fill: #071017; stroke: #e2bb68; stroke-width: 2; }
.map-terminal { fill: #de8453; stroke: #ffe1cf; stroke-width: 1.2; }
.map-replay-marker { fill: #edf5f7; stroke: #52a9ff; stroke-width: 3; }

.map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.map-legend .legend-body { background: var(--gold); }
.map-legend .legend-event { border: 2px solid var(--gold); background: transparent; }

.replay-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 12px; }
.replay-controls button { height: 34px; border-color: var(--border-strong); background: var(--surface-raised); color: var(--text); padding: 0 12px; }
.replay-controls button:hover { background: #18303f; }
.replay-controls input { width: 100%; accent-color: var(--blue); }
.replay-time { min-width: 74px; color: var(--muted-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-align: right; }
.replay-readout { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 9px; color: var(--muted); font-size: 10px; }

.definition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.definition-list div { min-width: 0; }
.definition-list dt { color: var(--muted); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
.definition-list dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--muted-strong); font-size: 11px; }

.event-list { display: grid; gap: 0; max-height: 300px; overflow-y: auto; }
.event-row { display: grid; grid-template-columns: 70px 1fr; gap: 12px; border-bottom: 1px solid var(--border); padding: 10px 0; }
.event-row:last-child { border-bottom: 0; }
.event-time { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.event-row strong { display: block; font-size: 11px; text-transform: capitalize; }
.event-row span { color: var(--muted); font-size: 10px; }

.detail-note { border-left: 2px solid var(--gold); color: var(--muted-strong); padding-left: 12px; font-size: 11px; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .methodology { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .shell { padding: 0 18px 28px; }
  .hero { align-items: flex-start; flex-direction: column; padding-top: 38px; }
  .controls { width: 100%; justify-content: flex-start; }
  .dashboard-grid, .dashboard-grid-primary { grid-template-columns: 1fr; }
  .methodology dl { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .level-map, .level-map svg { min-height: 560px; height: 560px; }
}

@media (max-width: 580px) {
  .shell { padding-inline: 12px; }
  .topbar { min-height: 70px; }
  .status { display: none; }
  .hero { gap: 26px; }
  h1 { font-size: 37px; }
  .controls label { flex: 1 1 130px; }
  .controls select { width: 100%; min-width: 0; }
  .controls button { flex: 1 0 100%; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 132px; padding: 15px; }
  .panel { padding: 17px; }
  .panel-heading { flex-direction: column; }
  .legend { align-self: flex-start; }
  .chart { min-height: 240px; }
  .chart svg { height: 240px; }
  .methodology dl { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .detail-shell { padding-top: 20px; }
  .detail-header { padding-bottom: 22px; }
  .detail-header h1 { font-size: 38px; }
  .detail-content { padding-top: 20px; }
  .detail-metrics { grid-template-columns: repeat(2, 1fr); }
  .level-map, .level-map svg { min-height: 450px; height: 450px; }
  .definition-list { grid-template-columns: 1fr 1fr; }
}

/* Flight intelligence dashboard */
:root {
  --background: #050b10;
  --surface: #0a141c;
  --surface-raised: #101e28;
  --surface-soft: #071118;
  --border: #1b303b;
  --border-strong: #315261;
  --text: #f1f7f8;
  --muted: #78909b;
  --muted-strong: #adc0c7;
  --blue: #62b4ff;
  --blue-open: #112f44;
  --gold: #e5bd6a;
  --orange: #e28a5b;
  --pink: #d981a9;
  --olive: #a8bd70;
  --danger: #ee8f86;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 12%, rgba(98, 180, 255, 0.07) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 28%, rgba(229, 189, 106, 0.08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 74%, rgba(255, 255, 255, 0.045) 0 1px, transparent 1.5px);
  background-size: 190px 190px, 260px 260px, 140px 140px;
}

.shell { width: min(1580px, 100%); padding-inline: 38px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  background: rgba(5, 11, 16, 0.88);
  backdrop-filter: blur(18px);
}

.brand-mark { width: 38px; height: 38px; }
.brand strong { font-size: 15px; }

.topnav { display: flex; align-items: center; gap: 8px; }
.topnav a {
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease;
}
.topnav a:hover { background: var(--surface-raised); color: var(--text); }

.hero {
  position: relative;
  min-height: 390px;
  align-items: center;
  overflow: hidden;
  border-bottom: 0;
  padding: 58px 0 50px;
}
.hero-content { position: relative; z-index: 2; max-width: 910px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--gold); }
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 5px rgba(168, 189, 112, 0.09), 0 0 16px rgba(168, 189, 112, 0.6);
}
h1 { max-width: 930px; margin-bottom: 18px; font-size: clamp(46px, 5.4vw, 78px); line-height: 0.98; letter-spacing: -0.055em; }
.hero-copy { max-width: 760px; font-size: 17px; line-height: 1.65; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; color: var(--muted); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }

.orbit-visual { position: absolute; right: 1.5%; top: 50%; width: 330px; height: 330px; transform: translateY(-48%); opacity: 0.82; }
.orbit-core { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; border: 1px solid rgba(229, 189, 106, 0.8); border-radius: 50%; background: #302817; box-shadow: 0 0 40px rgba(229, 189, 106, 0.18); transform: translate(-50%, -50%); }
.orbit-ring { position: absolute; inset: 50%; display: block; border: 1px solid rgba(98, 180, 255, 0.23); border-radius: 50%; transform: translate(-50%, -50%) rotate(-18deg); }
.orbit-ring i { position: absolute; top: 50%; right: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 20px rgba(98, 180, 255, 0.65); }
.orbit-ring-one { width: 118px; height: 118px; }
.orbit-ring-two { width: 218px; height: 218px; border-color: rgba(229, 189, 106, 0.2); transform: translate(-50%, -50%) rotate(24deg); }
.orbit-ring-two i { right: auto; left: -4px; width: 7px; height: 7px; background: var(--gold); }
.orbit-ring-three { width: 326px; height: 326px; border-style: dashed; border-color: rgba(120, 144, 155, 0.17); transform: translate(-50%, -50%) rotate(58deg); }
.orbit-ring-three i { top: 8%; right: 15%; width: 5px; height: 5px; background: var(--muted-strong); }

.command-bar {
  position: sticky;
  top: 88px;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(10, 20, 28, 0.9);
  padding: 13px 14px 13px 18px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}
.command-label { display: grid; gap: 2px; min-width: 190px; }
.command-label span { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.command-label strong { font-size: 12px; }
.controls label { display: grid; gap: 4px; }
.controls select { height: 40px; min-width: 170px; border-color: var(--border); background-color: var(--surface-raised); }
.controls button { height: 40px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 11px; background: var(--text); padding-inline: 15px; }

.intelligence-grid { display: grid; grid-template-columns: minmax(390px, 0.82fr) minmax(0, 1.35fr); gap: 18px; margin-bottom: 18px; }
.panel, .metric-card, .methodology { border-color: var(--border); box-shadow: var(--shadow); }
.panel { border-radius: 22px; padding: 24px; }
.completion-card { display: flex; align-items: center; gap: clamp(22px, 3vw, 42px); min-height: 250px; overflow: hidden; }
.completion-ring { position: relative; flex: 0 0 158px; width: 158px; height: 158px; }
.completion-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.completion-ring circle { fill: none; stroke-width: 8; }
.ring-track { stroke: var(--surface-raised); }
.ring-value { stroke: var(--blue); stroke-linecap: round; stroke-dasharray: 320.44; stroke-dashoffset: 320.44; transition: stroke-dashoffset 700ms cubic-bezier(.2,.8,.2,1); }
.completion-ring > div { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; }
.completion-ring strong { font-size: 31px; line-height: 1; letter-spacing: -0.045em; }
.completion-ring span { margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.completion-copy h2 { margin-bottom: 8px; font-size: 27px; }
.completion-copy > p:not(.panel-kicker) { max-width: 330px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }

.brief-card { min-height: 250px; }
.compact-heading { min-height: auto; margin-bottom: 16px; }
.signal-label { border: 1px solid var(--border); border-radius: 999px; color: var(--muted); padding: 5px 9px; font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.brief-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.brief-item { min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); padding: 14px; }
.brief-item::before { content: ""; display: block; width: 22px; height: 2px; margin-bottom: 13px; border-radius: 3px; background: var(--blue); }
.brief-item.warning::before { background: var(--orange); }
.brief-item.visibility::before { background: var(--gold); }
.brief-item span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.brief-item strong { display: block; overflow: hidden; margin: 6px 0 5px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.brief-item p { margin: 0; color: var(--muted-strong); font-size: 10px; line-height: 1.45; }

.metric-grid { gap: 10px; }
.metric-card { min-height: 176px; border-radius: 18px; background: var(--surface); padding: 18px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-card .metric-top p { margin: 0; }
.metric-icon { width: 28px; height: 28px; display: grid !important; place-items: center; margin: 0 !important; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); color: var(--muted-strong) !important; font-size: 13px !important; }
.metric-card strong { margin: 20px 0 17px; font-size: clamp(31px, 3vw, 44px); }
.metric-card > div:last-child { display: grid; gap: 6px; }
.metric-card small { color: var(--muted); font-size: 9px; }

.delta { display: inline-flex; width: fit-content; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 750; line-height: 1.35; white-space: nowrap; }
.delta-up { border-color: rgba(168, 189, 112, 0.3); background: rgba(168, 189, 112, 0.07); color: #cfdda9; }
.delta-down { border-color: rgba(226, 138, 91, 0.32); background: rgba(226, 138, 91, 0.07); color: #f1b08c; }
.delta-neutral { color: var(--muted); }

.dashboard-grid { gap: 18px; }
.dashboard-grid-primary { grid-template-columns: minmax(0, 1.8fr) minmax(330px, 0.72fr); }
.panel-heading { min-height: auto; }
.panel-heading h2 { font-size: 22px; }
.panel-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.legend-successes { background: var(--olive); }
.chart { min-height: 330px; margin-top: 22px; }
.chart svg { height: 330px; }
.chart-grid { stroke: #192a33; }
.chart-area-attempts { fill: rgba(98, 180, 255, 0.075); }
.chart-line-successes { stroke: var(--olive); stroke-width: 2; }
.chart-dot-successes { fill: var(--surface); stroke: var(--olive); stroke-width: 2; }
.chart-zero { stroke: var(--border-strong); stroke-width: 1; }

.outcome-visual { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; min-height: 270px; margin-top: 12px; }
.donut { position: relative; width: 150px; height: 150px; }
.donut svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 15; }
.donut-track { stroke: var(--surface-raised); }
.donut-segment { stroke-linecap: butt; }
.donut-center { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; }
.donut-center strong { font-size: 29px; line-height: 1; }
.donut-center span { margin-top: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.outcome-list { display: grid; gap: 11px; }
.outcome-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; color: var(--muted-strong); font-size: 11px; }
.outcome-dot { width: 8px; height: 8px; border-radius: 50%; }
.outcome-row strong { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

.section-heading { display: flex; justify-content: space-between; margin: 54px 0 18px; padding-inline: 2px; }
#levels, #attempts { scroll-margin-top: 188px; }
.section-heading h2 { margin-bottom: 7px; font-size: 30px; }
.section-heading p:not(.panel-kicker) { margin: 0; color: var(--muted); font-size: 12px; }
.inline-control { display: grid; align-self: flex-start; gap: 4px; color: var(--muted); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.inline-control select { min-width: 150px; height: 36px; border-color: var(--border); font-size: 11px; letter-spacing: 0; text-transform: none; }

.panel-levels { padding-bottom: 12px; }
table { font-size: 11px; }
th { color: #708892; font-size: 8px; }
th, td { padding-block: 15px; }
tbody tr { transition: background 120ms ease; }
tbody tr:hover td { background: rgba(98, 180, 255, 0.04); }
.level-cell { min-width: 178px; }
.level-cell strong, .level-cell .table-link { font-size: 11px; text-decoration: none; }
.level-cell span { display: block; margin-top: 3px; font-size: 8px; letter-spacing: 0.07em; text-transform: uppercase; }
.table-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.table-link::after { content: "↗"; color: var(--blue); font-size: 9px; opacity: 0; transform: translate(-3px, 2px); transition: opacity 120ms ease, transform 120ms ease; }
.table-link:hover::after { opacity: 1; transform: translate(0, 0); }
.metric-cell { min-width: 92px; }
.metric-cell-value { display: block; color: var(--text); font-variant-numeric: tabular-nums; }
.mini-track { width: 74px; height: 3px; margin: 7px 0 0 auto; overflow: hidden; border-radius: 3px; background: var(--surface-raised); }
.mini-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.mini-track.difficulty i { background: var(--orange); }
.mini-track.replay i { background: var(--gold); }

.bar-chart { min-height: 265px; }
.bar-row { grid-template-columns: minmax(100px, 0.9fr) minmax(90px, 1.5fr) 38px; }
.bar-track { height: 6px; background: var(--surface-raised); }
.bar-fill { background: var(--orange); }
.bar-fill.success { background: var(--olive); }

.recent-panel { margin-top: 54px; padding-bottom: 12px; }
.recent-panel tbody td { padding-block: 14px; }
.attempt-time { display: grid; gap: 2px; }
.attempt-time::after { display: none; }
.attempt-time small { color: var(--muted); font-size: 8px; }
.outcome-pill, .replay-pill { padding: 4px 8px; font-size: 8px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.outcome-pill::before, .replay-pill::before { content: ""; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--muted); }
.outcome-pill.success::before { background: var(--olive); }
.outcome-pill.failure::before { background: var(--orange); }
.replay-pill.available::before { background: var(--blue); }

.methodology { margin-top: 18px; background: transparent; box-shadow: none; }
footer { padding-bottom: 18px; }

.detail-open .topnav { visibility: hidden; }
.detail-header { background: transparent; }
.detail-section { border-radius: 18px; }
.level-map { box-shadow: inset 0 0 70px rgba(98, 180, 255, 0.025); }

@media (max-width: 1240px) {
  .orbit-visual { right: -60px; opacity: 0.5; }
  .hero-content { max-width: 790px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .brief-list { grid-template-columns: 1fr; }
  .brief-card { min-height: unset; }
  .brief-item { display: grid; grid-template-columns: 70px minmax(130px, 0.7fr) 1fr; align-items: center; gap: 12px; }
  .brief-item::before { margin: 0; }
  .brief-item strong { margin: 0; }
}

@media (min-width: 941px) {
  .dashboard-grid:not(.dashboard-grid-primary) { grid-template-columns: minmax(0, 2.5fr) minmax(260px, 0.72fr); }
}

@media (max-width: 940px) {
  .shell { padding-inline: 20px; }
  .topnav { display: none; }
  .hero { min-height: 360px; }
  .orbit-visual { right: -110px; opacity: 0.32; }
  .command-bar { position: relative; top: auto; align-items: flex-start; flex-direction: column; }
  .command-label { min-width: 0; }
  .controls { width: 100%; justify-content: flex-start; }
  .intelligence-grid { grid-template-columns: 1fr; }
  .brief-list { grid-template-columns: repeat(3, 1fr); }
  .brief-item { display: block; }
  .brief-item::before { margin-bottom: 13px; }
  .brief-item strong { margin: 6px 0 5px; }
  .dashboard-grid, .dashboard-grid-primary { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell { padding-inline: 12px; }
  .topbar { min-height: 66px; }
  .topbar-actions { gap: 7px; }
  .docs-link { padding-inline: 9px; }
  .hero { min-height: 410px; padding: 46px 4px 36px; }
  h1 { font-size: 45px; }
  .hero-copy { font-size: 14px; }
  .hero-meta { display: grid; gap: 7px; }
  .orbit-visual { right: -190px; opacity: 0.23; }
  .command-bar { padding: 14px; }
  .controls label { flex: 1 1 calc(50% - 5px); }
  .controls button { flex: 1 0 100%; justify-content: center; }
  .intelligence-grid { gap: 12px; }
  .completion-card { min-height: 220px; gap: 18px; padding: 20px; }
  .completion-ring { flex-basis: 122px; width: 122px; height: 122px; }
  .completion-ring strong { font-size: 25px; }
  .completion-copy h2 { font-size: 21px; }
  .brief-list { grid-template-columns: 1fr; }
  .brief-item { display: grid; grid-template-columns: 42px minmax(110px, 0.7fr) 1fr; align-items: center; gap: 9px; }
  .brief-item::before, .brief-item strong { margin: 0; }
  .brief-item p { font-size: 9px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 164px; }
  .metric-card strong { font-size: 36px; }
  .metric-card .delta { white-space: normal; }
  .panel { padding: 18px; }
  .panel-heading-actions { width: 100%; align-items: flex-start; }
  .legend { flex-wrap: wrap; white-space: normal; }
  .chart { min-height: 265px; }
  .chart svg { height: 265px; }
  .outcome-visual { grid-template-columns: 126px 1fr; }
  .donut { width: 126px; height: 126px; }
  .section-heading { margin-top: 42px; }
  .section-heading h2 { font-size: 27px; }
  .panel-heading .inline-control { width: 100%; }
  .panel-heading .inline-control select { width: 100%; }
  .recent-panel { margin-top: 42px; }
  .definition-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
