:root {
  --ink: #14231d;
  --muted: #66736c;
  --paper: #f2f0e9;
  --surface: #fbfaf6;
  --line: #d8d8ce;
  --lime: #afc978;
  --lime-dark: #60783e;
  --amber: #e9a635;
  --charcoal: #1d2c26;
  --white: #fff;
  --radius: 3px;
  --shadow: 0 12px 36px rgba(20, 35, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  background: var(--lime);
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--charcoal);
  color: #d9e2dd;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 56px;
}

.brand-mark {
  align-items: center;
  background: var(--lime);
  color: var(--charcoal);
  display: flex;
  font-family: Georgia, serif;
  font-size: 25px;
  font-style: italic;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: var(--white);
  font-size: 14px;
  letter-spacing: 0.18em;
}

.brand div span {
  color: #91a098;
  font-size: 8px;
  letter-spacing: 0.16em;
  margin-top: 4px;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  align-items: center;
  border-left: 2px solid transparent;
  color: #9dacA4;
  display: grid;
  font-size: 12px;
  gap: 13px;
  grid-template-columns: 22px 1fr;
  padding: 13px 12px;
  text-decoration: none;
}

.nav-item span {
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.nav-item:hover,
.nav-item:focus-visible,
.nav-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--lime);
  color: var(--white);
  outline: none;
}

.sidebar-note {
  align-items: flex-start;
  border-top: 1px solid #37463f;
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 22px 8px 16px;
}

.sidebar-note strong {
  color: #e8ece9;
  font-size: 11px;
}

.sidebar-note p {
  color: #829188;
  font-size: 9px;
  margin: 4px 0 0;
}

.status-dot {
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(175, 201, 120, 0.18);
  height: 7px;
  margin-top: 4px;
  width: 7px;
}

.text-button {
  background: transparent;
  border: 1px solid #43534b;
  color: #aab6b0;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.1em;
  min-height: 42px;
  text-transform: uppercase;
}

.mobile-export-button {
  display: none;
  margin-top: 8px;
}

.workspace {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: rgba(242, 240, 233, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 94px;
  padding: 20px clamp(24px, 4vw, 64px);
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  z-index: 10;
}

.topbar h1 {
  font-family: Georgia, serif;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 400;
  margin: 6px 0 0;
}

.eyebrow,
.section-index {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.topbar-actions,
.scenario-control {
  align-items: center;
  display: flex;
}

.topbar-actions {
  gap: 12px;
}

.scenario-control {
  border: 1px solid var(--line);
}

.scenario-control button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 10px;
  min-height: 42px;
  min-width: 44px;
}

.scenario-control button.selected {
  background: var(--ink);
  color: var(--white);
}

.primary-button {
  background: var(--lime);
  border: 1px solid var(--lime-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  min-height: 44px;
  padding: 0 18px;
  text-transform: uppercase;
}

.menu-button {
  background: transparent;
  border: 0;
  display: none;
  padding: 12px;
}

.menu-button span {
  background: var(--ink);
  display: block;
  height: 2px;
  margin: 4px;
  width: 20px;
}

main {
  overflow: hidden;
}

.hero {
  align-items: end;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(20, 35, 29, 0.06) 50%, transparent 50.1%),
    radial-gradient(circle at 73% 40%, rgba(175, 201, 120, 0.12), transparent 25%);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 5vw;
  grid-template-columns: 1.35fr 0.65fr;
  min-height: 345px;
  padding: 64px clamp(24px, 4vw, 64px) 48px;
}

.hero h2,
.section-heading h2,
.methodology h2 {
  font-family: Georgia, serif;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.93;
  margin: 18px 0 24px;
}

.hero h2 em {
  color: var(--lime-dark);
  font-weight: 400;
}

.hero-copy > p:last-child {
  color: var(--muted);
  line-height: 1.65;
  max-width: 610px;
}

.hero-metric {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.metric-label {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 6px;
  text-transform: uppercase;
}

.hero-metric > strong {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(56px, 6vw, 90px);
  font-weight: 400;
  letter-spacing: -0.06em;
  margin-top: 10px;
}

.hero-metric > span:not(.metric-label) {
  color: var(--muted);
  font-size: 11px;
}

.metric-rule {
  background: #dadbd1;
  height: 5px;
  margin-top: 25px;
}

.metric-rule span {
  background: var(--lime-dark);
  display: block;
  height: 100%;
  transition: width 300ms ease;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.preset-strip {
  align-items: center;
  background: var(--ink);
  color: var(--white);
  display: grid;
  gap: 24px;
  grid-template-columns: 180px auto 1fr;
  padding: 22px clamp(24px, 4vw, 64px);
}

.preset-strip h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  margin: 5px 0 0;
}

.preset-controls {
  border: 1px solid #526159;
  display: flex;
}

.preset-controls button {
  background: transparent;
  border: 0;
  color: #afbbb4;
  cursor: pointer;
  font-size: 10px;
  min-height: 42px;
  min-width: 86px;
  text-transform: uppercase;
}

.preset-controls button.selected {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.preset-strip > p {
  color: #9eaaa4;
  font-size: 11px;
  margin: 0;
  text-align: right;
}

.metric-card {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 315px;
  padding: 30px clamp(24px, 3vw, 44px);
}

.card-heading {
  align-items: center;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-code {
  color: #a3aaa5;
  font-family: "Courier New", monospace;
  font-weight: 400;
  margin-left: auto;
}

.scenario-dot,
.legend i,
.allocation-list i {
  background: var(--amber);
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.scenario-dot.coupled,
.legend i.coupled,
.allocation-list i.coupled {
  background: var(--lime-dark);
}

.legend i.event {
  background: var(--ink);
  height: 6px;
  width: 6px;
}

.metric-card > strong {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.04em;
  margin: 38px 0 2px;
}

.metric-card > span {
  color: var(--muted);
  font-size: 10px;
}

.metric-card dl,
.allocation-list {
  border-top: 1px solid var(--line);
  margin: 32px 0 0;
}

.metric-card dl div,
.allocation-list div {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 38px;
}

.return-guide {
  background: #e7e8df;
  border-bottom: 1px solid var(--line);
  padding: 28px clamp(24px, 4vw, 64px) 30px;
}

.return-guide-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.return-guide-heading h2 {
  font-family: Georgia, serif;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0;
}

.return-guide dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 24px 0 0;
}

.return-guide dl div {
  border-left: 1px solid #c8cabf;
  padding: 0 18px;
}

.return-guide dl div:first-child {
  border-left: 0;
  padding-left: 0;
}

.return-guide dt {
  color: var(--ink);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.return-guide dd {
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
  margin-top: 8px;
}

.return-guide > p {
  border-top: 1px solid #c8cabf;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  margin: 24px 0 0;
  padding-top: 15px;
}

dt {
  color: var(--muted);
  font-size: 10px;
}

dd {
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  margin: 0;
}

.energy-visual {
  height: 135px;
  margin: 10px 0 -8px;
  overflow: hidden;
  position: relative;
}

.energy-visual svg {
  height: 100%;
  width: 100%;
}

.energy-visual path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.energy-visual .air-path {
  stroke: var(--lime-dark);
  stroke-dasharray: 5 5;
}

.sun-disc {
  background: var(--lime);
  border-radius: 50%;
  height: 50px;
  position: absolute;
  right: 12%;
  top: 18%;
  width: 50px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.7fr);
}

.operating-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.7fr);
}

.evidence-badge {
  background: #e9f5d0;
  border: 1px solid #b5cf80;
  color: #476904;
  font-family: "Courier New", monospace;
  font-size: 9px;
  padding: 7px 9px;
}

.monthly-chart {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: clamp(4px, 1vw, 12px);
  grid-template-columns: repeat(12, 1fr);
  height: 230px;
  margin-top: 34px;
}

.month-bar {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: end;
  position: relative;
}

.month-bar > span:first-child {
  background: var(--lime-dark);
  display: block;
  min-height: 4px;
  transition: height 200ms ease;
  width: min(30px, 70%);
}

.month-bar:hover > span:first-child,
.month-bar:focus-visible > span:first-child {
  background: var(--lime);
  outline: 1px solid var(--lime-dark);
}

.month-bar small {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 8px;
  margin: 8px 0 10px;
}

.month-bar output {
  background: var(--charcoal);
  color: var(--white);
  display: none;
  font-size: 9px;
  left: 50%;
  padding: 6px;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 2;
}

.month-bar:hover output,
.month-bar:focus-visible output {
  display: block;
}

.weather-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
}

.weather-stat-grid div {
  border-left: 1px solid var(--line);
  display: grid;
  gap: 5px;
  padding: 4px 14px;
}

.weather-stat-grid div:first-child {
  border-left: 0;
  padding-left: 0;
}

.weather-stat-grid strong {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 400;
}

.weather-stat-grid span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.decision-list {
  border-top: 1px solid var(--line);
  margin-top: 32px;
}

.decision-list div {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 52px;
}

.decision-list span {
  color: var(--muted);
  font-size: 10px;
}

.decision-list strong {
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.decision-callout {
  background: #edf5dc;
  border-left: 3px solid var(--lime-dark);
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding: 16px;
}

.decision-callout strong {
  font-size: 10px;
  text-transform: uppercase;
}

.decision-callout span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.panel {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 32px clamp(24px, 3vw, 44px);
}

.panel-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.panel h3,
.sensitivity-card h3 {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  margin: 8px 0 0;
}

.legend {
  display: flex;
  font-size: 9px;
  gap: 16px;
}

.legend span {
  align-items: center;
  display: flex;
  gap: 6px;
}

.chart-wrap {
  height: 315px;
  margin-top: 28px;
  position: relative;
}

#cashflow-chart {
  height: 100%;
  overflow: visible;
  width: 100%;
}

.chart-grid {
  stroke: #dfe0d8;
  stroke-width: 1;
}

.chart-axis {
  fill: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.chart-line.baseline {
  stroke: var(--amber);
}

.chart-line.coupled {
  stroke: var(--lime-dark);
}

.chart-event {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 2;
}

.chart-hit {
  fill: transparent;
  cursor: crosshair;
}

.chart-tooltip {
  background: var(--charcoal);
  color: var(--white);
  font-family: "Courier New", monospace;
  font-size: 10px;
  max-width: min(240px, calc(100% - 20px));
  padding: 10px;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
  width: max-content;
  z-index: 4;
}

.chart-explanation {
  border-left: 2px solid var(--lime-dark);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  margin: 14px 0 0;
  padding-left: 12px;
}

.donut-layout {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: 150px 1fr;
  margin-top: 50px;
}

.donut {
  align-items: center;
  border-radius: 50%;
  display: flex;
  height: 142px;
  justify-content: center;
  position: relative;
  width: 142px;
}

.donut::after {
  background: var(--surface);
  border-radius: 50%;
  content: "";
  height: 94px;
  position: absolute;
  width: 94px;
}

.donut div {
  position: relative;
  text-align: center;
  z-index: 1;
}

.donut strong,
.donut span {
  display: block;
}

.donut strong {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.donut span {
  color: var(--muted);
  font-size: 9px;
}

.allocation-list {
  margin: 0;
}

.allocation-list dt {
  align-items: center;
  display: flex;
  gap: 7px;
}

.allocation-list i.grid {
  background: #b9beb9;
}

.panel-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin: 30px 0 0;
}

.assumptions-section,
.commercial-gate-section,
.cost-stack-section,
.diligence-section,
.evidence-section,
.glossary-section,
.methodology {
  padding: 72px clamp(24px, 4vw, 64px);
}

.commercial-gate-section {
  background: #f4f2eb;
  border-top: 1px solid var(--line);
}

.commercial-gate-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 34px;
}

.contract-status-card,
.commercial-metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 190px;
  padding: 24px;
}

.contract-status-card {
  background: var(--charcoal);
  color: var(--white);
  grid-column: span 6;
}

.gate-status {
  background: #f0d39a;
  color: #664917;
  display: inline-flex;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 8px;
}

.gate-status[data-state="sensitivity"] {
  background: #dce8c2;
  color: #425824;
}

.gate-status[data-state="within-term"] {
  background: #d7e3de;
  color: #344a40;
}

.contract-status-card h3 {
  font-family: Georgia, serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.08;
  margin: 18px 0 10px;
}

.contract-status-card > p,
.commercial-metric-card p {
  color: #b8c2bc;
  font-size: 10px;
  line-height: 1.55;
  margin: 0;
}

.contract-timeline {
  display: flex;
  margin-top: 26px;
  min-height: 58px;
  width: 100%;
}

.contract-timeline div {
  display: grid;
  min-width: 54px;
  padding: 10px 12px;
}

.contract-timeline .contracted {
  background: var(--lime);
  color: var(--charcoal);
}

.contract-timeline .post-contract {
  background: #3d4a44;
}

.contract-timeline strong {
  font-family: "Courier New", monospace;
  font-size: 15px;
}

.contract-timeline span {
  align-self: end;
  font-size: 8px;
  text-transform: uppercase;
}

.commercial-metric-card {
  display: flex;
  flex-direction: column;
  grid-column: span 3;
}

.commercial-metric-card > span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.commercial-metric-card > strong {
  font-family: Georgia, serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  margin: 18px 0;
}

.commercial-metric-card > strong i {
  font-style: normal;
}

.commercial-metric-card p {
  color: var(--muted);
  margin-top: auto;
}

.commercial-metric-card.comparator {
  grid-column: span 6;
}

.commercial-metric-card.comparator a {
  color: var(--lime-dark);
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
  margin-top: 16px;
  text-underline-offset: 3px;
  width: fit-content;
}

.cost-stack-section {
  background: #e9e7df;
}

.cost-stack-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.cost-stack-card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 24px;
}

.cost-stack-card > span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-stack-card > strong {
  font-family: Georgia, serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  margin: 16px 0;
}

.cost-stack-card > p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  margin: auto 0 0;
}

.cost-stack-bar {
  background: #dfe2d7;
  height: 8px;
}

.cost-stack-bar i {
  background: var(--lime-dark);
  display: block;
  height: 100%;
  transition: width 180ms ease;
}

.cost-stack-card.total {
  background: var(--charcoal);
  color: var(--white);
}

.cost-stack-card.total > span,
.cost-stack-card.total dt {
  color: #aab4ae;
}

.cost-stack-card.total dl {
  border-top: 1px solid #435149;
  margin: auto 0 0;
  padding-top: 16px;
}

.cost-stack-card.total dl div {
  display: flex;
  font-size: 10px;
  gap: 12px;
  justify-content: space-between;
  margin-top: 10px;
}

.cost-stack-card.total dd {
  font-family: "Courier New", monospace;
  margin: 0;
  text-align: right;
}

.scope-warning {
  border-left: 3px solid var(--amber);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  margin: 18px 0 0;
  padding: 4px 0 4px 12px;
}

.diligence-section,
.glossary-section {
  background: #e9e7df;
}

.risk-toolbar {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 30px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-group button {
  background: transparent;
  border: 1px solid #bfc2b9;
  cursor: pointer;
  font-size: 9px;
  min-height: 38px;
  padding: 0 12px;
  text-transform: uppercase;
}

.filter-group button.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.risk-toolbar input,
.source-search input {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 44px;
  padding: 0 14px;
  width: min(100%, 310px);
}

.risk-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 30px 0 20px;
}

.risk-summary div {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  padding: 18px;
}

.risk-summary strong {
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 400;
}

.risk-summary span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.table-scroll {
  overflow-x: auto;
}

.risk-table {
  background: var(--surface);
  border-collapse: collapse;
  font-size: 11px;
  min-width: 780px;
  width: 100%;
}

.risk-table th,
.risk-table td {
  border-bottom: 1px solid var(--line);
  padding: 15px;
  text-align: left;
  vertical-align: top;
}

.risk-table th {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.risk-score {
  align-items: center;
  background: #f6d7a2;
  display: inline-flex;
  font-family: "Courier New", monospace;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 38px;
}

.risk-score.critical {
  background: #f0a58f;
}

.source-search {
  align-items: center;
  display: flex;
  font-size: 10px;
  gap: 12px;
  justify-content: flex-end;
  margin: 28px 0;
}

.source-grid,
.glossary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-card,
.glossary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
}

.source-card header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.source-card h3,
.glossary-card h3 {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  margin: 8px 0;
}

.source-card p,
.glossary-card p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.source-card a {
  color: var(--lime-dark);
  font-size: 10px;
  font-weight: 700;
}

.source-quality {
  background: #e9f5d0;
  color: #476904;
  font-size: 8px;
  padding: 6px 8px;
  white-space: nowrap;
}

.source-value {
  border-top: 1px solid var(--line);
  display: block;
  font-family: "Courier New", monospace;
  font-size: 10px;
  margin-top: 16px;
  padding-top: 14px;
}

.glossary-card h3 {
  color: var(--lime-dark);
  font-size: 27px;
}

.empty-state {
  border: 1px dashed #9ca49f;
  color: var(--muted);
  font-size: 11px;
  padding: 28px;
  text-align: center;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
}

.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
}

.section-heading h2 {
  font-size: clamp(40px, 4vw, 62px);
}

.section-heading > p {
  color: var(--muted);
  line-height: 1.5;
  max-width: 390px;
}

.assumption-layout {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin-top: 35px;
}

.assumption-groups {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, 1fr);
}

.assumption-group {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 26px;
}

.assumption-group h3 {
  font-size: 11px;
  letter-spacing: 0.1em;
  margin: 0 0 24px;
  text-transform: uppercase;
}

.assumption-control {
  margin-bottom: 24px;
}

.assumption-control:last-child {
  margin-bottom: 0;
}

.control-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.control-label label {
  color: var(--muted);
  font-size: 10px;
}

.control-label output {
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
}

input[type="range"] {
  accent-color: var(--lime-dark);
  cursor: pointer;
  margin: 10px 0 0;
  width: 100%;
}

.sensitivity-card {
  background: var(--charcoal);
  color: var(--white);
  padding: 28px;
}

.sensitivity-card .eyebrow,
.sensitivity-card p {
  color: #93a099;
}

.bridge {
  display: grid;
  gap: 17px;
  margin-top: 35px;
}

.bridge-row {
  display: grid;
  gap: 8px;
}

.bridge-label {
  display: flex;
  font-size: 10px;
  justify-content: space-between;
}

.bridge-bar {
  background: #34433c;
  height: 8px;
}

.bridge-bar span {
  background: var(--lime);
  display: block;
  height: 100%;
}

.sensitivity-card p {
  border-top: 1px solid #435149;
  font-size: 10px;
  line-height: 1.6;
  margin-top: 35px;
  padding-top: 20px;
}

.methodology {
  background: var(--charcoal);
  color: var(--white);
}

.methodology h2 {
  font-size: clamp(40px, 4vw, 62px);
}

.method-grid {
  border-top: 1px solid #435149;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 38px;
}

.method-grid article {
  border-right: 1px solid #435149;
  padding: 30px 35px 30px 0;
}

.method-grid article + article {
  padding-left: 35px;
}

.method-grid span {
  color: var(--lime);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.method-grid h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.method-grid p,
.disclaimer {
  color: #a8b3ad;
  font-size: 11px;
  line-height: 1.7;
}

.disclaimer {
  border: 1px solid #526159;
  margin-top: 35px;
  padding: 18px;
}

.disclaimer strong {
  color: var(--white);
}

.toast {
  background: var(--charcoal);
  bottom: 24px;
  color: var(--white);
  font-size: 11px;
  opacity: 0;
  padding: 14px 18px;
  pointer-events: none;
  position: fixed;
  right: 24px;
  transform: translateY(10px);
  transition: 180ms ease;
  z-index: 50;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.acronym-help {
  border-bottom: 1px dotted currentColor;
  cursor: help;
  text-decoration: none;
  text-underline-offset: 3px;
}

.acronym-tooltip {
  background: var(--charcoal);
  border: 1px solid #526159;
  box-shadow: var(--shadow);
  color: var(--white);
  font-size: 11px;
  line-height: 1.55;
  max-width: min(340px, calc(100vw - 24px));
  padding: 12px 14px;
  pointer-events: none;
  position: fixed;
  width: max-content;
  z-index: 100;
}

:focus-visible {
  outline: 3px solid var(--lime-dark);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    box-shadow: var(--shadow);
    left: 0;
    position: fixed;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-button {
    display: block;
  }

  .topbar > div:nth-child(2) {
    margin-right: auto;
  }

  .topbar {
    gap: 12px;
  }

  .topbar h1 {
    display: none;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .return-guide dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }

  .return-guide dl div:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .climate-card {
    grid-column: 1 / -1;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .operating-grid {
    grid-template-columns: 1fr;
  }

  .contract-status-card,
  .commercial-metric-card.comparator {
    grid-column: span 12;
  }

  .commercial-metric-card {
    grid-column: span 6;
  }

  .cost-stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assumption-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 72px;
    padding: 12px 16px;
  }

  .preset-strip {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .preset-strip > p {
    text-align: left;
  }

  .preset-controls {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    width: 100%;
  }

  .preset-controls button {
    flex: 0 0 86px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .primary-button {
    display: none;
  }

  .mobile-export-button {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 45px;
  }

  .metric-grid,
  .assumption-groups,
  .commercial-gate-grid,
  .cost-stack-grid,
  .method-grid,
  .source-grid,
  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .contract-status-card,
  .commercial-metric-card,
  .commercial-metric-card.comparator {
    grid-column: 1;
  }

  .return-guide-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .return-guide dl {
    grid-template-columns: 1fr;
  }

  .return-guide dl div,
  .return-guide dl div:nth-child(odd) {
    border-left: 0;
    border-top: 1px solid #c8cabf;
    padding: 14px 0 0;
  }

  .return-guide dl div:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .risk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-toolbar input,
  .source-search input {
    width: 100%;
  }

  .risk-summary {
    grid-template-columns: 1fr;
  }

  .source-search {
    align-items: stretch;
    flex-direction: column;
  }

  .monthly-chart {
    gap: 2px;
  }

  .weather-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 16px;
  }

  .weather-stat-grid div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .climate-card {
    grid-column: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .donut-layout {
    grid-template-columns: 1fr;
  }

  .donut {
    margin: auto;
  }

  .method-grid article,
  .method-grid article + article {
    border-bottom: 1px solid #435149;
    border-right: 0;
    padding: 25px 0;
  }

  .legend {
    display: grid;
  }
}

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