:root {
  color-scheme: light;
  --ink: #143328;
  --body: #334a40;
  --muted: #63786e;
  --faint: #778a81;
  --line: #e0e9e3;
  --line-strong: #cedcd2;
  --paper: #fff;
  --canvas: #f3f7f4;
  --forest: #123b2d;
  --forest-deep: #102f26;
  --green: #176e50;
  --green-dark: #125b41;
  --green-bright: #228965;
  --green-pale: #e7f4ec;
  --green-line: #c9e5d3;
  --lime: #d4e98e;
  --amber: #8b5b15;
  --amber-pale: #fff6e5;
  --danger: #a53731;
  --danger-pale: #fff1ef;
  --shadow: 0 2px 3px #122d1f05, 0 4px 16px #18392b08;
  --radius: 15px;
  --sidebar-width: 228px;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --heading: Inter, system-ui, -apple-system, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-padding-top: 88px; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
:where(h1, h2, h3, h4, p, figure) { margin: 0; }
:where(h1, h2, h3, h4) {
  color: var(--ink);
  font-family: var(--heading);
  line-height: 1.3;
}
:where(h1) {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 750;
  letter-spacing: -.045em;
}
:where(h2) {
  font-size: 21px;
  font-weight: 730;
  letter-spacing: -.025em;
}
:where(h3) { font-size: 16px; font-weight: 700; }
:where(h4) { font-size: 14px; font-weight: 700; }
:where(ul, ol) { padding-inline-start: 1.3em; }
:where(a) { color: var(--green-dark); text-underline-offset: .25em; }
:where(button, input, select, textarea) { font: inherit; }
:where(button, select, summary) { cursor: pointer; }
:where(button, input, select, textarea) { color: inherit; }
:where(button) { border: 0; }
:where(svg) {
  display: inline-block;
  flex: none;
  vertical-align: -.14em;
}
:where(button svg, a svg) { width: 18px; height: 18px; }
:where(img) { max-width: 100%; }
:where([hidden]) { display: none !important; }
:where(a, button, input, select, summary, textarea, [tabindex]):focus-visible { outline: 2px solid #298d65; outline-offset: 4px; }
:where(button:disabled, input:disabled, select:disabled) { cursor: not-allowed; opacity: .55; }
::selection { background: var(--lime); color: var(--forest-deep); }

.sr-only, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.muted { color: var(--muted); }
.num, .number { font-variant-numeric: tabular-nums; }

/* Workspace shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 25px 17px 19px;
  overflow-y: auto;
  color: #b6cfc2;
  background: linear-gradient(172deg, #153e31, #102f26 84%);
  border-right: 1px solid #ffffff0f;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 1px 39px;
  padding: 2px 0 0 1px;
  color: #fff;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  color: var(--lime);
  background: #ffffff15;
  border: 1px solid #ffffff14;
  border-radius: 10px;
}
.brand-copy {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}
.brand-copy :is(strong,b) {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -.045em;
}
.brand-copy :is(span,small,p) {
  color: #a6c2b2;
  font-size: 10px;
  font-weight: 520;
  letter-spacing: .045em;
}
.workspace-label {
  margin: 0 10px 9px;
  color: #9ab9a9;
  font-size: 10px;
  font-weight: 670;
  letter-spacing: .115em;
  text-transform: uppercase;
}
.nav-list { display: grid; gap: 5px; }
.nav-item {
  position: relative;
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px 9px 13px;
  color: #c4d9ce;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border-radius: 8px;
  transition: background .17s ease, color .17s ease;
}
.nav-item svg {
  width: 17px;
  height: 17px;
  color: #9ebcac;
}
.nav-item:is(:hover, :focus-visible) { color: #fff; background: #ffffff0e; }
.nav-item:is(.is-active, [aria-current="page"], [aria-selected="true"]) {
  color: #f3faf4;
  background: #31684e;
  box-shadow: inset 0 0 0 1px #ffffff12;
  font-weight: 680;
}
.nav-item:is(.is-active, [aria-current="page"], [aria-selected="true"]) svg { color: var(--lime); }
.nav-item:is(.is-active, [aria-current="page"], [aria-selected="true"])::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  background: var(--lime);
  border-radius: 0 3px 3px 0;
  content: "";
}
.sidebar-bottom {
  display: grid;
  gap: 15px;
  margin-top: auto;
  padding-top: 24px;
}
.market-pill {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  color: #e8f4eb;
  font-size: 12px;
  text-align: left;
  background: #ffffff0b;
  border: 1px solid #ffffff20;
  border-radius: 9px;
}
.market-pill svg {
  width: 16px;
  height: 16px;
  color: #a4c8b4;
}
.side-footer {
  padding-inline: 4px;
  color: #9ab7a8;
  font-size: 10px;
  line-height: 1.55;
}
.main-shell { min-width: 0; margin-inline-start: var(--sidebar-width); }
.topbar {
  position: sticky;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  min-height: 63px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px clamp(16px, 2.5vw, 37px);
  background: #fffffff5;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(15px);
}
.topbar-left, .topbar-actions, .breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.topbar-actions { flex: none; }
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.breadcrumb svg { width: 13px; height: 13px; }
.crumb-current {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 680;
  text-overflow: ellipsis;
}
.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  color: var(--green-dark);
  background: var(--green-pale);
  border-radius: 8px;
}
.menu-toggle svg { width: 21px; height: 21px; }
.content {
  max-width: 1660px;
  margin-inline: auto;
  padding: 26px clamp(16px, 2.5vw, 37px) 48px;
}

/* Actions and compact labels */
.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 660;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--paper);
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-outline { color: var(--green-dark); border-color: var(--line-strong); }
.btn-outline:hover { background: #f1f8f3; border-color: #abcbbb; }
.btn-primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 2px 4px #15543a1b;
}
.btn-primary:hover {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-ghost, .btn-text { color: var(--green-dark); background: transparent; }
.btn-ghost:hover, .btn-text:hover { background: #e8f4ec; }
.chip, .tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.35;
  white-space: nowrap;
  background: var(--green-pale);
  border: 1px solid #d7e9dc;
  border-radius: 999px;
}
.chip svg, .tag svg { width: 12px; height: 12px; }
.chip.warning, .tag.warning {
  color: var(--amber);
  background: var(--amber-pale);
  border-color: #efdfbc;
}
.chip.danger, .tag.danger {
  color: var(--danger);
  background: var(--danger-pale);
  border-color: #f4d7d2;
}

/* Dashboard */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 231px;
  align-items: center;
  overflow: hidden;
  padding: 24px clamp(22px, 3.4vw, 53px);
  color: #fff;
  background: linear-gradient(90deg, #102f26fa 0, #113c30ee 25%, #133b2ac9 44%, #133c304d 69%, #112b251f 100%), linear-gradient(0deg, #0e231e73, transparent 36%), #173e32 url('./solar-roof.webp') center 55% / cover no-repeat;
  border: 1px solid #133f31;
  border-radius: 16px;
  box-shadow: 0 3px 14px #173c2721;
}
.hero-copy { max-width: 665px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  color: #dcf1ac;
  font-size: 10px;
  font-weight: 730;
  letter-spacing: .11em;
  line-height: 1.2;
  text-transform: uppercase;
}
.hero-eyebrow svg { width: 14px; height: 14px; }
.hero h1 {
  max-width: 640px;
  color: #fff;
  font-size: clamp(29px, 3.2vw, 46px);
  font-weight: 740;
  letter-spacing: -.045em;
}
.hero p {
  max-width: 580px;
  margin-top: 8px;
  color: #e3efe9;
  font-size: 13px;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.hero .btn { min-height: 39px; }
.hero .btn-primary {
  color: #1d3722;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 3px 10px #0c261e29;
}
.hero .btn-primary:hover { background: #e3f1ad; border-color: #e3f1ad; }
.hero .btn-outline {
  color: #f6fdf9;
  background: #123e3266;
  border-color: #ffffff82;
  backdrop-filter: blur(4px);
}
.hero .btn-outline:hover { background: #1d503e; border-color: #fff; }
.hero-meta {
  position: absolute;
  inset: auto 19px 15px auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  color: #eff8f1;
  font-size: 10px;
  font-weight: 620;
  background: #132f28b8;
  border: 1px solid #ffffff38;
  border-radius: 7px;
  backdrop-filter: blur(6px);
}
.hero-meta svg { width: 13px; height: 13px; }
.section-head, .panel-head, .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.section-head { align-items: center; margin: 24px 0 10px; }
.section-title p, .panel-head p, .page-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric-card, .panel, .scenario-card, .policy-card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.metric-card {
  position: relative;
  display: grid;
  min-height: 109px;
  align-content: start;
  gap: 3px;
  padding: 14px 16px 13px;
}
.metric-label {
  display: flex;
  min-height: 20px;
  align-items: center;
  column-gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}
.metric-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--green);
  background: #e7f4eb;
  border-radius: 8px;
}
.metric-icon svg { width: 17px; height: 17px; }
.metric-card .metric-icon { position: absolute; inset: 13px 13px auto auto; }
.metric-icon.metric-gold { color: #557629; background: #eef4e0; }
.metric-icon.metric-amber { color: #825827; background: #f8efdf; }
.metric-icon.metric-blue { color: #286b67; background: #e5f1ee; }
.metric-card strong {
  display: block;
  color: var(--ink);
  font-size: clamp(19px, 1.9vw, 30px);
  font-weight: 745;
  letter-spacing: -.05em;
  line-height: 1.22;
  font-variant-numeric: tabular-nums;
}
.metric-card strong :is(small, span) {
  color: var(--muted);
  font-size: .52em;
  font-weight: 610;
  letter-spacing: 0;
  white-space: nowrap;
}
.metric-trend {
  align-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 540;
  line-height: 1.45;
}
.metric-trend svg {
  width: 12px;
  height: 12px;
  color: var(--green-bright);
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 15px;
}
.panel { padding: 17px 19px; }
.panel h2 { font-size: 16px; letter-spacing: -.02em; }
.panel .panel-head { flex-wrap: wrap; row-gap: 8px; }
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 10px;
}
.legend > :is(span, div) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 9px;
  height: 9px;
  background: currentColor;
  border-radius: 100%;
}
.legend svg { width: 12px; height: 12px; }
.chart-body { min-width: 0; margin: 11px -2px 0; }
.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart-svg text { fill: #5f786c; font: 13px var(--font); }
.recommendation-card {
  display: grid;
  align-content: start;
  gap: 9px;
  background: linear-gradient(142deg, #f3faf4 0, #fff 76%);
  border-color: #d5e8da;
}
.rec-top, .rec-tags, .rec-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.rec-top { min-height: 36px; }
.rec-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #206d4e;
  background: #deefe3;
  border-radius: 9px;
}
.rec-icon svg { width: 17px; height: 17px; }
.rec-kicker {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 730;
  letter-spacing: .025em;
}
.recommendation-card h3 {
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 730;
  letter-spacing: -.035em;
}
.rec-index {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  color: var(--green-dark);
  background: #e3f3e8;
  border: 1px solid #d2e9d9;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.rec-index svg { width: 12px; height: 12px; }
.recommendation-card p {
  color: var(--body);
  font-size: 12px;
  line-height: 1.72;
}
.rec-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 620;
  background: #ebf5ed;
  border: 1px solid #dcece0;
  border-radius: 6px;
}
.rec-footer {
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.rec-footer :is(a,button) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--green-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 710;
  text-decoration: none;
}
.rec-footer :is(a,button):hover { text-decoration: underline; }
.rec-footer svg { width: 14px; height: 14px; }
.overview-grid + .panel { margin-top: 15px; }

/* Project inputs */
.page-header { align-items: end; margin: 3px 0 20px; }
.page-header h1 { font-size: clamp(25px, 3vw, 36px); }
.page-header p { max-width: 68ch; font-size: 13px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.form-panel { padding: 20px; }
.form-panel > :is(h2,h3,.panel-head) { margin-bottom: 15px; }
.form-panel > h2, .form-panel > .panel-head h2 { font-size: 18px; }
.fields, .fields-grid, .field-grid, .check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
  color: var(--body);
  font-size: 12px;
  font-weight: 650;
}
.field small, .field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 480;
  line-height: 1.45;
}
.field.full, .field.span-2, .form-panel.full, .form-panel.span-2 { grid-column: 1 / -1; }
.form-panel > .field + .field { margin-top: 12px; }
.input-wrap {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  background: #fcfefc;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-wrap:focus-within, .field > :is(input, select, textarea):focus {
  outline: none;
  border-color: #4b9b78;
  box-shadow: 0 0 0 3px #d8eee1;
}
.input-wrap :is(input, select, textarea), .field > :is(input, select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  flex: 1;
  padding: 6px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  background: transparent;
  border: none;
  border-radius: 6px;
}
.input-wrap :is(input, select, textarea):focus-visible { outline: none; }
.field > :is(input, select, textarea) {
  background: #fcfefc;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}
:is(.input-wrap, .field) select { padding-inline-end: 8px; }
.input-wrap .unit {
  flex: none;
  padding: 0 8px 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 590;
  white-space: nowrap;
}
.input-wrap:has(:user-invalid) { border-color: #c45c54; }
.check-grid { gap: 8px 12px; }
:is(.fields, .fields-grid, .field-grid) + .check-grid { margin-top: 14px; }
.check-field {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 8px;
  color: var(--body);
  font-size: 12px;
  line-height: 1.48;
  cursor: pointer;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.check-field:has(input:checked) { background: #eaf6ed; border-color: #d2e7d8; }
.check-field input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: .12em 0 0;
  accent-color: var(--green);
}
.form-actions, .report-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
}
.form-actions .btn-primary, .report-actions .btn-primary { padding-inline: 15px; }
.panel :is(details, .advanced) { margin-top: 13px; }
.panel summary {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 680;
}
.panel details[open] summary { margin-bottom: 12px; }

/* Scenario, policy and evidence pages */
.scenario-grid, .policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.scenario-card, .policy-card {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 17px;
}
.scenario-card:has(.scenario-card-top .chip:not(.subtle)) {
  background: linear-gradient(138deg, #eef8ef, #fff 82%);
  border-color: #b9d9c3;
  box-shadow: var(--shadow), inset 0 3px #5e9c70;
}
.scenario-card h3, .policy-card h3 {
  font-size: 17px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.scenario-card p, .policy-card p, .policy-card li {
  color: var(--body);
  font-size: 12px;
  line-height: 1.7;
}
.scenario-card ul, .policy-card ul { margin: 0; }
.scenario-card li { margin-block: 3px; font-size: 12px; }
.scenario-card :is(dl, .scenario-stats, .scenario-metrics), .policy-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 9px;
  margin: 0;
}
.scenario-card :is(dt, .scenario-caption), .policy-card dt { color: var(--muted); font-size: 11px; }
.scenario-card :is(dd, .scenario-value), .policy-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.scenario-card .scenario-card-top, .policy-card .policy-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
table {
  width: 100%;
  color: var(--body);
  font-size: 12px;
  text-align: left;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.table-scroll table { min-width: 570px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
:where(thead th) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
  background: #f5f8f6;
}
:where(tbody th) { color: var(--ink); font-weight: 660; }
tr:last-child > td { border-bottom-color: transparent; }
tbody tr:hover { background: #f8fbf9; }
table + .table-note, .table-scroll + .table-note { margin-top: 7px; }
.table-note, .method-note, .form-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.policy-grid { grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)); }
.policy-card .source-link { width: fit-content; margin-top: 1px; }
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 640;
  text-underline-offset: .2em;
}
.source-link svg { width: 13px; height: 13px; }
.source-link:hover { color: var(--green-bright); }
.report-actions { margin-block: 16px; }
.status-toast {
  position: fixed;
  inset: auto clamp(13px, 2.5vw, 31px) 21px auto;
  z-index: 40;
  max-width: min(380px, calc(100% - 26px));
  padding: 10px 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 580;
  background: var(--forest);
  border: 1px solid #36594b;
  border-radius: 9px;
  box-shadow: 0 6px 24px #173c2740;
}
.status-toast:empty { display: none; }
.status-toast.error, .status-toast[data-kind="error"] { background: #863a34; border-color: #a65049; }

/* Component details */
svg > use {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}
.sidebar-scrim { display: none; }
.market-pill > span { display: grid; gap: 1px; }
.market-pill small {
  color: #a7c5b4;
  font-size: 10px;
  line-height: 1.1;
}
.market-pill strong { font-size: 12px; font-weight: 670; }
.side-footer > span, .hero-eyebrow > span, #case-status > span:first-child {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: 2px;
  background: currentColor;
  border-radius: 100%;
}
.side-footer > span { color: #a4ce8d; }
.hero .btn-hero {
  color: #1d3722;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 3px 10px #0c261e29;
}
.hero .btn-hero:hover { background: #e3f1ad; border-color: #e3f1ad; }
.chip.subtle {
  color: var(--muted);
  background: #f5f8f6;
  border-color: var(--line);
}
.text-button {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 685;
  background: none;
}
.text-button:hover { color: var(--green); text-decoration: underline; }
.text-button svg { width: 15px; height: 15px; }
.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 0;
}
.facts-grid > div {
  min-width: 0;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.facts-grid dt {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}
.facts-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 665;
  overflow-wrap: anywhere;
}
.legend:not(:empty) { margin-top: 5px; }
#form-state { color: var(--muted); font-size: 12px; }
.form-actions { justify-content: flex-end; }
.form-actions #form-state { margin-inline-end: auto; }
.view > .panel + .panel, .view > .metrics-grid + .panel { margin-top: 14px; }
.panel-head + :is(.table-scroll, .policy-grid, p, ul) { margin-top: 12px; }
.panel > .policy-grid { margin-bottom: 0; }
.panel > .policy-grid .policy-card, .panel > .policy-grid .scenario-card { background: #f9fcfa; box-shadow: none; }
.report-card { background: linear-gradient(135deg, #eff8f1, #fff 65%); border-color: #d8e8db; }
.report-card .report-actions { margin-bottom: 0; }
.report-card > p {
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.68;
}


.metric-head { min-height: 24px; padding-inline-end: 30px; }
.metric-label { line-height: 1.3; }
.metric-value { display: flex; min-width: 0; flex-wrap: wrap; align-items: baseline; gap: 0 5px; }
.metric-value strong { overflow-wrap: anywhere; }
.metric-value > span { color: var(--muted); font-size: 11px; font-weight: 620; white-space: nowrap; }
.legend i { background: var(--series, currentColor); }
.legend .chart-unit { margin-inline-start: auto; }
.chart-grid, .chart-zero { stroke: #e2ebe5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-zero { stroke: #c2d5ca; stroke-dasharray: 4 4; }
.recommendation-card .rec-top h2 { margin-top: 1px; }
.rec-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.rec-index { font-size: 13px; font-variant-numeric: tabular-nums; }
.rec-index small { font-size: 10px; font-weight: 590; }
.form-panel h2 svg { width: 18px; height: 18px; margin-inline-end: 7px; color: var(--green); }
.check-grid:empty { display: none; }
.scenario-card .scenario-value { display: grid; gap: 1px; padding-block: 2px; }
.scenario-value strong { color: var(--ink); font-size: clamp(20px, 2vw, 29px); font-weight: 750; letter-spacing: -.045em; line-height: 1.2; }
.scenario-value > span, .scenario-score > span { color: var(--muted); font-size: 11px; font-weight: 530; }
.scenario-score { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.scenario-score strong { color: var(--green-dark); font-size: 12px; }
.scenario-card meter { width: 100%; height: 7px; appearance: none; border: 0; }
.scenario-card meter::-webkit-meter-bar { height: 7px; background: #e6efe8; border: 0; border-radius: 999px; }
.scenario-card meter::-webkit-meter-optimum-value { background: #4f9872; border-radius: 999px; }
.scenario-card meter::-moz-meter-bar { background: #4f9872; border-radius: 999px; }
.policy-card .policy-impact { padding: 7px 8px; color: var(--green-dark); background: #edf6ef; border-left: 2px solid #a4c8b0; border-radius: 4px; }
#carbon-detail :is(p, li) { font-size: 12px; }
#carbon-detail ul { margin: 10px 0 0; padding: 8px 8px 8px 25px; color: #694911; background: var(--amber-pale); border-radius: 7px; }

@media (max-width: 1130px) {
  :root { --sidebar-width: 213px; }
  .metric-card { padding-inline: 12px; }
  .metric-card .metric-icon { inset-inline-end: 10px; }
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .hero { min-height: 216px; }
  .overview-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .metrics-grid, .overview-grid, .form-grid { gap: 11px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel, .form-panel { padding-inline: 14px; }
  .metric-card { min-height: 104px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-meta { display: none; }
}

@media (max-width: 760px) {
  :root { --sidebar-width: min(260px, calc(100vw - 45px)); }
  html { scroll-padding-top: 72px; }
  .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .22s ease-in-out, visibility .22s;
  }
  .menu-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 16px 0 35px #0b221c43;
  }
  .menu-open .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: block;
    background: #132d2578;
  }
  .main-shell { margin-inline-start: 0; }
  .topbar { min-height: 57px; padding-block: 7px; }
  .topbar-actions { gap: 6px; }
  .menu-toggle { display: grid; }
  .content { padding-top: 16px; }
  .hero { min-height: 205px; }
}

@media (max-width: 530px) {
  .content, .topbar { padding-inline: 12px; }
  .topbar-left, .breadcrumb { gap: 5px; }
  .breadcrumb { font-size: 11px; }
  .menu-toggle { width: 33px; height: 33px; }
  .menu-toggle svg { width: 19px; height: 19px; }
  .topbar-actions .btn {
    min-height: 33px;
    gap: 4px;
    padding-inline: 7px;
    font-size: 11px;
  }
  .topbar-actions .btn svg { width: 14px; height: 14px; }
  .hero {
    min-height: 213px;
    padding: 20px 17px;
    background: linear-gradient(90deg, #102f26fa 0, #113c30e6 47%, #133b2a87 100%), #173e32 url('./solar-roof.webp') 59% 54% / cover no-repeat;
  }
  .hero h1 { font-size: clamp(24px, 7vw, 35px); }
  .hero p { font-size: 12px; }
  .hero-eyebrow { margin-bottom: 8px; }
  .hero-actions { margin-top: 12px; }
  .section-head { margin-top: 19px; }
  .section-title h2 { font-size: 18px; }
  .section-title p { font-size: 11px; }
  .metric-card strong { font-size: 22px; }
  .overview-grid, .scenario-grid, .policy-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-svg text { font-size: 17px; }
  .page-header {
    display: grid;
    align-items: start;
    gap: 7px;
    margin-bottom: 14px;
  }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-header .btn { width: fit-content; }
}

@media (max-width: 360px) {
  .breadcrumb :not(.crumb-current) { display: none; }
  .metric-card { min-height: 106px; }
  .metric-card .metric-icon { width: 26px; height: 26px; }
  .fields, .fields-grid, .field-grid, .check-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
