:root {
  color-scheme: light;
  --ink: #102c2b;
  --ink-soft: #3c5352;
  --paper: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #e9efea;
  --line: rgba(16, 44, 43, 0.13);
  --line-strong: rgba(16, 44, 43, 0.22);
  --lime: #d9ff62;
  --lime-deep: #bbef31;
  --sky: #c5e8fb;
  --coral: #ee6847;
  --navy: #102c2b;
  --shadow: 0 18px 45px rgba(20, 39, 37, 0.09);
  --radius-sm: 13px;
  --radius-md: 20px;
  --radius-lg: 28px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(197, 232, 251, 0.56), transparent 24rem),
    linear-gradient(180deg, #f8faf7 0%, var(--paper) 28rem, #eef2ee 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(27, 127, 122, 0.35);
  outline-offset: 3px;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  left: 1rem;
  top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.site-shell {
  width: min(100%, 1560px);
  margin: 0 auto;
  padding: 0 2.1rem 2rem;
}

.site-header {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 14px 14px 14px 5px;
  color: var(--lime);
  background: var(--navy);
  box-shadow: 0 9px 22px rgba(16, 44, 43, 0.19);
  font-size: 0.87rem;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.brand-copy {
  display: grid;
  gap: 0.12rem;
}

.brand-copy strong {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.38rem;
  line-height: 1;
  letter-spacing: -0.035em;
}

.brand-copy small {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.045em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.state-pill,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(12px);
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 0.92rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
}

.state-pill svg,
.select-wrap svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
}

.icon-button svg,
.dialog-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.discovery-head {
  padding: clamp(2rem, 4vw, 4.25rem) 0 1.5rem;
}

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 390px);
  align-items: end;
  gap: 3rem;
  margin-bottom: 2rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.6rem;
  color: #47605e;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.eyebrow span {
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: var(--coral);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
.featured-title,
.dialog-title {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

h1 {
  max-width: 770px;
  margin-bottom: 0;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.066em;
}

.intro-copy {
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.58;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 260px) auto;
  gap: 0.75rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 42px rgba(17, 43, 40, 0.065);
  backdrop-filter: blur(18px);
}

.search-box,
.select-wrap {
  display: flex;
  align-items: center;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--paper);
}

.search-box:focus-within,
.select-wrap:focus-within {
  border-color: rgba(16, 44, 43, 0.3);
  box-shadow: 0 0 0 4px rgba(197, 232, 251, 0.45);
}

.search-box {
  gap: 0.8rem;
  padding: 0 1rem;
}

.search-box svg {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
}

.search-box input::placeholder {
  color: #778886;
}

.search-box kbd {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  color: #758482;
  background: white;
  font: 700 0.78rem/1 ui-monospace, monospace;
}

.select-wrap {
  position: relative;
  gap: 0.55rem;
  padding-left: 0.9rem;
}

.select-wrap select {
  width: 100%;
  height: 52px;
  padding: 0 2.3rem 0 0;
  border: 0;
  outline: 0;
  appearance: none;
  color: var(--ink);
  background: transparent;
  font-size: 0.91rem;
  font-weight: 720;
}

.select-wrap::after {
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.view-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  min-width: 306px;
  padding: 0.28rem;
  border-radius: 17px;
  background: var(--navy);
}

.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  min-height: 48px;
  padding: 0 1rem;
  border: 0;
  border-radius: 13px;
  color: #c9d5d3;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.view-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.view-button:hover {
  color: white;
}

.view-button.is-active {
  color: var(--navy);
  background: var(--lime);
  box-shadow: 0 5px 15px rgba(217, 255, 98, 0.16);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
}

.filter-chips {
  display: flex;
  gap: 0.46rem;
  max-width: calc(100% - 175px);
  overflow-x: auto;
  padding: 0.15rem 0.15rem 0.35rem;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
  font-weight: 720;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.filter-chip.is-active {
  border-color: var(--navy);
  color: white;
  background: var(--navy);
}

.sort-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.45rem;
  min-height: 38px;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.sort-wrap select {
  appearance: none;
  padding: 0.45rem 1.55rem 0.45rem 0.15rem;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 800;
}

.sort-wrap svg {
  position: absolute;
  right: 0.1rem;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.ranked-view,
.map-view,
.state-view {
  padding: 1.1rem 0 2rem;
}

.section-heading,
.map-sidebar-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading h2,
.map-sidebar-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.results-summary {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding-bottom: 0.25rem;
  color: var(--ink-soft);
}

.results-summary strong {
  color: var(--ink);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.5rem;
}

.results-summary span {
  font-size: 0.82rem;
  font-weight: 750;
}

.featured-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, 0.68fr);
  min-height: 390px;
  margin-bottom: 0.85rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.featured-image {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background: #243634;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.91) contrast(1.03);
  transform: scale(1.01);
  transition: transform 800ms cubic-bezier(.2,.8,.2,1);
}

.featured-card:hover .featured-image img {
  transform: scale(1.045);
}

.featured-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 64%, rgba(16, 44, 43, 0.5) 100%);
  content: "";
  pointer-events: none;
}

.featured-rank {
  position: absolute;
  z-index: 2;
  top: 1.25rem;
  left: 1.25rem;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 19px 19px 19px 5px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.featured-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(1.7rem, 3vw, 2.7rem);
}

.featured-copy::after {
  position: absolute;
  right: -2.5rem;
  bottom: -4rem;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(217, 255, 98, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(217, 255, 98, 0.035), 0 0 0 4rem rgba(217, 255, 98, 0.025);
  content: "";
  pointer-events: none;
}

.featured-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
  color: #d7e2df;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.featured-label::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(217, 255, 98, 0.1);
  content: "";
}

.featured-title {
  position: relative;
  z-index: 1;
  margin: 0 0 0.55rem;
  font-size: clamp(2.1rem, 3.6vw, 3.9rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.featured-meta {
  position: relative;
  z-index: 1;
  margin: 0 0 1.25rem;
  color: #bfcecb;
  font-size: 0.92rem;
  font-weight: 650;
}

.featured-description {
  position: relative;
  z-index: 1;
  margin-bottom: 1.45rem;
  color: #dce6e4;
  line-height: 1.55;
}

.featured-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.score-block {
  display: grid;
  gap: 0.18rem;
}

.score-block span {
  color: #9eb2af;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.score-block strong {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
}

.featured-action,
.detail-action,
.empty-state button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.featured-action:hover,
.detail-action:hover,
.empty-state button:hover {
  background: var(--lime-deep);
  transform: translateY(-1px);
}

.restaurant-list {
  display: grid;
  gap: 0.65rem;
}

.restaurant-row {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1.4fr) minmax(160px, 0.65fr) 100px 48px;
  align-items: center;
  gap: 1rem;
  min-height: 110px;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: inherit;
  background: rgba(255, 255, 255, 0.79);
  box-shadow: 0 8px 22px rgba(16, 44, 43, 0.025);
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.restaurant-row:hover {
  border-color: rgba(16, 44, 43, 0.26);
  background: white;
  box-shadow: 0 14px 36px rgba(16, 44, 43, 0.075);
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px 17px 17px 5px;
  color: var(--ink);
  background: var(--surface-2);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.restaurant-row:nth-child(-n + 2) .rank-number {
  background: var(--sky);
}

.restaurant-main {
  min-width: 0;
}

.restaurant-name {
  margin: 0 0 0.3rem;
  overflow: hidden;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.24rem, 2vw, 1.6rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurant-sub,
.restaurant-location {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.81rem;
  font-weight: 650;
  line-height: 1.45;
}

.restaurant-location {
  display: grid;
  gap: 0.22rem;
}

.restaurant-location strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.row-score {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
}

.row-score strong {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1;
}

.row-score span {
  color: #6c7f7d;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.row-arrow {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  transition: background 160ms ease, transform 160ms ease;
}

.row-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.restaurant-row:hover .row-arrow {
  background: var(--lime);
  transform: translateX(2px);
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 4.5rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state > span {
  font-family: Georgia, serif;
  font-size: 3rem;
}

.empty-state h3 {
  margin: 0.7rem 0 0.35rem;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.65rem;
}

.empty-state p {
  margin-bottom: 1.15rem;
  color: var(--ink-soft);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(325px, 410px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: min(720px, calc(100vh - 235px));
  min-height: 570px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow);
}

.map-sidebar {
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
}

.map-sidebar-head {
  align-items: flex-start;
  margin: 0;
  padding: 1.4rem 1.25rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.map-sidebar-head h2 {
  font-size: 1.65rem;
}

.map-sidebar-head > span {
  display: grid;
  place-items: center;
  min-width: 35px;
  height: 35px;
  border-radius: 11px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.8rem;
  font-weight: 900;
}

.map-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #bdcbc7 transparent;
  scrollbar-width: thin;
}

.map-list-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.78rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
  transition: background 150ms ease;
}

.map-list-item:hover,
.map-list-item.is-active {
  background: #edf5ef;
}

.mini-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px 13px 13px 4px;
  background: var(--surface-2);
  font-family: Georgia, serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.map-list-item.is-active .mini-rank {
  background: var(--lime);
}

.map-list-copy {
  min-width: 0;
}

.map-list-copy strong,
.map-list-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-list-copy strong {
  margin-bottom: 0.18rem;
  font-family: Georgia, serif;
  font-size: 1rem;
}

.map-list-copy span {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 640;
}

.mini-score {
  display: grid;
  justify-items: end;
  color: var(--ink);
}

.mini-score strong {
  font-family: Georgia, serif;
  font-size: 1rem;
}

.mini-score span {
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #dfe8e2;
}

#map {
  width: 100%;
  height: 100%;
}

.leaflet-container {
  font-family: inherit;
  background: #dfe8e2;
}

.leaflet-control-attribution {
  padding: 3px 7px !important;
  border-radius: 8px 0 0 0;
  color: #4d6361;
  background: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.66rem !important;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(16, 44, 43, 0.16) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(16, 44, 43, 0.12) !important;
}

.leaflet-control-zoom a {
  display: grid !important;
  place-items: center;
  width: 38px !important;
  height: 38px !important;
  border-bottom-color: var(--line) !important;
  color: var(--ink) !important;
  font: 700 1.2rem/1 sans-serif !important;
}

.nc-marker-wrap {
  background: transparent;
  border: 0;
}

.nc-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid white;
  border-radius: 50% 50% 50% 10%;
  color: white;
  background: var(--navy);
  box-shadow: 0 5px 13px rgba(16, 44, 43, 0.3);
  font-size: 0.66rem;
  font-weight: 900;
  transform: rotate(-45deg);
  transition: background 150ms ease, transform 150ms ease;
}

.nc-marker span {
  transform: rotate(45deg);
}

.nc-marker.is-active {
  color: var(--ink);
  background: var(--lime);
  transform: rotate(-45deg) scale(1.18);
}

.leaflet-popup-content-wrapper {
  border-radius: 17px !important;
  box-shadow: 0 16px 40px rgba(16, 44, 43, 0.2) !important;
}

.leaflet-popup-content {
  min-width: 180px;
  margin: 13px 16px !important;
  font-family: inherit;
}

.popup-rank {
  color: #657a77;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.popup-name {
  margin: 0.2rem 0;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.popup-meta {
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.map-overlay-card {
  position: absolute;
  z-index: 500;
  top: 1rem;
  left: 50%;
  display: grid;
  gap: 0.12rem;
  min-width: 195px;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(16, 44, 43, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 26px rgba(16, 44, 43, 0.11);
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.map-overlay-card strong {
  font-size: 0.79rem;
}

.map-overlay-card span {
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 650;
}

.locate-button {
  position: absolute;
  z-index: 500;
  right: 1rem;
  bottom: 1.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 0.9rem;
  border: 1px solid rgba(16, 44, 43, 0.13);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(16, 44, 43, 0.14);
  font-size: 0.76rem;
  font-weight: 850;
}

.locate-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 600;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.45rem;
  background:
    radial-gradient(circle at 38% 40%, rgba(197, 232, 251, 0.8), transparent 17rem),
    #e8eee9;
  text-align: center;
}

.map-fallback[hidden] {
  display: none;
}

.map-fallback svg {
  width: 54px;
  height: 54px;
  margin-bottom: 0.4rem;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.map-fallback span {
  color: var(--ink-soft);
  font-size: 0.83rem;
}

.state-view-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.state-view-head h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(2.15rem, 4.2vw, 4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.state-view-head > div > p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.preview-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(238, 104, 71, 0.12);
}

.state-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.62fr);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow);
}

.state-map-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1rem, 2.1vw, 1.65rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 30%, rgba(217, 255, 98, 0.13), transparent 20rem),
    linear-gradient(145deg, #f9fbf8, #eef3ef);
}

.heat-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
}

.toolbar-label {
  display: block;
  margin-bottom: 0.55rem;
  color: #667a77;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.metric-button {
  min-height: 38px;
  padding: 0 0.82rem;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 800;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.metric-button:hover {
  color: var(--ink);
}

.metric-button.is-active {
  color: white;
  background: var(--navy);
  box-shadow: 0 5px 14px rgba(16, 44, 43, 0.16);
}

.heat-legend {
  display: grid;
  grid-template-columns: auto minmax(92px, 132px) auto;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 750;
}

.heat-legend i {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e7ece8, #dff3bd 25%, #addc77 52%, #6dac52 76%, #173f35);
  box-shadow: inset 0 0 0 1px rgba(16, 44, 43, 0.1);
}

.county-map-wrap {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 410px;
  margin: 0.35rem 0;
}

#countyMap {
  width: 100%;
  max-height: 495px;
  overflow: visible;
  filter: drop-shadow(0 16px 22px rgba(16, 44, 43, 0.11));
}

#countyMap .county-shape {
  vector-effect: non-scaling-stroke;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 1.05;
  cursor: pointer;
  transition: fill 180ms ease, stroke 150ms ease, stroke-width 150ms ease, filter 150ms ease;
}

#countyMap .county-shape:hover,
#countyMap .county-shape:focus-visible {
  stroke: var(--ink);
  stroke-width: 2.2;
  outline: none;
  filter: brightness(1.035);
}

#countyMap .county-shape.is-active {
  stroke: var(--coral);
  stroke-width: 3.2;
  filter: drop-shadow(0 3px 3px rgba(16, 44, 43, 0.22));
}

.county-map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 750;
}

.county-map-loading[hidden] {
  display: none;
}

.county-tooltip {
  position: absolute;
  z-index: 5;
  display: none;
  min-width: 154px;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  color: white;
  background: rgba(16, 44, 43, 0.96);
  box-shadow: 0 12px 30px rgba(16, 44, 43, 0.22);
  font-size: 0.72rem;
  line-height: 1.42;
  pointer-events: none;
  transform: translate(12px, 12px);
}

.county-tooltip.is-visible {
  display: block;
}

.county-tooltip strong,
.county-tooltip span {
  display: block;
}

.county-tooltip strong {
  margin-bottom: 0.1rem;
  font-family: Georgia, serif;
  font-size: 0.96rem;
}

.county-tooltip span {
  color: #d3dfdc;
}

.state-map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 38px;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.state-map-foot strong {
  font-size: 0.77rem;
}

.state-map-foot span {
  color: var(--ink-soft);
  font-size: 0.66rem;
  text-align: right;
}

.state-map-foot a {
  color: inherit;
  text-underline-offset: 2px;
}

.county-detail {
  min-width: 0;
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  border-left: 1px solid var(--line);
  background: var(--navy);
  color: white;
}

.county-back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: -0.35rem 0 1rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  color: #bed0cd;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.68rem;
  font-weight: 800;
}

.county-back:hover {
  color: white;
  border-color: rgba(217, 255, 98, 0.35);
}

.county-detail-kicker {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.county-detail h3 {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.county-detail-lede {
  margin: 0.8rem 0 1.3rem;
  color: #bfd0cd;
  font-size: 0.87rem;
  line-height: 1.55;
}

.county-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.3rem;
}

.county-stat {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.county-stat span,
.county-stat strong {
  display: block;
}

.county-stat span {
  margin-bottom: 0.22rem;
  color: #9db4b0;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.county-stat strong {
  overflow: hidden;
  color: white;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.county-places-title {
  margin: 0 0 0.55rem;
  color: #9db4b0;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.county-place-list,
.state-leader-list {
  display: grid;
  gap: 0.48rem;
}

.county-place,
.state-leader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.72rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  color: white;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}

.county-place:hover,
.state-leader:hover {
  border-color: rgba(217, 255, 98, 0.45);
  background: rgba(217, 255, 98, 0.09);
}

.county-place strong,
.county-place span,
.state-leader strong,
.state-leader span {
  display: block;
}

.county-place strong,
.state-leader strong {
  overflow: hidden;
  margin-bottom: 0.18rem;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.county-place span,
.state-leader span {
  color: #a9bfbb;
  font-size: 0.67rem;
}

.county-place > em,
.state-leader > em {
  display: grid;
  place-items: center;
  min-width: 37px;
  height: 37px;
  border-radius: 11px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.county-empty {
  padding: 1.05rem;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: #bdd0cd;
  font-size: 0.78rem;
  line-height: 1.5;
}

.county-clear-button {
  width: 100%;
  min-height: 42px;
  margin-top: 0.65rem;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.76rem;
  font-weight: 900;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0 0.2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

footer > span {
  flex: 0 0 auto;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
}

footer p {
  max-width: 650px;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: right;
}

dialog {
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  color: var(--ink);
  background: white;
  box-shadow: 0 32px 85px rgba(10, 30, 29, 0.28);
}

dialog::backdrop {
  background: rgba(10, 28, 27, 0.56);
  backdrop-filter: blur(5px);
}

.detail-dialog {
  width: min(92vw, 590px);
  overflow: hidden;
  border-radius: 26px;
}

.dialog-close {
  position: absolute;
  z-index: 4;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  color: white;
  background: rgba(16, 44, 43, 0.72);
  backdrop-filter: blur(10px);
}

.dialog-visual {
  position: relative;
  min-height: 200px;
  padding: 2rem;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 82% 15%, rgba(217, 255, 98, 0.3), transparent 9rem),
    linear-gradient(140deg, #163b39, #0e2524);
}

.dialog-visual::after {
  position: absolute;
  right: -2.5rem;
  bottom: -7rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  box-shadow: 0 0 0 2.7rem rgba(255, 255, 255, 0.025), 0 0 0 5.5rem rgba(255, 255, 255, 0.02);
  content: "";
}

.dialog-rank {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  min-width: 45px;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: 10px;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.73rem;
  font-weight: 900;
}

.dialog-title {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 1.1rem 0 0.45rem;
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.dialog-place {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #c6d6d3;
  font-size: 0.86rem;
  font-weight: 680;
}

.dialog-body {
  padding: 1.65rem 2rem 2rem;
}

.dialog-lede {
  margin-bottom: 1.35rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.detail-stat {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--paper);
}

.detail-stat span {
  color: #647875;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-stat strong {
  overflow: hidden;
  font-size: 0.91rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.tag {
  padding: 0.46rem 0.67rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 720;
}

.detail-action {
  width: 100%;
  min-height: 50px;
}

.info-dialog {
  width: min(90vw, 500px);
  padding: 2.2rem;
  border-radius: 26px;
}

.info-dialog .dialog-close {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.info-dialog h2 {
  margin-bottom: 1rem;
  font-size: 2.3rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.info-dialog > p:not(.section-kicker) {
  color: var(--ink-soft);
  line-height: 1.62;
}

.score-key {
  display: grid;
  gap: 0.2rem;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 15px;
  background: var(--paper);
}

.score-key span {
  color: #647875;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .site-shell {
    padding-inline: 1.2rem;
  }

  .title-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .intro-copy {
    max-width: 600px;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr) minmax(205px, 0.55fr);
  }

  .view-switch {
    grid-column: 1 / -1;
  }

  .featured-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(290px, 0.72fr);
  }

  .restaurant-row {
    grid-template-columns: 68px minmax(0, 1fr) 85px 45px;
  }

  .restaurant-location {
    display: none;
  }

  .map-layout {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  .state-dashboard {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.65fr);
  }

  .heat-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .heat-legend {
    width: min(100%, 330px);
  }
}

@media (max-width: 740px) {
  .site-shell {
    padding: 0 0.88rem 1.2rem;
  }

  .site-header {
    min-height: 74px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px 12px 12px 4px;
  }

  .brand-copy strong {
    font-size: 1.2rem;
  }

  .brand-copy small,
  .state-pill {
    display: none;
  }

  .discovery-head {
    padding-top: 2.2rem;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .intro-copy {
    font-size: 0.98rem;
  }

  .search-row {
    grid-template-columns: 1fr;
    padding: 0.52rem;
    border-radius: 21px;
  }

  .search-box,
  .select-wrap {
    min-height: 52px;
  }

  .search-box kbd {
    display: none;
  }

  .view-switch {
    grid-column: auto;
    min-width: 0;
  }

  .view-button {
    min-width: 0;
    padding-inline: 0.45rem;
  }

  .filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .filter-chips {
    width: calc(100vw - 1.76rem);
    max-width: none;
    margin-inline: -0.05rem;
  }

  .sort-wrap {
    align-self: flex-end;
    min-height: 34px;
    border-left: 0;
  }

  .section-heading {
    align-items: end;
  }

  .featured-card {
    display: block;
    min-height: 475px;
  }

  .featured-image {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .featured-image::after {
    background: linear-gradient(180deg, rgba(16, 44, 43, 0.03) 12%, rgba(16, 44, 43, 0.94) 68%, #102c2b 100%);
  }

  .featured-copy {
    position: relative;
    z-index: 2;
    justify-content: flex-end;
    min-height: 475px;
    padding: 1.35rem;
  }

  .featured-rank {
    top: 1rem;
    left: 1rem;
    width: 54px;
    height: 54px;
    font-size: 1.5rem;
  }

  .featured-label {
    margin-bottom: 0.75rem;
  }

  .featured-title {
    font-size: 2.75rem;
  }

  .featured-description {
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }

  .restaurant-row {
    grid-template-columns: 53px minmax(0, 1fr) 62px;
    gap: 0.7rem;
    min-height: 94px;
    padding: 0.78rem;
    border-radius: 17px;
  }

  .rank-number {
    width: 48px;
    height: 48px;
    border-radius: 14px 14px 14px 4px;
    font-size: 1.13rem;
  }

  .restaurant-name {
    margin-bottom: 0.25rem;
    font-size: 1.18rem;
  }

  .restaurant-sub {
    font-size: 0.74rem;
  }

  .row-score strong {
    font-size: 1.25rem;
  }

  .row-arrow {
    display: none;
  }

  .map-layout {
    display: flex;
    flex-direction: column-reverse;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .map-sidebar {
    height: auto;
    border: 1px solid var(--line);
    border-radius: 0 0 22px 22px;
  }

  .map-sidebar-head {
    padding: 1.2rem 1rem 1rem;
  }

  .map-list {
    max-height: 410px;
  }

  .map-stage {
    height: 56vh;
    min-height: 410px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
  }

  .map-overlay-card {
    top: 0.75rem;
    min-width: 180px;
  }

  .locate-button {
    right: 0.75rem;
    bottom: 1.15rem;
  }

  .state-view-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .state-dashboard {
    display: block;
    min-height: 0;
    overflow: visible;
    border-radius: 22px;
  }

  .state-map-card {
    min-height: 455px;
    border-radius: 22px 22px 0 0;
  }

  .metric-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .metric-button {
    padding-inline: 0.38rem;
    font-size: 0.68rem;
  }

  .county-map-wrap {
    min-height: 260px;
    margin-block: 0.55rem;
  }

  .state-map-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .state-map-foot span {
    text-align: left;
  }

  .county-detail {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
    border-radius: 0 0 22px 22px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  footer p {
    text-align: left;
  }

  .detail-dialog {
    width: calc(100vw - 1.25rem);
  }

  .dialog-visual {
    padding: 1.4rem;
  }

  .dialog-body {
    padding: 1.3rem;
  }

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

  .detail-stat:last-child {
    grid-column: 1 / -1;
  }

  .info-dialog {
    padding: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
