:root {
  --ink-900: #0c2a30;
  --ink-700: #194852;
  --ink-500: #348397;
  --ink-400: #78a0a3;
  --ink-300: #7dceda;
  --ink-200: #d0dbdd;
  --ink-100: #edf1f2;
  --paper: #fbfcfc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(125, 206, 218, 0.18), transparent 30%),
    linear-gradient(180deg, #f7fafb 0%, #ffffff 22%, #f9fbfb 100%);
  color: var(--ink-900);
  font-family: "Hanken Grotesk", sans-serif;
}

.page-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-title {
  margin: 0 0 0.5rem;
  color: var(--ink-700);
  font-family: "Neuton", serif;
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.page-subtitle {
  max-width: 860px;
  margin: 0 0 1rem;
  color: var(--ink-400);
  font-size: 0.98rem;
  line-height: 1.7;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem 1.5rem;
  align-items: center;
  margin-bottom: 1.3rem;
}

.related-label {
  color: var(--ink-400);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.related-links a {
  color: var(--ink-500);
  font-size: 0.83rem;
  text-decoration: none;
  border-bottom: 1px solid var(--ink-300);
  padding-bottom: 1px;
}

.related-links a:hover {
  color: var(--ink-700);
  border-color: var(--ink-700);
}

.divider {
  margin: 0 0 1.5rem;
  border: 0;
  border-top: 1px solid var(--ink-200);
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.75rem;
  border-bottom: 1.5px solid var(--ink-200);
}

.tab-button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: -1.5px;
  padding: 0.55rem 1.35rem;
}

.tab-button.is-active {
  color: var(--ink-700);
  border-bottom-color: var(--ink-500);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.callout {
  margin-bottom: 1.4rem;
  border-left: 3px solid var(--ink-500);
  border-radius: 0 8px 8px 0;
  background: var(--ink-100);
  color: var(--ink-900);
  font-size: 0.84rem;
  line-height: 1.65;
  padding: 0.8rem 1.05rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.filters {
  position: sticky;
  top: 1rem;
}

.filter-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-400);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-select {
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  background: white;
  color: var(--ink-900);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.72rem 0.85rem;
}

.filter-select:focus {
  outline: none;
  border-color: var(--ink-500);
  box-shadow: 0 0 0 2px rgba(52, 131, 151, 0.18);
}

.chart-header {
  margin: 0 0 0.6rem;
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chart-card {
  min-height: 540px;
  width: 100%;
}

.content {
  min-width: 0;
}

.chart-card .vega-embed,
.chart-card .vega-embed > div,
.chart-card svg,
.chart-card canvas {
  width: 100% !important;
  max-width: 100%;
}

.chart-card .vega-embed {
  display: block;
}

.chart-loading,
.chart-error {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px solid var(--ink-200);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-400);
  font-size: 0.92rem;
}

.chart-error {
  color: #8d381c;
}

.source-note {
  margin-top: 0.6rem;
  border-top: 1px solid var(--ink-200);
  color: var(--ink-400);
  font-size: 0.72rem;
  padding-top: 0.6rem;
}

.data-panel {
  margin-top: 1rem;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.data-panel summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1rem;
  color: var(--ink-700);
  font-weight: 600;
}

.data-panel summary::-webkit-details-marker {
  display: none;
}

.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--ink-200);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #edf1f2;
  padding: 0.7rem 0.85rem;
  text-align: left;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #f7fafb;
  color: var(--ink-700);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: rgba(237, 241, 242, 0.55);
}

@media (max-width: 960px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab-button {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 1.35rem 0.9rem 2rem;
  }

  .related-links {
    gap: 0.7rem 1rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.62rem 0.7rem;
  }
}
