:root {
  --bg-deep: #16161b;
  --bg-mid: #1b1b21;
  --bg-primary: #16161b;
  --bg-secondary: #1b1b21;
  --bg-card: #1b1b21;
  --text-primary: #ece8e1;
  --text-secondary: #a9a29a;
  --text-tertiary: #949089;
  --glass-border: #ffffff1a;
  --accent: #d9b66f;
  --accent-soft: #d9b66f18;
  --glass-bg: #1b1b21;
  --glass-1: #1b1b21;
  --glass-2: #202027;
  --glass-3: #25252c;
  --text: #ece8e1;
  --text-dim: #949089;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}
body { background: var(--bg-primary); font-family: "Segoe UI", system-ui, sans-serif; color: var(--text-primary); }
button, input, select { font: inherit; }
button, a, input, select, summary { outline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); }
.cockpit { grid-template-columns: 216px minmax(0, 1fr) 280px; grid-template-rows: 70px minmax(0, 1fr) 38px; height: 100vh; gap: 12px; padding: 12px; }
.header { border-radius: 8px; }
.header-brand { flex-wrap: wrap; gap: 10px; }
.header h1 { font-size: 18px; letter-spacing: .16em; }
.sample-label, .rail-caption, .eyebrow, .status-bar, .summary-card span { font-family: Consolas, "Courier New", monospace; font-size: 10px; letter-spacing: .06em; }
.sample-label { color: var(--accent); padding: 4px 7px; border: 1px solid var(--glass-border); }
.main { min-width: 0; gap: 12px; }
.main-tabs { flex-wrap: wrap; }
.main-tabs .tab { font-size: 12px; }
.main-content { overflow: auto; padding: 18px; }
.glass-panel { min-height: 0; flex: 1; display: flex; flex-direction: column; border-radius: 8px; }
.panel-title { font-size: 12px; }
.demo-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.demo-filters[hidden] { display: none; }
.demo-filters label, .dialog-field { display: grid; gap: 5px; color: var(--text-secondary); font-size: 11px; }
.demo-filters select, .demo-filters input, .dialog-field select { background: #1d1d1b; color: var(--text-primary); border: 1px solid var(--glass-border); border-radius: 4px; padding: 7px; max-width: 100%; }
.search-label { flex: 1; }
.demo-hint, .view-note, .detail-note { font-size: 11px; line-height: 1.6; color: var(--text-secondary); }
.demo-hint { margin: 0; }
.rail-caption { padding: 4px 12px; line-height: 1.7; color: var(--text-secondary); }
.boundary { color: var(--text-secondary); font-size: 12px; line-height: 1.75; margin: 8px 0; }
.node-card { cursor: pointer; }
.node-card.animate-in { animation: none; opacity: 1; transform: none; }
.nav { min-height: 0; }
.nav-nodes { overflow: auto; }
.node-session-age-row { font-family: Consolas, monospace; }
.demo-button { background: #252521; color: var(--text-primary); border: 1px solid var(--glass-border); padding: 7px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.demo-button:hover, .demo-button.selected { border-color: var(--accent); color: var(--accent); }
.demo-link { color: var(--accent); font-size: 12px; padding: 5px; }
.kanban-card-actions { display: flex; opacity: 1; }
.kanban-action-btn { font-size: 10px; color: var(--text-secondary); }
.card-detail-button { text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.kanban-card-title { font-size: 12px; line-height: 1.5; }
.kanban { min-height: 250px; }
.kanban-col-body { max-height: none; }
.intel { overflow: auto; }
.intel-card { border-radius: 8px; }
.summary-card { width: 100%; text-align: left; padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--glass-border); color: var(--text-primary); cursor: pointer; }
.summary-card span { color: var(--accent); display: block; margin-bottom: 6px; }
.summary-card strong { font-size: 12px; line-height: 1.5; font-weight: 500; }
#activity-log { padding-left: 16px; font-size: 11px; line-height: 1.65; color: var(--text-secondary); }
#activity-log li { margin-bottom: 9px; }
.status-bar { display: flex; flex-wrap: wrap; justify-content: space-between; color: var(--text-secondary); border-radius: 6px; }
.status-bar span:first-child { color: var(--accent); }
.domain-filters, .health-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.design-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.design-column h3 { font-size: 11px; font-weight: 500; text-transform: uppercase; padding-bottom: 12px; border-bottom: 2px solid var(--accent); }
.design-column h3 span { float: right; color: var(--text-secondary); }
.design-card { width: 100%; text-align: left; color: var(--text-primary); background: #20201d; border: 1px solid var(--glass-border); border-radius: 5px; margin: 12px 0 0; padding: 14px; cursor: pointer; }
.design-card strong { font-size: 12px; line-height: 1.6; }
.design-card p, .design-card span { font-size: 11px; line-height: 1.7; color: var(--text-secondary); }
.design-card span { font-family: Consolas, monospace; }
.knowledge-article { border-bottom: 1px solid var(--glass-border); padding: 16px 0; font-size: 13px; }
.knowledge-article summary { cursor: pointer; line-height: 1.6; }
.knowledge-article summary span { float: right; font-size: 11px; color: var(--accent); }
.knowledge-article p { color: var(--text-secondary); line-height: 1.8; max-width: 75ch; }
.health-observation { padding: 24px; background: #20201d; border: 1px solid var(--glass-border); border-left-width: 3px; line-height: 1.8; font-size: 13px; }
.health-observation h3 { font: 12px Consolas, monospace; }
.health-observation.green { border-left-color: #78b78e; }
.health-observation.degraded { border-left-color: #d9b66f; }
.health-observation.red { border-left-color: #d39373; }
dialog { background: #1d1d1b; border: 1px solid #55554c; border-radius: 8px; color: var(--text-primary); padding: 28px; width: min(640px, 92vw); max-height: 85vh; line-height: 1.8; font-size: 14px; }
dialog::backdrop { background: #000a; }
dialog h2 { margin: 10px 0 18px; font-size: 22px; line-height: 1.4; }
.dialog-close { float: right; }
.eyebrow { color: var(--accent); }
.detail-facts { display: grid; grid-template-columns: 130px 1fr; gap: 9px; padding: 16px 0; border-block: 1px solid var(--glass-border); font-size: 12px; }
.detail-facts dt { color: var(--text-secondary); }
.detail-facts dd { margin: 0; }
.dialog-field { margin-bottom: 14px; }
@media (max-width: 1100px) {
  .cockpit { grid-template-columns: 190px minmax(0, 1fr); }
  .intel { display: none; }
  .header-stats { display: none; }
}
@media (max-width: 700px) {
  .cockpit { display: flex; flex-direction: column; height: auto; min-height: 100vh; padding: 10px; }
  .header { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .nav { display: none; }
  .main { min-height: 650px; }
  .main-content { padding: 12px; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .design-grid { grid-template-columns: 1fr; }
  .status-bar { gap: 8px; padding: 10px; }
  .detail-facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body { font-size: 18px; }
.cockpit {
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "header header header" "nav main intel" "status status status";
}
.header { min-height: 88px; flex-wrap: wrap; gap: 14px; }
.header-brand .sample-label { font-size: 16px; line-height: 1.5; }
.project-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.header-actions { flex-wrap: wrap; }
.header-stats .stat-label, .header-stats .stat-value { font-size: 14px; }
.main-tabs .tab, .demo-button, .demo-link { font-size: 16px; line-height: 1.5; }
.main-tabs { overflow: visible; }
.panel-title { font-size: 18px; line-height: 1.5; }
.panel-badge, .intel-card-title { font-size: 14px; line-height: 1.5; }
.demo-filters label, .dialog-field { font-size: 16px; }
.demo-filters select, .demo-filters input, .dialog-field select, textarea { font-size: 16px; line-height: 1.5; }
.boundary, .view-note, .demo-hint, .detail-note { font: 18px/1.6 var(--font-sans); }
.boundary, .view-note, .demo-hint, #research-content p { max-width: 70ch; }
.nav .node-name, .nav .node-role { font-size: 16px; line-height: 1.5; }
.nav .node-meta, .nav .node-session-age-row, .nav .node-host { font-size: 14px; line-height: 1.5; }
.nav .node-meta { font-size: 16px; }
.node-card { padding: 14px; flex-shrink: 0; }
.nav .node-meta { flex-wrap: wrap; }
.nav-nodes { min-height: 0; }
.rail-caption { font-size: 14px; }
.kanban-card-title, .card-detail-button, .kanban-col-title { font-size: 16px; line-height: 1.6; }
.kanban-action-btn { font-size: 16px; padding: 5px 8px; }
.kanban-card-actions { flex-wrap: wrap; gap: 8px; }
.kanban-card .kanban-card-id, .kanban-card .kanban-card-meta, .kanban-card .comp-badge, .kanban-card span { font-size: 14px !important; line-height: 1.5; }
.blocked-banner, .blocked-banner summary, .blocked-banner summary span { font-size: 16px !important; line-height: 1.6; }
.summary-card strong { font-size: 16px; line-height: 1.6; }
.summary-card span, #activity-log { font-size: 14px; line-height: 1.7; }
.status-bar { font-size: 16px; line-height: 1.5; gap: 12px; padding: 12px; }
.design-card strong, .design-column h3, .knowledge-article summary { font-size: 18px; line-height: 1.6; }
.design-card p, .knowledge-article p, .health-observation { font-size: 18px; line-height: 1.6; }
.design-card span, .knowledge-article summary span { font-size: 14px; }
.health-observation h3 { font-size: 16px; line-height: 1.6; }
dialog { font-size: 18px; line-height: 1.7; }
.detail-facts { font-size: 16px; }
.review-scroll { overflow-x: auto; max-width: 100%; }
.sample-review-table { min-width: 780px; }
.sample-review-table span { font-size: 16px !important; line-height: 1.6; }
.sample-review-table span:first-child { white-space: normal !important; }
#research-content > p, #research-content details p, #research-content li, #research-content dd { font-size: 18px; line-height: 1.65; max-width: 70ch; }
#research-content h3 { font-size: 24px; line-height: 1.5; margin: 24px 0 16px; }
#research-content h4 { font-size: 20px; line-height: 1.5; margin: 14px 0; }
.research-steps, .research-controls { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.research-controls { align-items: end; }
.research-controls label { display: grid; gap: 8px; font-size: 16px; flex: 1 1 200px; }
.research-controls input, .research-controls select, .dialog-field textarea { width: 100%; background: var(--bg-secondary); border: 1px solid var(--glass-border); color: var(--text-primary); padding: 9px; font: 16px/1.6 var(--font-sans); }
.research-result { padding: 20px 0; border-top: 1px solid var(--glass-border); }
.research-result p { font-size: 18px; line-height: 1.65; }
.research-meta { font: 14px/1.6 var(--font-mono) !important; color: var(--text-secondary); }
.stage-rail { display: flex; gap: 12px; flex-wrap: wrap; list-style: none; padding: 0; margin: 24px 0; }
.stage-rail li { border: 1px dashed var(--text-secondary); padding: 8px 10px; font: 16px/1.6 var(--font-mono); }
.stage-rail .current-stage { border-style: solid; font-weight: 700; }
.proposal-sections { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
.proposal-sections dt { font: 16px/1.7 var(--font-mono); }
.proposal-sections dd { margin: 0; }
.sample-wave, .council-note, .legal-bases { padding: 18px 0; border-top: 1px solid var(--glass-border); }
.sample-wave summary, .council-note summary, .legal-bases summary { font-size: 18px; line-height: 1.6; cursor: pointer; }
.sample-wave p, .legal-bases p, .council-note p { margin: 16px 0; }
.response-frame { color: var(--text-secondary); font-size: 0.9em; }
.decision-outcome { padding: 18px; border: 1px solid var(--glass-border); background: var(--bg-secondary); }
.legal-bases ol, .governance-delivery { padding-left: 25px; }
.legal-bases li, .governance-delivery li { margin: 16px 0; }
@media (max-width: 1500px) {
  .cockpit { grid-template-columns: 190px minmax(0, 1fr) 260px; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .cockpit {
    grid-template-columns: 190px minmax(0, 1fr);
    grid-template-areas: "header header" "nav main" "status status";
  }
}
@media (max-width: 700px) {
  body { height: auto; min-height: 100vh; overflow-y: auto; }
  .cockpit { display: flex; height: auto; }
  .main { min-height: 780px; }
  .kanban, .design-grid, .proposal-sections { grid-template-columns: 1fr; }
  .header-actions { flex-wrap: wrap; }
  .nav { display: flex; max-height: 300px; }
  .nav-nodes { display: flex; gap: 12px; overflow-x: auto; }
  .node-card { width: 240px; }
  .nav .nav-fleet-health { display: none; }
}

/* Avoid single words stranded on their own line. */
p, li, dd, figcaption { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
