.history-shell {
  width: min(1180px, 92vw);
  margin: auto;
}
.topbar nav {
  flex-wrap: wrap;
}
.history-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 3rem;
  align-items: end;
  padding: clamp(3rem, 8vw, 7rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.history-hero h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin: 0.45rem 0 1.2rem;
}
.history-hero h1 em {
  display: block;
  color: var(--cyan);
  font-style: normal;
}
.history-hero > div > p:last-child {
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}
.history-hero aside {
  border-left: 2px solid var(--cyan);
  padding: 1rem 0 1rem 1.2rem;
  display: grid;
  gap: 0.35rem;
}
.history-hero aside span,
.history-hero aside small {
  font: 700 0.7rem monospace;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.history-hero aside strong {
  font-size: 1.35rem;
}
.history-notice {
  display: flex;
  gap: 1.3rem;
  align-items: baseline;
  margin: 1.5rem 0 3rem;
  padding: 1.1rem 1.3rem;
  background: #0c202a;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
}
.history-notice strong {
  white-space: nowrap;
  color: var(--amber);
}
.history-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}
.history-controls {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(150px, 210px));
  gap: 1rem;
  align-items: end;
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 4rem;
}
.history-controls h2,
.history-section-head h2,
.chart-panel h2,
.context-panel h2,
.method-grid h2 {
  margin: 0.25rem 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}
.history-controls label {
  display: grid;
  gap: 0.45rem;
  color: #a9bac4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.history-controls select {
  width: 100%;
  background: #071019;
  color: var(--ink);
  border: 1px solid #29404d;
  border-radius: 3px;
  padding: 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}
.history-section-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.2rem;
}
.history-section-head > p {
  max-width: 500px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}
.coverage-pill {
  font: 700 0.72rem monospace;
  color: var(--cyan);
  border: 1px solid #285261;
  padding: 0.55rem 0.7rem;
}
.history-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 4rem;
}
.history-card {
  background: var(--panel);
  padding: 1.3rem;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}
.history-card .card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.history-card h3 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin: 0;
  color: #b9cbd4;
}
.history-status {
  font: 700 0.62rem monospace;
  text-transform: uppercase;
  padding: 0.25rem 0.4rem;
  border: 1px solid #37505c;
  color: var(--muted);
}
.history-status.official {
  color: var(--green);
  border-color: #285c4b;
}
.history-status.preliminary {
  color: var(--amber);
  border-color: #6b572d;
}
.history-status.estimate,
.history-status.derived {
  color: var(--cyan);
  border-color: #285c68;
}
.history-value {
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin: 1rem 0 0.45rem;
}
.history-card.unavailable .history-value {
  color: #58707d;
  font-size: 1.25rem;
}
.history-period {
  color: var(--muted);
  font: 700 0.68rem monospace;
}
.history-note {
  color: #91a7b2;
  font-size: 0.72rem;
  line-height: 1.55;
  margin: 0.8rem 0;
}
.history-source {
  margin-top: auto;
  color: var(--cyan);
  font-size: 0.7rem;
  text-decoration: none;
}
.comparison-panel,
.chart-panel,
.context-panel {
  margin-bottom: 4rem;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--panel);
}
th,
td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}
th {
  background: #0b1c25;
  color: #8fa6b1;
  font: 700 0.68rem monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
td:first-child {
  font-weight: 800;
  color: #d8e3e8;
}
td.na {
  color: #607783;
}
.delta-up {
  color: var(--green);
}
.delta-down {
  color: var(--red);
}
.chart-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.5rem;
}
.chart-panel svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart-grid {
  stroke: #203743;
  stroke-width: 1;
}
.chart-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 4;
}
.chart-dot {
  fill: #071019;
  stroke: var(--cyan);
  stroke-width: 3;
}
.chart-label {
  fill: #8fa6b1;
  font: 22px monospace;
}
.chart-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #29404d;
  padding: 2rem;
}
.chart-footnote {
  color: var(--muted);
  font-size: 0.7rem;
  margin: 1rem 0 0;
}
.context-panel {
  padding: 2rem;
  border-left: 3px solid var(--cyan);
  background: #0c202a;
}
.context-panel > p:last-child {
  max-width: 880px;
  color: #b5c7d0;
  line-height: 1.75;
}
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}
.method-grid > div > p:last-child {
  color: var(--muted);
  line-height: 1.7;
}
.method-grid ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
}
.method-grid li {
  background: var(--panel);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 1rem;
}
.method-grid li b {
  color: var(--cyan);
  font: 800 0.8rem monospace;
}
.method-grid li span {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.method-grid li strong {
  color: var(--ink);
  font-size: 0.92rem;
}
@media (max-width: 900px) {
  .history-hero {
    grid-template-columns: 1fr;
  }
  .history-controls {
    grid-template-columns: 1fr 1fr;
  }
  .history-controls > div {
    grid-column: 1/-1;
  }
  .history-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .method-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .history-shell {
    width: min(94vw, 1180px);
  }
  .history-controls {
    grid-template-columns: 1fr;
  }
  .history-cards {
    grid-template-columns: 1fr;
  }
  .history-section-head {
    align-items: start;
    flex-direction: column;
  }
  .history-section-head > p {
    text-align: left;
  }
  .history-notice {
    align-items: start;
    flex-direction: column;
  }
  .history-hero h1 {
    font-size: 3.15rem;
  }
  .chart-panel {
    padding: 1rem;
  }
}
