:root {
  --climate-red: #b74432;
  --climate-blue: #276a94;
  --climate-teal: #16756a;
  --climate-yellow: #d7a41a;
  --climate-dark: #17211c;
}

.climate-body {
  min-height: 100%;
  height: auto;
  background: #f1f3f0;
}

.climate-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.climate-intro,
.measurements-intro {
  max-width: 940px;
  padding: 80px 0 60px;
}

.climate-kicker,
.climate-section-heading > span,
.measurement-heading > div > span,
.climate-rule > div > span,
.interpretation-band > div > span {
  display: block;
  margin-bottom: 14px;
  color: var(--climate-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.climate-intro h1,
.measurements-intro h1 {
  max-width: 900px;
  margin: 0;
  font-size: 52px;
  line-height: 1.06;
  letter-spacing: 0;
}

.climate-lead {
  max-width: 840px;
  margin: 24px 0 0;
  color: #435049;
  font-size: 18px;
  line-height: 1.65;
}

.climate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.climate-primary,
.climate-secondary,
.climate-back,
.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--climate-dark);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.climate-primary { color: white; background: var(--climate-dark); }
.climate-secondary,
.climate-back,
.source-link { background: white; }
.climate-primary:hover { background: #2d3a33; }
.climate-secondary:hover,
.climate-back:hover,
.source-link:hover { background: #f8faf8; }
.climate-primary svg,
.climate-secondary svg,
.climate-back svg,
.source-link svg { width: 17px; height: 17px; }

.evidence-boundaries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-top: 4px solid var(--climate-dark);
  border-bottom: 1px solid var(--line);
}

.evidence-boundaries > div {
  min-height: 150px;
  padding: 26px;
  border-right: 1px solid var(--line);
}
.evidence-boundaries > div:last-child { border-right: 0; }
.evidence-boundaries span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.evidence-boundaries strong { display: block; margin-top: 24px; font-size: 20px; }
.evidence-boundaries p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }

.climate-section { margin-top: 72px; }
.climate-section-heading { max-width: 760px; margin-bottom: 28px; }
.climate-section-heading h2,
.climate-rule h2,
.interpretation-band h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.16;
}
.climate-section-heading p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.evidence-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--climate-dark);
}

.evidence-step {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  gap: 24px;
  align-items: center;
  min-height: 150px;
  padding: 24px 8px;
  border-bottom: 1px solid var(--line);
}
.evidence-step.is-current { background: #fff7e7; border-bottom-color: #e5c67f; }
.step-index { color: var(--muted); font-size: 24px; font-variant-numeric: tabular-nums; }
.step-state { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.evidence-step.is-current .step-state { color: #8a5914; }
.evidence-step h3 { margin: 7px 0 0; font-size: 20px; }
.evidence-step p { max-width: 780px; margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.evidence-step > a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--climate-dark);
  border-radius: 50%;
  background: white;
}
.evidence-step > a svg { width: 17px; }

.climate-rule {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 28px;
  padding: 38px;
  color: white;
  background: var(--climate-dark);
}
.rule-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid #607068;
  border-radius: 50%;
}
.rule-icon svg { width: 28px; height: 28px; }
.climate-rule > div > span { color: #f3c55c; }
.climate-rule p { max-width: 850px; margin: 14px 0 0; color: #c8d0cb; font-size: 15px; line-height: 1.65; }

.standard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--climate-dark);
  border-bottom: 1px solid var(--line);
}
.standard-grid > div { min-height: 190px; padding: 26px 20px; border-right: 1px solid var(--line); }
.standard-grid > div:last-child { border-right: 0; }
.standard-grid svg { width: 22px; height: 22px; color: var(--climate-blue); }
.standard-grid strong { display: block; margin-top: 34px; font-size: 15px; }
.standard-grid p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }

.climate-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(20px, calc((100% - 1180px) / 2));
  color: var(--muted);
  background: white;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.climate-footer a { color: var(--ink); font-weight: 750; }

.measurements-intro { padding-bottom: 42px; }
.climate-back { width: fit-content; min-height: 34px; margin-bottom: 44px; padding: 0; border: 0; background: transparent; }
.climate-back:hover { background: transparent; text-decoration: underline; }

.measurement-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: white;
  background: var(--climate-dark);
  border-top: 4px solid var(--climate-red);
}
.measurement-summary > div { min-height: 142px; padding: 25px 28px; border-right: 1px solid #435149; }
.measurement-summary > div:last-child { border-right: 0; }
.measurement-summary span,
.measurement-summary small { display: block; color: #aebbb4; font-size: 10px; }
.measurement-summary strong { display: block; margin: 14px 0 8px; font-size: 30px; font-variant-numeric: tabular-nums; }

.measurement-block {
  padding: 38px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.measurement-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.measurement-heading h2 { margin: 0; font-size: 28px; }
.measurement-heading p { max-width: 690px; margin: 11px 0 0; color: var(--muted); line-height: 1.55; }
.chart-segments { display: flex; flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #f2f4f2; }
.chart-segment { min-width: 82px; height: 34px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.chart-segment.is-active { color: white; background: var(--climate-dark); }

.chart-shell { padding: 20px 20px 14px; background: #f8faf8; border-top: 3px solid var(--climate-dark); }
.co2-block .chart-shell { border-top-color: var(--climate-blue); }
.chart-meta { min-height: 58px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.chart-meta span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }
.chart-meta strong { display: block; margin-top: 5px; font-size: 20px; font-variant-numeric: tabular-nums; }
.chart-meta p { margin: 0; color: var(--muted); font-size: 10px; text-align: right; }
.climate-chart { width: 100%; min-height: 340px; overflow: hidden; }
.climate-chart svg { width: 100%; height: 340px; display: block; }
.chart-grid { stroke: #dce2de; stroke-width: 1; }
.chart-zero { stroke: #77837c; stroke-width: 1.2; stroke-dasharray: 4 4; }
.chart-axis-label { fill: #68736d; font-size: 10px; }
.chart-line { fill: none; stroke: var(--climate-red); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.chart-line.europe { stroke: var(--climate-blue); }
.chart-line.co2 { stroke: var(--climate-teal); }
.chart-area { fill: rgba(183, 68, 50, .11); }
.chart-area.co2 { fill: rgba(22, 117, 106, .12); }
.chart-uncertainty { fill: rgba(39, 106, 148, .13); }
.chart-selected-line { stroke: #17211c; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-selected-dot { fill: white; stroke: #17211c; stroke-width: 2.5; }
.chart-year-control { width: 100%; margin: 4px 0 0; accent-color: var(--climate-dark); }
.chart-axis-caption { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }

.measurement-explanation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.measurement-explanation > div { padding: 22px 20px 22px 0; }
.measurement-explanation > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.measurement-explanation strong { font-size: 13px; }
.measurement-explanation p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }

.data-disclosure { border-bottom: 1px solid var(--line); }
.data-disclosure summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 11px; font-weight: 750; list-style: none; }
.data-disclosure summary::-webkit-details-marker { display: none; }
.data-disclosure summary svg { width: 16px; transition: transform .2s ease; }
.data-disclosure[open] summary svg { transform: rotate(180deg); }
.data-disclosure-content { padding: 0 0 24px; }
.data-disclosure-content > p { max-width: 820px; color: var(--muted); line-height: 1.55; }
.climate-data-table-wrap { max-height: 340px; overflow: auto; border: 1px solid var(--line); }
.climate-data-table { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.climate-data-table th { position: sticky; top: 0; color: var(--muted); background: #f2f4f2; text-align: left; }
.climate-data-table th,
.climate-data-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }

.source-link { min-height: 36px; white-space: nowrap; }
.interpretation-band { display: grid; grid-template-columns: minmax(280px, .8fr) 1.2fr; gap: 60px; padding: 36px; background: #fff7e7; border-top: 4px solid var(--climate-yellow); }
.interpretation-band p { margin: 24px 0 0; color: #5a5548; font-size: 15px; line-height: 1.65; }

.source-register { border-top: 1px solid var(--climate-dark); }
.source-register > a {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr) 24px;
  gap: 28px;
  align-items: center;
  min-height: 86px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.source-register > a:hover { background: white; }
.source-register strong,
.source-register span { display: block; }
.source-register span,
.source-register p { color: var(--muted); font-size: 11px; }
.source-register span { margin-top: 5px; }
.source-register p { margin: 0; line-height: 1.5; }
.source-register svg { width: 17px; height: 17px; }

.climate-data-error { min-height: 250px; display: grid; place-items: center; color: #8a2f28; text-align: center; }

@media (max-width: 1050px) {
  .climate-body .topbar { height: auto; min-height: 64px; align-items: flex-start; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .climate-body .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .standard-grid { grid-template-columns: repeat(2, 1fr); }
  .standard-grid > div:nth-child(2) { border-right: 0; }
  .standard-grid > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .climate-page { width: min(100% - 24px, 1180px); }
  .climate-body .topbar { display: block; }
  .climate-body .topbar-actions { margin-top: 10px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .climate-body .nav-action { flex: 0 0 auto; }
  .climate-intro,
  .measurements-intro { padding: 52px 0 40px; }
  .climate-intro h1,
  .measurements-intro h1 { font-size: 38px; }
  .climate-lead { font-size: 16px; }
  .evidence-boundaries,
  .measurement-summary { grid-template-columns: 1fr; }
  .evidence-boundaries > div,
  .measurement-summary > div { min-height: 110px; border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-boundaries > div:last-child,
  .measurement-summary > div:last-child { border-bottom: 0; }
  .evidence-boundaries strong { margin-top: 12px; }
  .climate-section { margin-top: 48px; }
  .evidence-step { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
  .evidence-step > a { grid-column: 2; }
  .climate-rule { grid-template-columns: 1fr; padding: 28px 22px; }
  .standard-grid { grid-template-columns: 1fr; }
  .standard-grid > div { min-height: 155px; border-right: 0; border-bottom: 1px solid var(--line); }
  .measurement-block { padding: 24px 14px; }
  .measurement-heading { display: block; }
  .chart-segments,
  .source-link { width: 100%; margin-top: 20px; }
  .chart-segment { flex: 1; }
  .chart-meta { display: block; }
  .chart-meta p { margin-top: 7px; text-align: left; }
  .climate-chart,
  .climate-chart svg { min-height: 270px; height: 270px; }
  .measurement-explanation { grid-template-columns: 1fr; }
  .measurement-explanation > div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .interpretation-band { grid-template-columns: 1fr; gap: 0; padding: 28px 22px; }
  .source-register > a { grid-template-columns: minmax(0, 1fr) 20px; gap: 12px; }
  .source-register > a p { grid-column: 1 / -1; }
  .climate-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .climate-intro h1,
  .measurements-intro h1 { font-size: 32px; }
  .climate-actions > a { width: 100%; }
  .climate-section-heading h2,
  .climate-rule h2,
  .interpretation-band h2 { font-size: 26px; }
}
