:root {
  --ui-font: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #0a0b0b;
  --muted: #68706d;
  --paper: #f3f5f3;
  --surface: #ffffff;
  --line: #d9dedb;
  --green: #83ef37;
  --green-dark: #347c13;
  --blue: #2699f4;
  --blue-dark: #0967ad;
  --orange: #ff7043;
  font-family: var(--ui-font);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
}

button, input { font: inherit; }

button { letter-spacing: 0; }

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 50;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--green);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  overflow: hidden;
  background: var(--ink);
  color: #f6f8f7;
}

.nav-shell,
.masthead,
.page-shell,
.site-footer {
  width: min(1320px, calc(100% - 64px));
  margin-inline: auto;
}

.nav-shell {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #303431;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.nav-jump {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #56605a;
  border-radius: 4px;
  color: #f6f8f7;
  font: 600 11px var(--ui-font);
  text-decoration: none;
}

.nav-jump:hover { border-color: var(--green); color: var(--green); }

.login-trigger {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--green);
  color: var(--ink);
  cursor: pointer;
  font: 750 11px Inter, "SF Pro Display", sans-serif;
}
.login-trigger:hover { background: #a3ff62; }
.login-trigger.is-authenticated { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.logout-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #56605a;
  border-radius: 4px;
  background: transparent;
  color: #f6f8f7;
  cursor: pointer;
  font: 700 11px Inter, "SF Pro Display", sans-serif;
}
.logout-button:hover { border-color: var(--green); color: var(--green); }
.logout-button:disabled { opacity: .55; cursor: wait; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 18px;
  font-weight: 760;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  padding: 6px;
  background: var(--green);
}

.brand-mark i {
  width: 3px;
  display: block;
  background: var(--ink);
}

.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 14px; }
.brand-mark i:nth-child(3) { height: 11px; }

.nav-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b9c0bc;
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(131, 239, 55, 0.12);
}

.masthead {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: center;
  gap: 64px;
  padding-block: 46px 50px;
}

.eyebrow,
.section-index {
  margin: 0 0 18px;
  color: var(--green);
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  max-width: 780px;
  font-size: 64px;
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 760;
}

.lede {
  max-width: 650px;
  margin: 26px 0 0;
  color: #b7bfba;
  font-size: 17px;
  line-height: 1.75;
}

.paper-reference {
  margin: 14px 0 0;
  color: #858e89;
  font: 12px var(--ui-font);
}

.paper-reference a { color: #f6f8f7; text-underline-offset: 3px; }

.chip-visual {
  min-height: 270px;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 145px;
  align-items: center;
  border-top: 1px solid #3a403c;
  border-bottom: 1px solid #3a403c;
}

.chip-stage {
  position: relative;
  width: 230px;
  height: 230px;
}

.chip-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  filter: saturate(0.9) contrast(1.08);
  transition: opacity 700ms ease;
}

.chip-slide[data-design="PicoRV32"] { filter: url("#gds-hero-palette"); }

.chip-slide.is-active { z-index: 1; opacity: 1; }

.chip-slide-nvdla {
  filter: contrast(1.08) saturate(0.82);
}

.chip-visual figcaption {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding-left: 24px;
  border-left: 1px solid #3a403c;
}

.chip-visual span,
.chip-visual small {
  color: #77807a;
  font-family: var(--ui-font);
  font-size: 11px;
  line-height: 1.5;
}

.chip-visual strong { font-size: 18px; }

.carousel-dots {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid #69736d;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button[aria-pressed="true"] { border-color: var(--green); background: var(--green); }

.page-shell { padding-block: 72px 0; }

.ranking-section,
.scoring-section { scroll-margin-top: 24px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.ranking-note {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.ranking-note strong { color: var(--ink); }

.section-index { margin-bottom: 12px; color: var(--green-dark); }

h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: 0;
}

.snapshot-time {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.benchmark-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
}

.benchmark-tabs button {
  position: relative;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--ui-font);
}

.benchmark-tabs button > strong {
  font-size: 14px;
  font-weight: 500;
}

.benchmark-tabs button > small {
  padding: 3px 6px;
  border-radius: 4px;
  background: #e8ece9;
  color: #737d76;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
}

.benchmark-tabs button:hover { color: var(--ink); }
.benchmark-tabs button[aria-selected="true"] { color: var(--ink); }
.benchmark-tabs button[aria-selected="true"] > strong { font-weight: 650; }
.benchmark-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--green-dark);
}
.benchmark-tabs button:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 5px; border-radius: 2px; }

.chart-head[hidden] { display: none; }

/* Overview chart and the full ranking share the active metric and frequency. */
.ranking-overview {
  margin: 28px 0 30px;
  padding: 22px 20px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ranking-overview[hidden], .ranking-details-heading[hidden] { display: none; }
.overview-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.overview-heading h3, .ranking-details-heading h3 { margin: 0; font-size: 21px; font-weight: 650; line-height: 1.3; }
.overview-heading p, .ranking-details-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.overview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.overview-actions a { color: var(--green-dark); font-size: 12px; font-weight: 600; line-height: 1.5; }
.overview-actions a { text-decoration: none; padding-block: 8px; }
.overview-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }

.overview-scroll { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; padding-bottom: 12px; }
.overview-scroll::-webkit-scrollbar { display: none; }
.overview-scroll:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 4px; }
.overview-canvas { --plot-height: 220px; position: relative; min-width: calc(var(--column-count) * 62px + 80px); padding: 26px 8px 4px 72px; }
.overview-grid { position: absolute; top: 26px; left: 72px; right: 8px; height: var(--plot-height); pointer-events: none; }
.overview-gridline { position: absolute; width: 100%; border-top: 1px dashed #dfe4df; }
/* Fixed tick positions work with the site's style-src policy. */
.overview-gridline:last-child { border-top-style: solid; border-top-color: #aeb9b0; }
.overview-gridline > span { position: absolute; width: 40px; left: -48px; transform: translateY(-50%); color: var(--muted); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.overview-columns { position: relative; display: grid; grid-template-columns: repeat(var(--column-count), minmax(0, 1fr)); gap: 8px; }
.overview-column { display: block; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--ui-font); text-align: center; }
.overview-bar-area { height: var(--plot-height); display: flex; align-items: flex-end; justify-content: center; }
.overview-bar { position: relative; display: block; width: 32px; max-width: 70%; background: var(--bar-color, #7b828a); border-radius: 3px 3px 0 0; }
.overview-column:hover .overview-bar, .overview-column:focus-visible .overview-bar { filter: brightness(1.15); }
.overview-column:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 4px; border-radius: 3px; }
.overview-value { position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); color: var(--ink); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.overview-model-icon { height: 28px; display: flex; align-items: center; justify-content: center; margin-top: 7px; }
.overview-model-icon img { width: 18px; height: 18px; object-fit: contain; }
.overview-label { position: relative; display: block; height: 120px; }
.overview-label-text { position: absolute; right: 50%; top: 4px; width: 142px; transform: rotate(-60deg); transform-origin: 100% 0; text-align: right; }
.overview-model-name { display: block; font-size: 11px; font-weight: 500; line-height: 1.4; overflow-wrap: normal; }
.overview-label-text .overview-config { margin-top: 3px; }
.overview-config { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }
.ranking-details-heading { margin-bottom: 12px; scroll-margin-top: 28px; }
.rank-entry { scroll-margin-top: 24px; }
@media (max-width: 760px) {
  .ranking-overview { margin-top: 20px; padding: 20px 14px 16px; }
  .overview-heading { flex-direction: column; gap: 14px; }

  .overview-canvas { --plot-height: 200px; }
  .overview-heading h3, .ranking-details-heading h3 { font-size: 20px; }
}

.chart-head,
.rank-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 124px 104px minmax(120px, 280px) 76px 112px 76px 84px;
  gap: 12px;
  align-items: center;
}

.chart-head {
  min-height: 42px;
  color: #838b87;
  font: 650 13px var(--ui-font);
}

.chart-head > span:nth-last-child(-n + 4) { text-align: right; }

.chart-head[data-metric="score"] > span:nth-last-child(2),
.chart-head[data-metric="roi"] > span:last-child {
  color: var(--ink);
  font-weight: 800;
}

.axis {
  display: flex;
  justify-content: space-between;
}

.axis i { font-style: normal; }

.ranking-list { border-top: 1px solid var(--ink); }

.rank-entry {
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.rank-entry[open] { background: var(--surface); }

.rank-entry summary {
  min-height: 62px;
  padding: 8px 0;
  list-style: none;
  cursor: pointer;
}

.rank-entry summary::-webkit-details-marker { display: none; }
.rank-entry[open] summary { padding-inline: 0; }

.rank-entry:hover .model-name { color: var(--blue-dark); }

.rank-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.rank-number {
  color: #808783;
  font-family: var(--ui-font);
  font-size: 13px;
}

.rank-entry:nth-child(-n + 3) .rank-number { color: var(--ink); font-weight: 800; }

.model-logo,
.architecture-logo {
  width: 42px;
  height: 42px;
  display: grid;
  position: relative;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.rank-identity .model-logo { width: 32px; height: 32px; border-radius: 5px; }
.model-logo img { width: 20px; height: 20px; object-fit: contain; }

.architecture-logo {
  width: 34px;
  height: 34px;
  z-index: 2;
  margin-left: -4px;
  overflow: hidden;
  border-color: #bbc3be;
  background: #f5f7f5;
}

.architecture-logo img { width: 20px; height: 20px; object-fit: contain; }

.fluxeda-glyph {
  position: relative;
  color: #087eea;
  font-family: Inter, sans-serif;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.fluxeda-glyph::after {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff681f;
  content: "";
}

.architecture-cell,
.skill-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.architecture-cell strong,
.skill-cell strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.architecture-cell .architecture-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.architecture-cell .architecture-logo img { width: 18px; height: 18px; }

.skill-cell i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 2px solid #5d6762;
  transform: rotate(45deg);
}

.skill-logo {
  width: 18px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
}

.skill-cell strong {
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
}

.model-copy { min-width: 0; }
.model-name { display: block; overflow: hidden; font-size: 15px; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.model-meta { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font: 11px var(--ui-font); text-overflow: ellipsis; white-space: nowrap; }

.score-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border: 1px solid #d5dad7;
  background: #e5e9e6;
}

.score-fill {
  position: relative;
  width: var(--score);
  height: 100%;
}

.rank-entry .score-fill {
  background: linear-gradient(90deg, #207814 0%, #64db27 58%, #c8ff3d 100%);
}

.frequency-tag,
.ranking-die-size {
  justify-self: end;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-value,
.roi-value {
  justify-self: end;
  color: #737b77;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
}

.score-value small,
.roi-value small { color: #89918d; font-size: 9px; font-weight: 600; }

.rank-entry.metric-score .score-value,
.rank-entry.metric-roi .roi-value {
  color: var(--ink);
  font-weight: 800;
}

.run-details {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0 20px 20px;
  border-top: 1px solid #dfe3e0;
  border-left: 1px solid #dfe3e0;
}

.run-details > div {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  border-right: 1px solid #dfe3e0;
  border-bottom: 1px solid #dfe3e0;
}

.run-details span { color: #7b837f; font: 11px var(--ui-font); }
.run-details strong { overflow: hidden; font-size: 13px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }

.loading-state,
.empty-state,
.coming-soon-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--muted);
  font: 12px var(--ui-font);
}

.coming-soon-state {
  min-height: 280px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.coming-soon-state > span {
  color: var(--green-dark);
  font: 700 10px var(--ui-font);
}

.coming-soon-state > strong {
  color: var(--ink);
  font-family: Inter, "SF Pro Display", sans-serif;
  font-size: 34px;
  font-weight: 750;
}

.coming-soon-state > p {
  margin: 0;
  color: var(--muted);
  font: 13px Inter, sans-serif;
}

.loading-state span {
  width: 24px;
  height: 24px;
  border: 2px solid #ccd2ce;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.ranking-section { margin-bottom: 80px; }

.scoring-section { padding: 48px 0 64px; border-top: 1px solid var(--line); }
.scoring-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.scoring-heading .section-index { margin-bottom: 12px; }
.scoring-heading h2 { font-size: 34px; line-height: 1.2; }
.scoring-heading p:not(.section-index) { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.scoring-heading > a { flex-shrink: 0; padding-bottom: 4px; color: var(--green-dark); font-size: 12px; font-weight: 600; text-decoration: none; }
.scoring-heading > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.score-composition { padding: 28px 30px; background: var(--surface); border: 1px solid var(--line); }
.score-composition-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score-composition-heading h3 { margin: 0; font-size: 14px; font-weight: 600; }
.score-composition-heading > span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.score-equation { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 22px; margin: 22px 0; font-size: 21px; font-weight: 450; letter-spacing: -.35px; }
.score-equation > span { white-space: nowrap; }
.score-equation b { margin-right: 5px; font-size: 32px; font-weight: 650; letter-spacing: -1px; }
.score-equation i { color: #969f99; font-style: normal; font-size: 24px; font-weight: 400; }
.score-weight-bar { display: flex; gap: 3px; height: 8px; overflow: hidden; border-radius: 2px; }
.score-weight-bar > span:first-child { flex: 1; background: #b4cf9c; }
.score-weight-bar > span:last-child { flex: 4; background: var(--green-dark); }
.score-components { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 28px; }
.score-components article { min-width: 0; }
.score-components h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 600; }
.score-components h3 i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; }
.stage-swatch { background: #b4cf9c; }
.result-swatch { background: var(--green-dark); }
.score-components p { max-width: 510px; margin: 10px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.scoring-gates, .scoring-metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 0; margin: 0; list-style: none; font-size: 12px; line-height: 1.6; }
.scoring-gates li + li::before { content: "→"; margin-right: 12px; color: #8b968e; }
.scoring-metrics li { padding: 3px 8px; background: #f3f5f2; border-radius: 3px; }
.scoring-details { margin-top: 16px; }
.scoring-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; font-size: 13px; font-weight: 500; }
.scoring-details > summary::-webkit-details-marker { display: none; }
.scoring-details > summary:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 4px; }
.scoring-details-action::before { content: "+"; color: var(--muted); font-size: 21px; font-weight: 400; }
.scoring-details[open] .scoring-details-action::before { content: "−"; }
.formula-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; padding-bottom: 12px; }
.formula-sheet article { min-width: 0; padding: 20px 0; border-top: 1px solid var(--line); }
.formula-sheet .formula-primary { grid-column: 1 / -1; }
.formula-sheet h4 { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.formula-sheet var { font-family: inherit; font-style: normal; }
.formula-sheet sub { font-size: 65%; }
.formula-sheet article > small { display: block; max-width: 560px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.reference-values { margin: 16px 0 0; }
.reference-values div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; }
.reference-values dt { color: var(--muted); }
.reference-values dd { margin: 0; font-variant-numeric: tabular-nums; }

@font-face {
  font-family: "FluxBench Math";
  src: url("assets/fonts/STIX2Math.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.formula-equation { display: flex; align-items: center; min-height: 64px; margin: 12px 0; padding-block: 3px; min-width: 0; overflow: visible; }
.formula-equation math { flex-shrink: 0; margin: 0; color: var(--ink); font-family: "FluxBench Math", math; font-size: 26px; font-weight: 400; }

.site-footer {
  min-height: 116px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-top: 1px solid #cbd1cd;
  color: #656d69;
  font: 12px var(--ui-font);
}

.site-footer p:last-child { justify-self: end; }
.footer-brand { color: var(--ink); font-family: Inter, sans-serif; font-size: 15px; }
.footer-brand .brand-mark { width: 23px; height: 23px; padding: 5px; }

.primary-switch {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  gap: 2px;
  min-width: 252px;
  padding: 4px;
  border: 1px solid #46504a;
  border-radius: 9px;
  background: #151917;
}

.primary-switch::before {
  position: absolute;
  z-index: -1;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  border-radius: 6px;
  background: var(--green-dark);
  content: "";
  transition: transform 220ms ease;
}

.primary-switch[data-active-view="evaluation"]::before { transform: translateX(100%); }

.primary-switch button {
  min-height: 38px;
  flex: 1;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font: 750 12px Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  transition: color 180ms ease;
}

.primary-switch button:hover,
.primary-switch button[aria-selected="true"] { color: #ffffff; }

.view-panel[hidden] { display: none; }

/* Only one masthead is visible at a time; both use the same geometry. */
.masthead-eval { display: none; }
body[data-active-view="evaluation"] .masthead-leaderboard { display: none; }
body[data-active-view="evaluation"] .masthead-eval { display: grid; }

.evaluation-hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 64px;
  align-items: end;
  margin-top: -72px;
  padding: 46px 48px 50px;
  background: var(--ink);
  color: #f6f8f7;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--ink);
}

.evaluation-hero[hidden] { display: none; }

.evaluation-hero h2 { max-width: 780px; font-size: 64px; line-height: .96; }
.evaluation-hero .section-index { color: var(--green); }
.evaluation-lede { max-width: 700px; margin: 22px 0 0; color: #b7bfba; font-size: 15px; line-height: 1.7; }

.eval-status-block { display: grid; gap: 8px; padding-left: 20px; border-left: 3px solid var(--green); }
.status-kicker, .panel-code { color: var(--green-dark); font: 700 10px ui-monospace, monospace; letter-spacing: .04em; }
.eval-status-block .status-kicker { color: var(--green); }
.status-kicker { display: inline-flex; align-items: center; gap: 8px; }
.eval-status-block strong { font-size: 16px; }
.eval-status-block small { color: var(--muted); font: 11px ui-monospace, monospace; }
.eval-status-block .status-dot { width: 6px; height: 6px; box-shadow: none; }

.evaluation-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 34px; }
.evaluation-mode-switch { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; border: 1px solid var(--line); border-top-color: var(--ink); }
.evaluation-mode-switch button { min-width: 0; min-height: 70px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; padding: 12px 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.evaluation-mode-switch button > span { font: 700 10px ui-monospace, monospace; }
.evaluation-mode-switch button > strong { color: var(--ink); font-size: 14px; }
.evaluation-mode-switch button:last-child { border-right: 0; }
.evaluation-mode-switch button[aria-selected="true"] { background: var(--surface); box-shadow: inset 0 3px 0 var(--green-dark); }
.evaluation-mode-switch button[aria-selected="true"] > span { color: var(--green-dark); }
.evaluation-panel { min-width: 0; padding: 26px; border-top: 3px solid var(--ink); background: var(--surface); }
.evaluation-connection { border-top-color: var(--ink); }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 24px; }
.panel-heading .section-index { margin-bottom: 8px; }
.panel-heading h3 { margin: 0; font-size: 22px; }
.field-label { display: block; margin: 18px 0 8px; color: #505954; font: 700 10px ui-monospace, monospace; text-transform: uppercase; }
.evaluation-panel select, .evaluation-panel input[type="text"], .evaluation-panel input[type="url"], .evaluation-panel input[type="password"] { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #c7cfca; border-radius: 3px; background: #fbfcfb; color: var(--ink); }
.evaluation-panel select:focus, .evaluation-panel input:focus { outline: 2px solid rgba(38, 153, 244, .3); border-color: var(--blue-dark); }
.worker-picker { position: relative; }
.worker-picker-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c7cfca; border-radius: 5px; background: #fbfcfb; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.worker-picker-button:disabled { color: var(--muted); cursor: default; }
#worker-picker-value, .worker-picker-option { display: flex; align-items: center; gap: 10px; }
#worker-picker-value { flex: 1; }
.worker-picker-chevron { width: 6px; height: 6px; border-right: 1.5px solid #77837c; border-bottom: 1.5px solid #77837c; transform: rotate(45deg); margin: -3px 3px 0 0; }
.worker-picker-options { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; padding: 5px; border: 1px solid #dce2de; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(26, 45, 34, .12); }
.worker-picker-options[hidden] { display: none; }
.worker-picker-option { width: 100%; min-height: 40px; padding: 9px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.worker-picker-option:hover, .worker-picker-option[aria-selected="true"] { background: #f0f5f2; }
.worker-picker-option:disabled { opacity: .55; cursor: default; }
.worker-picker-button:focus-visible, .worker-picker-option:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }
.worker-picker-state { margin-left: auto; color: #69766e; font-size: 12px; white-space: nowrap; }
.worker-indicator { --lamp: #929c96; --halo: rgba(146, 156, 150, .13); flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 3px var(--halo), inset 0 1px 1px rgba(255, 255, 255, .3); }
.worker-indicator[data-state="idle"] { --lamp: #28a66b; --halo: rgba(40, 166, 107, .12); }
.worker-indicator[data-state="busy"] { --lamp: #d65b61; --halo: rgba(214, 91, 97, .12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.custom-provider-fields { margin-top: 18px; padding-top: 2px; border-top: 1px solid var(--line); }
.custom-provider-fields[hidden] { display: none; }
.provider-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.provider-actions button { padding: 8px 12px; border: 1px solid #c7cfca; border-radius: 5px; background: #f5f8f6; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.provider-actions button:hover { background: #eaf2ed; }
.provider-actions button:disabled { opacity: .5; cursor: default; }
.provider-actions button[hidden] { display: none; }
.field-help { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.preset-worker-copy > .field-label:first-child { margin-top: 0; }
.setup-constraints { margin: 24px 0 0; border-top: 1px solid var(--line); }
.setup-constraints > div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setup-constraints dt { color: var(--muted); font: 700 9px ui-monospace, monospace; }
.setup-constraints dd { margin: 0; font-size: 12px; font-weight: 700; }
.docker-agent-copy[hidden] { display: none; }
.docker-agent-copy > .field-label:first-child { margin-top: 0; }
.docker-registry-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 3px; background: #fafbfa; }
.docker-registry-summary { padding: 10px 14px; margin: 0; cursor: pointer; user-select: none; font-size: 10px; color: #424b45; }
.docker-registry-summary:hover { color: var(--ink); }
.docker-registry-fields { padding: 0 14px 14px; border-top: 1px dashed var(--line); }
.consent-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 22px; color: #59625d; font-size: 12px; line-height: 1.45; }
.consent-check input { margin-top: 3px; accent-color: var(--green-dark); }
.submit-eval { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding: 0 16px; border: 0; border-radius: 3px; background: var(--ink); color: #fff; cursor: pointer; font: 700 11px ui-monospace, monospace; }
.submit-eval b { color: var(--green); font-size: 18px; }
.submit-eval:hover { background: #242a26; }
.evaluation-feedback { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.evaluation-feedback.is-success { color: var(--green-dark); }
.evaluation-feedback.is-error { color: #b83224; }
.docker-preflight-status { min-height: 28px; margin-top: 10px; padding: 6px 12px; border-radius: 3px; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.docker-preflight-status.is-loading { background: #eef2f6; color: var(--blue-dark); border: 1px solid var(--blue); }
.docker-preflight-status.is-passed { background: #f0fdf4; color: var(--green-dark); border: 1px solid var(--green); }
.docker-preflight-status.is-failed { background: #fef2f2; color: #b83224; border: 1px solid #f87171; }
.docker-preflight-diagnosis { margin-top: 10px; padding: 12px; background: #fff5f5; border: 1px solid #fca5a5; border-radius: 3px; font-size: 11px; }
.docker-preflight-diagnosis .diagnosis-header { font-weight: 700; color: #991b1b; margin-bottom: 6px; }
.docker-preflight-diagnosis .diagnosis-checks { margin: 6px 0 10px 16px; padding: 0; font-size: 11px; }
.docker-preflight-diagnosis .diagnosis-checks li { margin-bottom: 3px; }
.docker-preflight-diagnosis details { margin-top: 8px; }
.docker-preflight-diagnosis summary { cursor: pointer; color: #7f1d1d; font-weight: 600; font-size: 10px; }
.docker-preflight-diagnosis pre { margin-top: 6px; padding: 8px; background: #1e1e1e; color: #f1f5f9; border-radius: 3px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; line-height: 1.4; max-height: 200px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; }

.login-dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 6px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 80px rgba(0, 0, 0, .36); }
.login-dialog::backdrop { background: rgba(10, 11, 11, .72); }
.login-dialog form { padding: 28px; border-top: 4px solid var(--green-dark); }
.login-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.login-heading h2 { font-size: 28px; }
.login-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font-size: 25px; line-height: 1; }
.login-dialog input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #c7cfca; border-radius: 3px; background: #fbfcfb; color: var(--ink); }
.login-submit:disabled { cursor: wait; opacity: .65; }

.evaluation-active { margin-top: 64px; }
.evaluation-queue { margin-top: 56px; padding-bottom: 50px; }
.run-management { display: flex; align-items: center; gap: 8px; }
.run-management > .panel-code { margin-right: 8px; white-space: nowrap; letter-spacing: 0; }
.run-mode-button {
  position: relative; display: inline-grid; place-items: center; flex: 0 0 40px;
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--mode-border);
  border-radius: 6px; background: var(--mode-surface); color: var(--mode-color);
  box-shadow: 0 1px 2px rgb(10 30 20 / 5%); cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.archive-mode-button { --mode-color: #337044; --mode-border: #c6d8cb; --mode-surface: #f4f9f5; --mode-hover: #e7f1e9; --mode-icon: url("assets/lucide/archive.svg"); }
.delete-mode-button { --mode-color: #ad4238; --mode-border: #e6ccc8; --mode-surface: #fdf7f6; --mode-hover: #f8e9e6; --mode-icon: url("assets/lucide/trash-2.svg"); }
.run-mode-button::before {
  content: ""; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--mode-icon) center / contain no-repeat;
  mask: var(--mode-icon) center / contain no-repeat;
}
.run-mode-button:hover { border-color: var(--mode-color); background: var(--mode-hover); }
.run-mode-button[aria-pressed="true"] { border-color: var(--mode-color); background: var(--mode-color); color: #fff; box-shadow: inset 0 1px 2px rgb(0 0 0 / 12%); }
.run-mode-button:focus-visible { outline: 2px solid var(--mode-color); outline-offset: 3px; }
.run-mode-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.run-mode-label {
  position: absolute; z-index: 5; bottom: calc(100% + 9px); right: 0;
  width: max-content; padding: 6px 9px; border-radius: 4px;
  background: #222b25; color: #fff; font: 600 11px/1.4 var(--soft-ui-font);
  letter-spacing: 0; white-space: nowrap; opacity: 0; pointer-events: none;
  box-shadow: 0 2px 6px rgb(0 0 0 / 12%); transition: opacity .12s ease;
}
.run-mode-button:hover .run-mode-label, .run-mode-button:focus-visible .run-mode-label { opacity: 1; }
.run-mode-button[hidden], .run-management-notice[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .run-mode-button, .run-mode-label { transition: none; }
}

.architecture-cell .architecture-logo.agent-fluxeda-agent img { width: 24px; height: 24px; }
.run-management-notice { margin: -8px 0 18px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.run-management-notice.is-error { color: #a12d21; }
.active-table { border-top: 1px solid var(--ink); }
.active-head, .active-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(160px, 1.2fr) 72px 112px 80px 68px 76px; gap: 12px; align-items: center; }
.active-head { min-height: 42px; color: #838b87; font: 650 10px ui-monospace, monospace; }
.active-row { min-height: 82px; padding: 10px 0; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 12px; }
.active-row time { color: var(--muted); font: 11px ui-monospace, monospace; }
.active-stages { display: grid; gap: 6px; min-width: 0; }
.active-stage-notice { color: #a15a16; font: 9px ui-monospace, monospace; }
.active-status { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.active-status small { color: var(--muted); font: 700 8px ui-monospace, monospace; }
.is-record-target { cursor: pointer; transition: background .18s, box-shadow .18s; }
.is-record-target:hover, .is-record-target:focus-visible { outline: 0; background: #f6faf5; box-shadow: inset 3px 0 var(--green-dark); }
.active-empty { min-height: 110px; display: grid; grid-template-columns: 12px 1fr; align-content: center; gap: 5px 10px; border-bottom: 1px solid var(--line); }
.active-empty .status-dot { grid-row: 1 / 3; align-self: center; }
.active-empty strong { font-size: 14px; }
.active-empty small { color: var(--muted); font-size: 11px; }
.queue-table { border-top: 1px solid var(--ink); }
.queue-row { min-height: 58px; display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px 110px; gap: 18px; align-items: center; border-bottom: 1px solid var(--line); color: #4c5650; font-size: 12px; }
.queue-row strong { color: var(--ink); font: 700 11px ui-monospace, monospace; }
.queue-head { min-height: 40px; color: #838b87; font: 650 10px ui-monospace, monospace; }
.queue-status { font: 700 10px ui-monospace, monospace; }
.queue-status.running { color: var(--blue-dark); }
.queue-status.complete, .queue-status.success, .queue-status.scored { color: var(--green-dark); }
.queue-status.queued { color: #a15a16; }
.queue-status.failed, .queue-status.cancelled, .queue-status.interrupted { color: #b83224; }
.queue-row time { color: var(--muted); font: 11px ui-monospace, monospace; }
.history-gate { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; }
.history-gate strong { color: var(--ink); font-size: 14px; }
.history-gate button { min-height: 34px; padding: 0 18px; border: 0; border-radius: 4px; background: var(--ink); color: #fff; cursor: pointer; font: 700 10px Inter, sans-serif; }
.history-head, .history-entry summary { display: grid; grid-template-columns: minmax(240px, 1.5fr) 128px 68px 64px 70px 112px 64px 50px 50px 80px; gap: 10px; align-items: center; }
.history-die-size, .active-die-size, .active-frequency { white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-head { min-height: 46px; color: #838b87; font: 650 10px ui-monospace, monospace; }
.history-entry { border-bottom: 1px solid var(--line); }
.history-entry[open] { background: var(--surface); }
.history-entry summary { min-height: 78px; cursor: pointer; list-style: none; font-size: 12px; }
.history-entry summary::-webkit-details-marker { display: none; }
.is-delete-target { cursor: pointer; background: #fff8f7; box-shadow: inset 3px 0 #c98f88; transition: background .18s, box-shadow .18s; }
.is-delete-target:hover { background: #fff1ef; box-shadow: inset 3px 0 #a12d21; }
.is-delete-target.is-deleting { pointer-events: none; opacity: .48; }
.is-archive-target { background: #f3f8f2; box-shadow: inset 3px 0 var(--green-dark); }
.is-archive-target:hover { background: #eaf2e8; }
.is-archive-unavailable summary { cursor: default; }
.history-identity { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.history-effort { color: var(--green-dark); font: 500 10px ui-monospace, monospace; line-height: 1.4; overflow-wrap: anywhere; }
.history-identity strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.history-identity small { overflow: hidden; color: var(--muted); font: 9px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.run-identity { min-width: 0; display: flex; align-items: center; gap: 9px; }
.run-identity > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.run-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-identity small { color: var(--muted); font: 8px ui-monospace, monospace; }
.run-icon { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; overflow: hidden; border: 1px solid #cbd2ce; border-radius: 5px; background: #fff; }
.run-icon img { width: 18px; height: 18px; object-fit: contain; }
.run-icon.is-fallback { color: #59625d; background: #eef1ee; font: 800 12px ui-monospace, monospace; }
.agent-run-identity strong { font-size: 11px; }
.agent-run-icon { width: 25px; height: 25px; flex-basis: 25px; background: #f5f7f5; }
.agent-run-icon img { width: 16px; height: 16px; }
.agent-run-icon.agent-fluxeda-agent img { width: 21px; height: 21px; }
.active-configuration { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.active-configuration > small { color: var(--muted); font: 8px ui-monospace, monospace; }
.history-score, .history-roi { font-size: 18px; }
.history-status { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.history-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.history-archive-state { color: var(--green-dark); font: 700 8px ui-monospace, monospace; }
.history-archive-state.is-running { color: var(--blue-dark); }
.history-archive-state.is-error { color: #a12d21; }
.history-stages { display: flex; gap: 5px; }
.history-stages i { width: 16px; height: 5px; display: block; background: #cbd1cd; }
.history-stages i.running { background: var(--blue); animation: stage-pulse 1.2s ease-in-out infinite alternate; }
.history-stages i.complete { background: var(--green-dark); }
.history-stages i.failed, .history-stages i.interrupted { background: var(--orange); }
.history-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 0 16px; background: var(--line); }
.history-details > div { min-height: 66px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 10px 14px; background: #f8faf8; }
.history-details > div span { color: var(--muted); font: 9px ui-monospace, monospace; }
.history-details > div strong { font-size: 13px; }
.history-details > span { grid-column: 1 / -1; padding: 20px; background: #f8faf8; color: var(--muted); font-size: 12px; }
.history-evaluation-button { min-height: 38px; padding: 0 13px; border: 1px solid #aeb7b2; border-radius: 3px; background: #f8faf8; color: var(--ink); cursor: pointer; font: 700 9px Inter, sans-serif; }
.history-evaluation-button:hover { border-color: var(--green-dark); color: var(--green-dark); }
.history-evaluation-button.is-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.history-evaluation-button.is-primary:hover { background: #242a26; color: var(--green); }
.history-evaluation-button:disabled { cursor: not-allowed; opacity: .5; }
.history-record-button { grid-column: 1 / -1; min-height: 44px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border: 0; background: var(--ink); color: #fff; cursor: pointer; font: 700 10px ui-monospace, monospace; }
.history-record-button b { color: var(--green); font-size: 17px; }
.history-record-button:hover { background: #242a26; }
.history-controls { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.history-sort-label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font: 700 9px ui-monospace, monospace; }
.history-sort-label select { width: 150px; min-height: 36px; padding: 0 30px 0 10px; border: 1px solid #c7cfca; border-radius: 4px; background: var(--surface); color: var(--ink); font: 650 12px Inter, sans-serif; }
.history-sort-label select:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }

.agent-record-viewer { position: fixed; z-index: 80; inset: 0; display: grid; grid-template-rows: 82px auto minmax(0, 1fr); color: #eaf0eb; background: #0d100e; }
.agent-record-viewer[hidden] { display: none; }
.agent-record-header { padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #303732; background: #151a17; }
.agent-record-header .section-index { color: var(--green); }
.agent-record-header h2 { margin: 5px 0 0; color: #f5f7f5; font-size: 20px; }
.agent-record-header-actions { display: flex; align-items: center; gap: 10px; }
.record-action-button { min-height: 36px; padding: 0 14px; border: 1px solid #414943; border-radius: 3px; background: #202622; color: #dfe5df; cursor: pointer; font: 700 9px ui-monospace, monospace; }
.record-action-button:hover { border-color: var(--green); color: var(--green); }
.record-close-button { width: 38px; height: 38px; border: 1px solid #414943; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; font-size: 27px; line-height: 1; }
.agent-record-toolbar { min-height: 76px; padding: 13px 34px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(240px, 390px) auto; align-items: center; gap: 20px; border-bottom: 1px solid #292f2b; }
.agent-record-meta { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.agent-record-identities { min-width: 0; display: flex; align-items: center; gap: 14px; }
.agent-record-identities .run-identity { max-width: 230px; color: #edf2ee; }
.agent-record-identities .run-identity strong { color: #edf2ee; font-size: 10px; }
.agent-record-identities .run-icon { width: 25px; height: 25px; flex-basis: 25px; border-color: #414943; background: #202622; }
.agent-record-identities .run-icon img { width: 16px; height: 16px; }
.agent-record-identities .agent-fluxeda-agent img { width: 21px; height: 21px; }
.agent-record-meta strong { overflow: hidden; color: var(--green); font: 700 10px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.agent-record-meta span { overflow: hidden; color: #768079; font: 8px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.agent-record-search { min-height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border: 1px solid #39413b; background: #141815; }
.agent-record-search span { color: #667069; font: 700 7px ui-monospace, monospace; }
.agent-record-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #e3e8e3; font: 10px ui-monospace, monospace; }
.agent-record-tabs { display: flex; border: 1px solid #39413b; }
.agent-record-tabs button { min-height: 38px; padding: 0 13px; border: 0; border-right: 1px solid #39413b; background: #141815; color: #89918b; cursor: pointer; font: 700 8px ui-monospace, monospace; }
.agent-record-tabs button:last-child { border-right: 0; }
.agent-record-tabs button[aria-selected="true"] { background: var(--green); color: var(--ink); }
.agent-record-body { min-height: 0; padding: 22px 34px 30px; display: flex; flex-direction: column; gap: 8px; }
.agent-record-paging { display: flex; align-items: center; gap: 10px; font: 11px/1.5 ui-monospace, monospace; color: #b8c5ba; }
.agent-record-paging span { flex: 1; }
.agent-record-paging button { flex-shrink: 0; padding: 5px 9px; border: 1px solid #414943; background: #202622; color: #dfe5df; cursor: pointer; }
.agent-record-paging button:disabled { opacity: .4; cursor: default; }
.agent-record-body .agent-record-terminal { min-height: 0; height: auto; flex: 1; overflow-anchor: none; }
.agent-record-terminal { width: 100%; height: 100%; margin: 0; padding: 22px; overflow: auto; border: 1px solid #29302b; border-top: 3px solid var(--green); background: #090b0a; color: #b8c5ba; font: 11px/1.72 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Keep compact evaluation controls readable without changing the leaderboard. */
:root { --soft-ui-font: "Avenir Next", "Nunito Sans", Inter, "Segoe UI", sans-serif; }
#evaluation, #login-dialog, #agent-record-viewer { font-family: var(--soft-ui-font); }
#evaluation .section-index,
#evaluation .status-kicker,
#evaluation .panel-code,
#evaluation .evaluation-mode-switch button > span,
#evaluation .field-label,
#evaluation .setup-constraints dt,
#evaluation .submit-eval,
#evaluation .delete-mode-button,
#evaluation .active-head,
#evaluation .active-row time,
#evaluation .active-status small,
#evaluation .queue-head,
#evaluation .queue-status,
#evaluation .queue-row time,
#evaluation .history-head,
#evaluation .history-identity small,
#evaluation .active-configuration > small,
#evaluation .history-archive-state,
#evaluation .history-details > div span,
#evaluation .history-record-button,
#evaluation .history-sort-label,
#evaluation .eval-status-block small,
#evaluation .active-stage-notice,
#evaluation .history-effort,
#evaluation .run-identity small,
#evaluation .queue-row strong { font-family: inherit; }
#evaluation .section-index,
#evaluation .field-label,
#evaluation .setup-constraints dt { text-transform: none; letter-spacing: .015em; }
#evaluation .field-label { font-weight: 650; }
#evaluation .evaluation-panel select,
#evaluation .evaluation-panel input[type="text"],
#evaluation .evaluation-panel input[type="url"],
#evaluation .evaluation-panel input[type="password"] {
  font: 400 13px var(--soft-ui-font);
}
#evaluation .submit-eval { letter-spacing: .01em; }
#login-dialog .section-index,
#agent-record-viewer .section-index,
#login-dialog .field-label,
#login-dialog .submit-eval,
#agent-record-viewer .record-action-button,
#agent-record-viewer .agent-record-meta strong,
#agent-record-viewer .agent-record-meta span,
#agent-record-viewer .agent-record-search span,
#agent-record-viewer .agent-record-tabs button { font-family: inherit; }
#login-dialog .section-index,
#agent-record-viewer .section-index { text-transform: none; letter-spacing: .015em; }
#login-dialog .field-label { text-transform: none; letter-spacing: .015em; font-weight: 650; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stage-pulse { to { opacity: .35; } }


@media (max-width: 1040px) {
  .masthead { grid-template-columns: 1fr 330px; gap: 34px; }
  .evaluation-hero { grid-template-columns: 1fr 330px; gap: 34px; }
  .chip-visual { grid-template-columns: 1fr; }
  .chip-stage { width: 210px; height: 210px; margin: auto; }
  .chip-visual figcaption { display: none; }
  .chart-head, .rank-row { grid-template-columns: minmax(140px, 1fr) 84px 88px minmax(64px, 100px) 64px 96px 60px 64px; gap: 8px; }
  .score-value, .roi-value { font-size: 18px; }
  .run-details { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 761px) and (max-width: 1040px) {
  #evaluation-active, #evaluation-history { overflow-x: auto; }
  .active-head, .active-row { min-width: 840px; }
}

@media (max-width: 760px) {
  .nav-shell, .masthead, .page-shell, .site-footer { width: min(100% - 32px, 1320px); }
  .nav-shell { min-height: 62px; grid-template-columns: auto 1fr auto; gap: 10px; }
  .nav-shell > .brand > span:last-child { display: none; }
  .nav-actions { gap: 8px; }
  .primary-switch { min-width: 190px; }
  .primary-switch button { min-height: 34px; padding-inline: 9px; font-size: 10px; }
  .nav-jump { min-height: 30px; padding-inline: 9px; font-size: 8px; }
  .nav-actions .nav-jump { display: none; }
  .login-trigger { min-height: 30px; padding-inline: 9px; font-size: 9px; }
  .nav-meta { font-size: 9px; }
  .masthead { min-height: auto; grid-template-columns: 1fr 105px; gap: 18px; padding-block: 42px; }
  h1 { font-size: 44px; }
  .lede { font-size: 15px; line-height: 1.65; }
  .chip-visual { min-height: 140px; border: 0; }
  .chip-stage { width: 105px; height: 140px; }
  .page-shell { padding-top: 54px; }
  h2 { font-size: 29px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  .ranking-note { margin-top: 12px; font-size: 12px; }
  .benchmark-tabs { gap: 24px; }
  .chart-head { display: none; }
  .ranking-list { margin-top: 18px; }
  .rank-entry summary { min-height: 0; padding-block: 10px; }
  .rank-row { grid-template-columns: minmax(0, 1fr) 100px; gap: 6px 12px; }
  .rank-identity { min-height: 40px; grid-column: 1; grid-row: 1; grid-template-columns: 24px 30px minmax(0, 1fr); gap: 7px; }
  .rank-identity .model-logo { width: 30px; height: 30px; }
  .model-name { line-height: 1.2; text-overflow: clip; white-space: normal; }
  .architecture-cell { grid-column: 1; grid-row: 2; padding-left: 34px; }
  .skill-cell { grid-column: 2; grid-row: 2; justify-self: end; width: 84px; }
  .architecture-cell strong { font-size: 10px; }
  .skill-cell strong { font-size: 11px; }
  .architecture-cell .architecture-logo { width: 24px; height: 24px; }
  .score-track { grid-column: 1 / -1; grid-row: 3; height: 12px; }
  .frequency-tag { grid-column: 2; grid-row: 1; align-self: start; line-height: 18px; }
  .ranking-die-size { grid-column: 2; grid-row: 1; align-self: end; line-height: 18px; font-size: 10px; }
  .score-value, .roi-value { grid-row: 4; font-size: 18px; }
  .score-value { grid-column: 1; justify-self: start; padding-left: 34px; }
  .roi-value { grid-column: 2; justify-self: end; }
  .score-value small, .roi-value small { color: rgba(10, 11, 11, 0.58); }
  .rank-entry[open] summary { padding-inline: 12px; }
  .run-details { grid-template-columns: repeat(2, 1fr); margin: 0 12px 12px; }
  .ranking-section { margin-bottom: 54px; }
  .site-footer { min-height: 150px; grid-template-columns: 1fr; gap: 12px; padding-block: 28px; }
  .site-footer p { margin: 0; }
  .site-footer p:last-child { justify-self: start; }
  .evaluation-hero { min-height: auto; grid-template-columns: 1fr 105px; gap: 18px; margin-top: -54px; padding: 42px 0; }
  .evaluation-hero h2 { font-size: 44px; }
  .eval-status-block { grid-column: 2; grid-row: 1; align-self: center; padding-left: 12px; }
  .evaluation-hero > div:first-child { grid-column: 1; grid-row: 1; }
  .evaluation-layout { grid-template-columns: 1fr; }
  .evaluation-mode-switch { grid-template-columns: 1fr; }
  .evaluation-mode-switch button { border-right: 0; border-bottom: 1px solid var(--line); }
  .evaluation-panel { padding: 20px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .active-head { display: none; }
  .evaluation-active > .panel-heading { flex-wrap: wrap; }
  .evaluation-queue > .panel-heading { flex-wrap: wrap; }
  .history-controls { justify-content: flex-start; }
  .run-management { flex-wrap: wrap; }
  .run-mode-button { width: 44px; height: 44px; flex-basis: 44px; }
  .active-row { grid-template-columns: minmax(0, 1fr) 76px; gap: 10px; padding: 14px 0; }
  .active-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .active-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .active-row > .active-frequency { grid-column: 1; grid-row: 3; }
  .active-row > .active-die-size { grid-column: 2; grid-row: 3; justify-self: end; }
  .active-row > .active-stages { grid-column: 1; grid-row: 4; }
  .active-row > time { grid-column: 2; grid-row: 2; justify-self: end; }
  .active-row > .active-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .queue-row { grid-template-columns: 100px minmax(0, 1fr); gap: 8px 14px; padding-block: 12px; }
  .queue-row > :nth-child(3), .queue-row > :nth-child(4) { grid-column: 2; }
  .queue-head { display: none; }
  .history-head { display: none; }
  .history-entry summary { grid-template-columns: minmax(0, 1fr) 76px; gap: 10px; padding-block: 14px; }
  .history-entry summary > :nth-child(2), .history-entry summary > .history-skill, .history-entry summary > .history-stages { display: none; }
  .history-entry summary > .history-identity { grid-column: 1; grid-row: 1; }
  .history-entry summary > .history-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .history-entry summary > .history-design { grid-column: 1; grid-row: 2; }
  .history-entry summary > .history-frequency { grid-column: 1; grid-row: 3; white-space: nowrap; }
  .history-entry summary > .history-die-size { grid-column: 2; grid-row: 3; justify-self: end; }
  .history-entry .history-score { grid-column: 1; grid-row: 4; }
  .history-entry .history-roi { grid-column: 2; grid-row: 4; justify-self: end; }
  .history-entry .queue-status { justify-self: end; }
  .history-details { grid-template-columns: repeat(2, 1fr); }
  .agent-record-header { min-height: 72px; padding: 0 18px; }
  .agent-record-header h2 { font-size: 16px; }
  .agent-record-toolbar { padding: 12px 18px; grid-template-columns: 1fr; gap: 10px; }
  .agent-record-meta { display: none; }
  .agent-record-search { min-height: 38px; }
  .agent-record-tabs { overflow-x: auto; }
  .agent-record-tabs button { min-width: 74px; flex: 1; white-space: nowrap; }
  .agent-record-body { padding: 12px 18px 18px; }
  .agent-record-terminal { padding: 16px; font-size: 10px; }
}

@media (max-width: 480px) {
  .masthead { grid-template-columns: 1fr; }
  .chip-visual { display: none; }
  h1 { font-size: 40px; }
  .model-name { font-size: 14px; }
  .agent-record-header { padding-inline: 14px; }
  .record-action-button { display: none; }
  .agent-record-body { padding-inline: 10px; }
  .history-controls { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-sort-label select { width: 100%; }
}

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

/* Provider colors remain stable across ranking order, frequency, and metric. */
.ranking-overview [data-maker="OpenAI"] { --bar-color: #1f1f1f; }
.ranking-overview [data-maker="Anthropic"] { --bar-color: #cc785c; }
.ranking-overview [data-maker="Google"] { --bar-color: #34a853; }
.ranking-overview [data-maker="DeepSeek"] { --bar-color: #2243e6; }
.ranking-overview [data-maker="Z.ai"] { --bar-color: #1c7ff8; }
.ranking-overview [data-maker="Moonshot AI"] { --bar-color: #61666d; }
.ranking-overview [data-maker="Meta"] { --bar-color: #0089f4; }
.ranking-overview [data-maker="xAI"] { --bar-color: #736cd3; }
.ranking-overview [data-maker="Xiaomi"] { --bar-color: #ff6900; }
.ranking-overview [data-maker="Alibaba"] { --bar-color: #615ced; }
.overview-legend { display: flex; flex-wrap: nowrap; gap: 8px 18px; margin: 16px 0 12px; overflow-x: auto; scrollbar-width: none; }
.overview-legend::-webkit-scrollbar { display: none; }
.overview-legend-item { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.overview-legend-item i { width: 9px; height: 9px; border-radius: 2px; background: var(--bar-color, #7b828a); }

#overview-range-toggle { padding: 7px 10px; border: 1px solid #d9dfd9; border-radius: 5px; background: #fff; color: var(--ink); font-family: var(--ui-font); font-size: 12px; cursor: pointer; }
#overview-range-toggle:hover { background: #f3f6f2; }
#overview-range-toggle:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }

.overview-controls { display: flex; gap: 8px; }
.overview-controls select { min-height: 32px; padding: 6px 25px 6px 10px; border: 1px solid #d9dfd9; border-radius: 5px; background-color: #fff; color: var(--ink); font-family: var(--ui-font); font-size: 12px; cursor: pointer; }
.overview-controls select:hover { border-color: #aeb9b0; }
.overview-controls select:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }
@media (max-width: 760px) {
  .overview-actions { width: 100%; gap: 10px 14px; }
}

/* Keep every skill label on the same text column regardless of its icon. */
.skill-cell { gap: 8px; }
.skill-mark { display: grid; place-items: center; width: 20px; height: 24px; flex: 0 0 20px; }
.chart-head > span:nth-child(3) { padding-left: 28px; }


@media (min-width: 761px) and (max-width: 1040px) {
  .chart-head { font-size: 11px; }
  .chart-head .axis i:not(:first-child):not(:last-child) { display: none; }
}

@media (max-width: 760px) {
  .scoring-section { padding: 36px 0 48px; }
  .scoring-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 24px; }
  .scoring-heading h2 { font-size: 29px; }
  .score-composition { padding: 22px 18px; }
  .score-equation { gap: 10px; font-size: 14px; letter-spacing: 0; }
  .score-equation b { font-size: 24px; margin-right: 2px; }
  .score-equation i { font-size: 18px; }
  .score-components { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
}

@media (max-width: 760px) {
  .formula-sheet { grid-template-columns: 1fr; }
  .formula-sheet .formula-primary { grid-column: auto; }
  .formula-equation math { font-size: 24px; }
}

/* Inset run identities consistently with the first column heading. */
#evaluation .active-head > :first-child,
#evaluation .history-head > :first-child,
#evaluation .active-row > .history-identity,
#evaluation .history-entry summary > .history-identity { padding-inline-start: 16px; }
@media (max-width: 760px) {
  #evaluation .active-row > .history-identity,
  #evaluation .history-entry summary > .history-identity { padding-inline-start: 12px; }
}

/* Explicit English labels replace the browser-localized native file picker. */
#eval-docker-image[hidden] { display: none; }
.docker-file-picker { display: flex; align-items: center; gap: 12px; min-width: 0; }
.docker-file-picker button { flex-shrink: 0; padding: 9px 13px; border: 1px solid #c7cfca; border-radius: 5px; background: #f5f8f6; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.docker-file-picker button:hover { background: #eaf2ed; }
.docker-file-picker button:disabled { opacity: .5; cursor: default; }
.docker-file-picker span { min-width: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* Keep worker and reasoning together in the history metadata. */
.history-identity .history-run-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; white-space: normal; }
.history-run-origin { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-worker-meta { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.history-worker-meta .history-effort { font-size: inherit; line-height: inherit; }

@media (min-width: 761px) and (max-width: 1240px) {
  #evaluation-history { overflow-x: auto; }
  .history-head, .history-entry { min-width: 1120px; }
}

/* Benchmark-specific scoring components share the existing metric layout. */
.nvdla-score-weight-bar > span:nth-child(1) { flex: 6; background: var(--green-dark); }
.nvdla-score-weight-bar > span:nth-child(2) { flex: 2; background: #739762; }
.nvdla-score-weight-bar > span:nth-child(3) { flex: 1; background: #b4cf9c; }
.nvdla-score-weight-bar > span:nth-child(4) { flex: 1; background: #d6e5c8; }
[data-scoring-design="nvdla"] .formula-sheet p { color: var(--muted); font-size: 13px; line-height: 1.7; }

/* Keep chart controls at the same height when switching benchmarks. */
@media (max-width: 900px) {
  .overview-heading { flex-direction: column; gap: 14px; }
  .overview-heading > div:first-child { width: 100%; }
  .overview-heading h3 { display: flex; align-items: center; gap: 10px; }
  .overview-heading h3 .benchmark-title-tag { margin-left: 0; flex-shrink: 0; }
  .overview-heading p { white-space: nowrap; font-size: 12px; }
  .overview-actions { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; }
  .overview-controls { grid-column: 1 / -1; grid-row: 1; }
  #overview-range-toggle { grid-column: 1; grid-row: 2; justify-self: start; }
  .overview-actions a { grid-column: 2; grid-row: 2; }
}

/* Shared metric groups retain the leaderboard's compact data-cell styling. */
.run-details.grouped-run-details {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px 20px;
  padding-top: 14px;
  border: 0;
}
.detail-group { min-width: 0; }
.detail-width-5 { grid-column: span 5; }
.detail-width-6 { grid-column: span 6; }
.detail-width-7 { grid-column: span 7; }
.detail-width-12 { grid-column: 1 / -1; }
.detail-group h4 { margin: 0 0 8px; color: var(--muted); font: 600 12px var(--ui-font); }
.detail-grid { display: grid; border-top: 1px solid #dfe3e0; border-left: 1px solid #dfe3e0; }
.detail-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.detail-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.detail-cell { min-width: 0; min-height: 64px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 12px; border-right: 1px solid #dfe3e0; border-bottom: 1px solid #dfe3e0; }
@media (max-width: 1040px) {
  .detail-group { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .run-details.grouped-run-details { gap: 16px; padding-top: 10px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid > .detail-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .detail-cell { padding: 10px; }
}
