:root {
  color-scheme: dark;
  --ink: #f2f4ed;
  --muted: #aab2aa;
  --line: rgba(225, 235, 225, 0.16);
  --line-strong: rgba(225, 235, 225, 0.28);
  --panel: rgba(6, 10, 8, 0.84);
  --accent: #d4df75;
  --fast: #8fe1cb;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: #050806;
}

body {
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.4;
}

.published-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: clamp(18px, 4vw, 64px);
  background: #050806;
}

.dither-field {
  position: fixed;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  filter: brightness(0.48) saturate(0.72) contrast(1.22);
  pointer-events: none;
}

.published-stage::before {
  position: fixed;
  z-index: 1;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 70% 18%, rgba(33, 69, 60, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(3, 6, 4, 0.34), rgba(3, 6, 4, 0.72));
  pointer-events: none;
}

.published-stage.dither-unavailable {
  background:
    radial-gradient(circle at 74% 20%, rgba(57, 111, 92, 0.28), transparent 34%),
    repeating-linear-gradient(135deg, #050806 0 7px, #101a15 7px 14px);
}

.table-shell {
  position: relative;
  z-index: 2;
  width: min(1480px, 100%);
  max-height: calc(100vh - clamp(36px, 8vw, 128px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(0.8);
  -webkit-backdrop-filter: blur(18px) saturate(0.8);
  scrollbar-color: rgba(212, 223, 117, 0.5) rgba(0, 0, 0, 0.2);
}

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

.published-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.published-table th,
.published-table td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.published-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 0;
  color: var(--muted);
  background: rgba(7, 12, 9, 0.97);
  font: 650 0.67rem/1.2 var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sort-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 7px;
  padding: 15px 17px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
}

.sort-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
}

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

.sort-indicator {
  flex: 0 0 auto;
  color: #7c857e;
  font-size: 0.78rem;
  line-height: 1;
}

.published-table th[aria-sort="ascending"],
.published-table th[aria-sort="descending"] {
  color: var(--accent);
  box-shadow: inset 0 -2px var(--accent);
}

.published-table th[aria-sort] .sort-indicator {
  color: var(--accent);
}

.published-table th.is-numeric .sort-button {
  justify-content: flex-end;
  text-align: right;
}

.published-table td.is-numeric {
  text-align: right;
}

.published-table td {
  color: #d9ded7;
  font: 500 0.78rem/1.35 var(--font-mono);
}

.published-table tbody tr:last-child td {
  border-bottom: 0;
}

.published-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.035);
}

.published-table tbody tr.is-unsupported td {
  color: #737b75;
  background: rgba(0, 0, 0, 0.2);
}

.published-table tbody tr.is-unsupported .tps {
  color: #747d76;
}

.model-cell {
  --model-accent: #aab7b0;
  position: relative;
  padding-left: 30px !important;
}

.model-mark {
  position: absolute;
  top: 50%;
  left: 17px;
  width: 3px;
  height: 30px;
  background: var(--model-accent);
  transform: translateY(-50%);
}

.model-cue-spark { --model-accent: #8fe1cb; }
.model-cue-sol { --model-accent: #d4df75; }
.model-cue-terra { --model-accent: #9db67c; }
.model-cue-luna { --model-accent: #d7d5bd; }
.model-cue-gpt55 { --model-accent: #d88962; }
.model-cue-gpt54 { --model-accent: #aab7b0; }
.model-cue-mini { --model-accent: rgba(170, 183, 176, 0.55); }

.published-table .model-copy strong {
  display: block;
  color: var(--ink);
  font: 650 0.88rem/1.3 var(--font-sans);
}

.published-table td small {
  display: block;
  margin-top: 3px;
  color: #7f8981;
  font: 500 0.62rem/1.3 var(--font-mono);
}

.tps {
  color: var(--accent);
  font-size: 1rem;
}

.tps-cue,
.reasoning-cue {
  display: inline-grid;
  gap: 5px;
}

.tps-cue {
  min-width: 58px;
  justify-items: end;
}

.tps-meter {
  display: block;
  width: 54px;
  height: 2px;
  overflow: hidden;
  background: rgba(212, 223, 117, 0.13);
}

.tps-meter > span {
  display: block;
  width: var(--tps-fill, 0%);
  height: 100%;
  background: var(--accent);
}

.tps-level-1 { --tps-fill: 10%; }
.tps-level-2 { --tps-fill: 20%; }
.tps-level-3 { --tps-fill: 30%; }
.tps-level-4 { --tps-fill: 40%; }
.tps-level-5 { --tps-fill: 50%; }
.tps-level-6 { --tps-fill: 60%; }
.tps-level-7 { --tps-fill: 70%; }
.tps-level-8 { --tps-fill: 80%; }
.tps-level-9 { --tps-fill: 90%; }
.tps-level-10 { --tps-fill: 100%; }

.reasoning-cue {
  --reasoning-fill: 0%;
  min-width: 50px;
}

.reasoning-meter {
  display: block;
  width: 42px;
  height: 3px;
  overflow: hidden;
  background: rgba(225, 235, 225, 0.13);
}

.reasoning-meter > span {
  display: block;
  width: var(--reasoning-fill);
  height: 100%;
  background: var(--accent);
}

.strength-1 { --reasoning-fill: 20%; }
.strength-2 { --reasoning-fill: 40%; }
.strength-3 { --reasoning-fill: 60%; }
.strength-4 { --reasoning-fill: 80%; }
.strength-5 { --reasoning-fill: 100%; }

.mode {
  display: inline-block;
  min-width: 62px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  color: #c8cfca;
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.mode::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  background: #778079;
  content: "";
  vertical-align: 1px;
}

.mode-fast {
  border-color: rgba(143, 225, 203, 0.38);
  color: var(--fast);
  background: rgba(143, 225, 203, 0.07);
}

.mode-fast::before {
  background: var(--fast);
}

.is-unsupported .model-mark,
.is-unsupported .reasoning-meter,
.is-unsupported .mode::before {
  opacity: 0.42;
}

.status-row td {
  height: 180px;
  color: var(--muted);
  text-align: center;
  white-space: normal;
}

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

@media (max-width: 720px) {
  .published-stage {
    align-items: start;
    padding: 12px;
  }

  .table-shell {
    max-height: calc(100vh - 24px);
  }

  .published-table th,
  .published-table td {
    padding: 13px 14px;
  }

  .published-table th {
    padding: 0;
  }

  .sort-button {
    padding: 13px 14px;
  }

  .model-cell {
    padding-left: 27px !important;
  }

  .model-mark {
    left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dither-field {
    opacity: 0.58;
  }
}
