:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7f7;
  color: #17211f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.page-header {
  border-bottom: 1px solid #d4ddda;
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #347368;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: 2.5rem;
  line-height: 1.1;
}

p {
  line-height: 1.5;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

select {
  width: 100%;
  border: 1px solid #8ba69d;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: inherit;
  font: inherit;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  border: 1px solid #9cb6ad;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: #17211f;
  cursor: pointer;
  font: inherit;
}

.tab.active {
  background: #246f62;
  color: #ffffff;
}

.tab-panel {
  display: none;
  min-height: 280px;
}

.tab-panel.active {
  display: grid;
  gap: 16px;
}

#headline.active {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.overview-wide {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.impact-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.provenance-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.download-inline {
  border: 1px solid #c7d4cf;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
}

.empty-state {
  border: 1px solid #c7d4cf;
  border-radius: 8px;
  background: #ffffff;
  color: #4d5d58;
  padding: 16px;
}

article,
.section-heading,
.table-wrap,
dl,
ul {
  border: 1px solid #c7d4cf;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.model-status-ok {
  border-color: #3b8c7c;
}

.model-status-sample,
.model-status-warning,
.model-status-stale {
  border-color: #d6a700;
}

.model-status-error {
  border-color: #b85532;
}

.interval-card {
  border-color: #3b6c8c;
}

.interval-card .interval-line {
  margin: 4px 0;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.interval-card .interval-line-outer {
  color: #5a6e75;
}

.interval-fan {
  position: relative;
  margin-top: 10px;
  margin-bottom: 6px;
}

.interval-fan-68 {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: #d4e2ee;
}

.interval-fan-50 {
  position: absolute;
  top: 0;
  height: 14px;
  border-radius: 7px;
  background: #5b8bb6;
}

.interval-fan-marker {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 18px;
  background: #1f3a52;
  transform: translateX(-1px);
}

.interval-foot {
  margin: 4px 0 0;
  color: #49645c;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.data-source-banner {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
}

.data-source-banner[hidden] {
  display: none;
}

.data-source-warning {
  background: #fff4d6;
  border: 1px solid #d6a700;
  color: #5a4400;
}

.data-source-muted {
  background: #eef0f1;
  border: 1px solid #b9c4cb;
  color: #41525a;
}

.data-source-good {
  background: #e0f2e9;
  border: 1px solid #3b8c7c;
  color: #1f5746;
}

article h2 {
  margin: 0 0 8px;
  color: #49645c;
  font-size: 0.9rem;
  text-transform: uppercase;
}

article strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.15;
}

article p,
.section-heading p {
  margin: 8px 0 0;
}

.section-heading h2 {
  margin: 0;
}

.history-chart {
  display: grid;
  gap: 10px;
}

.chart-card {
  border: 1px solid #c7d4cf;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  overflow-x: auto;
}

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.chart-card svg {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
}

.grid-line {
  stroke: #d8e0dc;
  stroke-width: 1;
}

.zero-axis {
  stroke: #26312f;
  stroke-width: 1.4;
}

.forecast-line {
  stroke: #17211f;
  stroke-width: 2;
}

.selected-run-line {
  stroke: #17211f;
  stroke-dasharray: 5 5;
  stroke-width: 1.5;
}

.axis-label {
  fill: #4d5d58;
  font-size: 0.72rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.legend-swatch {
  inline-size: 12px;
  block-size: 12px;
  border-radius: 3px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-left: 4px solid #3b8c7c;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 16px;
}

.timeline-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.timeline-item p {
  margin: 0;
}

.history-row {
  display: grid;
  grid-template-columns: 96px minmax(90px, 1fr) 160px;
  align-items: center;
  gap: 12px;
}

.bar {
  display: block;
  block-size: 18px;
  border-radius: 8px;
  background: #3b8c7c;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #d8e0dc;
  padding: 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #49645c;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.status-badge {
  display: inline-block;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge.new_release {
  background: #dff2ec;
  color: #15594e;
}

.status-badge.carried_forward {
  background: #eef1f0;
  color: #4d5d58;
}

.status-badge.pending {
  background: #f5eadf;
  color: #7c3f1d;
}

.model-status-badge {
  display: inline-block;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.model-status-badge-ok {
  background: #dff2ec;
  color: #15594e;
}

.model-status-badge-sample,
.model-status-badge-warning,
.model-status-badge-stale {
  background: #f3edd2;
  color: #665000;
}

.model-status-badge-error {
  background: #f5dfd8;
  color: #813516;
}

dt {
  font-weight: 700;
}

dd {
  margin: 6px 0 16px;
}

a {
  color: #246f62;
}

@media (max-width: 720px) {
  main {
    padding: 24px 0 40px;
  }

  h1 {
    font-size: 2rem;
  }

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

  .history-row {
    grid-template-columns: 80px minmax(70px, 1fr) 120px;
  }
}
