:root {
   --bg: #070a0f;
   --panel: #0c1118;
   --panel-raised: #101720;
   --line: #202b37;
   --line-bright: #30404d;
   --ink: #fff;
   --muted: #98a4b3;
   --faint: #637181;
   --mint: #00f0b5;
   --cyan: #65d8ff;
   --orange: #ffb36b;
   --red: #ff7d8c;
   --brand-filter: none;
   --bg-glow-1: rgba(0, 240, 181, .1);
   --bg-glow-2: rgba(101, 216, 255, .07);
   --grid-line: rgba(101, 216, 255, .035);
   --topbar-border: rgba(48, 64, 77, .58);
   --notice-bg: rgba(255, 179, 107, .07);
   --notice-border: rgba(255, 179, 107, .35);
   --notice-text: #ffd0a9;
   --panel-bg: rgba(12, 17, 24, .9);
   --panel-hover-border: rgba(48, 64, 77, .95);
   --bar-bg: #1b2631;
   --mint-badge-bg: rgba(0, 240, 181, .1);
   --mint-badge-border: rgba(0, 240, 181, .25);
   --warn-badge-bg: rgba(255, 179, 107, .1);
   --warn-badge-border: rgba(255, 179, 107, .28);
   --red-badge-bg: rgba(255, 125, 140, .1);
   --muted-badge-bg: rgba(152, 164, 179, .12);
   --select-focus-ring: rgba(0, 240, 181, .12);
   --mint-glow: rgba(0, 240, 181, .8);
}

[data-theme="light"] {
   --bg: #f8fafc;
   --panel: #ffffff;
   --panel-raised: #f1f5f9;
   --line: #e2e8f0;
   --line-bright: #cbd5e1;
   --ink: #0f172a;
   --muted: #475569;
   --faint: #64748b;
   --mint: #059669;
   --cyan: #0284c7;
   --orange: #d97706;
   --red: #dc2626;
   --brand-filter: brightness(0.12);
   --bg-glow-1: rgba(5, 150, 105, .08);
   --bg-glow-2: rgba(2, 132, 199, .06);
   --grid-line: rgba(15, 23, 42, .035);
   --topbar-border: #e2e8f0;
   --notice-bg: #fffbeb;
   --notice-border: #fde68a;
   --notice-text: #92400e;
   --panel-bg: #ffffff;
   --panel-hover-border: #94a3b8;
   --bar-bg: #e2e8f0;
   --mint-badge-bg: #ecfdf5;
   --mint-badge-border: #a7f3d0;
   --warn-badge-bg: #fffbeb;
   --warn-badge-border: #fde68a;
   --red-badge-bg: #fef2f2;
   --muted-badge-bg: #f1f5f9;
   --select-focus-ring: rgba(5, 150, 105, .15);
   --mint-glow: rgba(5, 150, 105, .4);
}

* {
   box-sizing: border-box;
}

html {
   background: var(--bg);
}

body {
   margin: 0;
   color: var(--ink);
   background: radial-gradient(circle at 12% -15%, var(--bg-glow-1), transparent 30rem), radial-gradient(circle at 92% 5%, var(--bg-glow-2), transparent 28rem), var(--bg);
   font: 15px/1.5 "DM Sans", sans-serif;
   transition: background-color .15s ease, color .15s ease;
}

body::before {
   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: 72px 72px;
   mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 70%);
   content: "";
}

.shell {
   width: min(1220px, calc(100% - 48px));
   margin: auto;
   padding: 24px 0 78px;
}

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

.brand {
   display: flex;
   gap: 13px;
   align-items: center;
   color: var(--ink);
   text-decoration: none;
}

.brand img {
   display: block;
   width: 122px;
   height: auto;
   filter: var(--brand-filter);
   transition: filter .15s ease;
}

.brand-divider {
   width: 1px;
   height: 18px;
   background: var(--line-bright);
}

.brand-product {
   color: var(--muted);
   font: 500 13px "DM Mono", monospace;
   letter-spacing: .08em;
   text-transform: uppercase;
}

.topbar-tools {
   display: flex;
   align-items: center;
   gap: 20px;
}

.topbar-link {
   color: var(--muted);
   font: 12px "DM Mono", monospace;
   text-decoration: none;
}

.topbar-link:hover {
   color: var(--mint);
}

.live-dot {
   color: var(--muted);
   font: 11px "DM Mono", monospace;
   letter-spacing: .08em;
   text-transform: uppercase;
}

.live-dot i {
   display: inline-block;
   width: 7px;
   height: 7px;
   margin-right: 7px;
   background: var(--mint);
   border-radius: 99px;
   box-shadow: 0 0 14px var(--mint-glow);
}

.theme-toggle {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 30px;
   height: 30px;
   padding: 0;
   color: var(--muted);
   background: var(--panel-raised);
   border: 1px solid var(--line-bright);
   border-radius: 6px;
   cursor: pointer;
   transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.theme-toggle:hover {
   color: var(--ink);
   border-color: var(--mint);
}

.theme-toggle svg {
   width: 15px;
   height: 15px;
}

:root:not([data-theme="light"]) .theme-toggle .moon-icon {
   display: none;
}

:root:not([data-theme="light"]) .theme-toggle .sun-icon {
   display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
   display: none;
}

[data-theme="light"] .theme-toggle .moon-icon {
   display: block;
}

.intro-row {
   display: flex;
   align-items: end;
   justify-content: space-between;
   gap: 30px;
   margin: 14px 0 22px;
}

.intro-row>div:first-child {
   min-width: 0;
   flex: 1 1 auto;
}

.eyebrow {
   display: block;
   color: var(--mint);
   font: 500 11px "DM Mono", monospace;
   letter-spacing: .12em;
   text-transform: uppercase;
}

h1 {
   max-width: 740px;
   margin: 14px 0 10px;
   color: var(--ink);
   font: 600 clamp(40px, 6vw, 78px)/.94 "Space Grotesk", sans-serif;
   letter-spacing: -.07em;
   overflow-wrap: anywhere;
   word-break: break-word;
}

.empty-state h1 span {
   color: var(--muted);
}

.subtitle,
.empty-state p {
   max-width: 650px;
   margin: 0;
   color: var(--muted);
   font-size: 16px;
   overflow-wrap: anywhere;
   word-break: break-word;
}

.empty-state {
   padding: 13vh 0;
}

.empty-state p {
   margin-top: 24px;
}

.filters {
   display: flex;
   flex: 0 1 440px;
   gap: 10px;
   min-width: 0;
}

label {
   display: grid;
   min-width: 0;
   gap: 7px;
   color: var(--faint);
   font: 10px "DM Mono", monospace;
   letter-spacing: .09em;
   text-transform: uppercase;
}

label select {
   min-width: 0;
   max-width: 100%;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

select {
   min-width: 170px;
   padding: 11px 34px 11px 12px;
   color: var(--ink);
   background: var(--panel-raised);
   border: 1px solid var(--line-bright);
   border-radius: 5px;
   outline: none;
   font: 13px "DM Sans", sans-serif;
}

select:focus {
   border-color: var(--mint);
   box-shadow: 0 0 0 3px var(--select-focus-ring);
}

.status-pill {
   display: inline-block;
   margin-left: 8px;
   padding: 3px 8px;
   color: var(--mint);
   background: var(--mint-badge-bg);
   border: 1px solid var(--mint-badge-border);
   border-radius: 99px;
   font-size: 10px;
   letter-spacing: .04em;
}

.status-pill.incomplete,
.status-pill.failed {
   color: var(--orange);
   background: var(--warn-badge-bg);
   border-color: var(--warn-badge-border);
}

.notice {
   padding: 13px 16px;
   margin: 20px 0;
   color: var(--notice-text);
   background: var(--notice-bg);
   border: 1px solid var(--notice-border);
   border-radius: 5px;
}

.meta-line {
   margin: 13px 0 48px;
   color: var(--faint);
   font: 11px "DM Mono", monospace;
}

.section-block {
   margin-top: 34px;
}

.section-heading {
   display: flex;
   align-items: baseline;
   justify-content: space-between;
   gap: 14px;
   padding-bottom: 14px;
}

.section-note {
   min-width: 0;
   color: var(--faint);
   font: 11px "DM Mono", monospace;
   overflow-wrap: anywhere;
   word-break: break-word;
}

.metric-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 1px;
   background: var(--line);
   border: 1px solid var(--line);
   border-radius: 6px;
   overflow: hidden;
}

.metric {
   min-height: 148px;
   padding: 21px;
   background: var(--panel);
}

.metric:hover {
   background: var(--panel-raised);
}

.metric-label {
   color: var(--muted);
   font-size: 12px;
}

.metric-value {
   margin: 12px 0 8px;
   color: var(--ink);
   font: 600 clamp(25px, 3.5vw, 42px)/1 "Space Grotesk", sans-serif;
   letter-spacing: -.06em;
   overflow-wrap: anywhere;
   word-break: break-word;
}

.metric-value.good {
   color: var(--mint);
}

.metric-value.neutral {
   color: var(--cyan);
}

.metric-value.warn {
   color: var(--orange);
}

.metric-detail {
   color: var(--faint);
   font: 11px "DM Mono", monospace;
   overflow-wrap: anywhere;
   word-break: break-word;
}

.two-col {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 16px;
}

.panel {
   padding: 21px;
   background: var(--panel-bg);
   border: 1px solid var(--line);
   border-radius: 6px;
}

.panel:hover {
   border-color: var(--panel-hover-border);
}

.bar-row {
   display: grid;
   grid-template-columns: 110px 1fr 70px;
   gap: 12px;
   align-items: center;
   margin: 15px 0;
   color: var(--muted);
   font-size: 12px;
}

.bar {
   height: 8px;
   overflow: hidden;
   background: var(--bar-bg);
   border-radius: 99px;
}

.bar i {
   display: block;
   height: 100%;
   background: var(--mint);
   border-radius: inherit;
}

.bar.b i {
   background: var(--cyan);
}

.panel-lede {
   max-width: 74ch;
   margin: 0 0 22px;
   color: var(--muted);
   font-size: 13px;
}

/* Run-health chip on the meta line. Quiet when every cell passed; loud when one did not, so a
   run with failures can never be mistaken for a clean one. */
.chip {
   display: inline-block;
   margin-left: 10px;
   padding: 3px 9px;
   border-radius: 99px;
   font: 10px "DM Mono", monospace;
   letter-spacing: .04em;
}

.chip.good {
   color: var(--mint);
   background: var(--mint-badge-bg);
   border: 1px solid var(--mint-badge-border);
}

.chip.warn {
   color: var(--orange);
   background: var(--warn-badge-bg);
   border: 1px solid var(--warn-badge-border);
}

/* Cost bridge: diverging bars around a zero axis. Mint = saved, red = cost. Direction and the
   signed value both carry the sign, so the chart survives grayscale and colour-blind viewing. */
.bridge-row {
   display: grid;
   grid-template-columns: 118px 1fr 92px;
   gap: 12px;
   align-items: center;
   margin: 13px 0;
}

.bridge-name {
   min-width: 0;
   color: var(--muted);
   font-size: 12px;
}

.bridge-name span {
   display: block;
   color: var(--faint);
   font: 10px "DM Mono", monospace;
}

.bridge-track {
   display: grid;
   grid-template-columns: 1fr 1px 1fr;
   align-items: center;
   height: 10px;
}

.bridge-half {
   display: flex;
   height: 10px;
   overflow: hidden;
}

.bridge-half.left {
   justify-content: flex-end;
}

.bridge-half i {
   display: block;
   height: 100%;
}

.bridge-half.left i {
   background: var(--red);
   border-radius: 4px 0 0 4px;
}

.bridge-half.right i {
   background: var(--mint);
   border-radius: 0 4px 4px 0;
}

.bridge-axis {
   height: 20px;
   background: var(--line-bright);
}

.bridge-value {
   color: var(--ink);
   font: 12px "DM Mono", monospace;
   text-align: right;
}

.bridge-value.save {
   color: var(--mint);
}

.bridge-value.cost {
   color: var(--red);
}

.bridge-row.total {
   margin-top: 6px;
   padding-top: 15px;
   border-top: 1px solid var(--line);
}

.bridge-row.total .bridge-name {
   color: var(--ink);
   font-size: 13px;
}

.bridge-foot {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 10px;
   margin-top: 18px;
   color: var(--faint);
   font: 11px "DM Mono", monospace;
}

.bridge-legend {
   display: flex;
   gap: 16px;
   margin: 0 0 20px;
   color: var(--muted);
   font: 11px "DM Mono", monospace;
}

.bridge-legend b {
   display: inline-block;
   width: 9px;
   height: 9px;
   margin-right: 6px;
   border-radius: 2px;
   vertical-align: middle;
}

.telemetry-item.vendor strong {
   color: var(--muted);
}

.big-stat {
   color: var(--ink);
   font: 500 38px "Space Grotesk", sans-serif;
   letter-spacing: -.06em;
}

.big-stat small {
   color: var(--muted);
   font: 13px "DM Sans", sans-serif;
   letter-spacing: 0;
}

.stat-pair {
   display: flex;
   justify-content: space-between;
   gap: 20px;
   margin: 18px 0 26px;
}

.stat-pair>div {
   flex: 1;
}

.stat-pair>div+div {
   padding-left: 20px;
   border-left: 1px solid var(--line);
}

.stat-label {
   color: var(--faint);
   font: 10px "DM Mono", monospace;
   letter-spacing: .08em;
   text-transform: uppercase;
}

.telemetry-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 24px;
}

.telemetry-item strong {
   display: block;
   margin-top: 6px;
   color: var(--mint);
   font: 600 25px "Space Grotesk", sans-serif;
   letter-spacing: -.04em;
}

.telemetry-item span {
   color: var(--muted);
   font-size: 12px;
}

.table-wrap {
   overflow-x: auto;
}

table {
   width: 100%;
   min-width: 740px;
   border-collapse: collapse;
}

th,
td {
   padding: 14px 9px;
   text-align: right;
   border-bottom: 1px solid var(--line);
}

th:first-child,
td:first-child {
   text-align: left;
}

th {
   color: var(--faint);
   font: 10px "DM Mono", monospace;
   letter-spacing: .07em;
   text-transform: uppercase;
}

td {
   color: var(--muted);
   font-size: 13px;
}

td:first-child {
   max-width: 270px;
   overflow-wrap: anywhere;
   word-break: break-word;
   color: var(--ink);
   white-space: normal;
}

tr:last-child td {
   border-bottom: 0;
}

code {
   color: var(--cyan);
   font: 12px "DM Mono", monospace;
   overflow-wrap: anywhere;
   word-break: break-word;
}

.outcome {
   padding: 3px 7px;
   border-radius: 99px;
   font: 10px "DM Mono", monospace;
   text-transform: uppercase;
}

.outcome.improvement {
   color: var(--mint);
   background: var(--mint-badge-bg);
}

.outcome.regression {
   color: var(--red);
   background: var(--red-badge-bg);
}

.outcome.same {
   color: var(--muted);
   background: var(--muted-badge-bg);
}

.outcome.incomplete {
   color: var(--orange);
   background: var(--warn-badge-bg);
}

a {
   color: var(--cyan);
   text-decoration: none;
}

a:hover {
   text-decoration: underline;
}

footer {
   margin-top: 30px;
   color: var(--faint);
   font: 11px/1.8 "DM Mono", monospace;
}

@media (max-width:800px) {
   .shell {
      width: min(100% - 28px, 600px);
      padding-top: 18px;
   }

   .topbar {
      padding-bottom: 16px;
   }

   .topbar-tools {
      gap: 14px;
   }

   .topbar-link {
      display: none;
   }

   .intro-row {
      margin-top: 20px;
      gap: 20px;
   }

   .intro-row,
   .filters {
      align-items: stretch;
      flex-direction: column;
   }

   .filters {
      flex: none;
      min-width: 0;
   }

   .filters label,
   select {
      width: 100%;
   }

   .meta-line {
      margin: 10px 0 24px;
   }

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

   .two-col {
      grid-template-columns: 1fr;
   }

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

   h1 {
      font-size: 48px;
   }

   .bridge-row {
      grid-template-columns: 96px 1fr 78px;
   }
}

@media (max-width:430px) {
   .brand img {
      width: 108px;
   }

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

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

   .metric {
      min-height: 120px;
   }
}