:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --nav-width: 16rem;
  --nav-collapsed: 3rem;
  --ink: #1f2933;
  --muted: #52606d;
  --nav: #173b57;
  --nav-dark: #102b40;
  --nav-hover: #2f6f98;
  --accent: #17699b;
  --accent-soft: #eaf4fa;
  --paper: #fffdf7;
  --panel: #ffffff;
  --line: #aebdca;
  --head: #e8f1f6;
  --zebra: #f7fafc;
  --focus: #ffbf47;
}
* { box-sizing: border-box; }
html { overflow-x: auto; }
body {
  margin: 0;
  min-width: 20rem;
  color: var(--ink);
  background: var(--paper);
}
a { color: #075ca8; text-underline-offset: .12em; }
a:hover { color: #003f73; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, summary:focus-visible, th:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.app-shell { display: flex; align-items: flex-start; min-height: 100vh; }
.orientation {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 var(--nav-width);
  width: var(--nav-width);
  max-height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #7891a3;
  color: white;
  background: var(--nav);
}
.app-shell.nav-collapsed .orientation {
  flex-basis: var(--nav-collapsed);
  width: var(--nav-collapsed);
  overflow-x: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 3.2rem;
  padding: .4rem .55rem;
  color: white;
  text-decoration: none;
  background: var(--nav-dark);
}
.brand-mark {
  display: inline-grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 2px solid #9bd5f5;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  letter-spacing: -.12em;
}
.brand-label { font-weight: 700; line-height: 1.05; }
.nav-toggle {
  width: 100%;
  min-height: 2.5rem;
  border: 0;
  border-top: 1px solid #55748a;
  border-bottom: 1px solid #55748a;
  color: white;
  background: var(--nav-dark);
  cursor: pointer;
}
.orientation nav { display: grid; gap: 1px; }
.nav-link, .nav-group > summary {
  display: block;
  border: 0;
  padding: .62rem .58rem;
  color: #fff;
  background: #244d69;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active, .nav-group > summary:hover {
  color: white;
  background: var(--nav-hover);
}
.nav-group > summary {
  list-style: none;
  font-weight: 700;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: "▸"; float: right; }
.nav-group[open] > summary::after { content: "▾"; }
.subtab-link {
  display: block;
  padding: .36rem .5rem .36rem 1.1rem;
  color: #edf7ff;
  background: #163d59;
  font-size: .79rem;
  line-height: 1.2;
  text-decoration: none;
}
.subtab-link:hover, .subtab-link.active { color: white; background: var(--nav-hover); }
.app-shell.nav-collapsed .brand-label,
.app-shell.nav-collapsed .nav-label,
.app-shell.nav-collapsed .nav-group { display: none; }
.app-shell.nav-collapsed .nav-short { display: inline; }
.nav-short { display: none; font-weight: 700; }
.app-shell.nav-collapsed .nav-link { text-align: center; padding-inline: 0; }
main {
  min-width: 0;
  max-width: none;
  padding: .9rem 1rem 3rem;
}
h1, h2, h3 { color: #183a57; line-height: 1.2; }
h1 { margin: 0 0 .7rem; font-size: 1.55rem; }
h2 { margin-top: 1.35rem; font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p, li { line-height: 1.45; }
.meta, .note, .card {
  max-width: 78rem;
  padding: .65rem .75rem;
  margin: 0 0 1rem;
  border: 1px solid #c8d5df;
  border-left: .35rem solid var(--accent);
  border-radius: .2rem;
  background: var(--accent-soft);
}
.card { background: var(--panel); }
.home-grid {
  display: grid;
  grid-template-columns: minmax(30rem, 55rem) minmax(18rem, 34rem);
  gap: 1rem;
  align-items: start;
}
.charts img { width: 100%; height: auto; }
.station-name {
  margin: -.25rem 0 .25rem;
  color: var(--muted);
  font-size: 1rem;
}
.station-build-note {
  margin: 0 0 .7rem;
  color: var(--muted);
  font-size: .78rem;
}
.station-meta-cards {
  display: grid;
  gap: .5rem;
  width: calc(100% - min(39%, 36rem) - 1rem);
  max-width: 78rem;
  margin: 0 0 1rem;
}
.station-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
}
.station-meta-card {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  min-width: 0;
  min-height: 3.25rem;
  border: 1px solid #ccd6e3;
  border-radius: .375rem;
  padding: .62rem .75rem;
  background: var(--panel);
}
.station-meta-card--metric { flex: 1 1 10.5rem; }
.station-meta-card--detail { flex: 1 1 19rem; }
.station-meta-card dt {
  flex: 0 0 auto;
  margin: 0;
  color: #5b6780;
  font-size: .92rem;
  font-weight: 400;
  white-space: nowrap;
}
.station-meta-card dd {
  min-width: 0;
  margin: 0;
  color: #0d3b66;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}
.station-meta-card dd a { font-weight: 700; }
.station-summary-layout {
  display: block;
  width: 100%;
}
.station-summary-layout > * { min-width: 0; }
.station-mpec-section { min-width: 0; }
.station-mpec-table-wrap {
  clear: both;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.station-chart-clear { clear: both; height: 0; }
.station-chart-list {
  float: right;
  width: min(39%, 36rem);
  margin: 0 0 1rem 1rem;
}
.station-chart-list figure { margin: 0 0 .75rem; }
.station-chart-list img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 52rem;
}
.station-object-section { clear: both; width: 100%; }
button, .button {
  min-height: 2.15rem;
  border: 1px solid #2e668c;
  border-radius: .25rem;
  padding: .32rem .62rem;
  color: #173f5b;
  background: white;
  cursor: pointer;
}
button:hover, button.active, .button:hover {
  color: white;
  background: #2e668c;
}
input, select {
  min-height: 2.15rem;
  border: 1px solid #7d929f;
  border-radius: .2rem;
  padding: .3rem .42rem;
  background: white;
}
.controls, .table-toolbar, .pager {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin: .55rem 0;
}
.controls { padding: .55rem; border: 1px solid var(--line); background: var(--accent-soft); }
.table-toolbar { position: sticky; left: 0; width: max-content; max-width: 100%; }
.table-status { min-width: 11rem; color: var(--muted); font-weight: 700; }
table {
  width: max-content;
  max-width: none;
  margin: 0 0 1rem;
  border-collapse: collapse;
  background: var(--panel);
}
th, td {
  box-sizing: border-box;
  max-width: 42rem;
  border: 1px solid #b6c1c8;
  padding: 2px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}
th {
  position: sticky;
  top: 0;
  z-index: 4;
  color: #17364d;
  background: var(--head);
  cursor: pointer;
  white-space: normal;
}
thead {
  position: sticky;
  top: 0;
  z-index: 4;
}
tbody tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: #fff4cf; }
td[align="right"], th[align="right"], .numeric, .station-code, td.station {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.station-code, td.station, .monospace {
  font-family: Consolas, "Courier New", monospace;
  white-space: nowrap;
}
.one-line { white-space: nowrap; }
.summary { min-width: 32rem; }
.telescope { color: #1f5a35; }
.observer { color: #7a4700; }
.measurer { color: #5d2f82; }
.reference { font-size: inherit; white-space: nowrap; }
.resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
}
.no-wrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.column-menu {
  position: fixed;
  z-index: 1000;
  display: none;
  max-width: 24rem;
  max-height: 70vh;
  overflow: auto;
  padding: .5rem;
  border: 1px solid #526b7d;
  border-radius: .25rem;
  box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .25);
  color: var(--ink);
  background: white;
}
.column-menu.open { display: grid; gap: .25rem; }
.column-menu label { display: flex; gap: .35rem; align-items: center; }
.column-menu button { width: 100%; text-align: left; }
.table-links { columns: 2 24rem; column-gap: 2rem; }
.table-links li { break-inside: avoid; margin-bottom: .35rem; }
.heatmap th, .heatmap td {
  min-width: 2.65rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.heatmap th:first-child, .heatmap td:first-child { min-width: 4.2rem; }
.heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin: .55rem 0 1rem;
}
.heatmap-key {
  display: inline-flex;
  gap: .25rem;
  align-items: center;
}
.virtual-spacer td { padding: 0 !important; border: 0 !important; }
.heatmap-swatch {
  display: inline-block;
  width: 2.1rem;
  height: 1.25rem;
  border: 1px solid #61798b;
}
[data-report-panel][hidden] { display: none; }
.footer { margin-top: 2rem; color: var(--muted); font-size: .82rem; }
@media (max-width: 900px) {
  .home-grid { display: block; }
  .station-meta-card--metric { flex-basis: 9rem; }
  .station-meta-card--detail { flex-basis: 17rem; }
  .orientation { position: relative; min-height: 100vh; }
  main { padding-inline: .55rem; }
}
@media (max-width: 760px) {
  .station-meta-cards { width: 100%; }
  .station-chart-list {
    float: none;
    width: 100%;
    max-width: 52rem;
    margin: 0 0 1rem;
  }
}
@media (max-width: 520px) {
  .station-meta-card--metric,
  .station-meta-card--detail { flex-basis: 100%; }
}
