:root {
  --bg: #070604;
  --panel: #0d0a08;
  --panel-2: #15100c;
  --panel-3: #1e130c;
  --text: #fff8ef;
  --muted: #b7aca3;
  --dim: #776b62;
  --line: #2d211b;
  --line-2: #51402e;
  --cyan: #44e9ff;
  --green: #bdff63;
  --amber: #ffd166;
  --orange: #ff4d00;
  --orange-2: #ff8a00;
  --red: #ff7a7a;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

body {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select {
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

.chat-page-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100vw, 1440px);
  height: 100dvh;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 77, 0, 0.11), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(68, 233, 255, 0.075), transparent 30%),
    rgba(7, 6, 4, 0.92);
}

.chat-page-shell.wide-layout {
  width: min(100vw, 1920px);
}

.site-top {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 296px 1fr auto auto auto auto;
  align-items: stretch;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 6, 4, 0.94);
  backdrop-filter: blur(12px);
}

.brand-cell,
.nav-links,
.lang-toggle,
.arena-action,
.top-action,
.account-actions,
.account-action {
  display: flex;
  align-items: center;
}

.brand-cell {
  gap: 12px;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
}

.build-tag {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  flex-wrap: wrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 74px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 77, 0, 0.12), transparent),
    var(--panel-2);
}

.lang-toggle {
  justify-content: center;
  min-height: 74px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.arena-action {
  justify-content: center;
  min-height: 74px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
  color: var(--cyan);
  background:
    linear-gradient(180deg, rgba(68, 233, 255, 0.14), rgba(68, 233, 255, 0.03)),
    rgba(68, 233, 255, 0.02);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.top-action {
  min-height: 74px;
  padding: 0 20px;
  border-left: 1px solid var(--line);
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
}

.account-actions {
  min-height: 74px;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.account-action {
  justify-content: center;
  min-height: 74px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.account-action:first-child {
  border-left: 0;
}

.account-action:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--orange);
}

.account-action-admin {
  color: var(--orange);
  background:
    linear-gradient(135deg, rgba(255, 77, 0, 0.16), rgba(255, 77, 0, 0.04));
}

.account-action-admin::before {
  content: "ADMIN";
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 9px;
}

.chat-app {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  background:
    linear-gradient(to right, rgba(255, 77, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(68, 233, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
}

.chat-sidebar {
  position: relative;
  z-index: 25;
  display: flex;
  flex-direction: column;
  width: 52px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 77, 0, 0.08), transparent 28%),
    rgba(13, 10, 8, 0.98);
  transition: width 160ms ease, box-shadow 160ms ease;
}

.chat-sidebar:hover,
.chat-sidebar:focus-within {
  width: 292px;
  box-shadow: 20px 0 52px rgba(0, 0, 0, 0.32);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 292px;
  min-height: 48px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}

.sidebar-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.sidebar-title span {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 32px;
  border: 1px solid rgba(255, 77, 0, 0.55);
  border-radius: 6px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-title strong {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 120ms ease;
}

.chat-sidebar:hover .sidebar-title strong,
.chat-sidebar:focus-within .sidebar-title strong {
  opacity: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 77, 0, 0.55);
  background:
    radial-gradient(circle at 30% 20%, rgba(68, 233, 255, 0.22), transparent 54%),
    radial-gradient(circle at 70% 78%, rgba(255, 77, 0, 0.22), transparent 62%),
    rgba(255, 255, 255, 0.025);
}

.brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter:
    invert(1)
    brightness(1.18)
    contrast(1.08)
    drop-shadow(0 0 8px rgba(68, 233, 255, 0.34));
}

.brand-wordmark {
  display: grid;
  align-items: center;
  width: 116px;
  height: 30px;
}

.brand-wordmark img {
  width: 100%;
  height: auto;
  filter:
    invert(1)
    brightness(1.2)
    contrast(1.12);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
}

.icon-btn:hover {
  border-color: var(--orange);
  color: var(--text);
}

.sidebar-close {
  display: none;
}

.sidebar-actions {
  display: grid;
  gap: 8px;
  width: 292px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

.side-action,
.signin-btn,
.ghost-btn,
.mode-btn,
.send-btn,
.modal-primary,
.modal-secondary {
  min-height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
}

.side-action {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  text-align: left;
  transition: width 160ms ease, padding 160ms ease, background 120ms ease, border-color 120ms ease;
}

.side-action span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
}

@media (min-width: 821px) {
  .chat-sidebar:not(:hover):not(:focus-within) .side-action {
    width: 40px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .chat-sidebar:not(:hover):not(:focus-within) .side-action span {
    font-size: 11px;
  }

  .chat-sidebar:not(:hover):not(:focus-within) .history-tools,
  .chat-sidebar:not(:hover):not(:focus-within) .history-list,
  .chat-sidebar:not(:hover):not(:focus-within) .sidebar-foot {
    pointer-events: none;
    opacity: 0;
  }

  .history-tools,
  .history-list,
  .sidebar-foot {
    transition: opacity 120ms ease;
  }
}

.side-action.primary,
.send-btn,
.modal-primary {
  border-color: var(--orange);
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #130701;
}

.side-action:hover,
.signin-btn:hover,
.ghost-btn:hover,
.mode-btn:hover,
.modal-secondary:hover {
  border-color: var(--orange);
  color: var(--text);
}

.history-tools {
  width: 292px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  display: grid;
  gap: 6px;
}

.search-box span,
.eyebrow,
.quota-label,
.history-group h2,
.user-prompt span,
.lane-card header span,
.metric-row,
.lane-card footer,
.hint-row,
.model-panel-head,
.model-check small,
.select-wrap span,
.top-status {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-box input,
.select-wrap select,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #090706;
  color: var(--text);
}

.search-box input {
  height: 38px;
  padding: 0 10px;
}

.history-list {
  flex: 1;
  width: 292px;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.history-group {
  margin-bottom: 18px;
}

.history-group h2 {
  margin: 0 0 8px;
}

.history-item {
  display: grid;
  width: 100%;
  gap: 2px;
  margin-bottom: 6px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}

.history-item:hover,
.history-item.active {
  border-color: var(--line-2);
  background: rgba(255, 77, 0, 0.08);
}

.history-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item small,
.history-empty {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.history-empty {
  padding: 16px 10px;
}

.sidebar-foot {
  width: 292px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.quota-card {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 77, 0, 0.12), rgba(68, 233, 255, 0.05)),
    var(--panel-2);
}

.quota-card strong {
  color: var(--text);
}

.quota-card span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.signin-btn {
  display: grid;
  place-items: center;
  margin-top: 10px;
}

.chat-main {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.chat-topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 6, 4, 0.94);
}

.mobile-menu {
  display: none;
  margin-left: 12px;
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: auto;
  overflow-x: auto;
}

.mode-btn {
  min-width: max-content;
  min-height: 28px;
  padding: 0 11px;
  border-width: 1px;
  border-radius: 6px;
  background: rgba(21, 16, 12, 0.78);
  font-size: 12px;
}

.mode-btn.active {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 77, 0, 0.16), transparent),
    var(--panel-2);
}

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  white-space: nowrap;
}

.top-status span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(189, 255, 99, 0.28);
  border-radius: 999px;
  color: var(--green);
  background: rgba(189, 255, 99, 0.055);
}

.top-status a {
  color: var(--muted);
}

.chat-workspace {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 77, 0, 0.08), transparent 24%),
    radial-gradient(circle at 68% 30%, rgba(68, 233, 255, 0.055), transparent 26%),
    #090807;
}

.landing {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  padding: 28px 24px;
  text-align: center;
}

.landing[hidden] {
  display: none;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
}

.landing h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 0.98;
}

.landing-copy {
  max-width: 680px;
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 16px;
}

.prompt-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  width: min(760px, 100%);
}

.prompt-chip {
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 10, 8, 0.82);
  color: var(--muted);
  text-align: left;
}

.prompt-chip:hover {
  border-color: var(--orange);
  color: var(--text);
}

.prompt-chip span {
  color: var(--orange-2);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.run-list {
  display: grid;
  gap: 14px;
  height: 100%;
  overflow-y: auto;
  padding: 16px;
}

.run-list:empty {
  display: none;
}

.run-card {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.user-prompt {
  justify-self: center;
  width: min(900px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #332b28;
}

.user-prompt p {
  margin: 4px 0 0;
  color: var(--text);
  white-space: pre-wrap;
}

.lane-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

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

.lane-grid.multi {
  grid-template-columns: repeat(5, minmax(200px, 1fr));
  overflow-x: auto;
  padding-bottom: 2px;
}

.lane-grid.single {
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
}

.lane-card {
  display: grid;
  min-width: 0;
  min-height: 252px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent),
    var(--panel);
}

.lane-card.qorinix {
  border-color: rgba(255, 77, 0, 0.62);
  box-shadow: inset 0 3px 0 var(--orange);
}

.lane-card.streaming {
  border-color: rgba(68, 233, 255, 0.62);
  box-shadow: inset 0 3px 0 var(--cyan);
}

.lane-card.winner {
  border-color: rgba(189, 255, 99, 0.74);
  box-shadow: inset 0 3px 0 var(--green);
}

.lane-card.failed {
  border-color: rgba(255, 122, 122, 0.56);
}

.lane-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
}

.lane-card header strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-title {
  display: grid;
  min-width: 0;
  flex: 1;
  justify-items: end;
  text-align: right;
}

.lane-title small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-grid.multi .lane-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.lane-grid.multi .lane-title {
  grid-column: 1 / -1;
  justify-items: start;
  text-align: left;
}

.lane-grid.multi .lane-card header em {
  grid-column: 2;
  grid-row: 1;
}

.lane-card header em {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lane-card.winner header em {
  border-color: rgba(189, 255, 99, 0.58);
  color: var(--green);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.metric-row span {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: var(--panel-2);
}

.metric-row b {
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}

.lane-card p {
  margin: 0;
  min-height: 132px;
  max-height: 360px;
  overflow-y: auto;
  padding: 14px;
  color: var(--text);
  font-size: 15px;
  white-space: pre-wrap;
}

.lane-grid.multi .lane-card p {
  max-height: 300px;
  font-size: 13px;
  line-height: 1.45;
}

.lane-card p.empty-stream {
  color: var(--muted);
}

.race-progress {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.race-progress span {
  display: block;
  height: 100%;
  min-width: 8px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 120ms linear;
}

.race-progress em {
  position: absolute;
  top: -2px;
  width: 7px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(189, 255, 99, 0.75);
}

.lane-card.qorinix .race-progress span {
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
}

.stream-cursor {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: var(--cyan);
  animation: qxStreamBlink 780ms steps(2, start) infinite;
}

.lane-card footer {
  align-self: end;
  padding: 10px 11px;
  border-top: 1px solid var(--line);
  color: var(--green);
}

.comparison-dashboard {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(189, 255, 99, 0.055), rgba(68, 233, 255, 0.035)),
    rgba(13, 10, 8, 0.94);
}

.comparison-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.comparison-head span,
.comparison-head em,
.comparison-kpis span,
.comparison-kpis small,
.comparison-table {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0;
  text-transform: uppercase;
}

.comparison-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.comparison-head em {
  color: var(--green);
}

.comparison-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.comparison-kpis div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 6, 4, 0.58);
}

.comparison-kpis strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-kpis small {
  color: var(--orange-2);
}

.comparison-table {
  display: grid;
  gap: 4px;
  overflow-x: auto;
}

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 6, 4, 0.54);
}

.arena-leaderboard-note {
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.comparison-results-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
}

.comparison-results-table th,
.comparison-results-table td {
  white-space: nowrap;
  padding: 6px 8px;
  border: 1px solid var(--line-2);
  text-align: left;
}

.comparison-results-table th {
  color: var(--dim);
  font-size: 10px;
  text-transform: uppercase;
}

.comparison-results-table td {
  color: var(--text);
}

.comparison-subhead {
  margin: 4px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.arena-benchmark-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  padding: 6px 0 8px;
}

.arena-benchmark-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.1;
}

.arena-benchmark-intro {
  margin: 5px 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.4;
}

.arena-race-summary {
  justify-self: end;
  align-self: start;
  max-width: 300px;
  min-width: 170px;
  padding: 8px 11px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: rgba(255, 77, 0, 0.09);
  color: var(--orange-2);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.comparison-grid-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(13, 10, 8, 0.88);
}

.comparison-grid-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.comparison-grid-head strong {
  color: var(--text);
  font-size: 13px;
}

.comparison-grid-head span {
  color: var(--orange-2);
  font-family: var(--mono);
  font-size: 10px;
}

.comparison-grid-metrics {
  display: grid;
  gap: 7px;
}

.comparison-grid-metrics div {
  display: grid;
  gap: 3px;
}

.comparison-grid-metrics span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  font-family: var(--mono);
  letter-spacing: 0;
}

.comparison-grid-metrics b,
.comparison-grid-metrics i {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.comparison-grid-metrics i {
  overflow: hidden;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.comparison-grid-metrics i::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
}

.comparison-grid-card.qorinix i::after {
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
}

.comparison-grid-card.reference i::after {
  background: linear-gradient(90deg, var(--cyan), #1aa2ff);
}

.comparison-grid-card.is-winner i::after,
.comparison-grid-card.qorinix i::after {
  box-shadow: 0 0 0 1px rgba(189, 255, 99, 0.22);
}

.comparison-signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.comparison-signal-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 6, 4, 0.7);
}

.comparison-signal-card.good {
  border-color: rgba(189, 255, 99, 0.42);
  box-shadow: inset 0 2px 0 rgba(189, 255, 99, 0.15);
}

.comparison-signal-card.warn {
  border-color: rgba(255, 122, 122, 0.35);
  box-shadow: inset 0 2px 0 rgba(255, 122, 122, 0.14);
}

.comparison-signal-card span {
  display: block;
  margin-bottom: 2px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comparison-signal-card strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-signal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.comparison-live-status {
  display: grid;
  gap: 8px;
}

.comparison-live-progress {
  height: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.comparison-live-progress span {
  display: block;
  height: 100%;
  min-width: 6px;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
}

.comparison-live-list {
  display: grid;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 6, 4, 0.55);
}

.comparison-race-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.comparison-race-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(13, 10, 8, 0.84);
}

.comparison-race-card.is-active {
  border-color: rgba(68, 233, 255, 0.45);
}

.comparison-race-card.is-winner {
  border-color: rgba(189, 255, 99, 0.62);
  box-shadow: inset 0 2px 0 var(--green);
}

.comparison-race-card.is-qorinix {
  border-left: 2px solid var(--orange);
}

.comparison-race-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.comparison-race-card-head h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.comparison-race-card-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.comparison-race-card-head small {
  display: inline-grid;
  align-self: start;
  padding: 3px 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}

.comparison-race-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.comparison-race-card-metrics span {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 6px;
}

.comparison-race-card-metrics strong {
  display: block;
  color: var(--text);
}

.comparison-race-card-metrics em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.comparison-race-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.comparison-race-track span {
  display: block;
  height: 100%;
  min-width: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
}

.comparison-race-card.is-winner .comparison-race-track span {
  background: linear-gradient(90deg, var(--green), #f8ff9a);
}

.comparison-race-track em {
  position: absolute;
  top: -4px;
  width: 12px;
  height: 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(68, 233, 255, 0.55);
}

.comparison-race-card.is-qorinix .comparison-race-track em,
.lane-card.qorinix .race-progress em {
  background: var(--orange-2);
  box-shadow: 0 0 18px rgba(255, 138, 0, 0.55);
}

.comparison-panels-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.comparison-panels-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comparison-panels-hint {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.comparison-output-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.comparison-output-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent),
    rgba(13, 10, 8, 0.82);
}

.comparison-output-card.is-qorinix {
  border-color: rgba(255, 77, 0, 0.6);
  box-shadow: inset 0 3px 0 var(--orange);
}

.comparison-output-card.is-reference {
  border-left: 1px solid rgba(68, 233, 255, 0.45);
}

.comparison-output-card.is-winner {
  border-color: rgba(189, 255, 99, 0.7);
  box-shadow: inset 0 2px 0 var(--green);
}

.comparison-output-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.comparison-output-card-head h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
}

.comparison-output-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.comparison-output-card-head em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(189, 255, 99, 0.5);
  color: var(--green);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comparison-output-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.comparison-output-metrics span {
  display: block;
  border: 1px solid var(--line);
  padding: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.comparison-output-metrics span strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  text-transform: none;
}

.comparison-output-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  max-height: 86px;
  overflow: hidden;
}

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

.comparison-chart-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(13, 10, 8, 0.84);
}

.comparison-chart-card h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 13px;
}

.comparison-chart-card h3 span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.comparison-chart-body {
  display: grid;
  gap: 6px;
}

.comparison-chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1fr) minmax(74px, 0.5fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}

.comparison-chart-row.zebra {
  background: rgba(21, 16, 12, 0.46);
}

.comparison-chart-row span:first-child {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-chart-row strong {
  display: block;
  text-align: right;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.comparison-chart-bars {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  height: 14px;
  border-radius: 999px;
}

.comparison-chart-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #1aa2ff);
  transition: width 220ms ease;
}

.comparison-chart-fill.is-running {
  animation: qxStreamBlink 900ms linear infinite;
}

.comparison-live-list-head,
.comparison-live-row {
  display: grid;
  grid-template-columns: 72px minmax(180px, 2fr) repeat(5, minmax(80px, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.comparison-live-list-head {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comparison-live-list-head span,
.comparison-live-row span,
.comparison-live-row strong,
.comparison-live-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-live-row {
  padding: 7px 0;
  border-top: 1px solid transparent;
  border-bottom: 1px dashed var(--line);
  color: var(--text);
  font-size: 12px;
}

.comparison-live-row:first-child {
  border-top: 0;
}

.comparison-live-row.complete {
  border-left: 2px solid rgba(189, 255, 99, 0.55);
}

.comparison-live-row.running {
  color: var(--orange-2);
}

.comparison-live-row em {
  color: var(--green);
  font-style: normal;
  font-size: 11px;
}

.comparison-live-row em:empty::before {
  content: "pending";
  opacity: 0.62;
}

.comparison-summary-grid {
  margin-top: 6px;
}

.comparison-value-race {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.comparison-value-race-head {
  display: grid;
  gap: 2px;
}

.comparison-value-race-sub {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
}

.comparison-value-race-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.comparison-value-race-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comparison-value-race-legend-item i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #1aa2ff);
  border: 1px solid var(--line-2);
}

.comparison-value-race-legend-item.is-qorinix i {
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  border-color: rgba(255, 77, 0, 0.55);
}

.comparison-value-race--value .comparison-value-race-legend-item i {
  background: linear-gradient(90deg, var(--green), #8dff4f);
}

.comparison-value-lanes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.comparison-value-lane {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 2px solid transparent;
  border-radius: 8px;
  background: rgba(13, 10, 8, 0.9);
}

.comparison-value-lane.is-qorinix {
  border-left-color: var(--orange);
}

.comparison-value-lane.is-winner {
  border-color: rgba(189, 255, 99, 0.64);
  box-shadow: inset 0 2px 0 var(--green);
}

.comparison-value-lane-head {
  display: grid;
  gap: 5px;
}

.comparison-value-lane-rank {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comparison-value-lane strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comparison-value-lane-flag {
  justify-self: start;
  padding: 2px 8px;
  border: 1px solid rgba(189, 255, 99, 0.45);
  border-radius: 999px;
  color: var(--green);
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0;
}

.comparison-value-lane-meta {
  color: var(--dim);
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.comparison-value-lane-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.comparison-value-lane-fill {
  --race-pct: 7%;
  position: absolute;
  inset: 0;
  width: var(--race-pct);
  min-width: 6px;
  background: linear-gradient(90deg, rgba(255, 77, 0, 0.8), rgba(255, 191, 0, 0.72));
  transition: width 220ms ease;
}

.comparison-value-lane-fill.is-value {
  background: linear-gradient(90deg, rgba(189, 255, 99, 0.75), #a3ff72);
}

.comparison-value-lane-runner {
  position: absolute;
  inset: 0;
  width: 8px;
  transform: translateX(max(0px, calc(var(--race-pct) - 4px)));
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  mix-blend-mode: screen;
}

.comparison-value-lane-score {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #130701;
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.comparison-value-lane-score i {
  font-style: normal;
  color: rgba(0, 0, 0, 0.75);
}

.comparison-row {
  display: grid;
  grid-template-columns: 86px minmax(170px, 1.4fr) repeat(4, minmax(74px, 0.6fr));
  gap: 6px;
  min-width: 540px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(21, 16, 12, 0.68);
}

.comparison-row.header {
  background: transparent;
}

.comparison-row.fastest {
  border-color: rgba(189, 255, 99, 0.52);
  background: rgba(189, 255, 99, 0.07);
}


.comparison-row span:first-child {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-row.header span:first-child {
  color: var(--dim);
}

.composer-shell {
  border-top: 1px solid var(--line);
  background: rgba(7, 6, 4, 0.96);
}

.model-panel {
  border-bottom: 1px solid var(--line);
}

.model-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
}

.ghost-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.model-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 8px;
}

.select-wrap {
  display: grid;
  gap: 5px;
  min-width: min(260px, 100%);
}

.select-wrap select {
  min-height: 38px;
  padding: 0 10px;
}

.model-check {
  display: inline-grid;
  grid-template-columns: auto minmax(72px, 0.9fr) minmax(86px, 1.1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  max-width: 240px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
}

.model-check.selected {
  border-color: var(--orange);
  color: var(--text);
}

.model-check.disabled {
  opacity: 0.55;
}

.model-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-check small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.composer textarea {
  min-height: 62px;
  max-height: 180px;
  padding: 11px 12px;
  resize: vertical;
}

.composer-actions {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  width: 186px;
}

.hint-row {
  display: grid;
  align-content: start;
  gap: 6px;
}

.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, filter 120ms ease, background 120ms ease;
}

.send-btn.is-ready {
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.12), 0 12px 28px rgba(255, 77, 0, 0.18);
}

.send-btn:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

.send-btn.running,
.send-btn[aria-busy="true"] {
  filter: saturate(1.08);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(68, 233, 255, 0.11), 0 12px 32px rgba(255, 77, 0, 0.2);
}

.send-btn.running::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #130701;
  animation: qxPulseDot 880ms ease-in-out infinite;
}

.composer.is-submitting textarea {
  border-color: rgba(68, 233, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(68, 233, 255, 0.1);
}

@keyframes qxPulseDot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.78);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes qxStreamBlink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(520px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 77, 0, 0.12), transparent 46%),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head .eyebrow {
  margin: 0;
}

.modal-panel h2 {
  margin: 0;
  padding: 18px 18px 0;
  font-size: 30px;
  line-height: 1.05;
}

.modal-panel p:not(.eyebrow) {
  margin: 0;
  padding: 14px 18px 4px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  padding: 18px;
}

.modal-primary,
.modal-secondary {
  display: inline-grid;
  place-items: center;
  min-width: 140px;
  padding: 0 14px;
  cursor: pointer;
}

.sidebar-scrim {
  display: none;
}

.pricing-panel {
  width: min(1040px, 100%);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.pricing-card {
  display: grid;
  gap: 12px;
  min-height: 230px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    var(--panel-2);
}

.pricing-card.featured {
  border-color: var(--orange);
  box-shadow: inset 0 3px 0 var(--orange);
}

.pricing-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.pricing-card strong {
  color: var(--orange-2);
}

.pricing-card p {
  margin: 0;
  color: var(--muted);
}

.pricing-card button {
  align-self: end;
  min-height: 40px;
  border: 1px solid var(--orange);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #130701;
  font-weight: 700;
}

.checkout-note {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .site-top {
    grid-template-columns: 1fr;
  }

  .brand-cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .lang-toggle,
  .arena-action,
  .top-action,
  .account-actions {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .lane-grid.battle {
    grid-template-columns: 1fr;
  }

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

  .lane-grid.multi {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
  }

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

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

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

  .comparison-chart-grid {
    grid-template-columns: 1fr;
  }

  .arena-benchmark-head {
    grid-template-columns: 1fr;
  }

  .arena-race-summary {
    justify-self: start;
    white-space: normal;
  }

  .comparison-live-list-head,
  .comparison-live-row {
    grid-template-columns: 52px minmax(130px, 1.6fr) repeat(3, minmax(70px, 1fr));
    font-size: 11px;
  }

  .comparison-live-list-head span:nth-child(5),
  .comparison-live-row span:nth-child(5),
  .comparison-live-list-head span:nth-child(6),
  .comparison-live-row span:nth-child(6),
  .comparison-live-list-head span:nth-child(7),
  .comparison-live-row span:nth-child(7) {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: hidden;
  }

  .site-top {
    grid-template-columns: 0.74fr 0.74fr 1.52fr;
  }

  .brand-cell,
  .nav-links {
    grid-column: 1 / -1;
  }

  .brand-cell {
    min-height: 64px;
    padding: 10px 16px;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-links a {
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    text-align: center;
  }

  .lang-toggle,
  .arena-action,
  .top-action,
  .account-actions,
  .account-action {
    justify-content: center;
    min-height: 40px;
    padding: 0 8px;
    border-top: 0;
    font-size: 10px;
    text-align: center;
  }

  .arena-action,
  .top-action {
    border-left: 1px solid var(--line);
  }

  .account-actions {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .account-action {
    flex: 1 1 0;
    border-left: 1px solid var(--line);
  }

  .account-action:first-child {
    border-left: 0;
  }

  .chat-app {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(86vw, 320px);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .chat-sidebar:hover,
  .chat-sidebar:focus-within {
    width: min(86vw, 320px);
  }

  body.sidebar-open .chat-sidebar {
    transform: translateX(0);
  }

  .sidebar-head,
  .sidebar-actions,
  .history-tools,
  .history-list,
  .sidebar-foot {
    width: min(86vw, 320px);
  }

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

  .sidebar-title strong {
    opacity: 1;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    pointer-events: none;
    background: rgba(0, 0, 0, 0);
    transition: background 180ms ease;
  }

  body.sidebar-open .sidebar-scrim {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.58);
  }

  .sidebar-close,
  .mobile-menu {
    display: inline-grid;
  }

  .chat-topbar {
    min-width: 0;
  }

  .chat-workspace {
    overflow-y: auto;
  }

  .mode-switch {
    flex: 1;
  }

  .mode-btn {
    padding: 0 10px;
    font-size: 12px;
  }

  .top-status {
    gap: 8px;
    padding-right: 10px;
  }

  .top-status span {
    display: none;
  }

  .landing {
    align-content: start;
    padding: 30px 16px;
    min-height: auto;
  }

  .landing h1 {
    font-size: 38px;
  }

  .prompt-row {
    grid-template-columns: 1fr;
    padding-bottom: 18px;
  }

  .run-list {
    padding: 14px;
  }

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

  .lane-card header {
    align-items: start;
    flex-wrap: wrap;
  }

  .lane-grid.multi {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
  }

  .comparison-signal-grid {
    grid-template-columns: 1fr;
  }

  .comparison-race-grid {
    grid-template-columns: 1fr;
  }

  .comparison-output-grid {
    grid-template-columns: 1fr;
  }

  .comparison-chart-grid {
    grid-template-columns: 1fr;
  }

  .comparison-race-card-head h4 {
    font-size: 13px;
  }

  .comparison-chart-row {
    grid-template-columns: minmax(86px, 0.7fr) minmax(0, 1fr) auto;
    gap: 6px;
  }

  .comparison-chart-row strong {
    font-size: 11px;
  }

  .comparison-live-list-head,
  .comparison-live-row {
    grid-template-columns: 52px minmax(120px, 1.4fr) repeat(2, minmax(80px, 1fr));
    column-gap: 6px;
    font-size: 10px;
  }

  .comparison-live-list-head span:nth-child(5),
  .comparison-live-row span:nth-child(5),
  .comparison-live-list-head span:nth-child(6),
  .comparison-live-row span:nth-child(6),
  .comparison-live-list-head span:nth-child(7),
  .comparison-live-row span:nth-child(7) {
    display: none;
  }

  .lane-title {
    justify-items: start;
    text-align: left;
  }

  .comparison-kpis {
    grid-template-columns: 1fr 1fr;
  }

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

  .composer-actions {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    width: auto;
    align-items: end;
  }

  .send-btn {
    min-width: 118px;
  }
}

@media (max-width: 540px) {
  .chat-main {
    grid-template-rows: 46px minmax(0, 1fr) auto;
  }

  .mode-btn {
    min-height: 32px;
  }

  .model-panel-head,
  .model-controls,
  .composer {
    padding-left: 10px;
    padding-right: 10px;
  }

  .model-panel-head {
    align-items: start;
    flex-direction: column;
  }

  .model-controls {
    display: grid;
    max-height: 132px;
    overflow-y: auto;
  }

  .select-wrap,
  .model-check {
    max-width: none;
    width: 100%;
  }

  .modal-actions {
    flex-direction: column;
  }

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