* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.dashboard-page {
  width: 100%;
  margin: 0;
  padding: 24px 0 48px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.dashboard-page * {
  font-family: inherit !important;
}

.hero {
  padding: 28px 0 24px;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.meta-card,
.panel,
.footer {
  padding: 0;
}

.meta-card {
  min-width: 0;
}

.meta-label {
  display: block;
  margin-bottom: 6px;
}

.meta-card-dataset strong {
  display: block;
  margin-bottom: 6px;
}

.meta-source {
  display: block;
  line-height: 1.35;
}

.panel {
  margin-top: 1rem;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-page .panel-header {
  display: block;
}

.source-note {
  margin: 0 0 12px;
  white-space: normal;
  max-width: 100%;
}

.loading-state,
.error-state {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.85s linear infinite;
}

.hidden {
  display: none;
}

.chart-wrap {
  position: relative;
  height: min(138vh, 1700px);
}

.table-wrap {
  margin-top: 18px;
  overflow-x: hidden;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

.summary-table th,
.summary-table td {
  padding: 8px 5px;
  text-align: left;
  vertical-align: top;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.summary-table th:nth-child(1),
.summary-table td:nth-child(1) {
  width: 8%;
  text-align: right;
}

.summary-table th:nth-child(2),
.summary-table td:nth-child(2) {
  width: 23%;
}

.summary-table th:nth-child(3),
.summary-table td:nth-child(3) {
  width: 29%;
}

.summary-table th:nth-child(4),
.summary-table td:nth-child(4) {
  width: 20%;
  text-align: right;
}

.summary-table th:nth-child(5),
.summary-table td:nth-child(5) {
  width: 20%;
  text-align: right;
}

.footer {
  margin-top: 18px;
}

.footer-note {
  margin: 18px 0 0;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.content-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.link-card {
  display: block;
  padding: 16px 18px;
  text-decoration: none;
}

.link-title {
  display: block;
  margin-bottom: 6px;
}

.link-text {
  display: block;
  line-height: 1.55;
}

.check-list,
.step-list {
  margin: 0;
  padding-left: 20px;
}

.check-list li,
.step-list li {
  margin: 0 0 10px;
  line-height: 1.6;
}

.code-block {
  margin: 14px 0;
  padding: 16px 18px;
  overflow-x: auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .meta-row,
  .content-grid,
  .content-grid-2,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .panel-header {
    flex-direction: column;
  }

  .chart-wrap {
    height: min(114vh, 1380px);
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding-top: 24px;
  }

  .dashboard-page {
    padding: 16px 0 40px;
  }

  .hero {
    padding: 20px 0 18px;
  }

  .chart-wrap {
    height: min(102vh, 1040px);
  }
}
