:root {
  color-scheme: dark;
  --bg: #050606;
  --panel: rgba(13, 17, 18, 0.76);
  --panel-strong: rgba(18, 25, 26, 0.9);
  --line: rgba(218, 255, 248, 0.14);
  --text: #eefbf8;
  --muted: #8fa29d;
  --soft: #c3d5d0;
  --cyan: #62f7df;
  --green: #8cff8c;
  --amber: #ffc861;
  --red: #ff6675;
  --ink: #07100f;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  --energy: 0;
  --accent: var(--cyan);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 8%, rgba(98, 247, 223, 0.14), transparent 28%),
    radial-gradient(circle at 82% 28%, rgba(255, 200, 97, 0.12), transparent 24%),
    linear-gradient(145deg, #050606 0%, #07100f 48%, #0a0b08 100%);
  overflow-x: hidden;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.service-logo {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: inline-block;
}

.service-logo-cloudflare {
  width: 1.46em;
}

.service-logo-microsoft {
  width: 0.92em;
  height: 0.92em;
}

button {
  border: 0;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.ambient {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  filter: blur(28px);
  opacity: 0.42;
}

.ambient-a {
  top: 10%;
  left: 12%;
  width: 18rem;
  height: 2px;
  background: var(--cyan);
  transform: rotate(-18deg);
  animation: drift 7s ease-in-out infinite;
}

.ambient-b {
  right: 4%;
  bottom: 20%;
  width: 14rem;
  height: 2px;
  background: var(--amber);
  transform: rotate(27deg);
  animation: drift 8s ease-in-out infinite reverse;
}

.shell {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 40px));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(14px, 2vw, 28px) 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(14px, 1.8vw, 24px);
}

.topbar,
.hero-panel,
.metrics-panel,
.insight-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(16, 21, 22, 0.84), rgba(8, 11, 11, 0.66));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.topbar {
  min-height: 64px;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 0 34px rgba(98, 247, 223, 0.28);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
  margin-top: 5px;
  font-size: 0.76rem;
}

.system-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 0.8rem;
}

.system-strip span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(238, 251, 248, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.system-strip .icon,
.system-strip .service-logo {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}

.system-strip .service-logo-cloudflare {
  width: 24px;
  height: 16px;
}

.system-strip .service-logo-microsoft {
  width: 14px;
  height: 14px;
}

.system-strip b {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.ico-google {
  border-radius: 50%;
}

.ico-google::before {
  content: "G";
  inset: 0;
  display: grid;
  place-items: center;
  color: #eefbf8;
  font-size: 0.78em;
  font-weight: 900;
}

.ico-google::after {
  inset: 1px;
  border: 2px solid currentColor;
  border-left-color: var(--amber);
  border-bottom-color: var(--green);
  border-radius: 50%;
}

.ico-microsoft {
  width: 14px;
  height: 14px;
}

.ico-microsoft::before {
  inset: 1px;
  background:
    linear-gradient(90deg, var(--cyan) 0 46%, transparent 46% 54%, var(--green) 54%),
    linear-gradient(var(--amber) 0 46%, transparent 46% 54%, #ff6675 54%);
  background-blend-mode: screen;
}

.ico {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: inline-block;
  position: relative;
  color: currentColor;
}

.ico::before,
.ico::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.ico-wifi {
  width: 17px;
  height: 12px;
}

.ico-wifi::before {
  inset: 0;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  opacity: 0.85;
}

.ico-wifi::after {
  left: 6px;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.ico-edge,
.ico-globe {
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.ico-edge::before,
.ico-globe::before {
  inset: 3px 1px;
  border-left: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  border-radius: 50%;
}

.ico-edge::after,
.ico-globe::after {
  left: 2px;
  right: 2px;
  top: 50%;
  border-top: 1.5px solid currentColor;
}

.ico-clock {
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.ico-clock::before {
  left: 50%;
  top: 3px;
  width: 1.5px;
  height: 5px;
  background: currentColor;
}

.ico-clock::after {
  left: 50%;
  top: 50%;
  width: 5px;
  border-top: 1.5px solid currentColor;
  transform: rotate(28deg);
  transform-origin: left center;
}

.ico-down::before,
.ico-up::before {
  left: 45%;
  top: 1px;
  width: 2px;
  height: 13px;
  background: currentColor;
}

.ico-down::after,
.ico-up::after {
  left: 3px;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.ico-down::after {
  bottom: 1px;
  transform: rotate(45deg);
}

.ico-up::after {
  top: 1px;
  transform: rotate(225deg);
}

.ico-latency {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.ico-latency::before {
  inset: 4px;
  border-radius: 50%;
  background: currentColor;
}

.ico-jitter::before {
  left: 1px;
  right: 1px;
  top: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  transform: skewX(-18deg);
}

.ico-score::before,
.ico-diagnostic::before {
  inset: 1px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.ico-score::after,
.ico-diagnostic::after {
  left: 50%;
  top: 3px;
  width: 2px;
  height: 8px;
  background: currentColor;
  transform: rotate(35deg);
  transform-origin: bottom center;
}

.ico-pulse::before {
  left: 0;
  right: 0;
  top: 7px;
  height: 2px;
  background: currentColor;
}

.ico-pulse::after {
  left: 4px;
  top: 3px;
  width: 8px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.ico-reset::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.ico-reset::after {
  right: 2px;
  top: 0;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(10deg);
}

.ico-flag-fr,
.ico-flag-us {
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.ico-flag-fr::before {
  inset: 0;
  background: linear-gradient(90deg, #3659ff 0 33%, #fff 33% 66%, #ff4f5f 66%);
}

.ico-flag-us::before {
  inset: 0;
  background:
    linear-gradient(#334f9f 0 45%, transparent 45%),
    repeating-linear-gradient(180deg, #ff5968 0 2px, #fff 2px 4px);
}

.ico-stream::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.ico-stream::after {
  left: 6px;
  top: 4px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.ico-game::before {
  inset: 4px 1px 3px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.ico-game::after {
  left: 5px;
  top: 7px;
  width: 3px;
  height: 3px;
  background: currentColor;
  box-shadow: 7px 0 0 currentColor;
}

.ico-call::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.ico-call::after {
  right: 0;
  top: 5px;
  width: 5px;
  height: 7px;
  background: currentColor;
  clip-path: polygon(0 28%, 100% 0, 100% 100%, 0 72%);
}

.ico-history::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.ico-history::after {
  left: 7px;
  top: 4px;
  width: 2px;
  height: 6px;
  background: currentColor;
  box-shadow: 3px 5px 0 -0.2px currentColor;
}

.ico-trash::before {
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 11px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.ico-trash::after {
  left: 3px;
  right: 3px;
  top: 2px;
  border-top: 2px solid currentColor;
  box-shadow: 4px -2px 0 -1px currentColor;
}

.stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1.12fr) minmax(340px, 0.9fr) minmax(300px, 0.76fr);
  gap: clamp(12px, 1.4vw, 18px);
}

.hero-panel,
.metrics-panel,
.insight-panel {
  border-radius: 8px;
  min-width: 0;
}

.hero-panel {
  padding: clamp(18px, 2vw, 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.status-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-meta {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
}

.status-pill {
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--cyan);
  padding: 7px 11px;
  border-radius: 999px;
  font-weight: 800;
}

.status-pill.running {
  background: var(--amber);
}

.status-pill.error {
  color: var(--text);
  background: var(--red);
}

.dial-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  position: relative;
  overflow: visible;
}

.dial {
  position: relative;
  width: min(56svh, 420px, 82vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  isolation: isolate;
  overflow: visible;
  transition:
    transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1),
    filter 220ms ease;
}

.dial::before,
.dial::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.dial::before {
  inset: 13%;
  background:
    radial-gradient(circle, rgba(98, 247, 223, calc(0.12 + var(--energy) * 0.22)), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  border: 1px solid rgba(238, 251, 248, 0.08);
  transition:
    background 220ms ease,
    box-shadow 220ms ease;
}

.dial::after {
  inset: 0;
  border: 1px solid rgba(98, 247, 223, 0.2);
  box-shadow:
    inset 0 0 calc(60px + var(--energy) * 60px) rgba(98, 247, 223, calc(0.1 + var(--energy) * 0.22)),
    0 0 calc(var(--energy) * 42px) rgba(98, 247, 223, 0.2);
  animation: pulse 3.6s ease-in-out infinite;
}

.dial:hover {
  transform: translateY(-2px) scale(1.012);
  filter: brightness(1.06);
}

.dial:active {
  transform: scale(0.992);
}

.dial:disabled {
  cursor: progress;
}

.dial.is-running {
  animation: dialCharge 1.6s ease-in-out infinite;
}

.dial-orbit {
  position: absolute;
  inset: 5.5%;
  border-radius: 50%;
  pointer-events: none;
  background:
    conic-gradient(from 0deg, transparent 0 64%, rgba(98, 247, 223, 0.9), transparent 74%),
    conic-gradient(from 180deg, transparent 0 72%, rgba(255, 200, 97, 0.72), transparent 80%);
  opacity: calc(0.18 + var(--energy) * 0.66);
  mask: radial-gradient(circle, transparent 58%, #000 59%, #000 61%, transparent 62%);
  animation: orbit 3.4s linear infinite;
}

.dial-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform: rotate(-90deg);
}

.ring-track,
.ring-progress {
  fill: none;
  stroke-width: 10;
}

.ring-track {
  stroke: rgba(238, 251, 248, 0.08);
}

.ring-progress {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 704;
  stroke-dashoffset: 704;
  filter: drop-shadow(0 0 calc(10px + var(--energy) * 18px) rgba(98, 247, 223, 0.8));
  transition: stroke-dashoffset 450ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.dial-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
}

.metric-label,
.unit,
.score span,
.score small,
.metric-card span,
.metric-card small,
.panel-label,
.use-cases span {
  color: var(--muted);
}

.metric-label {
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
}

.dial-core strong {
  max-width: 100%;
  margin-top: 4px;
  font-size: clamp(4rem, 8.2vw, 7.4rem);
  line-height: 0.88;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.unit {
  margin-top: 10px;
  font-size: 1rem;
}

.tap-hint {
  min-width: 74px;
  min-height: 28px;
  margin-top: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0 calc(16px + var(--energy) * 24px) rgba(98, 247, 223, 0.22);
}

.score {
  flex: 0 0 auto;
  min-width: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.score strong {
  font-size: 0.92rem;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.score .icon {
  width: 15px;
  height: 15px;
  color: var(--cyan);
}

.score small {
  display: none;
}

.ghost-action,
.history button {
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.ghost-action,
.history button {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(238, 251, 248, 0.1);
  padding: 0 14px;
}

.icon-button,
.history button {
  width: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.ghost-action:hover,
.history button:hover {
  transform: translateY(-1px);
}

.ghost-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.live-panel {
  min-height: 170px;
  border-radius: 8px;
  border: 1px solid rgba(238, 251, 248, 0.08);
  background:
    linear-gradient(180deg, rgba(98, 247, 223, calc(0.05 + var(--energy) * 0.07)), transparent),
    rgba(255, 255, 255, 0.04);
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  overflow: hidden;
}

.live-head,
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-head .panel-label {
  margin: 0;
}

.live-head .ghost-action {
  min-height: 32px;
  font-size: 0.78rem;
}

#speedChart {
  width: 100%;
  height: 58px;
  min-height: 0;
  display: block;
  border-radius: 6px;
  background:
    linear-gradient(rgba(238, 251, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 251, 248, 0.05) 1px, transparent 1px),
    rgba(0, 0, 0, 0.18);
  background-size: 100% 50%, 25% 100%, auto;
}

.chart-legend {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.chart-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.legend-down {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(98, 247, 223, 0.8);
}

.legend-up {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 200, 97, 0.7);
}

.probe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.probe-card {
  min-width: 0;
  min-height: 54px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(238, 251, 248, 0.08);
  background: rgba(0, 0, 0, 0.18);
  display: grid;
  align-content: space-between;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.probe-card span,
.probe-card small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.probe-card span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.probe-card .icon {
  width: 15px;
  height: 15px;
}

.probe-card .service-logo {
  width: 20px;
  height: 14px;
}

.probe-card strong {
  margin-top: 2px;
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.probe-card small {
  font-size: 0.68rem;
}

.probe-card.is-running {
  border-color: rgba(255, 200, 97, 0.28);
  background: rgba(255, 200, 97, 0.07);
}

.probe-card.is-done {
  border-color: rgba(98, 247, 223, 0.28);
  background: rgba(98, 247, 223, 0.06);
}

.probe-card.is-error {
  border-color: rgba(255, 102, 117, 0.25);
}

.metrics-panel {
  padding: clamp(14px, 1.5vw, 18px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 118px;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(238, 251, 248, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  align-content: space-between;
  overflow: hidden;
  position: relative;
  transition:
    border-color 220ms ease,
    transform 220ms ease,
    background 220ms ease;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  box-shadow: 0 0 16px var(--accent);
  transition: opacity 220ms ease;
}

.metric-card.is-active {
  border-color: rgba(98, 247, 223, 0.32);
  transform: translateY(-1px);
}

.metric-card.is-active::after {
  opacity: 0.78;
}

.metric-card.emphasis {
  min-height: 150px;
  background:
    linear-gradient(145deg, rgba(98, 247, 223, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
}

.metric-card strong {
  display: block;
  margin: 10px 0 7px;
  font-size: clamp(1.5rem, 3.4vw, 2.55rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-card span,
.panel-label,
.use-cases span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.metric-card span .icon,
.panel-label .icon,
.use-cases span .icon {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}

.metric-card:nth-child(2) span .icon {
  color: var(--amber);
}

.metric-card:nth-child(4) span .icon,
.history-head .panel-label .icon {
  color: var(--green);
}

.metric-card small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-card b {
  font-weight: 900;
}

.metric-card small {
  line-height: 1.25;
}

.insight-panel {
  padding: clamp(14px, 1.5vw, 18px);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 12px;
  overflow: hidden;
}

.diagnostic,
.use-cases,
.env-panel,
.history {
  border-radius: 8px;
  border: 1px solid rgba(238, 251, 248, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.diagnostic {
  padding: 16px;
}

.panel-label {
  margin-bottom: 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.live-head .panel-label .icon {
  color: var(--amber);
}

.diagnostic .panel-label .icon {
  color: var(--cyan);
}

.diagnostic strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.diagnostic p {
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.use-cases {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.use-cases div {
  display: grid;
  gap: 7px;
}

.use-cases span {
  font-size: 0.86rem;
}

.env-panel {
  min-height: 0;
  padding: 14px;
}

.env-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.env-grid div {
  min-width: 0;
}

.env-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.env-grid dd {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

meter {
  width: 100%;
  height: 8px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--cyan), var(--green));
}

meter::-moz-meter-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--cyan), var(--green));
}

.history {
  min-height: 0;
  padding: 14px;
  display: grid;
  grid-template-rows: auto 1fr;
}

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

.history-head .panel-label {
  margin: 0;
}

.history button {
  min-height: 32px;
  font-size: 0.78rem;
}

.history button .icon {
  width: 15px;
  height: 15px;
}

.history ol {
  min-height: 0;
  overflow: auto;
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  align-content: start;
  gap: 8px;
}

.history li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 10px;
  border-radius: 8px;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.82rem;
}

.history li strong {
  color: var(--text);
}

.history li time {
  color: var(--muted);
}

@keyframes drift {
  0%,
  100% {
    opacity: 0.2;
    transform: translate3d(0, 0, 0) rotate(-18deg);
  }
  50% {
    opacity: 0.5;
    transform: translate3d(18px, -14px, 0) rotate(-14deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.025);
    opacity: 1;
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dialCharge {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(calc(1.08 + var(--energy) * 0.18));
  }
}

@media (min-width: 900px) and (min-height: 680px) {
  body {
    overflow: hidden;
  }

  .shell {
    height: 100svh;
  }
}

@media (min-width: 900px) and (max-height: 780px) {
  .shell {
    padding: 12px 0;
    gap: 10px;
  }

  .topbar {
    min-height: 56px;
    padding: 7px 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand small {
    margin-top: 3px;
  }

  .system-strip span {
    min-height: 26px;
    padding: 0 8px;
  }

  .stage {
    gap: 10px;
  }

  .hero-panel,
  .metrics-panel,
  .insight-panel {
    padding: 12px;
  }

  .status-row {
    min-height: 30px;
    font-size: 0.82rem;
  }

  .status-pill {
    padding: 5px 9px;
  }

  .dial {
    width: min(47svh, 330px, 82vw);
  }

  .score {
    padding: 9px 11px;
  }

  .tap-hint {
    min-height: 24px;
    margin-top: 9px;
    font-size: 0.72rem;
  }

  .live-panel {
    min-height: 148px;
    padding: 9px;
    gap: 6px;
  }

  #speedChart {
    height: 42px;
  }

  .probe-grid {
    gap: 5px;
  }

  .probe-card {
    min-height: 45px;
    padding: 6px;
  }

  .probe-card strong {
    font-size: 0.9rem;
  }

  .probe-card span,
  .probe-card small {
    font-size: 0.62rem;
  }

  .live-head .ghost-action {
    min-height: 28px;
  }

  .metrics-panel {
    gap: 8px;
  }

  .metric-card,
  .metric-card.emphasis {
    min-height: 0;
    padding: 11px;
  }

  .metric-card strong {
    margin: 6px 0 5px;
    font-size: clamp(1.35rem, 2.5vw, 2.05rem);
  }

  .metric-card small,
  .metric-card span,
  .use-cases span,
  .history li {
    font-size: 0.76rem;
  }

  .insight-panel {
    gap: 8px;
  }

  .diagnostic {
    padding: 12px;
  }

  .diagnostic strong {
    font-size: 1.12rem;
  }

  .diagnostic p {
    margin-top: 7px;
    line-height: 1.3;
  }

  .panel-label {
    margin-bottom: 7px;
    font-size: 0.68rem;
  }

  .use-cases {
    padding: 10px;
    gap: 8px;
  }

  .history {
    padding: 10px;
  }

  .history ol {
    gap: 6px;
  }

  .history li {
    padding: 8px;
  }
}

@media (max-width: 1180px) {
  .stage {
    grid-template-columns: minmax(330px, 1fr) minmax(330px, 1fr);
  }

  .insight-panel {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 720px);
    min-height: auto;
  }

  .topbar,
  .stage,
  .insight-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .system-strip {
    justify-content: start;
  }

  .hero-panel {
    min-height: 620px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 18px, 420px);
    padding: 10px 0;
  }

  .metrics-panel {
    grid-template-columns: 1fr;
  }

  .dial {
    width: min(82vw, 330px);
  }

  .hero-panel {
    min-height: auto;
  }

  .live-panel {
    min-height: 184px;
  }

  #speedChart {
    height: 76px;
  }

  .probe-grid {
    grid-template-columns: 1fr;
  }

  .status-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Open cockpit UI pass: no nested cards, only structural rails. */
.topbar,
.hero-panel,
.metrics-panel,
.insight-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar {
  min-height: 58px;
  padding: 6px 4px 12px;
  border-bottom: 1px solid rgba(218, 255, 248, 0.12);
  border-radius: 0;
}

.brand-mark {
  border-radius: 8px;
  box-shadow:
    0 0 28px rgba(98, 247, 223, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.system-strip span {
  border: 0;
  background: transparent;
  padding: 0 2px 0 12px;
  min-height: 28px;
  border-left: 1px solid rgba(238, 251, 248, 0.14);
  border-radius: 0;
}

.stage {
  grid-template-columns: minmax(390px, 1.18fr) minmax(360px, 0.9fr) minmax(290px, 0.7fr);
  gap: 0;
  border-bottom: 1px solid rgba(218, 255, 248, 0.08);
}

.hero-panel,
.metrics-panel,
.insight-panel {
  border-radius: 0;
  padding: clamp(14px, 1.55vw, 22px);
}

.metrics-panel,
.insight-panel {
  border-left: 1px solid rgba(218, 255, 248, 0.12);
}

.hero-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.status-row {
  min-height: 28px;
  align-items: center;
}

.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(98, 247, 223, 0.18);
}

.dial-wrap {
  align-content: center;
}

.dial {
  width: min(52svh, 390px, 78vw);
}

.dial::before {
  inset: 16%;
  background:
    radial-gradient(circle, rgba(98, 247, 223, calc(0.09 + var(--energy) * 0.2)), transparent 62%),
    radial-gradient(circle at 50% 58%, rgba(255, 200, 97, 0.05), transparent 42%);
  border-color: rgba(238, 251, 248, 0.07);
}

.dial::after {
  border-color: rgba(98, 247, 223, 0.16);
  box-shadow:
    inset 0 0 calc(44px + var(--energy) * 56px) rgba(98, 247, 223, calc(0.08 + var(--energy) * 0.18)),
    0 0 calc(var(--energy) * 32px) rgba(98, 247, 223, 0.16);
}

.score {
  min-width: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.score strong {
  font-size: 0.92rem;
}

.score small {
  display: none;
}

.live-panel {
  min-height: 136px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(218, 255, 248, 0.11);
  border-radius: 0;
  background: transparent;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.live-head {
  padding: 0 0 2px;
}

.live-head .ghost-action,
.history button {
  border: 0;
  background: transparent;
}

#speedChart {
  height: 46px;
  border-radius: 0;
  background:
    linear-gradient(rgba(238, 251, 248, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 251, 248, 0.05) 1px, transparent 1px);
  background-size: 100% 50%, 25% 100%;
}

.probe-grid {
  gap: 0;
  border-top: 1px solid rgba(218, 255, 248, 0.1);
}

.probe-card {
  min-height: 44px;
  padding: 8px 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.probe-card + .probe-card {
  border-left: 1px solid rgba(218, 255, 248, 0.1);
}

.probe-card.is-running,
.probe-card.is-done,
.probe-card.is-error {
  background: transparent;
}

.probe-card.is-running {
  color: var(--amber);
}

.probe-card.is-done {
  color: var(--cyan);
}

.metrics-panel {
  padding-block: clamp(14px, 1.55vw, 22px);
  gap: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.metric-card,
.metric-card.emphasis {
  min-height: 0;
  padding: clamp(18px, 2vw, 24px) 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.metric-card:nth-child(odd) {
  border-right: 1px solid rgba(218, 255, 248, 0.1);
}

.metric-card:nth-child(-n + 2) {
  border-bottom: 1px solid rgba(218, 255, 248, 0.1);
}

.metric-card::after {
  inset: auto 14px 0;
}

.metric-card.is-active {
  transform: none;
  background:
    linear-gradient(180deg, rgba(98, 247, 223, 0.075), transparent),
    transparent;
}

.metric-card strong {
  margin: 10px 0 5px;
}

.insight-panel {
  grid-template-rows: auto auto auto 1fr;
}

.diagnostic,
.use-cases,
.env-panel,
.history {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.diagnostic,
.use-cases,
.env-panel {
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(218, 255, 248, 0.1);
}

.history {
  padding: 0;
}

.diagnostic strong {
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
}

.diagnostic p {
  max-width: 28ch;
  margin-top: 8px;
}

.use-cases {
  gap: 11px;
}

.use-cases div {
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 12px;
}

.env-panel {
  padding-bottom: 14px;
}

.env-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.history-head {
  margin-bottom: 4px;
}

.history ol {
  gap: 0;
}

.history li {
  padding: 10px 0;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid rgba(218, 255, 248, 0.08);
}

@media (min-width: 900px) and (max-height: 780px) {
  .shell {
    padding: 10px 0;
    gap: 10px;
  }

  .topbar {
    min-height: 52px;
    padding-bottom: 8px;
  }

  .hero-panel,
  .metrics-panel,
  .insight-panel {
    padding: 11px 14px;
  }

  .dial {
    width: min(43svh, 305px, 76vw);
  }

  .live-panel {
    min-height: 126px;
    padding-top: 9px;
  }

  #speedChart {
    height: 38px;
  }

  .metric-card,
  .metric-card.emphasis {
    padding: 11px 12px;
  }

  .diagnostic,
  .use-cases {
    padding-bottom: 11px;
  }
}

@media (max-width: 1180px) {
  .stage {
    gap: 0;
  }

  .insight-panel {
    border-left: 0;
    border-top: 1px solid rgba(218, 255, 248, 0.12);
  }
}

@media (max-width: 860px) {
  .topbar {
    gap: 12px;
  }

  .topbar,
  .stage,
  .insight-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .metrics-panel,
  .insight-panel {
    border-left: 0;
    border-top: 1px solid rgba(218, 255, 248, 0.12);
  }

  .hero-panel {
    min-height: auto;
  }

  .live-panel {
    min-height: 156px;
  }
}

@media (max-width: 560px) {
  .system-strip span {
    padding-left: 8px;
  }

  .metric-card:nth-child(odd) {
    border-right: 0;
  }

  .metric-card {
    border-bottom: 1px solid rgba(218, 255, 248, 0.1);
  }

  .probe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .probe-card {
    padding-inline: 6px;
  }
}

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