:root {
  --navy: #101720;
  --ink: #16202b;
  --muted: #67757f;
  --teal: #0b6bcb;
  --teal-dark: #0a4c8f;
  --teal-pale: #eef3f8;
  --cyan: #8fc2f0;
  --blue: #0b6bcb;
  --gold: #e6a35c;
  /* neutral hairlines carry the structure now that panels are flat */
  --border: #e6e8ea;
  --border-strong: #d6dade;
  --surface: #ffffff;
  --surface-sunken: #fafafa;
  --canvas: #f6f7f8;
  /* elevation only where something genuinely floats above the page */
  --shadow-pop: 0 4px 14px rgba(16, 23, 32, .10);
  --shadow-modal: 0 12px 40px rgba(16, 23, 32, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; }
.section-block { margin-top: 28px; scroll-margin-top: 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 10px; }
.section-heading h2 { margin: 5px 0 0; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.section-heading p { max-width: 520px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: right; }
.eyebrow, .section-kicker, .recommendation-label, .panel-heading span { display: inline-block; color: var(--teal-dark); font-size: 11px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { padding: 8px 11px; border: 1px solid var(--border); background: var(--teal-pale); border-radius: 4px; }
.section-kicker { color: var(--teal-dark); }

/* App shell: sidebar + main */
.app-shell { display: flex; align-items: flex-start; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; flex: 0 0 280px; width: 280px; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px; padding: 20px 18px 22px;
  background: var(--surface); border-right: 1px solid var(--border);
}
.mobile-topbar { display: none; }
.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-link { display: flex; align-items: center; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; text-align: left; transition: .15s ease; }
.sidebar-link:hover { background: var(--surface-sunken); color: var(--ink); }
.sidebar-link.active { background: var(--navy); color: white; }
.sidebar-run { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-sunken); }
.sidebar-run-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sidebar-run-head span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.text-link { border: 0; background: transparent; color: var(--teal); font-size: 11px; font-weight: 800; }
.sidebar-run h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.run-coords { margin: 2px 0 12px; color: var(--muted); font-size: 11px; }
.run-facts { margin: 0 0 14px; display: grid; gap: 8px; }
.run-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.run-facts dt { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.run-facts dd { margin: 0; color: var(--ink); font-size: 11.5px; font-weight: 750; text-align: right; max-width: 60%; }
.sidebar-action { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--navy); color: white; font-size: 12px; font-weight: 800; }
.sidebar-action:hover { opacity: .9; }
.sidebar-contact { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sidebar-contact a { color: var(--teal); font-weight: 700; }
.sidebar-foot { margin-top: auto; padding-top: 14px; color: #9aabb3; font-size: 10px; line-height: 1.5; }
.app-main { flex: 1; min-width: 0; padding: 18px 14px 44px; }
.assumptions-panel { max-width: 1200px; margin: 0 auto 0 0; padding: 16px 0; }
.assumptions-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.assumptions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.library-panel { max-width: 1600px; margin: 0 auto 0 0; padding: 16px 0; }
.library-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.library-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.tier-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tier-dot-a { background: #1E8A5F; }
.tier-dot-b { background: #B8672E; }
.tier-dot-c { background: #C1432E; }
.library-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.library-card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; overflow: hidden; display: flex; flex-direction: column; }
.library-card-image { height: 130px; background: var(--surface-sunken); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.library-card-image img { max-width: 78%; max-height: 78%; object-fit: contain; }
.library-card-image.no-image img { display: none; }
.library-card-image.no-image::after { content: "No image on file"; font-size: 11px; color: var(--muted); }
.library-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.library-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.library-card-head h4 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.tier-pill { flex: 0 0 auto; padding: 4px 8px; border-radius: 4px; font-size: 9.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.tier-pill-a { background: #E4F5EC; color: #1E8A5F; }
.tier-pill-b { background: #FFF1E6; color: #B8672E; }
.tier-pill-c { background: #FBE4E1; color: #C1432E; }
.library-card-family { margin: 0; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.isotherm-curve { width: 100%; height: 60px; color: var(--teal); }
.library-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.library-card-stats span { display: block; color: var(--muted); font-size: 9.5px; }
.library-card-stats strong { display: block; margin-top: 2px; font-size: 13px; letter-spacing: -.01em; }
.library-card-source { margin: 0; font-size: 11px; color: var(--muted); }
.library-card-source a { color: var(--teal-dark); }
.library-card-source-warn { color: #B8672E; }
.library-card-note { margin: 0; font-size: 11.5px; color: var(--ink); line-height: 1.45; }
.library-loading { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }
@media (max-width: 980px) { .library-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .library-grid { grid-template-columns: 1fr; } .library-card-stats { grid-template-columns: repeat(2, 1fr); } }
.assumptions-group { padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.assumptions-group h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: -.01em; }
.assumptions-group dl { margin: 0; display: grid; gap: 10px; }
.assumptions-group dt { color: var(--muted); font-size: 10.5px; font-weight: 750; }
.assumptions-group dd { margin: 2px 0 0; color: var(--ink); font-size: 13px; font-weight: 800; }
.assumptions-group dd small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.4; }

/* Console: single-window live analysis dashboard */
.console { max-width: 1600px; margin: 0 auto 0 0; padding: 4px 0 8px; border: 0; background: transparent; }
.console-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.console-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-chip { padding: 8px 13px; border: 1px solid var(--border); border-radius: 4px; background: white; color: var(--ink); font-size: 11px; font-weight: 800; transition: .15s ease; }
.preset-chip:hover { border-color: var(--border-strong); background: var(--surface-sunken); }
.preset-chip.active { background: var(--navy); border-color: var(--navy); color: white; }
.console-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.console-controls-group { display: flex; flex-wrap: nowrap; flex: 1 1 auto; min-width: 360px; gap: 12px; }
.console-controls-group label { flex: 0 1 130px; min-width: 110px; margin-top: 0; }
.console-controls .source-chip { margin-left: auto; align-self: center; }
.console-controls .primary-button { flex: 0 0 auto; align-self: center; min-width: 130px; padding: 11px 14px; gap: 10px; border-radius: 6px; font-size: 13px; }
.source-chip { padding: 7px 11px; border-radius: 4px; background: var(--teal-pale); color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.advanced-panel { margin-top: 8px; padding: 0 2px; }
.advanced-panel summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 800; list-style: none; }
.advanced-panel summary::-webkit-details-marker { display: none; }
.advanced-panel summary:before { content: "\25B8  "; }
.advanced-panel[open] summary:before { content: "\25BE  "; }
.scenario-card.advanced-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px 0 0; border: 0; box-shadow: none; background: transparent; margin-top: 4px; border-top: 1px dashed var(--border); padding-top: 16px; }
.console-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.console-chart-card .plot { min-height: 300px; }
.chart-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 6px 8px; }
.chart-card-title { margin: 0; font-size: 13px; font-weight: 750; color: var(--ink); }
.archetype-badge { display: inline-block; padding: 6px 10px; border-radius: 4px; background: var(--teal-pale); color: var(--teal-dark); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.archetype-badge:empty { display: none; }
.archetype-badge.atypical { background: #FFECD9; color: #8a4a1f; }
.timeline-card.inline { border: 0; box-shadow: none; background: transparent; padding: 4px 0 0; margin-top: 0; }
.timeline-card.inline .timeline, .timeline-card.inline .timeline-ticks, .timeline-card.inline .timeline-legend { padding: 0 46px 0 44px; }
.console-summary { margin-top: 8px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.console-summary h4, .console-summary .source-badge { display: none; }
.console-summary .summary-list { display: flex; flex-wrap: wrap; gap: 8px; }
.console-summary .summary-item { flex: 1 1 120px; }
.console-recommendation { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.console-material-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.console-recommendation h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; color: var(--ink); }
.console-yield-value.meets-target { color: #059669; }
.winner-reasons { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.winner-reasons li { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border-radius: 6px; background: var(--surface-sunken); border: 1px solid var(--border); }
.winner-reasons li b { display: block; font-size: 12px; color: var(--ink); }
.winner-reasons li span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.status-icon { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; margin-top: 1px; }
.status-icon.pass { background: #E4F5EC; color: #1E8A5F; }
.status-icon.warn { background: #FFF1E6; color: #B8672E; }
.status-icon.fail { background: #FBE4E1; color: #C1432E; }
.status-icon svg { width: 11px; height: 11px; display: block; }
.molecule-figure { margin: 8px 0 0; text-align: center; }
.molecule-figure[hidden] { display: none; }
.molecule-art { width: 100%; max-width: 220px; max-height: 200px; object-fit: contain; border-radius: 6px; }
.molecule-caption { margin: 6px 0 0; color: #9aabb3; font-size: 10px; text-align: center; line-height: 1.4; }
.pill { display: inline-flex; padding: 5px 10px; border-radius: 4px; font-size: 11px; font-weight: 800; vertical-align: middle; }
.pill-good { background: #E4F5EC; color: #1E8A5F; }
.pill-warn { background: #FFF1E6; color: #B8672E; }
.pill-accent { background: var(--teal-pale); color: var(--teal-dark); }
.pill-caution { background: #FBE4E1; color: #7a2a1d; }
.rec-header { margin-top: 16px; }
.rec-header h1 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 26px; letter-spacing: -.03em; }
.rec-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }
.stat span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.stat strong { display: block; margin-top: 6px; color: var(--ink); font-size: 19px; letter-spacing: -.03em; }
.stat small { display: block; margin-top: 3px; color: #81929b; font-size: 10px; }
.global-footer { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); }
.global-footer p { margin: 0; color: var(--muted); font-size: 12px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; color: #9aabb3; font-size: 10.5px; }
.chart-annotation { margin: 6px 8px 0; color: var(--muted); font-size: 11px; }
.console-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.console-footer p { margin: 0; max-width: 560px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.console-footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ghost-button { padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; background: white; color: var(--ink); font-weight: 800; font-size: 12px; transition: .15s ease; }
.ghost-button:hover { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-pale); }

.scenario-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 22px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: none; }
.field-group { padding: 4px 9px; }.field-group + .field-group { border-left: 1px solid var(--border); padding-left: 24px; }
.field-group-title { margin-bottom: 13px; color: var(--ink); font-size: 13px; font-weight: 750; }
label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
label + label { margin-top: 15px; }
select { width: 100%; margin-top: 7px; padding: 11px 12px; color: var(--ink); border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-sunken); outline: none; }
select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11,107,203,.12); }
output { float: right; color: var(--ink); font-weight: 750; }
input[type="range"] { width: 100%; margin: 14px 0 0; accent-color: var(--teal-dark); }
input[type="text"], input[type="email"], input[type="date"], input[type="number"] { width: 100%; margin-top: 7px; padding: 11px 12px; color: var(--ink); border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-sunken); outline: none; font-size: 12px; }
input[type="text"]:focus, input[type="email"]:focus, input[type="date"]:focus, input[type="number"]:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11,107,203,.12); }
.label-note { color: #8a9ba2; font-weight: 600; text-transform: none; letter-spacing: 0; }
.field-note { display: block; margin-top: 6px; font-size: 10px; line-height: 1.4; }
.fallback-note { color: #8a4a1f; font-weight: 750; }
.fallback-note.is-live { color: var(--muted); font-weight: 600; }
.demand-input { display: flex; align-items: center; gap: 8px; }
.demand-input input[type="number"] { margin-top: 7px; }
.demand-input .unit { margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.location-search { position: relative; }
.location-results { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; background: white; box-shadow: var(--shadow-pop); }
.location-results li { padding: 9px 10px; border-radius: 5px; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.location-results li:hover, .location-results li.active { background: var(--teal-pale); }
.location-results li small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; }
.location-selected { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 9px 11px; border: 1px solid #dbe4ee; border-radius: 6px; background: var(--teal-pale); color: var(--teal-dark); font-size: 11px; font-weight: 800; }
.location-selected[hidden] { display: none; }
.location-selected button { border: 0; background: transparent; color: var(--teal-dark); font-weight: 750; font-size: 14px; line-height: 1; cursor: pointer; }
.input-note { margin: 17px 0 0; padding: 11px 12px; color: #8a4a1f; background: #FFF1E6; border: 1px solid #FFC9A0; border-radius: 6px; font-size: 11px; line-height: 1.45; }
.primary-button { min-width: 170px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 14px 17px; color: white; border: 0; border-radius: 6px; background: var(--navy); font-weight: 750; transition: .18s ease; }
.primary-button:hover { background: #26303c; }.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.chip { padding: 7px 9px; color: var(--teal-dark); background: var(--teal-pale); border: 1px solid #dbe4ee; border-radius: 4px; font-size: 11px; font-weight: 700; }
.progress-copy { display: flex; justify-content: space-between; margin-top: 20px; color: var(--muted); font-size: 11px; }.progress-copy b { color: var(--ink); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }.metric { padding: 16px 17px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }.metric span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }.metric strong { display: block; margin-top: 7px; color: var(--ink); font-size: 23px; letter-spacing: -.035em; }.metric small { display: block; margin-top: 3px; color: #81929b; font-size: 10px; }
.readiness-ok { color: #1E8A5F; }.readiness-bad { color: #C1432E; }
.evidence-breakdown-card { margin-top: 8px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }
.evidence-breakdown-card h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: -.01em; }
.evidence-breakdown-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; }
.evidence-breakdown-list div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.evidence-breakdown-list dt { color: var(--muted); }
.evidence-breakdown-list dd { margin: 0; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.evidence-breakdown-note { margin: 0; font-size: 12px; color: var(--muted); }
.cost-breakdown-card { margin: 8px 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }
.cost-breakdown-card h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: -.01em; }
.cost-breakdown-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 16px; }
.cost-breakdown-list div { display: flex; flex-direction: column; gap: 4px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.cost-breakdown-list dt { color: var(--muted); }
.cost-breakdown-list dd { margin: 0; font-weight: 800; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.cost-breakdown-note { margin: 10px 0 0; font-size: 11px; color: var(--muted); }
@media (max-width: 720px) { .evidence-breakdown-list, .cost-breakdown-list { grid-template-columns: 1fr; } }
.reason-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }.reason { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }.reason b:first-child { display: flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 5px; color: var(--teal-dark); background: var(--teal-pale); font-size: 11px; }.reason strong { display: block; margin-top: 10px; font-size: 13px; }.reason p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.48; }
.notice { margin-top: 8px; padding: 13px 15px; border-radius: 6px; font-size: 12px; line-height: 1.5; }.notice-gold { color: #8a4a1f; background: #FFF1E6; border: 1px solid #FFC9A0; border-left: 4px solid var(--gold); }.notice-blue { color: #25486f; background: #eef6ff; border: 1px solid #c9def6; border-left: 4px solid var(--blue); }.notice-red { color: #7a2a1d; background: #FBE4E1; border: 1px solid #f3c2ba; border-left: 4px solid #C1432E; }.tier-tag { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 4px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; background: #FFF1E6; color: #B8672E; vertical-align: middle; }.tier-tag-caution { background: #FBE4E1; color: #7a2a1d; }
.tabs { display: flex; gap: 5px; margin-top: 12px; padding: 5px; overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }.tab-button { flex: 1; min-width: 165px; padding: 10px 12px; color: var(--muted); border: 0; border-radius: 5px; background: transparent; font-size: 12px; font-weight: 800; }.tab-button.active { color: white; background: var(--navy); box-shadow: none; }
.tab-panel { display: none; padding-top: 16px; }.tab-panel.active { display: block; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 10px; }.panel-heading span { color: var(--teal-dark); }.panel-heading h3 { margin: 5px 0 0; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }.panel-heading p { max-width: 440px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.chart-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(240px, .65fr); gap: 8px; }.chart-card, .summary-card, .timeline-card, .detail-card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }.chart-card { padding: 6px 8px; min-width: 0; }.plot { width: 100%; min-width: 0; min-height: 430px; }.summary-card { padding: 18px; }.summary-card h4 { margin: 0 0 14px; font-size: 14px; }.summary-list { display: grid; gap: 9px; }.summary-item { padding: 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-sunken); }.summary-item span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }.summary-item strong { display: block; margin-top: 5px; font-size: 17px; }.source-badge { display: inline-flex; margin-top: 14px; padding: 6px 8px; color: var(--teal-dark); background: var(--teal-pale); border-radius: 4px; font-size: 10px; font-weight: 800; }
.timeline-card { margin-top: 8px; padding: 17px; }.timeline-legend { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 12px; color: var(--muted); font-size: 10px; font-weight: 750; }.timeline-legend span { display: flex; align-items: center; gap: 6px; }.timeline-legend i { width: 9px; height: 9px; border-radius: 3px; }.capture-key { background: var(--teal); }.release-key { background: var(--gold); }.idle-key { background: #EAEDED; }
.timeline { display: grid; grid-template-columns: repeat(24, 1fr); gap: 0; }.timeline-cell { height: 38px; border-radius: 0; position: relative; transition: .14s ease; box-shadow: inset -4px 0 0 rgba(255,255,255,.85); }.timeline-cell:first-child { border-radius: 4px 0 0 4px; }.timeline-cell:last-child { border-radius: 0 4px 4px 0; box-shadow: none; }.timeline-cell.capture { background: var(--teal); }.timeline-cell.release { background: var(--gold); }.timeline-cell.idle { background: #EAEDED; }.timeline-cell:hover { filter: brightness(.94); }.timeline-cell:after { content: attr(data-hour); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--surface); font-size: 8px; font-weight: 750; opacity: 0; }.timeline-cell.idle:after, .timeline-cell.release:after { color: var(--ink); }.timeline-cell:hover:after { opacity: 1; }
.timeline-ticks { display: flex; justify-content: space-between; margin-top: 7px; color: #8a9ba2; font-size: 9px; }
.candidate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }.candidate { padding: 17px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }.candidate.top { border-color: var(--navy); }.candidate-rank { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; border-radius: 5px; color: white; background: var(--navy); font-size: 11px; font-weight: 750; }.candidate.top .candidate-rank { background: var(--teal-dark); }.candidate h4 { margin: 12px 0 3px; font-size: 20px; letter-spacing: -.035em; }.candidate-yield { color: var(--teal-dark); font-size: 16px; font-weight: 750; }.candidate-meta { margin-top: 6px; color: var(--muted); font-size: 11px; }.candidate-pill { display: inline-block; margin-top: 10px; padding: 6px 8px; color: var(--teal-dark); background: var(--teal-pale); border-radius: 4px; font-size: 10px; font-weight: 800; }
.compare-plot { min-height: 390px; }.detail-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 8px; margin-top: 8px; }.detail-card { padding: 18px; }.detail-select-label { color: var(--ink); font-size: 13px; }.detail-card h4 { margin: 17px 0 7px; font-size: 18px; }.detail-card p { color: var(--muted); font-size: 12px; line-height: 1.55; }.detail-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 13px; }.detail-stat { padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-sunken); }.detail-stat span { display: block; color: var(--muted); font-size: 9px; font-weight: 750; }.detail-stat strong { display: block; margin-top: 4px; font-size: 15px; }.limitation { margin-top: 13px; padding: 11px; color: #8a4a1f; background: #FFF1E6; border: 1px solid #FFC9A0; border-radius: 6px; font-size: 11px; line-height: 1.45; }

.evidence-view { margin-top: 8px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }
.evidence-head h4 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.015em; }
.evidence-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.evidence-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.evidence-body .chart-card { padding: 8px; }
.evidence-side { display: flex; flex-direction: column; gap: 8px; }
.evidence-fact { padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-sunken); }
.evidence-fact span { display: block; color: var(--muted); font-size: 9.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .03em; }
.evidence-fact strong { display: block; margin-top: 5px; font-size: 14px; letter-spacing: -.01em; }
.evidence-fact strong a { color: var(--teal-dark); font-size: 12px; }
.evidence-fact small { display: block; margin-top: 3px; color: #81929b; font-size: 10px; }
.evidence-fact-warn { border-color: #FFC9A0; background: #FFF1E6; }
.evidence-extrapolating { color: #B8672E; }
.evidence-interpolating { color: #1E8A5F; }
.evidence-loading { text-align: center; color: var(--muted); padding: 30px 0; }
.lomo-validation { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.lomo-validation h5 { margin: 0 0 6px; font-size: 13px; }
.lomo-validation p { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.lomo-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.lomo-table th { text-align: left; padding: 6px 8px; color: var(--muted); font-weight: 750; border-bottom: 1px solid var(--border); }
.lomo-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.lomo-footnote { margin: 10px 0 0 !important; font-size: 10.5px !important; }
@media (max-width: 900px) { .evidence-body { grid-template-columns: 1fr; } }
.table-card { padding: 0; overflow: hidden; }.table-scroll { overflow-x: auto; }table { width: 100%; border-collapse: collapse; font-size: 10px; }th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }th { color: var(--muted); background: var(--surface-sunken); font-weight: 800; }td { color: var(--ink); }tbody tr:hover { background: var(--surface-sunken); }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.method-grid article { padding: 15px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }.method-grid article b { display: flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 5px; color: var(--teal-dark); background: var(--teal-pale); font-size: 11px; }.method-grid article strong { display: block; margin: 10px 0 4px; font-size: 12px; }.method-grid article span { color: var(--muted); font-size: 10px; line-height: 1.45; }.model-metric-grid { margin-bottom: 12px; }.model-layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }.model-plot { min-height: 350px; }.evaluation-list { margin: 0; padding: 0; list-style: none; }.evaluation-list li { padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; }.evaluation-list b { display: block; color: var(--ink); font-size: 12px; margin-top: 3px; }
.responsible-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.responsible-grid article { padding: 22px; border-radius: 8px; }.can-card { border: 1px solid var(--border); background: var(--teal-pale); }.cannot-card { border: 1px solid #f0dcc6; background: #fdf6ef; }.responsible-grid article > span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .10em; }.responsible-grid h3 { margin: 7px 0 13px; font-size: 25px; }.responsible-grid ul { margin: 0; padding-left: 19px; }.responsible-grid li { margin: 9px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }.validation-path { margin-top: 13px; padding: 17px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }.validation-path > span { color: var(--teal-dark); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }.validation-path div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 11px; }.validation-path b { padding: 7px 9px; color: var(--ink); background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 4px; font-size: 10px; }.validation-path i { color: var(--teal); font-style: normal; }
/* Decision detail: tabs, checklists, verdicts, why-tab visualizations */
.decision-detail { margin-top: 20px; }
.detail-tabs { align-items: stretch; }
.detail-tabs .tab-button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; }
.detail-tabs .tab-button b { font-size: 12.5px; }
.detail-tabs .tab-button small { font-size: 10px; font-weight: 650; opacity: .8; }
.detail-tabs .tab-button.active small { opacity: .85; }

.decision-checklist { display: grid; gap: 8px; align-content: start; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.check-row.fail { border-color: #F5C2BA; background: #FFFAF9; }
.check-row.warn { border-color: #FFC9A0; background: #FFFCFA; }
.check-row strong { display: block; font-size: 12px; color: var(--ink); }
.check-row span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.42; }
.checklist-merged { gap: 0; padding: 6px 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; }
.checklist-merged .check-row { border: 0; border-radius: 0; background: transparent; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.checklist-merged .check-row:last-child { border-bottom: 0; }

.candidate-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.candidate-pill { padding: 6px 8px; border-radius: 4px; font-size: 10px; font-weight: 800; }
.loss-why { margin: 8px 0 0; color: var(--muted); font-size: 11px; font-style: italic; }
.loss-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.loss-chip { padding: 4px 7px; border-radius: 4px; background: #FFF1E6; color: #8a4a1f; font-size: 9.5px; font-weight: 800; }

.verdict-pill { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 9.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.verdict-MEETS_TARGET { background: #E4F5EC; color: #1E8A5F; }
.verdict-BELOW_TARGET, .verdict-OUT_OF_DOMAIN { background: #FFF1E6; color: #B8672E; }
.verdict-REGEN_INFEASIBLE, .verdict-INSUFFICIENT_EVIDENCE { background: #FBE4E1; color: #C1432E; }

.why-hero { padding: 18px 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.why-hero-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.why-hero-grid span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.why-hero-grid strong { display: block; margin-top: 5px; font-size: 15px; letter-spacing: -.02em; }
.why-explanation { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--ink); font-size: 12.5px; line-height: 1.55; }
.why-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.score-plot { min-height: 260px; }

.prediction-target-card { margin-top: 8px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.pt-track { position: relative; height: 54px; margin-top: 26px; border-radius: 4px; background: var(--border); }
.pt-range { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: rgba(11,107,203,.20); border: 1px solid rgba(11,107,203,.45); }
.pt-range.warn { background: rgba(184,103,46,.22); border-color: rgba(184,103,46,.55); }
.pt-tick { position: absolute; top: -20px; bottom: -8px; width: 2px; background: var(--ink); transform: translateX(-1px); }
.pt-tick span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--ink); font-size: 10px; font-weight: 800; }
.pt-tick.target { background: var(--navy); }
.pt-tick.target span { color: var(--navy); }
.pt-tick.bound { background: var(--muted); }
.pt-tick.bound span { color: var(--muted); font-weight: 700; top: auto; bottom: -20px; }
.pt-warning { margin: 14px 0 0; color: #8a4a1f; font-size: 11.5px; font-weight: 700; }

.algorithm-expander, .provenance-expander { margin-top: 8px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.algorithm-expander summary, .provenance-expander summary { cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 800; list-style: none; }
.algorithm-expander summary::-webkit-details-marker, .provenance-expander summary::-webkit-details-marker { display: none; }
.algorithm-expander summary:before, .provenance-expander summary:before { content: "\25B8  "; color: var(--muted); }
.algorithm-expander[open] summary:before, .provenance-expander[open] summary:before { content: "\25BE  "; }
.algo-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.algo-list li { display: flex; align-items: flex-start; gap: 12px; }
.algo-list b { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 4px; color: var(--teal-dark); background: var(--teal-pale); font-size: 11px; }
.algo-list strong { display: block; font-size: 12.5px; }
.algo-list span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.algo-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 11px; }
.provenance-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.provenance-grid > div { padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-sunken); }
.provenance-grid span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }
.provenance-grid strong { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.35; }

.verdict-card { padding: 20px 22px; border-radius: 8px; }
.verdict-kicker { display: block; color: var(--muted); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.verdict-card h3 { margin: 8px 0 0; font-size: 24px; letter-spacing: -.03em; }
.verdict-card p { margin: 8px 0 0; font-size: 13px; }
.verdict-good { border: 1px solid #cbe6d9; background: #f2f9f5; color: #14603F; }
.verdict-good h3 { color: #14603F; }
.verdict-bad { border: 1px solid #eec9c2; background: #fdf4f3; color: #8f2c1e; }
.verdict-bad h3 { color: #8f2c1e; }
.verdict-subnote { opacity: .75; font-size: 11.5px !important; }
.validation-path b.current { background: var(--navy); color: white; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid rgba(11,107,203,.45); outline-offset: 2px; }

.loading-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(16,23,32,.45); backdrop-filter: blur(4px); }.loading-overlay[hidden] { display: none; }.loader { width: min(390px, calc(100% - 40px)); padding: 28px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: #16202b; box-shadow: var(--shadow-modal); text-align: center; }.loader i { display: block; width: 42px; height: 42px; margin: 0 auto 16px; border: 4px solid rgba(255,255,255,.13); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }.loader strong { display: block; color: white; font-size: 16px; }.loader span { display: block; margin-top: 7px; color: rgba(222,235,245,.65); font-size: 11px; }@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 120; max-width: 390px; padding: 13px 15px; color: white; background: #9b2c2c; border-radius: 6px; box-shadow: var(--shadow-modal); font-size: 12px; }.toast[hidden] { display: none; }
@media (max-width: 980px) {
  .metric-grid, .method-grid { grid-template-columns: repeat(2, 1fr); }
  .scenario-card.advanced-grid { grid-template-columns: 1fr; }.field-group + .field-group { border-left: 0; border-top: 1px solid var(--border); padding: 18px 9px 4px; }
  .console-grid { grid-template-columns: minmax(0, 1fr); }.chart-layout, .detail-layout, .model-layout { grid-template-columns: minmax(0, 1fr); }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .candidate-grid { grid-template-columns: 1fr; }.reason-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .why-hero-grid { grid-template-columns: repeat(2, 1fr); }
  .provenance-grid, .assumptions-grid { grid-template-columns: repeat(2, 1fr); }

  /* Off-canvas sidebar drawer */
  .app-shell { flex-direction: column; align-items: stretch; }
  .mobile-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 195; width: 100%; padding: 13px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); backdrop-filter: blur(6px);
  }
  .mobile-topbar .brand { font-size: 15px; }
  .sidebar-toggle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 5px; background: white;
  }
  .sidebar-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 200; width: min(82vw, 300px); max-width: 300px;
    box-shadow: var(--shadow-modal); transform: translateX(-100%); transition: transform .25s ease;
  }
  .sidebar .brand { display: none; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 190; background: rgba(16,23,32,.42); }
  .sidebar-backdrop[hidden] { display: none; }
  body.sidebar-open { overflow: hidden; }
  .app-main { padding: 14px 12px 40px; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 18px; }.page-shell { width: min(100% - 22px, 1240px); margin-top: 12px; }.console { padding: 2px 0 6px; }
  .section-heading, .panel-heading { align-items: flex-start; flex-direction: column; }.section-heading p, .panel-heading p { text-align: left; }.metric-grid, .method-grid, .responsible-grid { grid-template-columns: 1fr; }.console-controls { flex-direction: column; align-items: stretch; }.console-controls-group { flex-direction: column; flex-wrap: nowrap; min-width: 0; }.console-controls-group label { flex: 1 1 auto; }.console-controls .source-chip { margin-left: 0; align-self: flex-start; }.console-controls .primary-button { width: 100%; min-width: 0; }.timeline-cell { height: 31px; }.tabs { justify-content: flex-start; }.tab-button { flex: 0 0 auto; min-width: 130px; }.detail-stats { grid-template-columns: 1fr; }
  .rec-header h1 { font-size: 21px; flex-wrap: wrap; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
  .why-hero-grid, .provenance-grid, .assumptions-grid { grid-template-columns: 1fr; }
  .evidence-body { grid-template-columns: 1fr; }
  .console-presets { width: 100%; }
  .preset-chip { flex: 1 1 calc(50% - 8px); text-align: center; }
  .timeline-card.inline .timeline, .timeline-card.inline .timeline-ticks, .timeline-card.inline .timeline-legend { padding: 0 6px; }
  select, input[type="text"], input[type="email"], input[type="date"], input[type="number"] { font-size: 16px; }
  table { font-size: 11px; }

  /* Touch targets: these all measured under 20px tall on a phone. Taller boxes
     around the native range thumb keep accent-color styling intact. */
  input[type="range"] { height: 36px; margin: 4px 0 0; }
  .text-link { padding: 9px 6px; margin: -9px -6px; }
  .advanced-panel summary, .algorithm-expander summary, .provenance-expander summary { padding: 10px 0; }
  .sidebar-contact a { display: inline-block; padding: 4px 0; }
  .location-results li { padding: 12px 10px; }
  .timeline-cell { height: 34px; }
}

#results { display: none; }
