
:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #20242c;
  --muted: #667085;
  --line: #d6dce5;
  --teal: #007f88;
  --gold: #b98212;
  --pink: #b34a7a;
  --nav: #121826;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}
.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: 222px;
  background: var(--nav);
  color: white;
  padding: 12px;
  z-index: 10;
}
.side-nav.collapsed { width: 54px; }
.side-nav.collapsed nav a,
.side-nav.collapsed .brand-small span { display: none; }
.nav-toggle {
  width: 36px;
  height: 32px;
  border: 1px solid #334155;
  background: #1f2937;
  color: white;
  cursor: pointer;
}
.brand-small,
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-small { margin: 14px 0 18px; font-weight: 700; }
.logo { width: 42px; height: 42px; flex: 0 0 auto; }
.brand .logo { width: 58px; height: 58px; }
nav a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 9px 8px;
  border-radius: 6px;
}
nav a:hover,
nav a.active { background: #253047; }
main {
  margin-left: 222px;
  padding: 20px 24px 36px;
  max-width: none;
  width: calc(100% - 222px);
}
.side-nav.collapsed + main {
  margin-left: 54px;
  width: calc(100% - 54px);
}
.page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.external-link {
  display: inline-block;
  border: 1px solid var(--teal);
  background: #e7f5f5;
  color: #005d65;
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
}
h1 { margin: 0; font-size: 2rem; }
h2 { margin: 22px 0 8px; font-size: 1.25rem; }
p { max-width: none; }
code, pre {
  background: #e9edf3;
  border: 1px solid var(--line);
  border-radius: 4px;
}
code { padding: 1px 4px; }
pre {
  padding: 10px;
  overflow: auto;
  max-width: 760px;
}
.generated { color: var(--muted); white-space: nowrap; }
.metrics,
.metric-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 154px;
}
.metric-label { color: var(--muted); font-size: .82rem; }
.metric-value { font-size: 1.45rem; font-weight: 750; }
.metric-note { color: var(--muted); font-size: .82rem; }
figure,
.tool-panel {
  margin: 16px 0 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  max-width: 100%;
}
figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
figcaption,
.chart-note { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.tool-panel canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
}
.control-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.control-label {
  min-width: 118px;
  color: var(--muted);
  font-size: .88rem;
}
.control-button {
  border: 1px solid #aab4c3;
  background: #f7f9fc;
  color: var(--ink);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
}
.control-button:hover { border-color: var(--teal); }
.control-button.active {
  background: #0f766e;
  color: white;
  border-color: #0f766e;
}
.download-button {
  display: inline-block;
  border: 1px solid #aab4c3;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  padding: 9px 12px;
  text-decoration: none;
}
.download-button:hover { border-color: var(--teal); color: var(--teal); }
.download-button.primary { background: #0f766e; border-color: #0f766e; color: #fff; }
.download-highlight { border-color: #8ccdc4; background: #f2fbf9; }
.range-label { color: var(--muted); }
#coverageSlider { min-width: 300px; }
.coverage-date-controls label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}
.coverage-date-controls input {
  border: 1px solid #aab4c3;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 6px 8px;
}
.coverage-date-controls input:invalid { border-color: #b42318; }
a { color: var(--teal); }
.table-tools {
  position: relative;
  margin-top: 10px;
  width: 100%;
}
.column-toggle {
  border: 1px solid #aab4c3;
  background: #f7f9fc;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
}
.column-panel {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 3px);
  min-width: 220px;
  max-height: 310px;
  overflow-y: auto;
  padding: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(20, 30, 45, .18);
}
.column-panel label { display: block; padding: 3px; }
.data-table {
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
.data-table th,
.data-table td {
  border: 1px solid var(--line);
  padding: 2px 5px;
  text-align: left;
  vertical-align: top;
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.data-table th {
  background: #e9edf3;
  cursor: pointer;
  font-weight: 700;
  position: sticky;
  top: 0;
  user-select: none;
  white-space: normal;
}
.data-table th:hover { background: #dce5ef; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.object-check-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
  align-items: end;
  gap: 10px;
  margin: 14px 0;
}
.object-check-controls label,
.object-check-controls .file-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
}
.object-check-controls input {
  min-height: 34px;
  max-width: 260px;
  padding: 5px 7px;
  border: 1px solid #aab4c3;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
}
.object-check-controls .file-control { grid-column: span 2; }
.file-picker-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-name {
  max-width: 320px;
  color: var(--ink);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.object-status-controls { margin: 10px 0; }
.control-button.primary { background: #0f766e; color: white; border-color: #0f766e; }
.object-status {
  margin: 10px 0;
  padding: 9px 11px;
  border-left: 4px solid var(--teal);
  background: #e7f5f5;
}
.object-status.error,
.notice-error {
  border-left: 4px solid #b42318;
  background: #fef3f2;
  color: #7a271a;
  padding: 9px 11px;
}
.object-status.busy { border-left-color: var(--gold); background: #fff8e7; }
.match-hit { color: #05603a; font-weight: 700; }
.match-miss { color: #7a271a; }
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  min-width: 0;
}
.download-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
  overflow: hidden;
}
.download-card h3,
.download-card h3 a { margin: 0 0 6px; overflow-wrap: anywhere; }
.hash { min-width: 0; }
.hash code {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}
@media (max-width: 760px) {
  .side-nav { position: static; width: auto; }
  .side-nav.collapsed { width: auto; }
  .side-nav.collapsed nav a,
  .side-nav.collapsed .brand-small span { display: block; }
  main, .side-nav.collapsed + main { margin-left: 0; padding: 14px; width: 100%; }
  .page-header { display: block; }
  .header-actions { align-items: flex-start; margin-top: 12px; }
  h1 { font-size: 1.55rem; }
  .tool-panel canvas { width: 100%; }
  #coverageSlider { min-width: 180px; }
  .object-check-controls { grid-template-columns: 1fr; }
  .object-check-controls .file-control { grid-column: auto; }
  .object-check-controls input { max-width: 100%; width: 100%; }
}
