:root {
  --bg: #f7f7f8;
  --sidebar: #ececf1;
  --panel: #ffffff;
  --panel-soft: #f7f7f8;
  --ink: #1f1f1f;
  --muted: #6a6f78;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #10a37f;
  --accent-soft: #e7f7f2;
  --hero-accent: #3558c9;
  --danger: #cf402f;
  --danger-soft: #fceae7;
  --success: #eaf7ef;
  --warning: #fff4e7;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
}

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

a {
  color: inherit;
}

.page-shell {
  width: min(1480px, calc(100vw - 24px));
  margin: 12px auto;
}

.topbar {
  min-height: 66px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}

.topbar-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

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

.topbar-logo-shell {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.topbar-logo {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.topbar h1,
.sidebar-head h2,
.section-heading h3,
.question-panel h2 {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(1.56rem, 2.5vw, 1.96rem);
  font-weight: 700;
  line-height: 1.08;
}

.title-trs-letter {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.topbar-subtitle {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.34;
}

.topbar-accent {
  color: var(--accent);
  font-weight: 700;
}

.topbar-accent-run {
  color: var(--accent);
}

.topbar-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.topbar-menu {
  position: relative;
}

.topbar-menu summary {
  list-style: none;
}

.topbar-menu summary::-webkit-details-marker {
  display: none;
}

.topbar-menu-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
}

.topbar-menu-label {
  font-size: 0.72rem;
  line-height: 1;
  color: var(--muted);
}

.topbar-menu-value {
  font-size: 0.74rem;
  line-height: 1;
  font-weight: 600;
}

.topbar-menu[open] .topbar-menu-summary {
  border-color: rgba(16, 163, 127, 0.35);
  background: #ffffff;
}

.dataset-toggle-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.dataset-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.dataset-toggle:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.dataset-toggle.active {
  border-color: rgba(16, 163, 127, 0.35);
  background: #effaf5;
  color: var(--ink);
}

.dataset-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dataset-toggle-mark {
  width: 15px;
  height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.62rem;
  line-height: 1;
}

.dataset-toggle.active .dataset-toggle-mark {
  border-color: rgba(16, 163, 127, 0.45);
  background: var(--accent);
  color: #ffffff;
}

.topbar-link,
.topbar-chip,
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.77rem;
  line-height: 1;
}

.topbar-link,
.topbar-chip {
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  text-decoration: none;
}

.topbar-link:hover {
  border-color: var(--line-strong);
}

.run-quota-chip {
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.run-quota-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.run-quota-chip strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.run-quota-chip.exhausted {
  border-color: rgba(207, 64, 47, 0.28);
  background: var(--danger-soft);
}

.run-quota-chip.exhausted .run-quota-label,
.run-quota-chip.exhausted strong {
  color: var(--danger);
}

.topbar-chip.subtle {
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--sidebar);
  position: sticky;
  top: 12px;
  align-self: start;
  box-shadow: var(--shadow);
}

.sidebar-head h2 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.mode-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.sidebar-section-title {
  color: var(--accent);
  font-size: 1.22rem;
  line-height: 1.1;
  font-weight: 700;
}

.mode-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.mode-card:hover,
.mode-card.active {
  border-color: rgba(16, 163, 127, 0.3);
  background: rgba(255, 255, 255, 0.78);
}

.mode-card.active {
  border-width: 2px;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.custom-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.mode-card strong {
  font-size: 1.12rem;
  font-weight: 700;
}

.mode-card small {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.4;
}

.sidebar-panel {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 11px;
  border: 1px solid rgba(31, 31, 31, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.custom-input-panel {
  align-content: start;
}

.clustrmaps-panel {
  gap: 10px;
}

.clustrmaps-frame {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.clustrmaps-widget-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 238px);
  min-height: 198px;
}

.clustrmaps-frame,
.clustrmaps-widget-shell,
.clustrmaps-widget-shell > a,
.clustrmaps-widget-shell .clstrm_outer,
.clustrmaps-widget-shell .clstrm_inner {
  background: #ffffff !important;
}

.clustrmaps-widget-shell > a,
.clustrmaps-widget-shell > div,
.clustrmaps-widget-shell > canvas,
.clustrmaps-widget-shell > iframe {
  display: block;
  margin: 0 auto;
}

.custom-meta,
.custom-status {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
}

.custom-note {
  margin: -2px 0 0;
  font-size: 0.72rem;
  line-height: 1.38;
  color: #7a5b12;
}

.custom-textarea {
  width: 100%;
  min-height: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  resize: vertical;
  line-height: 1.45;
}

.custom-textarea.compact {
  line-height: 1.35;
}

.custom-textarea:focus {
  outline: none;
  border-color: rgba(16, 163, 127, 0.4);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

.apply-custom-button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(16, 163, 127, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.apply-custom-button:hover:not(:disabled) {
  border-color: rgba(16, 163, 127, 0.42);
  background: #f7fffb;
}

.apply-custom-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.example-list {
  display: grid;
  gap: 6px;
}

.example-group-card {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.example-group-card:hover,
.example-group-card.active {
  border-color: rgba(16, 163, 127, 0.34);
  background: #ffffff;
}

.example-group-card.active {
  border-color: rgba(16, 163, 127, 0.58);
  background: #f0fbf5;
  box-shadow: 0 8px 18px rgba(16, 163, 127, 0.1);
}

.example-group-card.open {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.example-group-card.nested {
  margin-top: 6px;
  margin-left: 10px;
  padding: 9px 10px;
  border-style: dashed;
}

.example-group-card.active.open {
  box-shadow: 0 8px 20px rgba(16, 163, 127, 0.12);
}

.example-group-header,
.example-group-copy,
.example-group-trigger-copy {
  display: grid;
}

.example-group-header,
.example-group-copy {
  gap: 3px;
}

.example-group-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.example-group-kicker,
.question-subtitle,
#runStatus,
.section-heading p,
.verifier-card span,
.metric span,
.answer-strip span {
  color: var(--muted);
}

.example-group-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.example-group-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f5f4f1;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1;
  white-space: nowrap;
}

.example-group-card.active .example-group-count {
  background: #ddf6e9;
  color: #0f8f5f;
}

.example-group-title {
  display: block;
  font-size: 0.92rem;
  line-height: 1.28;
  font-weight: 600;
}

.example-group-subtitle {
  font-size: 0.75rem;
  line-height: 1.34;
  color: var(--muted);
}

.example-group-trigger {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #d8d1c8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #faf9f6 100%);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.example-group-trigger:hover {
  border-color: #c9c2b8;
  background: #ffffff;
}

.example-group-card.active .example-group-trigger {
  border-color: rgba(16, 163, 127, 0.4);
  background: #ffffff;
}

.example-group-trigger:focus {
  outline: none;
  border-color: rgba(16, 163, 127, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.example-group-trigger-copy {
  gap: 2px;
  min-width: 0;
}

.example-group-trigger-copy strong,
.example-group-trigger-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.example-group-trigger-copy strong {
  font-size: 0.8rem;
  line-height: 1.28;
  font-weight: 600;
}

.example-group-trigger-copy span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.example-group-chevron {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
}

.example-option-stack {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  max-height: 210px;
  overflow: auto;
  padding-right: 1px;
}

.example-option-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #ebe5de;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefc 0%, #f7f5f2 100%);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.example-option-card:hover {
  border-color: #cbc2b7;
  background: #ffffff;
  transform: translateY(-1px);
}

.example-option-card.active {
  border-color: rgba(16, 163, 127, 0.58);
  background: #ebf8f1;
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, 0.14);
}

.example-option-index {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #e1dbd3;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1;
  flex: 0 0 auto;
}

.example-option-card.active .example-option-index {
  border-color: rgba(16, 163, 127, 0.42);
  color: var(--accent);
  background: #effaf5;
}

.example-option-text {
  min-width: 0;
  font-size: 0.76rem;
  line-height: 1.34;
}

.example-nested-groups {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

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

.control-bar,
.question-panel,
.collapse-panel,
.comparison-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.control-bar,
.question-panel,
.comparison-panel {
  padding: 14px;
}

.question-panel {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
  align-content: start;
  padding: 9px 13px;
}

.control-bar {
  display: grid;
  gap: 0;
  align-content: start;
  padding: 10px 14px 9px;
}

.field-label {
  display: block;
  margin-bottom: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--muted);
}

.accent-label {
  color: var(--accent);
}

.model-picker-shell {
  min-width: 0;
  display: grid;
  gap: 0;
  align-content: start;
}

.picker-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.picker-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  min-height: 31px;
}

.picker-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
}

.picker-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 29px;
  margin-top: 0;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 0.68rem;
  line-height: 1;
  color: var(--muted);
}

.current-model-menu {
  position: relative;
  min-width: 0;
  flex: 0 1 288px;
  max-width: 288px;
}

.current-model-menu summary {
  list-style: none;
}

.current-model-menu summary::-webkit-details-marker {
  display: none;
}

.current-model-summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 37px;
  padding: 6px 40px 6px 10px;
  border: 1px solid rgba(193, 145, 29, 0.34);
  border-radius: 12px;
  background: #fff7d9;
  cursor: pointer;
  position: relative;
}

.current-model-summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid #936b10;
  border-bottom: 1.6px solid #936b10;
  transform: translateY(-60%) rotate(45deg);
}

.current-model-menu[open] .current-model-summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.current-model-summary strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7f5a00;
  font-size: 0.88rem;
}

.current-model-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  width: 100%;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.current-model-option {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid #ebe5de;
  border-radius: 12px;
  background: #fffefc;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.current-model-option:hover {
  border-color: #cbc2b7;
  background: #ffffff;
}

.current-model-option.active {
  border-color: rgba(16, 163, 127, 0.5);
  background: #ebf8f1;
}

.current-model-option-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.model-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 3px;
  margin-top: 6px;
}

.model-group-card {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(118px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #ece8e2;
  border-radius: 10px;
  background: #fcfcfa;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.model-group-card:hover {
  border-color: #c9c2b8;
  background: #ffffff;
}

.model-group-card.active {
  border-color: #302c28;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(20, 18, 15, 0.05);
}

.model-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  cursor: pointer;
}

.model-group-brand {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #ede7df;
  background: #ffffff;
  color: var(--ink);
}

.current-model-badge,
.current-model-option-badge {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #ede7df;
  background: #ffffff;
  color: var(--ink);
}

.model-group-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.current-model-badge .model-group-icon,
.current-model-option-badge .model-group-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.model-group-fallback {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.current-model-badge .model-group-fallback,
.current-model-option-badge .model-group-fallback {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.model-group-copy {
  min-width: 0;
  display: block;
}

.model-group-copy strong {
  display: block;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}

.model-group-select {
  width: 100%;
  min-width: 0;
  padding: 6px 28px 6px 9px;
  border: 1px solid #d8d1c8;
  border-radius: 10px;
  background-color: var(--panel);
  background-image:
    linear-gradient(45deg, transparent 50%, #6a6f78 50%),
    linear-gradient(135deg, #6a6f78 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.15;
  appearance: none;
  cursor: pointer;
}

.model-group-select:focus {
  outline: none;
  border-color: rgba(16, 163, 127, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
}

.verifier-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  white-space: nowrap;
}

.topbar-verifier-card {
  padding: 4px 8px;
  gap: 6px;
}

.verifier-card span {
  display: inline-block;
  flex: 0 0 auto;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.verifier-card strong {
  display: inline-block;
  min-width: 0;
  margin-top: 0;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.verifier-select {
  width: auto;
  min-width: 118px;
  margin-top: 0;
  padding: 6px 28px 6px 10px;
  border: 1px solid #d8d1c8;
  border-radius: 10px;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, transparent 50%, #6a6f78 50%),
    linear-gradient(135deg, #6a6f78 50%, transparent 50%);
  background-position:
    calc(100% - 15px) calc(50% - 2px),
    calc(100% - 10px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.3;
  appearance: none;
  white-space: nowrap;
}

.topbar-verifier-card .verifier-select {
  min-width: 112px;
  max-width: 146px;
}

.verifier-select:focus {
  outline: none;
  border-color: rgba(16, 163, 127, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.run-button,
.stop-button,
.clear-button {
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  padding: 8px 14px;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.run-button {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.stop-button {
  background: #ffffff;
  color: #b04839;
  border-color: rgba(176, 72, 57, 0.28);
}

.stop-button:hover:not(:disabled) {
  background: #fff2ef;
  border-color: rgba(176, 72, 57, 0.45);
}

.clear-button {
  background: #ffffff;
  color: var(--muted);
  border-color: rgba(106, 111, 120, 0.2);
}

.clear-button:hover:not(:disabled) {
  background: #f7f7f8;
  border-color: rgba(106, 111, 120, 0.35);
}

.run-button:disabled,
.stop-button:disabled,
.clear-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.context-stack {
  display: grid;
  gap: 6px;
  align-content: start;
}

.question-summary,
.question-body {
  min-width: 0;
}

.question-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.badge,
.pill {
  padding: 6px 10px;
  background: var(--panel-soft);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.question-panel h2 {
  font-size: 1.22rem;
  line-height: 1.12;
  font-weight: 700;
}

.question-subtitle {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.38;
}

.question-topline,
.question-subtitle {
  display: none;
}

.question-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 8px;
  row-gap: 6px;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.copy-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
  color: var(--ink);
}

.copy-button.copied {
  border-color: rgba(16, 163, 127, 0.28);
  background: var(--accent-soft);
  color: var(--accent);
}

.question-copy-button {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

.benchmark-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #c14434;
}

.benchmark-hint strong {
  font-weight: 700;
}

.question-text,
.skill-card,
.trace-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.question-text {
  grid-column: 1;
  grid-row: 1;
  margin-top: 0;
  font-size: 0.88rem;
  line-height: 1.48;
}

.answer-strip {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.answer-strip span,
.metric span,
.summary-card span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.answer-strip strong {
  text-align: right;
  font-size: 0.84rem;
  line-height: 1.25;
}

.skill-card-source {
  color: var(--muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.trace-summary-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  line-height: 1;
}

.skill-card {
  margin: 0;
  padding: 0 14px 14px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.45;
}

.skill-card mjx-container {
  font-size: 0.95em !important;
}

.skill-card mjx-container[display="true"] {
  margin: 0.45em 0 !important;
}

.comparison-panel {
  background: var(--panel);
  align-content: start;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.section-heading p,
#runStatus {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: right;
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  align-items: start;
}

.summary-card {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.summary-card.down {
  border-color: rgba(16, 163, 127, 0.24);
  background: #f3fbf7;
}

.summary-card.up {
  border-color: rgba(207, 64, 47, 0.22);
  background: #fff2ef;
}

.summary-card.flat {
  background: #f7f7f8;
}

.summary-card strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  font-size: 1.12rem;
  line-height: 1.32;
  font-weight: 700;
}

.summary-card.down strong {
  color: #0f8f5f;
}

.summary-card.up strong {
  color: #c14434;
}

.summary-card.flat strong {
  color: var(--muted);
}

.summary-arrow {
  font-size: 1.05rem;
  line-height: 1;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  align-items: start;
}

.result-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  align-self: start;
}

.result-card.emphasis {
  border-color: rgba(16, 163, 127, 0.22);
}

.result-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.result-mode {
  font-size: 1.18rem;
  line-height: 1.1;
  font-weight: 700;
}

.result-mode.accent {
  color: var(--accent);
}

.result-context {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill.accent {
  background: var(--accent-soft);
  color: var(--accent);
}

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

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.02rem;
  line-height: 1.4;
}

.metric.accent {
  border-color: #c7ccd3;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(199, 204, 211, 0.28);
}

.metric.accent strong {
  color: var(--ink);
  font-weight: 700;
}

.metric.success {
  background: var(--success);
}

.metric.warning {
  background: var(--warning);
}

.metric.muted {
  background: #f3f4f6;
}

.trace-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}

.trace-panel summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 34px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1;
  list-style: none;
}

.trace-panel summary::-webkit-details-marker {
  display: none;
}

.trace-panel summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-1px) rotate(45deg);
  transition: transform 140ms ease;
}

.trace-panel[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}

.skill-panel.trace-panel {
  margin-top: 0;
}

.trace-copy-button {
  flex: 0 0 auto;
}

.trace-body {
  margin: 0;
  padding: 0 14px 14px;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.42;
}

.trace-body mjx-container {
  font-size: 0.95em !important;
}

.trace-body mjx-container[display="true"] {
  margin: 0.45em 0 !important;
}

.trace-hint-keyword {
  font-weight: 700;
}

.trace-hint-sentence {
  color: var(--danger);
}

@media (max-width: 900px) {
  .question-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.trace-body.streaming::after {
  content: "▋";
  margin-left: 3px;
  color: var(--accent);
  animation: blink 1s steps(2, end) infinite;
}

.hidden {
  display: none;
}

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

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }

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

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

  .sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .result-grid,
  .live-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 12px, 100%);
    margin: 6px auto;
  }

  .topbar,
  .control-bar,
  .question-panel,
  .comparison-panel,
  .sidebar {
    padding: 14px;
  }

  .topbar,
  .picker-head,
  .picker-tools,
  .control-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-meta {
    align-items: stretch;
  }

  .topbar-menu {
    width: 100%;
  }

  .topbar-menu-summary,
  .topbar-verifier-card {
    width: 100%;
  }

  .dataset-toggle-list {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 0;
  }

  .picker-head {
    gap: 4px;
  }

  .picker-main {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .picker-tools {
    flex: none;
    gap: 6px;
  }

  .verifier-card,
  .model-picker-shell,
  .run-button,
  .stop-button,
  .clear-button,
  .verifier-select {
    width: 100%;
  }

  .current-model-menu {
    width: 100%;
    flex: none;
  }

  .model-group-grid {
    grid-template-columns: 1fr;
  }

  .mode-card-grid {
    grid-template-columns: 1fr;
  }

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

  .clustrmaps-frame {
    height: 188px;
  }
}
