:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #0b0b10;
  --bg-canvas-alt: #050507;
  --bg-surface: #101114;
  --bg-surface-elevated: #17181c;
  --bg-code: #090a0d;
  --border-subtle: #ffffff1a;
  --border-strong: #ffffff2e;
  --overlay-faint: #ffffff06;
  --overlay-raise: #ffffff08;
  --overlay-strong: #ffffff12;
  --track-bg: #ffffff18;
  --fg-primary: #f6f7f9;
  --fg-secondary: #b8b6be;
  --fg-muted: #7d8ea6;
  --accent-brand: #eb0052;
  --accent-brand-hover: #d10049;
  --accent-on-brand: #ffffff;
  --ring-brand: #eb0052eb;
  --status-proven: #3ab07b;
  --status-proving: #5d8fff;
  --status-waiting: #7d8ea6;
  --status-failed: #ff5f6d;
  --status-warn: #f0b14a;
  --status-cached: #2ac3b2;
  --syntax-keyword: #7fb4ff;
  --syntax-spec-keyword: #55d8a5;
  --syntax-type: #90ddff;
  --syntax-identifier: #f0f3fa;
  --syntax-number: #f2c56b;
  --syntax-string: #d6bdff;
  --syntax-comment: #7c8798;
  --syntax-punctuation: #a6adbb;
  --syntax-spec-delimiter: #ff5fa2;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow-panel: 0 18px 44px #00000038;
  --font-display: Orbitron, Satoshi, Inter, system-ui, sans-serif;
  --font-ui: Satoshi, Inter, "Segoe UI", system-ui, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --row-height: 28px;
  --panel-padding: 16px;
}

/* Light theme — AA-contrast verified surfaces, text, status, and syntax colors. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #f4f5f7;
  --bg-canvas-alt: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f3f6;
  --bg-code: #f7f8fa;
  --border-subtle: #11182714;
  --border-strong: #1118272e;
  --overlay-faint: #11182705;
  --overlay-raise: #1118270a;
  --overlay-strong: #11182714;
  --track-bg: #11182718;
  --fg-primary: #14181f;
  --fg-secondary: #44505f;
  --fg-muted: #5b6675;
  --accent-brand: #d10049;
  --accent-brand-hover: #b00440;
  --accent-on-brand: #ffffff;
  --ring-brand: #d10049eb;
  --status-proven: #1f8f5f;
  --status-proving: #2f6fe0;
  --status-waiting: #5b6675;
  --status-failed: #d62839;
  --status-warn: #b07400;
  --status-cached: #128577;
  --syntax-keyword: #1d6fd6;
  --syntax-spec-keyword: #0f8a5f;
  --syntax-type: #0b73a8;
  --syntax-identifier: #14181f;
  --syntax-number: #b06a00;
  --syntax-string: #7a3fd0;
  --syntax-comment: #6b7685;
  --syntax-punctuation: #5b6675;
  --syntax-spec-delimiter: #c4267f;
  --shadow-panel: 0 12px 30px #1118271f;
}

/* Honour the OS preference before the theme toggle initialises (no-JS default). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg-canvas: #f4f5f7;
    --bg-canvas-alt: #ffffff;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f3f6;
    --bg-code: #f7f8fa;
    --border-subtle: #11182714;
    --border-strong: #1118272e;
    --overlay-faint: #11182705;
    --overlay-raise: #1118270a;
    --overlay-strong: #11182714;
    --track-bg: #11182718;
    --fg-primary: #14181f;
    --fg-secondary: #44505f;
    --fg-muted: #5b6675;
    --accent-brand: #d10049;
    --accent-brand-hover: #b00440;
    --ring-brand: #d10049eb;
    --status-proven: #1f8f5f;
    --status-proving: #2f6fe0;
    --status-waiting: #5b6675;
    --status-failed: #d62839;
    --status-warn: #b07400;
    --status-cached: #128577;
    --syntax-keyword: #1d6fd6;
    --syntax-spec-keyword: #0f8a5f;
    --syntax-type: #0b73a8;
    --syntax-identifier: #14181f;
    --syntax-number: #b06a00;
    --syntax-string: #7a3fd0;
    --syntax-comment: #6b7685;
    --syntax-punctuation: #5b6675;
    --syntax-spec-delimiter: #c4267f;
    --shadow-panel: 0 12px 30px #1118271f;
  }
}

[data-density="compact"] {
  --row-height: 22px;
  --panel-padding: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-canvas);
  color: var(--fg-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.prover-app {
  min-height: 100vh;
}

.portfolio-shell {
  display: grid;
  gap: 18px;
  width: min(1320px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-canvas-alt) 88%, transparent);
  box-shadow: var(--shadow-panel);
}

.portfolio-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: 0 10px 24px #00000024;
}

.portfolio-table-head {
  display: grid;
  grid-template-columns: minmax(170px, 1.05fr) minmax(220px, 1.25fr) minmax(160px, 0.95fr) minmax(210px, 1fr) minmax(334px, max-content);
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-canvas-alt) 92%, transparent);
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portfolio-empty {
  display: grid;
  gap: 4px;
  min-height: 148px;
  align-content: center;
  justify-items: center;
  padding: 28px 18px;
  color: var(--fg-secondary);
  text-align: center;
}

.portfolio-empty h2 {
  margin: 0;
  color: var(--fg-primary);
  font-family: var(--font-display);
  font-size: 18px;
}

.portfolio-empty p {
  max-width: 520px;
  margin: 0;
}

.portfolio-project {
  display: grid;
  grid-template-columns: minmax(170px, 1.05fr) minmax(220px, 1.25fr) minmax(160px, 0.95fr) minmax(210px, 1fr) minmax(334px, max-content);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.portfolio-project:last-child {
  border-bottom: 0;
}

.portfolio-project:hover {
  background: color-mix(in srgb, var(--accent-brand) 7%, var(--bg-surface));
}

.admin-project-access-shell {
  width: min(1180px, calc(100vw - 32px));
}

.admin-access-eyebrow {
  margin: 0 0 2px;
  color: var(--accent-brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-access-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.admin-access-intro h2,
.admin-access-intro p {
  margin: 0;
}

.admin-access-intro h2 {
  font-family: var(--font-display);
  font-size: 18px;
}

.admin-access-intro p {
  margin-top: 4px;
  color: var(--fg-secondary);
}

.admin-access-policy {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg-secondary);
  font-size: 11px;
  font-weight: 700;
}

.admin-access-list {
  display: grid;
  gap: 12px;
}

.admin-access-project {
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: 0 10px 24px #00000018;
}

.admin-access-project-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(420px, 2fr);
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

.admin-access-project-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-access-project-title h2,
.admin-access-project-title p {
  margin: 0;
}

.admin-access-project-title h2 {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-access-project-title p {
  overflow: hidden;
  color: var(--fg-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-access-project-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 12px;
  margin: 0;
}

.admin-access-project-facts div {
  min-width: 0;
}

.admin-access-project-facts dt {
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-access-project-facts dd {
  overflow: hidden;
  margin: 2px 0 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-access-blocked-reason {
  grid-column: 1 / -1;
  margin: -6px 0 0 30px;
  color: var(--status-failed);
  font-size: 11px;
}

.admin-access-details {
  border-top: 1px solid var(--border-subtle);
}

.admin-access-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 18px;
  color: var(--fg-secondary);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.admin-access-details > summary::-webkit-details-marker {
  display: none;
}

.admin-access-details > summary span:last-child {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-canvas-alt);
  text-align: center;
}

.admin-access-details-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
  gap: 18px;
  padding: 4px 18px 18px;
}

.admin-access-details h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.admin-access-members {
  display: grid;
  gap: 8px;
}

.admin-access-member {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas-alt);
}

.admin-access-member-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-access-member-identity span {
  display: grid;
  overflow: hidden;
  color: var(--fg-muted);
  font-size: 10px;
  text-overflow: ellipsis;
}

.admin-access-grant {
  display: grid;
  gap: 9px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas-alt);
}

.admin-access-grant h3 {
  grid-column: 1 / -1;
}

.admin-access-grant > label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-access-grant select {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--fg-primary);
  text-transform: none;
}

.admin-access-action {
  min-width: 92px;
  min-height: 36px;
}

.admin-access-member > form:last-child {
  justify-self: end;
}

.admin-access-revoke {
  color: var(--status-failed);
}

.admin-access-empty,
.admin-access-limit {
  margin: 0;
  color: var(--fg-muted);
  font-size: 11px;
}

.portfolio-project-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.portfolio-project-main .status-ico {
  flex: 0 0 18px;
}

.portfolio-project-main h2 {
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
}

.portfolio-project-main a {
  display: inline-block;
  max-width: 100%;
  color: var(--fg-primary);
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-project-main a:hover {
  color: var(--accent-brand);
}

.portfolio-project-main p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
  color: var(--fg-secondary);
}

.portfolio-project-main code,
.portfolio-project-facts code,
.portfolio-bundle-cell code {
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
}

.portfolio-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.portfolio-cell-label {
  display: none;
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.portfolio-code-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.portfolio-code-line code {
  min-width: 0;
  overflow: hidden;
  color: var(--fg-primary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-muted {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--fg-secondary);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-freshness {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.portfolio-freshness.fresh {
  color: var(--status-proven);
}

.portfolio-freshness.stale {
  color: var(--status-warn);
}

.portfolio-project-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
  min-width: 0;
}

.portfolio-project-facts div {
  min-width: 0;
}

.portfolio-project-facts dt {
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.portfolio-project-facts dd {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--fg-primary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-run-state {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.portfolio-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(62px, 1fr));
  gap: 6px;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.portfolio-actions form {
  min-width: 0;
  margin: 0;
}

.portfolio-actions .primary-button,
.portfolio-actions .ghost-button {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 10px;
}

.admin-shell {
  width: min(1440px, calc(100vw - 32px));
}

.admin-dashboard {
  display: grid;
  gap: 14px;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: 0 10px 24px #00000024;
}

.admin-filter-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-filter-bar label span,
.admin-filter-summary span {
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-filter-bar input[type="search"],
.admin-filter-bar select {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--fg-primary);
  font: inherit;
}

.admin-filter-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}

.admin-filter-toggle input {
  margin: 0;
}

.admin-filter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.admin-filter-summary code {
  color: var(--fg-primary);
  font-family: var(--font-code);
  font-size: 11px;
}

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

.admin-health-chip,
.admin-section {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: 0 10px 24px #00000024;
}

.admin-health-chip {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}

.admin-health-chip span,
.admin-health-chip em,
.admin-section-title code {
  color: var(--fg-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-health-chip strong {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}

.admin-section {
  min-width: 0;
  padding: 12px;
}

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

.admin-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-section-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.2;
}

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

.admin-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-table td {
  color: var(--fg-secondary);
}

.admin-table code {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--fg-primary);
  font-family: var(--font-code);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table form {
  margin: 0;
}

.admin-table .ghost-button {
  min-width: 66px;
  justify-content: center;
}

.run-summary {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(180px, 1fr) minmax(280px, max-content);
  gap: 18px;
  align-items: center;
  min-height: 66px;
  margin: 16px 16px 0;
  padding: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  position: relative;
  z-index: 30;
}

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

.run-title > div {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent-brand) 50%, transparent);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #eb005233, #5d8fff17);
}

.brand-logo {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 120ms ease;
}

.brand-logo-vivid,
:root[data-theme="dark"] .brand-logo-dark,
:root[data-theme="light"] .brand-logo-light {
  opacity: 1;
}

:root[data-theme="dark"] .brand-logo-vivid,
:root[data-theme="light"] .brand-logo-vivid {
  opacity: 0;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .brand-logo-light {
    opacity: 1;
  }

  :root:not([data-theme]) .brand-logo-vivid {
    opacity: 0;
  }
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
}

.run-title h1,
.run-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-subtitle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.run-subtitle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.run-subtitle code {
  flex: 0 0 auto;
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
}

.run-title p,
.panel-heading p,
.proof-toolbar p,
.selected-card p,
.lineage-tree p,
.property-tree p,
.tree-note p {
  margin-bottom: 0;
  color: var(--fg-secondary);
}

.summary-counters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.summary-chip,
.summary-filter,
.primary-button,
.ghost-button,
.mini-button,
.artifact-links button,
.artifact-links a {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  color: var(--fg-primary);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 120ms ease-out, background 120ms ease-out, transform 120ms ease-out;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 7px;
  white-space: nowrap;
}

.summary-chip strong {
  font-size: 16px;
}

.summary-chip em {
  color: var(--fg-secondary);
  font-style: normal;
  font-size: 12px;
}

.specification-progress-chip {
  border-style: dashed;
}

.specification-progress-chip.coverage-ready span {
  color: var(--status-proven);
}

.specification-progress-chip.coverage-pending span,
.specification-progress-chip.coverage-analyzing span {
  color: var(--status-proving);
}

.specification-progress-chip.coverage-failed span {
  color: var(--status-failed);
}

.specification-progress-chip.coverage-unavailable span {
  color: var(--status-waiting);
}

.summary-chip:hover,
.summary-filter:hover,
.ghost-button:hover,
.mini-button:hover,
.artifact-links button:hover,
.artifact-links a:hover {
  border-color: var(--accent-brand);
}

.proven,
.summary-chip.proven span {
  color: var(--status-proven);
}

.proving,
.summary-chip.proving span {
  color: var(--status-proving);
}

.waiting,
.summary-chip.waiting span {
  color: var(--status-waiting);
}

.failed,
.summary-chip.failed span {
  color: var(--status-failed);
}

.warn,
.summary-chip.warn span {
  color: var(--status-warn);
}

.cached,
.summary-chip.cached span {
  color: var(--status-cached);
}

.run-progress {
  min-width: 0;
}

.progress-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--fg-secondary);
}

.progress-meta strong {
  color: var(--fg-primary);
}

.progress-value,
.elapsed-live {
  font-variant-numeric: tabular-nums;
}

.progress-value {
  display: inline-block;
  min-width: 64px;
  text-align: left;
}

.run-meta-line {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 8px;
  min-width: 0;
  font-size: 12px;
}

.run-meta-line > span {
  max-width: 100%;
  white-space: nowrap;
}

.freshness {
  color: var(--fg-muted);
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track-bg);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--status-proven), var(--status-proving));
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 32px;
  background: linear-gradient(90deg, transparent, #ffffff80, transparent);
  animation: provePulse 1.6s ease-in-out infinite;
}

.run-actions,
.run-actions-form,
.toolbar-actions,
.lineage-actions,
.artifact-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.run-actions,
.run-actions-form {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.run-actions {
  flex-wrap: nowrap;
}

.view-switch-button {
  flex: 0 0 auto;
  justify-content: center;
}

.run-scope-status {
  display: grid;
  gap: 1px;
  max-width: 220px;
  min-height: 36px;
  justify-content: start;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  background: var(--overlay-faint);
}

.run-scope-status span {
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.run-scope-status strong {
  overflow: hidden;
  color: var(--fg-primary);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-switcher {
  display: inline-grid;
  gap: 1px;
  min-height: 36px;
  max-width: 180px;
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--overlay-faint);
}

.project-switcher span {
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.project-switcher select {
  min-width: 0;
  max-width: 150px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--fg-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.primary-button,
.ghost-button,
.mini-button,
.segmented-control button,
.artifact-links button,
.artifact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  font-weight: 700;
}

.artifact-link-list {
  flex-wrap: wrap;
  padding: 12px;
}

.primary-button {
  border-color: var(--accent-brand);
  background: var(--accent-brand);
  color: var(--accent-on-brand);
}

.primary-button:hover {
  background: var(--accent-brand-hover);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.prover-workspace {
  display: grid;
  grid-template-columns: var(--col-tree, 240px) 10px minmax(0, 1fr) 10px var(--col-right, 360px);
  gap: 0;
  padding: 14px;
}

.panel {
  min-width: 0;
  min-height: calc(100vh - 104px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-panel);
}

.source-tree,
.lineage-panel,
.property-panel {
  align-self: start;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 104px);
  overflow: auto;
}

.source-tree,
.proof-map-panel,
.lineage-panel,
.property-panel {
  padding: var(--panel-padding);
}

.source-tree,
.property-panel {
  padding-bottom: calc(var(--panel-padding) + var(--drawer-collapsed, 46px));
  scroll-padding-bottom: calc(var(--drawer-collapsed, 46px) + 24px);
}

.proof-map-panel {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 90px;
  height: calc(100vh - 104px);
  min-height: 0;
  overflow: hidden;
}

.panel-heading,
.proof-toolbar,
.selected-title,
.artifact-top,
.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading h2,
.proof-toolbar h2 {
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-size: 15px;
}

.panel-heading span,
.artifact-top code {
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
}

.tree {
  display: grid;
  gap: 4px;
}

.tree-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px 18px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: var(--row-height);
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
}

.tree-row::before,
.tree-row::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: color-mix(in srgb, var(--border-subtle) 82%, transparent);
}

.tree-row::before {
  top: 50%;
  left: calc(61px + var(--level) * 12px);
  width: 10px;
  height: 1px;
}

.tree-row::after {
  top: -5px;
  bottom: -5px;
  left: calc(61px + var(--level) * 12px);
  width: 1px;
}

.tree-node-button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: calc(var(--row-height) - 2px);
  padding: 0 0 0 calc(var(--level) * 12px + 16px);
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.tree-node-button:hover .tree-label,
.tree-node-button:focus-visible .tree-label {
  color: var(--fg-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tree-scope,
.tree-scope-placeholder,
.tree-expand-button,
.tree-expand-placeholder {
  display: grid;
  place-items: center;
  width: 18px;
  min-height: 18px;
}

.tree-scope input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-brand);
}

.tree-scope input:indeterminate {
  accent-color: var(--status-warn);
}

.tree-expand-button {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0;
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: var(--font-code);
  font-size: 12px;
  line-height: 1;
}

.tree-expand-button:hover {
  border-color: var(--accent-brand);
  color: var(--fg-primary);
}

.tree-glyph {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--bg-surface) 0 52%, transparent 54%),
    conic-gradient(currentColor var(--tree-progress, 0%), var(--track-bg) 0);
  font-size: 11px;
  line-height: 1;
}

.tree-row.selected {
  border-color: color-mix(in srgb, var(--accent-brand) 45%, transparent);
  background: #eb005214;
}

.tree-row[data-tree-scope-state="partial"] .tree-glyph {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--status-warn) 62%, transparent);
}

.tree-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tree-kind-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--fg-muted);
}

/* Kind badges render an SVG icon recolored with the kind's accent so the
   shape conveys the type and the hue reinforces it. The SVG paints the mask
   alpha; `currentColor` supplies the fill, keeping icons theme-aware. */
.tree-kind-icon::before {
  content: "";
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: var(--kind-icon, none) center / 13px 13px no-repeat;
  mask: var(--kind-icon, none) center / 13px 13px no-repeat;
}

.tree-kind-group {
  --kind-icon: url("/icons/icon-module.svg");
  color: var(--status-warn);
}

.tree-kind-file {
  --kind-icon: url("/icons/icon-file-solidity.svg");
  color: var(--fg-secondary);
}

.tree-kind-contract {
  --kind-icon: url("/icons/icon-contract.svg");
  color: var(--status-cached);
}

.tree-kind-function {
  --kind-icon: url("/icons/icon-function.svg");
  color: var(--status-proving);
}

.tree-kind-spec {
  --kind-icon: url("/icons/icon-spec.svg");
  color: var(--status-proven);
}

.tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-stale-badge {
  flex: 0 0 auto;
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--fg-muted) 35%, transparent);
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.tree-row.stale {
  opacity: 0.74;
}

.tree-count {
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
}

.tree-note {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
}

.proof-toolbar {
  align-items: flex-start;
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.search-control span {
  display: block;
  margin-bottom: 4px;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 700;
}

.search-control input {
  width: 220px;
  min-height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 10px;
  background: var(--bg-canvas-alt);
  color: var(--fg-primary);
}

.filter-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.jump-nav {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  margin-right: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
  background: var(--bg-canvas-alt);
}

.jump-nav-button {
  display: inline-grid;
  width: 28px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--fg-secondary);
  cursor: pointer;
  font: 800 13px/1 var(--font-ui);
}

.jump-nav-button:hover:not(:disabled),
.jump-nav-button:focus-visible {
  background: var(--overlay-raise);
  color: var(--fg-primary);
}

.jump-nav-button:disabled {
  color: var(--fg-subtle);
  cursor: not-allowed;
  opacity: 0.45;
}

.legend-trigger {
  flex: 0 0 auto;
}

.filter-result-note {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: color-mix(in srgb, var(--status-proving) 10%, var(--bg-surface-elevated));
  color: var(--fg-secondary);
  font-size: 11px;
  font-weight: 700;
}

.filter-result-note + .map-header {
  border-radius: 0;
}

.summary-filter {
  min-height: 30px;
  padding: 0 10px;
  color: var(--fg-secondary);
}

.summary-filter.active {
  border-color: var(--accent-brand);
  background: #eb00521f;
  color: var(--fg-primary);
  box-shadow: inset 0 -2px 0 var(--accent-brand);
}

.proof-map {
  display: flex;
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.map-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: var(--map-status-col, 132px) var(--map-line-col, 54px) minmax(0, 1fr);
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-surface-elevated);
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.map-header-cell {
  position: relative;
  min-width: 0;
}

.map-col-resizer {
  position: absolute;
  top: 0;
  right: -6px;
  bottom: 0;
  width: 12px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
  z-index: 2;
}

.map-col-resizer::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}

.map-col-resizer:hover::after,
.map-col-resizer:focus-visible::after,
body.resizing .map-col-resizer::after {
  background: var(--accent-brand);
}

.code-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scroll-padding-bottom: 96px;
  border: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--bg-code);
  overscroll-behavior: contain;
}

.code-scroll:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--status-proving) 70%, transparent);
  outline-offset: -2px;
}

.source-scroll .source-line,
.source-scroll .proof-row {
  content-visibility: auto;
}

.source-scroll .source-line {
  contain-intrinsic-size: 42px;
}

.source-scroll .proof-row {
  contain-intrinsic-size: 72px;
}

.proof-row,
.source-line {
  display: grid;
  grid-template-columns: var(--map-status-col, 132px) var(--map-line-col, 54px) minmax(760px, 1fr);
  width: 100%;
  min-height: var(--row-height);
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--fg-primary);
  text-align: left;
}

.source-line {
  --source-row-bg: var(--bg-code);
  grid-template-columns: var(--map-status-col, 132px) var(--map-line-col, 54px) max-content;
  width: max-content;
  min-width: 100%;
  border-bottom: 0;
  background: var(--source-row-bg);
}

.source-line::before {
  content: "";
  position: sticky;
  left: 0;
  z-index: 3;
  grid-column: 1 / 3;
  grid-row: 1;
  align-self: stretch;
  background: var(--source-row-bg);
  pointer-events: none;
}

.source-line .proof-gutter,
.source-line .line-no {
  position: sticky;
  z-index: 4;
  grid-row: 1;
  overflow: hidden;
  border-right: 0;
  background: var(--source-row-bg);
}

.source-line .proof-gutter {
  grid-column: 1;
  left: 0;
}

.source-line .line-no {
  grid-column: 2;
  left: var(--map-status-col, 132px);
}

.proof-row:hover,
.proof-row.selected {
  background: #eb005214;
}

.source-line:hover {
  --source-row-bg: color-mix(in srgb, var(--accent-brand) 8%, var(--bg-code));
  background: var(--source-row-bg);
}

.proof-row.selected {
  box-shadow: inset 3px 0 0 var(--accent-brand);
}

.proof-row.aggregate {
  background: var(--overlay-raise);
}

.source-line.translated-body {
  --source-row-bg: color-mix(in srgb, var(--status-proven) 8%, var(--bg-code));
  background: var(--source-row-bg);
}

.source-line.framed-signature {
  --source-row-bg: color-mix(in srgb, var(--status-proven) 14%, var(--bg-code));
  background: var(--source-row-bg);
  box-shadow: inset 3px 0 0 var(--status-proven);
}

.source-line.inline-marker .source-code {
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--status-proving) 65%, transparent);
}

.source-line.statusless {
  color: color-mix(in srgb, var(--fg-primary) 82%, transparent);
}

.source-line.statusless:hover {
  background: var(--overlay-raise);
}

.source-marker {
  flex: 0 0 auto;
}

.failure-summary-list {
  display: block;
  margin: 8px 0 10px;
  border-block: 1px solid var(--border-subtle);
  padding: 8px 0;
}

.failure-summary-dock {
  margin: 0 0 12px;
  border: 1px solid color-mix(in srgb, var(--status-failed) 28%, var(--border-subtle));
  border-radius: var(--radius-md);
  padding: 0;
  background: color-mix(in srgb, var(--status-failed) 7%, var(--bg-surface));
  overflow: hidden;
}

.failure-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  color: var(--fg-secondary);
  font-size: 12px;
}

.failure-summary-dock .failure-summary-head {
  min-height: 36px;
  border-bottom: 1px solid transparent;
  padding: 7px 9px;
  cursor: pointer;
  list-style: none;
}

.failure-summary-dock .failure-summary-head::-webkit-details-marker {
  display: none;
}

.failure-summary-dock .failure-summary-head::after {
  content: "⌄";
  flex: 0 0 auto;
  color: var(--fg-muted);
  font-size: 13px;
  transition: transform .16s ease;
}

.failure-summary-dock[open] .failure-summary-head {
  border-bottom-color: var(--border-subtle);
}

.failure-summary-dock[open] .failure-summary-head::after {
  transform: rotate(180deg);
}

.failure-summary-head strong {
  color: var(--fg-primary);
  font-size: 12px;
}

.failure-summary-body {
  display: grid;
  gap: 6px;
  max-height: min(260px, 36vh);
  overflow: auto;
  padding: 8px;
}

.failure-summary-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(210px, 1.2fr) minmax(120px, .8fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 0 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  background: color-mix(in srgb, var(--status-failed) 8%, var(--bg-code));
  color: var(--fg-primary);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.failure-summary-dock .failure-summary-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  min-height: auto;
  margin: 0;
  padding: 7px 8px;
}

.failure-summary-row:hover,
.failure-summary-row:focus-visible,
.failure-summary-row.selected {
  border-color: color-mix(in srgb, var(--status-failed) 54%, transparent);
  background: color-mix(in srgb, var(--status-failed) 13%, var(--bg-code));
}

.failure-summary-kind,
.failure-summary-value,
.failure-summary-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.failure-summary-kind {
  color: var(--status-failed);
  font-weight: 800;
}

.failure-summary-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--fg-secondary);
  font-size: 12px;
}

.failure-summary-dock .failure-summary-meta,
.failure-summary-dock .failure-summary-value {
  max-width: 100%;
}

.failure-summary-dock .failure-summary-meta span,
.failure-summary-dock .failure-summary-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.failure-summary-meta code {
  border: 1px solid color-mix(in srgb, var(--status-failed) 42%, transparent);
  border-radius: var(--radius-xs);
  padding: 1px 5px;
  background: color-mix(in srgb, var(--status-failed) 12%, transparent);
  color: var(--status-failed);
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 800;
}

.failure-summary-value {
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: var(--font-code);
  font-size: 11px;
}

.proof-gutter {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  padding: 0 8px;
  border-right: 1px solid var(--border-subtle);
  font-family: var(--font-code);
  white-space: nowrap;
}

.proof-gutter[role="button"] {
  cursor: pointer;
}

.proof-gutter[role="button"]:hover {
  background: color-mix(in srgb, var(--accent-brand) 13%, transparent);
}

.proof-gutter .marker {
  font-size: 14px;
}

.proof-gutter.status-empty {
  display: block;
  padding: 0;
}

.proof-gutter .timer {
  color: var(--fg-muted);
  font-size: 11px;
}

.row-status-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.row-status-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.row-status-top .timer {
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-status-percent {
  color: var(--fg-secondary);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.row-progress-mini {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track-bg);
}

.row-progress-mini span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.row-prover-failure-mark {
  display: block;
  width: 32px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--status-failed) 0 50%,
    var(--track-bg) 50% 100%
  );
  box-shadow: -4px 0 8px color-mix(in srgb, var(--status-failed) 42%, transparent);
}

.source-marker-gutter {
  color: var(--fg-muted);
  background: color-mix(in srgb, var(--fg-muted) 5%, transparent);
}

.source-marker-gutter.requires,
.source-marker-gutter.require {
  color: #7fdcff;
}

.source-marker-gutter.ensures {
  color: var(--status-proven);
}

.source-marker-gutter.frame {
  color: var(--status-warn);
}

.source-marker-gutter.assert,
.source-marker-gutter.verify {
  color: #d6adff;
}

.line-no {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: var(--fg-muted);
  font-family: var(--font-code);
  border-right: 1px solid var(--border-subtle);
}

.source-code {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  padding: 0 10px;
  font-family: var(--font-code);
  overflow: visible;
}

.source-code code {
  overflow: visible;
  text-overflow: clip;
  white-space: pre;
}

.source-code code span {
  color: inherit;
}

.source-code .syntax-keyword {
  color: var(--syntax-keyword);
}

.source-code .syntax-spec-keyword {
  color: var(--syntax-spec-keyword);
  font-weight: 700;
}

.source-code .syntax-type {
  color: var(--syntax-type);
}

.source-code .syntax-identifier {
  color: var(--syntax-identifier);
}

.source-code .syntax-number {
  color: var(--syntax-number);
}

.source-code .syntax-string {
  color: var(--syntax-string);
}

.source-code .syntax-comment {
  color: var(--syntax-comment);
  font-style: italic;
}

.source-code .syntax-punctuation {
  color: var(--syntax-punctuation);
}

.source-code .syntax-spec-delimiter {
  color: var(--syntax-spec-delimiter);
  font-weight: 700;
}

.source-trailing-marker {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0 7px;
  background: var(--overlay-raise);
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: 1px;
}

.source-trailing-marker.requires,
.source-trailing-marker.require {
  border-color: color-mix(in srgb, #45caff 48%, transparent);
  background: color-mix(in srgb, #45caff 14%, transparent);
  color: #7fdcff;
}

.source-trailing-marker.ensures {
  border-color: color-mix(in srgb, var(--status-proven) 48%, transparent);
  background: color-mix(in srgb, var(--status-proven) 14%, transparent);
  color: var(--status-proven);
}

.source-trailing-marker.invariant {
  border-color: color-mix(in srgb, var(--status-proven) 48%, transparent);
  background: color-mix(in srgb, var(--status-proven) 14%, transparent);
  color: var(--status-proven);
}

.source-trailing-marker.reverts {
  border-color: color-mix(in srgb, var(--status-proven) 48%, transparent);
  background: color-mix(in srgb, var(--status-proven) 14%, transparent);
  color: var(--status-proven);
}

.source-trailing-marker.frame {
  border-color: color-mix(in srgb, var(--status-warn) 54%, transparent);
  background: color-mix(in srgb, var(--status-warn) 14%, transparent);
  color: var(--status-warn);
}

.source-trailing-marker.verify,
.source-trailing-marker.assert {
  border-color: color-mix(in srgb, #c58cff 54%, transparent);
  background: color-mix(in srgb, #c58cff 14%, transparent);
  color: #d6adff;
}

.source-trailing-marker.assume {
  border-color: color-mix(in srgb, var(--status-cached) 52%, transparent);
  background: color-mix(in srgb, var(--status-cached) 14%, transparent);
  color: var(--status-cached);
}

.source-trailing-marker.spec,
.source-trailing-marker.fn {
  border-color: color-mix(in srgb, var(--fg-muted) 42%, transparent);
  background: var(--overlay-faint);
  color: var(--fg-muted);
}

.source-trailing-marker.failed {
  border-color: color-mix(in srgb, var(--status-failed) 52%, transparent);
  background: color-mix(in srgb, var(--status-failed) 14%, transparent);
  color: var(--status-failed);
}

.source-marker-chip-list {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 8px;
  vertical-align: 1px;
}

.source-marker-chip {
  display: inline-flex;
  align-items: center;
  max-width: 160px;
  min-height: 18px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0 7px;
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-marker-chip:hover,
.source-marker-chip:focus-visible {
  border-color: var(--accent-brand);
  background: color-mix(in srgb, var(--accent-brand) 12%, var(--overlay-faint));
}

.source-marker-chip.primary-failure {
  border-color: color-mix(in srgb, var(--status-failed) 54%, transparent);
  background: color-mix(in srgb, var(--status-failed) 15%, transparent);
  color: var(--status-failed);
}

.source-marker-chip.evidence {
  border-color: color-mix(in srgb, var(--status-warn) 54%, transparent);
  background: color-mix(in srgb, var(--status-warn) 14%, transparent);
  color: var(--status-warn);
}

.source-marker-chip.path-context {
  border-color: color-mix(in srgb, var(--fg-muted) 46%, transparent);
  background: color-mix(in srgb, var(--fg-muted) 12%, transparent);
  color: var(--fg-muted);
}

.tag-chip,
.kind-chip,
.function-count,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: var(--radius-xs);
  padding: 0 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
}

.tag-chip.proven,
.status-chip.proven {
  background: #3ab07b1f;
}

.tag-chip.proving,
.status-chip.proving {
  background: #5d8fff1f;
}

.tag-chip.waiting,
.status-chip.waiting {
  background: #7d8ea61f;
}

.tag-chip.failed,
.status-chip.failed {
  background: #ff5f6d1f;
}

.tag-chip.warn,
.status-chip.warn {
  background: #f0b14a1f;
}

.tag-chip.cached,
.status-chip.cached {
  background: #2ac3b21f;
}

.kind-chip {
  background: var(--overlay-strong);
  color: var(--fg-secondary);
}

.function-count {
  background: #5d8fff1f;
  color: var(--status-proving);
}

.inline-children {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px 10px 112px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--overlay-faint);
}

.child-row {
  display: flex;
  gap: 8px;
  min-height: 22px;
  align-items: center;
  font-family: var(--font-code);
}

.selected-card,
.counterexample-card,
.diagnostic-card,
.artifact-preview {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
}

.selected-card {
  margin-bottom: 12px;
  padding: 12px;
}

.selected-title em {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 800;
}

.selected-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-card dl {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.selected-card dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
}

.selected-card dt {
  color: var(--fg-muted);
}

.selected-card dd {
  margin: 0;
  overflow: hidden;
  color: var(--fg-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.source-location-link {
  min-width: 0;
  overflow: hidden;
  color: var(--fg-primary);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-location-link:hover {
  color: var(--accent-brand);
}

.jump-source-button,
.copy-button {
  min-height: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0 7px;
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.jump-source-button {
  margin-left: auto;
}

.jump-source-button:hover,
.copy-button:hover {
  border-color: var(--accent-brand);
  color: var(--fg-primary);
}

.source-snippet {
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--bg-code);
  color: var(--fg-primary);
  font-family: var(--font-code);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lineage-tree {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.lineage-node {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 8px 8px calc(8px + var(--level) * 16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--overlay-raise);
}

.lineage-node.level-0 {
  border-color: color-mix(in srgb, var(--status-proving) 36%, transparent);
  background: #5d8fff12;
}

.lineage-node.level-1 {
  min-height: 48px;
}

.lineage-node.level-2 {
  margin-left: 18px;
  border-color: var(--overlay-strong);
  background: var(--overlay-faint);
}

.lineage-glyph {
  padding-top: 1px;
  font-size: 15px;
}

.lineage-node strong,
.lineage-node p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.condition-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.condition-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  background: var(--overlay-raise);
  color: var(--fg-secondary);
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

button.condition-box {
  cursor: default;
}

button.condition-box.actionable {
  cursor: pointer;
}

button.condition-box.actionable:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

button.condition-box:disabled {
  opacity: 1;
}

.condition-box.proven,
.condition-box.cached {
  border-color: color-mix(in srgb, var(--status-proven) 48%, transparent);
  background: color-mix(in srgb, var(--status-proven) 18%, transparent);
  color: var(--status-proven);
}

.condition-box.proving {
  border-color: color-mix(in srgb, var(--status-proving) 58%, transparent);
  background: color-mix(in srgb, var(--status-proving) 18%, transparent);
  color: var(--status-proving);
}

.condition-box.waiting {
  color: var(--fg-muted);
}

.condition-box.failed {
  border-color: color-mix(in srgb, var(--status-failed) 58%, transparent);
  background: color-mix(in srgb, var(--status-failed) 18%, transparent);
  color: var(--status-failed);
}

.condition-box.warn {
  border-color: color-mix(in srgb, var(--status-warn) 58%, transparent);
  background: color-mix(in srgb, var(--status-warn) 18%, transparent);
  color: var(--status-warn);
}

.source-line.source-focus-pulse {
  animation: sourceFocusPulse 1.4s ease-out;
}

@keyframes sourceFocusPulse {
  0% {
    box-shadow: inset 3px 0 0 var(--accent-brand);
    background: color-mix(in srgb, var(--accent-brand) 24%, transparent);
  }
  100% {
    box-shadow: inset 3px 0 0 transparent;
  }
}

.counterexample-card,
.diagnostic-card {
  margin-bottom: 12px;
  min-width: 0;
  padding: 12px;
  border-color: color-mix(in srgb, var(--status-failed) 42%, transparent);
}

.counterexample-card-header,
.diagnostic-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.counterexample-card h3,
.diagnostic-card h3 {
  margin: 0;
  color: var(--status-failed);
}

.diagnostic-card {
  display: grid;
  gap: 12px;
  justify-items: stretch;
  width: 100%;
  overflow: hidden;
}

.diagnostic-card > *,
.diagnostic-summary-grid,
.diagnostic-summary-grid div,
.diagnostic-source-condition,
.diagnostic-section,
.diagnostic-tab-panel,
.diagnostic-value-list,
.diagnostic-value-row {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.diagnostic-label,
.diagnostic-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.diagnostic-label {
  color: var(--status-failed);
}

.diagnostic-summary {
  margin: 0;
  overflow-wrap: anywhere;
}

.diagnostic-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  background: var(--overlay-faint);
}

.diagnostic-tab {
  min-width: 0;
  min-height: 30px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 5px 6px;
  background: transparent;
  color: var(--fg-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-tab:hover {
  color: var(--fg-primary);
  background: var(--overlay-raise);
}

.diagnostic-tab.active,
.diagnostic-tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--status-failed) 18%, var(--bg-surface));
  color: var(--fg-primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--status-failed) 45%, transparent);
}

.diagnostic-tab-panel {
  display: grid;
  gap: 10px;
}

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

.diagnostic-tab-panel h4,
.diagnostic-explanation-block h4 {
  margin: 0;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.diagnostic-explanation-block {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.diagnostic-explanation-block p,
.diagnostic-muted {
  margin: 0;
  overflow-wrap: anywhere;
}

.diagnostic-explanation-block ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--fg-secondary);
}

.diagnostic-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.diagnostic-summary-grid div {
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--overlay-faint);
}

.diagnostic-summary-grid dt,
.diagnostic-source-condition span,
.diagnostic-section h4,
.diagnostic-location-list span,
.diagnostic-chip-list span {
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.diagnostic-summary-grid dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: var(--fg-primary);
}

.diagnostic-source-condition {
  display: grid;
  gap: 6px;
}

.diagnostic-source-condition pre,
.diagnostic-debug-list dd {
  margin: 0;
  overflow: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 9px;
  background: var(--bg-code);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.diagnostic-section {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.diagnostic-section h4 {
  margin: 0;
}

.diagnostic-section p {
  margin: 0;
  overflow-wrap: anywhere;
}

.focused-countermodel {
  border-color: color-mix(in srgb, var(--status-failed) 28%, transparent);
}

.diagnostic-debug {
  margin-top: 0;
}

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

.diagnostic-value-list.compact {
  margin-top: 2px;
}

.diagnostic-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  background: var(--overlay-faint);
}

.diagnostic-value-row span,
.diagnostic-value-row em {
  min-width: 0;
  overflow: visible;
  color: var(--fg-muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: clip;
  white-space: normal;
}

.diagnostic-value-row strong,
.diagnostic-value-row code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.diagnostic-location-list,
.diagnostic-chip-list,
.diagnostic-write-list,
.diagnostic-state-list,
.diagnostic-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.diagnostic-location-list button,
.diagnostic-location-list code,
.diagnostic-chip-list code,
.diagnostic-write-list div,
.diagnostic-state-list div,
.diagnostic-link-card {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 4px 7px;
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  font-family: var(--font-code);
  font-size: 11px;
  text-overflow: ellipsis;
}

.diagnostic-location-list button {
  cursor: pointer;
}

.diagnostic-location-list button:hover,
.diagnostic-link-card:hover {
  border-color: var(--accent-brand);
  color: var(--fg-primary);
}

.diagnostic-write-list div {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.diagnostic-state-list div {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) minmax(0, auto) auto minmax(0, auto);
  gap: 5px;
  align-items: center;
}

.diagnostic-state-list .unresolved {
  border-color: color-mix(in srgb, var(--status-warn) 38%, transparent);
}

.diagnostic-actions {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.diagnostic-debug-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
}

.diagnostic-debug-list div {
  display: grid;
  gap: 4px;
}

.diagnostic-debug-list dt {
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
}

.diagnostic-link-list {
  display: grid;
  gap: 7px;
}

.diagnostic-link-card {
  display: grid;
  gap: 3px;
  color: var(--fg-primary);
  text-decoration: none;
}

.diagnostic-link-card span {
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.diagnostic-link-card strong,
.diagnostic-link-card code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-export-button {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0;
  background: var(--overlay-raise);
  color: var(--fg-secondary);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

/* The AI mark is painted with currentColor via an SVG mask so it tracks the
   button's themed color in both light and dark. */
.ai-export-glyph {
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--ai-icon) center / contain no-repeat;
  mask: var(--ai-icon) center / contain no-repeat;
}

.ai-export-button:hover,
.ai-export-button:focus-visible {
  border-color: var(--accent-brand);
  background: color-mix(in srgb, var(--accent-brand) 14%, transparent);
  color: var(--accent-brand);
}

.ai-export-button:active {
  transform: translateY(1px);
}

.ai-export-button.copied {
  border-color: var(--status-proven);
  background: color-mix(in srgb, var(--status-proven) 16%, transparent);
  color: var(--status-proven);
}

.failure-location-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.failure-location-summary.compact {
  margin: 6px 0 8px;
}

.failure-location-summary span {
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.failure-location-summary button {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 3px 7px;
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: var(--font-code);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.failure-location-summary button:hover {
  border-color: var(--accent-brand);
  color: var(--fg-primary);
}

.counterexample-detail {
  border-top: 1px solid var(--border-subtle);
  padding: 8px 0;
}

.counterexample-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
}

.counterexample-detail summary code {
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 700;
}

.empty-counterexample {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  color: var(--fg-secondary);
}

.counterexample-variable-list {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.counterexample-variable-filter {
  display: grid;
  gap: 5px;
  margin: 10px 0 6px;
}

.counterexample-variable-filter span {
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.counterexample-variable-filter input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--fg-primary);
  font: 12px var(--font-sans);
  padding: 7px 9px;
  outline: none;
}

.counterexample-variable-filter input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.counterexample-variable {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--overlay-faint);
}

.counterexample-variable summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px 9px;
  cursor: pointer;
}

.counterexample-variable summary strong,
.counterexample-variable summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.counterexample-variable summary span {
  color: var(--fg-secondary);
  font-family: var(--font-code);
  font-size: 11px;
}

.counterexample-variable dl {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0 9px 8px;
}

.counterexample-variable dl div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
}

.counterexample-variable dt {
  color: var(--fg-muted);
}

.counterexample-variable dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.counterexample-variable pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 8px 9px;
  background: var(--bg-code);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.counterexample-artifacts {
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.artifact-links-label {
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.artifact-preview {
  overflow: hidden;
}

.artifact-top {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-muted);
}

.artifact-preview pre {
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: #dbeafe;
  font-family: var(--font-code);
  font-size: 12px;
}

.proof-summary-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
}

.proof-summary-card li {
  display: grid;
  gap: 2px;
}

.proof-summary-card strong {
  color: var(--fg-primary);
}

.proof-summary-card span {
  color: var(--fg-secondary);
}

.live-frame {
  position: fixed;
  left: 18px;
  bottom: 14px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(820px, calc(100vw - 36px));
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-surface-elevated) 94%, transparent);
  box-shadow: var(--shadow-panel);
  color: var(--fg-secondary);
  backdrop-filter: blur(14px);
}

.live-frame code {
  min-width: 0;
  overflow: hidden;
  color: var(--fg-primary);
  font-family: var(--font-code);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--status-proving);
  box-shadow: 0 0 0 5px #5d8fff24;
  animation: streamPulse 1.2s ease-in-out infinite;
}

.manual-frame .stream-dot {
  background: var(--fg-muted);
  box-shadow: none;
  animation: none;
}

.stream-label {
  flex: 0 0 auto;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-tabs {
  display: none;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ring-brand);
  outline-offset: 2px;
}

[x-cloak] {
  display: none !important;
}

.command-button span {
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: #00000070;
  backdrop-filter: blur(8px);
}

.command-palette section {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.artifact-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 32px;
  background: color-mix(in srgb, #000 58%, transparent);
  backdrop-filter: blur(8px);
}

.artifact-modal section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, 94vw);
  max-height: min(760px, 88vh);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow-panel);
}

.artifact-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 12px;
}

.artifact-modal header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-modal header button {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  cursor: pointer;
}

.artifact-modal pre {
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 14px;
  background: var(--bg-code);
  color: var(--fg-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.spec-legend-modal section {
  width: min(680px, 94vw);
}

.legend-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.legend-body p {
  margin: 0 0 12px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.legend-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.legend-list div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px;
  background: var(--overlay-faint);
}

.legend-list dt,
.legend-list dd {
  margin: 0;
}

.legend-list dt {
  color: var(--fg-primary);
  font-weight: 800;
}

.legend-list dd {
  color: var(--fg-secondary);
  line-height: 1.45;
}

.legend-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px !important;
  font-size: 11px;
}

.legend-note span {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--overlay-faint);
  color: var(--fg-primary);
}

.command-palette header,
.command-palette button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 14px;
  background: transparent;
  color: var(--fg-primary);
}

.command-palette button {
  cursor: pointer;
}

.command-palette button:hover {
  background: var(--overlay-raise);
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, 36px);
  gap: 4px;
}

.segmented-control button {
  min-height: 32px;
  padding: 0;
  color: var(--fg-secondary);
}

.segmented-control button.active {
  border-color: var(--accent-brand);
  background: #eb00521f;
  color: var(--fg-primary);
}

.property-tree {
  display: grid;
  gap: 8px;
}

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

.map-tree-root {
  display: grid;
  gap: 5px;
}

.map-tree-node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: var(--overlay-raise);
}

.map-tree-node strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-tree-node em {
  grid-column: 2;
  color: var(--fg-secondary);
  font-style: normal;
}

.node-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 20px;
  border-radius: var(--radius-xs);
  background: #5d8fff1f;
  color: var(--status-proving);
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 800;
}

.map-tree-children {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 0 0 0 18px;
  padding: 0 0 0 16px;
  border-left: 1px solid var(--border-subtle);
  list-style: none;
}

.map-tree-children li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  font-family: var(--font-code);
  font-size: 11px;
}

.map-tree-children li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -17px;
  width: 16px;
  border-top: 1px solid var(--border-subtle);
}

.map-tree-children li span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-node {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--overlay-raise);
}

.map-node-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.map-node-title span {
  color: var(--status-proving);
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 800;
}

.map-node-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-node p {
  margin: 5px 0 8px;
}

.map-node ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--fg-secondary);
  font-family: var(--font-code);
  font-size: 11px;
}

@keyframes provePulse {
  0%,
  100% {
    opacity: 0.3;
    transform: translateX(-18px);
  }
  50% {
    opacity: 0.9;
    transform: translateX(14px);
  }
}

@keyframes streamPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

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

@media (max-width: 1439px) {
  .run-summary {
    grid-template-columns: minmax(150px, 220px) minmax(160px, 1fr) minmax(260px, max-content);
  }

  .proof-toolbar {
    flex-wrap: wrap;
  }

  .proof-toolbar > div:first-child {
    flex: 1 1 220px;
    min-width: 0;
  }

  .toolbar-actions {
    flex: 1 1 240px;
    min-width: 0;
  }

  .search-control {
    flex: 1 1 160px;
    min-width: 0;
  }

  .search-control input {
    width: 100%;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .run-actions > .evidence-actions-form,
  .run-actions > .command-button,
  .run-meta-line > .freshness {
    display: none;
  }
}

@media (max-width: 1023px) {
  .portfolio-list {
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .portfolio-table-head {
    display: none;
  }

  .portfolio-project {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 24px #00000024;
  }

  .portfolio-cell-label {
    display: block;
  }

  .portfolio-actions {
    justify-content: start;
  }

  .admin-access-project-summary,
  .admin-access-details-body,
  .admin-access-member {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-access-project-facts {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .admin-access-grant {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-access-grant h3 {
    grid-column: auto;
  }

  .admin-access-member > form:last-child,
  .admin-access-action {
    justify-self: start;
  }

  .admin-health-grid,
  .admin-two-column,
  .admin-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .run-summary {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .run-progress {
    display: block;
    grid-column: 1 / -1;
  }

  .col-resizer {
    display: none;
  }

  .prover-workspace {
    grid-template-columns: 56px minmax(0, 1fr) clamp(260px, 32vw, 300px);
  }

  .source-tree {
    padding-inline: 8px;
  }

  .failure-summary-dock {
    display: none;
  }

  .tree-label,
  .tree-count,
  .tree-note,
  .source-tree .panel-heading p,
  .source-tree .panel-heading span {
    display: none;
  }

  .tree-row {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }
}

@media (max-width: 767px) {
  .portfolio-shell {
    width: min(100vw - 20px, 720px);
    padding-top: 10px;
  }

  .portfolio-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .portfolio-project-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .portfolio-actions .primary-button,
  .portfolio-actions .ghost-button {
    width: 100%;
    min-width: 0;
  }

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

  .admin-section {
    padding: 10px;
  }

  .admin-filter-bar {
    gap: 8px;
    padding: 10px;
  }

  .run-summary {
    position: static;
    grid-template-columns: 1fr;
  }

  .summary-counters,
  .run-actions,
  .run-actions-form {
    overflow-x: auto;
  }

  .mobile-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 14px 0;
  }

  .mobile-tabs button {
    min-height: 36px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
  }

  .mobile-tabs button.active {
    border-color: var(--accent-brand);
    background: #eb00521f;
  }

  .prover-workspace {
    display: block;
    padding: 10px;
  }

  .panel {
    display: none;
    min-height: auto;
    max-height: none;
    position: static;
  }

  .panel.mobile-active {
    display: block;
  }

  .toolbar-actions,
  .proof-toolbar,
  .run-actions,
  .run-actions-form {
    align-items: stretch;
    flex-direction: column;
  }

  .search-control input {
    width: 100%;
  }

  .source-code {
    min-width: 760px;
  }

  .live-frame {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    max-width: none;
    margin: 0 10px 10px;
  }
}

/* ============================================================
   Certora-inspired additions: notifications drawer, difficulty
   panel, columnar source tree, and clarity polish.
   ============================================================ */

:root {
  --drawer-collapsed: 46px;
}

/* Reserve room for the collapsed bottom drawer so sticky panels
   never sit underneath it. */
.source-tree,
.property-panel {
  height: calc(100vh - 104px - var(--drawer-collapsed, 46px));
  min-height: 0;
  max-height: calc(100vh - 104px - var(--drawer-collapsed));
}

.proof-map-panel {
  height: calc(100vh - 104px - var(--drawer-collapsed));
}

.live-frame {
  bottom: calc(var(--drawer-collapsed) + 12px);
  z-index: 44;
}

/* ---- Bottom notifications drawer ---- */
.notifications-drawer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-height: 42vh;
  border-top: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-surface) 96%, transparent);
  box-shadow: 0 -18px 44px #00000038;
  backdrop-filter: blur(16px);
}

.notif-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--drawer-collapsed);
  padding: 6px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.notifications-drawer.collapsed .notif-bar {
  border-bottom: 0;
}

.notif-tabs {
  display: flex;
  gap: 6px;
}

.notif-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--fg-secondary);
  font-weight: 700;
  cursor: pointer;
}

.notif-tabs button.active {
  border-color: color-mix(in srgb, var(--accent-brand) 60%, transparent);
  background: #eb00521f;
  color: var(--fg-primary);
  box-shadow: inset 0 -2px 0 var(--accent-brand);
}

.notif-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--status-failed);
  box-shadow: 0 0 0 4px #ff5f6d2e;
}

.notif-toggle {
  min-height: 30px;
}

.notif-body {
  overflow: auto;
  padding: 8px 12px 12px;
}

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

.notif-row {
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--overlay-faint);
}

.notif-row.notif-warn {
  border-color: color-mix(in srgb, var(--status-warn) 40%, transparent);
}

.notif-row.notif-error {
  border-color: color-mix(in srgb, var(--status-failed) 44%, transparent);
}

.notif-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px 0 0;
}

.notif-main {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr) 14px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notif-glyph {
  font-size: 13px;
}

.notif-info .notif-glyph {
  color: var(--status-proving);
}

.notif-warn .notif-glyph {
  color: var(--status-warn);
}

.notif-error .notif-glyph {
  color: var(--status-failed);
}

.notif-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 11px;
}

.notif-level {
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.notif-meta code {
  color: var(--fg-muted);
}

.notif-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: var(--fg-primary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-title > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-title code {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 1px 5px;
  background: var(--overlay-faint);
  color: var(--fg-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-chevron {
  color: var(--fg-muted);
  font-size: 11px;
}

.notif-seq-copy {
  min-width: 34px;
  min-height: 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 0 6px;
  background: transparent;
  color: color-mix(in srgb, var(--fg-muted) 72%, transparent);
  cursor: copy;
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 800;
}

.notif-seq-copy:hover,
.notif-seq-copy:focus-visible,
.notif-seq-copy.copied {
  border-color: var(--border-subtle);
  background: var(--overlay-faint);
  color: var(--fg-primary);
}

.notif-seq-copy.copied {
  border-color: color-mix(in srgb, var(--status-proven) 45%, transparent);
  color: var(--status-proven);
}

.notif-detail {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 12px 10px 40px;
  color: var(--fg-secondary);
  font-size: 12px;
}

.notif-detail-lines {
  display: grid;
  gap: 5px;
}

.notif-detail-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-left: 2px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--overlay-faint) 72%, transparent);
}

.notif-detail-line.tone-error {
  border-left-color: color-mix(in srgb, var(--status-failed) 72%, transparent);
  background: color-mix(in srgb, var(--status-failed) 9%, transparent);
}

.notif-detail-line.tone-pass {
  border-left-color: color-mix(in srgb, var(--status-proving) 66%, transparent);
}

.notif-detail-line.tone-location {
  border-left-color: color-mix(in srgb, var(--status-cached) 62%, transparent);
}

.notif-detail-label {
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.notif-detail-value {
  min-width: 0;
  color: var(--fg-primary);
  overflow-wrap: anywhere;
  white-space: normal;
}

.notif-detail-jump {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0 8px;
  background: var(--overlay-faint);
  color: var(--fg-secondary);
  text-align: left;
  cursor: pointer;
}

.notif-detail-jump span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-detail-jump:hover,
.notif-detail-jump:focus-visible {
  color: var(--fg-primary);
  border-color: var(--accent-brand);
}

/* ---- Right rail: tabs + difficulty panel ---- */
.right-tabs {
  display: flex;
  gap: 6px;
}

.mini-button.active {
  border-color: color-mix(in srgb, var(--accent-brand) 60%, transparent);
  background: #eb00521f;
  color: var(--fg-primary);
}

.difficulty-head .selected-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.difficulty-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.difficulty-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  padding: 12px;
}

.difficulty-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--fg-secondary);
  font-weight: 700;
}

.difficulty-card strong {
  font-family: var(--font-display);
  font-size: 22px;
}

.difficulty-card p {
  margin: 2px 0 0;
  color: var(--fg-muted);
  font-size: 12px;
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--fg-secondary);
  font-size: 11px;
  font-weight: 800;
}

.difficulty-badge.low {
  border-color: color-mix(in srgb, var(--status-proven) 48%, transparent);
  background: color-mix(in srgb, var(--status-proven) 16%, transparent);
  color: var(--status-proven);
}

.difficulty-badge.medium {
  border-color: color-mix(in srgb, var(--status-warn) 52%, transparent);
  background: color-mix(in srgb, var(--status-warn) 16%, transparent);
  color: var(--status-warn);
}

.difficulty-badge.high {
  border-color: color-mix(in srgb, var(--status-failed) 52%, transparent);
  background: color-mix(in srgb, var(--status-failed) 16%, transparent);
  color: var(--status-failed);
}

.advanced-disclosure {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--overlay-faint);
  padding: 10px 12px;
}

.advanced-disclosure summary {
  cursor: pointer;
  color: var(--fg-secondary);
  font-weight: 700;
}

.advanced-disclosure dl {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.advanced-disclosure dl div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
}

.advanced-disclosure dt {
  color: var(--fg-muted);
}

.advanced-disclosure dd {
  margin: 0;
  overflow: hidden;
  font-family: var(--font-code);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Columnar source tree ---- */
.tree-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.tree-filter {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 9px;
  background: var(--bg-canvas-alt);
  color: var(--fg-primary);
}

.tree-status-select {
  min-height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 6px;
  background: var(--bg-canvas-alt);
  color: var(--fg-secondary);
}

.tree-header {
  display: grid;
  grid-template-columns: 18px 18px minmax(0, 1fr);
  gap: 7px;
  margin-bottom: 5px;
  padding: 0 8px 5px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tree-row {
  grid-template-columns: 18px 18px minmax(0, 1fr);
}

.tree-node-button {
  grid-template-columns: 20px minmax(0, 1fr);
  padding-left: calc(var(--level) * 12px + 16px);
}

.tree-progress {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.tree-progress-bar {
  display: block;
  flex: 1 1 auto;
  min-width: 22px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff1a;
}

.tree-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.tree-progress em {
  font-style: normal;
  font-family: var(--font-code);
  font-size: 10px;
  color: var(--fg-muted);
}

.tree-time {
  text-align: right;
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 11px;
}

/* ---- Clarity polish: calmer proof-map gutter ---- */
.row-status-percent {
  color: var(--fg-muted);
}

[data-density="comfortable"] .row-status-percent {
  opacity: 0.66;
}

@media (max-width: 1023px) {
  .tree-controls,
  .tree-header,
  .tree-progress,
  .tree-time {
    display: none;
  }

  .tree-row {
    grid-template-columns: 18px 18px minmax(0, 1fr);
  }

  .tree-node-button {
    grid-template-columns: 20px minmax(0, 1fr);
    padding-left: calc(var(--level) * 12px + 16px);
  }
}

@media (max-width: 767px) {
  .notifications-drawer {
    max-height: 56vh;
  }

  .run-actions-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, auto);
    align-items: stretch;
  }

  .run-scope-status {
    max-width: none;
    min-width: 0;
  }

  .run-scope-status strong {
    max-width: 100%;
  }
}

/* ============================================================
   Clickable conditions, deselect, and resizable panels.
   ============================================================ */

/* ---- Clickable source tags + selected-line highlight ---- */
.source-trailing-marker.clickable {
  cursor: pointer;
}

.source-trailing-marker.clickable:hover {
  border-color: var(--accent-brand);
  filter: brightness(1.15);
}

.source-line.selected-condition {
  --source-row-bg: color-mix(in srgb, var(--accent-brand) 16%, var(--bg-code));
  background: var(--source-row-bg);
  box-shadow: inset 3px 0 0 var(--accent-brand);
}

.source-line.selected-condition:hover {
  --source-row-bg: color-mix(in srgb, var(--accent-brand) 22%, var(--bg-code));
  background: var(--source-row-bg);
}

/* ---- Deselect button + empty selection state ---- */
.deselect-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  font-weight: 800;
}

.empty-selection {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 28px 8px;
  color: var(--fg-secondary);
}

.empty-selection .empty-glyph {
  font-size: 28px;
  color: var(--fg-muted);
}

.empty-selection strong {
  color: var(--fg-primary);
  font-size: 14px;
}

.empty-selection code {
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--overlay-strong);
  font-family: var(--font-code);
}

/* ---- Column resizers ---- */
.col-resizer {
  position: relative;
  align-self: stretch;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--border-subtle);
  transition: background 120ms ease-out;
}

.col-resizer:hover::after,
.col-resizer:focus-visible::after,
body.resizing .col-resizer::after {
  background: var(--accent-brand);
}

/* ---- Drawer height + top-edge resizer ---- */
.notifications-drawer {
  height: var(--drawer-h, 220px);
  max-height: 72vh;
}

.notifications-drawer.collapsed {
  height: auto;
  max-height: none;
}

.prover-app:has(.notifications-drawer:not(.collapsed)) .source-tree,
.prover-app:has(.notifications-drawer:not(.collapsed)) .property-panel {
  height: calc(100vh - 104px - var(--drawer-h, 220px));
  max-height: calc(100vh - 104px - var(--drawer-h, 220px));
  padding-bottom: min(34vh, calc(var(--panel-padding) + var(--drawer-h, 220px) + 24px));
  scroll-padding-bottom: min(34vh, calc(var(--drawer-h, 220px) + 48px));
}

.prover-app:has(.notifications-drawer:not(.collapsed)) .proof-map-panel {
  height: calc(100vh - 104px - var(--drawer-h, 220px));
}

.prover-app:has(.notifications-drawer:not(.collapsed)) .source-scroll {
  padding-bottom: min(34vh, calc(var(--drawer-h, 220px) + 48px));
  scroll-padding-bottom: min(34vh, calc(var(--drawer-h, 220px) + 72px));
}

.notif-body {
  flex: 1 1 auto;
  min-height: 0;
}

.notif-resizer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: row-resize;
  touch-action: none;
  z-index: 3;
}

.notif-resizer::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 44px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: var(--border-strong);
  transition: background 120ms ease-out;
}

.notif-resizer:hover::after,
body.resizing .notif-resizer::after {
  background: var(--accent-brand);
}

body.resizing {
  user-select: none;
}

@media (max-width: 1023px) {
  .notifications-drawer {
    height: auto;
  }

  .notif-resizer {
    display: none;
  }
}

@media (max-width: 767px) {
  .notifications-drawer {
    max-height: 56vh;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .prover-workspace {
    grid-template-columns: var(--col-tree, 200px) 8px minmax(0, 1fr) 8px var(--col-right, 280px);
    padding: 10px;
  }

  .proof-row,
  .source-line {
    grid-template-columns: var(--map-status-col, 104px) var(--map-line-col, 44px) minmax(560px, 1fr);
  }

  .source-line {
    grid-template-columns: var(--map-status-col, 104px) var(--map-line-col, 44px) max-content;
  }

  .source-line .line-no {
    left: var(--map-status-col, 104px);
  }

  .map-header {
    grid-template-columns: var(--map-status-col, 104px) var(--map-line-col, 44px) minmax(0, 1fr);
  }

  .proof-gutter {
    padding: 0 6px;
  }

  .source-code {
    padding: 0 8px;
  }

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

  .diagnostic-value-row {
    align-items: start;
  }

  .diagnostic-value-row span,
  .diagnostic-value-row em {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .run-summary {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
    gap: 10px 14px;
  }

  .run-progress {
    grid-column: auto;
  }

  .run-actions {
    grid-column: 1 / -1;
  }

  .prover-workspace {
    grid-template-columns: 56px minmax(0, 1fr) clamp(260px, 32vw, 300px);
    padding: 10px;
  }

  .source-tree {
    overflow: hidden;
    padding-inline: 8px;
  }

  .source-tree .panel-heading,
  .source-tree .tree-scope,
  .source-tree .tree-scope-placeholder {
    display: none;
  }

  .source-tree .tree-label-wrap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .source-tree .tree-label {
    display: inline;
  }

  .source-tree .tree-kind-icon,
  .source-tree .tree-stale-badge {
    display: none;
  }

  .source-tree .tree-row {
    grid-template-columns: 18px 18px;
    gap: 4px;
    justify-content: center;
    padding: 0;
  }

  .source-tree .tree-row::before,
  .source-tree .tree-row::after {
    display: none;
  }

  .source-tree .tree-node-button {
    position: relative;
    grid-template-columns: 18px;
    justify-content: center;
    padding: 0;
  }

  .proof-row,
  .source-line {
    grid-template-columns: var(--map-status-col, 92px) var(--map-line-col, 42px) minmax(520px, 1fr);
  }

  .source-line {
    grid-template-columns: var(--map-status-col, 92px) var(--map-line-col, 42px) max-content;
  }

  .source-line .line-no {
    left: var(--map-status-col, 92px);
  }

  .map-header {
    grid-template-columns: var(--map-status-col, 92px) var(--map-line-col, 42px) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .proof-row,
  .source-line {
    grid-template-columns: var(--map-status-col, 76px) var(--map-line-col, 38px) minmax(0, 1fr);
    width: 100%;
  }

  .source-line {
    grid-template-columns: var(--map-status-col, 76px) var(--map-line-col, 38px) max-content;
    width: max-content;
    min-width: 100%;
  }

  .source-line .line-no {
    left: var(--map-status-col, 76px);
  }

  .map-header {
    grid-template-columns: var(--map-status-col, 76px) var(--map-line-col, 38px) minmax(0, 1fr);
  }

  .source-code {
    min-width: max-content;
    overflow: visible;
  }

  .source-code code {
    overflow: visible;
    text-overflow: clip;
    white-space: pre;
    overflow-wrap: normal;
  }

  .source-trailing-marker {
    margin-left: 4px;
  }

  .map-col-resizer {
    display: none;
  }
}

/* --- UX additions: states, theming controls, palette, toasts --- */

[x-cloak] {
  display: none !important;
}

.theme-toggle span:first-child {
  margin-right: 6px;
}

.freshness {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

/* Terminal-error banner spans the full summary width. */
.run-error-banner,
.run-warning-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--status-failed) 52%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--status-failed) 14%, transparent);
  color: var(--fg-primary);
}

.run-warning-banner {
  border-color: color-mix(in srgb, var(--status-warn) 54%, transparent);
  background: color-mix(in srgb, var(--status-warn) 14%, transparent);
}

.run-error-badge {
  font-weight: 800;
  color: var(--status-failed);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.run-warning-badge {
  font-weight: 800;
  color: var(--status-warn);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.run-error-message,
.run-warning-message {
  flex: 1 1 320px;
  min-width: 0;
  color: var(--fg-secondary);
  overflow-wrap: anywhere;
}

.shared-snapshot-page {
  min-height: 100vh;
  padding: 32px;
  background: var(--bg-canvas);
  color: var(--fg-primary);
}

.shared-snapshot-header,
.shared-snapshot-section {
  max-width: 1180px;
  margin: 0 auto 24px;
}

.shared-snapshot-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-subtle);
}

.shared-snapshot-kicker {
  margin: 0 0 8px;
  color: var(--fg-muted);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.shared-snapshot-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.shared-snapshot-header dl,
.shared-snapshot-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  margin: 0;
}

.shared-snapshot-header dt,
.shared-snapshot-meta dt {
  color: var(--fg-muted);
  font-size: 12px;
}

.shared-snapshot-header dd,
.shared-snapshot-meta dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.shared-snapshot-section h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.shared-diagnostic-list {
  display: grid;
  gap: 8px;
}

.shared-diagnostic-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, .85fr);
  gap: 14px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-panel);
}

.shared-diagnostic-row strong {
  color: var(--status-failed);
}

.shared-diagnostic-row p {
  margin: 4px 0 0;
  color: var(--fg-secondary);
  font-family: var(--font-code);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.shared-diagnostic-row dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.shared-diagnostic-row dt {
  color: var(--fg-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.shared-diagnostic-row dd {
  margin: 2px 0 0;
  color: var(--fg-primary);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.shared-source {
  max-height: 60vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line-subtle);
  background: var(--bg-panel);
  border-radius: var(--radius-md);
}

.run-error-dismiss {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--border-strong) 68%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--panel-soft) 72%, transparent);
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.run-error-dismiss:hover {
  color: var(--fg-primary);
  border-color: color-mix(in srgb, var(--status-failed) 56%, var(--border-strong));
  background: color-mix(in srgb, var(--status-failed) 12%, var(--panel));
}

/* Empty states: warm message + resolving action, never a blank container. */
.empty-state {
  display: grid;
  gap: 6px;
  justify-items: start;
  margin: 12px 4px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--overlay-faint);
}

.empty-state-title {
  margin: 0;
  font-weight: 800;
  color: var(--fg-primary);
}

.empty-state-body {
  margin: 0;
  color: var(--fg-secondary);
}

/* Loading skeleton mirrors the proof-map row rhythm; shown only during HTMX swaps. */
.proof-map-skeleton {
  position: absolute;
  inset: 44px 0 0;
  z-index: 5;
  display: none;
  grid-auto-rows: 28px;
  gap: 8px;
  padding: 12px;
  background: var(--bg-code);
}

.proof-map-skeleton.htmx-request {
  display: grid;
}

.proof-map-skeleton span {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--overlay-raise), var(--overlay-strong), var(--overlay-raise));
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.proof-map {
  position: relative;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Command palette: searchable list with keyboard selection. */
.command-palette header input {
  flex: 1 1 auto;
  min-height: 30px;
  margin-right: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: var(--bg-canvas-alt);
  color: var(--fg-primary);
}

.command-list {
  margin: 0;
  padding: 0;
  max-height: 50vh;
  overflow: auto;
  list-style: none;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 14px;
  background: transparent;
  color: var(--fg-primary);
  cursor: pointer;
  text-align: left;
}

.command-item em {
  color: var(--fg-muted);
  font-style: normal;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.command-item.active,
.command-item:hover {
  background: color-mix(in srgb, var(--accent-brand) 16%, transparent);
}

.command-empty {
  padding: 14px;
  color: var(--fg-muted);
}

.shortcut-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
}

.shortcut-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shortcut-list dt {
  display: flex;
  gap: 4px;
}

.shortcut-list dd {
  margin: 0;
  color: var(--fg-secondary);
}

kbd {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 1px 6px;
  background: var(--overlay-raise);
  color: var(--fg-primary);
  font-family: var(--font-code);
  font-size: 11px;
}

/* Toasts: background confirmations only (errors stay inline). */
.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.toast {
  min-width: 160px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  color: var(--fg-primary);
  box-shadow: var(--shadow-panel);
  animation: toastIn 160ms ease-out;
}

/* Responsive shell polish: keep controls compact without changing the
   source-centric information architecture. */
@media (max-width: 767px) {
  .run-summary {
    gap: 12px;
    margin: 8px 10px 0;
    padding: 10px 0;
  }

  .proof-toolbar > div:first-child,
  .proof-toolbar .toolbar-actions,
  .proof-toolbar .search-control {
    flex: none;
    width: 100%;
  }

  .run-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .run-actions > .theme-toggle,
  .run-actions > .command-button {
    width: 100%;
    justify-content: center;
  }

  .run-actions > #run-scope-form {
    grid-column: 1 / -1;
  }

  .run-actions > .run-actions-form:not(#run-scope-form) {
    display: block;
  }

  .run-actions > .run-actions-form:not(#run-scope-form) .ghost-button {
    width: 100%;
    justify-content: center;
  }

  .run-error-banner,
  .run-warning-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .run-error-message,
  .run-warning-message,
  .run-error-banner .mini-button {
    grid-column: 1 / -1;
  }

  .run-error-dismiss {
    grid-column: 2;
    grid-row: 1;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Touch ergonomics: interactive targets reach at least 44px on touch devices. */
@media (pointer: coarse) {
  .mobile-tabs button,
  .summary-filter,
  .mini-button,
  .ghost-button,
  .primary-button,
  .command-item,
  .theme-toggle,
  .tree-row {
    min-height: 44px;
  }
}

/* Shared Prover / Explorer project header, aligned to header-design.svg. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.project-header {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr) minmax(150px, 190px) max-content max-content;
  gap: 10px;
  align-items: center;
  width: calc(100% - 32px);
  height: 66px;
  min-height: 66px;
  margin: 0 16px;
  padding: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  color: var(--fg-primary);
  position: relative;
  z-index: 30;
}

.project-header-brand,
.project-header-progress-meta,
.project-header-view-actions,
.project-header-global-actions {
  display: flex;
  align-items: center;
}

.project-header-brand {
  gap: 10px;
  min-width: 0;
}

.project-header-brand-copy {
  min-width: 0;
}

.project-header-brand-copy p,
.project-header-brand-copy h1 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-header-view-actions {
  width: 188px;
  min-width: 188px;
}

.project-header-brand-copy p,
.project-header-context > span {
  color: var(--fg-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.project-header-brand-copy h1 {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.25;
}

.project-header-progress {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-header-progress-meta {
  gap: 8px;
  min-width: 0;
  color: var(--fg-secondary);
  font-size: 10px;
  white-space: nowrap;
}

.project-header-progress-meta strong {
  color: var(--fg-primary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.project-header-status {
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-header-progress .progress-track {
  height: 5px;
}

.project-header-progress.is-indeterminate .progress-fill {
  width: 35% !important;
  animation: projectHeaderIndeterminate 1.2s ease-in-out infinite alternate;
}

.project-header-progress.is-error .progress-fill {
  background: var(--status-failed);
}

.project-header-scope-form {
  display: contents;
}

.project-header-context {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.project-header-context strong,
.project-header-context small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-header-context strong {
  color: var(--fg-primary);
  font-size: 11px;
}

.project-header-context small {
  color: var(--fg-muted);
  font-family: var(--font-code);
  font-size: 9px;
}

.project-header-view-actions,
.project-header-global-actions {
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.project-header .ghost-button,
.project-header .primary-button,
.project-header-view-select select {
  min-height: 36px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 750;
}

.project-header-action-form {
  display: contents;
  margin: 0;
}

.project-header-view-select {
  display: inline-flex;
  align-items: center;
}

.project-header-view-select select {
  max-width: 104px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  color: var(--fg-primary);
  cursor: pointer;
}

.project-header-icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0 !important;
  justify-content: center;
}

.project-header-icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--project-header-icon) no-repeat center / contain;
  mask: var(--project-header-icon) no-repeat center / contain;
}

.project-header-icon.is-command {
  --project-header-icon: url("/vendor/tabler-icons-3.44.0/command.svg");
}

.project-header-icon.is-sun {
  --project-header-icon: url("/vendor/tabler-icons-3.44.0/sun.svg");
}

.project-header-icon.is-moon {
  --project-header-icon: url("/vendor/tabler-icons-3.44.0/moon.svg");
}

:root[data-theme="dark"] .project-header-icon.is-moon,
:root[data-theme="light"] .project-header-icon.is-sun {
  display: none;
}

.run-status-banners {
  display: grid;
  gap: 8px;
  margin: 8px 16px 0;
}

.run-status-banners:empty,
.run-status-banners.is-empty {
  display: none;
}

.run-status-banners .run-error-banner,
.run-status-banners .run-warning-banner {
  margin: 0;
}

.coverage-command-palette[hidden] {
  display: none !important;
}

@keyframes projectHeaderIndeterminate {
  from { transform: translateX(-15%); }
  to { transform: translateX(185%); }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .project-header {
    grid-template-columns: minmax(140px, 175px) minmax(180px, 1fr) minmax(130px, 170px) max-content max-content;
  }

  .project-header-global-actions > .project-header-action-form,
  .project-header-global-actions > #coverage-export,
  .project-header-global-actions > #coverage-share {
    display: none;
  }
}

@media (max-width: 1199px) {
  .project-header {
    grid-template-columns: minmax(160px, 210px) minmax(180px, 1fr) max-content;
    grid-template-rows: 54px 54px;
    height: 108px;
    min-height: 108px;
  }

  .project-header-context {
    grid-column: 1;
  }

  .project-header-view-actions {
    grid-column: 2;
    width: auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .project-header-global-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    flex-wrap: wrap;
    max-width: 260px;
  }
}

@media (max-width: 767px) {
  .project-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 10px;
    width: calc(100% - 20px);
    height: auto;
    min-height: 0;
    margin: 0 10px;
    padding: 10px 0;
  }

  .project-header-progress,
  .project-header-context,
  .project-header-view-actions,
  .project-header-global-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .project-header-global-actions,
  .project-header-view-actions {
    justify-content: flex-start;
    max-width: none;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .project-header .ghost-button,
  .project-header .primary-button,
  .project-header-view-select select,
  .project-header-icon-button {
    min-height: 44px;
  }

  .project-header-icon-button {
    width: 44px;
    min-width: 44px;
  }

  .run-status-banners {
    margin-inline: 10px;
  }
}

/* ============================================================
   SVG status + severity icons. The verdict/severity classes are
   the single source of truth: each maps to a `--status-icon` url,
   and a shared `::before` paints it with `currentColor` so icons
   inherit the existing status hue and theme. The unicode glyph in
   the markup stays as a no-icon fallback (hidden when icons load).
   ============================================================ */
:root {
  --icon-proven: url("/icons/icon-status-proven.svg");
  --icon-proving: url("/icons/icon-status-proving.svg");
  --icon-waiting: url("/icons/icon-status-waiting.svg");
  --icon-failed: url("/icons/icon-status-failed.svg");
  --icon-warn: url("/icons/icon-status-inconclusive.svg");
  --icon-cached: url("/icons/icon-status-cached.svg");
  --icon-notif-info: url("/icons/icon-notif-info.svg");
  --icon-notif-warn: url("/icons/icon-notif-warn.svg");
  --icon-notif-error: url("/icons/icon-notif-error.svg");
}

/* Shared icon glyph: replaces a unicode status/severity glyph in place. */
.proof-gutter[class~="proven"] .marker,
.proof-gutter[class~="proving"] .marker,
.proof-gutter[class~="waiting"] .marker,
.proof-gutter[class~="failed"] .marker,
.proof-gutter[class~="warn"] .marker,
.proof-gutter[class~="cached"] .marker,
.selected-card[class~="proven"] .selected-title > span:first-child,
.selected-card[class~="proving"] .selected-title > span:first-child,
.selected-card[class~="waiting"] .selected-title > span:first-child,
.selected-card[class~="failed"] .selected-title > span:first-child,
.selected-card[class~="warn"] .selected-title > span:first-child,
.selected-card[class~="cached"] .selected-title > span:first-child,
.lineage-glyph[class~="proven"],
.lineage-glyph[class~="proving"],
.lineage-glyph[class~="waiting"],
.lineage-glyph[class~="failed"],
.lineage-glyph[class~="warn"],
.lineage-glyph[class~="cached"],
.status-ico,
.notif-info .notif-glyph,
.notif-warn .notif-glyph,
.notif-error .notif-glyph {
  display: inline-grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
}

.proof-gutter[class~="proven"] .marker::before,
.proof-gutter[class~="proving"] .marker::before,
.proof-gutter[class~="waiting"] .marker::before,
.proof-gutter[class~="failed"] .marker::before,
.proof-gutter[class~="warn"] .marker::before,
.proof-gutter[class~="cached"] .marker::before,
.selected-card[class~="proven"] .selected-title > span:first-child::before,
.selected-card[class~="proving"] .selected-title > span:first-child::before,
.selected-card[class~="waiting"] .selected-title > span:first-child::before,
.selected-card[class~="failed"] .selected-title > span:first-child::before,
.selected-card[class~="warn"] .selected-title > span:first-child::before,
.selected-card[class~="cached"] .selected-title > span:first-child::before,
.lineage-glyph[class~="proven"]::before,
.lineage-glyph[class~="proving"]::before,
.lineage-glyph[class~="waiting"]::before,
.lineage-glyph[class~="failed"]::before,
.lineage-glyph[class~="warn"]::before,
.lineage-glyph[class~="cached"]::before,
.status-ico::before,
.notif-info .notif-glyph::before,
.notif-warn .notif-glyph::before,
.notif-error .notif-glyph::before {
  content: "";
  display: block;
  width: var(--ico-size, 14px);
  height: var(--ico-size, 14px);
  background: currentColor;
  -webkit-mask: var(--status-icon) center / contain no-repeat;
  mask: var(--status-icon) center / contain no-repeat;
}

/* Map each verdict/severity class to its icon. */
.proven { --status-icon: var(--icon-proven); }
.proving { --status-icon: var(--icon-proving); }
.waiting { --status-icon: var(--icon-waiting); }
.failed { --status-icon: var(--icon-failed); }
.warn { --status-icon: var(--icon-warn); }
.cached { --status-icon: var(--icon-cached); }
.notif-info { --status-icon: var(--icon-notif-info); }
.notif-warn { --status-icon: var(--icon-notif-warn); }
.notif-error { --status-icon: var(--icon-notif-error); }

/* Context sizing: each surface sets the rendered icon size. */
.proof-gutter[class~="proven"] .marker,
.proof-gutter[class~="proving"] .marker,
.proof-gutter[class~="waiting"] .marker,
.proof-gutter[class~="failed"] .marker,
.proof-gutter[class~="warn"] .marker,
.proof-gutter[class~="cached"] .marker { --ico-size: 15px; }
.selected-card .selected-title > span:first-child { --ico-size: 17px; }
.lineage-glyph { --ico-size: 15px; }
.notif-glyph { --ico-size: 14px; }

/* Inline status icon utility (legend, chips). */
.status-ico {
  --ico-size: 15px;
  vertical-align: -3px;
}
.status-ico.proven { color: var(--status-proven); }
.status-ico.proving { color: var(--status-proving); }
.status-ico.waiting { color: var(--status-waiting); }
.status-ico.failed { color: var(--status-failed); }
.status-ico.warn { color: var(--status-warn); }
.status-ico.cached { color: var(--status-cached); }

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

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, var(--overlay-strong), transparent 30%),
    var(--bg-canvas);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 380px);
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-panel);
}

.login-panel .brand-mark {
  margin-bottom: 18px;
}

.login-panel h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0;
}

.login-copy {
  margin: 8px 0 22px;
  color: var(--fg-secondary);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--fg-secondary);
}

.login-form input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--bg-code);
  color: var(--fg-primary);
}

.login-form input:focus {
  outline: 2px solid var(--ring-brand);
  outline-offset: 2px;
}

.login-form .primary-button {
  justify-content: center;
}

.login-error {
  margin: 0;
  color: var(--status-failed);
}
