:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15202b;
  background: #edf1f4;
  --ink: #15202b;
  --muted: #66727d;
  --line: #d8e0e6;
  --brand: #183b4e;
  --accent: #d4a72c;
  --good: #176b4d;
  --bad: #a33b32;
  --paper: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg,#e7ecef 0,#f4f6f7 420px); }
.topbar { background: #102f40; color: white; padding: 30px max(28px,calc((100vw - 1380px)/2)); display:flex; justify-content:space-between; gap:24px; align-items:end; }
.topbar h1 { margin: 5px 0 7px; font-size: clamp(27px,3vw,42px); letter-spacing:-.03em; }
.topbar p { margin:0; color:#c6d3da; }
.eyebrow { color: var(--accent); letter-spacing:.17em; font-size:12px; font-weight:800; text-transform:uppercase; }
.health { font-size:13px; padding:9px 12px; border:1px solid #547181; border-radius:999px; white-space:nowrap; }
.shell { max-width:1380px; margin:28px auto 70px; padding:0 24px; }
.card { background:rgba(255,255,255,.97); border:1px solid var(--line); border-radius:16px; box-shadow:0 8px 30px rgba(21,32,43,.055); padding:22px; }
.create-card { margin-bottom:22px; }
.history-card { margin-bottom:22px; }
.history-hint { margin: -6px 0 14px; }
.history-list { display:grid; gap:10px; max-height:360px; overflow:auto; }
.history-item {
  width:100%;
  text-align:left;
  background:#f8fafb;
  color:inherit;
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 16px;
  font-weight:inherit;
  display:grid;
  gap:6px;
}
.history-item:hover { border-color:#b7c5ce; background:#fff; }
.history-item.active { border-color:var(--brand); box-shadow:inset 3px 0 0 var(--accent); background:#fff; }
.history-item-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.history-item-top strong { font-size:15px; }
.history-meta { display:flex; flex-wrap:wrap; gap:10px 16px; color:var(--muted); font-size:12px; font-weight:700; }
.history-docs { font-size:13px; color:var(--ink); line-height:1.4; }
.history-flags { display:flex; flex-wrap:wrap; gap:4px; }
.document-list { display:grid; gap:8px; }
.document-item {
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafb;
}
.document-item small { color:var(--muted); font-size:11px; }
.documents-card { margin:0; }
.section-title { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:18px; }
.section-title>div { display:flex; align-items:center; gap:12px; }
.section-title h2 { margin:0; font-size:18px; }
.step { width:32px; height:32px; display:grid; place-items:center; border-radius:8px; background:#f6edcf; color:#6d5513; font-weight:900; }
.form-grid { display:grid; grid-template-columns:1fr 1.3fr; gap:16px; }
label span { display:block; font-size:12px; font-weight:800; color:var(--muted); margin-bottom:7px; text-transform:uppercase; letter-spacing:.06em; }
input { width:100%; border:1px solid var(--line); border-radius:10px; padding:12px; background:white; font:inherit; }
.actions { display:flex; gap:10px; margin-top:16px; }
button,.link-button { border:0; border-radius:10px; padding:11px 15px; background:var(--brand); color:white; font-weight:800; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
button:disabled { opacity:.45; cursor:not-allowed; }
button.ghost,.ghost { background:#f4f7f8; color:var(--brand); border:1px solid var(--line); }
.hint { color:var(--muted); font-size:13px; margin-bottom:0; }
.hidden { display:none; }
.account-bar { display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.account-actions { display:flex; gap:10px; align-items:center; }
.login-card { max-width:520px; margin:28px auto; }
.login-grid { grid-template-columns:1fr; }
.login-error { color:#8d2b2b; min-height:1.2em; }
.admin-card { margin-top:18px; }
.workspace { display:grid; gap:18px; }
.project-head { display:flex; justify-content:space-between; align-items:center; }
.project-head h2 { margin:4px 0 0; }
.project-actions { display:flex; align-items:center; gap:10px; }
.status-pill { border-radius:999px; background:#eef2f4; padding:8px 12px; font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.05em; }
.status-pill.completed { background:#def3e9; color:var(--good); }
.status-pill.completed_with_gaps { background:#fff4d6; color:#8a5a00; }
.status-pill.failed { background:#fde7e5; color:var(--bad); }
.run-picker { display:flex; align-items:flex-end; gap:8px; flex-wrap:wrap; }
.run-picker label { display:grid; gap:6px; min-width:240px; }
.live-progress { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.live-progress-head { display:flex; justify-content:space-between; align-items:baseline; gap:12px; }
.progress-track { height:10px; background:#e7eef2; border-radius:999px; overflow:hidden; margin-top:8px; }
.progress-track > div { height:100%; width:0; background:var(--brand); transition:width .3s ease; }
.live-progress.done .progress-track > div { background:var(--good); }
.live-progress.gaps .progress-track > div { background:#c48a12; }
.progress-stages { display:flex; gap:10px; list-style:none; padding:0; margin:10px 0 0; flex-wrap:wrap; }
.progress-stages li { font-size:12px; font-weight:800; color:#82909a; }
.progress-stages li.current { color:var(--brand); }
.progress-stages li.done { color:var(--good); }
.completion-banner { display:flex; justify-content:space-between; align-items:center; gap:16px; border-left:4px solid var(--good); }
.completion-actions { display:flex; gap:8px; flex-wrap:wrap; }
.download-menu { position:relative; }
.download-menu-panel { position:absolute; right:0; top:calc(100% + 6px); background:white; border:1px solid var(--line); border-radius:12px; min-width:220px; z-index:8; display:grid; padding:6px; box-shadow:0 10px 28px rgba(16,32,48,.08); }
.download-menu-panel button, .download-menu-panel a { background:transparent; border:0; text-align:left; padding:10px 12px; border-radius:8px; color:inherit; text-decoration:none; font:inherit; font-weight:700; cursor:pointer; }
.download-menu-panel button:hover, .download-menu-panel a:hover { background:#f4f7f8; }
.history-row.finished { box-shadow:inset 4px 0 0 var(--good); }
.history-row.finished.gaps { box-shadow:inset 4px 0 0 #c48a12; }
.internal-record { display:none; }
.stage-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.stage { display:flex; align-items:center; gap:12px; padding:15px; }
.stage b { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#edf3f6; color:var(--brand); }
.stage span { font-size:13px; font-weight:800; }
.badge { min-width:30px; height:30px; display:grid; place-items:center; border-radius:999px; background:#edf3f6; font-weight:900; font-size:12px; }
.table-wrap { overflow:auto; max-height:430px; }
table { border-collapse:collapse; width:100%; min-width:800px; }
th,td { text-align:left; padding:10px 9px; border-bottom:1px solid #edf0f2; font-size:12px; vertical-align:top; }
th { position:sticky; top:0; background:white; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.empty { color:#82909a; font-style:italic; }
.guard { padding:14px; border-radius:12px; border-left:4px solid var(--accent); background:#fff9e9; }
.guard.ready { border-left-color:var(--good); background:#edf8f3; }
.metric-row { display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid #edf0f2; }
.metric-row:last-child { border-bottom:0; }
.metric-label { color:var(--muted); font-size:12px; }
.metric-value { font-weight:900; text-align:right; }
.analysis-block { border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:10px; }
.analysis-block h3 { margin:0 0 8px; font-size:14px; }
.edit-block { margin-top:14px; padding-top:12px; border-top:1px solid #edf0f2; }
.edit-block > b { display:block; margin-bottom:8px; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.edit-row { display:grid; gap:8px; padding:8px 0; border-bottom:1px solid #f1f4f6; }
.edit-row:last-child { border-bottom:0; }
.edit-meta { display:flex; flex-direction:column; gap:2px; }
.edit-meta small { color:var(--muted); font-size:11px; }
.edit-row > input { max-width:160px; justify-self:end; padding:8px 10px; font-size:13px; }
.bound-inputs { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.bound-inputs label { display:flex; flex-direction:column; gap:4px; min-width:90px; }
.bound-inputs label span { font-size:10px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.bound-inputs input { width:100%; padding:8px 10px; font-size:13px; }
.tag { display:inline-block; padding:4px 8px; border-radius:999px; background:#edf3f6; margin:3px 4px 3px 0; font-size:11px; font-weight:800; }
.tag.bad { background:#fde7e5; color:var(--bad); }
.tag.good { background:#def3e9; color:var(--good); }
.report { line-height:1.65; white-space:normal; }

.report h1 { font-size:24px; margin:0 0 15px; color:var(--brand); }
.report h3 { font-size:14px; margin:18px 0 8px; color:var(--brand); }
.report p { margin:0 0 9px; }
.report-spacer { height:6px; }
.report-list { margin:5px 0 12px; padding-left:22px; }
.report-list li { margin:3px 0; }
.report-table-wrap { overflow-x:auto; margin:10px 0 16px; }
.report-table { width:100%; border-collapse:collapse; font-size:11px; }
.report-table th, .report-table td { border-bottom:1px solid var(--line); padding:7px 6px; vertical-align:top; text-align:left; }
.report-table th { background:#f5f7f8; font-weight:800; color:var(--brand); }
@media print { .report-table { font-size:8.5pt; } .report-table th, .report-table td { padding:5px 4px; } .report-table-wrap { break-inside:auto; page-break-inside:auto; } .report h3 { break-after:avoid; page-break-after:avoid; } }
.report h2 { font-size:17px; margin-top:23px; color:var(--brand); }
.report ol,.report ul { padding-left:21px; }
.audit-item { border-left:2px solid #d6e0e5; padding:5px 0 12px 12px; font-size:12px; }
.audit-item b { color:var(--brand); }
.error { background:#fde7e5; color:var(--bad); padding:12px; border-radius:10px; }
@media (max-width:900px){
  .form-grid,.two-col,.stage-grid{grid-template-columns:1fr;}
  .topbar{align-items:start;flex-direction:column;}
  .project-head{align-items:start;gap:15px;flex-direction:column;}
  .history-item-top{align-items:start;flex-direction:column;}
}

.print-cover { display:none; }

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  html, body {
    background: white !important;
    color: #15202b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .topbar,
  .create-card,
  .history-card,
  .completion-banner,
  .internal-record,
  .health,
  .project-actions,
  .actions,
  .hint,
  button,
  .link-button {
    display: none !important;
  }

  .shell {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .workspace {
    display: block !important;
    gap: 0;
  }

  .workspace.hidden {
    display: none !important;
  }

  .print-cover {
    display: block;
    break-after: page;
    page-break-after: always;
    padding: 8mm 0 4mm;
  }

  .print-cover h1 {
    margin: 6px 0 8px;
    font-size: 26pt;
    letter-spacing: -.03em;
    color: #102f40;
  }

  .print-cover-sub {
    margin: 0 0 18px;
    color: #66727d;
  }

  .print-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid #d8e0e6;
    border-radius: 8px;
  }

  .print-meta div { margin: 0; }
  .print-meta dt {
    margin: 0 0 2px;
    font-size: 9pt;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #66727d;
  }
  .print-meta dd {
    margin: 0;
    font-size: 11pt;
    font-weight: 700;
    word-break: break-all;
  }

  .print-section-label {
    margin: 0 0 8px;
    font-size: 9pt;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #66727d;
  }

  .print-usage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .print-usage-grid div { min-width: 0; }

  .print-usage-grid span {
    display: block;
    margin-bottom: 2px;
    font-size: 8.5pt;
    color: #66727d;
  }

  .print-usage-grid strong {
    display: block;
    font-size: 10pt;
    word-break: break-word;
  }

  .print-usage-note {
    margin: 8px 0 0;
    font-size: 8.5pt;
    color: #66727d;
  }

  .print-note {
    margin: 0;
    font-size: 9.5pt;
    color: #66727d;
  }

  .card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #d8e0e6;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 14px;
    background: white;
  }

  .project-head { margin-bottom: 12px; }
  .stage-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 12px;
  }
  .stage { box-shadow: none; }

  .table-wrap {
    overflow: visible;
    max-height: none;
  }

  table { min-width: 0; width: 100%; }
  th, td { font-size: 9pt; padding: 6px 5px; }
  th { position: static; background: #f4f6f7; }

  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .analysis-block { break-inside: avoid; page-break-inside: avoid; }
  .report { font-size: 10.5pt; }
  .report h2 { break-after: avoid; page-break-after: avoid; }
  .audit-item { break-inside: avoid; page-break-inside: avoid; }

  a { color: inherit; text-decoration: none; }
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.history-row .history-item { min-width: 0; }
.history-delete {
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  background: transparent;
  color: #9b2c2c;
  padding: 10px 12px;
  cursor: pointer;
  align-self: stretch;
}
.history-delete:hover { background: #fff5f5; border-color: #e5bcbc; }


/* Development-order executive dashboard */
#developmentOrderDashboard { overflow: hidden; }
.exec-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:12px; margin-bottom:14px; }
.exec-card { border:1px solid var(--line); border-radius:12px; padding:15px; background:#f8fafb; min-height:90px; }
.exec-card.exec-primary { background:#f6fbf8; border-color:#cde4d8; }
.exec-card .eyebrow { color:var(--muted); }
.exec-card strong { display:block; margin-top:7px; font-size:16px; line-height:1.35; color:var(--brand); }
.exec-card p { margin:7px 0 0; font-size:12px; color:var(--muted); }
.kpi-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin:12px 0 4px; }
.kpi-card { border:1px solid var(--line); border-radius:10px; padding:12px; background:#fff; }
.kpi-card span { display:block; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.kpi-card strong { display:block; margin:7px 0 2px; font-size:17px; }
.kpi-card small { color:var(--muted); font-size:10px; line-height:1.35; }
.dash-section { margin-top:18px; }
.dash-section h3 { margin:0 0 10px; color:var(--brand); font-size:15px; }
.dash-note, .dash-footnote { color:var(--muted); font-size:11px; }
.timeline { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:8px; }
.timeline-item { position:relative; display:flex; gap:10px; border:1px solid var(--line); border-radius:10px; padding:11px; background:#fbfcfd; }
.timeline-dot { min-width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:#edf3f6; color:var(--brand); font-weight:900; font-size:11px; }
.timeline-item b { font-size:12px; }
.timeline-item p { margin:4px 0; font-size:11px; }
.timeline-item small { color:var(--muted); font-size:10px; }
.gate-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.gate-card { border:1px solid var(--line); border-radius:10px; padding:11px; background:#fff; }
.gate-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.gate-card p { margin:6px 0; font-size:11px; line-height:1.45; }
.gate-card > small { color:var(--muted); }
.score-table { min-width:1100px; }
.heat-cell { display:flex; align-items:center; gap:4px; }
.heat-cell i { width:32px; height:7px; border-radius:999px; background:linear-gradient(to right,var(--accent) var(--pct),#edf0f2 var(--pct)); display:inline-block; }
.posture-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.posture-card { border:1px solid var(--line); border-top:4px solid var(--brand); border-radius:10px; padding:11px; background:#fff; }
.posture-card.controlled_release { border-top-color:var(--accent); }
.posture-card.selective_option { border-top-color:#7b8790; }
.posture-card.defer_preserve { border-top-color:var(--bad); }
.posture-card span { display:block; font-size:10px; color:var(--muted); font-weight:800; text-transform:uppercase; margin-top:4px; }
.posture-card p { font-size:11px; line-height:1.45; margin:7px 0 0; }
.recon-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.recon-card { border:1px solid var(--line); border-radius:10px; padding:11px; background:#fff; }
.recon-card b { display:block; margin-bottom:7px; }
.recon-card div { font-weight:800; font-size:12px; }
.recon-card div span { color:var(--bad); padding:0 4px; }
.recon-card p { font-size:11px; color:var(--muted); }
.recon-card small { font-size:10px; font-weight:800; }
.risk-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.risk-card { border:1px solid var(--line); border-radius:10px; padding:11px; background:#fff; }
.risk-card.risk-high { border-left:4px solid var(--bad); }
.risk-card.risk-medium { border-left:4px solid var(--accent); }
.risk-card.risk-low { border-left:4px solid var(--good); }
.risk-card p { font-size:11px; margin:6px 0 0; }
.graph-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.graph-edge { border:1px solid var(--line); border-radius:9px; padding:9px; background:#fbfcfd; }
.graph-edge b { display:block; font-size:11px; }
.graph-edge span { display:block; margin-top:4px; color:var(--muted); font-size:10px; }
.inversion { background:#fff9e9; border:1px solid #eadcae; border-radius:12px; padding:13px; }
.inversion ul { margin:7px 0 0; }
@media (max-width:1100px){
  .exec-grid{grid-template-columns:1fr 1fr;}
  .kpi-grid{grid-template-columns:repeat(3,1fr);}
  .posture-grid{grid-template-columns:repeat(2,1fr);}
  .recon-grid,.graph-grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:700px){
  .exec-grid,.kpi-grid,.gate-grid,.posture-grid,.recon-grid,.risk-grid,.graph-grid{grid-template-columns:1fr;}
}

@media print {
  #developmentOrderDashboard { display:block !important; break-after: page; page-break-after: always; }
  .exec-grid { grid-template-columns: 2fr 1fr 1fr; }
  .kpi-grid { grid-template-columns: repeat(5,1fr); }
  .kpi-card strong { font-size: 12pt; }
  .gate-grid { grid-template-columns: 1fr 1fr; }
  .posture-grid { grid-template-columns: repeat(2,1fr); }
  .recon-grid { grid-template-columns: repeat(2,1fr); }
  .risk-grid { grid-template-columns: 1fr 1fr; }
  .graph-grid { grid-template-columns: repeat(3,1fr); }
  .dash-section { break-inside: avoid; page-break-inside: avoid; }
  .exec-card,.kpi-card,.gate-card,.posture-card,.recon-card,.risk-card,.graph-edge { box-shadow:none; }
}

.finance-list { display:grid; gap:9px; }
.finance-row { display:grid; grid-template-columns:220px 1fr; gap:10px; align-items:center; }
.finance-label { display:flex; flex-direction:column; gap:2px; font-size:11px; }
.finance-label span { color:var(--muted); font-size:10px; }
.finance-bar { height:10px; background:#edf0f2; border-radius:999px; overflow:hidden; }
.finance-bar i { display:block; height:100%; background:var(--accent); border-radius:999px; }
.finance-row small { grid-column:1 / -1; color:var(--muted); font-size:10px; }
@media (max-width:700px){ .finance-row{grid-template-columns:1fr;} .finance-row small{grid-column:auto;} }

/* Standalone cross-angle expense-record export */
.expense-print { display:none; }
.print-expense-meta { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
.print-expense-meta > div, .print-kpi-grid > div, .print-assumption-grid > div { border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fbfcfd; }
.print-expense-meta span, .print-kpi-grid span, .print-assumption-grid span { display:block; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; font-weight:800; }
.print-expense-meta strong, .print-kpi-grid strong, .print-assumption-grid strong { display:block; margin-top:4px; font-size:13px; }
.print-kpi-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:16px; }
.print-expense-block { margin-top:18px; }
.print-expense-block h3 { margin:0 0 9px; color:var(--brand); font-size:15px; }
.print-expense-block p { font-size:11px; line-height:1.5; }
.print-assumption-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }

@media print {
  body.printing-expense-record .workspace > *:not(.print-cover):not(#expenseModelPrint) { display:none !important; }
  body.printing-internal .workspace > *:not(#internalRecord) { display:none !important; }
  body.printing-internal #internalRecord { display:block !important; }
  body.printing-expense-record .print-cover { display:block !important; break-after:page; page-break-after:always; }
  body.printing-expense-record #expenseModelPrint { display:block !important; break-before:avoid; page-break-before:avoid; border:0; margin:0; padding:0; }
  body.printing-expense-record .print-expense-meta { grid-template-columns:repeat(2,1fr); }
  body.printing-expense-record .print-kpi-grid { grid-template-columns:repeat(3,1fr); }
  body.printing-expense-record .print-assumption-grid { grid-template-columns:repeat(2,1fr); }
  body.printing-expense-record .print-expense-block { break-inside:auto; page-break-inside:auto; }
  body.printing-expense-record .print-section-heading h2 { margin:4px 0 4px; font-size:22pt; }
  body.printing-expense-record .print-section-heading p { margin:0 0 16px; color:#66727d; }
  body.printing-expense-record .print-expense-block .table-wrap { break-inside:auto; page-break-inside:auto; }
  body.printing-expense-record .print-expense-block table { break-inside:auto; page-break-inside:auto; }
  body.printing-expense-record .print-expense-block tr { break-inside:avoid; page-break-inside:avoid; }
}


.print-strategy-grid, .print-gate-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.print-strategy-grid > div, .print-gate-grid > div { border:1px solid var(--line); border-radius:10px; padding:10px; background:#fbfcfd; }
.print-strategy-grid strong, .print-gate-grid strong { display:block; font-size:11px; margin-bottom:5px; }
.print-strategy-grid p, .print-gate-grid p { margin:0; font-size:10px; line-height:1.45; }
.executive-callout { border-left:4px solid var(--brand); background:#f6f8f9; padding:10px 12px; margin-top:10px; font-size:10.5px; line-height:1.5; }

.report h1 { margin:20px 0 10px; color:var(--brand); font-size:21px; }
.report h2 { margin:18px 0 9px; color:var(--brand); font-size:16px; }
.report h3 { margin:14px 0 7px; color:var(--brand); font-size:13px; }
.report-bullet, .report-numbered { margin:3px 0; line-height:1.5; }
.report-numbered { padding-left:14px; }
.basis-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.basis-card { border:1px solid var(--line); border-radius:10px; padding:11px; background:#fbfcfd; }
.basis-card strong { display:block; font-size:12px; }
.basis-card p { margin:6px 0; font-size:11px; line-height:1.45; }
.basis-card small { color:var(--muted); font-size:9px; }
@media print {
  .print-expense-block .table-wrap { overflow:visible; }
  .print-expense-block table { width:100%; border-collapse:collapse; font-size:8.5px; }
  .print-expense-block th, .print-expense-block td { border-bottom:1px solid var(--line); padding:5px 4px; vertical-align:top; text-align:left; }
  .print-expense-block th { background:#f5f7f8; font-weight:800; }
  .print-expense-block h3 { break-after:avoid; }
  .basis-grid { grid-template-columns:1fr 1fr; }
  .basis-card { break-inside:avoid; page-break-inside:avoid; }
}

.stage small { display:block; margin-top:4px; color:var(--muted); font-size:10px; line-height:1.3; }

/* Controlled variable-review workflow */
.variable-editor-card { scroll-margin-top: 18px; }
.variable-toolbar { display:flex; gap:8px; align-items:center; margin:12px 0; flex-wrap:wrap; }
.variable-toolbar input[type="search"] { flex:1 1 360px; min-width:220px; }
.variable-review-summary { border:1px solid var(--line); border-left:4px solid var(--accent); background:#fffaf0; border-radius:9px; padding:9px 11px; margin:8px 0 12px; font-size:11px; line-height:1.45; }
.variable-review-summary.hidden { display:none; }
.variable-table-wrap { max-height:680px; overflow:auto; }
.variable-table { min-width:920px; }
.variable-table td { vertical-align:top; }
.variable-table td:first-child { min-width:190px; }
.variable-table td:first-child strong { display:block; font-size:11px; line-height:1.35; }
.variable-table td:first-child small { display:block; color:var(--muted); font-size:9px; margin-top:3px; }
.variable-input { width:100%; min-width:120px; padding:7px 8px; border:1px solid var(--line); border-radius:7px; background:#fff; font:inherit; font-size:10px; }
.variable-input.compact { margin-top:5px; }
.muted { color:var(--muted); }
.tag.warn { background:#fff3cd; color:#735400; border-color:#eadcae; }
.tag.bad { background:#ffe9e7; color:#8e231a; border-color:#efc2bd; }
.tag.good { background:#e8f6ed; color:#17643c; border-color:#b8dec6; }
@media (max-width:900px){ .variable-table{min-width:760px;} .variable-table-wrap{max-height:560px;} }

.variable-note { display:block; margin-top:5px; color:var(--muted); font-size:9px; line-height:1.35; max-width:260px; }

.rerun-gate-card { border-left:4px solid var(--accent); }
.rerun-gate-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:10px 0 4px; }
.rerun-gate-grid > div { border:1px solid var(--line); border-radius:9px; padding:10px; background:#fbfcfd; }
.rerun-gate-grid strong { display:block; font-size:11px; margin-bottom:4px; }
.rerun-gate-grid span { display:block; color:var(--muted); font-size:10px; line-height:1.4; }
@media (max-width:900px){ .rerun-gate-grid { grid-template-columns:1fr; } }


/* Executive UX: visible workflow guidance and friendly controls */
.workflow-guide { border-left:4px solid var(--brand); background:#fbfcfd; }
.workflow-guide-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.workflow-guide-head h2 { margin:3px 0 0; }
.workflow-guide-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.workflow-step-card { display:block; text-align:left; color:var(--brand); background:white; border:1px solid var(--line); padding:12px; border-radius:10px; }
.workflow-step-card:hover { border-color:#bcc8cf; }
.workflow-step-card b { display:inline-grid; place-items:center; min-width:38px; height:24px; border-radius:999px; background:#f6edcf; color:#6d5513; font-size:10px; margin-bottom:7px; }
.workflow-step-card span, .workflow-step-card small { display:block; }
.workflow-step-card span { font-size:12px; font-weight:900; }
.workflow-step-card small { color:var(--muted); font-size:10px; line-height:1.4; margin-top:4px; }
.info-button { width:28px; height:28px; padding:0; border-radius:50%; background:#f4f7f8; color:var(--brand); border:1px solid var(--line); }
.review-data-btn { white-space:nowrap; }
.section-subtitle { margin:2px 0 0; color:var(--muted); font-size:10px; }
.info-callout { display:grid; grid-template-columns:145px 1fr; gap:6px 12px; margin-top:10px; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#f8fafb; font-size:11px; line-height:1.4; }
.info-callout b { color:var(--brand); }
.source-excerpt { display:block; margin-top:4px; color:#66727d; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.variable-editor-ready { scroll-margin-top:18px; }
@media (max-width:900px){ .workflow-guide-grid{grid-template-columns:1fr;} .info-callout{grid-template-columns:1fr;} .project-actions{flex-wrap:wrap; justify-content:flex-end;} }
