@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg-top: #f6f2ea;
  --bg-bottom: #eef2f4;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-muted: rgba(235, 239, 242, 0.9);
  --line: rgba(18, 24, 32, 0.12);
  --line-strong: rgba(18, 24, 32, 0.2);
  --ink: #121820;
  --muted: #5a6673;
  --accent: #20384f;
  --accent-2: #7697b4;
  --accent-soft: rgba(118, 151, 180, 0.18);
  --shadow: 0 24px 60px rgba(18, 24, 32, 0.08);
  --shadow-soft: 0 14px 32px rgba(18, 24, 32, 0.05);
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(118, 151, 180, 0.22), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(32, 56, 79, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 58%, #f8f5ef 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 24, 32, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 24, 32, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

p {
  margin: 0;
  line-height: 1.7;
}

ul,
ol {
  margin: 0;
  padding-left: 1.15rem;
}

li {
  line-height: 1.65;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.92em;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 40px) 72px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(228, 234, 238, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-soft);
  display: grid;
  place-items: center;
}

.brand-mark span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.8rem;
}

.header-pills,
.badge-row,
.asset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.header-pills {
  justify-content: flex-end;
}

.meta-pill,
.badge,
.asset-meta span,
.share-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.page-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-nav a:hover {
  text-decoration: none;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.page-nav a[aria-current='page'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.hero,
.section,
.asset-card,
.chart-card,
.info-card,
.copy-card,
.callout-card,
.link-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4.5vw, 42px);
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(18, 24, 32, 0.12);
}

.hero::before {
  inset: 14px;
  border-radius: 20px;
}

.hero::after {
  inset: 22px;
  border-radius: 16px;
  opacity: 0.35;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  margin: 16px 0 0;
  max-width: 13.5ch;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero .lede {
  position: relative;
  margin-top: 16px;
  max-width: 820px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.metric-strip,
.stats-grid,
.asset-grid,
.callout-grid,
.copy-grid,
.section-columns {
  display: grid;
  gap: 12px;
}

.metric-strip {
  position: relative;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metric-card,
.stat-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.metric-label,
.stat-card p:first-child {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-card strong,
.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.metric-card span,
.stat-card p:last-child {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  margin-top: 18px;
  padding: 22px;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.section-heading h2,
.section h2,
.copy-card h3,
.asset-card h3,
.info-card h3,
.callout-card h3,
.link-card strong {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
}

.section-heading h2,
.section h2 {
  margin-top: 6px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-note,
.small-muted,
.table-note,
.caption,
.info-card p,
.callout-card p,
.link-card span,
.copy-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.asset-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.asset-card {
  padding: 18px;
}

.asset-card h3 {
  font-size: 1.12rem;
}

.asset-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.93rem;
}

.check-list {
  display: grid;
  gap: 9px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.check-list li {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.check-list li::before {
  content: '+';
  flex: none;
  color: var(--accent);
  font-weight: 800;
}

.asset-link {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.chart-card,
.info-card,
.callout-card,
.link-card,
.copy-card {
  padding: 18px;
}

.chart-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(233, 238, 242, 0.9));
}

.chart-caption {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 0.92rem;
}

.bar-label {
  font-weight: 800;
}

.bar-value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.track,
.inline-bar .track {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 24, 32, 0.08);
}

.track {
  height: 12px;
}

.inline-bar .track {
  flex: 1;
  height: 10px;
}

.track-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.chart-aside {
  display: grid;
  gap: 12px;
}

.info-card h3,
.callout-card h3 {
  font-size: 1rem;
}

.info-card p,
.info-card li,
.callout-card p,
.callout-card li {
  margin-top: 10px;
}

.info-card ul,
.callout-card ul,
.note-list,
.source-list {
  margin-top: 10px;
}

.copy-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.copy-button {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 1);
}

.copy-button.is-copied {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.copy-surface {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #131920;
  color: #f5f8fb;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
}

.table-note {
  margin-bottom: 14px;
}

.table-wrap table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f4f3ef;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
}

.table-wrap tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(18, 24, 32, 0.08);
  vertical-align: top;
  font-size: 0.92rem;
}

.table-wrap tbody tr:hover td {
  background: rgba(118, 151, 180, 0.05);
}

.rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.inline-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-bar span {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.callout-grid,
.section-columns {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.link-list {
  display: grid;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.link-card strong {
  font-size: 1rem;
}

.source-list li + li,
.note-list li + li {
  margin-top: 8px;
}

.note-list strong,
.source-list a {
  color: var(--ink);
}

.line-chart {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
}

.line-chart svg {
  width: 100%;
  height: auto;
}

.line-axis {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.line-axis span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.map-wrap {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(233, 238, 242, 0.92));
}

#usMap {
  min-height: 520px;
}

#usMap svg {
  width: 100%;
  height: auto;
}

#usMap path {
  transition: fill 0.16s ease, stroke 0.16s ease;
}

#usMap path:hover {
  stroke: var(--ink);
  stroke-width: 1;
}

.state-label {
  fill: rgba(32, 56, 79, 0.62);
  font-size: 8px;
  font-weight: 700;
  pointer-events: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(18, 24, 32, 0.08);
}

.tooltip {
  box-shadow: 0 18px 36px rgba(18, 24, 32, 0.18);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .hero h1 {
    max-width: 14ch;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 18px 16px 52px;
  }

  .header-pills {
    justify-content: flex-start;
  }

  .page-nav {
    padding: 8px;
  }

  .page-nav a {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .button,
  .copy-button {
    width: 100%;
  }

  .copy-header {
    flex-direction: column;
    align-items: stretch;
  }

  .table-wrap thead th {
    position: static;
  }

  .line-axis {
    grid-template-columns: repeat(6, 1fr);
  }
}
