/*
 * directory-engine site stylesheet (Phase 9A, PLAN.md Prompt 9).
 * One maintained file, no build step. Every colour, font and radius comes from the tokens the
 * layout writes into :root from the niche's brand block; nothing here names a brand. The derived
 * tokens below (band, soft accent, overlays) are computed from those with color-mix so a niche
 * sets six colours and gets the whole system.
 */

/* ---- tokens ------------------------------------------------------------------------------ */
:root {
  --accent: #1f5f8b;
  --ink: #17202a;
  --muted: #5b6670;
  --line: #e3e7ea;
  --bg: #fff;
  --soft: #f5f7f9;
  --header-bg: var(--bg);
  --header-ink: var(--ink);
  --font-heading: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --radius: 12px;
  --radius-pill: 999px;
  --max: 1280px;
  --measure: 768px;
  --measure-narrow: 672px;
  --band: var(--ink);
  --band-ink: var(--bg);
  --band-muted: color-mix(in srgb, var(--bg) 72%, transparent);
  --band-line: color-mix(in srgb, var(--bg) 18%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--bg));
  --accent-ink: #fff;
  --tile-overlay: linear-gradient(to top, color-mix(in srgb, var(--ink) 78%, transparent), transparent 60%);
  --shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent), 0 8px 24px color-mix(in srgb, var(--ink) 8%, transparent);
  --shadow-soft: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent);
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
}

/* ---- base -------------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 17px/1.6 var(--font-body);
  color: var(--ink);
  background: var(--bg);
}
a {
  color: var(--accent);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 2.6rem;
}
h2 {
  font-size: 1.9rem;
  margin-top: 1.2em;
}
h3 {
  font-size: 1.2rem;
}
h4 {
  font-size: 1rem;
}
p {
  margin: 0 0 1em;
}
small {
  font-size: 0.85em;
}
.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--s4);
}
main {
  min-height: 60vh;
}
main > section,
main > article,
main > .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--s4);
}
main > .hero-band,
main > .stats,
main > .filterbar,
main > .steps-band {
  max-width: none;
  padding: 0;
}
.section {
  margin: var(--s7) 0;
}
.section > h2:first-child {
  margin-top: 0;
}
.lead {
  color: var(--muted);
  max-width: 70ch;
  font-size: 1.1rem;
}
.note {
  font-size: 0.9rem;
  color: var(--muted);
}
.dim {
  color: var(--muted);
}
.meta {
  color: var(--muted);
  font-size: 0.9rem;
}
.kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--s3);
}
.prose p {
  max-width: 70ch;
}
.narrow {
  max-width: var(--measure);
}

/* ---- buttons, badges, chips -------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: filter 0.15s;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--soft);
  color: var(--muted);
}
.badge-featured,
.badge-claimed {
  background: var(--accent);
  color: var(--accent-ink);
}
.badge-claimed {
  background: var(--band);
  color: var(--band-ink);
}
.badges {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  margin: var(--s2) 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s3) 0;
}
.chip {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--ink);
}
.chip.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip small {
  color: var(--muted);
}
.chip.on small {
  color: var(--band-muted);
}
.chip-small {
  padding: 4px 11px;
  font-size: 0.85rem;
}

/* ---- header ------------------------------------------------------------------------------ */
.nav {
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  color: var(--header-ink);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 68px;
  flex-wrap: wrap;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--header-ink);
  text-decoration: none;
  margin-right: auto;
  display: block;
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
}
.foot-logo {
  margin: 0 0 var(--s2);
}
.foot-logo .logo-img {
  height: 36px;
}
.nav-toggle {
  display: none;
}
.nav-burger {
  display: none;
  width: 32px;
  height: 28px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
}
.nav-burger span {
  height: 3px;
  background: var(--header-ink);
  border-radius: 2px;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.nav-links {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--header-ink);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}
.nav-links a.on,
.nav-links a:hover {
  border-color: var(--accent);
}
@media (max-width: 860px) {
  .nav-burger {
    display: flex;
  }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: var(--s3);
  }
  .nav-toggle:checked ~ .nav-menu {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    gap: var(--s1);
  }
}

/* ---- hero band --------------------------------------------------------------------------- */
.hero-band {
  position: relative;
  background: var(--band);
  color: var(--band-ink);
  overflow: hidden;
  isolation: isolate;
}
.hero-band h1 {
  color: var(--band-ink);
  margin: 0 0 var(--s3);
}
.hero-band-hub h1,
.hero-band-page h1 {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem);
}
.hero-band-home h1 {
  font-size: clamp(2.2rem, 1.2rem + 3.4vw, 4rem);
  max-width: 16ch;
}
.hero-band .accent {
  color: var(--accent);
  background: var(--band-ink);
  padding: 0.02em 0.16em;
  border-radius: 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero-band .kicker {
  color: var(--band-muted);
}
.band-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.band-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: saturate(0.6);
}
.band-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s6);
  padding-top: var(--s7);
  padding-bottom: var(--s7);
}
.hero-band-home .band-in {
  padding-top: var(--s8);
  padding-bottom: var(--s8);
}
.hero-band-home .band-in,
.hero-band-hub .band-in {
  grid-template-columns: minmax(0, 1fr);
}
.hero-band-home .band-in:has(.band-side) {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  align-items: center;
}
.band-stat {
  font-size: 1.2rem;
  margin: 0 0 var(--s2);
  max-width: var(--measure);
}
.hero-band-home .band-sub {
  font-size: 1.15rem;
}
.band-sub {
  color: var(--band-muted);
  max-width: var(--measure);
  margin: 0;
}
.band-actions {
  margin-top: var(--s5);
  display: grid;
  gap: var(--s3);
}
.band-link a {
  color: var(--band-ink);
}
.band-link {
  margin: 0;
}
.hero-band .crumb,
.hero-band .crumb a {
  color: var(--band-muted);
  margin: 0 0 var(--s4);
}
.tabs {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}
.tab {
  color: var(--band-ink);
  text-decoration: none;
  border: 1px solid var(--band-line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.92rem;
}
.tab:hover {
  background: var(--band-line);
}
.state-pick {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  max-width: 480px;
}
.state-pick select {
  flex: 1;
  min-width: 200px;
  font: inherit;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--band-line);
  background: var(--bg);
  color: var(--ink);
}
.band-side {
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--radius);
  padding: var(--s5);
  box-shadow: var(--shadow);
}
.side-h {
  font-size: 1.25rem;
  margin: 0 0 var(--s2);
}
.band-side p {
  color: var(--muted);
  margin: 0 0 var(--s3);
}
.band-side .searchbar {
  margin: 0;
  max-width: none;
}
@media (max-width: 860px) {
  .hero-band-home .band-in:has(.band-side) {
    grid-template-columns: 1fr;
  }
  .band-in {
    padding-top: var(--s6);
    padding-bottom: var(--s6);
  }
}

/* ---- stats strip ------------------------------------------------------------------------- */
.stats {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.stats-in {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s4);
  padding-top: var(--s5);
  padding-bottom: var(--s5);
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
}
.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2px;
}
.stat-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---- filter bar -------------------------------------------------------------------------- */
.filterbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.filterbar-in {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  padding-top: var(--s3);
  padding-bottom: var(--s3);
}
.filter-search {
  display: flex;
  gap: var(--s2);
  flex: 1 1 260px;
  max-width: 420px;
}
.filter-search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.menu {
  position: relative;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu summary::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 8px;
  vertical-align: 2px;
}
.menu-label {
  color: var(--muted);
}
.menu-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-height: 60vh;
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--s2);
  z-index: 30;
}
.menu-list a {
  display: block;
  padding: 7px 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: calc(var(--radius) / 2);
  font-size: 0.95rem;
}
.menu-list a:hover {
  background: var(--soft);
}
.menu-list small {
  color: var(--muted);
}
.filter-chips {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}
.sort {
  display: flex;
  gap: var(--s2);
  align-items: center;
  flex-wrap: wrap;
}
.sort[hidden] {
  display: none;
}
.filter-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .filterbar {
    position: static;
  }
  .filter-chips {
    display: none;
  }
}

/* ---- hub intro and aside ----------------------------------------------------------------- */
.hub-intro {
  margin: var(--s6) 0 0;
}
.hub-intro.has-aside.has-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 40%);
  gap: var(--s5);
  align-items: start;
}
.hub-intro.has-aside:not(.has-lead) .map-wrap {
  min-height: 280px;
  max-height: 380px;
}
.hub-intro .lead {
  margin: 0;
}
.hub-aside .map-wrap {
  margin: 0;
}
@media (max-width: 860px) {
  .hub-intro.has-aside.has-lead {
    grid-template-columns: 1fr;
  }
}

/* ---- category tiles ---------------------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s4);
}
.tile {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: box-shadow 0.15s, transform 0.15s;
}
.tile:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.tile-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--band);
}
.tile-media img,
.tile-media .mono {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--tile-overlay);
}
.tile-count {
  position: absolute;
  left: var(--s3);
  bottom: var(--s3);
  z-index: 1;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.tile-body {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---- icons and monogram ------------------------------------------------------------------ */
.cat-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  color: var(--accent);
  flex: none;
}
.cat-icon-file {
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.cat-icon-large {
  width: 48px;
  height: 48px;
}
.mono {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- cards and grids --------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--s4);
  margin: var(--s4) 0;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-featured {
  border-color: var(--accent);
}
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--band);
  overflow: hidden;
}
.card-media img,
.card-media .mono {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-badges {
  position: absolute;
  top: var(--s3);
  left: var(--s3);
  margin: 0;
}
.card-note {
  position: absolute;
  right: var(--s2);
  bottom: var(--s2);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}
.card-body {
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.card-kick {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
}
.card-kick .cat-icon {
  width: 16px;
  height: 16px;
}
.card h3 {
  margin: 2px 0 4px;
  font-size: 1.15rem;
}
.card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.card h3 a:hover {
  color: var(--accent);
}
.card-loc {
  color: var(--muted);
  font-size: 0.9rem;
}
.card-sum {
  color: var(--muted);
  font-size: 0.92rem;
  margin: var(--s2) 0 0;
}
.card-foot {
  margin-top: auto;
  padding-top: var(--s3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  font-size: 0.92rem;
}
.card-phone {
  color: var(--ink);
  text-decoration: none;
}
.card-phone:hover {
  text-decoration: underline;
}
.card-more {
  margin-left: auto;
  font-weight: 600;
  text-decoration: none;
}
.card-more::after {
  content: '\2192';
  margin-left: 4px;
}
.card-text {
  padding: 0;
}
.card-text .card-body {
  padding: var(--s4);
}
.sec-featured {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: var(--s5);
  margin: var(--s6) 0;
}
.featured-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}
.featured-head h2 {
  margin: 0;
}
.featured-link {
  font-weight: 600;
}
.sec-featured .grid {
  margin-bottom: 0;
}
.letter-group {
  margin: var(--s5) 0;
}
.letter {
  font-size: 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s1);
  margin: var(--s5) 0 var(--s2);
  grid-column: 1 / -1;
}
.empty {
  padding: var(--s7) var(--s5);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.empty p {
  margin: 0;
}
.empty-icon {
  color: var(--accent);
  margin-bottom: var(--s3);
}

/* ---- panels, steps, faq, ways, guides ---------------------------------------------------- */
.panel {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s5);
}
.steps-band {
  background: var(--band);
  color: var(--band-ink);
  padding: var(--s7) 0;
  margin: var(--s7) 0;
}
.steps-band h2 {
  color: var(--band-ink);
  margin-top: 0;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s5);
}
.step h3 {
  color: var(--band-ink);
  margin: var(--s3) 0 var(--s1);
}
.step p {
  color: var(--band-muted);
  margin: 0;
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-family: var(--font-heading);
}
.faq-acc {
  max-width: var(--measure);
}
.faq-list {
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  padding: var(--s3) 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  color: var(--accent);
  font-weight: 700;
  flex: none;
}
.faq-item[open] summary::after {
  content: '\2212';
}
.faq-a {
  padding: 0 0 var(--s3);
  color: var(--muted);
}
.faq-a p {
  margin: 0;
}
.ways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s4);
}
.way {
  display: block;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--soft);
}
.way:hover {
  border-color: var(--accent);
}
.way-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 2px;
}
.way-body {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}
.guides {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s4);
}
.guide {
  display: block;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.guide:hover {
  box-shadow: var(--shadow);
}
.guide-kick {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
}
.guide-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 2px 0 4px;
}
.guide-body {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}
.ranking-note {
  max-width: var(--measure);
}
.lead-panel .capture {
  margin-top: var(--s3);
}

/* ---- home editorial and by state --------------------------------------------------------- */
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: var(--s6);
  align-items: start;
}
.editorial-text p {
  max-width: 68ch;
}
.editorial-text h3 {
  margin-top: var(--s5);
}
.editorial-art img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.by-state {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  gap: var(--s6);
  align-items: start;
}
@media (max-width: 860px) {
  .editorial,
  .by-state {
    grid-template-columns: 1fr;
  }
}

/* ---- states ------------------------------------------------------------------------------ */
.usmap-figure {
  margin: var(--s5) 0;
}
.usmap {
  width: 100%;
  max-width: 900px;
  height: auto;
}
.usmap path {
  stroke: var(--bg);
  stroke-width: 1;
}
.usmap .dim {
  fill: color-mix(in srgb, var(--ink) 9%, var(--bg));
}
.usmap .q1 {
  fill: color-mix(in srgb, var(--accent) 30%, var(--bg));
}
.usmap .q2 {
  fill: color-mix(in srgb, var(--accent) 55%, var(--bg));
}
.usmap .q3 {
  fill: color-mix(in srgb, var(--accent) 78%, var(--bg));
}
.usmap .q4 {
  fill: var(--accent);
}
.usmap a:hover path {
  fill: var(--ink);
}
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--s2);
  margin: var(--s4) 0;
}
.state-tile {
  display: flex;
  flex-direction: column;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
}
a.state-tile:hover {
  border-color: var(--accent);
}
.state-tile.dim {
  color: var(--muted);
  border-style: dashed;
}
.state-name {
  font-weight: 600;
}
.state-count {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- breadcrumb, pager, fold, searchbar -------------------------------------------------- */
.crumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin: var(--s4) 0;
}
.crumb a {
  color: var(--muted);
}
.crumb .sep {
  margin: 0 4px;
}
.pager {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin: var(--s5) 0;
}
.pager-list {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.pager-list a,
.pager-list span {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.pager-list .on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.fold {
  position: relative;
}
.fold-toggle {
  display: none;
}
.fold-label {
  display: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 6px;
}
.fold-less {
  display: none;
}
@media (max-width: 760px) {
  .fold .chips {
    max-height: 4.6em;
    overflow: hidden;
  }
  .fold-toggle:checked ~ .chips {
    max-height: none;
  }
  .fold-label {
    display: inline-block;
  }
  .fold-toggle:checked ~ .fold-label .fold-more {
    display: none;
  }
  .fold-toggle:checked ~ .fold-label .fold-less {
    display: inline;
  }
}
.searchbar {
  display: flex;
  gap: var(--s2);
  max-width: 560px;
  margin: var(--s3) 0;
}
.searchbar input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

/* ---- pages not yet on the template (listing, best-of, compare, legal, forms; Phase 9B) ---- */
.hero {
  padding: var(--s7) 0 var(--s5);
}
.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 60ch;
}
.page-head {
  padding: var(--s5) 0 var(--s3);
}
.two {
  display: grid;
  gap: var(--s5);
  grid-template-columns: 2fr 1fr;
}
.side {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4);
  align-self: start;
}
@media (max-width: 860px) {
  .two {
    grid-template-columns: 1fr;
  }
}
.tldr {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--soft);
  padding: var(--s3) var(--s4);
  margin: var(--s4) 0;
  border-radius: var(--radius);
}
.tldr-label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.tldr p {
  margin: 0;
}
.facts {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s3) 0;
}
.facts th,
.facts td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.facts th {
  width: 36%;
  color: var(--muted);
  font-weight: 600;
}
.compare {
  width: 100%;
  border-collapse: collapse;
}
.compare th,
.compare td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.compare thead th {
  background: var(--soft);
}
.best-table td,
.best-table th {
  font-size: 0.95rem;
}
.photo {
  margin: var(--s4) 0;
}
.photo img {
  border-radius: var(--radius);
}
.credit {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}
.ai-chip {
  display: inline-block;
  font-size: 0.78rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) / 2);
  padding: 2px 8px;
  margin-top: 6px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s3);
}
.nearby-item .meta {
  margin: 4px 0 0;
  font-size: 0.85rem;
}
.faq dt {
  font-weight: 700;
  margin-top: var(--s3);
}
.faq dd {
  margin: 4px 0 0;
}
form.form {
  display: grid;
  gap: var(--s3);
  max-width: 560px;
  margin: var(--s4) 0;
}
form.form label {
  display: grid;
  gap: 4px;
  font-weight: 600;
}
form.form input,
form.form textarea,
form.form select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
form.form textarea {
  min-height: 120px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.capture {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s2);
}
.capture input[type='email'] {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font: inherit;
}
.notice {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  margin: var(--s4) 0;
}
.map-wrap {
  position: relative;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: var(--s4) 0;
  background: var(--soft);
  overflow: hidden;
}
.map-static svg {
  width: 100%;
  height: auto;
}
.map-canvas {
  border-radius: var(--radius);
}
.term-list {
  columns: 2;
  column-gap: var(--s5);
}
@media (max-width: 600px) {
  .term-list {
    columns: 1;
  }
}

/* ---- footer ------------------------------------------------------------------------------ */
footer {
  border-top: 1px solid var(--line);
  margin-top: var(--s8);
  padding: var(--s7) 0 var(--s5);
  background: var(--soft);
  font-size: 0.92rem;
}
.foot {
  display: grid;
  gap: var(--s5);
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
.foot-mission p {
  max-width: 40ch;
  color: var(--muted);
}
.foot h4 {
  margin: 0 0 var(--s2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.foot-legal-h {
  margin-top: var(--s4);
}
.foot a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 3px 0;
}
.foot a:hover {
  color: var(--accent);
}
.foot-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}
.legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
@media (max-width: 860px) {
  .foot {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .foot {
    grid-template-columns: 1fr;
  }
}
