/* Shared application UI. British Racing Green identifies navigation and actions;
   colour in charts and status badges continues to encode data. */
:root {
  --brand: #0b3d2e;
  --bg: #f3f4f5;
  --surface: #fff;
  --surface-sunken: #f7f8f9;
  --line: #dde2e0;
  --line-soft: #edf0ee;
  --text: #222b27;
  --muted: #5f6b65;
  --dim: #65726b;
  --sidebar-width: 212px;
  --font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: var(--font-ui);
}

html { min-width: 0; }
body { font-size: 14px; background: var(--bg); }
a { color: var(--brand); }
button, select, input, summary { accent-color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: default; }

/* The project and its actual destinations are the entire application shell. */
.sidebar { width: var(--sidebar-width); padding: 28px 16px; background: var(--brand); }
.brand { height: auto; padding: 0 12px 26px; }
.brand-copy strong { font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
.brand-copy small { margin-top: 6px; font-size: 12px; color: #c2d4ca; }
.primary-nav { gap: 5px; margin-top: 4px; }
.primary-nav a { min-height: 42px; height: auto; padding: 10px 12px; border: 0; border-radius: 5px; color: #dce7e1; font-size: 13px; font-weight: 500; }
.primary-nav a:hover { color: #fff; background: #21533f; }
.primary-nav a.active { background: #dce9e0; color: var(--brand); font-weight: 600; }
.primary-nav a:focus-visible { outline-color: #dce9e0; }
.main-content { min-width: 0; margin-left: var(--sidebar-width); padding: 28px 32px 48px; }

/* Compact headings leave the first viewport for data. */
.page-header { gap: 24px; align-items: center; padding: 0; border: 0; }
.page-header h1 { font-size: 27px; font-weight: 600; line-height: 1.25; letter-spacing: -.6px; color: var(--text); }
.lede { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
.eyebrow { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.project-meta { gap: 24px; }
.project-meta div { min-width: 0; }
.project-meta dt { margin-bottom: 3px; font-size: 11px; font-weight: 400; }
.project-meta dd { font-family: var(--font-ui); font-size: 12px; }
.headline-metrics { gap: 28px; }
.headline-metrics span, .version-kpis span { margin-bottom: 4px; font-size: 12px; }
.headline-metrics strong { font-size: 24px; font-weight: 600; }
.headline-metrics strong small { font-size: 12px; }

.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; background: transparent; border: 0; box-shadow: none; }
.metric, .metric:first-child { padding: 17px 20px; min-height: 112px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.metric:last-child { border-right: 1px solid var(--line); }
.metric > span { min-height: 0; font-size: 12px; font-weight: 500; }
.metric strong { margin-top: 10px; font-size: 30px; font-weight: 600; letter-spacing: -.5px; line-height: 1.1; }
.metric small { display: block; min-height: 0; margin-top: 6px; font-size: 11px; white-space: normal; }
.visual-grid { gap: 20px; }
.panel { padding: 20px; border-radius: 7px; box-shadow: none; }
.panel-header { align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.panel-header h2, .section-heading h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.panel-context, .section-heading > span { font-size: 11px; }
.stacked-bar { margin: 22px 0; height: 24px; }
.legend-grid { gap: 12px; }
.legend-grid strong { font-size: 17px; }
.bar-list { margin-top: 20px; gap: 20px; }
.track { background: var(--line-soft); }
.section-heading { margin: 28px 0 12px; }
.section-heading + .table-shell { margin-top: 0; }

/* Filters and data grids. */
.filter-bar { margin-top: 20px; gap: 12px; flex-wrap: wrap; }
.filter-bar label { flex: 0 1 220px; min-width: 160px; padding: 8px 12px; border-radius: 5px; }
.filter-bar label span { font-size: 11px; color: var(--muted); }
.filter-bar select { padding-block: 4px; }
.result-summary { min-width: 0; }
.result-summary > strong { font-size: 26px; }
.table-shell { margin-top: 20px; border-radius: 7px; box-shadow: none; }
.insights-table-shell { max-height: calc(100vh - 184px); }
.data-table { font-size: 12px; }
.data-table th { font-size: 11px; height: 40px; padding: 10px 12px; letter-spacing: 0; }
.data-table td { padding: 11px 12px; }
.data-table td > small { font-size: 11px; }
.data-table tbody tr:nth-child(even) { background: #fafbfa; }
.data-table tbody tr:hover td { background: #edf4f0; }
.severity, .status-pill, .change-status { font-size: 11px; min-height: 22px; padding: 2px 7px; border-radius: 4px; }
.version-kpis { min-width: 0; grid-template-columns: repeat(4, minmax(80px, 1fr)); box-shadow: none; border-radius: 6px; }
.version-kpis div { padding: 11px 16px; }
.version-kpis strong { font-size: 24px; }
.version-table { min-width: 960px; }
.insights-table { min-width: 1100px; }
.area-bars { gap: 14px; }
.area-label small, .area-value small { font-size: 11px; }
.floor-bars { grid-template-columns: 1fr; }
.floor-bars .area-bar-row { grid-template-columns: 60px minmax(60px, 1fr) 80px; }

.usage-overview { margin-top: 24px; }
.usage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; }
.usage-card { padding: 16px; }
.usage-card-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
.usage-card-heading > span { font-size: 12px; }
.usage-card-heading strong { font-size: 23px; font-weight: 600; }
.usage-card-heading strong small { font-size: 11px; }
.usage-card > small { display: block; margin-top: 9px; font-size: 11px; }
.usage-card.is-empty strong, .usage-card.is-empty > small { color: var(--muted); }
.data-notes { margin-top: 14px; color: var(--muted); font-size: 12px; }
.data-notes summary { width: fit-content; cursor: pointer; color: var(--brand); }
.data-notes p { max-width: 760px; margin: 8px 0 0; line-height: 1.6; }
.model-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 0 20px 18px; }
.model-footer > a { flex-shrink: 0; font-size: 12px; }

/* Model filters keep their data context next to the scene. */
.room-main { max-width: none; }
.room-header { align-items: center; }
.room-header h1 { margin: 0; }
.room-back { margin: 0; font-size: 13px; }
.room-layout { grid-template-columns: 240px minmax(0, 1fr); min-height: 0; margin-top: 24px; border-radius: 7px; background: var(--surface); }
.room-panel { height: auto; max-height: none; min-height: 0; overflow: visible; padding: 20px; background: var(--surface); }
.room-count { display: grid; grid-template-columns: 1fr 1fr; align-items: baseline; column-gap: 12px; border: 0; margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.room-count strong { font-size: 25px; font-weight: 600; }
.room-count span { font-size: 11px; margin: 4px 0 0; }
.room-count strong:first-child { grid-column: 1; grid-row: 1; }
.room-count span:nth-child(2) { grid-column: 1; grid-row: 2; }
.room-count strong:not(:first-child) { grid-column: 2; grid-row: 1; font-size: 21px; margin: 0; }
.room-count span:last-child { grid-column: 2; grid-row: 2; }
.room-panel label { margin-top: 14px; font-size: 12px; font-weight: 500; }
.room-panel label small { font-size: 10px; }
.room-panel select, .room-panel input[type=search] { padding: 9px 10px; font-size: 12px; color: var(--text); border-radius: 4px; }
.room-clear { margin-top: 16px; font-size: 12px; padding: 9px; border-radius: 4px; }
.room-detail { margin-top: 20px; padding-top: 16px; }
.room-detail > strong { font-size: 17px; }
.room-detail p:not(.eyebrow), .room-detail dd { font-size: 12px; }
.room-detail dt { font-size: 11px; text-transform: none; letter-spacing: 0; }
.room-viewport { height: clamp(380px, 55vh, 610px); min-height: 0; background: var(--surface-sunken); }
.room-controls { box-shadow: none; border-radius: 4px; }
.room-controls button { min-width: 36px; height: 34px; }
.room-hint { font-size: 11px; }
.room-legend { gap: 10px 16px; }
.room-legend span { font-size: 11px; }
.room-chart { padding: 20px; }
.room-chart h3 { color: var(--text); font-size: 13px; }
.room-chart-row { padding: 5px 2px; }
.room-chart-name, .room-chart-row strong { font-size: 11px; }

/* Lifecycle is a simulation, so its single demo label remains visible. */
.lc-main { max-width: none; }
.lc-notice { margin-top: 8px; padding: 0; font-size: 12px; }
.lc-kpis { gap: 14px; margin: 22px 0; }
.lc-kpis article, .lc-kpis article:first-child { min-width: 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.lc-kpis span, .lc-kpis small { font-size: 11px; }
.lc-kpis strong { font-size: 26px; font-weight: 600; letter-spacing: -.4px; margin: 10px 0 6px; }
.lc-kpis strong.lc-kpi-small { padding: 0; font-size: 20px; line-height: 1.7; }
.lc-cockpit { border-radius: 7px; }
.lc-toolbar { padding: 18px 20px; gap: 18px; }
.lc-toolbar h2, .lc-cost-heading h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.lc-segment { flex-shrink: 0; }
.lc-segment button { padding: 8px 12px; box-shadow: none; }
.lc-controls { padding: 11px 20px; font-size: 11px; letter-spacing: 0; background: var(--surface-sunken); }
.lc-workspace { grid-template-columns: minmax(0, 1fr) 230px; }
.lc-detail { padding: 20px; background: var(--surface-sunken); }
.lc-detail h3 { font-size: 20px; font-weight: 600; letter-spacing: -.2px; }
.lc-detail p:not(.eyebrow), .lc-detail dd { color: var(--text); font-size: 12px; line-height: 1.6; }
.lc-detail dt { font-size: 11px; text-transform: none; letter-spacing: 0; }
.lc-status { font-size: 11px; }
.lc-scrubber { padding: 13px 20px; }
.lc-scrubber label { font-size: 11px; }
.lc-chart-key { gap: 18px; font-size: 11px; flex-wrap: wrap; }
.lc-cost-panel { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.lc-cost-heading { gap: 18px; }
.lc-cost-heading small { font-size: 11px; }
.lc-cost-columns { height: 100px; }
.lc-cost-axis { font-size: 11px; }
.lc-ebkp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 4px; }
.lc-ebkp-grid > div { padding: 12px; }
.lc-ebkp-grid span { font-size: 11px; white-space: normal; }
.lc-ebkp-grid strong { display: block; margin-top: 4px; font-size: 15px; }
.lc-ebkp-grid small { font-size: 11px; }
.lc-owner { margin-top: 22px; padding: 20px; background: var(--surface); border-color: var(--line); border-radius: 7px; }
.lc-owner .eyebrow { font-size: 13px; color: var(--text); font-weight: 600; }
.lc-owner span, .lc-owner small { font-size: 11px; }
.lc-owner strong { font-size: 21px; }
.error-panel { border-radius: 7px; box-shadow: none; padding: 24px; }
.error-panel h1 { font-size: 24px; }

@media (min-width: 1800px) {
  .metric-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --sidebar-width: 184px; }
  .sidebar { padding-inline: 12px; }
  .main-content { padding: 24px; }
  .page-header { flex-wrap: wrap; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visual-grid { grid-template-columns: 1fr; }
  .headline-metrics { gap: 24px; }
  .lc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-workspace { grid-template-columns: minmax(0, 1fr) 210px; }
  .lc-toolbar { flex-wrap: wrap; }
  .room-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .room-panel { display: block; }
  .room-count { grid-template-columns: 1fr; }
  .room-count strong:first-child, .room-count span:nth-child(2), .room-count strong:not(:first-child), .room-count span:last-child { grid-column: auto; grid-row: auto; }
  .room-count strong:not(:first-child) { margin-top: 12px; }
  .room-analytics { grid-template-columns: 1fr; }
  .room-chart:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .usage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lc-owner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 18px 16px 10px; }
  .brand { padding: 0; }
  .brand-copy { flex-direction: row; gap: 12px; align-items: baseline; }
  .brand-copy small { margin: 0; }
  .primary-nav { flex-direction: row; margin-top: 16px; overflow-x: auto; }
  .primary-nav a { flex-shrink: 0; min-height: 40px; }
  .main-content { margin-left: 0; padding: 24px 16px 40px; overflow: visible; }
  .page-header h1 { font-size: 24px; }
  .project-meta { flex-wrap: wrap; gap: 20px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visual-grid { grid-template-columns: 1fr; }
  .headline-metrics { flex-wrap: wrap; gap: 16px; }
  .headline-metrics span { font-size: 11px; }
  .headline-metrics strong { font-size: 21px; }
  .version-kpis { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .version-kpis div { padding: 10px; }
  .version-kpis span { font-size: 11px; }
  .filter-bar label { flex: 1 1 160px; }
  .insights-table-shell { max-height: 70vh; }
  .room-layout { grid-template-columns: 1fr; }
  .room-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .room-count { grid-template-columns: 1fr 1fr; }
  .room-count strong:first-child { grid-column: 1; grid-row: 1; }
  .room-count span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .room-count strong:not(:first-child) { grid-column: 2; grid-row: 1; margin: 0; }
  .room-count span:last-child { grid-column: 2; grid-row: 2; }
  .room-viewport { height: 390px; }
  .room-hint { max-width: 190px; }
  .usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-footer { flex-direction: column; gap: 12px; }
  .lc-controls { align-items: flex-start; flex-direction: column; gap: 10px; }
  .lc-workspace { grid-template-columns: 1fr; }
  .lc-detail { border-left: 0; border-top: 1px solid var(--line); }
  .lc-detail dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .lc-detail dl div { margin: 0; }
  .lc-scrubber { flex-wrap: wrap; gap: 10px; }
  .lc-scrubber input { order: 1; flex-basis: 100%; min-height: 20px; }
  .lc-chart-key span:last-child { margin-left: 0; }
  .lc-cost-heading { align-items: flex-start; flex-direction: column; }
  .lc-cost-heading > div:last-child { text-align: left; }
  .lc-ebkp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .lc-kpis { grid-template-columns: 1fr; }
  .legend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lc-owner { grid-template-columns: 1fr; }
  .area-bar-row { grid-template-columns: 86px minmax(24px, 1fr) 66px; gap: 8px; }
  .lc-segment { flex-wrap: wrap; }
}

/* Sub-navigation inside a section (Insights: Prüfungen | Raumtabelle). */
.subnav { display: flex; gap: 4px; margin-top: 10px; }
.subnav a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; background: var(--surface); }
.subnav a:hover { color: var(--brand); border-color: var(--brand); }
.subnav a.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Search and actions inside the filter bar. */
.filter-bar .filter-search { flex: 1 1 260px; }
.filter-bar input[type=search] { width: 100%; padding: 4px 0; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); outline: 0; }
.filter-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 12px; }
.filter-actions button { padding: 9px 14px; border: 1px solid var(--brand); border-radius: 5px; background: var(--brand); color: #fff; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.filter-actions a { color: var(--brand); }

/* Data grid rows open the attribute drawer; the 3D column links into the model. */
.row-clickable { cursor: pointer; }
.row-clickable.is-active td { background: #e3efe8 !important; }
.row-actions { width: 48px; text-align: right; white-space: nowrap; }
.row-link { display: inline-block; padding: 3px 8px; border: 1px solid var(--brand); border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: .2px; color: var(--brand); text-decoration: none; }
.row-link:hover { background: var(--brand); color: #fff; }
.room-table { min-width: 1180px; }
.room-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.room-table .confidence { margin-left: 6px; font-size: 11px; color: var(--muted); }

/* QA colouring follows one legend on the room table and in the overview. */
.qa-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; font-size: 12px; }
.qa-legend-title { color: var(--muted); }
.qa-legend small { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.qa-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid transparent; border-radius: 4px; font-size: 11px; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap; }
.qa-chip b { font-weight: 600; }
.qa-chip.active { border-color: var(--text); }
.qa-empty { background: #fbe8a6; }
.qa-wrong { background: #f3c1bb; }
.qa-notfound { background: #c7d8ea; }
.qa-cell.qa-empty strong { color: #6b4e00; }
.qa-cell.qa-notfound strong { color: #1f4a7a; }
.qa-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.qa-ok { font-size: 11px; color: var(--muted); }

/* Pagination under data grids. */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.pager nav { display: flex; gap: 4px; }
.pager nav a, .pager nav span { min-width: 30px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; text-align: center; text-decoration: none; color: var(--text); background: var(--surface); }
.pager nav span { border-color: transparent; background: transparent; }
.pager nav a.active { color: #fff; background: var(--brand); border-color: var(--brand); }

/* Attribute drawer: fixed panel on the right, like a property inspector. */
.detail-drawer { position: fixed; top: 0; right: 0; z-index: 30; width: 360px; max-width: 100vw; height: 100vh; overflow-y: auto; padding: 24px; border-left: 1px solid var(--line); background: var(--surface); box-shadow: -12px 0 32px rgba(11, 61, 46, .08); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.drawer-header strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.drawer-header small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.drawer-header button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.drawer-fields { margin: 16px 0 0; }
.drawer-fields div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.drawer-fields dt { color: var(--muted); }
.drawer-fields dd { margin: 0; overflow-wrap: anywhere; }
.drawer-note { margin: 16px 0 0; font-size: 12px; line-height: 1.6; }
.drawer-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; font-size: 12px; }
.drawer-button { padding: 10px 14px; border-radius: 5px; background: var(--brand); color: #fff; text-align: center; text-decoration: none; font-weight: 500; }
.drawer-link { color: var(--brand); }

/* Overview: project facts, headline areas and the action cards. */
.project-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.project-card h2 { margin: 4px 0 16px; font-size: 21px; font-weight: 600; letter-spacing: -.4px; }
.project-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.project-facts dt { font-size: 11px; color: var(--muted); }
.project-facts dd { margin: 3px 0 0; font-size: 13px; font-weight: 500; }
.project-card-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.project-card-figures div { padding: 14px 16px; border-radius: 6px; background: var(--surface-sunken); }
.project-card-figures span, .project-card-figures > div > small { display: block; font-size: 11px; color: var(--muted); }
.project-card-figures strong { display: block; margin: 8px 0 4px; font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.project-card-figures strong small { font-size: 12px; font-weight: 500; color: var(--muted); }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.action-card { display: block; padding: 17px 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); text-decoration: none; color: var(--text); }
.action-card:hover { border-color: var(--brand); }
.action-card span { display: block; font-size: 12px; font-weight: 500; }
.action-card strong { display: block; margin-top: 10px; font-size: 30px; font-weight: 600; letter-spacing: -.5px; line-height: 1.1; }
.action-card strong.action-text { font-size: 20px; line-height: 1.6; }
.action-card.critical strong { color: var(--error, #a23b2f); }
.action-card.warning strong { color: var(--warning, #9a6a00); }
.action-card small { display: block; margin-top: 8px; font-size: 11px; color: var(--muted); }

/* Versions: comparison picker and change-type filter. */
.version-picker { margin-top: 10px; }
.version-picker label { display: inline-flex; flex-direction: column; gap: 4px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 11px; color: var(--muted); }
.version-picker select { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); }
.status-filter { display: flex; gap: 4px; }
.status-filter a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; color: var(--muted); text-decoration: none; background: var(--surface); }
.status-filter a b { font-weight: 600; color: var(--text); }
.status-filter a.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.status-filter a.active b { color: #fff; }
.room-context { display: flex; gap: 12px; align-items: baseline; color: var(--brand); font-weight: 500; }

@media (max-width: 1100px) {
  .project-card { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card-figures { grid-template-columns: 1fr 1fr; }
  .action-grid { grid-template-columns: 1fr; }
  .filter-actions { margin-left: 0; }
  .detail-drawer { width: 100vw; }
  .section-heading { flex-wrap: wrap; gap: 10px; }
}

/* Cockpit charts: thin marks, hairline grid, legend beside every multi-series chart. */
.lc-notice-inline { color: var(--warning); }
.filter-note { color: var(--muted); }
.cockpit-kpis { margin-top: 20px; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 11px; color: var(--muted); }
.viz-legend i, .viz-donut-legend i, .viz-split-labels i, .usage-kpi h3 i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.viz-table { margin-top: 14px; font-size: 12px; }
.viz-table summary { width: fit-content; cursor: pointer; color: var(--brand); }
.viz-table table { margin-top: 8px; }
.viz-table .numeric, .data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.viz-donut { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 18px; }
.viz-donut svg { width: 150px; height: 150px; }
.viz-donut circle { transition: stroke-width .15s; }
.viz-donut circle:hover { stroke-width: 20; }
.viz-donut-value { font-size: 15px; font-weight: 600; fill: var(--text); }
.viz-donut-label { font-size: 8px; fill: var(--muted); }
.viz-donut-legend { margin: 0; padding: 0; list-style: none; font-size: 12px; }
.viz-donut-legend li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 44px; align-items: baseline; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.viz-donut-legend strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-donut-legend small { color: var(--muted); text-align: right; font-size: 11px; }
.viz-columns { display: flex; align-items: flex-end; gap: 10px; height: 200px; margin-top: 18px; padding-bottom: 28px; border-bottom: 1px solid var(--line-soft); position: relative; }
.viz-column { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; min-width: 0; height: 100%; }
.viz-column-value { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.viz-column-track { display: flex; align-items: flex-end; justify-content: center; flex: 1 1 auto; width: 100%; max-width: 64px; margin-top: 4px; }
.viz-column-track > i { display: block; width: 100%; border-radius: 4px 4px 0 0; }
.viz-stack { display: flex; flex-direction: column-reverse; width: 100%; gap: 2px; }
.viz-stack i { display: block; min-height: 2px; }
.viz-stack i:last-child { border-radius: 4px 4px 0 0; }
.viz-column-label { position: absolute; bottom: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.viz-rows { display: grid; gap: 8px; margin-top: 18px; }
.viz-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 12px; font-size: 11px; }
.viz-row-label { color: var(--muted); }
.viz-row-track { height: 14px; background: var(--line-soft); border-radius: 3px; }
.viz-stack-h { display: flex; height: 100%; gap: 2px; }
.viz-stack-h i { display: block; min-width: 2px; }
.viz-stack-h i:last-child { border-radius: 0 3px 3px 0; }
.viz-stack-h i:first-child { border-radius: 3px 0 0 3px; }
.viz-row-value { text-align: right; font-variant-numeric: tabular-nums; }
.viz-split { display: flex; height: 16px; gap: 2px; margin-top: 18px; border-radius: 4px; overflow: hidden; }
.viz-split i { display: block; }
.viz-split-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted); }
.viz-split-labels strong { color: var(--text); }
.usage-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.usage-kpi { padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.usage-kpi h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.usage-kpi dl { margin: 0; }
.usage-kpi dl div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.usage-kpi dt { color: var(--muted); }
.usage-kpi dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.sector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.sector-card { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 6px; }
.sector-card h3 { margin: 0; font-size: 12px; font-weight: 600; }
.sector-card .viz-split { margin-top: 10px; height: 10px; }
.sector-card dl { display: flex; justify-content: space-between; margin: 8px 0 0; font-size: 11px; }
.sector-card dt { color: var(--muted); }
.sector-card dd { margin: 2px 0 0; font-weight: 600; }
.cost-table, .quality-table { min-width: 900px; }
.qs-summary { display: grid; gap: 14px; margin-top: 18px; }
.qs-summary div { padding: 12px 14px; border-radius: 6px; background: var(--surface-sunken); }
.qs-summary span, .qs-summary small { display: block; font-size: 11px; color: var(--muted); }
.qs-summary strong { display: block; margin: 6px 0 2px; font-size: 22px; font-weight: 600; }
.quality-pill { display: inline-block; min-width: 52px; padding: 2px 8px; border-radius: 4px; text-align: center; font-size: 11px; font-weight: 600; }
.quality-pill.good { background: var(--success-faint); color: var(--success); }
.quality-pill.mid { background: var(--warning-faint); color: var(--warning); }
.quality-pill.low { background: var(--error-faint); color: var(--error); }
@media (max-width: 1100px) {
  .usage-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .usage-strip, .sector-grid { grid-template-columns: 1fr 1fr; }
  .viz-donut { grid-template-columns: 1fr; justify-items: center; }
  .viz-column-label { font-size: 10px; }
}

/* Sortable headers, column menu and attribute distributions on the room table. */
.sort-link { color: inherit; text-decoration: none; }
.sort-link.active { color: var(--brand); }
.sort-arrow { margin-left: 4px; font-size: 9px; }
.filter-secondary { border-color: var(--line) !important; background: var(--surface) !important; color: var(--brand) !important; }
.column-menu { position: relative; font-size: 12px; }
.column-menu summary { cursor: pointer; color: var(--brand); list-style: none; }
.column-menu summary::-webkit-details-marker { display: none; }
.column-menu-list { position: absolute; right: 0; z-index: 20; display: grid; gap: 6px; min-width: 180px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 8px 24px rgba(11, 61, 46, .08); }
.column-menu-list label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.drawer-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; }
.drawer-toolbar label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; font-size: 11px; color: var(--muted); }
.drawer-toolbar select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 12px; color: var(--text); background: var(--surface); }
.drawer-views { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.drawer-views button { padding: 7px 10px; border: 0; background: var(--surface); font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; }
.drawer-views button.active { background: var(--brand); color: #fff; }
.drawer-measure { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--muted); }
#distribution-body { margin-top: 14px; }
.distribution-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.distribution-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.distribution-track { height: 8px; border-radius: 3px; background: var(--line-soft); }
.distribution-track i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.distribution-row strong { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.distribution-table { margin-top: 6px; font-size: 12px; }

/* Overview activity and files. */
.activity-list { margin: 16px 0 0; padding: 0; list-style: none; }
.activity-list li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.activity-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.activity-list a { font-weight: 500; }
.activity-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.file-table { margin-top: 14px; }

/* Version chronology strip. */
.version-timeline { display: flex; align-items: stretch; gap: 0; margin-top: 24px; overflow-x: auto; }
.version-node { flex: 0 0 200px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.version-node strong { display: block; font-size: 17px; font-weight: 600; }
.version-node span, .version-node small { display: block; font-size: 11px; color: var(--muted); }
.version-node span { margin-top: 4px; }
.version-node.current { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.version-node.next { border-style: dashed; color: var(--dim); }
.version-node.next strong { color: var(--dim); }
.version-edge { display: flex; align-items: center; flex: 0 0 auto; padding: 0 10px; font-size: 11px; color: var(--muted); position: relative; }
.version-edge::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); z-index: 0; }
.version-edge a, .version-edge span { position: relative; z-index: 1; padding: 4px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; white-space: nowrap; }
.version-edge a.active { border-color: var(--brand); color: var(--brand); font-weight: 600; }
@media (max-width: 760px) {
  .activity-list li { grid-template-columns: 1fr; gap: 2px; }
  .version-node { flex-basis: 160px; }
}

/* Overview: one figure row, three actions, one reconciliation panel. */
.overview-header h1 { font-size: 27px; }
.overview-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.overview-figures div { padding: 16px 20px; border-right: 1px solid var(--line-soft); }
.overview-figures div:last-child { border-right: 0; }
.overview-figures span { display: block; font-size: 12px; color: var(--muted); }
.overview-figures strong { display: block; margin-top: 8px; font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.overview-figures strong small { font-size: 12px; font-weight: 500; color: var(--muted); }
.action-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reconciliation-panel { margin-top: 28px; }
.reconciliation-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; }
.reconciliation-subtitle { margin: 22px 0 0; font-size: 13px; font-weight: 600; }
.reconciliation-grid .bar-list { margin-top: 14px; }
.reconciliation-grid .data-notes { margin-top: 18px; }
.overview-footer { margin-top: 20px; }
@media (max-width: 1100px) {
  .overview-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-figures div:nth-child(2) { border-right: 0; }
  .overview-figures div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .action-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reconciliation-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .overview-figures { grid-template-columns: 1fr; }
  .overview-figures div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .action-grid-three { grid-template-columns: 1fr; }
}

/* Project switcher in the sidebar. */
.project-switcher { margin: 0 12px 18px; }
.project-switcher label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; color: #c2d4ca; text-transform: uppercase; letter-spacing: .4px; }
.project-switcher select { width: 100%; padding: 8px 10px; border: 1px solid #2c6650; border-radius: 5px; background: #16452f; color: #fff; font: inherit; font-size: 13px; }
.project-switcher select:focus-visible { outline-color: #dce9e0; }

/* Data ingestion panel and job progress. */
.ingest-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 5px; background: var(--error-faint); color: var(--error); font-size: 12px; }
.ingest-form { margin-top: 16px; }
.ingest-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 1.5px dashed var(--line); border-radius: 7px; background: var(--surface-sunken); text-align: center; cursor: pointer; }
.ingest-drop:hover, .ingest-drop.is-over { border-color: var(--brand); background: #eef5f1; }
.ingest-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ingest-drop strong { font-size: 13px; }
.ingest-drop span { font-size: 11px; color: var(--muted); }
.ingest-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; }
.ingest-controls label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; font-size: 11px; color: var(--muted); }
.ingest-controls .ingest-version { flex: 0 1 110px; }
.ingest-controls select, .ingest-controls input[type=text], .project-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font: inherit; font-size: 12px; color: var(--text); }
.ingest-controls button, .project-form button { padding: 9px 16px; border: 1px solid var(--brand); border-radius: 5px; background: var(--brand); color: #fff; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.job-list { margin: 16px 0 0; padding: 0; list-style: none; }
.job { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 6px; margin-bottom: 8px; background: var(--surface-sunken); }
.job.is-highlighted, .job-running { border-color: var(--brand); }
.job-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.job-status { font-size: 11px; color: var(--muted); }
.job-running .job-status { color: var(--brand); font-weight: 600; }
.job-done .job-status { color: var(--success); font-weight: 600; }
.job-error .job-status, .job-error-text { color: var(--error); font-weight: 600; }
.job-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 11px; }
.job-steps li { padding: 3px 8px; border-radius: 10px; background: var(--line-soft); color: var(--muted); }
.job-steps li small { color: inherit; }
.job-steps .step-running { background: #dce9e0; color: var(--brand); font-weight: 600; }
.job-steps .step-done { background: var(--success-faint); color: var(--success); }
.job-steps .step-warning { background: var(--warning-faint); color: var(--warning); }
.job-steps .step-error { background: var(--error-faint); color: var(--error); }
.job-steps .step-skipped { text-decoration: line-through; }
.job-error { margin: 8px 0 0; font-size: 11px; color: var(--error); }
.ingest-panel .file-table { margin-top: 16px; }
.api-notes pre { margin: 8px 0; padding: 10px 12px; border-radius: 5px; background: var(--surface-sunken); font-size: 11px; overflow-x: auto; }
.project-form-panel { margin-top: 24px; max-width: 560px; }
.project-form { display: grid; gap: 14px; }
.project-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.project-form-actions { display: flex; align-items: center; gap: 16px; font-size: 12px; }

/* Login page. */
.login-page { display: grid; place-items: center; min-height: 100vh; margin: 0; background: var(--brand); }
.login-card { width: min(400px, calc(100vw - 32px)); padding: 32px; border-radius: 10px; background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.login-card .brand-copy strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.login-card .brand-copy small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.login-card h1 { margin: 24px 0 6px; font-size: 22px; font-weight: 600; }
.login-form { display: grid; gap: 14px; margin-top: 20px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.login-form input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 15px; letter-spacing: .1em; }
.login-form button { padding: 11px 16px; border: 0; border-radius: 6px; background: var(--brand); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.login-form .ingest-error { margin: 0; }
.login-card .brand-copy strong { color: var(--brand); }

/* Versions: one timeline selects the comparison, one line per change. */
.timeline { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-top: 22px; }
.timeline-node { display: flex; flex-direction: column; min-width: 150px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.timeline-node strong { font-size: 16px; font-weight: 600; }
.timeline-node span, .timeline-node small { font-size: 11px; color: var(--muted); }
.timeline-node span { margin-top: 3px; }
.timeline-node.is-selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.timeline-edge { display: flex; align-items: baseline; gap: 5px; margin: 0 -1px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 11px; text-decoration: none; position: relative; z-index: 1; }
.timeline-edge span { font-size: 14px; font-weight: 600; color: var(--text); }
.timeline-edge:hover { border-color: var(--brand); }
.timeline-edge.is-selected { border-color: var(--brand); background: var(--brand); color: #dce9e0; }
.timeline-edge.is-selected span { color: #fff; }
.timeline-edge.is-empty { border-style: dashed; }
.timeline-node + .timeline-edge, .timeline-edge + .timeline-node { margin-left: 12px; }
.timeline-add { margin-left: 18px; font-size: 12px; color: var(--brand); }
.change-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.change-summary a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 16px; color: var(--text); text-decoration: none; }
.change-summary a:hover { background: var(--line-soft); }
.change-summary a.active { background: var(--brand); color: #fff; }
.change-summary a strong { font-size: 15px; }
.change-summary i, .change-group h2 i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.tone-modified i, .change-group-modified h2 i { background: var(--warning-strong); }
.tone-added i, .change-group-added h2 i { background: var(--success-strong); }
.tone-removed i, .change-group-removed h2 i { background: var(--error-strong); }
.change-summary-muted { margin-left: auto; font-size: 12px; color: var(--muted); }
.change-group { margin-top: 24px; }
.change-group h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.change-group h2 span { font-weight: 500; color: var(--muted); }
.change-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.change-list > li { display: grid; grid-template-columns: minmax(160px, 220px) 70px minmax(0, 1fr) 48px; align-items: start; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.change-list > li:last-child { border-bottom: 0; }
.change-list > li:hover { background: #fafbfa; }
.change-room strong { display: block; font-size: 13px; }
.change-room span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.change-floor { font-size: 12px; color: var(--muted); padding-top: 1px; }
.change-story { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.change-story li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.change-label { min-width: 110px; font-size: 12px; color: var(--muted); }
.change-old { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--dim); }
.change-arrow { color: var(--dim); }
.change-new { font-weight: 600; }
.change-delta { padding: 1px 7px; border-radius: 10px; background: var(--line-soft); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.change-action { text-align: right; }
.change-empty { margin-top: 24px; }
@media (max-width: 760px) {
  .change-list > li { grid-template-columns: 1fr auto; }
  .change-floor { grid-column: 1; grid-row: 2; }
  .change-story { grid-column: 1 / -1; }
  .change-action { grid-column: 2; grid-row: 1; }
  .change-summary-muted { margin-left: 0; }
}
.change-summary { display: block; margin-top: 28px; padding-bottom: 12px; font-size: 14px; }
.change-summary strong { font-size: 16px; }
.change-summary span { color: var(--muted); }

/* Version changes inside the room table. */
.change-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: 12px; }
.change-bar-title { margin-right: 4px; color: var(--muted); }
.change-bar small { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.change-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.change-chip:hover { border-color: var(--brand); }
.change-chip.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.change-chip i { width: 8px; height: 8px; border-radius: 50%; }
.change-chip.active i { box-shadow: 0 0 0 2px #fff; }
.row-change-modified td:first-child { box-shadow: inset 3px 0 0 var(--warning-strong); }
.row-change-added td:first-child { box-shadow: inset 3px 0 0 var(--success-strong); }
.row-change-removed td { color: var(--muted); }
.row-change-removed td:first-child { box-shadow: inset 3px 0 0 var(--error-strong); }
.row-change-removed strong { text-decoration: line-through; font-weight: 500; }
.change-cell { min-width: 200px; }
.change-cell small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.change-cell s { text-decoration-color: var(--dim); }
.change-tag { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.change-tag-modified { background: var(--warning-faint); color: var(--warning); }
.change-tag-added { background: var(--success-faint); color: var(--success); }
.change-tag-removed { background: var(--error-faint); color: var(--error); }
.drawer-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.drawer-section h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; }
.drawer-section h3 small { margin-left: 6px; font-weight: 400; color: var(--muted); }
#drawer-change-list { margin: 0; padding: 0; list-style: none; font-size: 12px; }
#drawer-change-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
#drawer-change-list .change-label { min-width: 90px; color: var(--muted); }
#drawer-change-list s { color: var(--muted); }
#drawer-change-list em { font-style: normal; font-size: 11px; color: var(--muted); }
.drawer-history { font-size: 12px; }
.drawer-history td.is-changed { font-weight: 600; background: var(--warning-faint); }

/* Version strip: project versions as one sentence, the next one is a drop zone. */
.version-strip { margin-top: 18px; }
.version-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.version-node { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.version-node strong { font-size: 14px; font-weight: 600; }
.version-node span { font-size: 11px; color: var(--muted); }
.version-node.is-current { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.version-node.is-pending { border-style: dashed; }
.version-progress { display: inline-block; width: 48px; height: 4px; border-radius: 2px; background: var(--line-soft); vertical-align: middle; overflow: hidden; }
.version-progress i { display: block; height: 100%; width: 5%; background: var(--brand); transition: width .4s; }
.version-edge { display: flex; align-items: center; justify-content: center; min-width: 34px; padding: 0 4px; font-size: 11px; color: var(--muted); }
.version-edge a { padding: 2px 8px; border-radius: 10px; background: var(--warning-faint); color: var(--warning); font-weight: 600; text-decoration: none; }
.version-edge a:hover { background: var(--warning-line); }
.version-drop { margin-left: 8px; position: relative; }
.version-drop label { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px dashed var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; cursor: pointer; }
.version-drop label strong { font-size: 16px; line-height: 1; color: var(--brand); }
.version-drop label:hover, .version-drop.is-over label { border-color: var(--brand); background: #eef5f1; color: var(--brand); }
.version-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.version-library { margin-top: 4px; font-size: 11px; }
.version-library summary { cursor: pointer; color: var(--muted); list-style: none; }
.version-library summary::-webkit-details-marker { display: none; }
.version-library button { display: block; width: 100%; margin-top: 4px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); text-align: left; font: inherit; font-size: 11px; cursor: pointer; }
.version-library button:hover { border-color: var(--brand); }
.version-library button small { color: var(--muted); }
.version-strip .ingest-error { margin: 0 0 10px; }
.overview-footer .panel { margin-top: 20px; }
.version-node form { display: contents; }
.version-node button { display: flex; align-items: baseline; gap: 8px; margin: -8px -14px; padding: 8px 14px; border: 0; border-radius: 6px; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.version-node button:hover { background: var(--surface-sunken); }
.version-node.is-current button { cursor: default; }
