:root {
  /* Shell fallback tokens — aligned to the Hub v3 warm teal direction. */
  --bg-top: #f7f3ec;
  --bg-bottom: #f1ebe1;
  --ink: #171813;
  --muted: #666358;
  --panel: #fffcf6;
  --panel-strong: #f1ebe1;
  --panel-border: #e1d8c8;
  --panel-border-hi: #cfc4b1;
  --line-soft: rgba(101, 91, 76, 0.08);
  --accent: #1f7a72;
  --accent-strong: #15514c;
  --accent-soft: rgba(31, 122, 114, 0.12);
  --accent-glow: rgba(31, 122, 114, 0.18);
  --teal: #1f7a72;
  --teal-strong: #15514c;
  --teal-soft: rgba(31, 122, 114, 0.12);
  --code: #111511;
  --code-ink: #f7f3e9;
  /* Tighter radii matching v2 */
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  /* Warm, restrained shadows for panel depth. */
  --shadow-lg: 0 12px 30px rgba(45, 36, 22, 0.07), 0 1px 5px rgba(45, 36, 22, 0.05);
  --shadow-md: 0 8px 20px rgba(45, 36, 22, 0.06), 0 1px 4px rgba(45, 36, 22, 0.04);
  --shadow-sm: 0 1px 3px rgba(45, 36, 22, 0.05);
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  /* Keep --serif for any legacy references, maps to Inter Tight */
  --serif: "Inter Tight", -apple-system, sans-serif;
  /* Sidebar dark palette (used in PR 2 for sidebar shell) */
  --sb: #101211;
  --sb-b: #30362f;
  --sb-t: #eeece4;
  --sb-m: #8f897b;
  --sb-h: #171a18;
  --sb-a: #1d211f;
}

.coverage-intelligence {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  border-color: color-mix(in srgb, var(--color-accent) 30%, var(--color-border));
}

.coverage-intelligence-heading,
.coverage-compute-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}

.coverage-intelligence-heading h3,
.coverage-intelligence-heading p,
.coverage-compute-heading h4,
.coverage-compute-heading p {
  margin: 0;
}

.coverage-intelligence-heading p,
.coverage-compute-heading p {
  max-width: 58ch;
  color: var(--color-text-muted);
}

.coverage-surface-row small,
.coverage-compute-action small {
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

.coverage-decision-funnel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr) auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.coverage-decision-funnel > div {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.coverage-decision-funnel strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.coverage-decision-funnel span,
.coverage-decision-funnel > i {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.corpus-shape-chart {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.corpus-shape-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 1.2fr) 44px;
  align-items: center;
  gap: 10px;
}

.corpus-shape-row > span {
  display: grid;
  gap: 1px;
}

.corpus-shape-row small {
  color: var(--color-text-muted);
  font-size: 0.68rem;
}

.corpus-shape-row > i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-surface-muted);
}

.corpus-shape-row > i > b {
  display: block;
  width: var(--corpus-share);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), var(--color-positive));
}

.corpus-shape-row > b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.coverage-readiness-details {
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
}

.coverage-readiness-details > summary {
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.coverage-readiness-details[open] > summary {
  margin-bottom: 10px;
}

.coverage-readiness-breakdown {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.coverage-readiness-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.coverage-readiness-heading > div,
.coverage-readiness-row > span {
  display: grid;
  gap: 2px;
}

.coverage-readiness-heading small,
.coverage-readiness-row small,
.coverage-readiness-breakdown > small,
.coverage-missing-checks {
  color: var(--color-text-muted);
  font-size: 0.72rem;
}

.coverage-readiness-heading > b {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.coverage-readiness-chart {
  display: grid;
  gap: 8px;
}

.coverage-readiness-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(140px, 1.5fr) 36px;
  align-items: center;
  gap: 12px;
}

.coverage-readiness-row > i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-border) 58%, transparent);
}

.coverage-readiness-row > i > b {
  display: block;
  width: var(--blocker-share);
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--color-accent) 62%, var(--color-text-muted));
}

.coverage-readiness-row > b {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.coverage-surface-chart {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.coverage-surface-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(150px, 2fr) auto;
  align-items: center;
  gap: 12px;
}

.coverage-surface-row > span:first-child {
  display: grid;
  gap: 2px;
}

.coverage-surface-row > i {
  position: relative;
  display: block;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-border) 58%, transparent);
}

.coverage-surface-row > i::before,
.coverage-surface-row > i > b {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  content: "";
}

.coverage-surface-row > i::before {
  width: var(--observed-share);
  background: color-mix(in srgb, var(--color-accent) 38%, var(--color-surface-muted));
}

.coverage-surface-row > i > b {
  width: var(--decision-share);
  background: var(--color-accent);
}

.coverage-known-gaps {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 24%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-accent) 7%, var(--color-surface));
}

.coverage-known-gaps span {
  color: var(--color-text-muted);
}

.coverage-compute-actions {
  display: grid;
  gap: 8px;
}

.coverage-compute-action {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.coverage-compute-action > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.coverage-compute-action p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.coverage-missing-checks {
  display: block;
}

.coverage-compute-rank {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 14%, var(--color-surface));
  color: var(--color-accent);
  font-weight: 900;
}

.coverage-classification-details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.coverage-classification-details summary {
  padding: 11px 13px;
}

.coverage-classification-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 13px 13px;
}

.coverage-classification-body > div {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.coverage-classification-body h5 {
  margin: 0 0 8px;
}

.coverage-classification-body p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 5px 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.coverage-classification-body p strong {
  color: var(--color-text);
}

@media (max-width: 720px) {
  .coverage-intelligence-heading,
  .coverage-compute-heading {
    display: grid;
    gap: 8px;
  }

  .coverage-decision-funnel {
    grid-template-columns: 1fr;
  }

  .coverage-decision-funnel > i {
    display: none;
  }

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

  .corpus-shape-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .corpus-shape-row > i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .coverage-readiness-heading {
    display: grid;
    gap: 4px;
  }

  .coverage-readiness-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .coverage-readiness-row > i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .coverage-surface-row > i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .coverage-compute-action {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .coverage-compute-action > span:not(.coverage-compute-rank),
  .coverage-compute-action > button {
    grid-column: 2;
    justify-self: start;
  }

  .coverage-classification-body {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Inter Tight", -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-top);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  width: min(1500px, calc(100vw - 32px));
  box-sizing: border-box;
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.95fr);
  gap: 20px;
  margin-bottom: 18px;
  animation: reveal-up 520ms ease both;
}

.hero-copy,
.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow-md);
}

.hero-copy {
  padding: 28px 30px;
  background: var(--panel);
  animation: reveal-up 600ms ease both;
}

.hero-copy::after,
.panel::before {
  /* Removed decorative corner glow — cleaner v2 aesthetic */
  display: none;
}

.hero-stack {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 24px;
  animation: reveal-up 620ms ease both;
}

.panel-compact {
  padding: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9.5px;
  font-weight: 700;
}

.hero h1,
.panel h2,
.subheading h3,
.preview-header h3,
.handoff-header h4,
.result-card h4,
.run-config-card h4 {
  margin: 0;
  font-family: "Inter Tight", -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.hero h1 {
  max-width: 20ch;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.028em;
}

.hero-text,
.panel-meta,
.subheading p,
.preview-header p,
.empty-state p,
.handoff-header p,
.story-summary p,
.workflow-mini-card p,
.story-rail-card p,
.muted {
  color: var(--muted);
}

.warn-text {
  color: var(--accent-strong);
}

.hero-text {
  max-width: 66ch;
  margin: 18px 0 20px;
  font-size: 1.07rem;
  line-height: 1.65;
}

.hero-badges,
.chip-row,
.button-row,
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badge,
.chip,
.status-pill,
.preset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.hero-badge {
  background: rgba(255, 248, 240, 0.88);
  border-color: rgba(14,16,10,0.12);
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(14,16,10,0.07);
}

.panel-heading,
.preview-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.status-pill.syncing {
  background: rgba(120, 93, 20, 0.14);
  color: #6f5514;
}

.status-pill.connected {
  background: var(--teal-soft);
  color: var(--color-accent, #0b7d79);
}

.status-pill.syncing::before,
.status-pill.connected::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.syncing::before {
  animation: pulse-dot 1.1s ease-in-out infinite;
}

.inline-form {
  display: flex;
  gap: 10px;
}

input,
select {
  width: 100%;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 125, 121, 0.12);
}

button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  background: var(--accent);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transition: background 120ms ease, border-color 120ms ease;
}

button:hover {
  background: var(--accent-strong);
}

button:active {
  transform: translateY(1px);
}

.preset-button {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--panel-border-hi);
  box-shadow: var(--shadow-sm);
}

.preset-button.is-active,
.preset-button:hover {
  color: #fff;
  border-color: transparent;
  background: var(--accent);
  box-shadow: none;
}

.workflow-panel {
  background: var(--panel);
}

.workflow-mini {
  display: grid;
  gap: 10px;
}

.workflow-mini-card,
.story-rail-card,
.signal-card,
.stat-card,
.result-card,
.run-config-card,
.config-summary-card,
.handoff-card,
.story-highlight,
.metric,
.field-group {
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.workflow-mini-card {
  padding: 14px;
}

.workflow-mini-card span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.workflow-mini-card strong,
.story-rail-card span {
  display: block;
  font-size: 1rem;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stats-panel .signal-strip {
  margin: 12px 0 0;
}

.next-action-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 20px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.next-action-rail h2,
.next-action-rail p {
  margin: 0;
}

.next-action-rail .eyebrow {
  margin-bottom: 6px;
}

.next-action-rail.tone-good {
  border-color: rgba(11,125,121,0.22);
}

.next-action-rail.tone-warn {
  border-color: rgba(128, 75, 49, 0.24);
}

.public-mode-boundary {
  margin-bottom: 18px;
}

body.is-focused-surface .public-mode-boundary {
  display: none;
}

.public-mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(14,16,10,0.1);
  border-radius: var(--radius-xl);
  background: var(--color-surface-strong);
}

.public-mode-card h2,
.public-mode-card p {
  margin: 0;
}

.public-mode-card .eyebrow {
  margin-bottom: 6px;
}

.public-mode-card p {
  margin-top: 6px;
  color: var(--color-text-muted);
}

.workspace-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dashboard-tabs {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  animation: reveal-up 640ms ease both;
}

.mobile-dashboard-tabs-toggle {
  display: none;
}

.mobile-menu-heading,
.mobile-menu-links {
  display: none;
}

.dashboard-tab {
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
}

.dashboard-tab:hover {
  background: var(--panel-strong);
  color: var(--ink);
}

.dashboard-tab.is-active {
  color: var(--ink);
  font-weight: 600;
  background: var(--panel-strong);
  box-shadow: none;
}

.signal-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
  animation: reveal-up 640ms ease both;
}

.signal-card::after {
  display: none;
}

.signal-card label,
.config-summary-card label,
.metric label,
.story-kicker {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.signal-card strong,
.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  line-height: 1;
}

.signal-card p,
.stat-card span {
  margin: 10px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.18fr 1.18fr 0.94fr;
  gap: 16px;
}

.stats-panel,
.recommendation-panel,
.explore-overview-panel,
.results-panel,
.methodology-panel,
.builder-panel,
.compare-panel {
  grid-column: span 2;
  min-width: 0;
}

.runs-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.detail-panel {
  grid-column: 1 / -1;
}

.compare-panel,
.family-panel {
  grid-column: 1 / -1;
}

.story-panel,
.run-configs-panel,
.community-panel {
  grid-column: 3;
}

.my-runs-panel {
  grid-column: 1 / -1;
}

.story-summary {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin-bottom: 16px;
}

.story-highlight {
  padding: 18px;
  background: var(--panel);
  animation: reveal-up 660ms ease both;
}

.story-highlight h3 {
  margin: 8px 0 10px;
  font-size: 1.4rem;
  line-height: 1.1;
}

.story-highlight ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.story-highlight li {
  margin-bottom: 8px;
  color: var(--muted);
}

.methodology-panel {
  display: grid;
  gap: 18px;
}

.methodology-hero {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
}

.methodology-hero h2,
.methodology-hero p,
.methodology-card h3,
.methodology-card p,
.methodology-lanes h3,
.methodology-lanes dd {
  margin: 0;
}

.methodology-hero h2 {
  max-width: 760px;
  font-size: clamp(1.55rem, 2vw, 2.15rem);
  line-height: 1.04;
}

.methodology-hero p {
  max-width: 840px;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

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

.methodology-card,
.methodology-lanes {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

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

.methodology-card h3,
.methodology-lanes h3 {
  color: var(--color-text);
  font-size: 1.08rem;
  line-height: 1.18;
}

.methodology-card p,
.methodology-lanes dd {
  color: var(--color-text-muted);
  line-height: 1.48;
}

.methodology-lanes {
  display: grid;
  gap: 14px;
}

.methodology-lanes-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

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

.methodology-lanes dl > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-strong);
}

.methodology-lanes dt {
  margin: 0 0 5px;
  color: var(--color-text);
  font-weight: 900;
  line-height: 1.25;
}

.story-rail {
  display: grid;
  gap: 12px;
}

.story-rail-card {
  padding: 14px;
}

.stats-grid,
.card-grid,
.recommendation-columns,
.filters-grid,
.builder-grid,
.config-summary-grid,
.metric-grid {
  display: grid;
  gap: 14px;
}

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

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

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

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

.catalog-leads {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

/* The count chip is a flex sibling of a long heading; without this it is
   squeezed to zero width and wraps one character per line at mobile widths. */
.catalog-leads > .handoff-header > .chip {
  flex-shrink: 0;
  white-space: nowrap;
}

.catalog-leads-disclosure {
  margin-top: 12px;
}

.catalog-leads-disclosure > summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
}

.catalog-leads-disclosure[open] > summary {
  margin-bottom: 10px;
}

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

.catalog-lead-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.catalog-lead-card h4,
.catalog-lead-card p {
  margin: 0;
}

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

.catalog-lead-facts span {
  display: grid;
  gap: 2px;
}

@media (max-width: 720px) {
  .catalog-lead-grid {
    grid-template-columns: 1fr;
  }
}

.subheading {
  margin-bottom: 12px;
}

.subheading + .filters-grid,
.subheading + .card-stack {
  margin-top: 10px;
}

.subheading p {
  margin: 6px 0 0;
}

.selection-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(47, 42, 34, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.9);
}

.selection-card input {
  margin-top: 4px;
}

.selection-card strong,
.selection-card small,
.selection-card em {
  display: block;
}

.selection-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.selection-card em {
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.selection-card-compact small {
  margin-top: 2px;
}

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

.summary-grid p {
  margin: 4px 0 0;
  color: var(--muted);
}

.card-stack,
.handoff-panel,
.handoff-grid {
  display: grid;
  gap: 12px;
}

.result-card,
.run-config-card,
.config-summary-card,
.handoff-card,
.comparison-card {
  padding: 16px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.result-card {
  gap: 12px;
}

.signal-card:hover,
.stat-card:hover,
.result-card:hover,
.run-config-card:hover,
.handoff-card:hover,
.story-highlight:hover,
.workflow-mini-card:hover,
.story-rail-card:hover {
  transform: translateY(-1px);
  border-color: rgba(14,16,10,0.18);
  box-shadow: 0 16px 30px rgba(14,16,10,0.1);
}

.result-card header,
.run-config-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.result-kicker {
  font-size: 0.84rem;
  color: var(--muted);
}

.result-rank {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.chip {
  background: var(--teal-soft);
  color: var(--color-accent, #0b7d79);
  font-size: 0.8rem;
}

.chip.secondary {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chip.warn {
  background: rgba(120, 93, 20, 0.12);
  color: #6f5514;
}

.chip.official {
  background: rgba(11,125,121,0.18);
  color: var(--teal-strong);
}

.chip.comparable {
  background: rgba(93, 90, 80, 0.12);
  color: var(--muted);
}

.chip.informational {
  background: rgba(93, 90, 80, 0.14);
  color: var(--muted);
}

.chip.demo {
  background: rgba(177, 86, 44, 0.1);
  color: #9a4f2c;
}

.chip.reference,
.chip.quant {
  background: var(--color-info-soft);
  color: var(--color-info);
}

.chip.gold {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.chip.decision {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

.metric {
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.08rem;
}

.wizard-grid {
  margin-bottom: 18px;
}

.recommendation-control-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.recommendation-control-panel.filters-grid {
  grid-template-columns: minmax(0, 1fr) auto;
}

.recommendation-control-panel .filter-primary,
.recommendation-control-panel .advanced-filters {
  grid-column: 1 / -1;
}

.filter-primary,
.advanced-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr));
  gap: 12px;
}

.filter-primary label,
.advanced-filter-grid label {
  min-width: 0;
}

.advanced-filters {
  grid-column: 1 / -1;
  border: 1px solid rgba(14,16,10,0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 251, 0.54);
  padding: 10px 12px;
}

.advanced-filters summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.advanced-filter-grid {
  margin-top: 12px;
}

.advanced-filters .filter-primary {
  margin-top: 12px;
}

.recommend-change-question-panel,
.compare-evidence-disclosure {
  margin: 14px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-xs);
}

.recommend-change-question-panel > summary,
.compare-evidence-disclosure > summary {
  display: grid;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  cursor: pointer;
  list-style-position: inside;
}

.recommend-change-question-panel > summary span,
.compare-evidence-disclosure > summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compare-evidence-summary-main {
  gap: 10px;
}

.compare-evidence-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.recommend-change-question-panel > summary strong,
.compare-evidence-disclosure > summary strong {
  font-size: 0.98rem;
}

.recommend-change-question-panel > summary small,
.compare-evidence-disclosure > summary small {
  color: var(--color-text-muted);
  line-height: 1.35;
}

.compare-evidence-affordance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--color-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--color-surface));
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.compare-evidence-hide {
  display: none !important;
}

.compare-evidence-disclosure[open] .compare-evidence-show {
  display: none !important;
}

.compare-evidence-disclosure[open] .compare-evidence-hide {
  display: inline !important;
}

.compare-evidence-preview {
  display: block;
  min-width: 0;
}

.compare-evidence-preview > span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.compare-evidence-preview strong {
  color: var(--color-text);
  font-size: 0.82rem;
}

.compare-evidence-preview small {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.recommend-change-question-panel[open],
.compare-evidence-disclosure[open] {
  padding: 0 14px 14px;
}

.recommend-change-question-panel[open] > summary,
.compare-evidence-disclosure[open] > summary {
  margin: 0 -14px 10px;
  border-bottom: 1px solid var(--color-border);
}

.what-could-change-shell {
  display: block;
  margin-top: 12px;
}

.what-could-change-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-xs);
}

.what-could-change-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.what-could-change-header h4 {
  margin: 0;
  font-size: 1rem;
}

.what-could-change-header p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.what-could-change-evidence-pill {
  align-self: flex-start;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--color-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--color-surface));
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.what-could-change-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.what-could-change-gaps h5,
.what-could-change-challengers h5 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.what-could-change-gaps ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--color-text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.what-could-change-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.what-could-change-candidate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: stretch;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-muted) 64%, var(--color-surface));
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.what-could-change-candidate:hover,
.what-could-change-candidate:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--color-border));
  background: color-mix(in srgb, var(--accent) 6%, var(--color-surface));
  outline: none;
}

.what-could-change-candidate strong {
  grid-column: 1 / -1;
  font-size: 0.92rem;
  font-weight: 700;
}

.what-could-change-candidate small {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.what-could-change-candidate span {
  display: inline-flex;
  flex-direction: column;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  color: var(--color-text);
}

.what-could-change-candidate span em {
  font-style: normal;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.what-could-change-actions {
  margin-top: 0;
}

.plot-legend-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.plot-legend-marker i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color-text-muted);
}

.plot-legend-marker.plot-legend-frontier i {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.plot-legend-marker.plot-legend-selected i {
  background: color-mix(in srgb, var(--accent) 70%, var(--color-text));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-text) 14%, transparent);
}

.plot-legend-marker.plot-legend-supported i {
  background: color-mix(in srgb, var(--accent) 60%, var(--color-text-muted));
}

.plot-legend-marker.plot-legend-thin i {
  background: var(--color-border);
  border: 1px dashed var(--color-text-muted);
}

.plot-legend-marker.plot-legend-projected i {
  background: rgba(11, 125, 121, 0.28);
  border: 2px dashed rgba(11, 125, 121, 0.92);
}

.plot-legend-marker.plot-legend-uncertainty i {
  width: 14px;
  height: 2px;
  border-radius: 0;
  background: var(--color-text-muted);
}

.plot-legend-marker.plot-legend-memory-budget i {
  width: 2px;
  height: 14px;
  border-radius: 0;
  background: var(--color-warning, #9a5b22);
}

.plot-legend-marker.plot-legend-context i {
  background: transparent;
  border: 2px dashed var(--color-text-muted);
}

.plot-legend-marker.plot-legend-estimated i {
  background: transparent;
  border: 2px dashed var(--color-warning, #9a5b22);
}

.capability-ranking {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-muted) 66%, var(--color-surface));
}

.capability-ranking-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.capability-ranking-heading h4,
.capability-ranking-heading p {
  margin: 0;
}

.capability-ranking-heading p {
  max-width: 42ch;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  text-align: right;
}

.capability-ranking ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-ranking li button {
  display: grid;
  grid-template-columns: 24px minmax(150px, 1.25fr) minmax(120px, 2fr) 64px minmax(92px, auto);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  text-align: left;
}

.capability-ranking li button:hover,
.capability-ranking li button:focus-visible,
.capability-ranking li.is-focused button {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--color-border));
  background: var(--color-surface);
}

.capability-ranking-rank {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.capability-ranking-model,
.capability-ranking-speed {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.capability-ranking-model strong,
.capability-ranking-model small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-ranking-model small,
.capability-ranking-speed small {
  color: var(--color-text-muted);
  font-size: 0.7rem;
}

.capability-ranking-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-border) 62%, transparent);
}

.capability-ranking-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--score-width);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #5c73ff), var(--accent));
}

.capability-ranking-score {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.capability-ranking-score small {
  color: var(--color-text-muted);
  font-size: 0.68rem;
}

.capability-ranking-speed {
  justify-items: end;
  color: var(--color-text);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.capability-ranking-context {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.inline-loading-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: infergrade-spin 800ms linear infinite;
}

@keyframes infergrade-spin {
  to { transform: rotate(360deg); }
}

.plot-legend-marker strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-text);
}

.plot-legend-marker small {
  color: var(--color-text-muted);
  font-size: 0.74rem;
}

@media (max-width: 720px) {
  .what-could-change-body {
    grid-template-columns: 1fr;
  }
  .what-could-change-candidate {
    grid-template-columns: 1fr 1fr;
  }
  .what-could-change-candidate strong,
  .what-could-change-candidate small {
    grid-column: 1 / -1;
  }
  .what-could-change-candidate span {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .plot-legend-marker small {
    display: none;
  }
  .task-performance-story {
    grid-template-columns: 1fr;
  }
  .capability-ranking-heading {
    display: grid;
    align-items: start;
  }
  .capability-ranking-heading p {
    text-align: left;
  }
  .capability-ranking li button {
    grid-template-columns: 22px minmax(0, 1fr) 56px;
  }
  .capability-ranking-track {
    grid-column: 2 / 4;
    grid-row: 2;
  }
  .capability-ranking-speed {
    display: none;
  }
}

.workbench-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.66fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.answer-first-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  align-items: start;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 24%, var(--color-border));
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
}

.recommendation-intake-hero {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px;
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 6%, var(--color-surface));
}

.recommendation-intake-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.recommendation-intake-heading > p {
  max-width: 46ch;
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.4;
  text-align: right;
}

.recommendation-intake-hero .answer-first-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.sparse-plot-card {
  display: grid;
  gap: 14px;
}

.sparse-plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 10px;
}

.sparse-plot-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(88px, 0.72fr)) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--color-surface-strong);
  color: var(--color-text);
  text-align: left;
}

.sparse-plot-candidate:hover,
.sparse-plot-candidate.is-selected {
  border-color: var(--color-accent);
}

.sparse-plot-candidate.is-selected {
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.sparse-plot-candidate > span:not(.chip) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sparse-plot-candidate small,
.sparse-plot-gap span {
  color: var(--color-text-muted);
}

.sparse-plot-gap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.recommendation-intake-hero .recommend-question-summary {
  min-height: 0;
  padding: 8px 10px;
}

.answer-first-panel.is-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  border-color: var(--color-border);
  background: transparent;
}

.recommendation-panel > .panel-heading {
  align-items: center;
  padding-bottom: 2px;
}

.recommendation-panel > .panel-heading h2 {
  font-size: clamp(1.5rem, 2vw, 2.05rem);
  line-height: 1.05;
}

.recommendation-panel.is-awaiting-recommendation > .panel-heading #share-heading-button,
.recommendation-panel.is-awaiting-recommendation #recommendation-slice-summary,
.recommendation-panel.is-awaiting-recommendation #wizard-summary,
.recommendation-panel.is-awaiting-recommendation #wizard-plot,
.recommendation-panel.is-awaiting-recommendation #wizard-alternatives,
.recommendation-panel.is-awaiting-recommendation #hardware-evidence-brief,
.recommendation-panel.is-awaiting-recommendation #compare-evidence-disclosure,
.recommendation-panel.is-awaiting-recommendation #recommend-change-question-panel,
.recommendation-panel.is-awaiting-recommendation .decision-toolbar,
.recommendation-panel.is-awaiting-recommendation #saved-decision-views {
  display: none;
}

.answer-first-panel.is-compact {
  gap: 12px;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 5%, var(--color-surface));
}

.answer-first-panel h3 {
  margin: 2px 0 0;
  max-width: 32ch;
  font-size: 1.18rem;
}

.recommend-question-summary {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.answer-first-panel.is-compact .recommend-question-summary {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.recommend-question-summary span,
.recommend-question-status {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.recommend-question-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.recommend-question-chip-row {
  gap: 6px;
  margin-top: 8px;
}

.recommend-question-chip-row .chip {
  font-size: 0.72rem;
}

.recommend-question-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.recommend-question-status.is-dirty,
.recommend-question-status.is-loading,
.recommend-question-status.is-applied {
  min-height: 32px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.recommend-question-status.is-dirty {
  border-color: color-mix(in srgb, var(--color-warning, #b7791f) 45%, var(--color-border));
  background: color-mix(in srgb, var(--color-warning, #b7791f) 10%, var(--color-surface));
  color: var(--color-text);
}

.recommend-question-status.is-loading {
  background: var(--color-surface-muted);
}

.recommend-question-status.is-applied {
  border-color: color-mix(in srgb, var(--color-success, #16825d) 36%, var(--color-border));
  background: color-mix(in srgb, var(--color-success, #16825d) 9%, var(--color-surface));
  color: var(--color-text);
}

.answer-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: center;
}

.answer-preset-button {
  border-radius: 999px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 28%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 10%, var(--color-surface));
  color: var(--color-text);
  box-shadow: none;
}

.answer-preset-button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 48%, var(--color-border));
}

.answer-first-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.answer-first-controls label {
  min-width: 0;
}

.answer-first-controls select {
  width: 100%;
}

/* Unwired mockup-only component blocks from this sprint were dropped to avoid dead CSS.
   Re-add them only when renderers emit the matching HTML structure. */


.recommendation-primary-workbench {
  display: grid;
  gap: 14px;
}

.recommendation-secondary {
  margin-top: 14px;
}

.catalog-summaries {
  margin-top: 14px;
}

.workbench-columns {
  margin-bottom: 18px;
}

.explore-overview {
  display: grid;
  gap: 14px;
}

.explore-family-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.explore-family-browser {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
}

.explore-family-list,
.explore-family-detail {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.explore-family-list {
  position: sticky;
  top: 12px;
  overflow: hidden;
}

.explore-family-list-heading,
.explore-family-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--color-border);
}

.explore-family-list-heading h3,
.explore-family-detail-heading h3 {
  margin: 3px 0 0;
  line-height: 1.15;
}

.explore-family-list-heading > span {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.explore-family-list-heading p {
  max-width: 32ch;
  margin: 5px 0 0;
  line-height: 1.35;
}

.explore-family-list-heading .methodology-inline-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.explore-family-context {
  align-items: center;
  gap: 6px;
  padding: 0 14px 12px;
}

.explore-family-count {
  margin-left: auto;
  color: var(--color-text-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.explore-family-picker {
  display: grid;
  gap: 6px;
  padding: 0 14px 12px;
}

.explore-family-picker span {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.explore-family-picker select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
  color: var(--color-text);
  font-weight: 800;
}

.explore-family-list-rows {
  display: grid;
  max-height: min(68vh, 780px);
  overflow: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}

.explore-family-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 10px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  box-shadow: none;
  text-align: left;
}

.explore-family-list-row:hover,
.explore-family-list-row:focus-visible,
.explore-family-list-row.is-selected {
  border-color: color-mix(in srgb, var(--color-accent) 34%, var(--color-border));
  background: var(--color-surface-muted);
}

.explore-family-list-main,
.explore-family-list-proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.explore-family-list-main strong,
.explore-family-list-main small,
.explore-family-list-proof small,
.explore-family-list-quants {
  min-width: 0;
  overflow-wrap: anywhere;
}

.explore-family-list-main small,
.explore-family-list-proof small,
.explore-family-list-quants {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.explore-family-list-proof .chip {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.explore-family-list-quants {
  grid-column: 1 / -1;
}

.explore-family-detail {
  padding: 0;
}

.explore-family-detail .explore-family-grid {
  padding: 14px;
}

.explore-family-detail .explore-family-quants li {
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(84px, 0.7fr));
}

.explore-family-detail .explore-quant-name,
.explore-family-detail .explore-quant-evidence {
  grid-column: 1 / -1;
}

.explore-family-detail .explore-family-quants .compact-button {
  grid-column: 1 / -1;
  width: 100%;
}

.explore-family-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
}

.explore-family-card label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.explore-family-card h4 {
  margin: 4px 0;
  line-height: 1.18;
}

.explore-family-row-card {
  gap: 14px;
}

.explore-family-row-card .handoff-header {
  flex-wrap: wrap;
}

.explore-family-row-card .handoff-header > div:first-child {
  min-width: 0;
}

.explore-family-row-card h4,
.explore-family-row-card p {
  overflow-wrap: anywhere;
}

.explore-family-scorebar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.explore-family-scorebar > span {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
}

.explore-family-scorebar label {
  color: var(--color-text-muted);
}

.explore-family-scorebar strong {
  display: block;
  margin-top: 4px;
  color: var(--color-text);
  font-size: 1rem;
}

.explore-family-coverage {
  margin: 4px 0 -4px;
}

.explore-family-quants {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-muted) 70%, var(--color-surface));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.explore-family-quants-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.explore-family-quants-heading > small {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.explore-family-quants-heading > span {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.explore-family-quants ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.explore-family-quants li {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) repeat(3, minmax(96px, 0.75fr)) minmax(116px, 0.82fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 0.84rem;
  color: var(--color-text);
}

.explore-family-quants li > span,
.explore-family-quants .explore-quant-name {
  min-width: 0;
}

.explore-family-quants li > span > strong,
.explore-family-quants li > span > small,
.explore-family-quants .explore-quant-name > strong {
  display: block;
}

.explore-family-quants li > span > strong,
.explore-family-quants .explore-quant-name > strong {
  font-weight: 700;
}

.explore-family-quants .explore-quant-name > strong {
  overflow-wrap: anywhere;
}

.explore-family-quants li > span > small {
  color: var(--color-text-soft);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.explore-family-quants .cap-score-note {
  display: none;
}

.explore-family-quants .cap-bar {
  display: block;
  margin: 5px 0 0;
}

.explore-family-quants .explore-quant-name > span,
.explore-family-quants li.muted span {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.explore-family-quants .explore-quant-evidence .chip {
  margin: 0;
  white-space: normal;
}

.explore-family-quants .compact-button {
  min-width: 74px;
}

.explore-family-quants li.explore-quant-more {
  display: block;
}

.explore-family-quants li.muted span {
  font-style: italic;
}

.explore-family-quants-empty {
  margin: 0;
  font-size: 0.82rem;
}

.explore-family-details {
  margin-top: 0;
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.explore-family-details summary {
  min-height: 36px;
  color: var(--color-text);
}

.explore-family-details p {
  margin: 8px 0 0;
}

.explore-family-actions {
  align-items: stretch;
}

.explore-family-gap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--color-warning, #9b6a2f) 22%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-warning-soft, #fff3d6) 42%, var(--color-surface));
}

.explore-family-gap strong,
.explore-family-gap p {
  margin: 0;
}

.explore-family-gap p {
  margin-top: 3px;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.plot-shell {
  display: grid;
  gap: 12px;
}

.plot-card {
  background: var(--color-surface-strong);
  overflow: hidden;
}

.plot-frame {
  display: block;
  margin-top: 2px;
}

.plot-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  align-items: center;
}

.plot-summary-strip span {
  padding: 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.plot-summary-strip strong {
  color: var(--color-text);
}

.plot-reading-guide {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.25fr);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 24%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-accent-soft, #d8f4ef) 22%, var(--color-surface));
}

.plot-reading-guide > div {
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
}

.plot-reading-guide > div + div {
  border-left: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 18%, var(--color-border));
}

.plot-reading-guide p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--color-text);
  font-size: 0.82rem;
  line-height: 1.42;
}

.plot-reading-guide p strong {
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 850;
}

.plot-reading-guide p small {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.plot-reading-direction > span {
  flex: 0 0 auto;
  color: var(--color-accent, #0b7d79);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
}

.plot-reading-point-key i {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 2px solid var(--color-accent, #0b7d79);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 18%, transparent);
}

.plot-reading-equation {
  flex: 0 0 auto;
  color: var(--color-accent, #0b7d79);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 720px) {
  .plot-reading-guide {
    grid-template-columns: 1fr;
  }

  .plot-reading-guide > div + div {
    border-top: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 18%, var(--color-border));
    border-left: 0;
  }
}

.plot-lens-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}

.plot-lens-strip > span {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plot-lens-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.plot-lens-button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
}

.plot-lens-button:hover:not(:disabled),
.plot-lens-button:focus-visible,
.plot-lens-button.is-active {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 54%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent-soft, #d8f4ef) 62%, var(--color-surface));
  color: var(--color-text);
}

.plot-lens-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.plot-better-region rect {
  fill: color-mix(in srgb, var(--color-success-soft, #d9f8df) 58%, transparent);
  stroke: color-mix(in srgb, var(--color-success, #2f8f46) 22%, transparent);
  stroke-width: 1;
}

.plot-better-region text {
  fill: color-mix(in srgb, var(--color-success, #2f8f46) 72%, var(--color-text));
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.plot-model-picker {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.plot-model-picker summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  list-style: none;
}

.plot-model-picker summary::-webkit-details-marker {
  display: none;
}

.plot-model-picker summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-weight: 900;
}

.plot-model-picker[open] summary::after {
  content: "-";
}

.plot-model-picker summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plot-model-picker summary strong {
  color: var(--color-text);
  font-size: 0.94rem;
}

.plot-model-picker summary small {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.plot-model-picker-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.plot-model-search {
  display: grid;
  gap: 5px;
}

.plot-model-search span {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plot-model-search input {
  width: 100%;
  min-width: 0;
}

.plot-model-list {
  display: grid;
  gap: 4px;
  max-height: 300px;
  overflow: auto;
  padding-right: 2px;
}

.plot-model-option {
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(76px, auto) 10px minmax(86px, auto);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.plot-model-option:hover,
.plot-model-option:focus-within {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 34%, var(--color-border));
}

.plot-model-option > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plot-model-option strong,
.plot-model-option small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.plot-model-option strong {
  color: var(--color-text);
  font-size: 0.86rem;
  line-height: 1.18;
}

.plot-model-option small {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.plot-model-score {
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.plot-model-option > i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 24%, transparent);
}

.plot-model-option > i.is-visible {
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 82%, var(--color-surface));
}

.plot-model-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plot-svg {
  display: block;
  width: 100%;
  min-height: 390px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(11,125,121,0.18);
  background: var(--color-surface-muted);
}

.plot-grid line {
  stroke: rgba(14,16,10,0.1);
  stroke-width: 1;
}

.plot-axis-line {
  fill: none;
  stroke: rgba(14,16,10,0.28);
  stroke-width: 1.5;
}

.plot-frontier-path {
  fill: none;
  stroke: var(--color-accent, #0b7d79);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.86;
}

.plot-label {
  fill: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plot-knee-annotation path {
  fill: none;
  stroke: rgba(111, 77, 61, 0.54);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.plot-knee-annotation text {
  fill: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.plot-trace {
  fill: none;
  stroke: rgba(11,125,121,0.42);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.plot-trace.trace-1 {
  stroke: rgba(73, 98, 118, 0.4);
}

.plot-trace.trace-2 {
  stroke: rgba(75, 120, 97, 0.4);
}

.plot-trace.trace-3 {
  stroke: rgba(103, 83, 54, 0.36);
}

.plot-trace.trace-4,
.plot-trace.trace-5 {
  stroke: rgba(11,125,121,0.18);
}

.plot-memory-over-budget {
  fill: color-mix(in srgb, var(--color-warning, #9a5b22) 10%, transparent);
}

.plot-memory-budget-line {
  stroke: color-mix(in srgb, var(--color-warning, #9a5b22) 82%, var(--color-text));
  stroke-width: 2;
  stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke;
}

.plot-memory-budget-label {
  fill: color-mix(in srgb, var(--color-warning, #9a5b22) 78%, var(--color-text));
  font-size: 11px;
  font-weight: 800;
}

.plot-uncertainty-whisker {
  stroke: color-mix(in srgb, var(--color-text-muted) 76%, transparent);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.plot-confidence-ring {
  fill: none;
  stroke-width: 2;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.plot-confidence-ring.confidence-repeated {
  stroke: color-mix(in srgb, var(--color-accent, #0b7d79) 74%, transparent);
}

.plot-confidence-ring.confidence-thin {
  stroke: color-mix(in srgb, var(--color-warning, #9a5b22) 74%, transparent);
  stroke-dasharray: 3 3;
}

.plot-confidence-ring.confidence-unstable {
  stroke: var(--color-danger, #a33a32);
  stroke-dasharray: 2 2;
  stroke-width: 2.5;
}

.plot-axis {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plot-axis-y {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  justify-self: center;
  align-self: center;
}

.plot-axis-x {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 10px;
}

.plot-point {
  position: absolute;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-bottom: -7px;
  border: none;
  border-radius: 999px;
  background: rgba(14,16,10,0.22);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

svg .plot-point {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  fill: rgba(14,16,10,0.46);
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2.4;
  transform-box: fill-box;
  transform-origin: center;
}

.plot-point span {
  position: absolute;
  left: 18px;
  top: -4px;
  min-width: 140px;
  color: var(--ink);
  font-size: 0.78rem;
  text-align: left;
}

.plot-point.is-frontier {
  background: rgba(11,125,121,0.82);
  fill: rgba(11,125,121,0.88);
}

.plot-point.evidence-supported {
  border: 2px solid rgba(11,125,121,0.82);
  stroke: rgba(11,125,121,0.82);
}

.plot-point.evidence-similar {
  background: rgba(73, 98, 118, 0.72);
  fill: rgba(73, 98, 118, 0.82);
}

.plot-point.evidence-thin,
.plot-point.evidence-failed,
.plot-point.evidence-demo-only {
  background: rgba(148, 91, 34, 0.78);
  border: 2px solid rgba(95, 60, 22, 0.72);
  fill: rgba(148, 91, 34, 0.82);
  stroke-dasharray: none;
}

.plot-point.is-context-only {
  stroke-dasharray: none;
  opacity: 1;
}

.plot-point.is-context-only:focus-visible {
  outline: none;
  stroke: var(--color-text);
  stroke-width: 3.5;
  opacity: 1;
}

.compare-mini-plot {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(11,125,121,0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
}

.compare-mini-plot svg {
  width: 100%;
  min-height: 210px;
}

.compare-mini-trajectory {
  stroke-width: 2.4;
}

.compare-mini-point circle {
  fill: rgba(148, 91, 34, 0.82);
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2.4;
}

.compare-mini-point.is-frontier circle {
  fill: rgba(11,125,121,0.88);
}

.compare-mini-point text {
  fill: var(--color-text);
  font-size: 11px;
  font-weight: 700;
}

html[data-theme="dark"] .plot-card,
html[data-theme="dark"] .compare-mini-plot {
  background: linear-gradient(180deg, rgba(29, 35, 43, 0.96), rgba(23, 27, 34, 0.94));
}

html[data-theme="dark"] .plot-summary-strip span,
html[data-theme="dark"] .compare-mini-plot {
  background: rgba(16, 19, 24, 0.7);
}

html[data-theme="dark"] .plot-svg,
html[data-theme="dark"] .compare-mini-plot svg {
  background: rgba(16, 19, 24, 0.86);
  border-color: var(--color-border-strong);
}

.plot-point.is-focused {
  box-shadow: 0 0 0 4px rgba(11,125,121,0.2), 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.plot-point[aria-pressed="true"] {
  z-index: 4;
  transform: scale(1.14);
}

.plot-point.is-shortlist {
  box-shadow: 0 0 0 4px rgba(11,125,121,0.14), 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.plot-point.is-estimated {
  background: rgba(104, 112, 122, 0.82);
  fill: rgba(104, 112, 122, 0.82);
}

.plot-point.is-projected {
  background: var(--color-surface);
  fill: var(--color-surface);
  stroke: rgba(11, 125, 121, 0.92);
  stroke-width: 3;
  stroke-dasharray: none;
}

.plot-point:hover,
.plot-point:focus-visible {
  transform: scale(1.08);
  outline: none;
}

.loading-label {
  margin: 0 0 10px;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plot-legend span {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.plot-legend-confidence-repeated i,
.plot-legend-confidence-thin i,
.plot-legend-confidence-unstable i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border: 2px solid var(--color-accent, #0b7d79);
  border-radius: 999px;
  background: transparent;
  vertical-align: -1px;
}

.plot-legend-confidence-thin i {
  border-color: var(--color-warning, #9a5b22);
  border-style: dashed;
}

.plot-legend-confidence-unstable i {
  border-color: var(--color-danger, #a33a32);
  border-style: dotted;
}

.plot-scope-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.plot-scope-strip span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: transparent;
}

.plot-scope-strip small,
.plot-scope-strip strong {
  display: inline;
  min-width: 0;
  overflow-wrap: anywhere;
}

.plot-scope-strip small {
  color: var(--color-text-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plot-scope-strip small::after {
  content: ":";
}

.plot-scope-strip strong {
  color: var(--color-text);
  font-size: 0.82rem;
}

.plot-selected-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.15fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.plot-selected-summary label,
.plot-summary-grid span {
  display: block;
  color: var(--color-text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plot-selected-summary h4 {
  margin: 4px 0 6px;
}

.plot-selected-summary p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.plot-selected-summary .chip-row {
  grid-column: 1 / -1;
}

.task-performance-story {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 22%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-accent-soft, #d8f4ef) 20%, var(--color-surface-muted));
}

.task-performance-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.task-performance-story strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.task-performance-story small {
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

.task-performance-equation {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr) auto minmax(92px, 1fr);
  align-items: center;
  gap: 10px;
}

.task-performance-equation span {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.task-performance-equation b {
  color: var(--color-text-muted);
  font-size: 1.25rem;
  text-align: center;
}

.task-performance-equation .task-performance-result {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 46%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent-soft, #d8f4ef) 36%, var(--color-surface));
}

.task-performance-story.is-unavailable {
  border-style: dashed;
  background: var(--color-surface-muted);
}

.plot-selected-actions {
  grid-column: 1 / -1;
}

.plot-selected-evidence-details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--color-border);
  padding-top: 0.7rem;
}

.plot-selected-evidence-details > summary,
.table-row-actions > summary,
.table-proof-disclosure > summary {
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.plot-selected-evidence-details[open] > summary {
  margin-bottom: 0.75rem;
}

.table-row-actions {
  position: relative;
}

.table-row-actions > div {
  margin-top: 0.5rem;
}

.table-proof-disclosure {
  margin-top: 0.35rem;
}

.table-proof-disclosure > span {
  display: block;
  margin-top: 0.35rem;
}

.public-result-score-gate {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-warning-border, #b7791f);
  border-radius: var(--radius-md);
  background: var(--color-warning-soft, rgba(183, 121, 31, 0.1));
}

.public-result-score-gate span {
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.capability-task-profile {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--panel-border) 82%, transparent);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--panel) 82%, var(--accent-soft));
}

.capability-task-profile-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.capability-task-profile-heading > div {
  display: grid;
  gap: 0.16rem;
}

.capability-task-profile-heading label,
.capability-task-profile-heading small,
.capability-task-profile-row small {
  color: var(--muted);
}

.capability-task-profile-heading > small {
  max-width: 32rem;
  text-align: right;
}

.capability-task-profile-rows {
  display: grid;
  gap: 0.42rem;
}

.capability-task-profile-row {
  display: grid;
  grid-template-columns: minmax(10rem, 0.9fr) minmax(8rem, 1.35fr) minmax(8rem, 0.72fr);
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.62rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: inherit;
  text-align: left;
}

.capability-task-profile-row:hover,
.capability-task-profile-row:focus-visible {
  border-color: var(--accent);
  transform: none;
}

.capability-task-profile-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--panel-border));
  box-shadow: inset 3px 0 0 var(--accent);
}

.capability-task-profile-label,
.capability-task-profile-score {
  display: grid;
  gap: 0.1rem;
}

.capability-task-profile-score {
  text-align: right;
}

.capability-task-profile-track {
  height: 0.52rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-border) 76%, transparent);
}

.capability-task-profile-track i {
  display: block;
  width: var(--task-score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.capability-task-profile-row.is-gap .capability-task-profile-track i {
  width: 100%;
  opacity: 0.13;
  background: repeating-linear-gradient(90deg, var(--muted) 0 0.42rem, transparent 0.42rem 0.72rem);
}

.plot-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 8px;
}

.plot-summary-grid div {
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
}

.plot-summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.plot-legend-card {
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.plot-legend-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.plot-legend-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.empty-state-card {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(14,16,10,0.18);
  border-radius: var(--radius-xl);
  background: rgba(255, 254, 251, 0.58);
}

.empty-state-card h3,
.empty-state-card p {
  margin: 0;
}

.saved-view-hint .empty-state-card {
  border-style: solid;
  background: rgba(11,125,121,0.06);
}

.plot-tooltip {
  position: fixed;
  z-index: 120;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  pointer-events: none;
}

.near-miss-row {
  padding: 12px 0;
  border-top: 1px solid rgba(14,16,10,0.08);
}

.near-miss-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.near-miss-row strong {
  display: block;
  margin-bottom: 4px;
}

.near-miss-row p {
  margin: 0;
  color: var(--muted);
}

.estimate-grid {
  margin-top: 10px;
}

.estimate-card strong {
  font-size: 1rem;
}

.recommendation-context-card {
  margin-bottom: 14px;
}

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

.recommendation-context-filters {
  margin-top: 12px;
}

.result-evidence-disclosure {
  background: var(--color-surface-muted);
}

.result-evidence-body {
  display: grid;
  gap: 14px;
}

.decision-card {
  background:
    radial-gradient(circle at top right, rgba(11,125,121,0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 254, 251, 0.96), rgba(244, 235, 223, 0.94));
}

.table-shell {
  margin-bottom: 18px;
}

.recommendation-table-wrap table td {
  vertical-align: middle;
}

.recommendation-sort-summary {
  margin: 0 0 10px;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.score-scope-callout {
  display: grid;
  gap: 4px;
  margin: 2px 0 8px;
  padding: 10px 12px;
  border: 1px solid rgba(11,125,121,0.14);
  border-radius: var(--radius-md);
  background: rgba(11,125,121,0.055);
  color: var(--color-text);
}

.score-scope-callout strong {
  font-size: 0.88rem;
}

.score-scope-callout span,
.score-scope-callout small {
  color: var(--color-text-muted);
  line-height: 1.35;
}

.score-scope-callout small {
  font-size: 0.78rem;
  font-weight: 800;
}

.score-scope-callout.is-compact {
  margin-bottom: 10px;
}

.table-sort-button,
.table-row-link {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: left;
}

.table-sort-button {
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}

.table-sort-button.is-active {
  color: var(--accent-strong);
}

.table-row-link {
  width: 100%;
  cursor: pointer;
}

.recommendation-table-wrap tbody tr[data-result-id] {
  cursor: pointer;
}

.recommendation-table-wrap tbody tr.is-focused {
  background: var(--color-accent-soft);
  box-shadow: inset 3px 0 0 var(--color-accent, #0b7d79);
}

.recommendation-table-wrap tbody tr.is-frontier:not(.is-focused) {
  background: rgba(11,125,121,0.045);
}

.recommendation-table-wrap td:first-child {
  color: var(--muted);
  font-weight: 700;
}

.recommendation-table-wrap .chip-row {
  gap: 6px;
}

.table-cell-note {
  margin: 6px 0 0;
  max-width: 260px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.compact-evidence-note {
  max-width: 34ch;
}

.recommendation-table-wrap .recommendation-evidence-cell .compact-evidence-note {
  display: none;
}

.recommendation-table-wrap .recommendation-evidence-cell .table-cell-note:not(.compact-evidence-note) {
  display: -webkit-box;
  max-width: 28ch;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-evidence-note strong,
.score-scope-copy strong {
  color: var(--color-text);
}

.score-scope-copy {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.capability-basis-strip {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(11,125,121,0.14);
  border-radius: var(--radius-md);
  background: rgba(11,125,121,0.055);
  color: var(--color-text);
  font-size: 0.82rem;
}

.capability-basis-strip strong {
  color: var(--color-text);
  font-size: 0.86rem;
}

.capability-basis-strip > span {
  color: var(--color-text-muted);
  line-height: 1.35;
}

.capability-basis-strip small {
  color: var(--color-text-soft);
  font-weight: 800;
  line-height: 1.4;
}

.plot-selected-summary .capability-basis-strip {
  grid-column: 1 / -1;
  margin-top: 0;
}

.selected-recommendation-card {
  border-color: rgba(11,125,121,0.16);
}

.selected-recommendation-card .handoff-header {
  align-items: stretch;
  flex-direction: column;
}

.selected-recommendation-card .handoff-header .chip-row {
  width: 100%;
}

.selected-recommendation-card .candidate-rationale summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.selected-recommendation-card .candidate-rationale .insight-summary-copy {
  display: none;
}

.chip.is-selected {
  background: var(--accent-soft);
  border-color: rgba(11,125,121,0.2);
  color: var(--accent-strong);
}

.activity-card.is-focused {
  border-color: rgba(11,125,121,0.2);
  background: var(--color-accent-soft);
}

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

.decision-notes > div {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(14,16,10,0.08);
  background: rgba(255, 255, 255, 0.54);
}

.decision-notes label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.reason-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}

.reason-list li {
  margin-bottom: 8px;
}

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

.trust-explanation-list {
  margin-top: 10px;
}

.trust-preview-card {
  margin-bottom: 16px;
}

.trust-preview-grid .signal-card {
  min-height: 100%;
}

.trust-preview-signal strong {
  font-size: 1.1rem;
}

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

.cloud-grid {
  margin-bottom: 14px;
}

.compare-output {
  display: grid;
  gap: 14px;
}

.compare-preset-button {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
}

.compare-empty {
  margin-top: 4px;
}

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

.run-observer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.run-card {
  border-color: var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.run-card.is-selected {
  border-color: var(--color-accent);
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.runs-table-wrap {
  background: var(--color-surface);
}

.runs-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}

.runs-col-status {
  width: 146px;
}

.runs-col-name {
  width: 280px;
}

.runs-col-target {
  width: 170px;
}

.runs-col-updated {
  width: 154px;
}

.runs-col-actions {
  width: 130px;
}

.runs-table th,
.runs-table td {
  vertical-align: top;
}

.runs-table tbody tr {
  transition: background 0.12s, box-shadow 0.12s;
}

.runs-table tbody tr.is-selected {
  background: var(--color-surface-muted);
  box-shadow: inset 3px 0 0 var(--color-accent, #0b7d79);
}

.runs-table-status,
.runs-table-step,
.runs-table-target {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.runs-table-status .chip {
  width: fit-content;
  white-space: nowrap;
}

.runs-table-target small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runs-table-step > span {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.runs-table-actions {
  justify-content: flex-start;
}

.runs-table-reference {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runs-table td[data-label="Run"] .table-primary-cell strong {
  overflow-wrap: normal;
  word-break: normal;
}

.runs-table-actions button {
  flex: 1 1 100%;
  width: 100%;
}

.run-card-header,
.run-event-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.run-stage {
  margin: 8px 0 0;
  color: var(--muted);
}

.run-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.run-progress.is-compact {
  grid-template-columns: minmax(72px, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 0;
  max-width: 190px;
}

.run-progress.is-compact .progress-bar {
  height: 7px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(14,16,10,0.08);
}

.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-accent, #0b7d79) 0%, #0b7d79 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: width 420ms ease;
}

.run-event-card {
  padding: 14px 16px;
}

.run-event-card h4 {
  margin: 0 0 6px;
}

.run-event-history > .card-stack {
  padding: 0 14px 14px;
}

.run-event-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

.run-status-running {
  background: rgba(11,125,121,0.16);
  color: var(--color-accent, #0b7d79);
}

.run-status-awaiting_execution,
.run-status-paused {
  background: rgba(120, 93, 20, 0.12);
  color: #6f5514;
}

.run-status-completed {
  background: rgba(11,125,121,0.18);
  color: var(--teal-strong);
}

.run-status-failed,
.run-status-cancelled {
  background: rgba(153, 83, 55, 0.14);
  color: var(--color-danger);
}

.comparison-card {
  background:
    radial-gradient(circle at top left, rgba(11,125,121,0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 254, 251, 0.96), rgba(244, 235, 223, 0.94));
}

.comparison-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.comparison-card h4 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.trust-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hardware-copy,
.contributor-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.export-row {
  margin-bottom: 16px;
}

.decision-toolbar {
  align-items: flex-start;
  margin: 12px 0 14px;
}

.export-disclosure {
  position: relative;
}

.export-disclosure > summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--button-height);
  padding: 0 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

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

.export-disclosure > summary::after {
  content: "+";
  margin-left: 10px;
  color: var(--color-text-muted);
}

.export-disclosure[open] > summary::after {
  content: "-";
}

.export-disclosure[open] > div {
  margin-top: 8px;
}

.saved-views-shell {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.saved-views-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  box-shadow: none;
}

.saved-views-card h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.saved-views-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.family-knee-surface {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
}

.family-comparison-disclosure .family-knee-surface {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.family-knee-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.family-knee-title h3 {
  margin: 2px 0 0;
  font-size: 1.08rem;
}

.family-knee-title p {
  max-width: 280px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: right;
}

.family-knee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.family-knee-selector {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.family-knee-selector p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.family-knee-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-knee-toggle {
  display: grid;
  gap: 2px;
  min-width: min(190px, 100%);
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
  color: var(--color-text);
  text-align: left;
}

.family-knee-toggle:hover,
.family-knee-toggle:focus-visible,
.family-knee-toggle.is-active {
  border-color: rgba(11,125,121,0.5);
  background: var(--color-accent-soft);
}

.family-knee-toggle strong,
.family-knee-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.family-knee-toggle span {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.family-knee-toggle.reset-toggle {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--color-text-muted);
}

.family-knee-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.family-knee-header {
  display: grid;
  gap: 10px;
}

.family-knee-header label,
.family-knee-metrics small {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.family-knee-header h4 {
  margin: 2px 0;
  font-size: 1.02rem;
}

.family-knee-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

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

.family-knee-metrics span {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.family-knee-metrics strong {
  display: block;
  margin-top: 4px;
}

.family-knee-quant-list {
  display: grid;
  gap: 6px;
}

.family-knee-quant-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) auto;
  gap: 4px 8px;
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  text-align: left;
}

.family-knee-quant-row:hover,
.family-knee-quant-row:focus-visible,
.family-knee-quant-row.is-focused {
  border-color: rgba(11,125,121,0.44);
  background: var(--color-accent-soft);
}

.family-knee-quant-row span,
.family-knee-quant-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.family-knee-quant-row small {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
}

.saved-view-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
}

.saved-view-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.saved-view-row:last-of-type {
  padding-bottom: 0;
}

.saved-view-copy {
  min-width: 0;
}

.saved-view-copy strong,
.saved-view-copy span {
  display: block;
}

.saved-view-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.activity-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(14,16,10,0.1);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.94), rgba(244, 235, 223, 0.94));
  box-shadow: var(--shadow-md);
}

.activity-card h4 {
  margin: 0 0 6px;
}

.activity-card p {
  margin: 6px 0 0;
}

.cloud-command {
  margin-top: 10px;
}

.build-cold-goal {
  display: block;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 0 0 18px;
}

.build-cold-goal[hidden] {
  display: none;
}

.build-cold-goal-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.build-cold-goal h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.build-cold-goal-body {
  margin: 0 0 10px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.evidence-run-queue:empty {
  display: none;
}

.evidence-queue-loading {
  color: var(--text-muted);
  font-size: 0.86rem;
  padding: 0.7rem 0;
}

.evidence-queue-rail {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  margin: 0 0 1rem;
  padding: 1rem;
}

.evidence-queue-heading,
.evidence-queue-row {
  display: grid;
  align-items: center;
  gap: 0.8rem;
}

.evidence-queue-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 0.75rem;
}

.evidence-queue-heading h3,
.evidence-queue-heading p {
  margin: 0.15rem 0 0;
}

.evidence-queue-heading > div > p:last-child {
  color: var(--text-muted);
  font-size: 0.84rem;
  max-width: 70ch;
}

.evidence-queue-list {
  border-top: 1px solid var(--border);
}

.evidence-queue-calibrations {
  border-top: 1px solid var(--border);
  padding: 0.65rem 0;
}

.evidence-queue-calibrations-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.evidence-queue-calibrations-heading strong {
  color: var(--color-text);
  font-size: 0.84rem;
}

.evidence-queue-calibrations-heading small {
  color: var(--color-text-muted);
}

.evidence-queue-calibration {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) repeat(3, auto) auto;
  align-items: center;
  gap: 0.5rem 0.8rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line-soft);
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.evidence-queue-calibrations-heading + .evidence-queue-calibration {
  border-top: 0;
}

.evidence-queue-calibration strong,
.evidence-queue-calibration small {
  display: block;
}

.evidence-queue-calibration strong {
  color: var(--color-text);
  font-size: 0.84rem;
}

.evidence-queue-calibration-more {
  grid-column: 1 / -1;
}

.evidence-queue-calibration-more summary {
  cursor: pointer;
  width: max-content;
}

.evidence-queue-calibration-more p {
  margin: 0.3rem 0 0;
}

.capability-headroom {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.capability-headroom i {
  display: inline-flex;
  width: 2.6rem;
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 18%, transparent);
}

.capability-headroom b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.evidence-queue-row {
  grid-template-columns: 1.6rem minmax(0, 1fr) 3.2rem auto;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.evidence-queue-row.is-top {
  background: color-mix(in srgb, var(--success) 6%, transparent);
}

.evidence-queue-rank,
.evidence-queue-score {
  color: var(--text-muted);
  text-align: center;
}

.evidence-queue-score strong,
.evidence-queue-score small,
.evidence-queue-copy strong,
.evidence-queue-copy span,
.evidence-queue-copy small {
  display: block;
}

.evidence-queue-copy span,
.evidence-queue-copy small,
.evidence-queue-score small {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 0.15rem;
}

.evidence-queue-copy strong .evidence-queue-freshness {
  display: inline-block;
  margin: 0 0 0 0.45rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: 0.08rem;
}

.evidence-queue-method {
  margin-top: 0.7rem;
}

.evidence-queue-agent-handoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
}

.evidence-queue-agent-handoff span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

@media (max-width: 720px) {
  .evidence-queue-heading {
    grid-template-columns: 1fr;
  }

  .evidence-queue-row {
    grid-template-columns: 1.4rem minmax(0, 1fr) 2.8rem;
  }

  .evidence-queue-row button {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

  .evidence-queue-calibrations-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .evidence-queue-calibration > div,
  .evidence-queue-calibration > .chip {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.build-cold-goal-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.build-cold-goal-list em {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text, inherit);
}

.model-picker-shell {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.6fr);
  gap: 12px;
  margin-bottom: 4px;
}

.model-picker-cards,
.model-picker-starter-grid {
  display: grid;
  gap: 10px;
}

.model-picker-card,
.model-picker-starter-card,
.model-picker-custom-card {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-strong);
  color: var(--color-text);
  text-align: left;
  box-shadow: none;
}

.model-picker-card,
.model-picker-starter-card {
  cursor: pointer;
}

.model-picker-card:hover,
.model-picker-starter-card:hover,
.model-picker-card.is-active,
.model-picker-starter-card.is-active {
  border-color: rgba(11,125,121,0.42);
  background: rgba(11,125,121,0.08);
}

.model-picker-card strong,
.model-picker-starter-card strong,
.model-picker-custom-card strong {
  display: block;
  margin-top: 4px;
}

.model-picker-card small,
.model-picker-starter-card small,
.model-picker-custom-card small {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.model-picker-starter-card em {
  display: block;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 700;
}

.model-picker-starter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.model-picker-starter-heading h3 {
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.35;
}

.model-picker-fallback {
  margin: 0;
}

.hf-trending-disclosure {
  margin-top: 2px;
}

.hf-trending-body {
  padding: 0 14px 14px;
}

.hf-trending-intro,
.hf-trending-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hf-trending-intro p {
  margin: 5px 0 0;
  color: var(--color-text-muted);
}

.hf-trending-boundary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin: 14px 0 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--color-warning);
  background: var(--color-warning-soft);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.hf-trending-boundary strong {
  color: var(--color-text);
}

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

.hf-trending-card {
  position: relative;
  padding: 13px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-strong);
}

.hf-trending-card > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.hf-trending-card strong,
.hf-trending-card small {
  display: block;
  overflow-wrap: anywhere;
}

.hf-trending-card small {
  margin-top: 4px;
  color: var(--color-text-muted);
}

.hf-trending-rank {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.hf-trending-source {
  margin: 10px 0 0;
}

.resolver-summary-card .chip-row {
  margin-top: 12px;
}

.resolver-next-action {
  margin-top: 12px;
}

.resolver-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.resolver-detail-grid div {
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
}

.resolver-detail-grid dt {
  margin: 0 0 4px;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.resolver-detail-grid dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 800;
}

.artifact-fit-ladder {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.artifact-fit-ladder-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.artifact-fit-ladder-heading h4,
.artifact-fit-ladder-heading p {
  margin: 4px 0 0;
}

.artifact-fit-ladder-heading p {
  color: var(--color-text-muted);
}

.artifact-fit-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.artifact-fit-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--color-surface);
}

.artifact-fit-table th,
.artifact-fit-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

.artifact-fit-table th {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.artifact-fit-table tr:last-child td {
  border-bottom: 0;
}

.artifact-fit-table tr.is-selected {
  background: var(--color-surface-muted);
}

.artifact-fit-table td small {
  display: block;
  max-width: 300px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-specialty-disclosure {
  margin-top: 10px;
}

.artifact-specialty-disclosure summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-weight: 800;
}

.artifact-fit-table-secondary {
  margin-top: 10px;
}

.benchmark-preset-grid {
  display: grid;
  gap: 12px;
}

.benchmark-detail-disclosure .panel-meta,
.benchmark-detail-disclosure .card-grid {
  margin-top: 0;
}

.benchmark-preset-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.benchmark-preset-heading strong,
.benchmark-preset-heading span {
  display: block;
}

.benchmark-preset-heading > span {
  color: var(--color-text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
}

.benchmark-chooser-context {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.benchmark-machine-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.benchmark-machine-select select {
  min-width: 210px;
  min-height: 34px;
  padding-block: 5px;
  font-size: 0.82rem;
}

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

.benchmark-preset-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  min-height: 0;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-strong);
  color: var(--color-text);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.benchmark-preset-card:hover,
.benchmark-preset-card.is-active {
  border-color: rgba(11,125,121,0.42);
  background: rgba(11,125,121,0.08);
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.benchmark-preset-card strong,
.benchmark-preset-card small,
.benchmark-preset-card em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.benchmark-preset-title,
.benchmark-preset-title > span,
.benchmark-duration-value,
.benchmark-preset-meta {
  display: flex;
  min-width: 0;
}

.benchmark-preset-title {
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.benchmark-preset-title > span,
.benchmark-duration-value {
  flex-direction: column;
  gap: 3px;
}

.benchmark-preset-title small,
.benchmark-duration-value small,
.benchmark-preset-meta small {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.25;
  margin: 0;
}

.benchmark-recommended-label {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.benchmark-duration-value {
  align-items: end;
  text-align: right;
  white-space: nowrap;
}

.benchmark-duration-value strong {
  font-size: 1rem;
}

.benchmark-duration-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-border);
}

.benchmark-duration-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}

.benchmark-preset-meta {
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 10px;
}

.benchmark-depth-key {
  display: flex;
  align-items: center;
  gap: 4px;
}

.benchmark-depth-key span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.benchmark-depth-key span:not(:last-child)::after {
  content: "";
  width: 18px;
  height: 1px;
  margin-left: 2px;
  background: var(--color-border-strong);
}

.benchmark-depth-key i {
  width: 7px;
  height: 7px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface);
}

.benchmark-depth-key .is-complete i,
.benchmark-depth-key .is-active i {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.benchmark-depth-key .is-active {
  color: var(--color-text);
}

.benchmark-more-goals {
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
}

.benchmark-more-goals > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  list-style: none;
}

.benchmark-more-goals > summary::-webkit-details-marker {
  display: none;
}

.benchmark-more-goals > summary span {
  display: grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  background: var(--color-surface-muted);
}

.benchmark-more-goals[open] > summary {
  margin-bottom: 10px;
}

.benchmark-preset-options-secondary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.benchmark-claim-boundary {
  display: block;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.benchmark-teach-copy {
  margin: 12px 0 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.benchmark-preview-card .benchmark-preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.benchmark-preview-card-compact {
  display: grid;
  gap: 12px;
}

.benchmark-preview-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.benchmark-preview-header h3 {
  margin-bottom: 0;
}

.benchmark-preview-header p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
}

.benchmark-preview-time {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
  white-space: nowrap;
}

.benchmark-preview-time strong {
  font-size: 1.25rem;
}

.benchmark-preview-time small {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.benchmark-timing-basis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.benchmark-preview-metrics div {
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
}

.benchmark-preview-metrics strong,
.benchmark-preview-metrics span {
  display: block;
  overflow-wrap: anywhere;
}

.benchmark-preview-metrics span {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.benchmark-run-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.benchmark-run-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.benchmark-run-list span {
  color: var(--color-text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.benchmark-check-details,
.benchmark-customize-disclosure,
.planned-benchmark-roadmap,
.run-config-details {
  margin-top: 0;
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.benchmark-check-details summary,
.benchmark-customize-disclosure > summary,
.planned-benchmark-roadmap summary,
.run-config-details summary {
  min-height: 38px;
  color: var(--color-text);
}

.benchmark-check-details summary::after,
.benchmark-customize-disclosure > summary::after,
.planned-benchmark-roadmap summary::after,
.run-config-details summary::after,
.benchmark-check-details[open] summary::after,
.planned-benchmark-roadmap[open] summary::after,
.run-config-details[open] summary::after {
  content: "";
  margin-left: 0;
}

.planned-benchmark-roadmap {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
}

.planned-benchmark-roadmap ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.planned-benchmark-roadmap p {
  margin: 0;
  color: var(--color-text-muted);
}

.benchmark-customize-disclosure[open] > summary {
  margin-bottom: 10px;
}

.benchmark-customize-disclosure > .card-grid,
.benchmark-customize-disclosure > .benchmark-detail-disclosure,
.benchmark-customize-disclosure > .story-summary {
  margin-top: 10px;
}

.planned-benchmark-roadmap li {
  display: grid;
  gap: 3px;
}

.planned-benchmark-roadmap span,
.planned-benchmark-roadmap small {
  color: var(--color-text-muted);
}

.planned-benchmark-roadmap span {
  font-weight: 800;
}

.planned-benchmark-roadmap .planned-benchmark-meta,
.planned-benchmark-roadmap .planned-benchmark-access {
  display: block;
}

.planned-benchmark-roadmap .planned-benchmark-access {
  color: var(--color-text-soft);
}

.run-config-card-compact {
  display: grid;
  gap: 10px;
}

.run-config-card-compact header {
  align-items: start;
  flex-wrap: wrap;
}

.run-config-card-compact h4,
.run-config-card-compact p {
  overflow-wrap: anywhere;
}

.run-config-card-compact header > div:first-child {
  min-width: 0;
}

.run-config-card-compact header .muted,
.run-config-brief {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.run-config-scope-line {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.run-config-primary-actions {
  align-items: stretch;
}

.run-config-primary-actions button {
  flex: 1 1 auto;
}

.run-config-detail-copy {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.run-config-detail-copy p {
  margin: 0;
}

.run-config-detail-copy .mono {
  overflow-wrap: anywhere;
  white-space: normal;
}

.model-picker-card strong,
.model-picker-starter-card strong,
.model-picker-custom-card strong,
.config-summary-card strong,
.config-summary-card .mono {
  overflow-wrap: anywhere;
}

.build-step-indicator,
.explore-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.explore-shell-panel .explore-nav {
  margin-bottom: 0;
}

.build-step-indicator span,
.explore-nav button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(14,16,10,0.12);
  background: rgba(255, 254, 251, 0.68);
  color: var(--color-text-muted);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.build-step-indicator span.is-active,
.explore-nav button.is-active {
  border-color: rgba(11,125,121,0.24);
  background: rgba(11,125,121,0.1);
  color: var(--color-accent, #0b7d79);
}

.build-step {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.build-step[hidden] {
  display: none !important;
}

.builder-panel {
  overflow: visible;
}

.build-step-actions {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface, var(--panel)) 94%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.build-step-actions .build-next-button,
.build-step-actions button[type="submit"] {
  min-width: 210px;
}

.runtime-compatibility-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(11, 125, 121, 0.22);
  border-radius: 12px;
  background: rgba(11, 125, 121, 0.07);
}

.runtime-compatibility-callout.is-blocked {
  border-color: rgba(187, 91, 20, 0.32);
  background: rgba(187, 91, 20, 0.08);
}

.runtime-compatibility-callout p {
  margin: 0;
}

.builder-span-full {
  grid-column: 1 / -1;
}

.builder-span-2 {
  grid-column: span 2;
}

.form-section-title {
  grid-column: 1 / -1;
  padding: 14px 16px 4px;
  border-top: 1px solid var(--line-soft);
}

.form-section-title:first-child {
  border-top: none;
  padding-top: 0;
}

.form-section-title span {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.form-section-title p {
  margin: 5px 0 0;
  color: var(--muted);
}

.field-group {
  margin: 0;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: var(--color-surface-strong);
}

.field-group legend {
  padding: 0 6px;
  color: var(--muted);
}

.field-group label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.filters-actions,
.builder-actions {
  display: flex;
  align-items: end;
}

.builder-actions-stack {
  flex-direction: column;
  align-items: stretch;
  justify-content: end;
  gap: 8px;
}

.builder-actions-stack .panel-meta {
  margin: 0;
}

.advanced-details {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  box-shadow: none;
}

.advanced-details summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 700;
}

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

.advanced-details summary::after {
  content: "+";
  margin-left: 10px;
  color: var(--muted);
  font-weight: 400;
}

.advanced-details[open] summary::after {
  content: "-";
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}

.builder-subsection-title {
  padding-left: 0;
  padding-right: 0;
}

.preview-header {
  margin-top: 20px;
}

.config-summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
}

.handoff-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.command-panel,
.code-panel {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  line-height: 1.55;
}

.command-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #0c1011;
  color: #a8b4b0;
  font-size: 0.82rem;
  overflow-x: auto;
}

.code-panel {
  min-height: 320px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #0c1011;
  color: #a8b4b0;
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.54);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

thead th {
  position: sticky;
  top: 0;
  background: rgba(247, 241, 232, 0.96);
  backdrop-filter: blur(10px);
}

th {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty-state {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(14,16,10,0.2);
  background: linear-gradient(135deg, rgba(11,125,121,0.08), rgba(73, 98, 118, 0.08));
}

.hidden {
  display: none !important;
}

[data-dashboard-panel][hidden] {
  display: none !important;
}

details:not([open]) > :not(summary) {
  display: none !important;
  visibility: hidden !important;
}

.recommendation-action-note {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.sync-meta {
  margin-top: 8px;
  min-height: 1.3rem;
}

.auth-meta {
  min-height: 1.3rem;
}

.sync-meta.is-live {
  color: var(--color-accent, #0b7d79);
}

.sync-meta.is-error {
  color: var(--accent-strong);
}

.auth-meta.is-live {
  color: var(--color-accent, #0b7d79);
}

.auth-meta.is-error {
  color: var(--accent-strong);
}

.mono {
  font-family: var(--mono);
}

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

.loading-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(14,16,10,0.08);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.88), rgba(244, 235, 223, 0.88));
  box-shadow: var(--shadow-md);
}

.loading-line {
  position: relative;
  height: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(14,16,10,0.08);
}

.loading-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: shimmer 1.3s ease-in-out infinite;
}

.loading-line.short {
  width: 42%;
}

.loading-line.tall {
  width: 56%;
  height: 34px;
}

.loading-line.large {
  width: 78%;
}

body.is-syncing .signal-card,
body.is-syncing .result-card,
body.is-syncing .run-config-card,
body.is-syncing .story-highlight,
body.is-syncing .stat-card {
  filter: saturate(0.92);
}

.toast-stack {
  position: fixed;
  right: 18px;
  top: calc(18px + env(safe-area-inset-top, 0px));
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(14,16,10,0.12);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  animation: toast-in 220ms ease;
}

.toast.good {
  border-color: rgba(11,125,121,0.2);
  background: linear-gradient(135deg, rgba(240, 252, 249, 0.98), rgba(232, 245, 241, 0.96));
}

.toast.bad {
  border-color: rgba(153, 83, 55, 0.22);
  background: linear-gradient(135deg, rgba(255, 244, 239, 0.98), rgba(251, 233, 224, 0.96));
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1280px) {
  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-panel,
  .control-summary,
  .recommendation-panel,
  .explore-overview-panel,
  .results-panel,
  .methodology-panel,
  .builder-panel,
  .compare-panel,
  .runs-panel,
  .story-panel,
  .run-configs-panel,
  .community-panel,
  .my-runs-panel {
    grid-column: auto;
  }
}

@media (max-width: 1080px) {
  /* Sidebar collapses at 1080px — handled by the 960px breakpoint above */
}

@media (max-width: 920px) {
  .signal-strip,
  .loading-grid,
  .stats-grid,
  .workbench-shell,
  .recommendation-columns,
  .filters-grid,
  .filter-primary,
  .advanced-filter-grid,
  .build-step,
  .builder-grid,
  .advanced-grid,
  .config-summary-grid,
  .metric-grid,
  .decision-notes,
  .comparison-grid,
  .explore-family-grid,
  .compare-grid,
  .run-observer-grid,
  .hardware-evidence-card,
  .plot-selected-summary,
  .plot-summary-grid,
  .methodology-grid,
  .methodology-lanes dl,
  .plot-legend {
    grid-template-columns: 1fr;
  }

  .answer-first-panel,
  .answer-first-controls,
  .recommendation-intake-hero .answer-first-controls,
  .recommend-evidence-grid {
    grid-template-columns: 1fr;
  }

  .answer-preset-row {
    grid-column: 1;
  }

  .answer-preset-button {
    flex: 1 1 100%;
  }

  .answer-first-controls button {
    width: 100%;
  }

  .recommend-evidence-topline {
    display: grid;
  }

  .hardware-evidence-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .benchmark-preset-grid,
  .benchmark-preset-options {
    grid-template-columns: 1fr;
  }

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

  .benchmark-preview-header {
    flex-direction: column;
  }

  .benchmark-preview-time {
    justify-items: start;
    text-align: left;
  }

  .benchmark-preset-heading {
    align-items: start;
    flex-direction: column;
  }

  .benchmark-chooser-context {
    justify-items: start;
    width: 100%;
  }

  .benchmark-machine-select,
  .benchmark-machine-select select {
    width: 100%;
  }

  .benchmark-preset-heading > span {
    text-align: left;
  }

  .hero-copy,
  .panel {
    padding: 18px;
  }

  .inline-form,
  .button-row,
  .dashboard-tabs {
    flex-direction: column;
  }

  .next-action-rail {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header,
  .header-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .account-popover {
    width: min(100%, 340px);
    right: 0;
    left: auto;
  }

  .hero h1 {
    max-width: none;
  }

  .builder-span-2 {
    grid-column: 1 / -1;
  }

  .plot-frame {
    grid-template-columns: 1fr;
  }

  .plot-axis-y {
    writing-mode: initial;
    transform: none;
    justify-self: start;
  }

  .plot-area {
    min-height: 220px;
  }

  .plot-point span {
    min-width: 96px;
    font-size: 0.72rem;
  }

  .toast-stack {
    top: auto;
    right: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    width: auto;
    max-height: min(30vh, 220px);
    overflow-y: auto;
  }

  .toast {
    padding: 11px 12px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.3;
  }
}

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

/* Sprint 04+ theme system — updated for v3 colorway alignment */

:root {
  --font-sans: "Inter Tight", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "IBM Plex Mono", Menlo, Consolas, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(14, 16, 10, 0.05);
  --shadow-md: 0 3px 10px rgba(14, 16, 10, 0.06), 0 1px 2px rgba(14, 16, 10, 0.04);
  --shadow-lg: 0 4px 18px rgba(14, 16, 10, 0.09), 0 2px 5px rgba(14, 16, 10, 0.05);
  --color-bg: #f7f3ec;
  --color-bg-accent: #f1ebe1;
  --color-surface: #fffcf6;
  --color-surface-muted: #f1ebe1;
  --color-surface-strong: #fffcf6;
  --color-code-surface: #111511;
  --color-code-border: #30362f;
  --color-border: #e1d8c8;
  --color-border-strong: #cfc4b1;
  --color-border-soft: #ece4d4;
  --color-text: #171813;
  --color-text-muted: #666358;
  --color-text-soft: #8f897b;
  --color-accent: #1f7a72;
  --color-accent-strong: #15514c;
  --color-accent-soft: #ecf5f3;
  --color-success: #15783b;
  --color-success-strong: #0f5c2d;
  --color-success-soft: #ebfaf2;
  --color-warning: #94620c;
  --color-warning-soft: #fbefd9;
  --color-danger: #ad3d32;
  --color-danger-soft: #fdecea;
  --color-info: #3159c8;
  --color-info-soft: #eef2fb;
  --sidebar-bg: #101211;
  --sidebar-border: #30362f;
  --sidebar-surface: #171a18;
  --sidebar-surface-active: #1d211f;
  --sidebar-text: #eeece4;
  --sidebar-muted: #8f897b;
  --bg-top: var(--color-bg);
  --bg-bottom: var(--color-bg);
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --panel: var(--color-surface);
  --panel-strong: var(--color-surface-muted);
  --panel-border: var(--color-border);
  --panel-border-hi: var(--color-border-strong);
  --line-soft: rgba(101, 91, 76, 0.08);
  --page-glow-primary: rgba(31, 122, 114, 0.1);
  --page-glow-secondary: rgba(148, 98, 12, 0.06);
  --page-glow-center: rgba(255, 252, 246, 0.42);
  --page-gradient-bottom: #f1ebe1;
  --card-gradient-top: #fffcf6;
  --card-gradient-bottom: #f1ebe1;
  --primary-card-gradient-top: rgba(31, 122, 114, 0.07);
  --primary-card-gradient-bottom: #f1ebe1;
  --accent: var(--color-accent);
  --accent-strong: var(--color-accent-strong);
  --accent-soft: var(--color-accent-soft);
  --accent-glow: rgba(31, 122, 114, 0.18);
  --teal: var(--color-accent);
  --teal-strong: var(--color-accent-strong);
  --teal-soft: var(--color-accent-soft);
  --code: var(--color-code-surface);
  --code-ink: #f7f3e9;
  --sans: var(--font-sans);
  --mono: var(--font-mono);
  --serif: var(--font-sans);
  --sb: var(--sidebar-bg);
  --sb-b: var(--sidebar-border);
  --sb-t: var(--sidebar-text);
  --sb-m: var(--sidebar-muted);
  --sb-h: var(--sidebar-surface);
  --sb-a: var(--sidebar-surface-active);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #101211;
    --bg-bottom: #171a18;
    --ink: #eeece4;
    --muted: #aaa69a;
    --panel: #171a18;
    --panel-strong: #1d211f;
    --panel-border: #30362f;
    --panel-border-hi: #454c43;
    --accent: #58c7bd;
    --accent-strong: #7adbd2;
    --accent-soft: #13302d;
    --accent-glow: rgba(88, 199, 189, 0.18);
    --teal: #58c7bd;
    --teal-strong: #7adbd2;
    --teal-soft: #13302d;
    --code: #0f1210;
    --code-ink: #eeece4;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.34);
    --shadow-md: 0 3px 10px rgba(0, 0, 0, 0.26), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 18px rgba(0, 0, 0, 0.34), 0 2px 5px rgba(0, 0, 0, 0.22);
    --sb: #101211;
    --sb-b: #30362f;
    --sb-t: #eeece4;
    --sb-m: #7f7a70;
    --sb-h: #171a18;
    --sb-a: #1d211f;
    --color-bg: #101211;
    --color-bg-accent: #242925;
    --color-surface: #171a18;
    --color-surface-muted: #242925;
    --color-surface-strong: #1d211f;
    --color-code-surface: #0f1210;
    --color-code-border: #30362f;
    --color-border: #30362f;
    --color-border-strong: #454c43;
    --color-border-soft: #262b25;
    --color-text: #eeece4;
    --color-text-muted: #aaa69a;
    --color-text-soft: #7f7a70;
    --color-accent: #58c7bd;
    --color-accent-strong: #7adbd2;
    --color-accent-soft: #13302d;
    --color-success: #6cc688;
    --color-success-strong: #9bdcab;
    --color-success-soft: rgba(108, 198, 136, 0.16);
    --color-warning: #e0ad54;
    --color-warning-soft: rgba(224, 173, 84, 0.14);
    --color-danger: #ef7a6e;
    --color-danger-soft: rgba(239, 122, 110, 0.14);
    --color-info: #86a2ff;
    --color-info-soft: rgba(134, 162, 255, 0.16);
    --sidebar-bg: #101211;
    --sidebar-border: #30362f;
    --sidebar-surface: #171a18;
    --sidebar-surface-active: #1d211f;
    --sidebar-text: #eeece4;
    --sidebar-muted: #7f7a70;
    --accent-glow: rgba(88, 199, 189, 0.18);
    --line-soft: rgba(238, 236, 228, 0.08);
    --page-glow-primary: rgba(88, 199, 189, 0.08);
    --page-glow-secondary: rgba(224, 173, 84, 0.06);
    --page-glow-center: rgba(36, 41, 37, 0.22);
    --page-gradient-bottom: #171a18;
    --card-gradient-top: var(--color-surface);
    --card-gradient-bottom: var(--color-surface-muted);
    --primary-card-gradient-top: rgba(88, 199, 189, 0.1);
    --primary-card-gradient-bottom: var(--color-surface-muted);
    --code-ink: #eeece4;
  }
}

html[data-theme="light"] {
  --color-bg: #f7f3ec;
  --color-bg-accent: #f1ebe1;
  --color-surface: #fffaf0;
  --color-surface-muted: #efe7d8;
  --color-surface-strong: #fffdf7;
  --color-code-surface: #111511;
  --color-code-border: #30362f;
  --color-border: #d9cfbc;
  --color-border-strong: #bfb19a;
  --color-border-soft: #e8ddca;
  --color-text: #171813;
  --color-text-muted: #666358;
  --color-text-soft: #8f897b;
  --color-accent: #1f7a72;
  --color-accent-strong: #15514c;
  --color-accent-soft: #ecf5f3;
  --color-success: #15783b;
  --color-success-strong: #0f5c2d;
  --color-success-soft: #ebfaf2;
  --color-warning: #94620c;
  --color-warning-soft: #fbefd9;
  --color-danger: #ad3d32;
  --color-danger-soft: #fdecea;
  --color-info: #3159c8;
  --color-info-soft: #eef2fb;
  --line-soft: rgba(101, 91, 76, 0.08);
  --accent-glow: rgba(31, 122, 114, 0.18);
  --page-glow-primary: rgba(31, 122, 114, 0.1);
  --page-glow-secondary: rgba(148, 98, 12, 0.06);
  --page-glow-center: rgba(255, 252, 246, 0.42);
  --page-gradient-bottom: #f1ebe1;
  --card-gradient-top: #fffdf7;
  --card-gradient-bottom: #efe7d8;
  --primary-card-gradient-top: rgba(31, 122, 114, 0.08);
  --primary-card-gradient-bottom: #efe7d8;
  --code-ink: #f7f3e9;
  --sb: #101211;
  --sb-b: #30362f;
  --sb-t: #eeece4;
  --sb-m: #aaa69a;
  --sb-h: #171a18;
  --sb-a: #1d211f;
  --shadow-sm: 0 1px 3px rgba(45, 36, 22, 0.05);
  --shadow-md: 0 8px 20px rgba(45, 36, 22, 0.06), 0 1px 4px rgba(45, 36, 22, 0.04);
  --shadow-lg: 0 12px 30px rgba(45, 36, 22, 0.07), 0 1px 5px rgba(45, 36, 22, 0.05);
}

html[data-theme="dark"] {
  --bg-top: #101211;
  --bg-bottom: #171a18;
  --ink: #eeece4;
  --muted: #aaa69a;
  --panel: #171a18;
  --panel-strong: #1d211f;
  --panel-border: #30362f;
  --panel-border-hi: #454c43;
  --accent: #58c7bd;
  --accent-strong: #7adbd2;
  --accent-soft: #13302d;
  --accent-glow: rgba(88, 199, 189, 0.18);
  --teal: #58c7bd;
  --teal-strong: #7adbd2;
  --teal-soft: #13302d;
  --code: #0f1210;
  --code-ink: #eeece4;
  --sb: #101211;
  --sb-b: #30362f;
  --sb-t: #eeece4;
  --sb-m: #7f7a70;
  --sb-h: #171a18;
  --sb-a: #1d211f;
  --color-bg: #101211;
  --color-bg-accent: #242925;
  --color-surface: #171a18;
  --color-surface-muted: #242925;
  --color-surface-strong: #1d211f;
  --color-code-surface: #0f1210;
  --color-code-border: #30362f;
  --color-border: #30362f;
  --color-border-strong: #454c43;
  --color-border-soft: #262b25;
  --color-text: #eeece4;
  --color-text-muted: #aaa69a;
  --color-text-soft: #7f7a70;
  --color-accent: #58c7bd;
  --color-accent-strong: #7adbd2;
  --color-accent-soft: #13302d;
  --color-success: #6cc688;
  --color-success-strong: #9bdcab;
  --color-success-soft: rgba(108, 198, 136, 0.16);
  --color-warning: #e0ad54;
  --color-warning-soft: rgba(224, 173, 84, 0.14);
  --color-danger: #ef7a6e;
  --color-danger-soft: rgba(239, 122, 110, 0.14);
  --color-info: #86a2ff;
  --color-info-soft: rgba(134, 162, 255, 0.16);
  --sidebar-bg: #101211;
  --sidebar-border: #30362f;
  --sidebar-surface: #171a18;
  --sidebar-surface-active: #1d211f;
  --sidebar-text: #eeece4;
  --sidebar-muted: #7f7a70;
  --line-soft: rgba(238, 236, 228, 0.08);
  --accent-glow: rgba(88, 199, 189, 0.18);
  --page-glow-primary: rgba(88, 199, 189, 0.08);
  --page-glow-secondary: rgba(224, 173, 84, 0.06);
  --page-glow-center: rgba(36, 41, 37, 0.22);
  --page-gradient-bottom: #171a18;
  --card-gradient-top: var(--color-surface);
  --card-gradient-bottom: var(--color-surface-muted);
  --primary-card-gradient-top: rgba(88, 199, 189, 0.1);
  --primary-card-gradient-bottom: var(--color-surface-muted);
  --code-ink: #eeece4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 3px 10px rgba(0, 0, 0, 0.26), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 18px rgba(0, 0, 0, 0.34), 0 2px 5px rgba(0, 0, 0, 0.22);
}

html {
  scroll-behavior: auto;
  scrollbar-color: var(--color-border-strong) var(--color-surface-muted);
}

@media (prefers-color-scheme: dark) {
  /* Keep every elevated surface on the dark token set, even if an older
     light-mode gradient rule would otherwise leak through on a future refactor. */
  .story-rail-card,
  .workflow-mini-card,
  .signal-card,
  .stat-card,
  .result-card,
  .run-config-card,
  .config-summary-card,
  .handoff-card,
  .activity-card,
  .comparison-card,
  .metric,
  .field-group,
  .recommendation-control-panel,
  .explore-family-card,
  .advanced-details,
  .table-wrap,
  .loading-card,
  .empty-state,
  .local-step-card,
  .saved-views-card,
  .setup-summary-card,
  .setup-next-card,
  .setup-step {
    background: var(--color-surface);
    color: var(--color-text);
  }

  .story-rail-card span,
  .local-step-card strong,
  .local-step-card p {
    color: var(--color-text);
  }

  .story-highlight,
  .decision-card {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  }

  .dashboard-tabs,
  .account-popover,
  .settings-section,
  .auth-modal-card,
  .toast,
  .capability-basis-strip,
  .plot-selected-summary,
  .plot-summary-grid div,
  .plot-legend-card {
    background: var(--color-surface-strong);
    color: var(--color-text);
  }
}

body {
  background: var(--color-bg, var(--bg-top));
  color: var(--color-text, var(--ink));
  font-family: "Inter Tight", -apple-system, sans-serif;
  text-rendering: optimizeLegibility;
}

.hero-badges,
.workflow-mini {
  display: none !important;
}

::selection {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

/* ── v2 SHELL: sidebar + main ── */

.app-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}

/* SIDEBAR */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sb);
  border-right: 1px solid var(--sb-b);
  padding: 16px 10px 12px;
  overflow-y: auto;
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid var(--sb-b);
  margin-bottom: 10px;
}

.sidebar-brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--color-accent, #0b7d79), var(--color-accent-strong, #095f5b));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sidebar-brand-name {
  color: var(--sb-t);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sidebar-brand-sub {
  color: var(--sb-m);
  font-size: 10px;
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.sidebar-nav-group {
  padding: 12px 8px 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sb-m);
}

.sidebar-nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-grow {
  flex: 1;
}

.sidebar-footer {
  border-top: 1px solid var(--sb-b);
  padding: 12px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-public-links {
  display: grid;
  gap: 4px;
  padding: 0 8px;
}

.sidebar-public-links a {
  color: var(--sb-m);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.sidebar-public-links a:hover {
  color: var(--sb-t);
}

/* Account button in sidebar context */
.sidebar-account-btn {
  width: 100%;
  min-width: unset;
  min-height: unset;
  gap: 9px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(238, 236, 228, 0.1);
  border-radius: var(--radius-sm);
  box-shadow: none;
  color: var(--sb-t);
}

.sidebar-account-btn:hover {
  background: var(--sb-h);
  border-color: rgba(238, 236, 228, 0.18);
  color: var(--sb-t);
  box-shadow: none;
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  background: #1d2a2e;
  color: #bcc8c5;
  font-size: 11px;
}

.sidebar-account-copy strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sb-t);
}

.sidebar-account-copy span {
  font-size: 10.5px;
  color: var(--sb-m);
}

/* Connection status in sidebar */
.sidebar-connection-status {
  padding: 0 2px;
}

.sidebar-connection-status .state-sync {
  width: 100%;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  background: #0e1618;
  border-color: var(--sb-b);
  color: var(--sb-m);
  justify-content: flex-start;
}

/* Sidebar nav tabs override */
.app-sidebar .dashboard-tabs {
  position: static;
  top: unset;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  animation: none;
  gap: 1px;
}

.app-sidebar .dashboard-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--sb-m);
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: background 120ms ease, color 120ms ease;
  position: relative;
}

.app-sidebar .dashboard-tab:hover {
  background: var(--sb-h);
  color: #c5cdc9;
}

.app-sidebar .dashboard-tab.is-active {
  background: var(--sb-a);
  color: var(--sb-t);
  font-weight: 600;
}

.app-sidebar .dashboard-tab.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 2.5px;
  background: var(--color-accent, #0b7d79);
  border-radius: 0 2px 2px 0;
}

.app-sidebar .dashboard-tab.is-active .sidebar-nav-icon {
  opacity: 1;
  color: #7fd3cd;
}

/* COMMAND BAR */
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  background: var(--color-bg, var(--bg-top));
}

.cmdbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 24px 0;
  background: color-mix(in srgb, var(--color-bg, var(--bg-top)) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border, var(--panel-border));
}

.cmdbar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.cmdbar-top > div:first-child {
  min-width: 0;
}

.cmdbar-eyebrow {
  margin: 0 0 3px;
}

.cmdbar-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  overflow-wrap: break-word;
}

.cmdbar-grow {
  flex: 1;
}

.cmdbar-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

body.is-focused-surface .cmdbar {
  align-items: flex-end;
  min-height: 54px;
  padding: 10px 24px 0;
  background: transparent;
  border-bottom: 0;
  pointer-events: none;
}

body.is-focused-surface .cmdbar-top {
  justify-content: flex-end;
  width: 100%;
  padding-bottom: 0;
  pointer-events: auto;
}

body.is-focused-surface .cmdbar-title-group,
body.is-focused-surface .cmdbar-grow,
body.is-focused-surface .cmdbar-row2 {
  display: none;
}

.cmdbar-row2 {
  padding-bottom: 10px;
}

/* Next-action rail in cmdbar context — compact */
.cmdbar-next-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 16px;
  border-radius: var(--radius-md);
  margin: 0;
}

.cmdbar-next-action .eyebrow {
  display: none;
}

.cmdbar-next-action p {
  display: none;
}

.cmdbar-next-action h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text-muted, var(--muted));
}

.cmdbar-next-action button {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 5px 11px;
  font-size: 12px;
}

/* ── v2 HOME OVERVIEW HERO ── */

.ov-hero-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

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

/* Dark hero card */
.ov-dark {
  background: linear-gradient(160deg, #0d1a19 0%, #0a1415 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #1c2d2b;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
  gap: 16px;
  position: relative;
  overflow: hidden;
  min-height: 190px;
  justify-content: center;
}

.ov-dark::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at 80% 10%, rgba(11, 125, 121, 0.22) 0%, transparent 65%);
  pointer-events: none;
}

.ov-dark-eye {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5fb8b2;
  margin: 0;
}

.ov-dark-q {
  max-width: 760px;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: #e5ecea;
  margin: 0;
}

.ov-dark-q em {
  font-style: normal;
  color: #7fd3cd;
}

.ov-dark-sub {
  max-width: 760px;
  font-size: 13px;
  color: #9bb8b5;
  line-height: 1.45;
  margin: 0;
}

.ov-dark-btns {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn-on-dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  background: var(--color-accent, #0b7d79);
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 120ms ease;
}

.ov-dark .btn-on-dark {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 13px;
}

.btn-on-dark:hover {
  background: var(--color-accent-strong, #095f5b);
}

.btn-ghost-on-dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: #a5c8c5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease;
}

.ov-dark .btn-ghost-on-dark {
  min-height: 42px;
  padding: 10px 14px;
}

.btn-ghost-on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Metric tiles */
.ov-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.ov-readiness-disclosure {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ov-readiness-disclosure > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  color: var(--color-text);
  font-weight: 650;
}

.ov-readiness-disclosure > summary small {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: right;
}

.ov-readiness-disclosure[open] > summary {
  border-bottom: 1px solid var(--color-border);
}

.ov-readiness-disclosure .ov-tiles,
.ov-readiness-disclosure .ov-pipeline {
  margin: 12px;
}

.ov-tile {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2ded5);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ov-tile-l {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-text-muted, #686660);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ov-tile-v {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text, #161810);
}

.ov-tile-s {
  font-size: 11.5px;
  color: var(--color-text-muted, #686660);
}

/* Pipeline lane */
.ov-pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border, #e2ded5);
  border: 1px solid var(--color-border, #e2ded5);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ov-pip-step {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 15px;
  background: var(--color-surface, #fff);
}

.ov-pip-step.is-done {
  background: var(--color-success-soft, #ebfaf2);
}

.ov-pip-step.is-live {
  background: var(--color-accent-soft, #e8f5f3);
}

.ov-pip-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border, #e2ded5);
  background: var(--color-surface-muted, #f9f8f5);
  color: var(--color-text-muted, #686660);
  font-size: 11.5px;
  font-weight: 700;
}

.ov-pip-step.is-done .ov-pip-num {
  background: var(--color-success-soft, #ebfaf2);
  color: var(--color-success, #15783b);
  border-color: rgba(21, 120, 59, 0.28);
}

.ov-pip-step.is-live .ov-pip-num {
  background: var(--color-accent-soft, #e8f5f3);
  color: var(--color-accent, #0b7d79);
  border-color: rgba(11, 125, 121, 0.28);
}

.ov-pip-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text, #161810);
}

.ov-pip-sub {
  font-size: 11.5px;
  color: var(--color-text-muted, #686660);
}

/* Responsive: stack hero on narrow screens */
@media (max-width: 840px) {
  .ov-hero {
    grid-template-columns: 1fr;
  }

  .ov-tiles {
    grid-template-columns: repeat(3, 1fr);
    align-content: unset;
  }

  .ov-pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .ov-readiness-disclosure > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .ov-readiness-disclosure > summary small {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .ov-dark {
    min-height: 0;
    padding: 20px;
  }

  .ov-dark-q {
    font-size: 1.85rem;
  }

  .ov-dark-sub {
    font-size: 0.92rem;
  }

  .ov-dark-btns {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ov-dark .btn-on-dark,
  .ov-dark .btn-ghost-on-dark {
    justify-content: center;
    width: 100%;
  }

  .ov-tiles {
    grid-template-columns: 1fr 1fr;
  }

  .ov-pipeline {
    grid-template-columns: 1fr;
  }
}

/* Legacy .app-header stub — element replaced by .cmdbar in v2 shell.
   Rule retained at z-index:90 because test assertions check for it. */
.app-header {
  z-index: 90;
  display: none;
}

/* Page content area */
.page-shell {
  width: 100%;
  max-width: 1480px;
  padding: 16px 24px 56px;
}

.skip-link {
  position: absolute;
  left: 18px;
  top: 10px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
  color: var(--color-text);
  z-index: 40;
  transition: transform 140ms ease;
}

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

.app-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.app-brand {
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.app-header p,
.panel-meta,
.subheading p,
.preview-header p,
.empty-state p,
.handoff-header p,
.story-summary p,
.workflow-mini-card p,
.story-rail-card p,
.muted {
  color: var(--color-text-muted);
  font-family: var(--font-sans);
}

.app-header p {
  margin: 6px 0 0;
  max-width: 60ch;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-left: auto;
}

.account-shell {
  position: relative;
}

.account-button,
.button-secondary {
  background: var(--color-surface-strong);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  min-height: 44px;
  padding: 6px 10px;
}

.account-button:hover,
.button-secondary:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
  box-shadow: none;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.account-button-copy {
  display: grid;
  min-width: 0;
  text-align: left;
}

.account-button-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 650;
}

.account-button-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.app-sidebar .sidebar-account-btn.account-button {
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(238, 236, 228, 0.1);
  color: var(--sb-t);
}

.app-sidebar .sidebar-account-btn.account-button:hover {
  background: var(--sb-h);
  border-color: rgba(238, 236, 228, 0.18);
  color: var(--sb-t);
}

.app-sidebar .sidebar-account-btn .account-avatar {
  background: #1d2a2e;
  color: #d5f2ec;
}

.app-sidebar .sidebar-account-btn .account-button-copy strong {
  color: var(--sb-t);
}

.app-sidebar .sidebar-account-btn .account-button-copy span {
  color: var(--sb-m);
}

.account-popover,
.settings-drawer,
.auth-modal-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-lg);
}

.account-popover {
  position: fixed;
  left: calc(228px + 8px);
  bottom: 12px;
  z-index: 80;
  width: min(360px, calc(100vw - 248px));
  max-height: min(72vh, 620px);
  overflow: auto;
  padding: 16px;
}

.account-popover-header strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 650;
}

.account-popover-header p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.account-popover-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.account-status-strip {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.account-status-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--color-border-soft);
}

.account-status-row strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-status-row span {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.account-status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--color-text-muted);
}

.account-status-row.tone-good .account-status-dot {
  background: var(--color-success);
}

.account-status-row.tone-warn .account-status-dot {
  background: var(--color-warning);
}

.control-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 14px;
  grid-column: 1 / -1;
  margin-bottom: 0;
  align-items: start;
}

.setup-primary,
.setup-action-column {
  min-width: 0;
}

.setup-action-column {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-left: 14px;
  border-left: 1px solid var(--color-border);
}

.home-state-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 10px 0;
  color: var(--color-text);
}

.home-state-bar h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.home-state-bar.is-secondary-tab {
  display: none;
}

.state-sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.next-action-rail {
  position: relative;
  padding: 15px 18px 15px 22px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.next-action-rail::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--color-accent);
}

.next-action-rail h2 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  letter-spacing: -0.025em;
}

.next-action-rail.is-secondary-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px 10px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.next-action-rail.is-secondary-tab::before {
  inset: 10px auto 10px 10px;
}

.next-action-rail.is-secondary-tab .eyebrow,
.next-action-rail.is-secondary-tab p {
  display: none;
}

.next-action-rail.is-secondary-tab h2 {
  font-size: 1rem;
  letter-spacing: 0;
}

.next-action-rail.is-secondary-tab button {
  width: auto;
  padding: 9px 13px;
  white-space: nowrap;
}

.state-sync.is-live {
  background: var(--color-success-soft);
  color: var(--color-success-strong);
  border-color: rgba(42, 101, 83, 0.18);
}

.state-sync.is-error {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: rgba(153, 83, 55, 0.2);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 18, 23, 0.34);
  backdrop-filter: blur(6px);
}

.settings-drawer,
.auth-modal {
  position: fixed;
  z-index: 110;
}

.settings-drawer {
  top: 0;
  right: 0;
  width: min(460px, calc(100vw - 24px));
  height: 100vh;
  padding: 22px;
  overflow-y: auto;
}

.settings-drawer-header,
.auth-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.settings-drawer-header h2,
.auth-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.settings-drawer-header p,
.auth-modal-header p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
}

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-section,
.control-summary .panel {
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  box-shadow: none;
}

.settings-section h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 650;
}

.settings-section label,
.auth-modal-card label {
  display: block;
  margin-bottom: 8px;
}

.settings-section .button-row,
.auth-modal-card .button-row {
  margin-top: 12px;
}

.agent-work-picker {
  margin-top: 12px;
}

.benchmark-agent-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.benchmark-agent-section h3,
.benchmark-agent-section p {
  margin-top: 0;
}

.agent-autonomous-controls {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

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

.agent-budget-grid label {
  min-width: 0;
}

.agent-budget-grid select {
  margin-top: 6px;
  width: 100%;
}

.agent-authority-summary {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-left: 3px solid var(--color-accent);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.agent-authority-summary strong {
  color: var(--color-text);
}

.agent-selected-work-details {
  min-width: 0;
}

.pairing-result {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.pairing-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pairing-result-heading > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pairing-result p {
  color: var(--color-text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 0;
}

.pairing-result .pairing-code-card,
.pairing-result .command-panel {
  max-width: 100%;
  min-width: 0;
}

.pairing-result .pairing-code-card code,
.pairing-result .command-panel {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 520px) {
  .settings-drawer {
    width: 100vw;
    padding: 16px;
  }

  .agent-budget-grid {
    grid-template-columns: 1fr;
  }

  .pairing-result-heading,
  .pairing-result .pairing-code-card {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-autonomous-controls > button,
  .agent-selected-work-details > button,
  .pairing-result .pairing-code-card button {
    width: 100%;
  }
}

.agent-work-fieldset {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.agent-work-fieldset legend {
  padding: 0 4px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.settings-section .agent-work-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.agent-work-option input {
  width: auto;
  margin-top: 3px;
}

.agent-work-option span,
.agent-work-option small {
  display: block;
}

.agent-work-option small {
  color: var(--color-text-muted);
}

.auth-modal {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-modal-card {
  width: min(500px, calc(100vw - 24px));
  padding: 22px;
}

.auth-modal-card input {
  margin-bottom: 6px;
}

.panel,
.hero-copy,
.run-config-card,
.handoff-card,
.activity-card,
.story-highlight,
.story-rail-card,
.workflow-mini-card,
.comparison-card,
.compare-output article,
.signal-card,
.stat-card,
.result-card,
.config-summary-card,
.metric,
.field-group,
.advanced-details,
.table-wrap,
.loading-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
}

.panel,
.hero-copy {
  padding: 18px;
  animation: none;
}

.result-card,
.signal-card,
.handoff-card,
.story-rail-card {
  background: linear-gradient(180deg, var(--card-gradient-top), var(--card-gradient-bottom));
}

.panel-compact {
  padding: 18px;
}

.panel h2,
.panel h3,
.preview-header h3,
.handoff-header h4,
.result-card h4,
.run-config-card h4 {
  font-family: var(--font-sans);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.panel-heading,
.preview-header,
.handoff-header {
  margin-bottom: 12px;
}

.signal-strip,
.stats-grid,
.story-rail,
.handoff-grid,
.config-summary-grid,
.run-observer-grid,
.execution-grid,
.setup-checklist,
.local-journey-summary,
.local-journey-steps {
  gap: 12px;
}

.signal-strip {
  margin-bottom: var(--space-4);
}

.setup-summary,
.setup-checklist,
.local-journey-summary,
.local-journey-steps {
  display: grid;
}

.setup-summary {
  margin-bottom: 12px;
}

.setup-summary-card,
.setup-next-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
}

.setup-summary-card h3,
.setup-next-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.setup-summary-card p,
.setup-next-card p {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  line-height: 1.42;
}

.setup-progress-meter {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-surface-muted);
}

.setup-progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}

.setup-pairing-shortcuts {
  align-items: center;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 12px 0;
  padding: 12px 14px;
}

.setup-pairing-shortcuts > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.setup-pairing-shortcuts .eyebrow {
  margin: 0;
}

.setup-pairing-shortcuts strong {
  color: var(--color-text);
}

.setup-pairing-shortcuts span {
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.setup-pairing-shortcuts .button-row {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 720px) {
  .setup-pairing-shortcuts {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-pairing-shortcuts .button-row,
  .setup-pairing-shortcuts button {
    width: 100%;
  }
}

.pairing-code-card {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
  min-width: 0;
  padding: 12px;
}

.pairing-code-card code {
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 700;
  overflow: auto;
  overflow-wrap: normal;
  user-select: all;
  white-space: nowrap;
}

.pairing-code-card button {
  flex: 0 0 auto;
}

.pairing-advanced-command {
  margin-top: 12px;
}

.pairing-advanced-command summary {
  padding: 10px 12px;
}

.pairing-advanced-command summary::after {
  content: "";
}

.pairing-advanced-command .command-panel {
  margin: 0 12px 12px;
}

.setup-checklist {
  grid-template-columns: 1fr;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.beta-first-run-checklist {
  margin-top: 14px;
}

.beta-first-run-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
}

.beta-first-run-card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.45;
}

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

.beta-checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.beta-check-index {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.beta-checklist-item strong,
.beta-checklist-item small {
  display: block;
}

.beta-checklist-item small {
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.beta-checklist-item em {
  justify-self: end;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.beta-checklist-item.complete {
  border-color: rgba(42, 101, 83, 0.22);
  background: var(--color-success-soft);
}

.beta-checklist-item.current {
  border-color: rgba(11,125,121,0.24);
  background: var(--color-info-soft);
}

.setup-step {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.setup-step:last-child {
  border-bottom: 0;
}

.setup-step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.setup-step-header strong {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.setup-step-index,
.setup-step-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.setup-step-index {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.setup-step-status {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.setup-step p,
.setup-step-note {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.38;
}

.setup-step-note {
  font-size: 0.86rem;
}

.setup-step-actions {
  margin-top: 2px;
}

.setup-step.status-complete {
  background: color-mix(in srgb, var(--color-success-soft) 32%, transparent);
}

.setup-step.status-complete .setup-step-status {
  color: var(--color-success-strong);
  border-color: rgba(42, 101, 83, 0.16);
  background: rgba(42, 101, 83, 0.08);
}

.setup-step.status-current {
  background: color-mix(in srgb, var(--color-accent-soft) 42%, transparent);
}

.setup-step.status-current .setup-step-status {
  color: var(--color-accent-strong);
  border-color: rgba(111, 77, 61, 0.16);
  background: rgba(111, 77, 61, 0.08);
}

.setup-step.status-blocked {
  background: color-mix(in srgb, var(--color-warning-soft) 38%, transparent);
}

.setup-step.status-blocked .setup-step-status {
  color: var(--color-warning);
  border-color: rgba(133, 101, 54, 0.16);
  background: rgba(133, 101, 54, 0.08);
}

.setup-next-action {
  display: grid;
}

.local-journey-summary,
.local-journey-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.setup-action-column .local-journey-summary,
.setup-action-column .local-journey-steps {
  grid-template-columns: 1fr;
}

.setup-journey-disclosure {
  margin-top: 0;
}

.setup-journey-disclosure summary {
  padding: 10px 12px;
}

.setup-journey-disclosure .local-journey-summary {
  padding: 0 12px 12px;
}

.runner-archive-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.runner-archive-download a {
  color: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.local-journey-steps {
  margin-bottom: 14px;
}

.local-step-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.local-step-label {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.local-step-card strong {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.local-step-card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.local-step-card.tone-official {
  border-color: rgba(42, 101, 83, 0.18);
  background: var(--color-success-soft);
}

.local-step-card.tone-warn {
  border-color: rgba(133, 101, 54, 0.18);
  background: var(--color-warning-soft);
}

.local-step-card.tone-comparable,
.local-step-card.tone-chip {
  border-color: rgba(111, 77, 61, 0.18);
  background: var(--color-accent-soft);
}

.signal-card,
.stat-card,
.story-highlight,
.story-rail-card,
.workflow-mini-card,
.result-card,
.run-config-card,
.handoff-card,
.activity-card {
  padding: 14px;
}

.signal-strip,
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-action-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.summary-action-card strong {
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.summary-action-card span {
  margin: 0;
  min-height: 40px;
}

.signal-card::after {
  display: none;
}

.signal-card.is-primary {
  border-color: rgba(11,125,121,0.2);
  background: linear-gradient(180deg, var(--primary-card-gradient-top), var(--primary-card-gradient-bottom));
}

.signal-card.is-primary strong {
  color: var(--color-accent, #0b7d79);
}

.cap-bar {
  display: inline-block;
  vertical-align: middle;
  width: 48px;
  height: 6px;
  border-radius: 999px;
  background: rgba(14,16,10,0.1);
  margin-left: 6px;
  overflow: hidden;
}

.cap-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent, #0b7d79), #0b7d79);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cap-bar-fill.is-visible {
  transform: scaleX(var(--cap-pct, 1));
}

.cap-score {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.cap-score-value {
  font-size: 1.08em;
}

.cap-score small {
  color: var(--color-text-muted);
  font-size: 0.72em;
  font-weight: 700;
}

.cap-score-note {
  grid-column: auto;
  color: var(--color-text-soft);
  font-size: 0.64em;
  letter-spacing: 0;
  text-transform: none;
}

.capability-metric span {
  line-height: 1.3;
}

.device-card {
  position: relative;
}

.device-card.is-preferred {
  border-color: rgba(42, 101, 83, 0.22);
  box-shadow: 0 0 0 1px rgba(42, 101, 83, 0.08), var(--shadow-sm);
}

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

.device-meta {
  margin-bottom: 8px;
}

.device-primary-copy,
.device-secondary-copy {
  margin: 0 0 8px;
  color: var(--color-text-muted);
}

.device-secondary-copy:last-of-type {
  margin-bottom: 0;
}

.signal-card label,
.config-summary-card label,
.metric label,
.story-kicker,
th {
  color: var(--color-text-muted);
}

.signal-card strong,
.stat-card strong {
  margin-top: 8px;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.workflow-panel,
.decision-card,
.comparison-card,
.story-highlight {
  background: var(--color-surface);
}

.story-highlight h3 {
  margin: 8px 0 10px;
  font-size: 1.18rem;
  line-height: 1.16;
}

.home-spotlight-card,
.home-runs-card {
  padding: 16px;
}

.control-plane-primary {
  border-color: rgba(11,125,121,0.16);
  background:
    radial-gradient(circle at top right, rgba(11,125,121,0.08), transparent 32%),
    var(--color-surface-strong);
}

.home-blocker-rail {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.home-blocker-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
}

.home-blocker-card strong,
.home-blocker-card span {
  display: block;
}

.home-blocker-card span {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.home-blocker-card.tone-good {
  border-color: rgba(11,125,121,0.2);
}

.home-blocker-card.tone-warn {
  border-color: rgba(148, 91, 34, 0.26);
}

.answer-summary-card {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
}

.slice-story-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(11,125,121,0.16);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.family-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 12px;
}

.run-provenance-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.run-provenance-grid label {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.run-provenance-grid p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.recovery-local-bundle {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.recovery-local-bundle label {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recovery-local-bundle p {
  margin: 0;
}

.recovery-local-bundle code {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

.answer-primary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.answer-primary-strip > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.answer-primary-strip span {
  display: block;
  color: var(--color-text-soft);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.answer-primary-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.answer-confidence-callout {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(11,125,121,0.18);
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.answer-confidence-callout strong,
.answer-confidence-callout span {
  overflow-wrap: anywhere;
}

.answer-confidence-callout span {
  color: var(--color-text-muted);
  line-height: 1.4;
}

.recommendation-evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.recommendation-evidence-strip > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.recommendation-evidence-strip .evidence-strip-reason {
  flex: 1 1 260px;
  white-space: normal;
  line-height: 1.35;
}

.recommendation-evidence-strip strong {
  color: var(--color-text);
}

.recommendation-evidence-strip .chip {
  margin: 0;
}

.evidence-strip-scope {
  overflow: hidden;
  max-width: min(100%, 34ch);
  text-overflow: ellipsis;
}

.recommend-evidence-explanation {
  margin-top: 4px;
}

.recommend-evidence-body {
  gap: 14px;
}

.recommend-evidence-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 18%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 7%, var(--color-surface));
}

.recommend-evidence-topline div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recommend-evidence-topline span,
.recommend-evidence-topline small {
  color: var(--color-text-muted);
}

.recommend-evidence-topline strong,
.recommend-evidence-topline small {
  overflow-wrap: anywhere;
}

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

.recommend-evidence-section,
.recommend-evidence-next {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.recommend-evidence-section.is-muted {
  background: color-mix(in srgb, var(--color-surface-muted) 70%, var(--color-surface));
}

.recommend-evidence-section h4,
.recommend-evidence-next h4 {
  margin: 0 0 8px;
  font-size: 0.88rem;
}

.recommend-evidence-section .reason-list {
  margin: 0;
}

.recommend-evidence-next {
  display: grid;
  gap: 6px;
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 22%, var(--color-border));
}

.recommend-evidence-next p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.hardware-evidence-brief {
  margin-top: 12px;
}

.hardware-evidence-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.72fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.hardware-evidence-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.hardware-evidence-copy h3,
.hardware-evidence-copy p {
  margin: 0;
  overflow-wrap: anywhere;
}

.hardware-evidence-copy p {
  color: var(--color-text-muted);
  line-height: 1.45;
}

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

.hardware-evidence-counts span {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.hardware-evidence-counts small {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hardware-evidence-counts strong {
  font-size: 1.2rem;
}

.hardware-evidence-status {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.hardware-evidence-status .reason-list {
  max-width: 62ch;
  margin: 0;
}

.home-run-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.home-run-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: var(--color-surface-strong);
}

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

.home-run-copy strong {
  font-size: 0.94rem;
  line-height: 1.2;
}

.home-run-copy span {
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.secondary-home-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.secondary-home-card h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.secondary-home-card p {
  margin: 0;
}

.public-info-page {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
}

.public-info-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.public-info-shell-wide {
  width: min(1080px, calc(100% - 32px));
}

.public-info-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.public-info-nav a,
.public-info-actions a {
  color: var(--color-accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.public-info-nav span {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.public-info-hero,
.public-info-section {
  border-bottom: 1px solid var(--color-border-soft);
  padding: 0 0 28px;
  margin-bottom: 28px;
}

.public-info-hero h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: 2.6rem;
  line-height: 1.02;
}

.public-info-hero p {
  max-width: 760px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.public-info-lede {
  max-width: 800px;
  margin: 0 0 14px;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.public-info-section h2 {
  margin: 0 0 12px;
  font-size: 1.28rem;
}

.public-info-section ul,
.public-info-section ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
}

.public-info-section li + li {
  margin-top: 8px;
}

.public-info-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.public-info-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--color-text);
}

.public-info-table.compact {
  min-width: 640px;
}

.public-info-table th,
.public-info-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--color-border-soft);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.public-info-table th {
  color: var(--color-text);
  font-weight: 850;
}

.public-info-table td {
  color: var(--color-text-muted);
}

.public-info-table tr:last-child th,
.public-info-table tr:last-child td {
  border-bottom: 0;
}

.public-info-callout {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.public-info-callout p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.5;
}

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

.public-info-definition-grid > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.public-info-definition-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
}

.public-info-definition-grid p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.public-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.story-highlight ul,
.verification-list {
  color: var(--color-text-muted);
}

.dashboard-tabs {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-lg);
  background: var(--sidebar-bg);
  box-shadow: var(--shadow-sm);
}

.community-panel .card-grid {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.home-tools-disclosure {
  display: grid;
  gap: 14px;
}

.home-tools-disclosure > summary,
.first-run-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  cursor: pointer;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
  color: var(--color-text);
  font-weight: 700;
  list-style: none;
}

.home-tools-disclosure > summary::-webkit-details-marker,
.first-run-details > summary::-webkit-details-marker {
  display: none;
}

.home-tools-disclosure > summary::after,
.first-run-details > summary::after {
  content: "+";
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  justify-self: end;
  color: var(--color-text-muted);
}

.home-tools-disclosure[open] > summary::after,
.first-run-details[open] > summary::after {
  content: "-";
}

.home-tools-disclosure > summary small {
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.35;
}

.home-tools-disclosure[open] > summary,
.first-run-details[open] > summary {
  margin-bottom: 14px;
}

.first-run-details > summary {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.beta-checklist-preview {
  gap: 6px;
}

.beta-checklist-preview .beta-checklist-item {
  padding: 10px;
}

.dashboard-tab {
  position: relative;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--sidebar-muted);
  padding: 9px 11px;
  font-weight: 600;
  text-align: left;
}

.dashboard-tab:hover {
  background: var(--sidebar-surface);
  color: var(--sidebar-text);
  transform: none;
}

.dashboard-tab.is-active {
  background: var(--sidebar-surface-active);
  color: var(--sidebar-text);
  border-color: rgba(130, 212, 202, 0.28);
  box-shadow: none;
}

.dashboard-tab.is-active::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--color-accent);
  transform: translateY(-50%);
}

.slice-summary {
  margin-bottom: 14px;
}

.slice-summary:empty {
  display: none;
}

.slice-summary .chip-row {
  gap: 8px;
}

.compact-chip-row {
  gap: 6px;
  margin-top: 8px;
}

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

.table-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text);
  font-size: 0.84rem;
}

.compare-fit-pill,
.delta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  font-size: 0.82rem;
}

.compare-fit-left {
  color: var(--teal-strong);
  border-color: rgba(11,125,121,0.22);
}

.compare-fit-right {
  color: var(--color-info);
  border-color: rgba(73, 98, 118, 0.24);
}

.compare-fit-tie,
.compare-fit-unknown {
  color: var(--color-text-muted);
}

input,
select,
button,
textarea {
  min-width: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  color: var(--color-text);
  padding: 10px 12px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

input,
textarea {
  overflow: hidden;
  text-overflow: ellipsis;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus,
select:focus,
button:focus {
  outline: none;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible,
.dashboard-tab:focus-visible,
.account-button:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(11,125,121,0.16);
}

button {
  width: auto;
  min-height: 42px;
  font-family: var(--font-sans);
  font-weight: 600;
  background: var(--color-surface-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

button:hover {
  transform: translateY(-1px);
  background: var(--color-surface-muted);
  box-shadow: var(--shadow-md);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
  transform: none;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

button[type="submit"],
#create-local-run-button,
#connect-hf-button,
#mint-runner-token-button,
#sign-in-button,
#resolve-hf-button,
#account-open-auth-button,
#account-github-button,
#account-google-button {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff9f5;
}

button[type="submit"]:hover,
#create-local-run-button:hover,
#connect-hf-button:hover,
#mint-runner-token-button:hover,
#sign-in-button:hover,
#resolve-hf-button:hover,
#account-open-auth-button:hover,
#account-github-button:hover,
#account-google-button:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: #fff9f5;
}

.preset-button,
.chip,
.status-pill {
  box-shadow: none;
}

.preset-button {
  background: var(--color-surface-strong);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.preset-button.is-active,
.preset-button:hover {
  background: var(--color-success-soft);
  border-color: rgba(42, 101, 83, 0.22);
  color: var(--color-success-strong);
}

.status-pill {
  min-height: auto;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.chip {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.status-pill.connected,
.run-status-running,
.chip,
.chip.official {
  background: var(--color-success-soft);
  color: var(--color-success-strong);
}

.status-pill.syncing,
.run-status-awaiting_execution,
.run-status-paused,
.chip.warn {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.run-status-failed,
.run-status-cancelled,
.chip.secondary,
.chip.comparable {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.chip.informational {
  background: var(--color-info-soft);
  color: var(--color-info);
}

.chip.demo {
  background: rgba(177, 86, 44, 0.1);
  color: #7b3519;
  border-color: rgba(177, 86, 44, 0.22);
}

.chip.reference,
.chip.quant {
  background: var(--color-info-soft);
  color: var(--color-info);
}

.chip.gold {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.chip.decision {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

@media (prefers-color-scheme: dark) {
  .chip.demo {
    background: rgba(229, 140, 82, 0.12);
    color: #f3b88a;
    border-color: rgba(229, 140, 82, 0.22);
  }
}

html[data-theme="dark"] .chip.demo {
  background: rgba(229, 140, 82, 0.12);
  color: #f3b88a;
  border-color: rgba(229, 140, 82, 0.22);
}

.status-pill::before,
.status-pill.syncing::before,
.status-pill.connected::before {
  display: none !important;
}

.status-pill.connected {
  box-shadow: none;
}

.result-card:hover,
.run-config-card:hover,
.handoff-card:hover,
.activity-card:hover,
.story-highlight:hover,
.story-rail-card:hover,
.workflow-mini-card:hover,
.signal-card:hover,
.stat-card:hover {
  transform: none;
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.run-card.is-selected {
  border-color: rgba(42, 101, 83, 0.28);
  box-shadow: 0 0 0 1px rgba(42, 101, 83, 0.12), var(--shadow-md);
}

.run-stage,
.run-event-meta,
.trust-copy,
.hardware-copy,
.contributor-copy,
.signal-card p,
.stat-card span {
  color: var(--color-text-muted);
}

.progress-bar {
  background: rgba(101, 91, 76, 0.1);
}

.progress-bar > span {
  background: var(--color-success);
  box-shadow: none;
}

.decision-notes > div,
.field-group,
.loading-card,
.advanced-details,
.table-wrap {
  background: var(--color-surface-muted);
}

.field-group,
.advanced-details {
  box-shadow: none;
}

.local-primary-surface {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-top: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.advanced-details summary {
  padding: 14px 16px;
  font-weight: 600;
}

.advanced-details[open] > *:not(summary) {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 16px;
}

.command-panel,
.code-panel {
  border-radius: var(--radius-md);
  background: var(--color-code-surface);
  color: var(--code-ink);
  border: 1px solid var(--color-code-border);
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

table {
  font-size: 0.92rem;
}

thead th {
  top: 0;
  background: var(--color-surface-muted);
  backdrop-filter: blur(10px);
  z-index: 1;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  padding: 11px 10px;
}

tbody tr:hover {
  background: var(--color-accent-soft);
}

.empty-state {
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border-strong);
  background: var(--color-surface-muted);
}

.toast {
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-md);
}

.toast.good {
  border-color: rgba(42, 101, 83, 0.22);
  background: var(--color-surface-strong);
}

.toast.bad {
  border-color: rgba(153, 83, 55, 0.22);
  background: var(--color-surface-strong);
}

.loading-line,
.loading-line::after {
  border-radius: 999px;
}

.loading-line {
  background: rgba(101, 91, 76, 0.12);
}

.loading-line::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
}

.compare-output,
.detail-output,
.family-output {
  display: grid;
  gap: 16px;
}

.result-detail-card {
  display: grid;
  gap: 16px;
  max-width: 100%;
}

.public-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.5fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--color-success, #0b7d79) 26%, var(--color-border));
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.public-result-card-caution,
.public-result-card-warn {
  border-color: color-mix(in srgb, var(--color-warning, #856536) 34%, var(--color-border));
  background: var(--color-surface);
}

.capability-evidence-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.result-capability-profile {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.result-capability-profile > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.result-capability-profile > header span {
  font-weight: 750;
}

.result-capability-profile > header small,
.result-capability-component span {
  color: var(--color-text-muted);
}

.result-capability-profile-rows {
  display: grid;
  gap: 8px;
}

.result-capability-component {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(72px, 0.7fr) 34px;
  gap: 9px;
  align-items: center;
}

.result-capability-component > div {
  min-width: 0;
}

.result-capability-component > div strong,
.result-capability-component > div span,
.result-capability-component > div small {
  display: block;
}

.result-capability-component > div strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.result-capability-component > div span {
  margin-top: 2px;
  font-size: 0.72rem;
}

.result-capability-component > div small {
  margin-top: 3px;
  color: var(--color-warning-text, var(--color-text-muted));
  font-size: 0.7rem;
  line-height: 1.3;
}

.result-capability-component > strong {
  text-align: right;
  font-size: 0.84rem;
}

.result-capability-component-track {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 14%, transparent);
}

.result-capability-component-track > span {
  display: block;
  width: var(--component-score, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent, #0b7d79);
}

.result-capability-component.is-diagnostic {
  opacity: 0.72;
}

.result-capability-component.is-diagnostic .result-capability-component-track > span {
  background: var(--color-text-muted);
}

.result-diagnostic-profile {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.result-diagnostic-profile > header,
.result-diagnostic-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.result-diagnostic-profile > header span,
.result-diagnostic-panel > header span {
  font-weight: 750;
}

.result-diagnostic-profile > header small,
.result-diagnostic-panel > header small,
.result-diagnostic-profile details p {
  color: var(--color-text-muted);
}

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

.result-diagnostic-panel {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.result-diagnostic-panel:only-child {
  grid-column: 1 / -1;
}

.result-gpqa-panel:only-child .result-gpqa-visual {
  grid-template-columns: 104px minmax(180px, 320px);
}

.result-context-curve {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 10px;
  height: 130px;
  margin-top: 12px;
  align-items: end;
}

.result-context-bucket {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 3px;
  height: 100%;
  text-align: center;
}

.result-context-bucket > strong {
  font-size: 0.82rem;
}

.result-context-bucket > small {
  color: var(--color-text);
  font-weight: 750;
}

.result-context-bucket > em {
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-style: normal;
}

.result-context-bar {
  display: flex;
  min-height: 56px;
  overflow: hidden;
  align-items: end;
  border-radius: 8px 8px 3px 3px;
  background: color-mix(in srgb, var(--color-text-muted) 12%, transparent);
}

.result-context-bar > span {
  width: 100%;
  height: max(4px, var(--diagnostic-value, 0%));
  border-radius: inherit;
  background: linear-gradient(180deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 58%, var(--color-surface)));
}

.result-gpqa-visual {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 13px;
  margin-top: 14px;
  align-items: center;
}

.result-diagnostic-ring {
  position: relative;
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--color-surface) 0 57%, transparent 58%),
    conic-gradient(var(--color-accent) var(--diagnostic-score, 0%), color-mix(in srgb, var(--color-text-muted) 14%, transparent) 0);
  text-align: center;
}

.result-diagnostic-ring strong,
.result-diagnostic-ring small {
  display: block;
}

.result-diagnostic-ring strong {
  font-size: 1.05rem;
}

.result-diagnostic-ring small {
  color: var(--color-text-muted);
  font-size: 0.68rem;
}

.result-diagnostic-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.result-diagnostic-counts span {
  display: grid;
  gap: 2px;
  color: var(--color-text-muted);
  font-size: 0.69rem;
}

.result-diagnostic-counts strong {
  color: var(--color-text);
  font-size: 0.9rem;
}

.result-diagnostic-profile details {
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
}

.result-diagnostic-profile details summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.result-diagnostic-profile details p {
  margin: 7px 0 0;
  font-size: 0.78rem;
}

.capability-evidence-header,
.capability-proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 16px;
}

.capability-evidence-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.capability-evidence-header p,
.capability-proof-grid p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
}

.capability-next-action {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.capability-next-action span,
.capability-evidence-surface label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.capability-next-action strong {
  display: block;
  margin-top: 4px;
}

.capability-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.capability-evidence-surface {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.capability-evidence-surface header {
  display: grid;
  gap: 10px;
}

.capability-evidence-surface strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.capability-evidence-surface span {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.capability-evidence-items {
  display: grid;
  gap: 10px;
}

.capability-evidence-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.capability-evidence-item strong {
  font-size: 0.98rem;
}

.capability-evidence-item code {
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.capability-evidence-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.capability-evidence-details div {
  min-width: 0;
}

.capability-evidence-details dt {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.capability-evidence-details dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.capability-evidence-item-reference {
  border-color: color-mix(in srgb, var(--color-info, #4d6bfe) 36%, var(--color-border));
}

.capability-evidence-item-quant {
  border-color: color-mix(in srgb, var(--color-success, #197a50) 34%, var(--color-border));
}

.capability-evidence-item-gold {
  border-color: color-mix(in srgb, var(--color-warning, #856536) 42%, var(--color-border));
}

.capability-evidence-item-decision {
  border-color: color-mix(in srgb, var(--color-text-muted) 24%, var(--color-border));
}

.capability-evidence-state-failed {
  border-color: color-mix(in srgb, var(--color-warning, #856536) 32%, var(--color-border));
}

.capability-artifact-disclosure {
  background: var(--color-surface-muted);
}

.public-result-main,
.public-result-next {
  min-width: 0;
}

.public-result-main h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.05;
  overflow-wrap: break-word;
}

.public-result-subtitle {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  overflow-wrap: break-word;
}

.public-result-verdict {
  margin: 14px 0;
  max-width: 64ch;
  color: var(--color-text);
  font-size: 1.02rem;
}

.result-artifact-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.result-artifact-boundaries div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-strong) 72%, transparent);
}

.result-artifact-boundaries span {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-artifact-boundaries strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.result-evidence-source-note {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-strong) 74%, transparent);
}

.result-evidence-source-note summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.result-evidence-source-note summary::-webkit-details-marker {
  display: none;
}

.result-evidence-source-note summary span,
.result-strip-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-evidence-source-note summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  line-height: 1.25;
}

.result-evidence-source-note summary small {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--color-text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.result-evidence-source-note summary small::after {
  content: " +";
}

.result-evidence-source-note[open] summary small::after {
  content: " -";
}

.result-evidence-source-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.result-evidence-source-note p {
  margin: 0;
  color: var(--color-text);
  font-size: 0.94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.public-result-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.public-result-metrics-block {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.result-strip-heading {
  display: none;
}

.result-strip-heading small {
  color: var(--color-text-muted);
}

.public-result-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  grid-column: 1 / -1;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.public-result-facts div,
.recommendation-context-goal {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-strong) 72%, transparent);
}

.public-result-facts div {
  flex: 1 1 150px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
}

.public-result-facts div:first-child {
  padding-left: 0;
}

.public-result-facts div:last-child {
  padding-right: 0;
  border-right: 0;
}

.public-result-facts span,
.recommendation-context-goal strong {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.public-result-facts strong,
.recommendation-context-goal span {
  display: block;
  overflow-wrap: break-word;
}

.public-result-metric {
  min-width: 0;
  background: color-mix(in srgb, var(--color-surface-strong) 72%, transparent);
}

.public-result-metric strong {
  overflow-wrap: break-word;
}

.public-result-next {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.public-result-next p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
}

.public-result-next p span {
  display: block;
  margin-bottom: 3px;
  color: var(--color-text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.public-result-next-meta {
  margin-top: 10px;
}

.result-contribution-impact {
  display: grid;
  grid-column: 1 / -1;
  gap: 5px;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.result-contribution-impact > span {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-contribution-impact > small {
  color: var(--color-text-muted);
  line-height: 1.35;
}

.result-contribution-impact .chip-row {
  margin-top: 4px;
}

.result-impact-scope {
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.result-impact-scope summary {
  cursor: pointer;
  font-weight: 700;
}

.result-impact-scope small {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
}

.public-result-actions {
  margin-top: 12px;
}

.result-publish-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.result-publish-panel.is-published {
  border-color: color-mix(in srgb, var(--color-success, #0b7d79) 32%, var(--color-border));
}

.publication-default-control {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 0.65rem;
  background: var(--color-surface-muted);
}

.publication-default-control input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
}

.publication-default-control span,
.publication-default-control small {
  display: block;
}

.publication-default-control small {
  margin-top: 0.2rem;
  color: var(--color-text-muted);
}

.signal-card small {
  display: block;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.result-publish-panel strong,
.result-publish-panel p {
  margin: 0;
}

.result-publish-panel p {
  color: var(--color-text-muted);
}

.result-provenance-disclosure {
  background: var(--color-surface);
}

.result-next-benchmark-disclosure {
  background: var(--color-surface);
}

.result-followup-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-strong);
}

.result-followup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--color-border);
}

.result-followup-row:first-child {
  border-top: 0;
}

.result-followup-main,
.result-followup-meta {
  min-width: 0;
}

.result-followup-main strong,
.result-followup-main p,
.result-followup-main span {
  display: block;
  overflow-wrap: anywhere;
}

.result-followup-main p {
  margin: 4px 0;
  color: var(--color-text-muted);
}

.result-followup-main span {
  color: var(--color-text);
  font-size: 0.9rem;
}

.result-followup-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.comparison-metric-group,
.detail-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.detail-card > label,
.comparison-metric-group .subheading h3 {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.timeline-list {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 10px 0 10px 14px;
  border-left: 2px solid rgba(11,125,121,0.24);
}

.timeline-item strong,
.timeline-item span {
  display: block;
}

.timeline-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.compact-stack {
  gap: 10px;
}

.compact-actions {
  align-items: center;
}

.compact-actions button {
  width: auto;
}

.result-actions {
  margin-top: 10px;
}

.result-actions button,
.comparison-card .compact-actions button {
  font-size: 0.88rem;
  padding: 8px 12px;
}

@media (max-width: 960px) {
  /* On mobile: keep the shell as a top app bar and move routes into a full-screen menu. */
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    width: 100vw;
    max-width: 100vw;
    overflow-x: clip;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    inline-size: 100vw;
    max-inline-size: 100vw;
    min-width: 0;
    min-height: calc(62px + env(safe-area-inset-top, 0px));
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
    gap: 8px;
    overflow: visible;
  }

  body.is-mobile-tabs-open {
    overflow: hidden;
  }

  body.is-mobile-tabs-open .app-sidebar {
    position: fixed;
    inset: 0;
    z-index: 120;
    min-height: 100dvh;
    align-content: start;
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
    background: var(--sidebar-bg);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .sidebar-brand {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    padding-right: 96px;
    flex: 1 1 0;
    min-width: 0;
  }

  .sidebar-brand-text {
    min-width: 0;
  }

  .sidebar-brand-name,
  .sidebar-brand-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-nav-group,
  .sidebar-grow {
    display: none;
  }

  .sidebar-footer {
    display: none;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    border-top: none;
    padding: 0;
    margin-left: 4px;
  }

  .sidebar-footer .sidebar-connection-status {
    display: none;
  }

  body.is-mobile-tabs-open .sidebar-nav-group,
  body.is-mobile-tabs-open .sidebar-footer {
    display: flex;
  }

  body.is-mobile-tabs-open .sidebar-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid var(--sidebar-border);
  }

  body.is-mobile-tabs-open .sidebar-public-links {
    display: none;
  }

  .app-sidebar .sidebar-account {
    display: none;
  }

  body.is-mobile-tabs-open .app-sidebar .sidebar-account {
    display: block;
  }

  .app-sidebar .sidebar-account-btn,
  .app-sidebar .sidebar-account-btn.account-button {
    width: auto;
    min-height: 44px;
    min-width: 44px;
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-strong);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
  }

  .app-sidebar .sidebar-account-btn:hover {
    background: var(--color-surface-strong);
  }

  .app-sidebar .sidebar-account-copy {
    display: none;
  }

  /* Dashboard tabs become a full-screen mobile menu. */
  .app-sidebar .dashboard-tabs {
    position: static !important;
    inset: auto;
    z-index: auto;
    display: none;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    align-content: start;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
    animation: none;
  }

  .app-sidebar .dashboard-tabs.is-mobile-open {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .app-sidebar .dashboard-tab {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    text-align: left;
    background: var(--sidebar-surface);
    color: var(--sidebar-text);
    gap: 10px;
  }

  .app-sidebar .dashboard-tab::before {
    display: none;
  }

  .app-sidebar .dashboard-tab.is-active {
    border-color: color-mix(in srgb, var(--color-accent) 50%, var(--sidebar-border));
    background: var(--sidebar-surface-active);
    color: var(--sidebar-text);
  }

  .sidebar-nav-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--color-accent-strong);
  }

  .app-sidebar .dashboard-tab > span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .mobile-menu-heading {
    display: grid;
    gap: 2px;
    padding: 8px 2px 2px;
    color: var(--sidebar-text);
  }

  .mobile-menu-heading span {
    color: var(--sidebar-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-menu-heading strong {
    font-size: 1.55rem;
    letter-spacing: -0.03em;
  }

  .mobile-menu-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--sidebar-border);
  }

  .mobile-menu-links a {
    min-height: 44px;
    padding: 12px;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-md);
    background: var(--sidebar-surface);
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
  }

  .page-shell {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px 56px;
    overflow-x: clip;
  }

  body.is-focused-surface .cmdbar {
    display: none;
  }

  body.is-focused-surface .page-shell {
    padding-top: 16px;
  }

  .cmdbar {
    padding: 10px 14px 0;
    z-index: 40;
  }

  .app-main,
  .dashboard-grid,
  .panel,
  .recommendation-panel,
  .recommendation-source-boundary,
  .compare-evidence-disclosure,
  .recommendation-primary-workbench,
  .story-highlight {
    min-width: 0;
  }

  body.is-mobile-tabs-open .cmdbar { visibility: hidden; }

  body.is-mobile-tabs-open .app-main {
    pointer-events: none;
  }

  body.is-mobile-tabs-open .app-sidebar {
    pointer-events: auto;
  }

  .cmdbar-title {
    font-size: clamp(1.2rem, 6vw, 1.65rem);
    line-height: 1.05;
  }

  .cmdbar-row2 {
    margin-top: 8px;
  }

  .cmdbar-next-action {
    padding: 10px;
    gap: 10px;
  }

  .cmdbar-next-action .eyebrow,
  #next-action-copy {
    display: none;
  }

  .cmdbar-next-action h2 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .control-summary,
  .public-mode-card,
  .header-controls,
  .execution-grid,
  .local-journey-summary,
  .local-journey-steps,
  .inline-form,
  .home-blocker-card,
  .button-row {
    display: flex;
    flex-direction: column;
  }

  .next-action-rail.is-secondary-tab {
    display: none;
  }

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

  .account-avatar {
    width: 30px;
    height: 30px;
  }

  .mobile-dashboard-tabs-toggle {
    position: absolute;
    right: 12px;
    top: calc(8px + env(safe-area-inset-top, 0px));
    flex: 0 0 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 84px;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-lg);
    background: var(--sidebar-surface-active);
    color: var(--sidebar-text);
    box-shadow: var(--shadow-sm);
  }

  .mobile-dashboard-tabs-toggle span:first-child {
    display: none;
  }

  .mobile-dashboard-tabs-toggle span:last-child {
    display: block;
    flex: 0 0 auto;
    color: var(--sidebar-text);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .mobile-dashboard-tabs-toggle[aria-expanded="true"] {
    border-color: rgba(11,125,121,0.32);
    box-shadow: 0 0 0 4px rgba(11,125,121,0.12), var(--shadow-md);
  }

  .app-main {
    padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
  }

  /* Preserve legacy rules required by test assertions */
  .home-state-bar {
    display: none;
  }

  .next-action-rail.is-secondary-tab {
    display: none;
  }

  .stats-panel .signal-strip {
    display: grid;
    overflow-x: visible;
  }

  .public-mode-boundary.home-duplicate-boundary {
    display: none;
  }

  .signal-strip,
  .control-summary,
  .community-panel .card-grid,
  .workbench-shell,
  .explore-family-grid {
    grid-template-columns: 1fr;
  }

  .stats-panel .signal-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
    gap: 8px;
    margin: 10px 0 0;
    padding-bottom: 0;
    overflow-x: visible;
  }

  .stats-panel .signal-strip::-webkit-scrollbar {
    display: none;
  }

  .stats-panel .signal-card {
    min-height: 0;
    padding: 10px 12px;
    border-radius: var(--radius-md);
  }

  .stats-panel .signal-card::after {
    display: none;
  }

  .stats-panel .signal-card strong {
    margin-top: 5px;
    font-size: 1rem;
    line-height: 1.2;
  }

  .recommendation-panel > .panel-heading {
    align-items: stretch;
    gap: 10px;
  }

  .recommendation-panel > .panel-heading .button-secondary {
    width: 100%;
  }

  .story-highlight h3,
  .story-highlight p,
  .recommend-question-summary,
  .recommend-question-summary *,
  .slice-summary,
  .slice-summary *,
  .recommendation-source-boundary,
  .recommendation-source-boundary *,
  .compare-evidence-disclosure,
  .compare-evidence-disclosure *,
  .what-could-change-shell,
  .what-could-change-shell * {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .public-mode-boundary.home-duplicate-boundary {
    display: none;
  }

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

  .setup-checklist {
    grid-template-columns: 1fr;
  }

  .beta-checklist-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .beta-checklist-item em {
    grid-column: 2;
    justify-self: start;
  }

  .setup-action-column {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 14px;
  }

  .account-button {
    width: 100%;
    min-width: 0;
  }

  .account-popover {
    left: 12px;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: min(100%, calc(100vw - 32px));
    max-height: min(68vh, 560px);
  }

  .settings-drawer {
    width: 100vw;
  }
}

@media (max-width: 620px) {
  html,
  body,
  .app-shell,
  .app-main,
  .dashboard-grid {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
  }

  .recommendation-panel,
  .explore-shell-panel,
  .explore-overview-panel,
  .methodology-panel,
  .builder-panel,
  .detail-panel,
  .runs-panel,
  .run-configs-panel,
  .my-runs-panel,
  .control-summary {
    padding: 14px;
    border-radius: var(--radius-lg);
  }

  .recommendation-panel > .panel-heading,
  .explore-shell-panel > .panel-heading,
  .builder-panel > .panel-heading,
  .detail-panel > .panel-heading,
  .runs-panel > .panel-heading {
    align-items: flex-start;
    gap: 8px;
  }

  .recommendation-panel > .panel-heading .button-secondary,
  .runs-panel > .panel-heading .button-secondary {
    width: 100%;
  }

  .recommendation-panel > .panel-heading #share-heading-button {
    display: none;
  }

  .recommendation-panel {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .answer-summary-card.story-highlight {
    padding: 16px;
  }

  .answer-summary-card .handoff-header {
    display: grid;
    gap: 10px;
  }

  .answer-summary-card h3,
  .story-highlight h3 {
    max-width: 100%;
    font-size: 1.05rem;
  }

  .answer-confidence-callout,
  .local-step-card,
  .local-step-card strong,
  .recommendation-panel .chip-row {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .methodology-panel {
    gap: 12px;
  }

  .methodology-hero {
    padding: 16px;
  }

  .methodology-hero h2 {
    font-size: 1.45rem;
  }

  .public-info-shell,
  .public-info-shell-wide {
    width: min(100% - 24px, 1080px);
    padding-top: 24px;
  }

  .public-info-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-info-nav span {
    justify-content: flex-start;
  }

  .public-info-hero h1 {
    font-size: 2rem;
  }

  .public-info-table {
    min-width: 620px;
  }

  .public-info-definition-grid {
    grid-template-columns: 1fr;
  }

  .methodology-lanes-heading {
    display: grid;
    gap: 6px;
  }

  .recommendation-panel > .panel-heading {
    order: 1;
  }

  .recommendation-intake-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    order: 2;
  }

  .recommendation-intake-heading {
    display: grid;
  }

  .recommendation-intake-heading > p {
    text-align: left;
  }

  #recommendation-slice-summary {
    order: 3;
  }

  #wizard-summary {
    display: contents;
  }

  #wizard-summary .answer-summary-card {
    order: 4;
  }

  #wizard-summary > .catalog-leads-disclosure,
  #wizard-summary > .catalog-leads {
    order: 6;
  }

  #wizard-summary > .recommendation-source-boundary {
    order: 6;
  }

  #hardware-evidence-brief {
    order: 8;
  }

  #wizard-plot {
    order: 5;
  }

  #wizard-alternatives {
    order: 7;
  }

  .recommend-question-summary {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 8px 10px;
  }

  .recommend-question-summary span {
    padding: 0;
  }

  .recommend-question-status.is-applied {
    display: none;
  }

  .recommendation-evidence-strip {
    display: none;
  }

  .compare-evidence-disclosure {
    margin: 0 -2px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--color-surface);
    order: 9;
  }

  #wizard-summary .recommend-evidence-explanation {
    order: 7;
  }

  #wizard-alternatives .answer-first-results {
    grid-template-columns: 1fr;
    margin: 0;
  }

  #wizard-summary > .answer-tradeoff-disclosure {
    order: 8;
  }

  #wizard-summary > .compact-decision-note {
    order: 9;
  }

  #recommend-change-question-panel {
    order: 10;
  }

  .decision-toolbar {
    order: 11;
  }

  .compare-evidence-disclosure > summary {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top, 0px));
    z-index: 8;
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-surface) 94%, transparent);
    backdrop-filter: blur(14px);
  }

  .compare-evidence-disclosure:not([open]) > summary {
    border-radius: var(--radius-lg);
    border-bottom: 0;
  }

  .compare-evidence-preview > span {
    flex-direction: column;
    gap: 2px;
  }

  .recommendation-primary-workbench {
    gap: 12px;
    padding: 10px;
    background: var(--color-surface-strong);
  }

  .recommendation-primary-workbench .workbench-shell {
    gap: 12px;
  }

  .all-recommendation-rows[open] .recommendation-table-wrap {
    max-height: min(72vh, 760px);
    overflow: auto;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .decision-toolbar,
  .saved-views-shell {
    margin-top: 0;
  }

  .explore-family-browser {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .explore-family-list {
    position: static;
  }

  .explore-family-list-rows {
    max-height: none;
    overflow: visible;
  }

  .explore-family-picker {
    padding: 0 12px 12px;
  }

  .explore-family-detail-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .explore-family-detail-heading .compact-button {
    width: 100%;
  }

  .explore-family-detail .explore-family-quants li {
    grid-template-columns: minmax(136px, 1.1fr) repeat(3, minmax(92px, 0.75fr)) minmax(112px, 0.8fr) auto;
    min-width: 680px;
  }

  .explore-family-scorebar .cap-score-note {
    display: none;
  }

  .explore-family-card {
    gap: 9px;
    padding: 12px;
  }

  .explore-family-card .handoff-header {
    gap: 10px;
  }

  .explore-family-scorebar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .explore-family-scorebar > span {
    min-height: 0;
    padding: 10px;
  }

  .explore-family-scorebar > span:nth-child(n + 5) {
    display: none;
  }

  .explore-family-mobile-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .explore-family-mobile-preview span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
  }

  .explore-family-mobile-preview strong,
  .explore-family-mobile-preview small {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .explore-family-mobile-preview strong {
    color: var(--color-text);
    font-size: 0.8rem;
  }

  .explore-family-mobile-preview small {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    line-height: 1.22;
  }

  .explore-family-proof-trail {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-muted);
  }

  .explore-family-proof-trail > summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 12px;
    list-style: none;
  }

  .explore-family-proof-trail > summary::-webkit-details-marker {
    display: none;
  }

  .explore-family-proof-trail > summary::after {
    content: "+";
    flex: 0 0 auto;
    font-weight: 800;
  }

  .explore-family-proof-trail[open] > summary::after {
    content: "-";
  }

  .explore-family-proof-trail > summary span {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .explore-family-proof-trail > summary small {
    color: var(--color-text-muted);
  }

  .explore-family-proof-trail .explore-family-quants {
    margin: 0 10px 10px;
  }

  .explore-family-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .explore-family-secondary-actions {
    width: 100%;
  }

  .explore-family-secondary-actions .button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .explore-family-gap,
  .explore-family-details {
    display: none;
  }

  .coverage-map-summary .explore-quant-ladder-list {
    display: none;
  }

  .coverage-map-summary .explore-family-scorebar {
    margin-bottom: 0;
  }

  .explore-family-list-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .explore-family-list-heading .methodology-inline-link {
    margin-left: 0;
  }

  .explore-family-context {
    align-items: flex-start;
  }

  .build-cold-goal {
    padding: 14px;
  }

  .build-cold-goal-list {
    display: none;
  }

  .build-step-indicator {
    position: sticky;
    top: calc(62px + env(safe-area-inset-top, 0px));
    z-index: 20;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: color-mix(in srgb, var(--color-bg) 92%, transparent);
    backdrop-filter: blur(12px);
  }

  .build-step-actions {
    top: calc(112px + env(safe-area-inset-top, 0px));
  }

  .build-step-indicator span {
    min-width: 0;
    padding: 9px 8px;
    text-align: center;
  }

  .builder-grid {
    gap: 12px;
  }

  .build-step {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .saved-run-plans-disclosure {
    margin-top: 0;
  }

  .saved-run-plans-disclosure:not([open]) {
    box-shadow: none;
  }

  .saved-run-plans-list {
    padding: 0 8px 8px;
  }

  .saved-run-plans-list .run-config-card-compact {
    padding: 12px;
  }

  .model-picker-cards,
  .model-picker-starters,
  .benchmark-preset-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hf-trending-grid {
    grid-template-columns: 1fr;
  }

  .hf-trending-intro,
  .hf-trending-card {
    flex-direction: column;
  }

  .generated-config-preview .button-row,
  .preview-header {
    align-items: stretch;
  }

  .public-result-card {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-width: 0;
    gap: 12px;
  }

  .result-detail-card {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .public-result-next {
    grid-column: auto;
    grid-row: auto;
    order: 2;
  }

  .public-result-facts,
  .public-result-metrics-block,
  .result-contribution-impact {
    grid-column: auto;
  }

  .result-contribution-impact {
    order: 2;
  }

  .capability-evidence-header,
  .capability-proof-grid {
    grid-template-columns: 1fr;
  }

  .result-capability-profile > header {
    display: grid;
    gap: 2px;
  }

  .result-capability-component {
    grid-template-columns: minmax(125px, 1fr) minmax(60px, 0.55fr) 32px;
  }

  .result-diagnostic-profile > header,
  .result-diagnostic-panel > header {
    display: grid;
    gap: 2px;
  }

  .result-diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .result-gpqa-visual {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .result-diagnostic-ring {
    width: 82px;
  }

  .recommendation-context-grid {
    grid-template-columns: 1fr;
  }

  .public-result-main {
    order: 1;
  }

  .public-result-next {
    order: 2;
    grid-column: auto;
    grid-row: auto;
    padding: 10px 12px;
  }

  .public-result-facts {
    flex-direction: column;
    order: 3;
    gap: 0;
  }

  .public-result-metrics-block {
    order: 4;
  }

  .public-result-card {
    gap: 10px;
    padding: 12px;
  }

  .public-result-main h3 {
    font-size: 1.28rem;
    line-height: 1.12;
  }

  .public-result-verdict {
    margin: 8px 0;
    font-size: 0.96rem;
  }

  .result-artifact-boundaries {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 10px 0;
  }

  .result-artifact-boundaries div {
    padding: 8px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  .result-artifact-boundaries strong {
    font-size: 0.9rem;
  }

  .public-result-facts {
    gap: 0;
  }

  .public-result-facts div {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  .public-result-facts div:first-child {
    padding-left: 0;
  }

  .public-result-facts div:last-child {
    padding-right: 0;
    border-bottom: 0;
  }

  .public-result-facts span {
    margin: 0;
    flex: 0 0 auto;
  }

  .public-result-facts strong {
    text-align: right;
    font-size: 0.9rem;
  }

  .result-evidence-source-note {
    margin: 10px 0;
    padding: 10px;
  }

  .result-evidence-source-note .chip-row {
    gap: 6px;
  }

  .result-strip-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
  }

  .result-strip-heading span {
    margin-bottom: 0;
  }

  .public-result-metrics {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .public-result-metric {
    flex: 0 0 min(44vw, 156px);
    padding: 10px;
    border-radius: var(--radius-md);
    box-shadow: none;
    scroll-snap-align: start;
  }

  .public-result-metric strong {
    font-size: 1.05rem;
  }

  .result-publish-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .result-followup-row {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
  }

  .result-followup-meta {
    justify-items: stretch;
  }

  .result-followup-meta .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-result-actions button {
    width: 100%;
  }

  .detail-panel h2,
  .public-result-card h3,
  .public-result-card p,
  .public-result-card strong,
  .public-result-facts strong,
  .result-example-note strong,
  .result-example-note small {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .result-empty-state {
    display: grid;
    gap: 12px;
  }

  .result-empty-state .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-empty-state .button-row button {
    width: 100%;
  }

  .page-shell {
    width: min(100vw - 12px, 100%);
    padding-top: 10px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .hardware-evidence-card {
    padding: 14px;
  }

  .hardware-evidence-counts {
    grid-template-columns: 1fr;
  }

  .hardware-evidence-status {
    display: grid;
  }

  .app-header {
    gap: 8px;
    padding: 9px 10px;
    border-radius: var(--radius-lg);
  }

  .header-controls {
    grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
  }

  .state-sync,
  .next-action-rail button,
  .filters-actions button {
    width: 100%;
  }

  .next-action-rail {
    margin-bottom: 12px;
    padding: 12px 14px 12px 18px;
    border-radius: var(--radius-lg);
  }

  .next-action-rail h2 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .next-action-rail p {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .panel {
    padding: 14px;
    border-radius: var(--radius-lg);
  }

  .home-spotlight-card,
  .home-runs-card {
    padding: 14px;
  }

  .home-blocker-card {
    align-items: stretch;
  }

  .model-picker-starter-heading {
    display: grid;
  }

  .model-picker-starter-heading .compact-button {
    width: 100%;
  }

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

  .artifact-fit-ladder-heading {
    display: grid;
  }

  .artifact-fit-table-wrap {
    overflow: visible;
    border: 0;
  }

  .artifact-fit-table,
  .artifact-fit-table tbody,
  .artifact-fit-table tr,
  .artifact-fit-table td {
    display: block;
    min-width: 0;
  }

  .artifact-fit-table thead {
    display: none;
  }

  .artifact-fit-table tbody {
    display: grid;
    gap: 10px;
  }

  .artifact-fit-table tr {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
  }

  .artifact-fit-table td {
    display: grid;
    grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.3fr);
    gap: 10px;
    padding: 6px 0;
    border: 0;
  }

  .artifact-fit-table td::before {
    content: attr(data-label);
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .artifact-fit-table td small {
    grid-column: 2;
  }

  .artifact-fit-table td .compact-button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .recommendation-intake-hero .answer-first-controls button {
    width: 100%;
  }

  .recommendation-source-boundary {
    display: grid;
    gap: 4px;
  }
}

@media (max-width: 620px) {
  .runs-table colgroup {
    display: none;
  }

  .sparse-plot-candidate {
    grid-template-columns: minmax(0, 1fr) minmax(84px, auto);
  }

  .sparse-plot-candidate > span:first-child {
    grid-column: 1 / -1;
  }

  .sparse-plot-gap {
    display: grid;
  }
}

/* Usability polish */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding-inline: 12px;
}

.theme-icon {
  display: inline-grid;
  place-items: center;
  width: 1.35em;
  height: 1.35em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
  font-weight: 800;
  line-height: 1;
}

.theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: inline-grid;
}

html[data-theme="dark"] .theme-icon-moon {
  display: none;
}

.theme-toggle-copy {
  font-size: 0.92rem;
}

button,
button:hover,
.run-card.is-selected,
.device-card.is-preferred,
#create-local-run-button,
#create-local-run-button:hover,
#resolve-hf-button,
#resolve-hf-button:hover {
  box-shadow: var(--shadow-sm);
}

button:focus,
button:focus-visible,
summary:focus-visible,
.dashboard-tab:focus-visible,
.account-button:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(11,125,121,0.16);
}

.recommendation-primary-workbench {
  gap: 12px;
}

.recommendation-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.recommendation-chart-lead {
  min-width: 0;
  margin-top: 2px;
}

.recommendation-chart-lead .plot-card {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 34%, var(--color-border));
  box-shadow: var(--shadow-sm);
}

.recommendation-alternatives-shell:empty {
  display: none;
}

#wizard-plot,
#wizard-selected,
#wizard-support {
  min-width: 0;
}

#wizard-support.card-stack {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: start;
  margin-top: 4px;
}

.support-disclosure {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.support-disclosure summary {
  padding: 12px 14px;
}

.support-disclosure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.support-disclosure-grid .handoff-card {
  margin: 0;
}

.support-disclosure-grid .agent-dogfood-evidence-tray {
  align-self: start;
  margin: 0;
  padding: 14px;
  box-shadow: none;
}

.support-disclosure-grid .agent-dogfood-evidence-tray .card-stack {
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.recommendation-source-boundary {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
  margin-top: -4px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 22%, var(--color-border));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 7%, var(--color-surface));
  color: var(--color-text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.recommendation-source-boundary strong {
  flex: 0 0 auto;
  color: var(--color-text);
}

.recommendation-source-boundary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#wizard-selected .selected-recommendation-card {
  position: static;
  max-height: none;
  overflow: visible;
  background: var(--color-surface);
}

#wizard-selected .recommendation-run-strip {
  grid-template-columns: 1fr;
}

#wizard-selected .recommendation-run-strip span {
  overflow-wrap: normal;
  word-break: normal;
}

#wizard-selected .candidate-rationale summary {
  grid-template-columns: minmax(0, 1fr);
}

#wizard-selected .candidate-rationale summary::after {
  justify-self: end;
}

.plot-card {
  overflow: hidden;
}

.recommendation-control-panel select,
.recommendation-control-panel input {
  text-overflow: ellipsis;
}

.plot-card,
.plot-card *,
.selected-recommendation-card,
.selected-recommendation-card *,
.recommendation-table-wrap,
.recommendation-table-wrap *,
.selection-card,
.selection-card *,
.benchmark-preset-card,
.benchmark-preset-card *,
.planned-benchmark-roadmap,
.planned-benchmark-roadmap *,
.run-card,
.run-card *,
.chip,
.chip-row {
  min-width: 0;
}

.plot-card,
.selected-recommendation-card,
.recommendation-table-wrap,
.selection-card,
.benchmark-preset-card,
.planned-benchmark-roadmap,
.run-card,
.table-primary-cell,
.table-cell-note,
.capability-basis-strip,
.answer-confidence-callout,
.chip {
  overflow-wrap: anywhere;
}

.plot-header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.plot-header-actions .panel-meta {
  margin: 0;
  max-width: 24ch;
  overflow-wrap: anywhere;
  text-align: right;
}

.plot-card .handoff-header,
.selected-recommendation-card .handoff-header {
  align-items: start;
  gap: 12px;
}

.plot-card .handoff-header p,
.selected-recommendation-card .handoff-header p {
  max-width: 48ch;
}

.plot-frame {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable both-edges;
}

.plot-frame .plot-svg {
  max-width: none;
  min-width: 600px;
  height: clamp(320px, 32vw, 430px);
  min-height: 0;
}

.plot-summary-strip span {
  max-width: 100%;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  white-space: normal;
}

.plot-mobile-snapshot {
  display: none;
}

.answer-summary-card {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 34%, var(--color-border));
}

.answer-summary-card.story-highlight {
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.answer-summary-card .handoff-header {
  align-items: start;
}

.answer-summary-card .handoff-header > .chip-row {
  justify-content: flex-end;
  max-width: 100%;
}

.answer-summary-card .handoff-header > .chip-row .chip {
  white-space: normal;
  text-align: center;
  line-height: 1.15;
}

.answer-summary-card h3 {
  max-width: 34ch;
}

.answer-summary-card.is-empty,
.answer-summary-card.is-downgraded {
  border-style: dashed;
}

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

.answer-decision-facts > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-muted) 64%, var(--color-surface));
}

.answer-decision-facts span {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.answer-decision-facts strong {
  display: block;
  margin-top: 5px;
  color: var(--color-text);
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.answer-decision-board {
  display: grid;
  gap: 10px;
}

.answer-visual-metrics.answer-decision-facts {
  gap: 10px;
}

.answer-visual-metric {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 96px;
  overflow: hidden;
}

.answer-visual-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 62%, transparent);
}

.answer-visual-metric.is-speed::before {
  background: color-mix(in srgb, #4f7cff 70%, transparent);
}

.answer-visual-metric.is-footprint::before {
  background: color-mix(in srgb, #b06d24 68%, transparent);
}

.answer-visual-metric.is-warn::before {
  background: color-mix(in srgb, #b45309 72%, transparent);
}

.answer-visual-metric small {
  display: block;
  min-height: 1.15rem;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.answer-metric-track {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 14%, transparent);
}

.answer-metric-fill {
  display: block;
  width: var(--metric-pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 76%, var(--color-surface));
}

.answer-visual-metric.is-speed .answer-metric-fill {
  background: color-mix(in srgb, #4f7cff 76%, var(--color-surface));
}

.answer-visual-metric.is-footprint .answer-metric-fill {
  background: color-mix(in srgb, #b06d24 74%, var(--color-surface));
}

.answer-visual-metric.is-warn .answer-metric-fill {
  background: color-mix(in srgb, #b45309 76%, var(--color-surface));
}

.recommendation-decision-map,
.recommendation-decision-map * {
  min-width: 0;
}

.recommendation-decision-map {
  display: grid;
  gap: 9px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 24%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-strong) 82%, var(--color-surface-muted));
}

.decision-map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.decision-map-heading span {
  display: grid;
  gap: 2px;
}

.decision-map-heading strong {
  color: var(--color-text);
  font-size: 0.96rem;
  line-height: 1.18;
}

.decision-map-heading small {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.decision-map-axis,
.decision-map-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.66fr) minmax(230px, 1.2fr);
  gap: 12px;
  align-items: center;
}

.decision-map-axis {
  padding: 0 10px;
  color: var(--color-text-muted);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.decision-map-axis > span:last-child,
.decision-map-values {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.decision-map-axis i {
  font-style: normal;
  line-height: 1;
  text-align: center;
}

.decision-map-rows {
  display: grid;
  gap: 7px;
}

.decision-map-row {
  padding: 9px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.decision-map-row.is-selected {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 54%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 7%, var(--color-surface));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--color-accent, #0b7d79) 82%, var(--color-surface));
}

.decision-map-label {
  display: grid;
  gap: 3px;
}

.decision-map-label small {
  color: var(--color-accent-strong);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.decision-map-label strong {
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.decision-map-label span {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.decision-map-profile {
  display: grid;
  gap: 3px;
}

.decision-map-glyph {
  display: block;
  width: 100%;
  height: 52px;
  overflow: visible;
}

.decision-map-area {
  fill: color-mix(in srgb, var(--color-accent, #0b7d79) 14%, transparent);
}

.decision-map-line {
  fill: none;
  stroke: color-mix(in srgb, var(--color-accent, #0b7d79) 82%, var(--color-text));
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.decision-map-dot {
  fill: var(--color-surface);
  stroke: color-mix(in srgb, var(--color-accent, #0b7d79) 82%, var(--color-text));
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.decision-map-dot.is-output {
  stroke: #4f7cff;
}

.decision-map-dot.is-latency {
  stroke: #168f5b;
}

.decision-map-dot.is-memory {
  stroke: #b06d24;
}

.decision-map-dot.is-evidence {
  stroke: #475569;
}

.decision-map-values span {
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-align: center;
}

.decision-map-values .is-score {
  color: var(--color-accent-strong);
}

.decision-map-values .is-output {
  color: #335fc5;
}

.decision-map-values .is-latency {
  color: #0d764b;
}

.decision-map-values .is-memory {
  color: #8a520f;
}

.answer-evidence-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 1px;
}

.answer-evidence-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 24%, transparent);
}

.answer-evidence-dots .is-supported {
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 82%, var(--color-surface));
}

.answer-evidence-dots .is-caveat {
  background: color-mix(in srgb, #b45309 82%, var(--color-surface));
}

.answer-visual-grid .answer-evidence-source-note {
  border-left: 3px solid color-mix(in srgb, var(--color-accent, #0b7d79) 44%, transparent);
}

.answer-caveat-card small {
  display: block;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.answer-payoff-card {
  position: relative;
}

.answer-visual-grid .answer-payoff-card {
  grid-column: 1 / -1;
}

.answer-payoff-card::after {
  display: none;
}

.recommendation-decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 10px;
}

.recommendation-decision-grid section,
.recommendation-next-benchmark {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
}

.recommendation-decision-grid section > span,
.recommendation-next-benchmark > span {
  display: block;
  margin-bottom: 7px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recommendation-decision-grid p,
.recommendation-next-benchmark p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.42;
}

.evidence-source-bars {
  display: grid;
  gap: 6px;
  margin: 9px 0;
}

.evidence-source-bars > span {
  display: grid;
  grid-template-columns: minmax(84px, 0.8fr) auto minmax(64px, 1fr);
  align-items: center;
  gap: 8px;
}

.evidence-source-bars small,
.evidence-source-bars strong {
  color: var(--color-text);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.evidence-source-bars small {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.evidence-source-bars > span > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 14%, transparent);
}

.evidence-source-bars > span > i > i {
  display: block;
  width: var(--bar-pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 76%, var(--color-surface));
}

.evidence-source-bars .is-context > i > i {
  background: color-mix(in srgb, #b45309 72%, var(--color-surface));
}

.answer-evidence-source-note .chip-row {
  margin-top: 10px;
}

.methodology-inline-link {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-accent-strong);
  font-weight: 800;
  text-align: left;
}

.recommendation-decision-grid strong,
.recommendation-next-benchmark strong {
  display: block;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.recommendation-next-benchmark small {
  display: block;
  margin-top: 8px;
  color: var(--color-accent-strong);
  font-weight: 700;
  line-height: 1.35;
}

.recommendation-decision-grid .reason-list {
  margin: 0;
}

.recommendation-next-benchmark {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 28%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent, #0b7d79) 7%, var(--color-surface));
}

.recommendation-answer-skeleton {
  display: grid;
  gap: 8px;
}

.recommendation-answer-skeleton span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 18%, transparent);
}

.recommendation-answer-skeleton span:nth-child(2) {
  width: 74%;
}

.recommendation-answer-skeleton span:nth-child(3) {
  width: 52%;
}

.answer-first-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 10px 0 0;
}

.answer-first-results.has-1-options {
  grid-template-columns: minmax(0, 1fr);
}

.answer-first-results.has-2-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.answer-first-results.has-3-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.answer-first-results-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 0 2px 2px;
}

.answer-first-results-heading label {
  flex: 0 0 auto;
}

.answer-first-results-heading h3,
.answer-first-results-heading p {
  min-width: 0;
}

.answer-first-results-heading h3 {
  margin: 0;
  color: var(--color-text);
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0;
}

.answer-first-results-heading p {
  max-width: 34ch;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
}

.answer-decision-lane {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-strong) 84%, transparent);
}

.answer-decision-lane label,
.answer-first-metrics small {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.answer-lane-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.answer-lane-heading .chip-row {
  flex: 0 1 auto;
  justify-content: flex-end;
  margin: 0;
}

.answer-lane-heading .chip {
  margin: 0;
  white-space: normal;
  text-align: center;
}

.answer-decision-lane h4,
.answer-decision-lane p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.answer-decision-lane p {
  color: var(--color-text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.answer-option-evidence {
  margin: 0;
}

.answer-option-next {
  font-weight: 700;
}

.answer-primary-actions button:focus-visible,
.answer-decision-lane button:focus-visible,
.answer-first-controls button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(11,125,121,0.18), var(--shadow-sm);
}

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

.answer-first-metrics > span {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.answer-first-metrics strong {
  display: block;
  margin-top: 3px;
}

@media (max-width: 1080px) {
  .answer-first-results {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }
}

.compact-guide-card {
  padding: 14px 16px;
}

.compact-guide-card h3 {
  max-width: none;
  margin-bottom: 8px;
}

.compact-guide-card .chip-row {
  margin-top: 0;
}

.answer-primary-strip {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.recommendation-decision-grid.answer-primary-strip.answer-confidence-callout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.answer-primary-actions {
  align-items: center;
}

.answer-primary-actions button:first-child {
  min-width: 148px;
}

.answer-evidence-mini-disclosure,
.recommendation-secondary-actions,
.explore-family-secondary-actions,
.saved-run-plans-disclosure {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.answer-evidence-mini-disclosure {
  grid-column: 1 / -1;
}

.answer-evidence-mini-disclosure summary,
.recommendation-secondary-actions summary,
.explore-family-secondary-actions summary,
.saved-run-plans-disclosure summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  color: var(--color-text);
  font-weight: 800;
  list-style: none;
}

.answer-evidence-mini-disclosure summary::-webkit-details-marker,
.recommendation-secondary-actions summary::-webkit-details-marker,
.explore-family-secondary-actions summary::-webkit-details-marker,
.saved-run-plans-disclosure summary::-webkit-details-marker {
  display: none;
}

.answer-evidence-mini-disclosure summary::after,
.recommendation-secondary-actions summary::after,
.explore-family-secondary-actions summary::after,
.saved-run-plans-disclosure summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--color-text-muted);
}

.answer-evidence-mini-disclosure[open] summary::after,
.recommendation-secondary-actions[open] summary::after,
.explore-family-secondary-actions[open] summary::after,
.saved-run-plans-disclosure[open] summary::after {
  content: "-";
}

.answer-evidence-mini-disclosure summary span,
.saved-run-plans-disclosure summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.answer-evidence-mini-disclosure summary strong,
.saved-run-plans-disclosure summary small {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

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

.answer-methodology-snapshot {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #0b7d79) 20%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-strong) 84%, var(--color-surface-muted));
}

.answer-methodology-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.answer-methodology-heading > span,
.answer-methodology-snapshot dt {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.answer-methodology-heading .chip-row {
  justify-content: flex-end;
  margin: 0;
}

.answer-methodology-heading .chip {
  margin: 0;
  white-space: normal;
}

.answer-methodology-snapshot dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.answer-methodology-snapshot div,
.answer-methodology-snapshot dd {
  min-width: 0;
}

.answer-methodology-snapshot dl > div {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.answer-methodology-snapshot dd {
  margin: 0;
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.recommendation-secondary-actions {
  flex: 1 1 220px;
}

.answer-lane-actions {
  width: 100%;
  margin-top: 2px;
  background: color-mix(in srgb, var(--color-surface-muted) 74%, transparent);
}

.answer-lane-actions summary {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.answer-lane-actions summary span,
.answer-lane-actions summary small {
  min-width: 0;
}

.answer-lane-actions summary small {
  max-width: 22ch;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-secondary-actions .button-row {
  padding: 0 10px 10px;
}

.explore-family-secondary-actions .button-row {
  padding: 0 10px 10px;
}

.saved-run-plans-list {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.explore-family-mobile-preview {
  display: none;
}

.recommendation-share-note {
  align-self: center;
  max-width: 34ch;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.insight-disclosure {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.insight-disclosure summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 34ch) auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

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

.insight-disclosure summary::after {
  content: attr(data-closed-label);
  justify-self: end;
  min-width: max-content;
  max-width: 24ch;
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.insight-disclosure[open] summary::after {
  content: attr(data-open-label);
}

.insight-disclosure summary span:first-child {
  min-width: 0;
}

.insight-disclosure summary strong {
  display: block;
  overflow-wrap: anywhere;
}

.insight-summary-copy {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
}

.insight-disclosure-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.answer-tradeoff-disclosure {
  background: var(--color-surface);
  box-shadow: none;
}

.answer-tradeoff-disclosure > summary {
  min-height: 0;
  padding-block: 10px;
}

.selected-candidate-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.selected-candidate-facts > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.selected-candidate-facts span {
  display: block;
  color: var(--color-text-soft);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.selected-candidate-facts strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.agent-dogfood-evidence-tray {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 34%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent-soft, rgba(31, 122, 114, 0.12)) 36%, var(--color-surface));
}

.agent-dogfood-evidence-tray .selected-candidate-facts {
  margin: 12px 0;
}

.agent-dogfood-evidence-tray .activity-card {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 24%, var(--color-border));
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-sm);
}

.agent-dogfood-evidence-tray .activity-card .handoff-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.agent-dogfood-evidence-tray .activity-card .chip-row {
  justify-content: flex-start;
}

.agent-dogfood-evidence-tray .activity-card .chip {
  overflow-wrap: normal;
  white-space: nowrap;
}

.recommendation-run-strip {
  display: grid;
  grid-template-columns: minmax(150px, 0.48fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.recommendation-run-strip span {
  min-width: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.recommendation-run-strip.is-ready {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 40%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent-soft) 46%, var(--color-surface-muted));
}

.recommendation-run-strip.is-blocked {
  border-color: color-mix(in srgb, var(--color-warning, #9b6a2f) 34%, var(--color-border));
}

.plot-fullscreen-modal {
  position: fixed;
  inset: 20px;
  z-index: 120;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
}

.plot-fullscreen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.plot-fullscreen-header h2 {
  margin: 0;
}

.plot-fullscreen-content {
  min-height: 0;
  overflow: auto;
}

.plot-fullscreen-content .plot-frame {
  height: min(68vh, 720px);
}

.plot-fullscreen-content .plot-svg {
  width: 100%;
  min-width: 760px;
  min-height: 560px;
}

.modal-open {
  overflow: hidden;
}

.recommendation-table-wrap {
  max-width: 100%;
}

.recommendation-table-wrap table {
  min-width: 980px;
  table-layout: fixed;
}

.recommendation-table-wrap thead th {
  position: static;
  z-index: auto;
}

.recommendation-rank-col {
  width: 64px;
}

.recommendation-model-col {
  width: 210px;
}

.recommendation-param-col {
  width: 78px;
}

.recommendation-quant-col {
  width: 92px;
}

.recommendation-score-col {
  width: 130px;
}

.recommendation-output-col,
.recommendation-ttft-col {
  width: 96px;
}

.recommendation-memory-col,
.recommendation-size-col {
  width: 92px;
}

.recommendation-evidence-col {
  width: 210px;
}

.results-table-wrap table,
.comparison-metric-group .table-wrap table {
  table-layout: fixed;
}

.table-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 14px;
}

.table-pagination.hidden {
  display: none;
}

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

.runs-list-toggle {
  margin-top: 12px;
  width: 100%;
}

.compare-workbench-table-wrap table,
.family-branch-table-wrap table,
.family-quant-table-wrap table {
  min-width: 820px;
  table-layout: auto;
}

.compare-workbench-table-wrap th,
.compare-workbench-table-wrap td,
.family-branch-table-wrap th,
.family-branch-table-wrap td,
.family-quant-table-wrap th,
.family-quant-table-wrap td {
  overflow-wrap: normal;
  word-break: normal;
}

.compare-workbench-table-wrap td:first-child,
.family-branch-table-wrap td:first-child,
.family-quant-table-wrap td:first-child {
  min-width: 180px;
}

.table-scroll-hint {
  margin: -2px 0 8px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.family-quant-lens-strip {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.family-quant-lens-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.family-quant-lens-heading span {
  color: var(--color-text);
  text-transform: uppercase;
}

.family-quant-lens-heading small {
  min-width: 0;
  text-align: right;
}

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

.family-quant-lens-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 116px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  color: var(--color-text);
  text-align: left;
  box-shadow: none;
}

.family-quant-lens-card:hover,
.family-quant-lens-card:focus-visible {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 52%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent-soft) 45%, var(--color-surface));
}

.family-quant-lens-card span,
.family-quant-lens-card small,
.family-quant-lens-card i {
  min-width: 0;
  overflow-wrap: anywhere;
}

.family-quant-lens-card span {
  color: var(--color-text-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-quant-lens-card strong {
  min-width: 0;
  font-size: 0.98rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.family-quant-lens-card small,
.family-quant-lens-card i {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 750;
  line-height: 1.25;
}

.family-quant-plot {
  display: grid;
  gap: 8px;
  margin: 8px 0 14px;
  min-width: 0;
}

.family-quant-plot-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.family-quant-plot-heading span {
  color: var(--color-text);
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-quant-plot-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.family-quant-plot-heading small {
  min-width: 0;
  text-align: right;
}

.family-quant-plot-expand {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 10px;
}

.family-quant-plot-lenses {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.family-quant-plot-lenses > span {
  color: var(--color-text-soft);
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-quant-plot-lens-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.family-quant-plot-lens {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
  color: var(--color-text-soft);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
}

.family-quant-plot-lens:hover,
.family-quant-plot-lens:focus-visible,
.family-quant-plot-lens.is-active {
  border-color: color-mix(in srgb, var(--color-accent, #0b7d79) 52%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent-soft) 45%, var(--color-surface));
  color: var(--color-text);
}

.family-quant-plot-lens:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.family-quant-plot-frame {
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--color-surface-muted), var(--color-surface));
}

.family-quant-plot-svg {
  display: block;
  width: 100%;
  min-height: 220px;
  overflow: visible;
}

.family-quant-plot-grid line {
  stroke: color-mix(in srgb, var(--color-border) 72%, transparent);
  stroke-width: 1;
}

.family-quant-plot-axis {
  fill: none;
  stroke: var(--color-text-muted);
  stroke-width: 1.4;
}

.family-quant-plot-axis-label,
.family-quant-plot-tick,
.family-quant-plot-label {
  fill: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.family-quant-plot-label {
  fill: var(--color-text-soft);
}

.family-quant-plot-point {
  cursor: pointer;
  fill: var(--color-accent, #0b7d79);
  stroke: var(--color-surface);
  stroke-width: 2.4;
}

.family-quant-plot-point:hover,
.family-quant-plot-point:focus-visible,
.family-quant-plot-point.is-focused {
  fill: var(--color-warning, #b56a00);
  outline: none;
  stroke: var(--color-text);
  stroke-width: 2.8;
}

.family-quant-plot-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.family-quant-plot-summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.family-quant-plot-selected {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(220px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
}

.family-quant-selected-title,
.family-quant-selected-metrics {
  min-width: 0;
}

.family-quant-selected-title {
  display: grid;
  gap: 2px;
}

.family-quant-selected-title span,
.family-quant-selected-metrics span {
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-quant-selected-title strong {
  min-width: 0;
  color: var(--color-text);
  font-size: 0.98rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.family-quant-selected-title small {
  min-width: 0;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

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

.family-quant-selected-metrics div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.family-quant-selected-metrics strong {
  min-width: 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.family-quant-selected-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 0;
}

.family-quant-selected-chips {
  min-width: 0;
  justify-content: flex-end;
}

.family-quant-selected-actions {
  justify-content: flex-end;
  min-width: 0;
}

.plot-fullscreen-content .family-quant-plot {
  gap: 12px;
  margin: 0;
}

.plot-fullscreen-content .family-quant-plot-frame {
  height: min(64vh, 620px);
  overflow: auto;
}

.plot-fullscreen-content .family-quant-plot-svg {
  height: 100%;
  min-width: 760px;
  min-height: 440px;
}

.family-branch-disclosure,
.family-secondary-evidence {
  margin-top: 0;
}

.family-branch-disclosure[open],
.family-secondary-evidence[open] {
  display: grid;
  gap: 14px;
}

.family-branch-disclosure .family-branch-table-card,
.family-secondary-evidence .detail-grid {
  margin-top: 12px;
}

.compare-workbench-grid {
  grid-template-columns: 1fr;
}

.recommendation-table-wrap tbody tr.is-focused {
  background: color-mix(in srgb, var(--color-accent-soft) 60%, var(--color-surface));
}

.table-cell-note {
  max-width: 220px;
}

.table-primary-cell span,
.reason-list li,
.subtle-list li {
  overflow-wrap: anywhere;
}

.build-step-actions,
.builder-actions {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-strong);
}

.build-back-button {
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
}

.build-next-button {
  min-width: 190px;
}

.generated-config-preview {
  margin-top: 12px;
}

.generated-config-preview.is-empty {
  display: none;
}

.generated-config-preview .generated-config-toolbar {
  margin-top: 14px;
}

.selection-card,
.benchmark-preset-card,
.model-picker-card,
.model-picker-starter-card,
.model-picker-custom-card,
.advanced-filters,
.settings-diagnostics {
  border-color: var(--color-border);
  background: var(--color-surface-strong);
  color: var(--color-text);
}

.selection-card small,
.selection-card em,
.benchmark-preset-card small,
.benchmark-preset-card em,
.model-picker-card small,
.model-picker-starter-card small,
.model-picker-custom-card small {
  color: var(--color-text-muted);
}

.settings-diagnostics {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.settings-diagnostics summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-weight: 700;
}

.settings-diagnostics p:last-child {
  margin-bottom: 0;
}

.operator-bandwidth-card {
  display: grid;
  gap: 12px;
}

.operator-funnel-card,
.operator-funnel-rail {
  display: grid;
  gap: 12px;
}

.operator-funnel-stage {
  display: grid;
  grid-template-columns: minmax(76px, 0.7fr) minmax(80px, 2fr) auto;
  gap: 10px;
  align-items: center;
}

.operator-funnel-stage i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-border-soft);
}

.operator-funnel-stage b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}

.operator-funnel-stage strong {
  min-width: 3ch;
  text-align: right;
}

.operator-bandwidth-routes {
  display: grid;
  gap: 8px;
}

.operator-bandwidth-routes div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--color-border-soft);
}

.operator-bandwidth-routes span,
.operator-bandwidth-routes small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.operator-bandwidth-routes strong {
  white-space: nowrap;
}

.operator-bandwidth-routes small {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
}

.settings-drawer-header p {
  max-width: 34ch;
}

.run-observer-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.run-observer-grid > * {
  min-width: 0;
}

.run-observation-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.run-observation-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.run-result-actions {
  margin-top: 12px;
}

.run-card {
  padding: 12px;
}

.run-card .mono {
  max-width: 58ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-card .muted {
  overflow-wrap: anywhere;
}

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

.home-spotlight-card,
.signal-card,
.summary-action-card {
  min-height: 0;
}

.stats-grid .summary-action-card span,
.signal-card p {
  min-height: 0;
  line-height: 1.35;
}

html[data-theme="dark"] .selection-card,
html[data-theme="dark"] .benchmark-preset-card,
html[data-theme="dark"] .model-picker-card,
html[data-theme="dark"] .model-picker-starter-card,
html[data-theme="dark"] .model-picker-custom-card,
html[data-theme="dark"] .advanced-filters,
html[data-theme="dark"] .settings-diagnostics,
html[data-theme="dark"] .plot-summary-strip span,
html[data-theme="dark"] .plot-scope-strip span,
html[data-theme="dark"] .score-scope-callout,
html[data-theme="dark"] .plot-legend span,
html[data-theme="dark"] .plot-fullscreen-modal,
html[data-theme="dark"] .recommend-question-summary,
html[data-theme="dark"] .recommendation-evidence-strip,
html[data-theme="dark"] .hardware-evidence-card,
html[data-theme="dark"] .answer-primary-strip > div,
html[data-theme="dark"] .empty-state-card,
html[data-theme="dark"] .saved-view-hint .empty-state-card {
  background: var(--color-surface-strong);
  color: var(--color-text);
}

html[data-theme="dark"] .answer-first-panel.is-compact .recommend-question-summary {
  background: transparent;
}

html[data-theme="dark"] thead th {
  background: var(--color-surface-strong);
}

@media (max-width: 920px) {
  .explore-family-quants li {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 0.7fr);
  }

  .explore-family-quants .explore-quant-name,
  .explore-family-quants .explore-quant-evidence {
    grid-column: 1 / -1;
  }

  .explore-family-quants .compact-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .explore-family-gap {
    align-items: stretch;
    flex-direction: column;
  }

  .compare-evidence-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .compare-evidence-affordance {
    width: 100%;
  }

  .plot-selected-summary {
    grid-template-columns: 1fr;
  }

  .plot-header-actions {
    justify-items: stretch;
  }

  .plot-lens-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .plot-lens-button {
    flex: 1 1 138px;
  }

  .plot-header-actions .panel-meta {
    max-width: none;
    text-align: left;
  }

  .plot-fullscreen-modal {
    inset: 8px;
    padding: 12px;
  }

  .plot-fullscreen-content .plot-frame {
    height: 70vh;
  }

  .plot-fullscreen-content .plot-svg {
    min-width: 720px;
  }

  .run-observer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .theme-toggle {
    min-width: 0;
  }

  .theme-toggle-copy {
    display: none;
  }

  .plot-frame .plot-svg {
    min-width: 0;
  }

  .plot-scope-strip {
    display: none;
  }

  .plot-summary-strip {
    gap: 4px 10px;
  }

  .plot-model-option {
    grid-template-columns: auto minmax(0, 1fr) 10px;
  }

  .plot-model-score,
  .plot-model-option > small {
    grid-column: 2 / -1;
    text-align: left;
  }

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

  .plot-selected-summary .candidate-rationale .insight-summary-copy {
    display: none;
  }

  .plot-selected-summary .candidate-rationale .story-kicker {
    overflow-wrap: normal;
    word-break: normal;
  }

  .capability-task-profile-heading {
    align-items: start;
    flex-direction: column;
  }

  .capability-task-profile-heading > small {
    text-align: left;
  }

  .capability-task-profile-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .capability-task-profile-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .capability-task-profile-score {
    text-align: right;
  }

  #wizard-plot .plot-frame {
    display: block;
    margin-top: 8px;
  }

  #wizard-plot .plot-frame .plot-svg {
    width: max(560px, 100%);
    height: 300px;
    min-width: 560px;
  }

  .plot-mobile-snapshot {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
  }

  .plot-mobile-snapshot span {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .plot-mobile-snapshot strong {
    color: var(--color-text);
  }

  .plot-fullscreen-button {
    width: 100%;
  }

  .plot-card .handoff-header {
    align-items: stretch;
    flex-direction: column;
  }

  #wizard-selected .selected-recommendation-card {
    position: static;
  }

  .plot-fullscreen-modal {
    inset: 0;
    border-radius: 0;
  }

  .plot-fullscreen-content > .handoff-header > div:first-child p,
  .plot-fullscreen-content .plot-header-actions .panel-meta,
  .plot-fullscreen-content .plot-legend {
    display: none;
  }

  .plot-fullscreen-content .plot-summary-strip span:last-child {
    grid-column: 1 / -1;
  }

  .plot-fullscreen-header {
    align-items: stretch;
    flex-direction: column;
  }

  .plot-fullscreen-header button {
    width: 100%;
  }

  .plot-fullscreen-content .plot-frame {
    height: min(52dvh, 430px);
    min-height: 320px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .plot-fullscreen-content .plot-svg {
    width: max(560px, 100%);
    height: 100%;
    min-width: 560px;
    min-height: 0;
  }

  .plot-fullscreen-content .plot-mobile-snapshot {
    display: none;
  }

  .plot-fullscreen-content .plot-frame {
    display: block;
  }

  .recommendation-table-wrap {
    overflow: visible;
  }

  .results-table-wrap,
  .comparison-metric-group .table-wrap,
  .compare-workbench-table-wrap,
  .family-branch-table-wrap,
  .family-quant-table-wrap,
  .runs-table-wrap {
    overflow: visible;
  }

  .recommendation-table-wrap table,
  .recommendation-table-wrap thead,
  .recommendation-table-wrap tbody,
  .recommendation-table-wrap tr,
  .recommendation-table-wrap td,
  .results-table-wrap table,
  .results-table-wrap thead,
  .results-table-wrap tbody,
  .results-table-wrap tr,
  .results-table-wrap td,
  .comparison-metric-group .table-wrap table,
  .comparison-metric-group .table-wrap thead,
  .comparison-metric-group .table-wrap tbody,
  .comparison-metric-group .table-wrap tr,
  .comparison-metric-group .table-wrap td,
  .compare-workbench-table-wrap table,
  .compare-workbench-table-wrap thead,
  .compare-workbench-table-wrap tbody,
  .compare-workbench-table-wrap tr,
  .compare-workbench-table-wrap td,
  .family-branch-table-wrap table,
  .family-branch-table-wrap thead,
  .family-branch-table-wrap tbody,
  .family-branch-table-wrap tr,
  .family-branch-table-wrap td,
  .family-quant-table-wrap table,
  .family-quant-table-wrap thead,
  .family-quant-table-wrap tbody,
  .family-quant-table-wrap tr,
  .family-quant-table-wrap td,
  .runs-table-wrap table,
  .runs-table-wrap thead,
  .runs-table-wrap tbody,
  .runs-table-wrap tr,
  .runs-table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .recommendation-table-wrap table,
  .results-table-wrap table,
  .comparison-metric-group .table-wrap table,
  .compare-workbench-table-wrap table,
  .family-branch-table-wrap table,
  .family-quant-table-wrap table,
  .runs-table-wrap table {
    border: 0;
  }

  .recommendation-table-wrap thead,
  .results-table-wrap thead,
  .comparison-metric-group .table-wrap thead,
  .compare-workbench-table-wrap thead,
  .family-branch-table-wrap thead,
  .family-quant-table-wrap thead,
  .runs-table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .runs-table-wrap th {
    display: none;
  }

  .recommendation-table-wrap tbody,
  .results-table-wrap tbody,
  .comparison-metric-group .table-wrap tbody,
  .compare-workbench-table-wrap tbody,
  .family-branch-table-wrap tbody,
  .family-quant-table-wrap tbody,
  .runs-table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .recommendation-table-wrap tbody tr[data-result-id],
  .results-table-wrap tbody tr,
  .comparison-metric-group .table-wrap tbody tr,
  .compare-workbench-table-wrap tbody tr,
  .family-branch-table-wrap tbody tr,
  .family-quant-table-wrap tbody tr,
  .runs-table-wrap tbody tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface-strong);
    box-shadow: var(--shadow-sm);
  }

  .recommendation-table-wrap tbody tr.is-focused {
    box-shadow: inset 3px 0 0 var(--color-accent, #0b7d79), var(--shadow-sm);
  }

  .recommendation-table-wrap tbody tr[data-result-id] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .recommendation-table-wrap td,
  .results-table-wrap td,
  .comparison-metric-group .table-wrap td,
  .compare-workbench-table-wrap td,
  .family-branch-table-wrap td,
  .family-quant-table-wrap td,
  .runs-table-wrap td {
    display: grid;
    grid-template-columns: minmax(86px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 0;
    border: 0;
  }

  .recommendation-table-wrap td::before,
  .results-table-wrap td::before,
  .comparison-metric-group .table-wrap td::before,
  .compare-workbench-table-wrap td::before,
  .family-branch-table-wrap td::before,
  .family-quant-table-wrap td::before,
  .runs-table-wrap td::before {
    content: attr(data-label);
    color: var(--color-text-soft);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .recommendation-table-wrap td[data-label="Model"],
  .recommendation-table-wrap td[data-label="Evidence"],
  .recommendation-table-wrap .recommendation-score-cell,
  .recommendation-table-wrap .recommendation-fit-cell,
  .recommendation-table-wrap .recommendation-trust-cell,
  .results-table-wrap td[data-label="Model"],
  .compare-workbench-table-wrap td[data-label="Variant"],
  .compare-workbench-table-wrap td[data-label="Checkpoint"],
  .compare-workbench-table-wrap td[data-label="Quant"],
  .family-branch-table-wrap td[data-label="Branch"],
  .family-quant-table-wrap td[data-label="Quant"] {
    grid-template-columns: 1fr;
  }

  .recommendation-table-wrap .recommendation-model-cell,
  .recommendation-table-wrap .recommendation-evidence-cell,
  .recommendation-table-wrap .recommendation-score-cell,
  .recommendation-table-wrap .recommendation-fit-cell,
  .recommendation-table-wrap .recommendation-trust-cell {
    grid-column: 1 / -1;
  }

  .recommendation-table-wrap .recommendation-rank-cell,
  .recommendation-table-wrap .recommendation-secondary-cell {
    display: none;
  }

  .recommendation-table-wrap .recommendation-metric-cell {
    grid-template-columns: 1fr;
    gap: 4px;
    align-content: start;
    min-height: 70px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 9px;
    background: var(--color-surface-muted);
    font-weight: 900;
  }

  .recommendation-table-wrap .recommendation-metric-cell::before {
    line-height: 1.1;
  }

  .recommendation-table-wrap .recommendation-evidence-cell .table-cell-note {
    display: none !important;
  }

  .recommendation-table-wrap .result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
  }

  .recommendation-table-wrap .result-actions button {
    flex: initial;
    width: 100%;
    min-height: 38px;
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  .family-panel.has-family-results > .panel-heading,
  .family-panel.has-family-results > .decision-toolbar {
    display: none;
  }

  .family-panel.has-family-results #family-form {
    gap: 8px;
  }

  .family-panel.has-family-results #family-form .filters-actions button {
    min-height: 40px;
  }

	  .recommendation-table-wrap td[data-label="Model"]::before,
	  .recommendation-table-wrap td[data-label="Evidence"]::before,
	  .recommendation-table-wrap .recommendation-score-cell::before,
	  .recommendation-table-wrap .recommendation-fit-cell::before,
	  .recommendation-table-wrap .recommendation-trust-cell::before,
	  .results-table-wrap td[data-label="Model"]::before,
	  .compare-workbench-table-wrap td[data-label="Variant"]::before,
	  .compare-workbench-table-wrap td[data-label="Checkpoint"]::before,
	  .compare-workbench-table-wrap td[data-label="Quant"]::before,
	  .family-branch-table-wrap td[data-label="Branch"]::before,
	  .family-quant-table-wrap td[data-label="Quant"]::before {
	    margin-bottom: -4px;
	  }

  .family-quant-ladder-card .table-scroll-hint {
    display: none;
  }

  .family-quant-lens-strip {
    gap: 8px;
    margin: 8px 0 10px;
  }

  .family-quant-lens-heading {
    display: grid;
    gap: 2px;
  }

  .family-quant-lens-heading small {
    text-align: left;
  }

  .family-quant-lens-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .family-quant-lens-card {
    min-height: 106px;
    padding: 9px;
  }

  .family-quant-plot {
    margin: 6px 0 10px;
  }

  .family-quant-plot-heading {
    display: grid;
    gap: 2px;
  }

  .family-quant-plot-heading-actions {
    display: grid;
    justify-content: stretch;
  }

  .family-quant-plot-heading small {
    text-align: left;
  }

  .family-quant-plot-expand {
    width: 100%;
  }

  .family-quant-plot-lenses {
    display: grid;
    gap: 6px;
  }

  .family-quant-plot-lens-buttons {
    justify-content: flex-start;
  }

  .family-quant-plot-frame {
    padding: 2px;
  }

  .family-quant-plot-svg {
    min-height: 200px;
  }

  .family-quant-plot-summary {
    display: grid;
  }

  .family-quant-plot-selected {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .family-quant-selected-actions {
    justify-content: stretch;
  }

  .family-quant-selected-meta {
    justify-items: stretch;
  }

  .family-quant-selected-chips {
    justify-content: flex-start;
  }

  .family-quant-selected-actions .compact-button {
    width: 100%;
  }

  .plot-fullscreen-content .family-quant-plot-heading small {
    display: none;
  }

  .plot-fullscreen-content .family-quant-plot-frame {
    height: min(54dvh, 440px);
    min-height: 320px;
  }

  .plot-fullscreen-content .family-quant-plot-svg {
    width: max(560px, 100%);
    height: 100%;
    min-width: 560px;
    min-height: 0;
  }

  .family-quant-table-wrap tbody {
    gap: 8px;
  }

  .family-quant-table-wrap tbody tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border-radius: var(--radius-md);
  }

  .family-quant-table-wrap td {
    grid-template-columns: 1fr;
    gap: 3px;
    align-content: start;
  }

  .family-quant-table-wrap td[data-label="Quant"],
  .family-quant-table-wrap td[data-label="Evidence"],
  .family-quant-table-wrap td[data-label="Action"] {
    grid-column: 1 / -1;
  }

  .family-quant-table-wrap td[data-label="Quant"] {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 8px;
  }

  .family-quant-table-wrap td[data-label="Quant"]::before,
  .family-quant-table-wrap td[data-label="Evidence"]::before,
  .family-quant-table-wrap td[data-label="Action"]::before {
    display: none;
  }

  .family-quant-table-wrap td[data-label="Quant"] strong {
    font-size: 0.96rem;
    line-height: 1.12;
  }

  .family-quant-table-wrap td[data-label="Quant"] p {
    margin: 0;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .family-quant-table-wrap .family-quant-evidence-cell .chip-row,
  .family-quant-table-wrap .family-quant-trust-cell .chip-row {
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .family-quant-table-wrap .family-quant-evidence-cell .chip-row::-webkit-scrollbar,
  .family-quant-table-wrap .family-quant-trust-cell .chip-row::-webkit-scrollbar {
    display: none;
  }

  .family-quant-table-wrap .family-quant-evidence-cell .chip,
  .family-quant-table-wrap .family-quant-trust-cell .chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .family-quant-table-wrap .family-quant-evidence-cell .chip:nth-child(n + 3) {
    display: none;
  }

  .family-quant-table-wrap .family-quant-evidence-cell p,
  .family-quant-table-wrap .family-quant-trust-cell,
  .family-quant-table-wrap .family-quant-score-cell p,
  .family-quant-table-wrap .family-quant-speed-cell p,
  .family-quant-table-wrap .family-quant-memory-cell p,
  .family-quant-table-wrap .cap-score-note,
  .family-quant-table-wrap .cap-bar {
    display: none;
  }

  .family-quant-table-wrap .family-quant-score-cell,
  .family-quant-table-wrap .family-quant-speed-cell,
  .family-quant-table-wrap .family-quant-memory-cell {
    min-height: 62px;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
  }

  .family-quant-table-wrap .family-quant-score-cell::before,
  .family-quant-table-wrap .family-quant-speed-cell::before,
  .family-quant-table-wrap .family-quant-memory-cell::before {
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .family-quant-table-wrap .family-quant-score-cell strong,
  .family-quant-table-wrap .family-quant-speed-cell strong,
  .family-quant-table-wrap .family-quant-memory-cell strong {
    align-self: end;
    font-size: 0.86rem;
    line-height: 1.12;
  }

  .family-quant-table-wrap .family-quant-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .family-quant-table-wrap .family-quant-actions button {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding-inline: 8px;
  }

	.recommendation-table-wrap .button-row,
	  .recommendation-table-wrap .compact-actions {
	    align-items: stretch;
	  }

  .recommendation-table-wrap .button-row button {
    flex: 1 1 100%;
  }

  .insight-disclosure summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .insight-disclosure summary::after {
    justify-self: stretch;
    max-width: none;
  }

  .insight-summary-copy {
    max-width: none;
    text-align: left;
  }

  .recommend-evidence-grid {
    grid-template-columns: 1fr;
  }

  .recommend-evidence-topline {
    display: grid;
  }

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

  .recommendation-panel > .panel-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  #share-heading-button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    justify-content: center;
    white-space: normal;
    line-height: 1.2;
  }

  .hardware-evidence-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hardware-evidence-copy {
    min-width: 0;
  }

  .hardware-evidence-copy p {
    margin-bottom: 0;
  }

  .hardware-evidence-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hardware-evidence-counts span {
    min-height: 0;
    padding: 9px 7px;
    text-align: left;
  }

  .hardware-evidence-counts strong {
    font-size: 1rem;
  }

  .hardware-evidence-counts small {
    font-size: 0.64rem;
    line-height: 1.15;
  }

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

  .answer-first-metrics > span {
    padding: 9px 10px;
  }

  .answer-first-metrics .cap-score {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    line-height: 1.08;
  }

  .answer-first-metrics .cap-score-note {
    grid-column: auto;
    margin-top: 0;
  }

  .answer-primary-actions,
  .selected-recommendation-card .button-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .answer-primary-actions button,
  .selected-recommendation-card .button-row button {
    width: 100%;
    min-width: 0;
  }

  .answer-summary-card {
    gap: 10px;
    padding: 14px;
  }

  .answer-summary-card .handoff-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .answer-summary-card .handoff-header > .chip-row {
    justify-content: start;
  }

  .answer-decision-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .answer-decision-facts > div {
    padding: 9px;
  }

  .answer-decision-facts span {
    font-size: 0.64rem;
  }

  .answer-decision-facts strong {
    font-size: 0.92rem;
  }

  .answer-visual-metrics.answer-decision-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .answer-visual-metric {
    min-height: 96px;
  }

  .recommendation-decision-map {
    padding: 10px;
  }

  .decision-map-heading {
    align-items: start;
  }

  .decision-map-axis {
    grid-template-columns: 1fr;
    padding: 0 6px;
  }

  .decision-map-axis > span:first-child {
    display: none;
  }

  .decision-map-axis > span:last-child,
  .decision-map-values {
    gap: 3px;
  }

  .decision-map-axis i,
  .decision-map-values span {
    font-size: 0.6rem;
  }

  .decision-map-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
  }

  .decision-map-label {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    column-gap: 8px;
  }

  .decision-map-label span {
    grid-column: 1 / -1;
  }

  .decision-map-glyph {
    height: 46px;
  }

  .recommendation-decision-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .recommendation-decision-grid.answer-primary-strip.answer-confidence-callout {
    grid-template-columns: 1fr;
  }

  .answer-evidence-mini-grid {
    grid-template-columns: 1fr;
  }

  .answer-methodology-heading {
    display: grid;
    gap: 7px;
  }

  .answer-methodology-heading .chip-row {
    justify-content: start;
  }

  .answer-methodology-snapshot {
    padding: 10px;
  }

  .answer-methodology-snapshot dl {
    grid-template-columns: 1fr;
  }

  .answer-evidence-mini-disclosure summary {
    min-height: 42px;
  }

  .answer-selected-reason,
  .recommendation-next-benchmark {
    padding: 10px;
  }

  .answer-primary-actions {
    gap: 8px;
  }

  .answer-primary-actions > button:first-child {
    min-height: 46px;
  }

  .recommendation-secondary-actions {
    width: 100%;
    flex: initial;
  }

  .recommendation-secondary-actions .button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .recommendation-run-strip {
    grid-template-columns: 1fr;
  }

  .recommendation-run-strip button {
    width: 100%;
  }

  .selected-recommendation-card .handoff-header {
    align-items: stretch;
    flex-direction: column;
  }

  .selected-recommendation-card .chip-row {
    width: 100%;
  }

  .selected-recommendation-card .candidate-rationale summary {
    grid-template-columns: 1fr;
  }

  .family-knee-surface {
    padding: 12px;
  }

  .family-knee-title {
    display: grid;
  }

  .family-knee-title p {
    max-width: none;
    text-align: left;
  }

  .family-knee-selector {
    grid-template-columns: 1fr;
  }

  .family-knee-toggle-row {
    flex-wrap: nowrap;
    margin-inline: -2px;
    padding: 2px 2px 6px;
    overflow-x: auto;
    scrollbar-gutter: stable both-edges;
  }

  .family-knee-toggle {
    flex: 0 0 min(260px, 82vw);
  }

  .family-knee-grid {
    grid-template-columns: 1fr;
  }

  .family-knee-card .button-row {
    align-items: stretch;
  }

  .family-knee-card .button-row button {
    width: 100%;
  }

  .build-step-actions,
  .builder-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .build-step-actions button,
  .builder-actions button {
    width: 100%;
  }

  .runtime-compatibility-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .run-card .mono {
    max-width: 100%;
  }

  #wizard-plot .plot-scope-strip,
  #wizard-plot .plot-summary-strip,
  #wizard-plot .plot-selected-summary .capability-basis-strip {
    display: none;
  }
}
