:root {
  --bg: #0a0c0b;
  --surface: #111412;
  --surface-raised: #171a18;
  --surface-soft: #1d211e;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f7f4;
  --text-soft: #a8b0a9;
  --text-muted: #707971;
  --accent: #c7ff4a;
  --accent-soft: rgba(199, 255, 74, 0.12);
  --accent-blue: #7bc7ff;
  --warning: #ffd166;
  --danger: #ff786f;
  --success: #9ee66c;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
  color: var(--text);
}

button,
select,
a {
  font: inherit;
}

a {
  color: inherit;
}

button,
select {
  color: var(--text);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #10130c;
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.08;
  pointer-events: none;
}

.ambient-one {
  top: -240px;
  left: 12%;
  background: var(--accent);
}

.ambient-two {
  top: 380px;
  right: -280px;
  background: var(--accent-blue);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 48px));
  min-height: 80px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.brand-copy strong {
  font-size: 1.18rem;
  letter-spacing: -0.05em;
}

.brand-copy span {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.text-link,
.release-link,
footer a {
  color: var(--text-soft);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.text-link:hover,
.release-link:hover,
footer a:hover {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-preview {
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.08);
  color: var(--warning);
}

.page-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 40px;
  min-height: 0;
  padding: 0 0 30px;
}

.eyebrow,
.section-kicker {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.live-dot,
.data-health-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(199, 255, 74, 0.08);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.1rem);
  font-weight: 590;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.hero p {
  max-width: 720px;
  margin: 13px 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.hero-aside {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.sync-label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-aside time {
  display: block;
  font-size: 1rem;
  font-weight: 650;
}

.data-health {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.data-health-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.control-bar {
  position: sticky;
  z-index: 20;
  top: 12px;
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 0 0 36px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 16, 14, 0.86);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.control-bar label {
  display: grid;
  gap: 6px;
}

.control-bar label > span {
  padding-left: 3px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

select {
  min-width: 150px;
  height: 39px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 0.78rem;
}

select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.control-context {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 0 12px 10px 0;
  color: var(--text-soft);
  font-size: 0.73rem;
}

.divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.latest-release {
  margin-bottom: 20px;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(199, 255, 74, 0.055), transparent 42%),
    var(--surface);
}

.release-heading,
.panel-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.release-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.release-title-row h2,
.panel-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 580;
  letter-spacing: -0.035em;
}

.status-pill,
.table-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill::before,
.table-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pass {
  border-color: rgba(158, 230, 108, 0.26);
  background: rgba(158, 230, 108, 0.08);
  color: var(--success);
}

.status-fail {
  border-color: rgba(255, 120, 111, 0.28);
  background: rgba(255, 120, 111, 0.08);
  color: var(--danger);
}

.status-incomplete {
  border-color: rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.08);
  color: var(--warning);
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
}

.meta-chip strong {
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 500;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  position: relative;
  min-height: 160px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.kpi-primary {
  border-color: rgba(199, 255, 74, 0.19);
  background:
    radial-gradient(circle at 88% 14%, rgba(199, 255, 74, 0.13), transparent 36%),
    var(--surface);
}

.kpi-label {
  color: var(--text-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 22px;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 540;
  letter-spacing: -0.06em;
  line-height: 1;
}

.kpi-delta {
  min-height: 18px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.71rem;
  line-height: 1.4;
}

.delta-good {
  color: var(--success);
}

.delta-bad {
  color: var(--danger);
}

.delta-neutral {
  color: var(--text-muted);
}

.kpi-orbit {
  position: absolute;
  right: -30px;
  bottom: -48px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(199, 255, 74, 0.18);
  border-radius: 50%;
}

.kpi-orbit::before,
.kpi-orbit::after {
  position: absolute;
  border: 1px solid rgba(199, 255, 74, 0.1);
  border-radius: 50%;
  content: "";
}

.kpi-orbit::before {
  inset: 18px;
}

.kpi-orbit::after {
  inset: 36px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.trend-panel {
  padding: 28px 30px 20px;
}

.trend-panel-primary {
  margin-bottom: 20px;
  border-color: rgba(199, 255, 74, 0.16);
  background:
    radial-gradient(circle at 100% 0, rgba(123, 199, 255, 0.055), transparent 32%),
    var(--surface);
}

.trend-description {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.trend-controls {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.chart-filter {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chart-filter > span {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.chart-filter select {
  min-width: 190px;
}

.metric-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.metric-tab {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.metric-tab:hover {
  color: var(--text);
}

.metric-tab.active {
  background: var(--surface-soft);
  color: var(--text);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 24px;
  margin-top: 24px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.69rem;
}

.legend-swatch {
  width: 16px;
  height: 3px;
  border-radius: 999px;
}

.chart-container {
  min-height: 340px;
  margin-top: 8px;
}

.chart-container svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.chart-axis-label,
.chart-x-label {
  fill: var(--text-muted);
  font-size: 11px;
}

.chart-path {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.chart-hit-path {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
}

.chart-point {
  stroke: var(--surface);
  stroke-width: 2;
  cursor: pointer;
  transition: r 120ms ease;
}

.chart-point:hover {
  r: 6;
}

.chart-point:focus-visible {
  outline: none;
  stroke: var(--text);
  stroke-width: 4;
}

.chart-point-fail {
  stroke: var(--danger);
  stroke-width: 4;
}

.chart-point-incomplete {
  stroke: var(--warning);
  stroke-width: 4;
}

.chart-tooltip {
  pointer-events: none;
}

.chart-tooltip-guide {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.chart-tooltip-point {
  stroke: var(--text);
  stroke-width: 2;
}

.chart-tooltip-box {
  fill: #1a1e1b;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.42));
}

.chart-tooltip-heading {
  fill: var(--text-soft);
  font-size: 10px;
}

.chart-tooltip-value {
  fill: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.chart-tooltip-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.chart-tooltip-status-pass {
  fill: var(--success);
}

.chart-tooltip-status-fail {
  fill: var(--danger);
}

.chart-tooltip-status-incomplete {
  fill: var(--warning);
}

.chart-target {
  stroke: rgba(199, 255, 74, 0.25);
  stroke-width: 1;
  stroke-dasharray: 5 6;
}

.chart-target-label {
  fill: rgba(199, 255, 74, 0.65);
  font-size: 10px;
}

.chart-contract-boundary {
  stroke: rgba(255, 209, 102, 0.55);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.chart-contract-label {
  fill: var(--warning);
  font-size: 9px;
  font-weight: 700;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.scenario-section {
  padding: 66px 0 20px;
}

.section-heading {
  align-items: end;
  margin-bottom: 24px;
}

.section-heading p {
  max-width: 420px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: right;
}

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

.scenario-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.018), transparent 48%),
    var(--surface);
}

.scenario-card-fail {
  border-color: rgba(255, 120, 111, 0.25);
  background:
    linear-gradient(145deg, rgba(255, 120, 111, 0.05), transparent 48%),
    var(--surface);
}

.scenario-card-incomplete {
  border-color: rgba(255, 209, 102, 0.25);
}

.scenario-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.scenario-index {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.64rem;
}

.scenario-name h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.91rem;
  font-weight: 590;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 1.8rem;
  font-weight: 540;
  letter-spacing: -0.055em;
}

.scenario-score span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.scenario-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}

.scenario-stat {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.scenario-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scenario-stat strong {
  display: block;
  margin-top: 7px;
  font-size: 0.86rem;
  font-weight: 560;
}

.scenario-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.scenario-foot a {
  color: var(--text);
  font-weight: 620;
  text-decoration: none;
}

.history-panel {
  margin-top: 46px;
  padding: 28px 30px 10px;
}

.coverage-note {
  color: var(--text-muted);
  font-size: 0.71rem;
}

.table-wrap {
  margin-top: 20px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

th {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 17px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  white-space: nowrap;
}

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

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.release-cell {
  display: grid;
  gap: 4px;
}

.release-cell a {
  color: var(--text);
  font-weight: 590;
  text-decoration: none;
}

.release-cell span {
  color: var(--text-muted);
  font-size: 0.66rem;
}

.commit-link {
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-decoration: none;
}

.empty-state {
  min-height: 420px;
  padding: 80px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-icon {
  color: var(--accent);
  font-size: 3rem;
}

.empty-state h2 {
  margin: 18px 0 8px;
  font-size: 1.4rem;
}

.empty-state p {
  max-width: 440px;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.6;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.72rem;
}

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

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 0 0 34px;
}

.page-heading h1,
.execution-header h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 590;
  letter-spacing: -0.05em;
}

.page-heading p,
.execution-header p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.sync-block {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  text-align: right;
}

.sync-block span {
  color: var(--text-muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sync-block time {
  font-size: 0.78rem;
  font-weight: 600;
}

.execution-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 4px;
}

.efficiency-overview {
  margin-top: 24px;
  padding: 30px;
  overflow: hidden;
  border-color: rgba(123, 199, 255, 0.22);
  background:
    radial-gradient(circle at 100% 0, rgba(123, 199, 255, 0.09), transparent 28%),
    radial-gradient(circle at 0 100%, rgba(199, 255, 74, 0.045), transparent 34%),
    var(--surface);
}

.efficiency-heading {
  align-items: flex-start;
}

.efficiency-heading-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 24px;
}

.efficiency-result {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.efficiency-result > span {
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.efficiency-result-value {
  font-size: 0.78rem;
  font-weight: 700;
}

.efficiency-result small {
  color: var(--text-muted);
  font-size: 0.64rem;
}

.efficiency-baseline {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.efficiency-baseline > span {
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.efficiency-baseline strong {
  font-size: 0.72rem;
  font-weight: 650;
}

.efficiency-baseline small {
  color: var(--text-muted);
  font-size: 0.64rem;
}

.efficiency-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.efficiency-card {
  position: relative;
  min-width: 0;
  padding: 18px 18px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(10, 12, 11, 0.56);
}

.efficiency-card-label {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.efficiency-card > strong {
  display: block;
  margin-top: 9px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 590;
  letter-spacing: -0.045em;
}

.efficiency-delta {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.64rem;
}

.delta-improved {
  color: var(--success);
}

.delta-regressed {
  color: var(--danger);
}

.delta-neutral {
  color: var(--text-muted);
}

.efficiency-sparkline {
  height: 42px;
  margin-top: 10px;
  opacity: 0.88;
}

.efficiency-sparkline svg {
  display: block;
  width: 100%;
  height: 42px;
}

.efficiency-sparkline-area {
  opacity: 0.08;
}

.efficiency-sparkline-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.efficiency-baseline-value {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.efficiency-sparkline-baseline {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.6;
  vector-effect: non-scaling-stroke;
}

.efficiency-sparkline-hit {
  fill: transparent;
}

.efficiency-guardrail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(158, 230, 108, 0.2);
  border-radius: 10px;
  background: rgba(158, 230, 108, 0.045);
  color: var(--text-soft);
  font-size: 0.68rem;
}

.efficiency-guardrail-alert {
  border-color: rgba(255, 209, 102, 0.22);
  background: rgba(255, 209, 102, 0.045);
}

.guardrail-status {
  color: var(--success);
  font-weight: 750;
}

.efficiency-guardrail-alert .guardrail-status {
  color: var(--warning);
}

.efficiency-guardrail small {
  margin-left: auto;
  color: var(--text-muted);
}

.efficiency-table-wrap {
  margin-top: 18px;
}

.efficiency-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.efficiency-table th,
.efficiency-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.69rem;
  text-align: right;
  vertical-align: middle;
}

.efficiency-table thead th {
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.efficiency-table th:first-child,
.efficiency-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.efficiency-table th:last-child,
.efficiency-table td:last-child {
  padding-right: 0;
}

.efficiency-table tbody th > span,
.efficiency-table tbody th > small,
.efficiency-table td > span,
.efficiency-cell-muted {
  display: block;
}

.efficiency-table tbody th > span {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 650;
}

.scenario-history-button {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.scenario-history-button > span {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 140ms ease;
}

.scenario-history-button:hover > span {
  text-decoration-color: var(--accent-blue);
}

.scenario-history-button > small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.57rem;
  font-weight: 500;
}

.scenario-history-dialog {
  width: min(1080px, calc(100% - 32px));
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.65);
  color: var(--text);
}

.scenario-history-dialog::backdrop {
  background: rgba(2, 4, 3, 0.76);
  backdrop-filter: blur(5px);
}

.scenario-history-shell {
  max-height: 92vh;
  padding: 28px 30px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.scenario-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.scenario-history-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 610;
  letter-spacing: -0.035em;
}

.scenario-history-header p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.scenario-history-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.scenario-history-tabs,
.run-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.scenario-history-tabs button,
.run-tabs button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 650;
}

.scenario-history-tabs button:hover,
.scenario-history-tabs button.active,
.run-tabs button:hover,
.run-tabs button.active {
  border-color: rgba(199, 255, 74, 0.28);
  background: var(--accent-soft);
  color: var(--text);
}

.scenario-history-description {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.scenario-history-chart {
  min-height: 330px;
  margin-top: 20px;
  padding: 14px 10px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(10, 12, 11, 0.55);
}

.scenario-history-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.scenario-history-tooltip {
  pointer-events: none;
}

.scenario-history-table-wrap {
  margin-top: 18px;
}

.scenario-history-table {
  min-width: 720px;
}

.scenario-history-table td:nth-child(2),
.scenario-history-table th:nth-child(2),
.scenario-history-table td:nth-child(3),
.scenario-history-table th:nth-child(3) {
  text-align: right;
}

.scenario-history-contract {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.efficiency-table tbody th > small,
.efficiency-cell-muted,
.efficiency-cell-muted small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.57rem;
  font-weight: 500;
}

.efficiency-cell-delta {
  display: block;
  margin-top: 3px;
  font-size: 0.57rem;
}

.efficiency-trend {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
}

.trend-improved,
.trend-stable {
  border-color: rgba(158, 230, 108, 0.2);
  color: var(--success);
}

.trend-regressed,
.trend-non-comparable {
  border-color: rgba(255, 120, 111, 0.22);
  color: var(--danger);
}

.trend-mixed,
.trend-changed {
  border-color: rgba(255, 209, 102, 0.22);
  color: var(--warning);
}

.trend-new {
  border-color: rgba(123, 199, 255, 0.24);
  color: var(--accent-blue);
}

.trend-retired,
.trend-collecting {
  color: var(--text-muted);
}

.efficiency-row-retired td,
.efficiency-row-retired th {
  opacity: 0.62;
}

.section-divider-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0 14px;
}

.section-divider-heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.section-divider-heading p {
  max-width: 420px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.67rem;
  text-align: right;
}

.text-pass {
  color: var(--success);
}

.text-fail {
  color: var(--danger);
}

.text-incomplete {
  color: var(--warning);
}

.text-running {
  color: var(--accent-blue);
}

.text-cancelled {
  color: var(--text-soft);
}

.status-cancelled {
  border-color: rgba(168, 176, 169, 0.28);
  background: rgba(168, 176, 169, 0.08);
  color: var(--text-soft);
}

.status-running {
  border-color: rgba(123, 199, 255, 0.28);
  background: rgba(123, 199, 255, 0.08);
  color: var(--accent-blue);
}

.health-panel,
.executions-panel {
  margin-top: 20px;
  padding: 28px 30px;
}

.range-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.range-button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
}

.range-button:hover,
.range-button.active {
  background: var(--surface-soft);
  color: var(--text);
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.matrix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.matrix-key {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 800;
}

.matrix-key-score {
  width: 30px;
  font-size: 0.55rem;
}

.health-matrix-wrap {
  margin-top: 18px;
  padding-bottom: 78px;
  overflow-x: auto;
  scrollbar-color: var(--line-strong) transparent;
}

.health-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 5px;
  table-layout: fixed;
}

.health-matrix th,
.health-matrix td {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.health-matrix thead th {
  width: 56px;
  height: 54px;
  vertical-align: bottom;
}

.health-matrix thead th:first-child,
.health-matrix tbody th {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 210px;
  min-width: 210px;
  padding-right: 16px;
  background: var(--surface);
  text-align: left;
}

.health-matrix thead th:first-child {
  padding-bottom: 9px;
  color: var(--text-muted);
  font-size: 0.6rem;
}

.health-matrix thead a {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 650;
  text-decoration: none;
}

.matrix-run-status {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.health-matrix tbody th {
  height: 45px;
  border-bottom: 1px solid var(--line);
}

.health-matrix tbody th span,
.health-matrix tbody th strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-matrix tbody th span {
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.health-matrix tbody th strong {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 620;
  letter-spacing: 0;
  text-transform: none;
}

.health-matrix tbody td {
  width: 50px;
  height: 44px;
}

.matrix-cell {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 38px;
  margin: auto;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 850;
  text-decoration: none;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    filter 120ms ease;
}

.matrix-cell:hover {
  z-index: 4;
  filter: brightness(1.15);
  transform: translateY(-2px);
}

.matrix-cell::after {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 10px);
  left: 50%;
  width: 238px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #1a1e1b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  color: var(--text-soft);
  content: attr(data-tooltip);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: pre-line;
}

.matrix-cell:hover::after,
.matrix-cell:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.matrix-passed {
  border-color: rgba(158, 230, 108, 0.26);
  background: rgba(158, 230, 108, 0.11);
  color: var(--success);
}

.matrix-failed,
.matrix-hard_gate_failed,
.matrix-technical_failed,
.matrix-infra_failed {
  border-color: rgba(255, 120, 111, 0.3);
  background: rgba(255, 120, 111, 0.13);
  color: var(--danger);
}

.matrix-running {
  border-color: rgba(123, 199, 255, 0.3);
  background: rgba(123, 199, 255, 0.1);
  color: var(--accent-blue);
}

.matrix-incomplete {
  border-color: rgba(255, 209, 102, 0.3);
  background: rgba(255, 209, 102, 0.1);
  color: var(--warning);
}

.matrix-cancelled {
  border-color: rgba(168, 176, 169, 0.22);
  background: rgba(168, 176, 169, 0.07);
  color: var(--text-soft);
}

.matrix-empty {
  padding: 70px 20px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}

.executions-panel {
  margin-top: 24px;
}

.local-runner {
  min-width: 0;
  margin-bottom: 24px;
  padding: 28px 30px;
  overflow: hidden;
  border-color: rgba(199, 255, 74, 0.2);
  background:
    linear-gradient(135deg, rgba(199, 255, 74, 0.055), transparent 45%),
    var(--surface);
}

.local-runner > * {
  min-width: 0;
}

.local-runner-heading {
  align-items: flex-start;
}

.local-run-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.local-connection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.local-connection > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.local-connection code {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.local-connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.08);
}

.local-connection-dot.connected {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(158, 230, 108, 0.08);
}

.local-connection-dot.failed {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 120, 111, 0.08);
}

.local-run-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.local-field {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 650;
}

.local-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.local-field small {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
}

.local-field input,
.local-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
}

.local-field input:focus-visible,
.local-field select:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(199, 255, 74, 0.18);
}

.local-field input:disabled,
.local-field select:disabled {
  opacity: 0.55;
}

.local-field-wide {
  grid-column: span 2;
}

.local-scenario-picker {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-raised);
}

.local-scenario-picker > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.local-scenario-picker > summary::-webkit-details-marker {
  display: none;
}

.local-scenario-picker > summary strong {
  color: var(--text);
  font-size: 0.78rem;
}

.local-scenario-picker > summary span {
  color: var(--accent-blue);
  font-size: 0.7rem;
}

.local-scenario-picker[open] {
  border-color: var(--line-strong);
}

.local-scenario-picker.local-picker-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.local-scenario-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.local-scenario-toolbar button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 0.68rem;
}

.local-scenario-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  max-height: 250px;
  padding: 8px;
  overflow: auto;
}

.local-scenario-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border-radius: 7px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 550;
}

.local-scenario-option:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.local-scenario-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.local-scenario-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-advanced {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.local-advanced > summary {
  padding: 12px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 650;
}

.local-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 12px 12px;
}

.local-run-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  grid-column: span 2;
}

.local-run-submit {
  border-color: rgba(199, 255, 74, 0.45);
  background: var(--accent);
  color: #10130c;
}

.local-run-submit:hover {
  border-color: var(--accent);
  background: #d4ff71;
}

.local-run-error {
  margin: 16px 0 0;
  color: var(--danger);
  font-size: 0.78rem;
}

.local-run-log-shell {
  min-width: 0;
  margin-top: 18px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.local-run-log-shell summary {
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 650;
}

.local-run-log {
  width: 100%;
  max-width: 100%;
  max-height: 360px;
  margin: 12px 0 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #080a09;
  color: #cbd3cc;
  font-size: 0.7rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-filters {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.table-filters input {
  width: 280px;
  height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
}

.table-filters input::placeholder {
  color: var(--text-muted);
}

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

.comparison-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(123, 199, 255, 0.2);
  border-radius: 10px;
  background: rgba(123, 199, 255, 0.045);
}

.comparison-bar div {
  display: grid;
  gap: 2px;
}

.comparison-bar strong {
  font-size: 0.78rem;
}

.comparison-bar span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.comparison-bar a[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
}

.execution-identity-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.execution-compare-control {
  display: grid;
  place-items: center;
}

.execution-compare-control input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.compare-shell {
  min-width: 0;
  width: min(1440px, calc(100% - 48px));
}

.compare-content {
  min-width: 0;
}

.compare-content > .panel {
  min-width: 0;
  padding: 28px 30px;
  overflow: hidden;
}

.compare-selection-grid,
.compare-metric-grid {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.compare-selection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.compare-selection-card,
.compare-metric-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.compare-selection-card {
  display: grid;
  gap: 8px;
}

.compare-selection-card span,
.compare-selection-card small,
.compare-metric-card span,
.compare-metric-card small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.compare-selection-card h2 {
  margin: 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.compare-selection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.compare-selection-meta small,
.compare-selection-card .text-link {
  overflow-wrap: anywhere;
}

.compare-warning-list {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.compare-warning-list li {
  padding: 9px 11px;
  border-left: 2px solid var(--warning);
  background: rgba(255, 209, 102, 0.055);
  color: var(--text-soft);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.compare-metric-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 18px;
}

.compare-metric-card {
  display: grid;
  gap: 7px;
  overflow: hidden;
}

.compare-metric-values {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  gap: 7px;
}

.compare-metric-values strong,
.compare-metric-values small,
.compare-delta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.compare-metric-values strong {
  font-size: 1rem;
}

.compare-delta {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.compare-delta-improved {
  color: var(--success);
}

.compare-delta-regressed {
  color: var(--danger);
}

.compare-table {
  min-width: 1220px;
}

.compare-scenario-name {
  display: grid;
  gap: 3px;
}

.compare-scenario-name span {
  color: var(--text-muted);
  font-size: 0.66rem;
}

.comparison-contract {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.65rem;
}

.comparison-contract-changed {
  border-color: rgba(255, 209, 102, 0.3);
  color: var(--warning);
}

.execution-table {
  min-width: 1320px;
}

.data-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.64rem;
  font-weight: 680;
}

.data-full {
  border-color: rgba(123, 199, 255, 0.25);
  background: rgba(123, 199, 255, 0.08);
  color: var(--accent-blue);
}

.data-aggregate {
  color: var(--text-soft);
}

.data-unavailable {
  border-color: rgba(255, 209, 102, 0.24);
  color: var(--warning);
}

.table-empty {
  padding: 54px 20px;
  color: var(--text-muted);
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 0 4px;
}

.pagination button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.71rem;
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.4;
}

.pagination span {
  min-width: 92px;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-align: center;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.breadcrumbs a {
  color: var(--text-soft);
  text-decoration: none;
}

.detail-loading {
  min-height: 420px;
  padding: 100px 0;
  color: var(--text-muted);
  text-align: center;
}

.execution-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 30px;
}

.execution-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.execution-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-alert {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid rgba(255, 120, 111, 0.26);
  border-radius: var(--radius-md);
  background: rgba(255, 120, 111, 0.055);
}

.detail-alert h2 {
  margin: 0;
  color: var(--danger);
  font-size: 1rem;
}

.detail-alert ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-alert li {
  display: grid;
  gap: 3px;
}

.detail-alert a {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none;
}

.detail-alert span,
.detail-alert p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.45;
}

#detail-failures {
  scroll-margin-top: 24px;
}

.failure-groups {
  display: grid;
  gap: 8px;
}

.failure-chip {
  display: grid;
  grid-template-columns: auto minmax(140px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 120, 111, 0.2);
  border-radius: 9px;
  background: rgba(255, 120, 111, 0.04);
  color: var(--text);
  font-size: 0.7rem;
  text-decoration: none;
}

.failure-chip:hover {
  border-color: rgba(255, 120, 111, 0.45);
}

.failure-chip strong {
  font-size: 0.72rem;
  font-weight: 650;
}

.failure-chip-message {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.failure-overflow {
  margin-top: 10px;
}

.failure-overflow > summary {
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 650;
}

.failure-overflow[open] > summary {
  margin-bottom: 10px;
}

.section-disclosure {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.section-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.section-disclosure > summary::-webkit-details-marker {
  display: none;
}

.section-digest {
  color: var(--text-soft);
  font-size: 0.71rem;
}

.section-chevron,
.scenario-chevron {
  color: var(--text-muted);
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.section-disclosure[open] .section-chevron,
.scenario-detail-card[open] .scenario-chevron {
  transform: rotate(180deg);
}

.section-disclosure > .metadata-grid,
.section-disclosure > #configuration-content {
  padding: 0 18px 18px;
}

.detail-kpis {
  margin-bottom: 34px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
  gap: 42px;
}

.detail-index {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.detail-index > span {
  padding: 4px 8px 9px;
  color: var(--text-muted);
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-index a {
  padding: 8px;
  border-radius: 7px;
  color: var(--text-soft);
  font-size: 0.71rem;
  text-decoration: none;
}

.detail-index a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.detail-main {
  min-width: 0;
}

.detail-section {
  scroll-margin-top: 24px;
  padding: 32px 0 54px;
  border-top: 1px solid var(--line);
}

.detail-section:first-child {
  border-top: 0;
}

.detail-section > h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 580;
  letter-spacing: -0.04em;
}

.section-description {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.metadata-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.metadata-item > span {
  color: var(--text-muted);
  font-size: 0.61rem;
  font-weight: 680;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.metadata-item strong,
.metadata-item a {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.73rem;
  font-weight: 570;
  line-height: 1.45;
  text-decoration: none;
  text-overflow: ellipsis;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

.config-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.config-card > span {
  color: var(--text-muted);
  font-size: 0.61rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.config-card h3 {
  margin: 8px 0 20px;
  font-size: 1rem;
  font-weight: 590;
}

.config-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.config-card dl div {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.config-card dt {
  color: var(--text-muted);
  font-size: 0.58rem;
}

.config-card dd {
  margin: 5px 0 0;
  font-size: 0.7rem;
}

.config-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.scenario-details {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.scenario-detail-card {
  scroll-margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  content-visibility: auto;
  contain-intrinsic-size: auto 64px;
}

.scenario-detail-card[open] {
  border-color: var(--line-strong);
}

.scenario-summary-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto auto auto auto auto;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 12px 22px;
  cursor: pointer;
  list-style: none;
}

.scenario-summary-row::-webkit-details-marker {
  display: none;
}

.scenario-summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.scenario-summary-copy strong {
  font-size: 0.94rem;
  font-weight: 590;
}

.scenario-summary-copy small {
  color: var(--text-muted);
  font-size: 0.62rem;
}

.scenario-summary-stat {
  display: grid;
  gap: 2px;
  text-align: right;
}

.scenario-summary-stat small {
  color: var(--text-muted);
  font-size: 0.56rem;
  font-weight: 680;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scenario-summary-stat strong {
  font-size: 0.74rem;
  font-weight: 600;
}

.scenario-detail-body {
  padding: 0 22px 22px;
  border-top: 1px solid var(--line);
}

.scenario-detail-card h3 {
  margin: 4px 0 0;
  font-size: 1.08rem;
  font-weight: 590;
}

.scenario-detail-metrics,
.run-overview,
.usage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 20px;
}

.detail-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.detail-metric > span {
  display: block;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 680;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-metric strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  font-size: 0.84rem;
  font-weight: 580;
  text-overflow: ellipsis;
}

.detail-metric small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.57rem;
}

.aggregate-expired,
.clean-state {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.run-list {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.run-detail {
  scroll-margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  content-visibility: auto;
  contain-intrinsic-size: auto 64px;
}

.run-detail[open] {
  border-color: var(--line-strong);
}

.run-detail > summary {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.7rem;
  list-style: none;
}

.run-detail > summary::-webkit-details-marker {
  display: none;
}

.run-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.62rem;
}

.run-summary-copy {
  display: grid;
  gap: 3px;
}

.run-summary-copy strong {
  color: var(--text);
  font-size: 0.75rem;
}

.run-summary-copy small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.run-summary-error {
  color: var(--danger);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 650;
}

.run-content {
  padding: 4px 18px 22px;
  border-top: 1px solid var(--line);
}

.detail-loading-inline {
  padding: 24px 0 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.run-overview {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.run-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

/* The authored display would otherwise override the UA [hidden] rule and
   show every tab panel at once. */
.run-sections[hidden] {
  display: none;
}

.run-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.run-section-wide {
  grid-column: 1 / -1;
}

.run-section h5 {
  margin: 0 0 13px;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.diagnostic-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.diagnostic-list li {
  padding: 10px;
  border-left: 2px solid var(--danger);
  background: rgba(255, 120, 111, 0.04);
}

.diagnostic-list span {
  color: var(--danger);
  font-size: 0.58rem;
  font-weight: 720;
  text-transform: uppercase;
}

.diagnostic-list p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 0.68rem;
  line-height: 1.5;
}

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

.diagnostic-table {
  min-width: 620px;
  font-size: 0.67rem;
}

.diagnostic-table th {
  padding: 9px;
  font-size: 0.56rem;
}

.diagnostic-table td {
  padding: 11px 9px;
  font-size: 0.65rem;
  vertical-align: top;
}

.diagnostic-table .wrap-cell {
  min-width: 260px;
  white-space: normal;
  line-height: 1.5;
}

.usage-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.retry-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.retry-card + .retry-card {
  margin-top: 8px;
}

.retry-card > header,
.retry-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.retry-card strong {
  font-size: 0.7rem;
}

.retry-meta {
  justify-content: flex-start;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.prompt-block,
.conversation-payload pre,
.nested-raw pre,
.raw-details pre {
  max-height: 560px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b0a;
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.64rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-block.is-clamped {
  max-height: 260px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 72%, transparent);
  mask-image: linear-gradient(to bottom, black 72%, transparent);
}

.prompt-expand {
  min-height: 32px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 650;
}

.prompt-expand:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.conversation-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(123, 199, 255, 0.2);
  border-radius: 10px;
  background: rgba(123, 199, 255, 0.035);
}

.conversation-launch > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.conversation-launch span {
  color: var(--text-muted);
  font-size: 0.55rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.conversation-launch strong {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 620;
}

.conversation-launch small {
  overflow: hidden;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.57rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-launch small.has-errors {
  color: var(--danger);
}

.conversation-open {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 680;
  white-space: nowrap;
}

.conversation-open:hover {
  border-color: rgba(199, 255, 74, 0.35);
  background: var(--accent-soft);
}

.session-transcript-dialog {
  width: min(1040px, calc(100% - 32px));
  height: min(900px, 92dvh);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.68);
  color: var(--text);
}

.session-transcript-dialog::backdrop {
  background: rgba(2, 4, 3, 0.78);
  backdrop-filter: blur(5px);
}

.session-transcript-shell {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.session-transcript-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.session-transcript-header h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 610;
  letter-spacing: -0.025em;
}

.session-transcript-header p {
  max-width: 760px;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-transcript-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.session-transcript-body {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.conversation-shell {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.conversation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.conversation-stats,
.conversation-actions,
.conversation-filters {
  display: flex;
  align-items: center;
  gap: 7px;
}

.conversation-stats span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.6rem;
}

.conversation-stats strong {
  color: var(--text-soft);
  font-size: 0.68rem;
}

.conversation-stats .has-errors {
  border-color: rgba(255, 120, 111, 0.35);
  color: var(--danger);
  background: rgba(255, 120, 111, 0.06);
}

.conversation-stats .has-errors strong {
  color: var(--danger);
}

.conversation-filter,
.conversation-next-error {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 650;
}

.conversation-filter:hover,
.conversation-next-error:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--text);
}

.conversation-filter.is-active {
  border-color: rgba(199, 255, 74, 0.28);
  background: var(--accent-soft);
  color: var(--accent);
}

.conversation-next-error {
  border-color: rgba(255, 120, 111, 0.3);
  color: var(--danger);
}

.conversation-next-error:disabled {
  border-color: var(--line);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.conversation-error-position {
  min-height: 0;
  padding: 0 16px;
  color: var(--danger);
  font-size: 0.58rem;
  text-align: right;
}

.conversation-error-position:not(:empty) {
  padding-top: 8px;
}

.conversation-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 30px;
  padding: 30px 28px 38px;
  overflow-y: auto;
}

.conversation-list::before {
  display: none;
}

.conversation-event {
  position: relative;
  width: min(760px, 100%);
  margin-inline: auto;
  scroll-margin: 90px 0;
}

.conversation-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conversation-user {
  align-items: flex-end;
}

.conversation-card {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
}

.conversation-user .conversation-card {
  align-items: flex-end;
}

.conversation-card header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
}

.conversation-card header strong {
  color: var(--text-muted);
  font-size: 0.63rem;
  letter-spacing: 0.06em;
}

.conversation-card header strong span {
  color: var(--accent);
  font-size: 0.72rem;
}

.conversation-card header span {
  color: var(--text-muted);
  font-size: 0.55rem;
}

.conversation-copy {
  padding-right: 4px;
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
}

.conversation-copy strong {
  color: var(--text);
  font-weight: 700;
}

.conversation-copy code {
  padding: 1px 4px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
}

.conversation-user .conversation-copy {
  max-width: 80%;
  padding: 4px 4px 4px 16px;
  border-left: 1px solid var(--line-strong);
}

.conversation-tool {
  border: 1px solid var(--line);
  background: var(--surface);
}

.conversation-tool > summary {
  display: grid;
  grid-template-columns: 16px minmax(160px, 1fr) auto 16px;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  transition: background 140ms ease;
}

.conversation-tool > summary:hover {
  background: rgba(255, 255, 255, 0.025);
}

.conversation-tool > summary::-webkit-details-marker {
  display: none;
}

.conversation-tool-icon {
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 800;
}

.conversation-tool-name {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.conversation-tool-name small {
  color: var(--text-muted);
  font-size: 0.66rem;
  white-space: nowrap;
}

.conversation-tool-name small i {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 750;
}

.conversation-tool-name strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 580;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-tool-name strong em {
  color: var(--text-muted);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 500;
}

.conversation-tool-status {
  color: var(--success);
  font-size: 0.58rem;
  font-weight: 680;
}

.conversation-chevron {
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: transform 140ms ease;
}

.conversation-tool[open] .conversation-chevron {
  transform: rotate(180deg);
}

.conversation-tool-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 11px 11px 37px;
  border-top: 1px solid var(--line);
}

.conversation-payload {
  min-width: 0;
  padding-top: 11px;
}

.conversation-payload > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.conversation-payload pre {
  max-height: 320px;
  min-height: 100%;
  padding: 11px;
  border-radius: 7px;
  font-size: 0.61rem;
}

.conversation-tool-error {
  border-color: rgba(255, 120, 111, 0.45);
  background: rgba(255, 120, 111, 0.035);
  box-shadow: inset 3px 0 0 rgba(255, 120, 111, 0.65);
}

.conversation-tool-error .conversation-tool-icon {
  color: var(--danger);
}

.conversation-tool-error .conversation-tool-status,
.conversation-payload-error > span {
  color: var(--danger);
}

.conversation-payload-error pre {
  border-color: rgba(255, 120, 111, 0.25);
  background: rgba(255, 120, 111, 0.045);
}

.conversation-focus-error {
  animation: conversation-error-focus 1.6s ease;
}

@keyframes conversation-error-focus {
  0%,
  100% {
    box-shadow: inset 3px 0 0 rgba(255, 120, 111, 0.65);
  }
  45% {
    box-shadow:
      inset 3px 0 0 var(--danger),
      0 0 0 3px rgba(255, 120, 111, 0.2);
  }
}

.conversation-shell[data-filter="messages"] .conversation-event[data-kind="tool"],
.conversation-shell[data-filter="errors"] .conversation-event:not([data-error="true"]) {
  display: none;
}

.conversation-empty-filter {
  display: none;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.66rem;
  text-align: center;
}

.conversation-filter-empty .conversation-empty-filter {
  display: block;
}

.nested-raw {
  color: var(--text-soft);
  font-size: 0.67rem;
}

.nested-raw summary,
.raw-details summary {
  padding: 8px 0;
  cursor: pointer;
}

.raw-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.raw-details {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 0.7rem;
}

.raw-details pre {
  max-height: 720px;
}

@media (max-width: 1120px) {
  .compare-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .local-run-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-primary {
    grid-column: span 2;
  }

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

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

  .run-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .local-scenario-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .local-connection {
    align-items: stretch;
    flex-direction: column;
  }
  .compare-selection-grid {
    grid-template-columns: 1fr;
  }

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

  .comparison-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .comparison-bar .button {
    justify-content: center;
  }
  .topbar,
  .page-shell,
  footer {
    width: min(100% - 30px, 1320px);
  }

  .topbar {
    min-height: 70px;
    gap: 12px;
  }

  .brand-copy span,
  .topbar .text-link {
    display: none;
  }

  .page-shell {
    padding-top: 42px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 42px;
  }

  .hero-aside {
    max-width: 440px;
  }

  .control-bar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  select {
    width: 100%;
    min-width: 0;
  }

  .control-context {
    grid-column: 1 / -1;
    margin-left: 0;
    padding: 4px 4px 2px;
  }

  .release-heading,
  .panel-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .kpi-primary {
    grid-column: 1 / -1;
  }

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

  .section-heading p {
    text-align: left;
  }

  .trend-controls {
    width: 100%;
    justify-items: start;
  }

  .page-heading,
  .execution-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sync-block {
    text-align: left;
  }

  .health-panel,
  .efficiency-overview,
  .executions-panel {
    padding: 22px 18px;
  }

  .efficiency-baseline {
    justify-items: start;
    text-align: left;
  }

  .efficiency-heading-meta {
    width: 100%;
    justify-content: space-between;
  }

  .efficiency-result {
    justify-items: start;
    text-align: left;
  }

  .section-divider-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-divider-heading p {
    text-align: left;
  }

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

  .search-field,
  .table-filters input {
    width: 100%;
    grid-column: 1 / -1;
  }

  .detail-alert {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-index {
    position: static;
    display: flex;
    flex-wrap: wrap;
  }

  .detail-index > span {
    width: 100%;
  }

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

  .scenario-detail-metrics,
  .usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .conversation-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-actions {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .local-runner {
    padding: 22px 18px;
  }

  .compare-content > .panel {
    padding: 22px 18px;
  }

  .local-run-form,
  .local-advanced-grid,
  .compare-metric-grid {
    grid-template-columns: 1fr;
  }

  .local-field-wide,
  .local-run-actions {
    grid-column: span 1;
  }

  .local-run-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .local-scenario-options {
    grid-template-columns: 1fr;
  }
  .topbar-actions {
    gap: 8px;
  }

  .badge-preview {
    display: none;
  }

  .button {
    padding: 0 10px;
  }

  .topbar-actions .button {
    font-size: 0;
  }

  .topbar-actions .button::before {
    font-size: 0.72rem;
    content: "Actions";
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .control-bar {
    grid-template-columns: 1fr;
  }

  .control-context {
    grid-column: 1;
  }

  .latest-release,
  .trend-panel,
  .history-panel {
    padding: 22px 18px;
  }

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

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

  .efficiency-guardrail {
    align-items: flex-start;
    flex-direction: column;
  }

  .efficiency-guardrail small {
    margin-left: 0;
  }

  .scenario-history-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .scenario-history-shell {
    max-height: 100dvh;
    padding: 22px 18px 28px;
  }

  .scenario-history-chart {
    min-height: 260px;
    padding-inline: 0;
  }

  .session-transcript-dialog {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .session-transcript-header {
    padding: 18px 16px 15px;
  }

  .session-transcript-header p {
    white-space: normal;
  }

  .conversation-launch {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-open {
    width: 100%;
  }

  .kpi-primary {
    grid-column: auto;
  }

  .conversation-toolbar,
  .conversation-actions {
    align-items: stretch;
  }

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

  .conversation-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .conversation-filter,
  .conversation-next-error {
    width: 100%;
  }

  .conversation-list {
    gap: 26px;
    padding: 22px 16px 30px;
  }

  .conversation-list::before {
    top: 14px;
    bottom: 20px;
    left: 25px;
  }

  .conversation-message {
    gap: 7px;
  }

  .conversation-user .conversation-copy {
    max-width: 92%;
  }

  .conversation-tool {
    margin-left: 0;
  }

  .conversation-tool > summary {
    grid-template-columns: 16px minmax(110px, 1fr) auto 14px;
    gap: 8px;
  }

  .conversation-tool-body {
    grid-template-columns: 1fr;
    padding-left: 11px;
  }

  .panel-heading {
    gap: 18px;
  }

  .metric-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .chart-filter {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  .chart-filter select {
    width: 100%;
  }

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

  .metadata-grid,
  .config-grid,
  .config-facts,
  .scenario-detail-metrics,
  .run-overview,
  .usage-grid,
  .run-sections {
    grid-template-columns: 1fr;
  }

  .run-detail > summary {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .run-detail > summary > span:nth-child(3),
  .run-detail > summary > span:nth-child(4) {
    display: none;
  }

  .scenario-summary-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .scenario-summary-row > .scenario-summary-stat {
    display: none;
  }

  .failure-chip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .failure-chip-message {
    display: none;
  }

  .run-section-wide {
    grid-column: auto;
  }

  .health-matrix thead th:first-child,
  .health-matrix tbody th {
    width: 160px;
    min-width: 160px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

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