:root {
  --navy: #102d47;
  --navy-2: #173c5c;
  --ink: #162433;
  --muted: #667587;
  --line: #dce5eb;
  --line-soft: #edf2f5;
  --paper: #ffffff;
  --canvas: #f3f6f8;
  --cyan: #44c2c8;
  --cyan-dark: #168a91;
  --cyan-soft: #e8f8f7;
  --blue-soft: #e8f1fb;
  --amber: #eaa43b;
  --amber-soft: #fff5dc;
  --green: #198865;
  --green-soft: #e9f7f1;
  --red: #c74747;
  --red-soft: #fff0ef;
  --shadow: 0 18px 45px rgba(16, 45, 71, .08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; left: 12px; top: -50px; z-index: 999; padding: 10px 14px; background: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(16, 45, 71, .96); color: white; backdrop-filter: blur(14px); }
.header-inner { max-width: 1580px; height: 72px; margin: 0 auto; padding: 0 34px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark { width: 169px; height: 43px; display: grid; place-items: center; flex-shrink: 0; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media(max-width:650px) { .brand-mark { width: 119px; height: 30px; } .brand strong { max-width: 150px; } }
.brand span:last-child { display: grid; }
.brand strong { font-size: 15px; letter-spacing: .04em; }
.brand small { color: #adc0d0; margin-top: 2px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.top-nav { display: flex; align-items: center; gap: 28px; font-size: 13px; color: #c5d4df; }
.top-nav a:hover { color: white; }
.results[data-invalid="true"] > * { display: none !important; }
.funding-summary { display: grid; gap: 10px; padding: 18px 24px; margin-bottom: 18px; font-size: 13px; color: #245267; }
.funding-summary small { line-height: 1.6; color: #607b89; }
.review-toggle { flex: 0 0 auto; padding: 7px 10px; color: #b8d9dd; background: transparent; border: 1px solid rgba(184,217,221,.3); border-radius: 999px; cursor: pointer; font-size: 10px; }
.review-toggle[aria-pressed="true"] { color: var(--navy); background: var(--cyan); border-color: var(--cyan); font-weight: 800; }
.model-chip { font-size: 11px; color: #a9cbd0; border: 1px solid rgba(68, 194, 200, .35); padding: 7px 10px; border-radius: 999px; }

.hero { min-height: 320px; padding: 68px max(34px, calc((100vw - 1512px) / 2)); color: white; background: var(--navy); display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 560px; height: 560px; right: -140px; bottom: -390px; border: 1px solid rgba(68, 194, 200, .18); border-radius: 50%; box-shadow: 0 0 0 75px rgba(68, 194, 200, .025), 0 0 0 150px rgba(68, 194, 200, .02); }
.hero-copy { position: relative; z-index: 1; max-width: 760px; }
.eyebrow, .section-kicker { margin: 0 0 10px; color: var(--cyan-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.hero .eyebrow { color: #a4dfe1; display: flex; align-items: center; gap: 9px; }
.hero .eyebrow span { display: block; width: 26px; height: 2px; background: var(--cyan); }
.hero h1 { margin: 0; font-size: clamp(40px, 4.2vw, 68px); line-height: 1.06; letter-spacing: -.045em; }
.hero h1 em { color: var(--cyan); font-style: normal; }
.hero-intro { max-width: 680px; margin: 22px 0 0; color: #b8c9d6; font-size: 15px; line-height: 1.8; }
.hero-facts { position: relative; z-index: 1; display: flex; align-items: stretch; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; backdrop-filter: blur(8px); }
.hero-facts div { min-width: 142px; padding: 20px 22px; display: flex; align-items: flex-start; gap: 10px; }
.hero-facts div + div { border-left: 1px solid rgba(255,255,255,.1); }
.hero-facts strong { color: var(--cyan); font-size: 20px; }
.hero-facts span { color: #b6c8d5; font-size: 11px; line-height: 1.55; }

.workspace { max-width: 1600px; margin: 0 auto; padding: 34px; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 26px; align-items: start; }
.controls, .panel, .kpi-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.controls { position: sticky; top: 96px; max-height: calc(100vh - 118px); overflow: auto; padding: 24px; scrollbar-width: thin; }
.controls-head, .section-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.controls h2, .results h2 { margin: 0; color: var(--navy); font-size: 25px; letter-spacing: -.03em; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); background: white; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.icon-button:hover { color: var(--cyan-dark); border-color: var(--cyan); }
.icon-button svg { width: 18px; }
.preset-fieldset { border: 0; padding: 0; margin: 24px 0 18px; }
.preset-fieldset legend { font-size: 12px; font-weight: 800; margin-bottom: 9px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--canvas); border-radius: 11px; }
.segmented button { border: 0; background: transparent; border-radius: 8px; padding: 9px 5px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.segmented button.active { color: white; background: var(--navy-2); box-shadow: 0 5px 14px rgba(16,45,71,.18); }
.control-note, .privacy-note { color: #83909e; font-size: 11px; line-height: 1.55; }
.control-note { margin: 8px 1px 0; }
.form-section { padding: 17px 0; border-top: 1px solid var(--line-soft); }
.form-section h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 13px; color: var(--navy); font-size: 13px; }
.section-toggle { border: 0; background: transparent; color: #7f8c98; font-size: 11px; cursor: pointer; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.field-grid label { position: relative; color: #475767; font-size: 11px; font-weight: 650; }
.unit { float: right; color: #84929e; font-size: 10px; font-weight: 500; margin-top: 2px; }
input, select { width: 100%; height: 38px; margin-top: 6px; padding: 0 10px; color: var(--navy); font-size: 13px; font-weight: 750; background: #f9fbfc; border: 1px solid #dce5ea; border-radius: 8px; outline: none; transition: .16s ease; }
input:focus, select:focus { border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(68,194,200,.13); background: white; }
input.invalid { border-color: var(--red); background: var(--red-soft); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.select-label { display: block; color: #475767; font-size: 11px; font-weight: 650; }
.city-section { border-top: 0; padding-top: 8px; }
.region-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.region-select-grid label { color: #475767; font-size: 11px; font-weight: 650; }
.region-select-grid label:first-child { grid-column: 1 / -1; }
.city-intelligence { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.intel-card { min-width: 0; padding: 11px; background: #f6f9fa; border: 1px solid var(--line-soft); border-radius: 9px; }
.intel-card:last-child { grid-column: 1 / -1; }
.intel-card > span { display: block; color: #667784; font-size: 10px; }
.intel-card strong { display: block; margin-top: 5px; color: var(--navy); font-size: 17px; line-height: 1.15; }
.intel-card small { display: block; min-height: 34px; margin-top: 6px; color: #667784; font-size: 10px; line-height: 1.5; }
.intel-card a { display: inline-block; margin-top: 6px; color: var(--cyan-dark); font-size: 10px; font-weight: 750; }
.intel-card a[hidden] { display: none; }
.evidence-chip { width: fit-content; display: inline-flex; align-items: center; margin-top: 7px; padding: 4px 8px; color: var(--green); background: var(--green-soft); border: 1px solid #ccebdc; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.2; }
.intel-card .evidence-chip, .climate-summary .evidence-chip { display: inline-flex; color: var(--green); font-size: 10px; }
.evidence-chip.user { color: #2d648f; background: var(--blue-soft); border-color: #cddff1; }
.evidence-chip.estimated { color: #9a681b; background: var(--amber-soft); border-color: #f0ddb1; }
.evidence-chip.pending { color: var(--red); background: var(--red-soft); border-color: #f2d2cf; }
.market-input-card > label:first-child { display: block; color: #596d7c; font-size: 10px; font-weight: 650; }
.market-input-card select { height: 34px; margin-top: 5px; font-size: 11px; }
.exact-fleet-input { display: block; margin-top: 7px; color: #596d7c; font-size: 10px; }
.exact-fleet-input[hidden] { display: none; }
.exact-fleet-input input { height: 34px; margin-top: 4px; font-size: 11px; }
.city-data-status { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.city-data-status span { color: #74838f; font-size: 10px; line-height: 1.5; }
.city-data-status button { flex: 0 0 auto; padding: 7px 9px; color: var(--cyan-dark); background: white; border: 1px solid #acdedd; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 750; }
.city-data-status button:disabled { opacity: .55; cursor: wait; }
.city-data-note { margin: 8px 0 0; padding-left: 9px; color: #697985; border-left: 2px solid #b9dfe0; font-size: 10px; line-height: 1.55; }
.climate-inputs { margin-top: 12px; }
.climate-summary { margin-top: 12px; padding: 12px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; color: var(--navy); background: var(--cyan-soft); border: 1px solid #c8ecea; border-radius: 10px; }
.climate-summary > div { display: flex; flex-direction: column; justify-content: center; }
.climate-summary > div + div { border-left: 1px solid #bde1e0; padding-left: 12px; }
.climate-summary span { color: #476b70; font-size: 10px; }
.climate-summary label { margin-top: 3px; display: flex; align-items: baseline; gap: 4px; }
.climate-summary input { width: 64px; height: auto; margin: 0; padding: 0; background: transparent; border: 0; border-bottom: 1px dashed #73b9b9; border-radius: 0; color: var(--cyan-dark); font-size: 26px; font-weight: 850; box-shadow: none; }
.climate-summary label b { color: #476b70; font-size: 10px; }
.climate-summary strong { margin-top: 5px; font-size: 13px; }
.climate-summary small { margin-top: 4px; color: #587b7f; font-size: 10px; line-height: 1.45; }
.climate-months { margin-top: 10px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.climate-month { padding: 6px 3px; text-align: center; background: #f6f9fa; border: 1px solid var(--line-soft); border-radius: 6px; }
.climate-month span { display: block; color: #73838f; font-size: 10px; }
.climate-month strong { display: block; margin-top: 3px; color: var(--navy); font-size: 11px; }
.climate-actions { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.climate-actions button { flex: 0 0 auto; padding: 8px 10px; color: var(--cyan-dark); background: white; border: 1px solid #acdedd; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 750; }
.climate-actions button:hover { background: var(--cyan-soft); }
.climate-actions button:disabled { opacity: .55; cursor: wait; }
.climate-actions span { color: #74838f; font-size: 10px; line-height: 1.5; text-align: right; }
.historical-upload-section { position: relative; }
.history-upload-card { padding: 12px; background: #f7fafb; border: 1px dashed #abd6d8; border-radius: 10px; }
.history-upload-card.dragging { background: var(--cyan-soft); border-color: var(--cyan-dark); }
.history-file-label { min-height: 64px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; color: var(--navy); background: white; border: 1px solid var(--line-soft); border-radius: 9px; cursor: pointer; transition: .16s ease; }
.history-file-label:hover, .history-file-label:focus-within { border-color: var(--cyan-dark); box-shadow: 0 0 0 3px rgba(68,194,200,.11); }
.history-file-label svg { flex: 0 0 auto; width: 28px; height: 28px; padding: 5px; color: var(--cyan-dark); background: var(--cyan-soft); border-radius: 8px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.history-file-label span { min-width: 0; display: grid; gap: 4px; }
.history-file-label strong { font-size: 12px; }
.history-file-label small { color: #70808d; font-size: 10px; line-height: 1.45; }
.history-upload-actions { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px; }
.history-upload-actions button { padding: 7px 9px; color: var(--cyan-dark); background: white; border: 1px solid #b9dedf; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 750; }
.history-upload-actions button:last-child { color: #76565a; border-color: #e7c4c1; }
#historyUploadStatus { margin: 9px 0 0; color: #667784; font-size: 10px; line-height: 1.55; }
#historyUploadStatus.error { color: var(--red); }
#historyUploadStatus.success { color: var(--green); }
.deployment-mode-group, .battery-cost-group, .equipment-cost-group, .operating-cost-group { position: relative; grid-column: 1 / -1; padding: 11px; background: #f7fafb; border: 1px solid var(--line-soft); border-radius: 10px; }
.deployment-mode-group > label { display: block; color: #475767; font-size: 11px; font-weight: 650; }
.deployment-mode-group > small { display: block; margin-top: 8px; color: #667784; font-size: 10px; line-height: 1.55; }
.battery-cost-group > small, .equipment-cost-group > small, .operating-cost-group > small { display: block; margin-top: 8px; color: #667784; font-size: 10px; line-height: 1.55; }
.battery-cost-field[hidden] { display: none; }
.deployment-mode-group .prototype-annotation-marker, .battery-cost-group .prototype-annotation-marker, .equipment-cost-group .prototype-annotation-marker, .operating-cost-group .prototype-annotation-marker { right: -8px; top: -8px; }
input:disabled, select:disabled { color: #8b98a3; background: #eef2f4; cursor: not-allowed; }
.form-errors { margin: 10px 0; padding: 11px 12px; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: 11px; line-height: 1.6; }
.primary-button { width: 100%; height: 46px; border: 0; border-radius: 10px; color: white; background: var(--cyan-dark); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 800; box-shadow: 0 10px 24px rgba(22,138,145,.22); }
.primary-button:hover { background: #11777d; transform: translateY(-1px); }
.primary-button svg { width: 17px; }
.privacy-note { margin: 11px 0 0; display: flex; justify-content: center; gap: 6px; align-items: center; }
.privacy-note svg { width: 12px; }

.results { min-width: 0; }
.credibility-panel { scroll-margin-top: 92px; position: relative; overflow: visible; }
.credibility-head { align-items: center; }
.confidence-grade { flex: 0 0 auto; padding: 7px 11px; color: var(--green); background: var(--green-soft); border: 1px solid #ccebdc; border-radius: 999px; font-size: 10px; font-weight: 800; }
.confidence-grade.medium { color: #94631b; background: var(--amber-soft); border-color: #f0ddb1; }
.confidence-grade.low { color: var(--red); background: var(--red-soft); border-color: #f2d2cf; }
.credibility-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 22px; }
.confidence-score-card { padding: 18px; background: var(--navy); border-radius: 13px; color: white; }
.confidence-score { display: flex; align-items: baseline; gap: 5px; }
.confidence-score strong { color: var(--cyan); font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.confidence-score span { color: #9fb5c5; font-size: 11px; }
.confidence-meter { height: 7px; margin: 14px 0 12px; overflow: hidden; background: rgba(255,255,255,.12); border-radius: 999px; }
.confidence-meter i { display: block; width: 0; height: 100%; background: var(--cyan); border-radius: inherit; transition: width .45s ease; }
.confidence-score-card p { margin: 0; color: #d9e5eb; font-size: 11px; line-height: 1.55; }
.confidence-score-card small { display: block; margin-top: 9px; color: #aec1ce; font-size: 10px; line-height: 1.55; }
.evidence-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.evidence-item { padding: 10px 11px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; background: #f7f9fb; border: 1px solid var(--line-soft); border-radius: 9px; }
.evidence-item b { color: var(--navy); font-size: 11px; }
.evidence-item strong { color: var(--cyan-dark); font-size: 11px; }
.evidence-item small { grid-column: 1 / -1; color: #596b79; font-size: 10px; line-height: 1.5; }
.evidence-item.pending strong { color: var(--red); }
.confidence-details { margin-top: 9px; border-top: 1px solid var(--line-soft); }
.confidence-details summary { padding: 11px 0 5px; color: var(--cyan-dark); cursor: pointer; font-size: 11px; font-weight: 750; }
.confidence-details ul { margin: 7px 0 0; padding-left: 18px; color: #4f6271; font-size: 10px; line-height: 1.7; }
.report-actions { margin-top: 16px; padding-top: 14px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line-soft); position: relative; }
.report-actions > div { margin-right: auto; display: grid; gap: 3px; }
.report-actions strong { color: var(--navy); font-size: 11px; }
.report-actions span { color: #596b79; font-size: 10px; }
.report-actions button { padding: 9px 11px; color: var(--cyan-dark); background: white; border: 1px solid #b9dedf; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 750; }
.report-actions .primary-report-button { color: white; background: var(--cyan-dark); border-color: var(--cyan-dark); }
.kpi-grid { margin: 16px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi-card { padding: 18px 18px 16px; min-height: 112px; box-shadow: none; }
.kpi-card p { margin: 0 0 13px; color: #596b79; font-size: 11px; }
.investment-kpis .kpi-card > p { display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; }
.investment-kpis .kpi-card > p > span { display: inline; margin: 0; color: inherit; font-size: inherit; }
.investment-kpis .kpi-card > p > .field-reference-button { flex-shrink: 0; margin-left: 0; }
.kpi-card strong { display: block; color: var(--navy); font-size: clamp(18px, 1.55vw, 25px); letter-spacing: -.04em; white-space: nowrap; }
.kpi-card span { display: block; margin-top: 7px; color: #74838f; font-size: 10px; }
.kpi-card.primary { background: var(--cyan-soft); border-color: #bde9e6; }
.kpi-card.primary strong { color: var(--cyan-dark); }
#paybackValue { white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.history-panel-head { align-items: center; }
.history-verdict { flex: 0 0 auto; padding: 7px 11px; color: var(--green); background: var(--green-soft); border: 1px solid #ccebdc; border-radius: 999px; font-size: 11px; font-weight: 800; }
.history-verdict.warn { color: #8a5c17; background: var(--amber-soft); border-color: #efd8a7; }
.history-verdict.fail { color: var(--red); background: var(--red-soft); border-color: #f2d2cf; }
.history-verdict.empty { color: #6d7d89; background: #f1f4f6; border-color: #dce4e8; }
.history-empty-state { min-height: 120px; padding: 24px; display: grid; place-content: center; gap: 8px; text-align: center; color: #687986; background: #f8fafb; border: 1px dashed #cfdce2; border-radius: 11px; }
.history-empty-state strong { color: var(--navy); font-size: 13px; }
.history-empty-state span { max-width: 620px; font-size: 11px; line-height: 1.6; }
.history-file-meta { margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.history-file-meta strong { min-width: 0; overflow: hidden; color: var(--navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-file-meta .evidence-chip { margin-top: 0; flex: 0 0 auto; }
.history-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.history-metric-grid > div { min-width: 0; padding: 14px; background: #f7f9fb; border: 1px solid var(--line-soft); border-radius: 10px; }
.history-metric-grid span { display: block; color: #596b79; font-size: 10px; }
.history-metric-grid strong { display: block; margin-top: 7px; color: var(--navy); font-size: clamp(16px,1.5vw,22px); white-space: nowrap; }
.history-metric-grid small { display: block; margin-top: 6px; color: #697985; font-size: 10px; line-height: 1.45; }
.history-comparison { margin-top: 12px; padding: 14px; background: #f8fbfb; border: 1px solid #d5e9e9; border-radius: 10px; }
.history-comparison-copy { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-comparison-copy strong { color: var(--navy); font-size: 11px; }
.history-comparison-copy span { color: #667784; font-size: 10px; text-align: right; }
.history-progress-row { margin-top: 8px; display: grid; grid-template-columns: 70px minmax(0,1fr) 56px; align-items: center; gap: 9px; color: #596b79; font-size: 10px; }
.history-progress-row > div { height: 8px; overflow: hidden; background: #e4ecef; border-radius: 99px; }
.history-progress-row i { display: block; width: 0; height: 100%; background: var(--cyan-dark); border-radius: inherit; transition: width .35s ease; }
.history-progress-row.planned i { background: #8ba1ae; }
.history-progress-row b { color: var(--navy); text-align: right; }
.history-chart { min-height: 230px; margin-top: 12px; padding: 8px; background: white; border: 1px solid var(--line-soft); border-radius: 10px; }
.history-chart svg { display: block; width: 100%; height: 214px; }
.history-data-notes { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.history-data-notes > div { min-width: 0; padding: 12px; background: #fbfcfd; border: 1px solid var(--line-soft); border-radius: 9px; }
.history-data-notes strong { color: var(--navy); font-size: 11px; }
.history-mapping { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.history-mapping span { padding: 4px 7px; color: #45646a; background: var(--cyan-soft); border-radius: 999px; font-size: 9px; }
.history-data-notes ul { margin: 8px 0 0; padding-left: 17px; color: #596b79; font-size: 10px; line-height: 1.6; }
.history-details { margin-top: 12px; border-top: 1px solid var(--line-soft); }
.history-details summary { padding: 12px 0 4px; color: var(--cyan-dark); cursor: pointer; font-size: 11px; font-weight: 750; }
.history-details table { margin-top: 8px; }
.criteria-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.criteria-row > div { min-height: 48px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border-radius: 10px; background: var(--green-soft); color: var(--green); border: 1px solid #ccebdc; font-size: 11px; }
.criteria-row i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.criteria-row span { margin-right: auto; color: #4c665b; }
.criteria-row strong { font-size: 11px; }
.criteria-row .fail { color: var(--red); background: var(--red-soft); border-color: #f2d2cf; }
.criteria-row .fail span { color: #76565a; }
.market-result-panel { scroll-margin-top: 92px; }
.market-metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.market-metric-grid > div { min-width: 0; padding: 15px; background: #f7f9fb; border: 1px solid var(--line-soft); border-radius: 11px; }
.market-metric-grid span { display: block; color: #596b79; font-size: 10px; }
.market-metric-grid strong { display: block; margin-top: 8px; color: var(--navy); font-size: clamp(15px,1.5vw,21px); line-height: 1.15; }
.market-metric-grid small { display: block; min-height: 32px; margin-top: 7px; color: #667784; font-size: 10px; line-height: 1.5; }
.market-alerts { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.market-alerts li { padding: 10px 12px 10px 32px; position: relative; color: #465968; background: #fbfcfd; border: 1px solid var(--line-soft); border-radius: 8px; font-size: 10px; line-height: 1.55; }
.market-alerts li::before { content: "!"; position: absolute; left: 10px; top: 9px; width: 13px; height: 13px; display: grid; place-items: center; color: white; background: var(--amber); border-radius: 50%; font-size: 8px; font-weight: 900; }
.panel { padding: 24px; margin-bottom: 16px; box-shadow: none; }
.panel-head { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-head h3 { margin: 0; color: var(--navy); font-size: 18px; letter-spacing: -.025em; }
.panel-head p:not(.section-kicker) { margin: 7px 0 0; color: #596b79; font-size: 11px; line-height: 1.5; }
.panel-head.compact { margin-bottom: 14px; }
.chart-switch { display: flex; padding: 3px; background: var(--canvas); border-radius: 8px; }
.chart-switch button { padding: 7px 13px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.chart-switch button.active { background: white; color: var(--navy); box-shadow: 0 2px 7px rgba(16,45,71,.1); font-weight: 750; }
.chart-wrap { position: relative; height: 330px; }
#cashChart { display: block; width: 100%; height: 100%; }
.chart-tooltip { position: absolute; min-width: 130px; padding: 10px 11px; color: white; background: rgba(16,45,71,.94); border-radius: 7px; pointer-events: none; font-size: 11px; line-height: 1.55; box-shadow: 0 8px 22px rgba(16,45,71,.2); }
.chart-legend { display: flex; align-items: center; gap: 20px; color: #596b79; font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 7px; }
.chart-legend i { display: inline-block; width: 20px; }
.legend-line { border-top: 2px solid var(--cyan-dark); }
.legend-zero { border-top: 1px dashed #9ba8b4; }
.chart-legend .chart-note { margin-left: auto; color: var(--cyan-dark); font-weight: 750; }
.two-column-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sensitivity-bars { display: grid; gap: 14px; }
.sensitivity-row { display: grid; grid-template-columns: 100px minmax(0,1fr) 100px; align-items: center; gap: 10px; font-size: 11px; }
.sensitivity-row > span:first-child { color: var(--muted); }
.bar-track { height: 9px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--cyan-dark); border-radius: inherit; min-width: 2px; transition: width .5s ease; }
.bar-fill.negative { background: var(--red); }
.sensitivity-row strong { text-align: right; color: var(--navy); font-size: 11px; }
.sensitivity-row small { grid-column: 2 / 4; color: #687986; font-size: 10px; line-height: 1.45; text-align: right; }
.reasonableness-list { display: grid; gap: 8px; }
.reasonableness-item { padding: 10px 11px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 8px; background: #fbfcfd; border: 1px solid var(--line-soft); border-radius: 9px; }
.risk-dot { width: 8px; height: 8px; margin-top: 3px; background: var(--green); border-radius: 50%; }
.reasonableness-item.warn .risk-dot { background: var(--amber); }
.reasonableness-item.high .risk-dot { background: var(--red); }
.reasonableness-item b { color: var(--navy); font-size: 11px; }
.reasonableness-item p { grid-column: 2; margin: 0; color: #596b79; font-size: 10px; line-height: 1.55; }
.threshold-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.reverse-head { position: relative; }
.reverse-head > label { flex: 0 0 160px; color: #596b79; font-size: 10px; font-weight: 700; }
.reverse-head select { height: 36px; margin-top: 5px; font-size: 11px; }
.reverse-status { margin: -4px 0 14px; padding: 11px 13px; color: #315947; background: var(--green-soft); border: 1px solid #ccebdc; border-radius: 9px; font-size: 10px; line-height: 1.6; }
.reverse-status.fail { color: #76565a; background: var(--red-soft); border-color: #f2d2cf; }
.reverse-footnote { margin: 13px 0 0; color: #667784; font-size: 10px; line-height: 1.6; }
.threshold-item { min-width: 0; padding: 15px; background: #f7f9fb; border: 1px solid var(--line-soft); border-radius: 11px; }
.threshold-item.verified { border-color: #ccebdc; background: #f4fbf8; }
.threshold-item.unverified { border-color: #f2d2cf; background: #fff8f7; }
.threshold-item span { display: block; color: #596b79; font-size: 10px; }
.threshold-item strong { display: block; margin-top: 8px; color: var(--navy); font-size: 20px; letter-spacing: -.03em; }
.threshold-item small { display: block; min-height: 36px; margin-top: 8px; color: #596b79; font-size: 10px; line-height: 1.55; }
.threshold-compare { margin-top: 10px; padding: 9px 10px; display: grid; gap: 4px; background: rgba(255,255,255,.72); border: 1px solid var(--line-soft); border-radius: 8px; }
.threshold-compare b { color: #314757; font-size: 11px; }
.threshold-compare em { color: var(--cyan-dark); font-size: 11px; line-height: 1.45; font-style: normal; }
.threshold-item.unverified .threshold-compare em { color: var(--red); }
.threshold-meta { margin-top: 10px; padding-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-soft); }
.threshold-meta b { color: var(--green); font-size: 10px; }
.threshold-item.unverified .threshold-meta b { color: var(--red); }
.threshold-meta em { color: #667784; font-size: 10px; line-height: 1.4; font-style: normal; text-align: right; }
.threshold-warning { display: block; margin-top: 8px; color: #875814; font-size: 10px; line-height: 1.5; }
.insight-card ul, .audit-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.insight-card li { position: relative; padding-left: 18px; color: #465968; font-size: 11px; line-height: 1.6; }
.insight-card li::before { content: ""; position: absolute; left: 0; top: 5px; width: 7px; height: 7px; border: 2px solid var(--cyan-dark); border-radius: 50%; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
th { color: #728190; background: #f5f8fa; font-weight: 750; text-align: right; }
th:first-child, td:first-child { text-align: left; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--line-soft); text-align: right; }
td { color: #3f5060; }
td strong { color: var(--navy); }
.status-pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 99px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 750; }
.status-pill.fail { color: var(--red); background: var(--red-soft); }
.scenario-range { display: block; margin-top: 9px; color: var(--cyan-dark); font-size: 11px; }
.calculation-trace { padding: 0; position: relative; }
.calculation-trace summary { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.calculation-trace summary span { display: grid; gap: 5px; }
.calculation-trace summary b { color: var(--navy); font-size: 14px; }
.calculation-trace summary small { color: #596b79; font-size: 10px; }
.calculation-trace summary svg { width: 18px; transition: transform .2s ease; }
.calculation-trace details[open] summary svg { transform: rotate(180deg); }
.calculation-steps { padding: 0 24px 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.calculation-step { padding: 12px; background: #f7f9fb; border: 1px solid var(--line-soft); border-radius: 9px; }
.calculation-step span { display: block; color: #596b79; font-size: 10px; }
.calculation-step code { display: block; margin-top: 7px; overflow-wrap: anywhere; }
.calculation-step strong { display: block; margin-top: 7px; color: var(--navy); font-size: 11px; }
.detail-panel { padding: 0; }
.detail-panel summary { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.detail-panel summary span { display: grid; gap: 5px; }
.detail-panel summary b { color: var(--navy); font-size: 14px; }
.detail-panel summary small { color: #596b79; font-size: 10px; }
.detail-panel summary svg { width: 18px; transition: transform .2s ease; }
.detail-panel details[open] summary svg { transform: rotate(180deg); }
.detail-actions { padding: 0 24px 10px; display: flex; align-items: center; justify-content: space-between; color: #596b79; font-size: 10px; }
.detail-actions button { border: 1px solid var(--line); border-radius: 7px; background: white; padding: 7px 10px; color: var(--cyan-dark); cursor: pointer; font-size: 10px; }
.detail-table-wrap { max-height: 460px; overflow: auto; border-top: 1px solid var(--line-soft); }
.detail-table thead { position: sticky; top: 0; z-index: 1; }
.detail-table th:first-child, .detail-table td:first-child { padding-left: 24px; }
.negative-number { color: var(--red); }
.formula-review { padding-top: 28px; }
.audit-badge { align-self: center; color: var(--green); background: var(--green-soft); border: 1px solid #ccebdc; border-radius: 999px; padding: 8px 12px; font-size: 10px; font-weight: 750; }
.formula-flow { margin: 22px 0 16px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--navy); border-radius: var(--radius); color: white; }
.formula-flow > div { display: grid; grid-template-columns: 24px auto; column-gap: 8px; align-items: center; flex: 1; }
.formula-flow span { grid-row: 1 / 3; width: 26px; height: 26px; display: grid; place-items: center; color: var(--navy); background: var(--cyan); border-radius: 50%; font-size: 9px; font-weight: 900; }
.formula-flow b { font-size: 11px; }
.formula-flow small { color: #b4c6d2; font-size: 10px; margin-top: 4px; }
.formula-flow > i { color: #658097; font-style: normal; }
.audit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.audit-card { padding: 22px; background: white; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 13px; }
.audit-card.cautions { border-top-color: var(--amber); }
.audit-card header { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.audit-card header span { color: #596b79; font-size: 11px; }
.audit-card header strong { color: var(--green); font-size: 12px; }
.audit-card.cautions header strong { color: #a16a19; }
.audit-card li { padding-left: 16px; position: relative; color: #465968; font-size: 11px; line-height: 1.7; }
.audit-card li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; background: var(--green); border-radius: 50%; }
.audit-card.cautions li::before { background: var(--amber); }
.formula-table-wrap { margin-top: 16px; overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 13px; }
.formula-table th, .formula-table td { text-align: left; white-space: normal; vertical-align: top; }
.formula-table th:first-child { width: 16%; }
.formula-table th:nth-child(2) { width: 48%; }
code { color: #20556c; background: #edf6f8; padding: 3px 5px; border-radius: 4px; font: 11px/1.7 "SFMono-Regular", Consolas, monospace; }
.model-note { margin: 16px 0 26px; padding: 18px 20px; display: flex; align-items: flex-start; gap: 12px; color: #705824; background: var(--amber-soft); border: 1px solid #f0ddb1; border-radius: 12px; }
.model-note svg { flex: 0 0 auto; width: 19px; color: var(--amber); }
.model-note p { margin: 0; font-size: 11px; line-height: 1.7; }
footer { min-height: 76px; padding: 0 max(34px, calc((100vw - 1512px) / 2)); display: flex; justify-content: space-between; align-items: center; color: #a9bccb; background: var(--navy); font-size: 11px; }

.glossary-section { margin-top: 28px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, #f8fbfc 0%, #fff 100%); box-shadow: var(--shadow); scroll-margin-top: 88px; }
.glossary-title-row { align-items: flex-start; margin-bottom: 18px; }
.glossary-title-row h2 { margin-bottom: 6px; }
.glossary-title-row p:last-child { max-width: 780px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.glossary-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.glossary-group { padding: 18px; border: 1px solid #dce7eb; border-radius: 14px; background: #fff; }
.glossary-group h3 { margin: 0 0 12px; color: var(--navy); font-size: 15px; }
.glossary-list { margin: 0; }
.glossary-list > div { display: grid; grid-template-columns: minmax(100px, 128px) 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #edf2f4; }
.glossary-list > div:first-child { padding-top: 0; border-top: 0; }
.glossary-list dt { color: #16384a; font-size: 12px; font-weight: 800; line-height: 1.65; }
.glossary-list dd { margin: 0; color: #526d7b; font-size: 12px; line-height: 1.7; }
.glossary-note { margin: 16px 0 0; padding: 13px 15px; border-radius: 10px; color: #3f5d6b; background: #eaf4f5; font-size: 12px; line-height: 1.7; }

.prototype-annotation-marker { position: absolute; z-index: 45; right: -9px; top: -9px; width: 23px; height: 23px; display: grid; place-items: center; color: white; background: #cf654f; border: 2px solid white; border-radius: 50%; box-shadow: 0 4px 12px rgba(16,45,71,.25); cursor: pointer; font-size: 9px; font-weight: 900; }
.prototype-annotation-marker[hidden] { display: none; }
[data-proto-id] { position: relative; }
[data-proto-id].proto-highlight { outline: 3px solid rgba(207,101,79,.35); outline-offset: 4px; }
.prototype-review-panel { position: fixed; z-index: 80; right: 22px; bottom: 22px; width: min(390px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 110px)); padding: 22px; overflow: auto; color: #d6e2ea; background: rgba(16,45,71,.98); border: 1px solid rgba(255,255,255,.15); border-radius: 15px; box-shadow: 0 24px 70px rgba(16,45,71,.35); }
.prototype-review-panel h2 { margin: 0 28px 12px 0; color: white; font-size: 18px; }
.prototype-review-panel #reviewPanelBody { font-size: 11px; line-height: 1.65; }
.prototype-review-panel dl { margin: 0; display: grid; grid-template-columns: 78px 1fr; gap: 7px 10px; }
.prototype-review-panel dt { color: #8fb6c3; }
.prototype-review-panel dd { margin: 0; }
.review-panel-close { position: absolute; right: 13px; top: 11px; width: 30px; height: 30px; color: #bfd1dc; background: transparent; border: 0; cursor: pointer; font-size: 23px; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 340px minmax(0, 1fr); padding: 24px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-inline: 34px; }
  .hero-facts { display: none; }
}
@media (max-width: 880px) {
  .top-nav, .model-chip { display: none; }
  .workspace { display: block; padding: 18px; }
  .controls { position: static; max-height: none; margin-bottom: 28px; }
  .hero { min-height: 310px; padding: 54px 22px; }
  .hero h1 { font-size: 42px; }
  .two-column-panels, .audit-grid { grid-template-columns: 1fr; }
  .credibility-layout { grid-template-columns: 1fr; }
  .threshold-grid { grid-template-columns: 1fr 1fr; }
  .history-metric-grid { grid-template-columns: 1fr 1fr; }
  .formula-flow { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .formula-flow > i { display: none; }
  .glossary-groups { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .header-inner { padding: 0 18px; }
  .hero h1 { font-size: 36px; }
  .field-grid { grid-template-columns: 1fr; }
  .region-select-grid, .city-intelligence { grid-template-columns: 1fr; }
  .region-select-grid label:first-child { grid-column: auto; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-card:first-child { grid-column: 1 / -1; }
  .criteria-row { grid-template-columns: 1fr; }
  .market-metric-grid { grid-template-columns: 1fr; }
  .evidence-list, .calculation-steps, .threshold-grid { grid-template-columns: 1fr; }
  .report-actions { align-items: stretch; flex-direction: column; }
  .report-actions > div { width: 100%; margin: 0 0 5px; }
  .report-actions button { width: 100%; }
  .history-panel-head, .history-comparison-copy { align-items: flex-start; flex-direction: column; }
  .history-metric-grid, .history-data-notes { grid-template-columns: 1fr; }
  .history-comparison-copy span { text-align: left; }
  .history-upload-actions { flex-direction: column; }
  .history-upload-actions button { width: 100%; }
  .reverse-head { display: grid; }
  .reverse-head > label { width: 100%; }
  .sensitivity-row { grid-template-columns: 88px minmax(0,1fr) 82px; }
  .chart-wrap { height: 280px; }
  .formula-flow { grid-template-columns: 1fr; }
  .glossary-section { padding: 18px 14px; }
  .glossary-list > div { grid-template-columns: 1fr; gap: 3px; }
  .glossary-list dt, .glossary-list dd { font-size: 12px; }
  footer { padding: 22px; display: grid; gap: 8px; }
}
@media print {
  .site-header, .hero, .controls, .chart-switch, .detail-panel, footer, .prototype-review-panel, .prototype-annotation-marker, .report-actions button { display: none !important; }
  body { background: white; }
  .workspace { display: block; padding: 0; }
  .panel, .kpi-card { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Evidence registration and independent review */
.review-readiness { margin:18px 0; padding:14px 18px; background:#f1f7f9; border-left:3px solid #168b96; }
.review-readiness ul { margin:8px 0 0; padding-left:20px; font-size:13px; }
.evidence-workspace { margin:18px 0; border:1px solid #ccdde4; border-radius:8px; padding:16px; }
.evidence-workspace summary,.review-group summary { cursor:pointer; font-weight:600; }
.evidence-workspace p { font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.review-group { border-top:1px solid #dce7ec; padding:14px 0; }
.review-group summary span { color:#47717e; font-size:12px; margin-left:10px; }
.review-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.review-fields label { display:flex; flex-direction:column; gap:6px; font-size:13px; min-width:0; }
.review-fields input,.review-fields select,.review-fields textarea { width:100%; min-width:0; box-sizing:border-box; border:1px solid #b7cdd5; border-radius:5px; padding:9px; background:white; color:#183d4c; font:inherit; }
.review-wide { grid-column:1/-1; }
.review-group fieldset { border:1px solid #cfdee5; border-radius:5px; padding:12px; }
.review-group legend { font-size:12px; }
.review-check { display:flex; align-items:flex-start; gap:8px; margin:9px 0; font-size:13px; line-height:1.6; }
.review-check input { width:16px; height:16px; flex:0 0 16px; margin-top:3px; }
.review-group button { border:1px solid #168b96; border-radius:5px; padding:9px 14px; background:#168b96; color:white; cursor:pointer; }
.review-result { color:#835719; }
.review-log { margin-top:12px; }
.review-log p { padding:8px; background:#f5f8fa; }
#confidenceReasons li { margin-bottom:14px; line-height:1.8; }
@media(max-width:650px){ .review-fields { grid-template-columns:1fr; } .review-group summary span{ display:block; margin:5px 0; } }

.investment-panel .investment-kpis { grid-template-columns:repeat(12,minmax(0,1fr)); }
.investment-kpis > .kpi-card { grid-column:span 6; }
.investment-kpis > .kpi-card:nth-child(-n+6) { grid-column:span 4; }
.investment-findings { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0; }
.investment-finding { border:1px solid #d1e0e7;border-radius:8px;padding:12px;background:#f8fbfc;min-width:0; }
.investment-finding summary { display:flex;justify-content:space-between;gap:8px;cursor:pointer;list-style:none;font-size:12px; }
.investment-finding summary strong:before { content:'▸ ';color:#168b96; }
.investment-finding[open] summary strong:before { content:'▾ '; }
.investment-finding summary span { color:#447864;font-size:11px; }
.investment-finding.fail { border-color:#e5c6bd;background:#fff8f5; }
.investment-finding.fail summary span { color:#b1513d; }
.investment-finding.pending summary span,.investment-finding.info summary span { color:#896126; }
.investment-finding p { font-size:12px;line-height:1.8;overflow-wrap:anywhere; }
.investment-history-note { font-size:12px;line-height:1.8;color:#5b7182;background:#edf5f8;padding:12px;border-radius:6px;overflow-wrap:anywhere; }
@media(max-width:650px){ .investment-panel .investment-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .investment-findings{grid-template-columns:1fr;} }

@media(max-width:1100px){ .investment-panel .investment-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .investment-kpis > .kpi-card, .investment-kpis > .kpi-card:nth-child(-n+6) { grid-column:auto; } }

.field-reference-button { display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px; padding:0; margin-left:5px; border:1px solid var(--cyan-dark); border-radius:50%; color:var(--cyan-dark); background:#eef9fa; font:800 12px/1 sans-serif; vertical-align:middle; cursor:pointer; }
.field-reference-button:hover { background:var(--cyan-dark); color:white; }
.field-reference-button:focus-visible, #closeFieldReference:focus-visible { outline:2px solid var(--cyan-dark); outline-offset:3px; }
.field-reference-dialog { position:fixed; inset:0; width:min(420px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; box-sizing:border-box; margin:auto; padding:24px; border:1px solid var(--line); border-radius:16px; background:var(--paper); color:var(--navy); box-shadow:0 20px 70px rgba(16,47,66,.24); }
.field-reference-dialog::backdrop { background:rgba(13,35,52,.4); }
.field-reference-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--cyan-dark); font-size:12px; }
#closeFieldReference { display:flex; align-items:center; justify-content:center; width:32px; height:32px; padding:0; border:0; border-radius:8px; background:#f0f5f7; color:var(--navy); font-size:24px; cursor:pointer; }
.field-reference-dialog h2 { margin:14px 0 18px; font-size:22px; }
.field-reference-description { margin:0; padding:16px; border-radius:10px; background:#eff8f9; color:var(--navy); font-size:19px; font-weight:700; line-height:1.6; overflow-wrap:anywhere; }
.field-reference-note { margin:16px 0 0; font-size:12px; line-height:1.7; color:#657784; }
@media print { .field-reference-button, .field-reference-dialog { display:none !important; } }

.history-chart { padding: 20px 22px 14px; background: linear-gradient(180deg,#fbfdfd,#fff); border-radius: 14px; }
.history-chart-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.history-chart-heading strong { display: block; font-size: 14px; color: #244557; }
.history-chart-heading span { display: block; margin-top: 5px; font-size: 11px; color: #81939e; }
.history-chart-total { text-align: right; }
.history-chart-total strong { margin-top: 4px; font-size: 22px; color: #168a91; font-variant-numeric: tabular-nums; }
.history-chart svg { height: auto; min-width: 500px; stroke: none; }
.history-chart svg text { stroke: none; fill: #798c99; font-size: 11px; font-weight: 400; }
.history-chart-scroll { overflow-x: auto; }
.history-chart-key { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; font-size: 11px; color: #526d7b; }
.history-chart-key span { display: inline-flex; align-items: center; gap: 8px; }
.history-chart-key i { width: 24px; border-top: 3px solid #168a91; border-radius: 2px; }
.history-chart-key .planned i { border-top: 2px dashed #9caebd; }
.history-chart-key .history-chart-muted { color: #8a9ca6; }
@media(max-width:650px) { .history-chart { padding: 16px 12px; } }

#results, #historyAnalysisPanel { scroll-margin-top: 96px; }

#cityDataStatus { display: none; }
