:root {
  --sky-top: #dff4ff;
  --sky-bottom: #fff7d4;
  --sand: #f4e4b0;
  --clay: #d78258;
  --mesa: #a44a3f;
  --pine: #2b5f4a;
  --lake: #2f7aa2;
  --snow: #f7fbff;
  --ink: #20303b;
  --muted: #5f7280;
  --card: rgba(255, 251, 242, 0.92);
  --border: rgba(32, 48, 59, 0.12);
  --shadow: 0 18px 45px rgba(61, 76, 92, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inclusive Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 30%),
    linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 36%, #fbf3d7 72%, #f7edd7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0 68%, rgba(210, 177, 96, 0.1) 68% 100%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0 18px,
      rgba(255, 255, 255, 0.04) 18px 36px
    );
}

.page-shell {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
}

.hero,
.map-panel,
.county-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 221, 137, 0.7), rgba(255, 221, 137, 0) 68%);
  pointer-events: none;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--mesa);
  font-weight: 700;
}

h1,
h2,
h3,
.tab-button {
  font-family: "Baloo 2", system-ui, sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.95;
}

h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

.hero-text,
.map-summary p,
.county-status,
.overview-copy p,
.tab-body p,
.tab-body li {
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-notes {
  align-self: end;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(43, 95, 74, 0.08), rgba(47, 122, 162, 0.04));
}

.hero-notes ul,
.tab-body ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.map-panel,
.county-panel {
  padding: 24px;
  margin-bottom: 24px;
}

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

.county-picker {
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
}

.county-picker label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.county-picker select {
  width: 100%;
  border: 1px solid rgba(32, 48, 59, 0.15);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: white;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: 22px;
  align-items: stretch;
}

.map-card,
.map-summary,
.county-overview,
.tab-panel {
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.map-card {
  padding: 12px;
  background:
    radial-gradient(circle at top, rgba(233, 245, 255, 0.8), rgba(255, 255, 255, 0.84) 60%),
    linear-gradient(180deg, rgba(255, 244, 208, 0.55), rgba(255, 255, 255, 0.8));
}

.map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 626 / 748;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.map-reference,
#county-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.map-reference {
  object-fit: contain;
}

#county-map {
  z-index: 1;
}

.state-outline {
  fill: transparent;
  stroke: rgba(32, 48, 59, 0.16);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.county-shape {
  fill-opacity: 0.16;
  stroke: rgba(42, 68, 84, 0.45);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill-opacity 0.18s ease, stroke 0.18s ease, filter 0.18s ease;
}

.county-shape:hover,
.county-shape.is-active {
  fill-opacity: 0.36;
  stroke: rgba(23, 40, 50, 0.8);
  filter: brightness(1.02);
}

.county-label {
  font-size: 2.4px;
  font-weight: 700;
  letter-spacing: 0.03em;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.45px;
  text-anchor: middle;
  fill: rgba(22, 32, 39, 0.92);
  pointer-events: none;
}

.map-summary {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.summary-grid article {
  padding: 16px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(222, 241, 232, 0.8), rgba(255, 255, 255, 0.92));
  text-align: center;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  color: white;
  background: var(--pine);
  font-weight: 700;
}

.summary-grid strong {
  display: block;
  font-size: 2rem;
  font-family: "Baloo 2", system-ui, sans-serif;
  color: var(--pine);
}

.county-overview {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
}

.county-page-panel {
  margin-top: 0;
}

.county-page-picker {
  min-width: 260px;
}

.overview-copy h3 {
  font-size: 2rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.action-link,
.inline-link {
  color: var(--lake);
  font-weight: 700;
}

.action-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(47, 122, 162, 0.12);
  border: 1px solid rgba(47, 122, 162, 0.16);
}

.action-link-static {
  cursor: default;
  text-decoration: none;
}

.action-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.pdf-section + .pdf-section {
  margin-top: 22px;
}

.pdf-section h4 {
  margin: 0 0 12px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1.4rem;
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.pdf-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(32, 48, 59, 0.08);
  background: white;
}

.pdf-card strong {
  display: block;
  margin-bottom: 8px;
}

.pdf-card p {
  margin: 0;
}

.facts-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 239, 213, 0.9), rgba(255, 255, 255, 0.94));
}

.highlight-stack {
  margin-top: 18px;
}

.highlight-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(32, 48, 59, 0.08);
}

.highlight-card + .highlight-card {
  margin-top: 10px;
}

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

.highlight-card p {
  margin: 0;
}

.fact-list,
.media-list {
  display: grid;
  gap: 12px;
}

.fact-item,
.media-card,
.source-item {
  padding: 14px;
  border-radius: 16px;
  background: white;
  border: 1px solid rgba(32, 48, 59, 0.08);
}

.fact-item span,
.source-item span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.fact-item strong {
  display: block;
  margin-top: 6px;
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-size: 1.02rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tab-button:hover,
.tab-button[aria-selected="true"] {
  background: var(--pine);
  color: white;
  transform: translateY(-1px);
}

.tab-panel {
  min-height: 280px;
  padding: 22px;
}

.tab-body h3 {
  margin-bottom: 10px;
  font-size: 1.95rem;
}

.section-summary {
  margin-bottom: 18px;
}

.section-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.section-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(32, 48, 59, 0.08);
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(255, 255, 255, 0.92));
}

.section-card strong {
  display: block;
  margin-bottom: 8px;
}

.section-card p {
  margin: 0;
}

.tab-body p:first-child {
  margin-top: 0;
}

.tab-body ul {
  margin: 0;
}

.media-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.media-card h4,
.source-item strong {
  margin: 0 0 8px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1.2rem;
}

.media-card p,
.source-item p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero,
  .map-layout,
  .county-overview {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .county-header {
    flex-direction: column;
  }

  .county-picker {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 14px;
  }

  .hero,
  .map-panel,
  .county-panel {
    border-radius: 22px;
    padding: 18px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}
