:root {
  --bg: #fbfaf7;
  --text: #07143f;
  --muted: #596278;
  --card: #fff;
  --line: #e8e2da;
  --brand: #287d86;
  --brand-dark: #07143f;
  --accent: #e7b65d;
  --girls: #d84d78;
  --boys: #3979c5;
  --soft-teal: #eaf5f3;
  --soft-pink: #fff0f4;
  --soft-blue: #edf5ff;
  --shadow: 0 14px 34px rgba(7, 20, 63, .09);
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background:
    radial-gradient(circle at 0 120px, rgba(40, 125, 134, .13), transparent 240px),
    radial-gradient(circle at 100% 440px, rgba(216, 77, 120, .12), transparent 300px),
    linear-gradient(180deg, #fff 0, var(--bg) 420px);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button {
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  padding: 11px 14px;
}
button:hover { background: var(--brand-dark); }
.site-header {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(7, 20, 63, .04);
}
.site-nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.brand { color: var(--brand-dark); font-weight: 850; margin-right: auto; }
.site-nav a:not(.brand) { color: var(--muted); font-weight: 650; }
.site-nav a:hover, .site-nav a.active { color: var(--brand); }
.site-footer {
  color: var(--muted);
  font-size: .86rem;
  padding: 26px 18px 34px;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 8px; }
.site-footer .sister-site-note {
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
}
.site-footer a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.site-footer a:hover {
  color: var(--brand-dark);
}
.container { max-width: 980px; margin: 0 auto; padding: 32px 18px; }
.hero {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(7, 20, 63, .06);
  margin: 18px 0;
  padding: 34px;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
  padding: 42px 0 30px;
}
.home-hero-main { padding-top: 8px; }
.hero-mark {
  color: #f0a3b7;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 12px;
}
.top-names-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 16px;
}
.top-names-head strong {
  color: var(--brand-dark);
  display: block;
  font-size: 1.2rem;
}
.top-names-head p { margin: 2px 0 0; }
.top-name-list h2 {
  background: var(--soft-pink);
  border-radius: 8px;
  color: var(--brand-dark);
  font-size: .9rem;
  margin: 0 0 6px;
  padding: 8px 10px;
  text-transform: uppercase;
}
.top-name-list + .top-name-list h2 { background: var(--soft-blue); }
.top-name-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 8px 0;
}
.top-name-row strong { color: var(--text); overflow-wrap: anywhere; }
.top-name-row span {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: .84rem;
}
.top-name-row:hover strong { color: var(--brand); }
.rank-dot {
  align-items: center;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .8rem;
  font-weight: 850;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.rank-f { background: var(--girls); }
.rank-m { background: var(--boys); }
.feature-cues {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
}
.feature-cues span {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: .86rem;
  font-weight: 700;
  padding: 7px 11px;
}
.home-container {
  max-width: 980px;
}
.state-container {
  max-width: 1240px;
}
.brand-mark {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}
.brand-mark img {
  display: block;
  flex: 0 0 auto;
  height: 34px;
  width: 34px;
}
.home-hero-redesign {
  align-items: end;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  min-height: 250px;
  padding: 56px 0 36px;
  position: relative;
}
.home-hero-redesign:before {
  background: rgba(40, 125, 134, .06);
  border-radius: 50%;
  content: "";
  height: 360px;
  position: absolute;
  right: -180px;
  top: 16px;
  width: 520px;
  z-index: -1;
}
.home-hero-redesign h1 {
  font-size: clamp(2.45rem, 5.2vw, 4.1rem);
  max-width: 620px;
}
.home-proof {
  color: #3e4b68;
  font-weight: 650;
  margin-top: 22px;
}
.hero-search-card {
  align-items: center;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px;
}
.hero-search-card .search-wrap {
  max-width: none;
}
.hero-search-card .search-wrap input {
  border-radius: 12px;
  box-shadow: none;
  padding: 15px 16px;
}
.hero-search-card button {
  border-radius: 13px;
  min-width: 70px;
  padding: 15px 18px;
}
.home-reality-card {
  align-self: end;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  padding: 20px;
}
.home-reality-card h2 {
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
  margin: 0;
}
.home-reality-card p { margin: 0; }
.home-example-copy {
  color: #39445e;
  font-size: .98rem;
}
.home-example-copy strong {
  color: var(--brand-dark);
}
.home-reality-card em {
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
}
.home-reality-stat {
  background: #eef6f4;
  border: 1px solid #d5e8e4;
  border-radius: 10px;
  padding: 14px;
}
.home-reality-stat strong {
  color: var(--brand-dark);
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}
.home-reality-stat span {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-top: 6px;
}
.home-panel {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(7, 20, 63, .07);
  margin: 16px 0;
  padding: 22px;
}
.home-panel h2,
.home-panel h3 {
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
}
.home-panel h2 {
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 0;
}
.home-panel h3 {
  font-size: 1.05rem;
  margin: 0 0 12px;
}
.home-panel p {
  margin: 4px 0 0;
}
.home-panel-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.home-panel-head a {
  color: var(--brand);
  flex: 0 0 auto;
  font-weight: 800;
}
.home-split {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-card-row,
.home-feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.home-mini-card {
  background: linear-gradient(135deg, #fff, #f7fbfa);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 22px;
  min-height: 118px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.home-mini-card.tint-f {
  background: linear-gradient(135deg, #fff, var(--soft-pink));
  border-color: #f1d4df;
}
.home-mini-card.tint-m {
  background: linear-gradient(135deg, #fff, var(--soft-blue));
  border-color: #cfe1f8;
}
.home-mini-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.home-mini-card span {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.home-mini-card strong {
  color: var(--brand-dark);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}
.home-mini-card i {
  background: rgba(40, 125, 134, .1);
  border-radius: 999px;
  color: var(--brand);
  font-size: .72rem;
  font-style: normal;
  font-weight: 850;
  padding: 4px 7px;
}
.home-mini-card b {
  color: var(--brand-dark);
  font-size: .95rem;
}
.trend-cue {
  bottom: 10px;
  color: var(--brand);
  font-size: 2rem;
  font-style: normal;
  font-weight: 900;
  opacity: .18;
  position: absolute;
  right: 13px;
}
.trend-down {
  color: var(--girls);
}
.home-top-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-top-list {
  border: 1px solid #d9e5f4;
  border-radius: 12px;
  overflow: hidden;
}
.home-top-f {
  border-color: #f0ccda;
}
.home-top-list h3 {
  align-items: center;
  background: #f7fbff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 13px 16px;
}
.home-top-f h3 {
  background: #fff6f8;
}
.home-top-list h3 span {
  color: var(--brand-dark);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .9rem;
  font-weight: 850;
  text-transform: uppercase;
}
.home-top-list h3 small {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .82rem;
}
.home-top-list a {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 10px 16px;
}
.home-top-list a:last-child {
  border-bottom: 0;
}
.home-top-list b {
  align-items: center;
  background: var(--boys);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: .84rem;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.home-top-f b {
  background: var(--girls);
}
.home-top-list strong {
  color: var(--text);
}
.home-top-list em {
  color: var(--muted);
  font-style: normal;
}
.home-state-preview {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-state-picker {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.home-state-picker span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 750;
}
.home-state-picker select {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 800;
  padding: 8px 32px 8px 12px;
}
.home-state-preview > div {
  background: linear-gradient(135deg, #f8fbf7, #eef7f3);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 84px;
  padding: 16px 18px;
}
.home-state-preview > div + div {
  background: linear-gradient(135deg, #f8fbff, #edf5ff);
}
.home-state-preview > div > strong,
.home-state-preview > div > span {
  display: block;
}
.home-state-preview > div > strong {
  color: var(--brand-dark);
  font-size: .86rem;
  letter-spacing: .02em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.home-state-preview > div > span {
  color: var(--text);
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  white-space: nowrap;
  font-weight: 650;
}
.home-state-preview > div > span a {
  color: var(--text);
  display: inline-block;
}
.home-state-preview > div > span a + a {
  border-left: 1px solid var(--line);
  margin-left: 10px;
  padding-left: 10px;
}
.home-state-preview > div > span a:hover {
  color: var(--brand);
}
.home-compare-panel {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1.4fr);
}
.home-compare-form {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
}
.home-compare-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  width: 100%;
}
.home-compare-form span {
  color: var(--muted);
  font-weight: 800;
}
.home-compare-form button {
  border-radius: 12px;
  padding: 13px 18px;
}
.home-trust-strip {
  align-items: center;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  margin: 16px 0 0;
  padding: 16px 20px;
}
.home-trust-strip a {
  color: var(--brand-dark);
  font-weight: 700;
}
.report-hero {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(7, 20, 63, .06);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: end;
  margin: 18px 0;
  padding: 30px;
}
.eyebrow {
  display: block;
  color: var(--brand);
  font-size: .86rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.compact-search { align-self: center; max-width: none; }
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  letter-spacing: 0;
  max-width: 720px;
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 6vw, 4.6rem);
  line-height: 1.02;
}
h1 em { color: var(--brand); font-style: italic; }
h2 { margin: 34px 0 14px; font-size: 1.25rem; }
p { color: var(--muted); margin: 0 0 20px; }
li { margin: 8px 0; }
main.container > section:not(.home-hero):not(.home-panel):not(.home-trust-strip):not(.hero):not(.report-hero) {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(7, 20, 63, .06);
  margin: 16px 0;
  padding: 22px;
}
main.container > section:not(.home-hero):not(.home-panel):not(.home-trust-strip):not(.hero):not(.report-hero) > h2:first-child,
main.container > section:not(.home-hero):not(.home-panel):not(.home-trust-strip):not(.hero):not(.report-hero) .section-head h2,
.card h2:first-child {
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.15;
  margin-top: 0;
}
.muted { color: var(--muted); }
.section-lede, .insight { max-width: 720px; }
.insight {
  background: #eef6f4;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  color: var(--brand-dark);
  margin: 6px 0 16px;
  padding: 11px 13px;
}
.reality-line {
  color: var(--brand-dark);
  font-weight: 750;
}
.reality-metrics .hero-metric {
  background: #eef6f4;
  border-color: #cfe5e1;
}
.reality-metrics .hero-metric strong {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
}
.trend-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: .72rem;
  font-weight: 850;
  margin-left: 6px;
  padding: 5px 8px;
  text-transform: uppercase;
  vertical-align: middle;
}
.trend-badge-rising { background: #e5f4ee; color: #176247; }
.trend-badge-falling { background: #fff0f4; color: #a93558; }
.trend-badge-stable { background: #edf5ff; color: #285f9f; }
.section-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.metric { margin: 7px 0; }
.metric strong { display: block; color: var(--muted); font-size: .82rem; font-weight: 650; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}
.metric-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-tile {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(32, 33, 36, .05);
  min-height: 104px;
  padding: 14px;
}
.metric-tile span {
  color: var(--muted);
  display: block;
  font-size: .78rem;
  font-weight: 750;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.metric-tile strong {
  color: var(--brand-dark);
  display: block;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.metric-tile em {
  color: var(--muted);
  display: block;
  font-size: .88rem;
  font-style: normal;
  margin-top: 7px;
}
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chart-card { margin-bottom: 8px; }
.compare-hero { align-items: center; }
.compare-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.compare-form .search-wrap { max-width: none; }
.compare-form .search-wrap input { box-shadow: none; }
.selected-names { margin-top: -8px; }
.compare-chart-card { margin-top: 4px; }
.compare-chart-card canvas { margin-top: 10px; }
.verdict-grid .card { flex-basis: 150px; }
.verdict-card .card-stat { margin-top: 8px; }
.compare-page .report-hero,
.compare-page > section:not(.report-hero) {
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 22px rgba(7, 20, 63, .045);
}
.compare-page .chart-card,
.compare-page .compare-form,
.compare-page .card {
  background: rgba(255,255,255,.82);
  box-shadow: 0 6px 18px rgba(7, 20, 63, .05);
}
.compare-page .compare-chart-card {
  background: rgba(255,255,255,.76);
}
.compare-page {
  min-height: calc(100vh - 58px);
}
.compare-table th:first-child, .compare-table td:first-child {
  color: var(--brand-dark);
  font-weight: 750;
  min-width: 170px;
}
.state-map {
  display: grid;
  grid-template-columns: repeat(11, minmax(96px, 1fr));
  gap: 10px;
  max-width: 100%;
  overflow-x: visible;
  padding: 6px 0 12px;
  width: 100%;
}
.state-tile {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(32, 33, 36, .05);
  min-height: 94px;
  min-width: 96px;
  padding: 11px;
}
.state-tile span, .state-row strong, .state-list strong {
  color: var(--brand-dark);
  font-weight: 850;
}
.state-tile strong {
  display: block;
  font-size: .88rem;
  line-height: 1.1;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.state-tile em, .state-row em, .state-list em {
  color: var(--muted);
  font-style: normal;
  font-size: .82rem;
}
.heat-tile span, .heat-tile strong, .heat-tile em { color: inherit; }
.state-tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.name-state-card { overflow: visible; }
.name-state-map {
  display: grid;
  grid-template-columns: repeat(11, minmax(56px, 1fr));
  gap: 7px;
  margin: 18px 0 12px;
}
.name-state-tile {
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 8px;
  box-shadow: 0 5px 12px rgba(32, 33, 36, .045);
  min-height: 50px;
  padding: 7px 5px;
  text-align: center;
}
.name-state-tile span {
  display: block;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1;
}
.name-state-tile strong {
  display: block;
  font-size: .84rem;
  line-height: 1.1;
  margin-top: 6px;
}
.name-state-tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.state-map-legend {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .85rem;
  gap: 12px;
  margin-bottom: 12px;
}
.state-map-legend span { align-items: center; display: inline-flex; gap: 6px; }
.state-map-legend i {
  border: 1px solid rgba(32,33,36,.08);
  border-radius: 999px;
  display: inline-block;
  height: 11px;
  width: 22px;
}
.state-map-legend .less { background: hsl(33 45% 86%); }
.state-map-legend .near { background: hsl(174 36% 92%); }
.state-map-legend .more { background: hsl(174 60% 50%); }
.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
}
.atlas-feature {
  background: var(--brand-dark);
  border-radius: 8px;
  color: #fff;
  padding: 24px;
}
.atlas-feature h2, .atlas-feature p, .atlas-feature .eyebrow { color: #fff; }
.state-list, .region-grid { display: grid; gap: 10px; }
.state-list a, .state-row {
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  padding: 10px 12px;
}
.state-list a:hover, .state-row:hover { border-color: var(--brand); }
.region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.region-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.region-panel h3 { margin: 0 0 10px; }
.state-search-card {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin: 10px 0 18px;
}
.state-search-card .search-wrap { max-width: 560px; }
.state-name-card p { margin: 10px 0 0; }
.state-name-card .card-stat { margin-top: 8px; }
.top-summary-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.top-summary-card strong {
  color: var(--brand-dark);
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}
.top-summary-card span {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-top: 6px;
  text-transform: uppercase;
}
.top-summary-card em {
  color: var(--muted);
  display: block;
  font-style: normal;
  margin-top: 14px;
}
.top-page-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.top-page-grid h2 { margin-top: 0; }
.similarity-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 16px;
}
.similarity-grid h3 {
  color: var(--brand-dark);
  font-size: 1rem;
  margin: 0 0 8px;
}
.similarity-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
  padding: 10px 12px;
}
.similarity-row strong { color: var(--text); }
.similarity-row span { color: var(--brand-dark); font-weight: 800; }
.similarity-row em { color: var(--muted); font-size: .84rem; font-style: normal; }
.similarity-row:hover { border-color: var(--brand); }
.similarity-card-grid .card {
  flex-basis: 210px;
}
.similarity-card em {
  color: var(--brand);
  display: block;
  font-style: normal;
  font-weight: 800;
  margin-top: 12px;
}
.recommendation-grid .card {
  flex-basis: 210px;
}
.recommendation-card p {
  margin: 8px 0 0;
}
.recommendation-card em {
  color: var(--brand);
  display: block;
  font-style: normal;
  font-weight: 800;
  margin-top: 12px;
}
.story-card h2, .story-card h3 { margin-top: 0; }
.story-card em {
  color: var(--brand);
  display: block;
  font-style: normal;
  font-weight: 800;
  margin-top: 12px;
}
.story-intro { font-size: 1.03rem; }
.data-table {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-collapse: separate;
  border-radius: 12px;
  border-spacing: 0;
  display: block;
  margin-top: 12px;
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
}
.data-table caption { color: var(--muted); margin-bottom: 8px; text-align: left; }
.data-table thead, .data-table tbody, .data-table tr { width: 100%; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 11px 12px; text-align: left; white-space: nowrap; }
.data-table th { background: #f7fbfa; cursor: pointer; color: var(--brand-dark); font-size: .88rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(234, 245, 243, .48); }
.compact-table {
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
}
.best { background: #eef6f4; font-weight: 750; }
.tag { display: inline-block; background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 999px; margin: 4px 6px 4px 0; padding: 7px 11px; font-weight: 700; }
.tag:hover { border-color: var(--brand); }
.tag-button { color: var(--brand-dark); cursor: pointer; font: inherit; }
.tag-button:hover { background: #eef6f4; color: var(--brand); }
.toolbar { margin: 18px 0; }
.toolbar select { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.button-group { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 6px 12px 12px 0; }
.button-group button { background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--brand-dark); cursor: pointer; padding: 8px 10px; }
.button-group button:hover { background: #eef6f4; border-color: var(--brand); }
canvas { max-width: 100%; }
.card {
  display: block;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(7, 20, 63, .07);
  padding: 18px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 14px 34px rgba(32, 33, 36, .12); }
.name-card.sex-f { border-top: 3px solid rgba(216, 77, 120, .55); }
.name-card.sex-m { border-top: 3px solid rgba(57, 121, 197, .55); }
.card-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.card-grid .card { flex: 1 1 190px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-title strong { overflow-wrap: anywhere; }
.card-stat { color: var(--brand-dark); font-size: 1.2rem; font-weight: 750; }
.badge {
  background: var(--brand);
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}
.badge-f { background: var(--girls); }
.badge-m { background: var(--boys); }
.callout {
  background: #fff7df;
  border: 1px solid #ead28b;
  border-radius: 8px;
  color: #5c4a18;
  margin-top: 12px;
  padding: 10px 12px;
}
details {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 14px;
  padding: 12px 14px;
}
summary { cursor: pointer; font-weight: 700; }
.search-wrap { position: relative; max-width: 520px; }
.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.search-wrap button { margin-top: 8px; }
.search-wrap input:focus { border-color: var(--brand); outline: 3px solid rgba(47, 111, 115, .18); }
.search-results {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.search-results.open { display: block; }
.search-result-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 12px 14px;
  text-align: left;
}
.search-result-row:hover, .search-result-row.active { background: #eef6f4; }
.search-result-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.search-result-main em {
  color: var(--brand);
  font-size: .82rem;
  font-style: normal;
  font-weight: 750;
}
.result-meta { color: var(--muted); font-size: .88rem; }
@media (max-width: 560px) {
  .container { padding: 24px 14px; }
  .card-grid .card { flex-basis: 100%; }
  .home-hero { grid-template-columns: 1fr; padding-top: 28px; }
  .home-hero-redesign { min-height: 0; }
  .home-hero-redesign:before { display: none; }
  .hero-search-card { grid-template-columns: 1fr; }
  .hero-search-card button { width: 100%; }
  .home-panel { border-radius: 14px; padding: 16px; }
  .home-panel-head { align-items: start; display: block; }
  .home-panel-head a { display: inline-block; margin-top: 8px; }
  .home-split, .home-card-row, .home-feature-grid, .home-top-grid, .home-state-preview, .home-compare-panel, .top-page-grid { grid-template-columns: 1fr; }
  .home-compare-form { grid-template-columns: 1fr; }
  .home-compare-form span { text-align: center; }
  .report-hero, .metric-grid, .metric-grid.compact { grid-template-columns: 1fr; }
  .atlas-layout, .region-grid, .similarity-grid { grid-template-columns: 1fr; }
  .state-map { grid-template-columns: repeat(11, minmax(86px, 1fr)); overflow-x: auto; width: calc(100vw - 28px); }
  .name-state-map { grid-template-columns: repeat(11, 52px); overflow-x: auto; padding-bottom: 8px; }
  .split { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .brand { flex-basis: 100%; }
}
