/* Decision-led graphite theme. Loaded after legacy sheets to replace their palette. */
:root {
  color-scheme: dark;
  --ink: #f0f1ed; --muted: #aeb8b5; --line: #3b4543; --paper: #111515;
  --accent: #d0784c; --soft: #242b2b; --warn: #e0bb69;
  --workspace-bg: #202525;
  --workspace-surface: #292f30;
  --workspace-soft: #303737;
  --workspace-line: #454e4d;
  --workspace-ink: #f0f1ed;
  --workspace-muted: #b1bbb7;
  --workspace-accent: #d0784c;
  --refresh-canvas: #202525;
  --refresh-surface: #292f30;
  --refresh-soft: #303737;
  --refresh-ink: #f0f1ed;
  --refresh-muted: #b1bbb7;
  --refresh-line: #454e4d;
  --refresh-accent: #d0784c;
  --refresh-accent-soft: #3c2921;
  --analysis-accent: #087e9c;
  --status-success: #286b43;
  --status-warning: #94600b;
  --status-danger: #a32d2d;
  --status-info: #255db3;
  --shell: #171b1c;
  --shell-raised: #23292a;
  --shell-line: #373f40;
  --shell-muted: #aeb7b5;
}

html, body { min-width: 320px; }
body { background: var(--workspace-bg); color: var(--workspace-ink); }
body, button, input, select, textarea { font-family: Inter, "Segoe UI", system-ui, sans-serif; }
main { max-width: 1760px; }
main > section { min-width: 0; }
a { color: #80cfe1; }
h1, h2, h3 { color: var(--workspace-ink); letter-spacing: 0; }
.eyebrow, .section-kicker { color: var(--workspace-muted); letter-spacing: .08em; }
.source-status, small { color: var(--workspace-muted); }

/* The compact navigation is a persistent graphite rail; expanded labels stay readable. */
.layout { grid-template-columns: 78px minmax(0, 1fr); }
.app-sidebar, .app-sidebar.is-collapsed {
  width: 78px; padding: 20px 11px; gap: 14px;
  color: #eef1ee; background: var(--shell); border-color: var(--shell-line);
}
.app-sidebar .brand { justify-content: center; }
.app-sidebar .brand img { width: 44px; height: 44px; object-fit: cover; object-position: left; }
.app-sidebar .sidebar-label { display: none; }
.app-sidebar nav { gap: 6px; }
.app-sidebar nav a, .app-sidebar nav details summary {
  display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 7px;
  color: #d7dfdc; border-radius: 5px;
}
.app-sidebar nav a::before, .app-sidebar nav details summary::before {
  display: grid; place-items: center; width: 30px; height: 30px;
  color: #ccd5d2; background: var(--shell-raised); border: 1px solid var(--shell-line);
  border-radius: 5px; font-size: 12px; font-weight: 750; content: attr(data-short);
}
.app-sidebar nav a:hover, .app-sidebar nav details summary:hover { color: #fff; background: #2b3334; }
.app-sidebar nav a[aria-current=page] { color: #fff; background: #303838; }
.app-sidebar nav a[aria-current=page]::before, .app-sidebar nav details[open] > summary::before {
  color: #191d1e; background: #f1a06e; border-color: #f1a06e;
}
.app-sidebar .aside-foot { border-color: var(--shell-line); }
.app-sidebar .aside-foot p, .app-sidebar .aside-foot a, .app-sidebar .quiet { color: var(--shell-muted); }
.app-sidebar .sidebar-collapse-toggle {
  color: #dce3e0; background: var(--shell-raised); border-color: var(--shell-line);
}
.app-sidebar:not(.is-collapsed) { width: 236px; padding: 26px 18px; }
.app-sidebar:not(.is-collapsed) .brand { justify-content: flex-start; }
.app-sidebar:not(.is-collapsed) .brand img { width: min(172px, 100%); height: auto; object-fit: contain; }
.app-sidebar:not(.is-collapsed) .sidebar-label { display: inline; color: #c0cac6; }
.app-sidebar:not(.is-collapsed) nav a, .app-sidebar:not(.is-collapsed) nav details summary { justify-content: flex-start; }
.app-sidebar:not(.is-collapsed) nav a::before, .app-sidebar:not(.is-collapsed) nav details summary::before { display: none; }
.layout:has(.app-sidebar:not(.is-collapsed)) { grid-template-columns: 236px minmax(0, 1fr); }

.app-topbar { border-color: var(--workspace-line); }
.topbar-tools { gap: 8px; }
.topbar-tools select, .app-topbar button, .topbar-queue-link {
  min-height: 40px; color: var(--workspace-ink); background: var(--workspace-surface);
  border: 1px solid var(--workspace-line); border-radius: 5px;
}
.topbar-queue-link { color: #78cce0; }
.topbar-queue-link > span:first-child { color: var(--analysis-accent); }
button, .button { min-height: 42px; border-radius: 5px; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
button:hover, .button:hover { transform: none; box-shadow: none; }
.button.primary, button.primary { color: #fff; background: #a94827; border-color: #a94827; }
.button.primary:hover, button.primary:hover { color: #fff; background: #85391f; border-color: #85391f; }
:focus-visible { outline: 3px solid #0785a3; outline-offset: 3px; }

/* Keep the catalog scannable: functional controls, restrained surfaces, clear prices. */
.catalog-hero {
  margin: 0 0 12px; padding: 18px 22px; color: var(--workspace-ink);
  background: var(--workspace-surface); border: 1px solid var(--workspace-line); border-left: 4px solid #d16d3b;
  box-shadow: 0 2px 6px rgb(21 29 29 / 6%);
}
.catalog-hero h1 { font-size: 32px; line-height: 1.15; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 14px; }
.catalog-heading > * { min-width: 0; }
.catalog-heading h1 { margin: 0; }
.catalog-heading p { margin: 5px 0 0; }
.catalog-steps { background: transparent; border-color: var(--workspace-line); }
.catalog-steps .is-current { background: #303737; }
.catalog-steps .is-current b { color: #fff; background: #a94827; }
.catalog-filters, .catalog-map-panel, .source-summary-row {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
.catalog-filters { padding: 12px; }
.catalog-advanced-filters { margin: 0 0 14px; padding: 0 12px; background: var(--workspace-surface); border: 1px solid var(--workspace-line); border-radius: 5px; }
.catalog-advanced-filters > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0; color: var(--workspace-ink); font-size: 12px; font-weight: 700; }
.catalog-advanced-filters[open] > summary { border-bottom: 1px solid var(--workspace-line); }
.catalog-advanced-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 0; }
.catalog-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; }
.catalog-secondary > details { min-width: 0; }
.catalog-secondary > details > summary { margin: 0; }
.catalog-filters input, .catalog-filters select { color: var(--workspace-ink); background: #202525; border-color: #596361; }
.catalog-filter-meta { margin-bottom: 14px; }
.lot-grid, .node-card-grid { gap: 14px; }
.lot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lot-card, .recent-card, .node-tile {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
  border-radius: 6px; box-shadow: 0 2px 6px rgb(21 29 29 / 6%);
}
.lot-card:hover, .recent-card:hover, .node-tile:hover { border-color: #d47b4f; box-shadow: 0 6px 16px rgb(21 29 29 / 12%); }
.lot-card-media { aspect-ratio: 16 / 10; background: #303737; }
.lot-card-media::after { border-color: rgb(20 27 28 / 12%); }
.lot-card-media > .dual-status { position: absolute; z-index: 2; right: 9px; bottom: 9px; left: 9px; width: auto; min-height: 48px; box-shadow: 0 2px 9px rgb(14 20 20 / 24%); }
.lot-card-media > .dual-status > span { padding: 6px 9px; font-size: 11px; }
.lot-card-media > .dual-status b { font-size: 9px; }
.lot-card-placeholder { color: var(--workspace-muted); background: #303737; }
.lot-card-body { gap: 9px; padding: 13px; }
.lot-card-body > .dual-status { min-height: 48px; }
.lot-card-body > .dual-status + .lot-card-footer { margin-top: -2px; }
.lot-card-details { margin: 0; border-top: 1px solid var(--workspace-line); }
.lot-card-details > summary { min-height: 36px; margin: 0; padding: 9px 0 0; color: var(--workspace-muted); font-size: 11px; }
.lot-card-details[open] > summary { margin-bottom: 8px; border-bottom: 1px solid var(--workspace-line); }
.lot-card-details > :not(summary) { margin-bottom: 8px; }
.lot-card-result { display: grid; gap: 3px; padding: 8px 9px; border: 1px solid var(--workspace-line); border-left-width: 3px; border-radius: 4px; background: var(--workspace-soft); }
.lot-card-result strong { font-size: 14px; }
.lot-card-result.deal-positive { border-left-color: #4a9a65; }
.lot-card-result.deal-negative { border-left-color: #b63d35; }
.lot-card-result.deal-risk { border-left-color: #d69a2f; }
.lot-card-result.deal-unknown { border-left-color: #55758f; }
.lot-card-header h3 { font-size: 16px; }
.lot-card-id, .lot-card-meta, .lot-card-auction { color: var(--workspace-muted); }
.lot-card-damage { min-height: 30px; }
.lot-card-prices { grid-template-columns: minmax(0, 1fr); padding: 8px; gap: 7px; background: var(--workspace-soft); border-color: var(--workspace-line); border-radius: 4px; }
.lot-card-prices > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lot-card-prices > div:first-child strong { white-space: nowrap; }
.lot-card-prices .lot-card-result { grid-column: 1 / -1; }
.lot-card-prices .label { color: var(--workspace-muted); }
.lot-card-prices strong { font-size: 16px; }
.lot-card-action { min-height: 42px; }
.catalog-controls .button.is-active { color: #ffc19f; background: #3c2921; border-color: #9e5a3c; }

/* Dual status: independent semantic colors with a clean diagonal divider. */
.dual-status {
  --auction-bg: #274731; --auction-ink: #c5ebd0; --analysis-bg: #203b43; --analysis-ink: #b8e9f2;
  position: relative; min-height: 64px; isolation: isolate; border: 1px solid #aeb9b5;
  border-radius: 5px; background: var(--analysis-bg);
}
.dual-status::before {
  position: absolute; z-index: 0; inset: 0 auto 0 0; width: 53%;
  background: var(--auction-bg); clip-path: polygon(0 0, 100% 0, 84% 100%, 0 100%);
  content: "";
}
.dual-status::after {
  position: absolute; z-index: 1; top: -8%; bottom: -8%; left: 50%; width: 1px;
  background: #899794; transform: rotate(12deg); transform-origin: center; content: ""; pointer-events: none;
}
.dual-status > span { position: relative; z-index: 2; padding: 9px 12px; color: var(--analysis-ink); }
.dual-status > span:first-child { color: var(--auction-ink); }
.dual-status > span:last-child { background: transparent; }
.dual-status b { color: inherit; opacity: .78; }
.dual-status-review { --auction-bg: #493d22; --auction-ink: #f5dfa0; --analysis-bg: #493d22; --analysis-ink: #f5dfa0; border-color: #876d37; }
.dual-status-archived { --auction-bg: #482b2a; --auction-ink: #f0c5c1; --analysis-bg: #342f2b; --analysis-ink: #d9cebd; border-color: #81504c; }
.dual-status-auction-active { --auction-bg: #274731; --auction-ink: #c5ebd0; }
.dual-status-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; }
.dual-status-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
.dual-status-analysis-ready { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
.dual-status-analysis-processing { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
.dual-status-analysis-stale, .dual-status-analysis-needs_review { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
.dual-status-analysis-blocked, .dual-status-analysis-error { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
.dual-status-analysis-not_started { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
.dual-status-analysis.is-processing, .node-status-pair.is-processing { --analysis-bg: #f7edcf; --analysis-ink: #78510b; }
.dual-status-analysis.is-error, .node-status-pair.is-error { --analysis-bg: #f4dfdc; --analysis-ink: #8b2929; }
.dual-status-analysis.is-idle, .node-status-pair.is-idle { --analysis-bg: #e7e9e7; --analysis-ink: #4f5a5b; }
.node-status-pair {
  --auction-bg: #e6f1e9; --auction-ink: #245f3e; --analysis-bg: #deeff4; --analysis-ink: #075b72;
  position: relative; isolation: isolate; border-color: #aeb9b5;
}
.node-status-pair::after {
  position: absolute; z-index: 2; top: -10%; bottom: -10%; left: 50%; width: 1px;
  background: #899794; transform: rotate(12deg); content: ""; pointer-events: none;
}
.node-status-pair .node-status-half { color: var(--auction-ink); background: var(--auction-bg); border-color: transparent; }
.node-status-pair .node-status-half + .node-status-half { color: var(--analysis-ink); background: var(--analysis-bg); border-color: transparent; }
.node-status-pair .node-status-label { color: inherit; opacity: .76; }
.node-status-pair .node-status-auction.node-status-ready { --auction-bg: #e2f0e5; --auction-ink: #205e3a; color: var(--auction-ink); background: var(--auction-bg); }
.node-status-pair .node-status-auction.node-status-review { --auction-bg: #f8edcf; --auction-ink: #78510b; color: var(--auction-ink); background: var(--auction-bg); }
.node-status-pair .node-status-auction.node-status-blocked { --auction-bg: #f4dfdc; --auction-ink: #8b2929; color: var(--auction-ink); background: var(--auction-bg); }
.node-status-pair .node-status-analysis.node-status-neutral { --analysis-bg: #e7e9e7; --analysis-ink: #4f5a5b; color: var(--analysis-ink); background: var(--analysis-bg); }
.node-status-pair .node-status-analysis.node-status-processing { --analysis-bg: #dfeef3; --analysis-ink: #075b72; color: var(--analysis-ink); background: var(--analysis-bg); }
.node-status-pair .node-status-analysis.node-status-ready { --analysis-bg: #e2f0e5; --analysis-ink: #205e3a; color: var(--analysis-ink); background: var(--analysis-bg); }
.node-status-pair .node-status-analysis.node-status-review { --analysis-bg: #f8edcf; --analysis-ink: #78510b; color: var(--analysis-ink); background: var(--analysis-bg); }
.node-status-pair .node-status-analysis.node-status-blocked { --analysis-bg: #f4dfdc; --analysis-ink: #8b2929; color: var(--analysis-ink); background: var(--analysis-bg); }
.dual-status-card, .dual-status-grid { color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line); }
.dual-status-card { border-left: 4px solid #d16d3b; border-radius: 6px; box-shadow: 0 2px 6px rgb(21 29 29 / 6%); }
.dual-status-grid { gap: 2px; background: #9eaaa6; border-radius: 5px; }
.dual-status-half { background: #274731; color: #c5ebd0; }
.dual-status-half.dual-status-auction { background: #274731; }
.dual-status-half.dual-status-analysis { background: #203b43; color: #b8e9f2; }
.dual-status-analysis.is-processing { background: #203b43; color: #b8e9f2; }
.dual-status-analysis.is-error { background: #482b2a; color: #f0c5c1; }
.dual-status-analysis.is-idle { background: #303837; color: #c4ceca; }
.dual-status-mark { color: #c5ebd0; background: #355d42; border-radius: 5px; }
.dual-status-analysis .dual-status-mark { color: #b8e9f2; background: #28505a; }
.dual-status-analysis.is-processing .dual-status-mark { color: #b8e9f2; background: #28505a; }
.dual-status-analysis.is-error .dual-status-mark { color: #f0c5c1; background: #81504c; }
.dual-status-analysis.is-idle .dual-status-mark { color: #c4ceca; background: #454e4d; }
.dual-status-help { color: var(--analysis-accent); border-color: #76b2c0; }
.dual-status-grid.dual-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; overflow: hidden; background: var(--analysis-bg); }
.dual-status-grid.dual-status > .dual-status-half { position: relative; z-index: 0; background: transparent; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-auction,
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis { background: transparent; }
.dual-status-grid.dual-status > .dual-status-half:first-child { color: var(--auction-ink); }
.dual-status-grid.dual-status > .dual-status-half:last-child { color: var(--analysis-ink); }
.dual-status-grid.dual-status > .dual-status-half.dual-status-auction-active { --auction-bg: #274731; --auction-ink: #c5ebd0; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
.dual-status-grid.dual-status > .dual-status-half.is-auction-active { --auction-bg: #274731; --auction-ink: #c5ebd0; }
.dual-status-grid.dual-status > .dual-status-half.is-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; }
.dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-ready { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-processing { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-stale,
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-needs_review { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-error,
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-blocked { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
.dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-not_started { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-active) { --auction-bg: #e2f0e5; --auction-ink: #205e3a; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-ended) { --auction-bg: #e2eaf7; --auction-ink: #214f8c; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-unconfirmed) { --auction-bg: #f8edcf; --auction-ink: #78510b; }
.dual-status-grid.dual-status:has(> .dual-status-half.is-auction-active) { --auction-bg: #e2f0e5; --auction-ink: #205e3a; }
.dual-status-grid.dual-status:has(> .dual-status-half.is-auction-ended) { --auction-bg: #e2eaf7; --auction-ink: #214f8c; }
.dual-status-grid.dual-status:has(> .dual-status-half.is-auction-unconfirmed) { --auction-bg: #f8edcf; --auction-ink: #78510b; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-ready) { --analysis-bg: #e2f0e5; --analysis-ink: #205e3a; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-processing) { --analysis-bg: #dfeef3; --analysis-ink: #075b72; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-stale),
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-needs_review) { --analysis-bg: #f8edcf; --analysis-ink: #78510b; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-blocked),
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-error) { --analysis-bg: #f4dfdc; --analysis-ink: #8b2929; }
.dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-not_started) { --analysis-bg: #e7e9e7; --analysis-ink: #4f5a5b; }
.dual-status-grid.dual-status .dual-status-half.dual-status-auction-active .dual-status-mark { color: #205e3a; background: #c6e1cd; }
.dual-status-grid.dual-status .dual-status-half.dual-status-auction-ended .dual-status-mark { color: #214f8c; background: #cddcf2; }
.dual-status-grid.dual-status .dual-status-half.dual-status-auction-unconfirmed .dual-status-mark { color: #78510b; background: #efd994; }
.dual-status-grid.dual-status .dual-status-half.dual-status-analysis-ready .dual-status-mark { color: #205e3a; background: #c6e1cd; }
.dual-status-grid.dual-status .dual-status-half.dual-status-analysis-processing .dual-status-mark { color: #075b72; background: #b9dce6; }
.dual-status-grid.dual-status .dual-status-half.dual-status-analysis-stale .dual-status-mark,
.dual-status-grid.dual-status .dual-status-half.dual-status-analysis-needs_review .dual-status-mark { color: #78510b; background: #efd994; }
.dual-status-grid.dual-status .dual-status-half.dual-status-analysis-blocked .dual-status-mark,
.dual-status-grid.dual-status .dual-status-half.dual-status-analysis-error .dual-status-mark { color: #8b2929; background: #eebfba; }
.dual-status-grid.dual-status .dual-status-half.dual-status-analysis-not_started .dual-status-mark { color: #4f5a5b; background: #d4d9d6; }
.status-confirmed, .status-ready { color: #205e3a; background: #e3f1e6; border-color: #86b895; }
.status-review, .status-warn { color: #76500b; background: #f8edcf; border-color: #d2b66d; }
.status-blocked, .status-danger { color: #8d2929; background: #f4dfdc; border-color: #ce8d85; }
.status-unknown, .status-archived { color: #4e5a5c; background: #e7e9e7; border-color: #b9c1be; }
.status-accent { color: #185788; background: #e0eaf8; }
.decision-strip { border-left-color: #cf693b; }
.decision-review { border-left-color: #e3a532; }
.decision-ready { border-left-color: #4a9a65; }
.decision-blocked { border-left-color: #b63d35; }

.vehicle-overview, .workspace-finance, .workspace-evidence, .workspace-next, .workspace-tabs, .panel, .queue-row, .analysis-state-banner {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
.vehicle-overview, .workspace-finance, .workspace-evidence, .workspace-next, .panel, .queue-row { border-radius: 6px; }
.workspace-tabs { border-radius: 5px; }
.workspace-tabs a[aria-current=page] { color: #783719; background: #fae6dc; border-color: #d98761; }
.finance-grid, .decision-strip-stats { background: var(--workspace-line); border-color: var(--workspace-line); }
.finance-grid > div, .decision-strip-stats > div { background: #eaedea; }
.analysis-state-ready { --analysis-accent: #286b43; }
.analysis-state-processing { --analysis-accent: #94600b; }
.analysis-state-error { --analysis-accent: #a32d2d; }

@media (max-width: 1320px) { .lot-grid, .node-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1040px) {
  .layout, .layout:has(.app-sidebar:not(.is-collapsed)) { grid-template-columns: 78px minmax(0, 1fr); }
  .app-sidebar:not(.is-collapsed) { width: 78px; padding-inline: 11px; }
  .app-sidebar:not(.is-collapsed) .sidebar-label { display: none; }
  .app-sidebar:not(.is-collapsed) .brand img { width: 44px; height: 44px; object-fit: cover; object-position: left; }
  .app-sidebar:not(.is-collapsed) nav a::before, .app-sidebar:not(.is-collapsed) nav details summary::before { display: grid; }
  .lot-grid, .node-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .layout, .layout:has(.app-sidebar:not(.is-collapsed)) { display: block; }
  .app-sidebar, .app-sidebar:not(.is-collapsed), .app-sidebar.is-collapsed { width: 100%; height: auto; padding: 12px 16px; }
  .app-sidebar .brand, .app-sidebar:not(.is-collapsed) .brand { justify-content: flex-start; }
  .app-sidebar .brand img, .app-sidebar:not(.is-collapsed) .brand img, .app-sidebar.is-collapsed .brand img { width: min(172px, 100%); height: auto; object-fit: contain; }
  .app-sidebar .sidebar-label, .app-sidebar:not(.is-collapsed) .sidebar-label, .app-sidebar.is-collapsed .sidebar-label { display: inline; }
  .app-sidebar nav a::before, .app-sidebar nav details summary::before, .app-sidebar:not(.is-collapsed) nav a::before, .app-sidebar:not(.is-collapsed) nav details summary::before { display: none; }
  .app-sidebar .sidebar-collapse-toggle { display: none; }
  .app-sidebar nav a, .app-sidebar nav details summary { justify-content: flex-start; min-height: 44px; }
  .app-sidebar nav a[aria-current=page] { background: #303838; }
  main { padding: 16px 13px; }
  .app-topbar { gap: 10px; margin-bottom: 18px; padding-bottom: 12px; }
  .app-topbar .eyebrow { max-width: 54%; font-size: 9px; }
  .topbar-tools { gap: 5px; }
  .topbar-tools select { min-width: 56px; padding-inline: 6px; }
  .catalog-hero { padding: 16px; }
  .catalog-hero h1 { font-size: 28px; }
  .catalog-heading { align-items: flex-start; flex-direction: column; }
  .catalog-advanced-grid { grid-template-columns: 1fr; }
  .lot-grid, .node-card-grid { grid-template-columns: 1fr; }
  .dual-status { min-height: 64px; }
  .dual-status > span { padding-inline: 9px; }
  .dual-status-card { padding: 14px; }
  .dual-status-grid.dual-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dual-status-foot { align-items: stretch; flex-direction: column; }
  .dual-status-foot .button { width: 100%; }
  .dual-status-grid.dual-status > .dual-status-half { gap: 6px; padding: 8px 7px; }
  .dual-status-grid.dual-status .dual-status-mark { width: 22px; height: 22px; font-size: 12px; }
  .dual-status-grid.dual-status .dual-status-label { font-size: 8px; }
  .dual-status-grid.dual-status .dual-status-half strong { font-size: 11px; overflow-wrap: anywhere; }
  .dual-status-grid.dual-status .dual-status-half small { font-size: 9px; }
  .lot-card-media > .dual-status { right: 7px; bottom: 7px; left: 7px; }
  .workspace-tabs { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
}
@media (max-width: 520px) {
  html .dual-status-card .dual-status-grid.dual-status { grid-template-columns: 1fr; gap: 0; background: #454e4d; }
  html .dual-status-card .dual-status-grid.dual-status::before { display: none; }
  html .dual-status-card .dual-status-grid.dual-status::after { top: calc(50% - 5px); bottom: auto; left: calc(50% - 25px); width: 50px; height: 2px; background: #aeb8b5; transform: rotate(12deg); }
  html .dual-status-card .dual-status-grid.dual-status > .dual-status-half:first-child { color: #c5ebd0; background: #274731; }
  html .dual-status-card .dual-status-grid.dual-status > .dual-status-half:last-child { color: #b8e9f2; background: #203b43; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status { background: #c8d0d5; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status::after { background: #708087; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:first-child { color: var(--auction-ink); background: var(--auction-bg); }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:last-child { color: var(--analysis-ink); background: var(--analysis-bg); }
}

/* The compact auction / analysis widget uses the same semantic colors as the
   detail view; legacy per-half backgrounds must not hide the split palette. */
html[data-theme="dark"] .lot-card-media > .dual-status > .dual-status-auction { color: #c5ebd0; background: transparent; }
html[data-theme="dark"] .lot-card-media > .dual-status > .dual-status-analysis { color: #b8e9f2; background: transparent; }
html[data-theme="light"] .lot-card-media > .dual-status > .dual-status-auction { color: #315c70; background: transparent; }
html[data-theme="light"] .lot-card-media > .dual-status > .dual-status-analysis { color: #315d78; background: transparent; }
html[data-theme="dark"] .lot-card-media > .dual-status.dual-status-auction-ended > .dual-status-auction { color: #c7daf8; }
html[data-theme="light"] .lot-card-media > .dual-status.dual-status-auction-ended > .dual-status-auction { color: #4b5963; }
html[data-theme="dark"] .lot-card-media > .dual-status.dual-status-auction-unconfirmed > .dual-status-auction { color: #f5dfa0; }
html[data-theme="light"] .lot-card-media > .dual-status.dual-status-auction-unconfirmed > .dual-status-auction { color: #76551a; }
html[data-theme="dark"] .lot-card-media > .dual-status.dual-status-analysis-ready > .dual-status-analysis { color: #c5ebd0; }
html[data-theme="light"] .lot-card-media > .dual-status.dual-status-analysis-ready > .dual-status-analysis { color: #315d51; }
html[data-theme="dark"] .lot-card-media > .dual-status.dual-status-analysis-stale > .dual-status-analysis,
html[data-theme="dark"] .lot-card-media > .dual-status.dual-status-analysis-needs_review > .dual-status-analysis { color: #f5dfa0; }
html[data-theme="light"] .lot-card-media > .dual-status.dual-status-analysis-stale > .dual-status-analysis,
html[data-theme="light"] .lot-card-media > .dual-status.dual-status-analysis-needs_review > .dual-status-analysis { color: #76551a; }
html[data-theme="dark"] .lot-card-media > .dual-status.dual-status-analysis-error > .dual-status-analysis,
html[data-theme="dark"] .lot-card-media > .dual-status.dual-status-analysis-blocked > .dual-status-analysis { color: #f0c5c1; }
html[data-theme="light"] .lot-card-media > .dual-status.dual-status-analysis-error > .dual-status-analysis,
html[data-theme="light"] .lot-card-media > .dual-status.dual-status-analysis-blocked > .dual-status-analysis { color: #853f3a; }
html[data-theme="dark"] .lot-card-media > .dual-status > span:last-child,
html[data-theme="light"] .lot-card-media > .dual-status > span:last-child { background: transparent; }
@media (max-width: 520px) {
  html[data-theme="dark"] .lot-card-media > .dual-status > .dual-status-auction { background: var(--auction-bg); }
  html[data-theme="dark"] .lot-card-media > .dual-status > .dual-status-analysis { background: var(--analysis-bg); }
  html[data-theme="light"] .lot-card-media > .dual-status > .dual-status-auction { background: var(--auction-bg); }
  html[data-theme="light"] .lot-card-media > .dual-status > .dual-status-analysis { background: var(--analysis-bg); }
}

/* Cold graphite / steel palettes for the two user-selectable appearance modes. */
html[data-theme="light"] {
  --ink: #243341; --muted: #60717e; --line: #c0cbd4; --paper: #dfe6eb;
  --accent: #526f86; --soft: #e5ebf0; --warn: #805d20;
  --workspace-bg: #dfe6eb; --workspace-surface: #f1f4f6; --workspace-soft: #e5ebf0;
  --workspace-line: #c0cbd4; --workspace-ink: #243341; --workspace-muted: #60717e; --workspace-accent: #526f86;
  --refresh-canvas: #dfe6eb; --refresh-surface: #f1f4f6; --refresh-soft: #e5ebf0;
  --refresh-line: #c0cbd4; --refresh-ink: #243341; --refresh-muted: #60717e;
  --refresh-accent: #526f86; --refresh-accent-soft: #e3eaf0;
}
html[data-theme="light"] .app-sidebar, html[data-theme="light"] .app-sidebar.is-collapsed { color: #243341; background: #e9eef2; border-color: var(--workspace-line); }
html[data-theme="light"] .app-sidebar nav a, html[data-theme="light"] .app-sidebar nav details summary { color: #425969; }
html[data-theme="light"] .app-sidebar nav a[aria-current=page] { color: #243b4c; background: #dce5eb; }
html[data-theme="light"] .app-sidebar nav a[aria-current=page]::before, html[data-theme="light"] .app-sidebar nav details[open] > summary::before { color: #314c60; background: #cbd8e1; border-color: #9aabb7; }
html[data-theme="light"] .button.primary, html[data-theme="light"] button.primary { color: #fff; background: #526f86; border-color: #526f86; }
html[data-theme="light"] .button.primary:hover, html[data-theme="light"] button.primary:hover { background: #405b70; border-color: #405b70; }
html[data-theme="light"] a { color: #315d78; }
html[data-theme="dark"] .button.primary, html[data-theme="dark"] button.primary { color: #fff; background: #a94827; border-color: #bd603b; }

/* Decision-first cards use one price line and one full-width result. */
.lot-card-media { aspect-ratio: 16 / 10; }
.lot-card-body { gap: 7px; padding: 11px; }
.lot-card-header h3 { font-size: 15px; }
.lot-card-id { margin-top: 1px; font-size: 10px; line-height: 1.3; }
.lot-card-meta { font-size: 10px; }
.lot-card-prices { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 7px; }
.lot-card-prices > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lot-card-prices > div:first-child strong { white-space: nowrap; }
.lot-card-prices .lot-card-result { grid-column: 1 / -1; min-width: 0; padding: 6px 8px; }
.lot-card-result strong { font-size: 13px; }
.lot-card-result small { font-size: 10px; line-height: 1.25; }
.lot-card-footer { min-height: 16px; }
.lot-card-auction { font-size: 10px; }
.lot-card-action { min-height: 38px; padding-block: 7px; font-size: 13px; }
.lot-grid { align-items: stretch; }
@media (max-width: 1320px) { .lot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .lot-grid { grid-template-columns: 1fr; } .lot-card-body { padding: 12px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0f1ed; --muted: #aeb8b5; --line: #3b4543; --paper: #111515;
  --accent: #d0784c; --soft: #242b2b; --warn: #e0bb69;
  --workspace-bg: #111515; --workspace-surface: #1b2121; --workspace-soft: #242b2b;
  --workspace-line: #3b4543; --workspace-ink: #f0f1ed; --workspace-muted: #aeb8b5;
  --refresh-canvas: #111515; --refresh-surface: #1b2121; --refresh-soft: #242b2b;
  --refresh-line: #3b4543; --refresh-ink: #f0f1ed; --refresh-muted: #aeb8b5;
}
html[data-theme="dark"] body { background: var(--workspace-bg); color: var(--workspace-ink); }
html[data-theme="dark"] .app-sidebar, html[data-theme="dark"] .app-sidebar.is-collapsed { background: #101313; border-color: #343c3b; }
html[data-theme="dark"] .catalog-hero, html[data-theme="dark"] .catalog-filters, html[data-theme="dark"] .catalog-map-panel,
html[data-theme="dark"] .lot-card, html[data-theme="dark"] .recent-card, html[data-theme="dark"] .node-tile,
html[data-theme="dark"] .vehicle-overview, html[data-theme="dark"] .dual-status-card, html[data-theme="dark"] .workspace-finance,
html[data-theme="dark"] .workspace-evidence, html[data-theme="dark"] .workspace-next, html[data-theme="dark"] .workspace-tabs,
html[data-theme="dark"] .panel, html[data-theme="dark"] .queue-row, html[data-theme="dark"] .analysis-state-banner,
html[data-theme="dark"] .table-wrap, html[data-theme="dark"] table,
html[data-theme="dark"] .node-stat-grid > div, html[data-theme="dark"] .node-atlas-result-grid > div,
html[data-theme="dark"] .node-photo-card, html[data-theme="dark"] .node-photo-actions .node-select-form,
html[data-theme="dark"] .node-photo-inspection, html[data-theme="dark"] .node-tile-price,
html[data-theme="dark"] .node-original-url, html[data-theme="dark"] .node-open-card {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea,
html[data-theme="dark"] .topbar-tools select, html[data-theme="dark"] .app-topbar button, html[data-theme="dark"] .button:not(.primary) {
  color: var(--workspace-ink); background: #202626; border-color: var(--workspace-line);
}
html[data-theme="dark"] .lot-card-prices, html[data-theme="dark"] .finance-grid > div, html[data-theme="dark"] .decision-strip-stats > div {
  color: var(--workspace-ink); background: #252d2c; border-color: var(--workspace-line);
}
html[data-theme="dark"] th, html[data-theme="dark"] .node-photo-inspection, html[data-theme="dark"] .node-caution,
html[data-theme="dark"] .node-tile-price, html[data-theme="dark"] .node-open-card { background: #252d2c; }
html[data-theme="dark"] .node-media-fallback, html[data-theme="dark"] .node-photo-placeholder,
html[data-theme="dark"] .node-media-tag { color: #c4ceca; background: #303837; }
html[data-theme="dark"] .workspace-tabs a[aria-current=page] { color: #ffb089; background: #3c2921; border-color: #81533e; }
html[data-theme="dark"] .dual-status { --auction-bg: #274731; --auction-ink: #c5ebd0; --analysis-bg: #203b43; --analysis-ink: #b8e9f2; border-color: #53615e; }
html[data-theme="dark"] .dual-status-review { --auction-bg: #493d22; --auction-ink: #f5dfa0; --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-archived { --auction-bg: #482b2a; --auction-ink: #f0c5c1; --analysis-bg: #342f2b; --analysis-ink: #d9cebd; }
html[data-theme="dark"] .dual-status-auction-active { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="dark"] .dual-status-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-analysis-ready { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-analysis-processing { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
html[data-theme="dark"] .dual-status-analysis-stale, html[data-theme="dark"] .dual-status-analysis-needs_review { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-analysis-blocked, html[data-theme="dark"] .dual-status-analysis-error { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
html[data-theme="dark"] .dual-status-analysis-not_started { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
html[data-theme="dark"] .node-status-pair { --auction-bg: #274731; --auction-ink: #c5ebd0; --analysis-bg: #203b43; --analysis-ink: #b8e9f2; border-color: #53615e; }
html[data-theme="dark"] .node-status-pair .node-status-auction.node-status-ready { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="dark"] .node-status-pair .node-status-auction.node-status-review { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="dark"] .node-status-pair .node-status-auction.node-status-blocked { --auction-bg: #482b2a; --auction-ink: #f0c5c1; }
html[data-theme="dark"] .node-status-pair .node-status-analysis.node-status-neutral { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
html[data-theme="dark"] .node-status-pair .node-status-analysis.node-status-processing { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
html[data-theme="dark"] .node-status-pair .node-status-analysis.node-status-ready { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
html[data-theme="dark"] .node-status-pair .node-status-analysis.node-status-review { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="dark"] .node-status-pair .node-status-analysis.node-status-blocked { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-active) { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-ended) { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-unconfirmed) { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-active) { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-ended) { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-unconfirmed) { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-ready) { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-processing) { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-stale),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-needs_review) { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-blocked),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-error) { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-not_started) { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
html[data-theme="dark"] .dual-status-half, html[data-theme="dark"] .dual-status-half.dual-status-auction { color: #c5ebd0; background: #274731; }
html[data-theme="dark"] .dual-status-half.dual-status-analysis { color: #b8e9f2; background: #203b43; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis { background: transparent; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction-active { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-active { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-ready { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-processing { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-stale,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-needs_review { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-error,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-blocked { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-not_started { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
html[data-theme="dark"] .dual-status-analysis.is-processing { color: #f5dfa0; background: #493d22; }
html[data-theme="dark"] .dual-status-analysis.is-error { color: #f0c5c1; background: #482b2a; }
html[data-theme="dark"] .dual-status-analysis.is-idle { color: #c4ceca; background: #303837; }
html[data-theme="dark"] .dual-status-mark { color: #c5ebd0; background: #355d42; }
html[data-theme="dark"] .dual-status-analysis .dual-status-mark { color: #b8e9f2; background: #28505a; }
html[data-theme="dark"] .status-confirmed, html[data-theme="dark"] .status-ready { color: #c5ebd0; background: #23412e; border-color: #467552; }
html[data-theme="dark"] .status-review, html[data-theme="dark"] .status-warn { color: #f5dfa0; background: #493d22; border-color: #876d37; }
html[data-theme="dark"] .status-blocked { color: #f0c5c1; background: #482b2a; border-color: #81504c; }
html[data-theme="dark"] .status-unknown, html[data-theme="dark"] .status-archived { color: #c4ceca; background: #303837; border-color: #505c58; }
html[data-theme="dark"] .topbar-queue-link, html[data-theme="dark"] .topbar-queue-link > span:first-child { color: #78cce0; }
html[data-theme="dark"] a { color: #80cfe1; }
html[data-theme="dark"] .button.primary, html[data-theme="dark"] button.primary { color: #fff; background: #a94827; border-color: #bd603b; }
@media (max-width: 760px) { html[data-theme="dark"] .app-sidebar { background: #101313; } }

/* An explicit light choice remains available for users who prefer it. */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #243341; --muted: #60717e; --line: #c0cbd4; --paper: #dfe6eb;
  --accent: #526f86; --soft: #e5ebf0; --warn: #805d20;
  --workspace-bg: #e4eaee; --workspace-surface: #f5f7f8; --workspace-soft: #e9eff3;
  --workspace-line: #c5d1d8; --workspace-ink: #203447; --workspace-muted: #5e7383; --workspace-accent: #147b85;
  --refresh-canvas: #e4eaee; --refresh-surface: #f5f7f8; --refresh-soft: #e9eff3;
  --refresh-line: #c5d1d8; --refresh-ink: #203447; --refresh-muted: #5e7383; --refresh-accent: #147b85; --refresh-accent-soft: #d9ecec;
}
html[data-theme="light"] body { background: var(--workspace-bg); color: var(--workspace-ink); }
html[data-theme="light"] .app-sidebar, html[data-theme="light"] .app-sidebar.is-collapsed { color: #eef1ee; background: #263c4a; border-color: #354f5f; }
html[data-theme="light"] .app-sidebar nav a[aria-current=page] { color: #173b45; background: #d5e8e9; }
html[data-theme="light"] .app-sidebar nav a[aria-current=page]::before, html[data-theme="light"] .app-sidebar nav details[open] > summary::before { color: #fff; background: #16828a; border-color: #16828a; }
html[data-theme="light"] .catalog-hero, html[data-theme="light"] .catalog-filters, html[data-theme="light"] .catalog-map-panel,
html[data-theme="light"] .source-summary-row, html[data-theme="light"] .lot-card, html[data-theme="light"] .recent-card,
html[data-theme="light"] .node-tile, html[data-theme="light"] .vehicle-overview, html[data-theme="light"] .dual-status-card,
html[data-theme="light"] .workspace-finance, html[data-theme="light"] .workspace-evidence, html[data-theme="light"] .workspace-next,
html[data-theme="light"] .workspace-tabs, html[data-theme="light"] .panel, html[data-theme="light"] .queue-row,
html[data-theme="light"] .analysis-state-banner, html[data-theme="light"] .table-wrap, html[data-theme="light"] table,
html[data-theme="light"] .node-stat-grid > div, html[data-theme="light"] .node-atlas-result-grid > div,
html[data-theme="light"] .node-photo-card, html[data-theme="light"] .node-photo-actions .node-select-form,
html[data-theme="light"] .node-photo-inspection, html[data-theme="light"] .node-tile-price,
html[data-theme="light"] .node-original-url, html[data-theme="light"] .node-open-card {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea,
html[data-theme="light"] .topbar-tools select, html[data-theme="light"] .app-topbar button,
html[data-theme="light"] .button:not(.primary) { color: var(--workspace-ink); background: #fff; border-color: var(--workspace-line); }
html[data-theme="light"] .lot-card-prices, html[data-theme="light"] .finance-grid > div,
html[data-theme="light"] .decision-strip-stats > div { color: var(--workspace-ink); background: var(--workspace-soft); border-color: var(--workspace-line); }
html[data-theme="light"] th, html[data-theme="light"] .node-photo-inspection, html[data-theme="light"] .node-caution,
html[data-theme="light"] .node-tile-price, html[data-theme="light"] .node-open-card { background: var(--workspace-soft); }
html[data-theme="light"] .node-media-fallback, html[data-theme="light"] .node-photo-placeholder { color: #405c6b; background: #e8eef1; }
html[data-theme="light"] .node-media-tag { color: #38565d; background: rgb(255 255 255 / 94%); }
html[data-theme="light"] .catalog-filters input, html[data-theme="light"] .catalog-filters select { background: #fff; border-color: #b6c6ce; }
html[data-theme="light"] .lot-card-media { background: #e8eef1; }
html[data-theme="light"] .lot-card-placeholder { color: #486171; background: #e8eef1; }
html[data-theme="light"] .lot-card-placeholder span { color: #203447; }
html[data-theme="light"] .lot-card-placeholder small { color: #5e7383; }
html[data-theme="light"] .lot-card-image,
html[data-theme="dark"] .lot-card-image { display: grid; min-width: 0; min-height: 0; color: inherit; text-decoration: none; }
html[data-theme="light"] .lot-card-placeholder { color: #486171; background: #e8eef1; }
html[data-theme="dark"] .lot-card-placeholder { color: #c2d0d2; background: #303737; }
html[data-theme="dark"] .lot-card-placeholder span { color: #f0f1ed; }
html[data-theme="dark"] .lot-card-placeholder small { color: #b1bbb7; }
html[data-theme="light"] .catalog-hero { border-left-color: #16828a; }
html[data-theme="light"] .button.primary, html[data-theme="light"] button.primary { color: #fff; background: #a34e2e; border-color: #a34e2e; }
html[data-theme="light"] .button.primary:hover, html[data-theme="light"] button.primary:hover { background: #843d27; border-color: #843d27; }
html[data-theme="light"] .decision-strip { background: #eaf1f4; }
html[data-theme="light"] .decision-strip.decision-ready { border-left-color: #317b67; }
html[data-theme="light"] .decision-strip.decision-review { border-left-color: #b77923; }
html[data-theme="light"] .decision-strip.decision-blocked { border-left-color: #a9443e; }
html[data-theme="light"] .status-confirmed, html[data-theme="light"] .status-ready { color: #23614f; background: #e4f0eb; border-color: #9bc5b7; }
html[data-theme="light"] .status-review, html[data-theme="light"] .status-warn { color: #76551a; background: #f7edda; border-color: #d2b66d; }
html[data-theme="light"] .status-blocked { color: #853f3a; background: #f4e4e2; border-color: #ce8d85; }
html[data-theme="light"] .workspace-tabs a[aria-current=page] { color: #155e67; background: #dbecee; border-color: #9fc4c8; }
html[data-theme="light"] .node-workspace .node-filters a { color: var(--workspace-muted); background: var(--workspace-surface); }
html[data-theme="light"] .node-workspace .node-filters a[aria-current="page"] { color: #155e67; background: #dbecee; border-color: #9fc4c8; }
html[data-theme="light"] .dual-status, html[data-theme="light"] .node-status-pair {
  --auction-bg: #e6f1e9; --auction-ink: #245f3e; --analysis-bg: #deeff4; --analysis-ink: #075b72; border-color: #aeb9b5;
}
html[data-theme="light"] .dual-status-grid.dual-status { background: var(--analysis-bg); }
html[data-theme="light"] .dual-status-auction-active { --auction-bg: #e2f0e5; --auction-ink: #205e3a; }
html[data-theme="light"] .dual-status-auction-ended { --auction-bg: #e2eaf7; --auction-ink: #214f8c; }
html[data-theme="light"] .dual-status-auction-unconfirmed { --auction-bg: #f8edcf; --auction-ink: #78510b; }
html[data-theme="light"] .dual-status-analysis-ready { --analysis-bg: #e2f0e5; --analysis-ink: #205e3a; }
html[data-theme="light"] .dual-status-analysis-processing { --analysis-bg: #dfeef3; --analysis-ink: #075b72; }
html[data-theme="light"] .dual-status-analysis-stale, html[data-theme="light"] .dual-status-analysis-needs_review { --analysis-bg: #f8edcf; --analysis-ink: #78510b; }
html[data-theme="light"] .dual-status-analysis-error, html[data-theme="light"] .dual-status-analysis-blocked { --analysis-bg: #f4dfdc; --analysis-ink: #8b2929; }
html[data-theme="light"] .dual-status-analysis-not_started { --analysis-bg: #e7e9e7; --analysis-ink: #4f5a5b; }
html[data-theme="light"] .dual-status-half, html[data-theme="light"] .dual-status-half.dual-status-auction { color: #245f3e; background: #e6f1e9; }
html[data-theme="light"] .dual-status-half.dual-status-analysis { color: #075b72; background: #deeff4; }
html[data-theme="light"] .dual-status-mark { color: #245f3e; background: #c9e2d0; }
html[data-theme="light"] .dual-status-analysis .dual-status-mark { color: #075b72; background: #c3e2ea; }
html[data-theme="light"] .node-status-pair .node-status-auction.node-status-ready { --auction-bg: #e2f0e5; --auction-ink: #205e3a; color: #205e3a; background: #e2f0e5; }
html[data-theme="light"] .node-status-pair .node-status-auction.node-status-review,
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-review { color: #78510b; background: #f8edcf; }
html[data-theme="light"] .node-status-pair .node-status-auction.node-status-blocked,
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-blocked { color: #8b2929; background: #f4dfdc; }
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-neutral { color: #4f5a5b; background: #e7e9e7; }
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-processing { color: #075b72; background: #dfeef3; }
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-ready { color: #205e3a; background: #e2f0e5; }
html[data-theme="light"] .status-confirmed, html[data-theme="light"] .status-ready { color: #205e3a; background: #e3f1e6; border-color: #86b895; }
html[data-theme="light"] .status-review, html[data-theme="light"] .status-warn { color: #76500b; background: #f8edcf; border-color: #d2b66d; }
html[data-theme="light"] .status-blocked { color: #8d2929; background: #f4dfdc; border-color: #ce8d85; }
html[data-theme="light"] .status-unknown, html[data-theme="light"] .status-archived { color: #4e5a5c; background: #e7e9e7; border-color: #b9c1be; }
html[data-theme="light"] .workspace-tabs a[aria-current=page] { color: #783719; background: #fae6dc; border-color: #d98761; }
html[data-theme="light"] a { color: #175b6a; }
html[data-theme="light"] .button.primary, html[data-theme="light"] button.primary { color: #fff; background: #a94827; border-color: #a94827; }
html[data-theme="light"] .dual-status, html[data-theme="light"] .node-status-pair { --auction-bg: #e2eaf0; --auction-ink: #294f6b; --analysis-bg: #dfeef3; --analysis-ink: #075b72; }
html[data-theme="light"] .dual-status-auction-active { --auction-bg: #e2f0e5; --auction-ink: #205e3a; }
html[data-theme="light"] .dual-status-analysis-ready { --analysis-bg: #e2f0e5; --analysis-ink: #205e3a; }
html[data-theme="light"] .dual-status-auction-ended { --auction-bg: #e2eaf7; --auction-ink: #214f8c; }
html[data-theme="light"] .dual-status-analysis-processing { --analysis-bg: #dfeef3; --analysis-ink: #075b72; }
html[data-theme="light"] .dual-status-half.dual-status-auction { color: var(--auction-ink); background: var(--auction-bg); }
html[data-theme="light"] .dual-status-half.dual-status-analysis { color: var(--analysis-ink); background: var(--analysis-bg); }
html[data-theme="light"] .node-status-pair .node-status-auction { color: var(--auction-ink); background: var(--auction-bg); }
html[data-theme="light"] .node-status-pair .node-status-analysis { color: var(--analysis-ink); background: var(--analysis-bg); }

/* Public summaries use the same theme as the authenticated workspace. */
.public-lot-page { --workspace-accent: #d0784c; }
.public-header-tools { display: flex; align-items: center; gap: 12px; }
.public-lot-page .public-lot-decision { border-color: var(--workspace-accent); }
.public-lot-page .public-lot-warning { border-left-color: #a87820; }
html[data-theme="light"] .public-lot-page { --workspace-accent: #a95c3b; }
html[data-theme="light"] .public-lot-page .dual-status { --auction-bg: #e2eaf0; --auction-ink: #294f6b; --analysis-bg: #dfeef3; --analysis-ink: #075b72; }
html[data-theme="light"] .public-lot-page .dual-status-auction-active { --auction-bg: #e2f0e5; --auction-ink: #205e3a; }
html[data-theme="light"] .public-lot-page .dual-status-analysis-ready { --analysis-bg: #e2f0e5; --analysis-ink: #205e3a; }
@media (max-width: 760px) { .public-header-tools { width: 100%; justify-content: space-between; } }
html[data-theme="light"] .dual-status, html[data-theme="light"] .node-status-pair { --auction-bg: #e2eaf0; --auction-ink: #294f6b; --analysis-bg: #dfeef3; --analysis-ink: #075b72; }
html[data-theme="light"] .dual-status-auction-active, html[data-theme="light"] .dual-status-analysis-ready { --auction-bg: #e2f0e5; --auction-ink: #205e3a; --analysis-bg: #e2f0e5; --analysis-ink: #205e3a; }
html[data-theme="light"] .dual-status-auction-ended { --auction-bg: #e2eaf7; --auction-ink: #214f8c; }
html[data-theme="light"] .dual-status-analysis-processing { --analysis-bg: #dfeef3; --analysis-ink: #075b72; }
html[data-theme="light"] .dual-status-half.dual-status-auction { color: var(--auction-ink); background: var(--auction-bg); }
html[data-theme="light"] .dual-status-half.dual-status-analysis { color: var(--analysis-ink); background: var(--analysis-bg); }
html[data-theme="light"] .node-status-pair .node-status-auction { color: var(--auction-ink); background: var(--auction-bg); }
html[data-theme="light"] .node-status-pair .node-status-analysis { color: var(--analysis-ink); background: var(--analysis-bg); }

/* The report has an isolated stylesheet but shares the same theme preference. */
.report-theme-control { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.report-theme-control select { min-height: 36px; padding: 6px 9px; color: var(--workspace-ink); background: var(--workspace-surface); border: 1px solid var(--workspace-line); border-radius: 4px; font: inherit; }

/* Preserve semantic status colors after the shared light-theme defaults. */
html[data-theme="light"] .dual-status-auction-active { --auction-bg: #e8eff3; --auction-ink: #315c70; }
html[data-theme="light"] .dual-status-auction-ended { --auction-bg: #e9ecef; --auction-ink: #4b5963; }
html[data-theme="light"] .dual-status-auction-unconfirmed { --auction-bg: #f7edda; --auction-ink: #76551a; }
html[data-theme="light"] .dual-status-analysis-ready { --analysis-bg: #e4efeb; --analysis-ink: #315d51; }
html[data-theme="light"] .dual-status-analysis-processing { --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="light"] .dual-status-analysis-stale,
html[data-theme="light"] .dual-status-analysis-needs_review { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="light"] .dual-status-analysis-error,
html[data-theme="light"] .dual-status-analysis-blocked { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; }
html[data-theme="light"] .dual-status-analysis-not_started { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; }
html[data-theme="light"] .dual-status-half.dual-status-auction { color: var(--auction-ink); background: var(--auction-bg); }
html[data-theme="light"] .dual-status-half.dual-status-analysis { color: var(--analysis-ink); background: var(--analysis-bg); }
html[data-theme="light"] .node-status-pair .node-status-auction.node-status-ready { color: #315d51; background: #e4efeb; }
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-ready { color: #315d51; background: #e4efeb; }
html[data-theme="light"] .node-status-pair .node-status-auction.node-status-review,
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-review { color: #76551a; background: #f7edda; }
html[data-theme="light"] .node-status-pair .node-status-auction.node-status-blocked,
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-blocked { color: #853f3a; background: #f4e4e2; }
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-neutral { color: #4b5963; background: #e9ecef; }
html[data-theme="light"] .node-status-pair .node-status-analysis.node-status-processing { color: #315d78; background: #e3edf4; }
html[data-theme="light"] .status-confirmed, html[data-theme="light"] .status-ready { color: #315d51; background: #e4efeb; border-color: #8ab5a7; }
html[data-theme="light"] .status-review, html[data-theme="light"] .status-warn { color: #76551a; background: #f7edda; border-color: #d2b66d; }
html[data-theme="light"] .status-blocked { color: #853f3a; background: #f4e4e2; border-color: #ce8d85; }
html[data-theme="light"] .status-unknown, html[data-theme="light"] .status-archived { color: #4b5963; background: #e9ecef; border-color: #c2cbd1; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis { color: var(--analysis-ink); background: transparent; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction-active { --auction-bg: #e8eff3; --auction-ink: #315c70; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction-ended { --auction-bg: #e9ecef; --auction-ink: #4b5963; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-auction-unconfirmed { --auction-bg: #f7edda; --auction-ink: #76551a; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-ready { --analysis-bg: #e4efeb; --analysis-ink: #315d51; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-processing { --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-stale,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-needs_review { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-error,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-blocked { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.dual-status-analysis-not_started { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; }

/* Replace hard-coded legacy white surfaces on pages using the shared shell. */
html[data-theme="dark"] .photo-card,
html[data-theme="dark"] .diagnostic-pair,
html[data-theme="dark"] .archive-json,
html[data-theme="dark"] .cost-overview-row,
html[data-theme="dark"] .yard-offer,
html[data-theme="dark"] .parts-total-primary,
html[data-theme="dark"] .parts-total-secondary,
html[data-theme="dark"] .part-card,
html[data-theme="dark"] .part-detail-card,
html[data-theme="dark"] .part-offer-card {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="dark"] .diagnostic-pair > div:first-child,
html[data-theme="dark"] .photo-card img { background-color: var(--workspace-soft); }
html[data-theme="dark"] .cost-overview-row > *,
html[data-theme="dark"] .yard-offer-excluded { background: var(--workspace-soft); }
html[data-theme="dark"] #inspection .photo-card { background: var(--workspace-surface); }
html[data-theme="light"] .photo-card,
html[data-theme="light"] .diagnostic-pair,
html[data-theme="light"] .archive-json,
html[data-theme="light"] .cost-overview-row,
html[data-theme="light"] .yard-offer,
html[data-theme="light"] .parts-total-primary,
html[data-theme="light"] .parts-total-secondary,
html[data-theme="light"] .part-card,
html[data-theme="light"] .part-detail-card,
html[data-theme="light"] .part-offer-card {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="light"] .diagnostic-pair > div:first-child,
html[data-theme="light"] .photo-card img,
html[data-theme="light"] .cost-overview-row > *,
html[data-theme="light"] .yard-offer-excluded { background-color: var(--workspace-soft); }
html[data-theme="light"] #inspection .photo-card { background: var(--workspace-surface); }

@media (max-width: 760px) {
  .dual-status-card .dual-status-grid.dual-status { grid-template-columns: 1fr; gap: 0; }
  .dual-status-card .dual-status-grid.dual-status::before { display: none; }
  .dual-status-card .dual-status-grid.dual-status::after { top: calc(50% - 5px); bottom: auto; left: calc(50% - 25px); width: 50px; height: 2px; transform: rotate(12deg); }
  .dual-status-card .dual-status-grid.dual-status > .dual-status-half { min-height: 56px; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status { background: var(--workspace-line); }
}
@media (max-width: 520px) {
  .lot-card-media > .dual-status { display: grid; grid-template-columns: 1fr; min-height: 0; background: var(--analysis-bg); }
  .lot-card-media > .dual-status::before { display: none; }
  .lot-card-media > .dual-status::after { top: calc(50% - 4px); bottom: auto; left: calc(50% - 24px); width: 48px; height: 1px; transform: rotate(12deg); }
  .lot-card-media > .dual-status > span { min-height: 34px; padding: 5px 9px; }
  .lot-card-media > .dual-status > span:first-child { background: var(--auction-bg); }
  .lot-card-media > .dual-status > span:last-child { background: var(--analysis-bg); }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:first-child { color: var(--auction-ink); background: var(--auction-bg); }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:last-child { color: var(--analysis-ink); background: var(--analysis-bg); }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:first-child { color: var(--auction-ink); background: var(--auction-bg); }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:last-child { color: var(--analysis-ink); background: var(--analysis-bg); }
}

/* Final semantic palette shared by catalog, detail, node and public views. */
html[data-theme="dark"] .dual-status-auction-active { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="dark"] .dual-status-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-analysis-ready { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
html[data-theme="dark"] .dual-status-analysis-processing { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
html[data-theme="dark"] .dual-status-analysis-stale,
html[data-theme="dark"] .dual-status-analysis-needs_review { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="dark"] .dual-status-analysis-error,
html[data-theme="dark"] .dual-status-analysis-blocked { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
html[data-theme="dark"] .dual-status-analysis-not_started { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
html[data-theme="light"] .dual-status-auction-active { --auction-bg: #e8eff3; --auction-ink: #315c70; }
html[data-theme="light"] .dual-status-auction-ended { --auction-bg: #e9ecef; --auction-ink: #4b5963; }
html[data-theme="light"] .dual-status-auction-unconfirmed { --auction-bg: #f7edda; --auction-ink: #76551a; }
html[data-theme="light"] .dual-status-analysis-ready { --analysis-bg: #e4efeb; --analysis-ink: #315d51; }
html[data-theme="light"] .dual-status-analysis-processing { --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="light"] .dual-status-analysis-stale,
html[data-theme="light"] .dual-status-analysis-needs_review { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="light"] .dual-status-analysis-error,
html[data-theme="light"] .dual-status-analysis-blocked { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; }
html[data-theme="light"] .dual-status-analysis-not_started { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; }
html[data-theme="light"] .dual-status:not(.dual-status-grid) { --auction-bg: #e8eff3; --auction-ink: #315c70; --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="light"] .dual-status.dual-status-auction-active { --auction-bg: #e8eff3; --auction-ink: #315c70; }
html[data-theme="light"] .dual-status.dual-status-auction-ended { --auction-bg: #e9ecef; --auction-ink: #4b5963; }
html[data-theme="light"] .dual-status.dual-status-auction-unconfirmed { --auction-bg: #f7edda; --auction-ink: #76551a; }
html[data-theme="light"] .dual-status.dual-status-analysis-ready { --analysis-bg: #e4efeb; --analysis-ink: #315d51; }
html[data-theme="light"] .dual-status.dual-status-analysis-processing { --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="light"] .dual-status.dual-status-analysis-stale,
html[data-theme="light"] .dual-status.dual-status-analysis-needs_review { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="light"] .dual-status.dual-status-analysis-error,
html[data-theme="light"] .dual-status.dual-status-analysis-blocked { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; }
html[data-theme="light"] .dual-status.dual-status-analysis-not_started { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-active),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-active) { --auction-bg: #e8eff3; --auction-ink: #315c70; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-ended),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-ended) { --auction-bg: #e9ecef; --auction-ink: #4b5963; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-auction-unconfirmed),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-unconfirmed) { --auction-bg: #f7edda; --auction-ink: #76551a; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-ready) { --analysis-bg: #e4efeb; --analysis-ink: #315d51; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-processing) { --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-stale),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-needs_review) { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-error),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-blocked) { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-not_started) { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; }
html[data-theme="dark"] .dual-status-half small,
html[data-theme="light"] .dual-status-half small,
html[data-theme="dark"] .dual-status > span,
html[data-theme="light"] .dual-status > span { color: inherit; }
html[data-theme="dark"] .dual-status-half.dual-status-auction { color: var(--auction-ink); background: var(--auction-bg); }
html[data-theme="dark"] .dual-status-half.dual-status-analysis { color: var(--analysis-ink); background: var(--analysis-bg); }
html[data-theme="light"] .dual-status-half.dual-status-auction { color: var(--auction-ink); background: var(--auction-bg); }
html[data-theme="light"] .dual-status-half.dual-status-analysis { color: var(--analysis-ink); background: var(--analysis-bg); }

html[data-theme="dark"] .photo-card, html[data-theme="dark"] .diagnostic-pair,
html[data-theme="dark"] .archive-json, html[data-theme="dark"] .cost-overview-row,
html[data-theme="dark"] .yard-offer, html[data-theme="dark"] .parts-total-primary,
html[data-theme="dark"] .parts-total-secondary, html[data-theme="dark"] .part-card,
html[data-theme="dark"] .part-detail-card, html[data-theme="dark"] .part-offer-card,
html[data-theme="dark"] .decision-strip, html[data-theme="dark"] .analysis-hero,
html[data-theme="dark"] .workspace-progress > a, html[data-theme="dark"] .source-summary-row,
html[data-theme="dark"] .legacy-section, html[data-theme="dark"] .analysis-launch-panel {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="light"] .photo-card, html[data-theme="light"] .diagnostic-pair,
html[data-theme="light"] .archive-json, html[data-theme="light"] .cost-overview-row,
html[data-theme="light"] .yard-offer, html[data-theme="light"] .parts-total-primary,
html[data-theme="light"] .parts-total-secondary, html[data-theme="light"] .part-card,
html[data-theme="light"] .part-detail-card, html[data-theme="light"] .part-offer-card,
html[data-theme="light"] .decision-strip, html[data-theme="light"] .analysis-hero,
html[data-theme="light"] .workspace-progress > a, html[data-theme="light"] .source-summary-row,
html[data-theme="light"] .legacy-section, html[data-theme="light"] .analysis-launch-panel {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="dark"] .diagnostic-pair > div:first-child,
html[data-theme="dark"] .photo-card img,
html[data-theme="dark"] .cost-overview-row > *,
html[data-theme="dark"] .yard-offer-excluded { background-color: var(--workspace-soft); }
html[data-theme="light"] .diagnostic-pair > div:first-child,
html[data-theme="light"] .photo-card img,
html[data-theme="light"] .cost-overview-row > *,
html[data-theme="light"] .yard-offer-excluded { background-color: var(--workspace-soft); }
html[data-theme="dark"] #inspection .photo-card,
html[data-theme="light"] #inspection .photo-card { background: var(--workspace-surface); }

@media (max-width: 760px) {
  .dual-status-card .dual-status-grid.dual-status { grid-template-columns: 1fr; gap: 0; }
  .dual-status-card .dual-status-grid.dual-status::before { display: none; }
  .dual-status-card .dual-status-grid.dual-status::after { top: calc(50% - 5px); bottom: auto; left: calc(50% - 25px); width: 50px; height: 2px; transform: rotate(12deg); }
  .dual-status-card .dual-status-grid.dual-status > .dual-status-half { min-height: 56px; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status { background: var(--workspace-line); }
}
@media (max-width: 520px) {
  .lot-card-media > .dual-status { display: grid; grid-template-columns: 1fr; min-height: 0; background: var(--analysis-bg); }
  .lot-card-media > .dual-status::before { display: none; }
  .lot-card-media > .dual-status::after { top: calc(50% - 4px); bottom: auto; left: calc(50% - 24px); width: 48px; height: 1px; transform: rotate(12deg); }
  .lot-card-media > .dual-status > span { min-height: 34px; padding: 5px 9px; }
  .lot-card-media > .dual-status > span:first-child { background: var(--auction-bg); }
  .lot-card-media > .dual-status > span:last-child { background: var(--analysis-bg); }
}

/* Finish the approved graphite/copper treatment on older operational panels. */
html[data-theme="dark"] .app-sidebar nav a[aria-current="page"],
html[data-theme="dark"] .workspace-tabs a[aria-current="page"],
html[data-theme="dark"] .node-workspace .node-filters a[aria-current="page"] { color: #ffb089; background: #3c2921; border-color: #81533e; }
html[data-theme="dark"] #notifications,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .node-workspace .node-filters a,
html[data-theme="dark"] .node-workspace .node-empty,
html[data-theme="dark"] .node-workspace .node-atlas-result-grid > div,
html[data-theme="dark"] .node-workspace .node-tile,
html[data-theme="dark"] .node-workspace .node-stat-grid > div,
html[data-theme="dark"] .analysis-route-step { color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line); }
html[data-theme="dark"] .notice.success,
html[data-theme="dark"] .analysis-route-active { color: #d3e4dc; background: #263a32; border-color: #567b69; }
html[data-theme="dark"] .notice.error { color: #f0c5c1; background: #482b2a; border-color: #81504c; }
html[data-theme="dark"] .notice.warning,
html[data-theme="dark"] .node-workspace .node-atlas-requirements li,
html[data-theme="dark"] .node-workspace .node-check-list li,
html[data-theme="dark"] .node-workspace .node-warning { color: #f5dfa0; background: #3d3525; border-color: #876d37; }
html[data-theme="dark"] .analysis-state-icon { color: #c4ceca; background: #303837; }
html[data-theme="dark"] .analysis-state-ready .analysis-state-icon { color: #c5ebd0; background: #355d42; }
html[data-theme="dark"] .analysis-state-processing .analysis-state-icon { color: #f5dfa0; background: #493d22; }
html[data-theme="dark"] .analysis-state-error .analysis-state-icon { color: #f0c5c1; background: #482b2a; }
html[data-theme="dark"] .node-workspace .node-filters a[aria-current="page"],
html[data-theme="dark"] .node-workspace .node-open-card { color: #ffb089; background: #3c2921; border-color: #81533e; }
html[data-theme="dark"] .node-workspace .node-filters a span { color: var(--workspace-muted); background: #303737; }
html[data-theme="dark"] .node-workspace .node-status-ready { color: #c5ebd0; background: #23412e; border-color: #467552; }
html[data-theme="dark"] .node-workspace .node-status-review { color: #f5dfa0; background: #493d22; border-color: #876d37; }
html[data-theme="dark"] .node-workspace .node-status-blocked { color: #f0c5c1; background: #482b2a; border-color: #81504c; }
html[data-theme="dark"] .node-workspace .node-status-neutral { color: #c4ceca; background: #303837; border-color: #505c58; }
html[data-theme="dark"] .node-workspace .node-tile-price { color: var(--workspace-ink); background: var(--workspace-soft); border-color: var(--workspace-line); }
html[data-theme="dark"] .node-workspace .node-open-card:hover { background: #493126; }
html[data-theme="dark"] .node-workspace .node-tile-cover { color: #c4ceca; background: #303837; }
html[data-theme="dark"] .analysis-route { background: var(--workspace-line); border-color: var(--workspace-line); }
html[data-theme="dark"] .lot-card-result { color: var(--workspace-ink); background: var(--workspace-soft); border-color: var(--workspace-line); }
html[data-theme="dark"] .lot-card-result.deal-positive,
html[data-theme="dark"] .lot-card-result.deal-unknown,
html[data-theme="dark"] .lot-card-result.deal-negative,
html[data-theme="dark"] .lot-card-result.deal-risk { border-left-color: var(--workspace-accent); }
html[data-theme="dark"] .node-workspace .node-atlas-requirements li { border-left-color: #876d37; }
html[data-theme="light"] #notifications,
html[data-theme="light"] .notice,
html[data-theme="light"] .node-workspace .node-filters a,
html[data-theme="light"] .node-workspace .node-empty,
html[data-theme="light"] .node-workspace .node-atlas-result-grid > div,
html[data-theme="light"] .node-workspace .node-tile,
html[data-theme="light"] .node-workspace .node-stat-grid > div,
html[data-theme="light"] .analysis-route-step { color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line); }
html[data-theme="light"] .notice.success,
html[data-theme="light"] .analysis-route-active { color: #315d51; background: #e4efeb; border-color: #8ab5a7; }
html[data-theme="light"] .notice.error { color: #853f3a; background: #f4e4e2; border-color: #ce8d85; }
html[data-theme="light"] .notice.warning,
html[data-theme="light"] .node-workspace .node-atlas-requirements li,
html[data-theme="light"] .node-workspace .node-check-list li,
html[data-theme="light"] .node-workspace .node-warning { color: #76551a; background: #f7edda; border-color: #d2b66d; }
html[data-theme="light"] .analysis-state-icon { color: #4b5963; background: #e9ecef; }
html[data-theme="light"] .analysis-state-ready .analysis-state-icon { color: #315d51; background: #e4efeb; }
html[data-theme="light"] .analysis-state-processing .analysis-state-icon { color: #76551a; background: #f7edda; }
html[data-theme="light"] .analysis-state-error .analysis-state-icon { color: #853f3a; background: #f4e4e2; }
html[data-theme="light"] .node-workspace .node-filters a[aria-current="page"],
html[data-theme="light"] .node-workspace .node-open-card { color: #783719; background: #f2e4dc; border-color: #d98761; }
html[data-theme="light"] .node-workspace .node-status-ready { color: #315d51; background: #e4efeb; border-color: #8ab5a7; }
html[data-theme="light"] .node-workspace .node-status-review { color: #76551a; background: #f7edda; border-color: #d2b66d; }
html[data-theme="light"] .node-workspace .node-status-blocked { color: #853f3a; background: #f4e4e2; border-color: #ce8d85; }
html[data-theme="light"] .node-workspace .node-status-neutral { color: #4b5963; background: #e9ecef; border-color: #c2cbd1; }
html[data-theme="light"] .node-workspace .node-tile-price { color: var(--workspace-ink); background: var(--workspace-soft); border-color: var(--workspace-line); }
html[data-theme="light"] .analysis-route { background: var(--workspace-line); border-color: var(--workspace-line); }
html[data-theme="light"] .lot-card-result { color: var(--workspace-ink); background: var(--workspace-soft); border-color: var(--workspace-line); }
html[data-theme="light"] .lot-card-result.deal-positive { border-left-color: #527968; }
html[data-theme="light"] .lot-card-result.deal-unknown { border-left-color: #5f7890; }
html[data-theme="light"] .lot-card-result.deal-negative { border-left-color: #a95c3b; }
html[data-theme="light"] .lot-card-result.deal-risk { border-left-color: #aa7924; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) { color-scheme: dark; }
}

/* Theme completion for older surfaces that still carry a green-and-white base. */
html[data-theme="dark"] { --workspace-accent: #d0784c; --refresh-accent: #d0784c; --refresh-accent-soft: #3c2921; }
html[data-theme="light"] {
  color-scheme: light; --ink: #243341; --muted: #60717e; --line: #c0cbd4;
  --accent: #526f86; --soft: #e5ebf0; --paper: #dfe6eb;
  --workspace-bg: #dfe6eb; --workspace-surface: #f1f4f6;
  --workspace-soft: #e5ebf0; --workspace-line: #c0cbd4;
  --workspace-ink: #243341; --workspace-muted: #60717e; --workspace-accent: #526f86;
  --refresh-canvas: #dfe6eb; --refresh-surface: #f1f4f6; --refresh-soft: #e5ebf0;
  --refresh-line: #c0cbd4; --refresh-ink: #243341; --refresh-muted: #60717e;
  --refresh-accent: #526f86; --refresh-accent-soft: #e3eaf0;
}
html[data-theme="dark"] .app-sidebar nav a[aria-current=page],
html[data-theme="dark"] .workspace-tabs a[aria-current=page] { color: #ffb089; background: #3c2921; border-color: #81533e; }
html[data-theme="light"] .app-sidebar,
html[data-theme="light"] .app-sidebar.is-collapsed { color: var(--workspace-ink); background: #e9eef2; border-color: var(--workspace-line); }
html[data-theme="light"] .app-sidebar nav a,
html[data-theme="light"] .app-sidebar nav details summary { color: #425969; }
html[data-theme="light"] .app-sidebar nav a[aria-current=page] { color: #243b4c; background: #dce5eb; }
html[data-theme="light"] .app-sidebar nav a[aria-current=page]::before,
html[data-theme="light"] .app-sidebar nav details[open] > summary::before { color: #314c60; background: #cbd8e1; border-color: #9aabb7; }

html[data-theme="dark"] .decision-summary, html[data-theme="dark"] .market-readiness-blocked,
html[data-theme="dark"] .parts-warning, html[data-theme="dark"] .market-readiness,
html[data-theme="dark"] .analysis-hero, html[data-theme="dark"] .analysis-state-banner,
html[data-theme="dark"] .dual-status-card, html[data-theme="dark"] .decision-strip {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="light"] .decision-summary, html[data-theme="light"] .market-readiness-blocked,
html[data-theme="light"] .parts-warning, html[data-theme="light"] .market-readiness,
html[data-theme="light"] .analysis-hero, html[data-theme="light"] .analysis-state-banner,
html[data-theme="light"] .dual-status-card, html[data-theme="light"] .decision-strip {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme="dark"] .decision-summary .decision-status { color: #f0c5c1; }
html[data-theme="light"] .decision-summary .decision-status { color: #853f3a; }
html[data-theme="dark"] .market-readiness-blocked, html[data-theme="dark"] .parts-warning { border-left-color: #876d37; }
html[data-theme="light"] .market-readiness-blocked, html[data-theme="light"] .parts-warning { border-left-color: #d2b66d; }
html[data-theme="dark"] .parts-warning-muted { color: var(--workspace-muted); border-color: var(--workspace-line); }
html[data-theme="light"] .parts-warning-muted { color: var(--workspace-muted); border-color: var(--workspace-line); }

html[data-theme="dark"] .node-workspace .node-photo-card,
html[data-theme="dark"] .node-workspace .node-photo-inspection,
html[data-theme="dark"] .node-workspace .node-original-url,
html[data-theme="dark"] .node-workspace .node-raw pre,
html[data-theme="dark"] .node-workspace .node-photo-actions .node-select-form,
html[data-theme="dark"] .node-workspace .node-atlas-result-grid > div,
html[data-theme="dark"] .node-workspace .node-stat-grid > div,
html[data-theme="dark"] .node-workspace .node-tile { color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line); }
html[data-theme="dark"] .node-workspace .node-photo-link,
html[data-theme="dark"] .node-workspace .node-tile-cover,
html[data-theme="dark"] .node-workspace .node-photo-inspection li,
html[data-theme="dark"] .node-workspace .node-tile-price,
html[data-theme="dark"] .node-workspace .node-filters a span { color: var(--workspace-muted); background: var(--workspace-soft); border-color: var(--workspace-line); }
html[data-theme="light"] .node-workspace .node-photo-card,
html[data-theme="light"] .node-workspace .node-photo-inspection,
html[data-theme="light"] .node-workspace .node-original-url,
html[data-theme="light"] .node-workspace .node-raw pre,
html[data-theme="light"] .node-workspace .node-photo-actions .node-select-form,
html[data-theme="light"] .node-workspace .node-atlas-result-grid > div,
html[data-theme="light"] .node-workspace .node-stat-grid > div,
html[data-theme="light"] .node-workspace .node-tile { color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line); }
html[data-theme="light"] .node-workspace .node-photo-link,
html[data-theme="light"] .node-workspace .node-tile-cover,
html[data-theme="light"] .node-workspace .node-photo-inspection li,
html[data-theme="light"] .node-workspace .node-tile-price,
html[data-theme="light"] .node-workspace .node-filters a span { color: var(--workspace-muted); background: var(--workspace-soft); border-color: var(--workspace-line); }
html[data-theme="dark"] .node-workspace .node-check-list li,
html[data-theme="dark"] .node-workspace .node-atlas-requirements li,
html[data-theme="dark"] .node-workspace .node-warning { color: #f5dfa0; background: #3d3525; border-color: #876d37; }
html[data-theme="light"] .node-workspace .node-check-list li,
html[data-theme="light"] .node-workspace .node-atlas-requirements li,
html[data-theme="light"] .node-workspace .node-warning { color: #76551a; background: #f7edda; border-color: #d2b66d; }

html[data-theme="dark"] .node-workspace .node-status-auction.node-status-ready,
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-ready,
html[data-theme="dark"] .node-workspace .node-status-ready { color: #c5ebd0; background: #274731; border-color: #467552; }
html[data-theme="dark"] .node-workspace .node-status-auction.node-status-review,
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-review,
html[data-theme="dark"] .node-workspace .node-status-review { color: #f5dfa0; background: #493d22; border-color: #876d37; }
html[data-theme="dark"] .node-workspace .node-status-auction.node-status-blocked,
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-blocked,
html[data-theme="dark"] .node-workspace .node-status-blocked { color: #f0c5c1; background: #482b2a; border-color: #81504c; }
html[data-theme="light"] .node-workspace .node-status-auction.node-status-ready,
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-ready,
html[data-theme="light"] .node-workspace .node-status-ready { color: #315d51; background: #e4efeb; border-color: #8ab5a7; }
html[data-theme="light"] .node-workspace .node-status-auction.node-status-review,
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-review,
html[data-theme="light"] .node-workspace .node-status-review { color: #76551a; background: #f7edda; border-color: #d2b66d; }
html[data-theme="light"] .node-workspace .node-status-auction.node-status-blocked,
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-blocked,
html[data-theme="light"] .node-workspace .node-status-blocked { color: #853f3a; background: #f4e4e2; border-color: #ce8d85; }
html[data-theme="light"] .node-workspace .node-status-neutral { color: #4b5963; background: #e9ecef; border-color: #c2cbd1; }

html[data-theme="dark"] .dual-status-card { border-left-color: var(--workspace-accent); }
html[data-theme="light"] .dual-status-card { border-left-color: var(--workspace-accent); }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-auction-active) { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-auction-active) { --auction-bg: #e8eff3; --auction-ink: #315c70; }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-auction-ended),
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-not_started) { --auction-bg: #303837; --auction-ink: #c4ceca; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-auction-ended),
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-not_started) { --auction-bg: #e9ecef; --auction-ink: #4b5963; }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-auction-unconfirmed) { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-auction-unconfirmed) { --auction-bg: #f7edda; --auction-ink: #76551a; }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-ready) { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-ready) { --analysis-bg: #e4efeb; --analysis-ink: #315d51; }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-processing) { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-processing) { --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-needs_review) { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-needs_review) { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-error) { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-error) { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; }
html[data-theme="dark"] .dual-status-grid:has(> .dual-status-half.is-stale) { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="light"] .dual-status-grid:has(> .dual-status-half.is-stale) { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-active) { --auction-bg: #274731; --auction-ink: #c5ebd0; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-active) { --auction-bg: #e8eff3; --auction-ink: #315c70; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-ended) { --auction-bg: #263b58; --auction-ink: #c7daf8; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-ended) { --auction-bg: #e9ecef; --auction-ink: #4b5963; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-unconfirmed) { --auction-bg: #493d22; --auction-ink: #f5dfa0; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-unconfirmed) { --auction-bg: #f7edda; --auction-ink: #76551a; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-ready) { --analysis-bg: #274731; --analysis-ink: #c5ebd0; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-ready) { --analysis-bg: #e4efeb; --analysis-ink: #315d51; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-processing) { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-processing) { --analysis-bg: #e3edf4; --analysis-ink: #315d78; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-needs_review) { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-needs_review) { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-error) { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-error) { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-stale),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-not_started) { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-stale),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-not_started) { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; }
html[data-theme="dark"] .dual-status-card .dual-status-help { color: #ffb089; border-color: #81533e; }
html[data-theme="light"] .dual-status-card .dual-status-help { color: #783719; border-color: #d98761; }

@media (max-width: 760px) {
  .dual-status-grid.dual-status { position: relative; }
  .dual-status-card .dual-status-grid.dual-status > .dual-status-half { min-height: 44px; padding: 7px 10px; }
  .dual-status-card .dual-status-grid.dual-status .dual-status-mark { width: 26px; height: 26px; }
}

/* Detail status uses one diagonal splice; remove the small legacy corner marks. */
.dual-status-grid.dual-status > .dual-status-half::after { display: none; }
.dual-status-grid.dual-status::before { z-index: 1; }
.dual-status-grid.dual-status::after { z-index: 2; }
.dual-status-grid.dual-status > .dual-status-half { z-index: 3; }
.dual-status-grid.dual-status > .dual-status-half > * { position: relative; z-index: 1; }
html[data-theme="dark"] .dual-status-grid.dual-status::after { background: #899794; }
html[data-theme="light"] .dual-status-grid.dual-status::after { background: #708087; }

/* Keep the two status halves independent and make their splice visibly diagonal. */
.dual-status::after {
  top: 0; bottom: 0; left: 0; width: 100%; height: auto;
  background: #899794; transform: none; clip-path: polygon(52.5% 0, 53.5% 0, 45% 100%, 44% 100%);
}
.dual-status-grid.dual-status::after {
  top: 0; bottom: 0; left: 0; width: 100%; height: auto;
  transform: none; clip-path: polygon(52.5% 0, 53.5% 0, 45% 100%, 44% 100%);
}
.dual-status > span { z-index: 3; }
.dual-status-grid.dual-status > .dual-status-half:first-child { --auction-ink: inherit; color: var(--auction-ink); }
.dual-status-grid.dual-status > .dual-status-half:last-child { --analysis-ink: inherit; color: var(--analysis-ink); }
.dual-status-grid.dual-status > .dual-status-half:first-child .dual-status-mark { color: var(--auction-ink); }
.dual-status-grid.dual-status > .dual-status-half:last-child .dual-status-mark { color: var(--analysis-ink); }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half:first-child,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half:last-child { background: transparent; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half:first-child,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half:last-child { background: transparent; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-stale),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-needs_review),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-stale),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-needs_review) { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-stale),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-needs_review),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-stale),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-needs_review) { --analysis-bg: #f7edda; --analysis-ink: #76551a; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-not_started),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-not_started) { --analysis-bg: #303837; --analysis-ink: #c4ceca; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-not_started),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.dual-status-analysis-not_started) { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-active { --auction-bg: #263b58; --auction-ink: #c7daf8; color: #c7daf8; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-auction-active { --auction-bg: #e8eff3; --auction-ink: #315c70; color: #315c70; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-ended { --auction-bg: #263b58; --auction-ink: #c7daf8; color: #c7daf8; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-auction-ended { --auction-bg: #e9ecef; --auction-ink: #4b5963; color: #4b5963; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { --auction-bg: #493d22; --auction-ink: #f5dfa0; color: #f5dfa0; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { --auction-bg: #f7edda; --auction-ink: #76551a; color: #76551a; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-ready { --analysis-bg: #274731; --analysis-ink: #c5ebd0; color: #c5ebd0; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-ready { --analysis-bg: #e4efeb; --analysis-ink: #315d51; color: #315d51; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-processing { --analysis-bg: #203b43; --analysis-ink: #b8e9f2; color: #b8e9f2; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-processing { --analysis-bg: #e3edf4; --analysis-ink: #315d78; color: #315d78; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-stale,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-needs_review { --analysis-bg: #493d22; --analysis-ink: #f5dfa0; color: #f5dfa0; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-stale,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-needs_review { --analysis-bg: #f7edda; --analysis-ink: #76551a; color: #76551a; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-error,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-blocked { --analysis-bg: #482b2a; --analysis-ink: #f0c5c1; color: #f0c5c1; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-error,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-blocked { --analysis-bg: #f4e4e2; --analysis-ink: #853f3a; color: #853f3a; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-not_started { --analysis-bg: #303837; --analysis-ink: #c4ceca; color: #c4ceca; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-not_started { --analysis-bg: #e9ecef; --analysis-ink: #4b5963; color: #4b5963; }
html[data-theme="dark"] .dual-status-grid.dual-status::after { background: #899794; }
html[data-theme="light"] .dual-status-grid.dual-status::after { background: #708087; }
@media (max-width: 760px) {
  .dual-status-card .dual-status-grid.dual-status { grid-template-columns: 1fr; gap: 0; }
  .dual-status-card .dual-status-grid.dual-status::before { display: none; }
  .dual-status-card .dual-status-grid.dual-status::after {
    top: calc(50% - 1px); bottom: auto; left: calc(50% - 24px); width: 48px; height: 2px;
    background: #899794; clip-path: none; transform: rotate(5deg);
  }
  .dual-status-card .dual-status-grid.dual-status > .dual-status-half { min-height: 50px; }
}
@media (max-width: 520px) {
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:first-child { color: var(--auction-ink); background: var(--auction-bg); }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:last-child { color: var(--analysis-ink); background: var(--analysis-bg); }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:first-child { color: var(--auction-ink); background: var(--auction-bg); }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half:last-child { color: var(--analysis-ink); background: var(--analysis-bg); }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-auction-active,
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-auction-ended { color: #c7daf8; background: #263b58; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-auction-active { color: #315c70; background: #e8eff3; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-auction-ended { color: #4b5963; background: #e9ecef; }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { color: #f5dfa0; background: #493d22; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { color: #76551a; background: #f7edda; }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-ready { color: #c5ebd0; background: #274731; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-ready { color: #315d51; background: #e4efeb; }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-processing { color: #b8e9f2; background: #203b43; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-processing { color: #315d78; background: #e3edf4; }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-stale,
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-needs_review { color: #f5dfa0; background: #493d22; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-stale,
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-needs_review { color: #76551a; background: #f7edda; }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-error,
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-blocked { color: #f0c5c1; background: #482b2a; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-error,
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-blocked { color: #853f3a; background: #f4e4e2; }
  html[data-theme="dark"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-not_started { color: #c4ceca; background: #303837; }
  html[data-theme="light"] .dual-status-card .dual-status-grid.dual-status > .dual-status-half.is-not_started { color: #4b5963; background: #e9ecef; }
  .lot-card-media > .dual-status::after {
    top: calc(50% - 1px); bottom: auto; left: calc(50% - 24px); width: 48px; height: 2px;
    clip-path: none; transform: rotate(5deg);
  }
}

/* Keep source-card status halves aligned with the auction / analysis pair. */
.node-workspace .node-status-pair {
  position: relative; isolation: isolate; gap: 1px; background: var(--workspace-line);
  border-color: var(--workspace-line); border-radius: 5px;
}
.node-workspace .node-status-half { border: 0; }
.node-workspace .node-status-half + .node-status-half::before { z-index: 0; border-color: var(--workspace-line); }
.node-workspace .node-status-label { color: inherit; opacity: .76; }
html[data-theme="dark"] .node-workspace .node-status-auction.node-status-ready { color: #c7daf8; background: #263b58; }
html[data-theme="light"] .node-workspace .node-status-auction.node-status-ready { color: #315c70; background: #e8eff3; }
html[data-theme="dark"] .node-workspace .node-status-auction.node-status-review,
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-review { color: #f5dfa0; background: #493d22; }
html[data-theme="light"] .node-workspace .node-status-auction.node-status-review,
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-review { color: #76551a; background: #f7edda; }
html[data-theme="dark"] .node-workspace .node-status-auction.node-status-blocked,
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-blocked { color: #f0c5c1; background: #482b2a; }
html[data-theme="light"] .node-workspace .node-status-auction.node-status-blocked,
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-blocked { color: #853f3a; background: #f4e4e2; }
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-neutral { color: #c4ceca; background: #303837; }
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-neutral { color: #4b5963; background: #e9ecef; }
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-processing { color: #b8e9f2; background: #203b43; }
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-processing { color: #315d78; background: #e3edf4; }
html[data-theme="dark"] .node-workspace .node-status-analysis.node-status-ready { color: #c5ebd0; background: #274731; }
html[data-theme="light"] .node-workspace .node-status-analysis.node-status-ready { color: #315d51; background: #e4efeb; }

/* Final shared palette overrides for components that still carry legacy colors. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F4F8F8; --muted: #A7B7BC; --line: #39484D; --paper: #101719;
  --accent: #D0784C; --soft: #202B2F; --warn: #F6C76A;
  --workspace-bg: #101719; --workspace-surface: #172126; --workspace-soft: #202B2F;
  --workspace-line: #39484D; --workspace-ink: #F4F8F8; --workspace-muted: #A7B7BC; --workspace-accent: #D0784C;
  --refresh-canvas: #101719; --refresh-surface: #172126; --refresh-soft: #202B2F;
  --refresh-line: #39484D; --refresh-ink: #F4F8F8; --refresh-muted: #A7B7BC;
  --refresh-accent: #D0784C; --refresh-accent-soft: #3A2922;
  --status-success: #86EFAC; --status-warning: #F6C76A;
  --status-danger: #FF8A8A; --status-info: #93C5FD;
}
html[data-theme="light"] {
  color-scheme: light;
  --ink: #172B3A; --muted: #607380; --line: #CBD7DD; --paper: #F3F6F7;
  --accent: #42667C; --soft: #E8EFF2; --warn: #92400E;
  --workspace-bg: #F3F6F7; --workspace-surface: #FFFFFF; --workspace-soft: #E8EFF2;
  --workspace-line: #CBD7DD; --workspace-ink: #172B3A; --workspace-muted: #607380; --workspace-accent: #42667C;
  --refresh-canvas: #F3F6F7; --refresh-surface: #FFFFFF; --refresh-soft: #E8EFF2;
  --refresh-line: #CBD7DD; --refresh-ink: #172B3A; --refresh-muted: #607380;
  --refresh-accent: #42667C; --refresh-accent-soft: #DFE9EE;
  --status-success: #166534; --status-warning: #92400E;
  --status-danger: #991B1B; --status-info: #1D4ED8;
}

html[data-theme] body { background: var(--workspace-bg); color: var(--workspace-ink); }
html[data-theme] a { color: var(--workspace-accent); }
html[data-theme] .app-topbar, html[data-theme] .app-sidebar, html[data-theme] .app-sidebar.is-collapsed {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme] .app-sidebar nav a, html[data-theme] .app-sidebar nav details summary { color: var(--workspace-ink); }
html[data-theme] .app-sidebar nav a[aria-current="page"], html[data-theme] .workspace-tabs a[aria-current="page"],
html[data-theme] .node-workspace .node-filters a[aria-current="page"] {
  color: var(--workspace-accent); background: var(--refresh-accent-soft); border-color: var(--workspace-accent);
}
html[data-theme] .app-topbar button, html[data-theme] .topbar-tools select, html[data-theme] .topbar-queue-link,
html[data-theme] input, html[data-theme] select, html[data-theme] textarea, html[data-theme] .button:not(.primary) {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme] .button.primary, html[data-theme] button.primary {
  color: #fff; background: var(--workspace-accent); border-color: var(--workspace-accent);
}
html[data-theme] .button.primary:hover, html[data-theme] button.primary:hover { filter: brightness(.9); }
html[data-theme] .catalog-hero, html[data-theme] .catalog-filters, html[data-theme] .catalog-map-panel,
html[data-theme] .source-summary-row, html[data-theme] .lot-card, html[data-theme] .recent-card,
html[data-theme] .vehicle-overview, html[data-theme] .dual-status-card, html[data-theme] .workspace-finance,
html[data-theme] .workspace-evidence, html[data-theme] .workspace-next, html[data-theme] .workspace-tabs,
html[data-theme] .panel, html[data-theme] .queue-row, html[data-theme] .analysis-state-banner,
html[data-theme] .table-wrap, html[data-theme] table, html[data-theme] .node-tile, html[data-theme] .node-photo-card,
html[data-theme] .node-photo-inspection, html[data-theme] .node-original-url, html[data-theme] .node-open-card,
html[data-theme] .node-stat-grid > div, html[data-theme] .node-atlas-result-grid > div {
  color: var(--workspace-ink); background: var(--workspace-surface); border-color: var(--workspace-line);
}
html[data-theme] .lot-card-prices, html[data-theme] .finance-grid > div,
html[data-theme] .decision-strip-stats > div, html[data-theme] .node-tile-price,
html[data-theme] .queue-mini-status, html[data-theme] .queue-summary-item {
  color: var(--workspace-ink); background: var(--workspace-soft); border-color: var(--workspace-line);
}
html[data-theme] .lot-card-media, html[data-theme] .lot-card-placeholder, html[data-theme] .node-tile-cover,
html[data-theme] .node-media-fallback, html[data-theme] .node-photo-placeholder {
  color: var(--workspace-muted); background: var(--workspace-soft);
}
html[data-theme] .catalog-hero { border-left-color: var(--workspace-accent); }
html[data-theme] .topbar-queue-link, html[data-theme] .queue-kind,
html[data-theme] .workspace-progress a, html[data-theme] .recent-card-actions a { color: var(--workspace-accent); }
html[data-theme] .queue-row-atlas .queue-kind { color: var(--status-info); border-color: var(--status-info); }
html[data-theme] .queue-row-atlas .queue-progress-track span { background: var(--status-info); }
html[data-theme] .queue-mini-auction-upcoming { border-left-color: var(--status-info); }
html[data-theme] .queue-mini-auction-review, html[data-theme] .queue-mini-auction-unknown,
html[data-theme] .queue-mini-analysis-review { border-left-color: var(--status-warning); }
html[data-theme] .queue-mini-auction-unavailable, html[data-theme] .queue-mini-auction-withdrawn,
html[data-theme] .queue-mini-analysis-error { border-left-color: var(--status-danger); }
html[data-theme] .queue-mini-auction-available, html[data-theme] .queue-mini-analysis-ready { border-left-color: var(--status-success); }
html[data-theme] .dual-status:not(.dual-status-grid) {
  --auction-bg: #273B45; --auction-ink: #D6E5EC; --analysis-bg: #26363D; --analysis-ink: #D2E0E5;
  border-color: var(--workspace-line);
}
html[data-theme="light"] .dual-status:not(.dual-status-grid) {
  --auction-bg: #DFE9EE; --auction-ink: #294B60; --analysis-bg: #E5ECEF; --analysis-ink: #294B60;
}
html[data-theme="dark"] .dual-status:not(.dual-status-grid) {
  --auction-bg: #263B45; --auction-ink: #D6E5EC; --analysis-bg: #283A40; --analysis-ink: #D2E0E5;
}
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-active),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-ended),
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-unconfirmed) {
  --auction-bg: #263B45; --auction-ink: #D6E5EC;
}
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-active),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-ended),
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-auction-unconfirmed) {
  --auction-bg: #DFE9EE; --auction-ink: #294B60;
}
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-ready) { --analysis-bg: #263C33; --analysis-ink: #C7E6D2; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-ready) { --analysis-bg: #E1EEE7; --analysis-ink: #275943; }
html[data-theme="dark"] .dual-status-grid.dual-status:has(> .dual-status-half.is-processing) { --analysis-bg: #263B45; --analysis-ink: #D6E5EC; }
html[data-theme="light"] .dual-status-grid.dual-status:has(> .dual-status-half.is-processing) { --analysis-bg: #E3EDF2; --analysis-ink: #294B60; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-active,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-ended { color: #D6E5EC; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-auction-active,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-auction-ended { color: #294B60; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { --auction-bg: #493D28; --auction-ink: #F6D68C; color: #F6D68C; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-auction-unconfirmed { --auction-bg: #F9EFD7; --auction-ink: #704D12; color: #704D12; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-ready { color: #C7E6D2; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-ready { color: #275943; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-processing { color: #D6E5EC; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-processing { color: #294B60; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-stale,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-needs_review { --analysis-bg: #493D28; --analysis-ink: #F6D68C; color: #F6D68C; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-stale,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-needs_review { --analysis-bg: #F9EFD7; --analysis-ink: #704D12; color: #704D12; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-error,
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-blocked { --analysis-bg: #482B2B; --analysis-ink: #FFC1BD; color: #FFC1BD; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-error,
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-blocked { --analysis-bg: #F8E4E2; --analysis-ink: #842F2A; color: #842F2A; }
html[data-theme="dark"] .dual-status-grid.dual-status > .dual-status-half.is-not_started { --analysis-bg: #293438; --analysis-ink: #C2CED1; color: #C2CED1; }
html[data-theme="light"] .dual-status-grid.dual-status > .dual-status-half.is-not_started { --analysis-bg: #E9EFF1; --analysis-ink: #53666F; color: #53666F; }
html[data-theme] .dual-status-grid.dual-status > .dual-status-half { background: transparent; }
html[data-theme] .dual-status-grid.dual-status::after { background: var(--workspace-muted); }
html[data-theme] .node-status-pair { border-color: var(--workspace-line); }
html[data-theme] .dual-status-card { border-left-color: var(--workspace-accent); }
html[data-theme] :focus-visible { outline-color: var(--status-info); }
html[data-theme="dark"] .button.primary, html[data-theme="dark"] button.primary { color: #101719; }
html[data-theme="dark"] .dual-status-queue { min-height: 54px; border-radius: 5px; }
.dual-status-queue > span { align-content: center; gap: 3px; padding: 7px 10px; font-size: 11px; }
.dual-status-queue > span b { font-size: 9px; }
.dual-status-queue .queue-mini-auction-upcoming, .dual-status-queue .queue-mini-auction-unknown,
.dual-status-queue .queue-mini-auction-not-applicable { --auction-bg: #DFE9EE; --auction-ink: #294B60; color: #294B60; }
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-upcoming,
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-unknown,
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-not-applicable { --auction-bg: #263B45; --auction-ink: #D6E5EC; color: #D6E5EC; }
.dual-status-queue .queue-mini-auction-review, .dual-status-queue .queue-mini-auction-blocked { --auction-bg: #F9EFD7; --auction-ink: #704D12; color: #704D12; }
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-review,
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-blocked { --auction-bg: #493D28; --auction-ink: #F6D68C; color: #F6D68C; }
.dual-status-queue .queue-mini-auction-unavailable, .dual-status-queue .queue-mini-auction-withdrawn { --auction-bg: #F8E4E2; --auction-ink: #842F2A; color: #842F2A; }
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-unavailable,
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-withdrawn { --auction-bg: #482B2B; --auction-ink: #FFC1BD; color: #FFC1BD; }
.dual-status-queue .queue-mini-auction-available { --auction-bg: #E1EEE7; --auction-ink: #275943; color: #275943; }
html[data-theme="dark"] .dual-status-queue .queue-mini-auction-available { --auction-bg: #263C33; --auction-ink: #C7E6D2; color: #C7E6D2; }
.dual-status-queue .queue-mini-analysis-ready { --analysis-bg: #E1EEE7; --analysis-ink: #275943; color: #275943; }
html[data-theme="dark"] .dual-status-queue .queue-mini-analysis-ready { --analysis-bg: #263C33; --analysis-ink: #C7E6D2; color: #C7E6D2; }
.dual-status-queue .queue-mini-analysis-processing { --analysis-bg: #E3EDF2; --analysis-ink: #294B60; color: #294B60; }
html[data-theme="dark"] .dual-status-queue .queue-mini-analysis-processing { --analysis-bg: #263B45; --analysis-ink: #D6E5EC; color: #D6E5EC; }
.dual-status-queue .queue-mini-analysis-review, .dual-status-queue .queue-mini-analysis-error { --analysis-bg: #F9EFD7; --analysis-ink: #704D12; color: #704D12; }
html[data-theme="dark"] .dual-status-queue .queue-mini-analysis-review { --analysis-bg: #493D28; --analysis-ink: #F6D68C; color: #F6D68C; }
html[data-theme="dark"] .dual-status-queue .queue-mini-analysis-error { --analysis-bg: #482B2B; --analysis-ink: #FFC1BD; color: #FFC1BD; }
.dual-status-queue .queue-mini-analysis-idle { --analysis-bg: #E9EFF1; --analysis-ink: #53666F; color: #53666F; }
html[data-theme="dark"] .dual-status-queue .queue-mini-analysis-idle { --analysis-bg: #293438; --analysis-ink: #C2CED1; color: #C2CED1; }
@media (max-width: 760px) {
  .node-workspace .node-status-pair { grid-template-columns: 1fr; }
  .node-workspace .node-status-half + .node-status-half::before { top: -6px; right: 12px; bottom: auto; left: 12px; width: auto; height: 1px; transform: none; }
}
