:root {
  --color-navy-900: #102b4e;
  --color-navy-800: #173a63;
  --color-green-700: #237a45;
  --color-green-600: #2f9b57;
  --color-green-100: #eaf6ef;
  --color-cream-50: #faf9f7;
  --color-cream-100: #f6f1e8;
  --color-border: #d9e2ec;
  --color-muted-text: #64748b;
  --color-card-shadow: rgba(16, 43, 78, 0.12);
  --color-danger: #e5483f;
  --color-warning: #f2c230;
  --color-white: #ffffff;
  --rcf-navy-950: #0b1f3a;
  --rcf-navy-900: #102b4e;
  --rcf-navy-800: #173a63;
  --rcf-navy-700: #24496f;
  --rcf-green-700: #237a45;
  --rcf-green-600: #2f9b57;
  --rcf-green-500: #36a866;
  --rcf-green-100: #eaf6ef;
  --rcf-green-50: #f4fbf7;
  --rcf-gold-600: #c18400;
  --rcf-gold-500: #f2c230;
  --rcf-gold-100: #fff5cc;
  --rcf-red-600: #e5483f;
  --rcf-red-100: #fee4e2;
  --rcf-cream-100: #faf9f7;
  --rcf-cream-50: #fffdf8;
  --rcf-white: #ffffff;
  --rcf-border: #d9e2ec;
  --rcf-border-soft: #e8eef4;
  --rcf-muted: #64748b;
  --rcf-muted-light: #94a3b8;
  --rcf-track: #e3e9f0;
  --rcf-shadow-sm: 0 2px 8px rgba(16, 43, 78, 0.08);
  --rcf-shadow-md: 0 8px 24px rgba(16, 43, 78, 0.1);
  --rcf-shadow-lg: 0 16px 40px rgba(16, 43, 78, 0.14);
  --rcf-radius-sm: 8px;
  --rcf-radius-md: 12px;
  --rcf-radius-lg: 16px;
  --rcf-radius-xl: 20px;
  --rcf-radius-pill: 999px;
  --rcf-text-xs: 12px;
  --rcf-text-sm: 14px;
  --rcf-text-base: 16px;
  --rcf-text-lg: 18px;
  --rcf-text-xl: 22px;
  --rcf-text-2xl: 28px;
  --rcf-text-3xl: 40px;
  --rcf-text-4xl: 52px;
  --bg: var(--color-cream-50);
  --surface: var(--color-white);
  --surface-strong: #f6f8fb;
  --text: var(--color-navy-900);
  --muted: var(--color-muted-text);
  --accent: var(--color-navy-800);
  --accent-soft: #e6eff8;
  --brand-red: var(--color-green-600);
  --metric-excellent: #15803d;
  --metric-very-good: #22c55e;
  --metric-good: #35d36f;
  --metric-ok: #f2c230;
  --metric-bad: #e5483f;
  --metric-very-bad: #b42318;
  --metric-good-text: #166534;
  --metric-ok-text: #9a6700;
  --metric-bad-text: #b42318;
  --metric-track: #d5dee8;
  --danger: var(--color-danger);
  --chip: #e4ebf3;
  --line: rgba(16, 43, 78, 0.12);
  --card-radius: 20px;
  --panel-radius: 16px;
  --shadow-soft: 0 16px 36px rgba(9, 24, 42, 0.18);
  --shadow-card: 0 10px 30px var(--color-card-shadow);
  --page-gutter: clamp(40px, 3.4vw, 48px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Public Sans", sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

html.auth-booting body.app-booting {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

.app-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  background: #ffffff;
}

.app-boot-spinner {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 3px solid #d3dbe6;
  border-top-color: #6d7f93;
  animation: app-boot-spin 0.85s linear infinite;
}

.app-boot-message {
  display: none !important;
}

html.auth-booting body.app-booting .app-boot-overlay {
  opacity: 1;
  pointer-events: auto;
}

html.auth-booting body.app-booting .site-header,
html.auth-booting body.app-booting main,
html.auth-booting body.app-booting .site-footer {
  visibility: hidden;
}

@keyframes app-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-boot-spinner {
    animation: none;
    border-top-color: #d3dbe6;
  }

  .hero-background-video {
    display: none;
  }
}

a {
  color: inherit;
}

.container {
  width: min(1240px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(9px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.home-page:not(.member-home) .site-header {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

.home-page:not(.member-home) .brand,
.home-page:not(.member-home) .main-nav a {
  color: #f7fbff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.46);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Newsreader", serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.main-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-premium {
  padding: 0;
  background: var(--color-cream-50);
}

.hero-media {
  min-height: min(900px, 94vh);
  position: relative;
  overflow: hidden;
  background-image: url("/assets/hero-tropical-beach-poster.jpg");
  background-size: cover;
  background-position: center 48%;
}

.hero-video-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-background-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-background-video.is-active {
  opacity: 1;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(6, 18, 31, 0.42);
  pointer-events: none;
}

.hero-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(52px, 7vw, 92px);
  background: var(--color-cream-50);
  -webkit-mask-image: radial-gradient(132% 115% at 50% 0%, transparent 0 54%, #000 55%);
  mask-image: radial-gradient(132% 115% at 50% 0%, transparent 0 54%, #000 55%);
  pointer-events: none;
  z-index: 3;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  min-height: min(900px, 94vh);
  display: flex;
  align-items: center;
  background: transparent;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 350px);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 72px 0 120px;
}

.hero-copy-wrap {
  width: min(620px, 100%);
  display: grid;
  gap: 18px;
  color: var(--color-white);
  text-shadow: 0 3px 16px rgba(7, 20, 35, 0.54);
}

.hero-premium h1 {
  margin: 0;
  font-family: "Public Sans", sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--color-white);
}

.hero-premium h1 span {
  display: block;
  color: var(--color-white);
}

.hero-premium p {
  margin: 0;
  max-width: 620px;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--color-white);
}

.hero-community-proof {
  display: grid;
  gap: 10px;
  justify-items: start;
  width: min(520px, 100%);
  text-shadow: 0 3px 14px rgba(7, 20, 35, 0.48);
}

.hero-community-avatars {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-left: 2px;
}

.hero-community-avatars img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(5, 17, 29, 0.34);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.18);
}

.hero-community-avatars img + img {
  margin-left: -13px;
}

.hero-community-proof p {
  max-width: 560px;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 800;
}

.hero-search-card {
  min-height: 56px;
  width: min(520px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: var(--rcf-shadow-sm);
  text-shadow: none;
}

.hero-search-icon,
.hero-trust-list span,
.marketing-card-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--color-green-600);
}

.hero-search-icon {
  width: 20px;
  height: 20px;
}

.hero-search-icon svg,
.hero-trust-list svg,
.marketing-card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-search-icon path,
.hero-search-icon circle,
.hero-trust-list path,
.marketing-card-icon path,
.marketing-card-icon circle,
.marketing-card-icon ellipse {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-search-card input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-navy-900);
  font-family: "Public Sans", sans-serif;
  font-size: 0.95rem;
}

.hero-search-card input::-webkit-search-cancel-button,
.search-shell input::-webkit-search-cancel-button {
  width: 22px;
  height: 22px;
  margin-left: 8px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-color: var(--color-navy-800);
  opacity: 0.8;
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
}

.hero-search-card input::-webkit-search-cancel-button {
  width: 24px;
  height: 24px;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}

.hero-search-card input:focus,
.hero-search-card input:focus-visible {
  outline: none;
}

.hero-search-card button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--color-green-600);
  color: var(--color-white);
  font-family: "Public Sans", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.hero-search-card button:hover,
.hero-search-card button:focus-visible {
  background: var(--color-green-700);
  box-shadow: 0 8px 18px rgba(35, 122, 69, 0.18);
  transform: translateY(-1px);
}

.hero-search-card button:focus-visible {
  outline: 3px solid rgba(47, 155, 87, 0.28);
  outline-offset: 2px;
}

.hero-trust-list {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  list-style: none;
}

.hero-trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--color-white);
}

.hero-trust-list span {
  width: 20px;
  height: 20px;
}

.hero-toolbar {
  margin-top: 0;
  position: relative;
  z-index: 10;
  padding-top: 14px;
  padding-bottom: 10px;
}

.hero-toolbar.container {
  width: 100%;
  padding-inline: var(--page-gutter);
}

.member-home .hero-premium {
  display: none;
}

.member-home .hero-toolbar {
  margin-top: 0;
  padding-top: 14px;
  padding-bottom: 10px;
}

.member-home .grid-container {
  padding-top: 4px;
}

.hero-auth-panel {
  background: var(--color-white);
  border: 1px solid rgba(16, 38, 58, 0.16);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 9px;
  box-shadow: var(--shadow-card);
}

.hero-auth-panel h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: 1.55rem;
  line-height: 1.12;
  color: var(--color-navy-900);
}

.hero-panel-media {
  width: 100%;
  min-height: 172px;
  height: 172px;
  border-radius: 10px;
  border: 1px solid rgba(19, 50, 77, 0.2);
  background:
    linear-gradient(to top, rgba(12, 37, 57, 0.18), rgba(12, 37, 57, 0.06)),
    url("https://images.pexels.com/photos/4210026/pexels-photo-4210026.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=760&h=428&q=78");
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}

.hero-auth-panel p {
  font-size: 0.9rem;
  color: var(--color-muted-text);
}

.hero-auth-panel small {
  color: var(--color-muted-text);
  font-size: 0.78rem;
  line-height: 1.45;
}

.hero-auth-form {
  display: grid;
  gap: 8px;
}

.hero-auth-form input {
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-navy-900);
}

.hero-auth-form button {
  min-height: 46px;
  border: 1px solid transparent;
  background: var(--color-green-600);
  color: var(--color-white);
  border-radius: 10px;
  padding: 0 10px 0 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 8px 20px rgba(47, 155, 87, 0.2);
  transition:
    background-color 170ms ease,
    color 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.hero-auth-form button:hover {
  background: var(--color-green-700);
  color: var(--color-white);
  border-color: var(--color-green-700);
  box-shadow: 0 10px 22px rgba(35, 122, 69, 0.2);
  transform: translateY(-1px);
}

.hero-auth-form .button-arrow {
  display: inline-block;
  flex: 0 0 auto;
  color: currentColor;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-1px);
}

.hero-auth-panel.is-hidden {
  display: none;
}

.marketing-section {
  padding: 26px 0 0;
  background: var(--color-cream-50);
}

.marketing-section-inner {
  width: min(1120px, 92vw);
}

.marketing-section h2 {
  margin: 0;
  text-align: center;
  font-family: "Newsreader", serif;
  font-size: clamp(2.05rem, 3vw, 2.55rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--color-navy-900);
}

.how-it-works .marketing-section-inner {
  width: min(1160px, 92vw);
}

.how-it-works .marketing-section-inner {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.marketing-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.how-it-works .marketing-card-grid {
  position: relative;
  margin-top: 0;
  gap: 26px;
}

.marketing-step-card {
  display: grid;
  align-content: start;
  min-height: 0;
  border: 1px solid rgba(16, 43, 78, 0.12);
}

.marketing-step-card {
  position: relative;
  gap: 10px;
  min-height: 158px;
  padding: 22px 18px 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(16, 43, 78, 0.045);
}

.marketing-step-card:not(:last-child)::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: -23px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: rgba(16, 43, 78, 0.68);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
  transform: translateY(-50%);
  pointer-events: none;
}

.marketing-step-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--color-green-700);
  color: var(--color-white);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 7px 16px rgba(35, 122, 69, 0.18);
}

.marketing-card-icon {
  width: 38px;
  height: 38px;
  justify-self: center;
  margin-top: 8px;
}

.how-it-works .marketing-card-icon {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  margin: 2px auto 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-green-700);
  box-shadow: none;
}

.how-it-works .marketing-card-icon svg {
  width: 36px;
  height: 36px;
}

.marketing-step-card h3 {
  margin: 0;
  color: var(--color-navy-900);
  font-size: 1.05rem;
  line-height: 1.28;
}

.how-it-works .marketing-step-card h3 {
  font-size: 1.08rem;
  line-height: 1.24;
}

.marketing-step-card p {
  margin: 0;
  color: var(--color-muted-text);
  font-size: 0.9rem;
  line-height: 1.48;
}

.how-it-works .marketing-step-card p {
  color: #40556a;
}

.filter-control input:focus,
.filter-control select:focus,
.modal-form input:focus {
  outline: 2px solid rgba(47, 155, 87, 0.42);
  outline-offset: 1px;
}

.listing-toolbar {
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 18px;
  gap: 16px;
}

.toolbar-primary,
.toolbar-secondary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 0;
}

.toolbar-primary {
  flex: 1 1 600px;
}

.toolbar-secondary {
  justify-content: flex-end;
  margin-left: auto;
}

.logo-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.logo-menu-trigger {
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 66px;
  padding: 1px 4px 1px 0;
  cursor: pointer;
  border-radius: 16px;
  color: var(--color-navy-900);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.logo-menu-trigger:focus-visible {
  outline: 2px solid rgba(47, 155, 87, 0.42);
  outline-offset: 3px;
}

.logo-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
  transition: transform 170ms ease, filter 170ms ease;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: scale(1.15);
}

.logo-wordmark {
  font-family: "Newsreader", serif;
  font-size: clamp(1.42rem, 1.85vw, 1.75rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-navy-900);
  white-space: nowrap;
}

.toolbar-caret {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: -10px;
  font-size: 0;
  color: #fff;
  font-weight: 700;
  filter: drop-shadow(0 1px 2px rgba(16, 38, 58, 0.72));
  transition: color 170ms ease, transform 170ms ease, opacity 170ms ease;
}

.toolbar-caret::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.logo-menu-trigger:hover .logo-mark,
.logo-menu-trigger:focus-visible .logo-mark {
  transform: translateY(-1px) scale(1.02);
  filter: drop-shadow(0 6px 10px rgba(35, 122, 69, 0.16));
}

.logo-menu-trigger:hover .toolbar-caret,
.logo-menu-trigger:focus-visible .toolbar-caret {
  color: #fff;
  transform: translateY(1px) scale(1.08);
  opacity: 0.95;
}

.logo-menu-trigger[aria-expanded="true"] .toolbar-caret {
  color: #fff;
  transform: rotate(180deg);
}

.logo-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 18px 32px rgba(16, 43, 78, 0.16);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 30;
}

.logo-menu button {
  border: none;
  background: var(--color-white);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font-family: "Public Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-navy-900);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.logo-menu button[hidden] {
  display: none;
}

.logo-menu button:hover {
  background: var(--color-green-100);
  color: var(--color-navy-900);
}

.toolbar-button,
.sort-trigger,
.sort-direction-toggle,
.toolbar-join-cta {
  min-height: 48px;
  border-radius: 16px;
  font-family: "Public Sans", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0;
}

.toolbar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-navy-900);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.toolbar-button-icon {
  width: 20px;
  height: 20px;
  color: var(--color-green-600);
  flex: 0 0 auto;
}

.toolbar-button-icon svg,
.search-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.toolbar-button-icon path,
.search-icon path,
.search-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar-button:hover {
  border-color: rgba(47, 155, 87, 0.42);
  background: var(--color-green-100);
  box-shadow: 0 8px 18px rgba(16, 43, 78, 0.08);
}

.toolbar-button:focus-visible,
.sort-control:focus-within,
.sort-direction-toggle:focus-visible,
.toolbar-join-cta:focus-visible,
.search-plus:focus-visible {
  outline: 3px solid rgba(47, 155, 87, 0.28);
  outline-offset: 2px;
}

.filter-toggle-close,
.compare-label-active {
  display: none;
}

body.filters-open .filter-toggle {
  background: var(--color-green-100);
  border-color: rgba(47, 155, 87, 0.42);
}

body.filters-open .filter-toggle-open,
body.compare-mode .compare-label-default {
  display: none;
}

body.filters-open .filter-toggle-close,
body.compare-mode .compare-label-active {
  display: inline;
}

.search-shell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  min-width: min(100%, 340px);
  flex: 0 1 430px;
  padding: 0 9px 0 18px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-white);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.search-icon {
  width: 21px;
  height: 21px;
  color: var(--color-navy-900);
  opacity: 0.76;
  flex: 0 0 auto;
}

.search-shell:hover:not(:focus-within) {
  border-color: rgba(16, 43, 78, 0.22);
  box-shadow: 0 8px 18px rgba(16, 43, 78, 0.06);
}

.search-shell input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-navy-900);
  background: transparent;
}

.search-shell input::placeholder {
  color: var(--color-muted-text);
}

.search-shell:focus-within {
  border-color: rgba(47, 155, 87, 0.72);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(47, 155, 87, 0.12);
}

.search-shell input:focus,
.search-shell input:focus-visible {
  outline: none;
}

.search-plus {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(47, 155, 87, 0.36);
  border-radius: 999px;
  background: var(--color-green-100);
  color: var(--color-green-700);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.search-plus:hover,
.search-plus:focus-visible {
  background: var(--color-green-600);
  color: var(--color-white);
  border-color: var(--color-green-600);
}

.search-plus:focus-visible {
  outline: 3px solid rgba(47, 155, 87, 0.28);
  outline-offset: 2px;
}

.toolbar-join-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 16px;
  max-width: 190px;
  border: 1px solid transparent;
  background: var(--color-green-600);
  color: var(--color-white);
  text-decoration: none;
  text-align: center;
  line-height: 1.12;
  white-space: normal;
  box-shadow: 0 10px 20px rgba(47, 155, 87, 0.18);
  transition:
    background-color 170ms ease,
    color 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.toolbar-join-cta:hover {
  background: var(--color-green-700);
  color: var(--color-white);
  border-color: var(--color-green-700);
  box-shadow: 0 12px 24px rgba(35, 122, 69, 0.22);
  transform: translateY(-1px);
}

.sort-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: min(100%, 330px);
  min-height: 52px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: visible;
  background: var(--color-white);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sort-trigger {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 15px 0 0 15px;
  background: var(--color-white);
  padding: 0 16px;
  color: var(--color-navy-900);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  font-synthesis-weight: none;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.sort-trigger:hover,
.sort-trigger.is-active {
  background: var(--color-green-100);
}

.sort-trigger:focus-visible {
  outline: none;
  background: var(--color-white);
}

.sort-trigger span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sort-direction-toggle {
  border: none;
  border-left: 1px solid var(--color-border);
  border-radius: 0 15px 15px 0;
  width: 42px;
  align-self: stretch;
  min-height: 52px;
  background: var(--color-white);
  color: var(--color-navy-800);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.sort-direction-toggle:hover {
  background: var(--color-green-100);
  border-left-color: rgba(47, 155, 87, 0.26);
}

.sort-direction-toggle:focus-visible {
  outline: none;
  background: var(--color-white);
  border-left-color: rgba(47, 155, 87, 0.26);
}

.sort-direction-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 140ms ease;
}

.sort-direction-toggle.is-asc .sort-direction-icon {
  transform: rotate(180deg);
}

.sort-direction-toggle.is-disabled {
  color: rgba(16, 43, 78, 0.42);
  cursor: default;
}

.sort-direction-toggle.is-disabled:hover {
  background: var(--color-white);
}

.sort-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 720px);
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(151, 170, 194, 0.42);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 48px rgba(16, 43, 78, 0.18);
}

.sort-popover.is-hidden {
  display: none;
}

.sort-section + .sort-section {
  margin-top: 16px;
}

.sort-section-heading {
  margin: 0 0 8px;
  color: rgba(16, 43, 78, 0.64);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sort-section-list {
  display: grid;
  gap: 6px;
}

.sort-option-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(151, 170, 194, 0.35);
  border-radius: 12px;
  background: #ffffff;
  color: var(--color-navy-900);
  font-family: "Public Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.sort-option-row:hover,
.sort-option-row:focus-visible {
  border-color: rgba(47, 155, 87, 0.42);
  background: var(--color-green-100);
  outline: none;
}

.sort-option-row.is-active {
  border-color: rgba(47, 155, 87, 0.62);
  background: #f2fbf5;
  color: var(--color-green-800);
}

.sort-option-icon {
  width: 24px;
  text-align: center;
}

.sort-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sort-option-check {
  color: var(--color-green-700);
  opacity: 0;
  font-weight: 700;
  text-align: center;
}

.sort-option-row.is-active .sort-option-check {
  opacity: 1;
}

.teaser-filters {
  display: none;
}

.filter-chip {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--color-navy-800);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.filter-chip span:not(.filter-chip-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip.is-active {
  border-color: rgba(47, 155, 87, 0.46);
  background: var(--color-green-100);
  color: var(--color-green-700);
}

.filter-chip-icon {
  flex: 0 0 auto;
}

.active-filter-summary {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 2px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(151, 164, 183, 0.26);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.28) transparent;
}

.active-filter-summary.is-hidden {
  display: none;
}

.active-filter-summary-label {
  flex: 0 0 auto;
  color: var(--color-muted-text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.active-filter-pill {
  flex: 0 0 auto;
  max-width: 260px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(47, 155, 87, 0.46);
  border-radius: 12px;
  background: var(--color-green-100);
  color: var(--color-green-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.active-filter-pill-icon,
.active-filter-pill-remove {
  flex: 0 0 auto;
}

.active-filter-pill-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-filter-pill-remove {
  font-size: 0.92em;
  font-weight: 700;
  opacity: 0.84;
}

.active-filter-pill:hover,
.active-filter-pill:focus-visible {
  border-color: rgba(47, 155, 87, 0.55);
  background: rgba(217, 238, 217, 0.96);
  outline: none;
}

.active-filter-clear {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid rgba(221, 64, 64, 0.5);
  border-radius: 12px;
  background: #ffffff;
  color: #e53935;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
}

.active-filter-clear span:first-child {
  font-size: 1.25rem;
  line-height: 1;
}

.active-filter-clear:hover,
.active-filter-clear:focus-visible {
  background: #fff7f7;
  border-color: rgba(221, 64, 64, 0.72);
  outline: none;
}

.grid-container {
  width: 100%;
  max-width: none;
  padding-inline: var(--page-gutter);
  background: var(--color-cream-50);
}

.listing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.listing-results {
  min-width: 0;
}

.grid-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0 0 16px;
}

.grid-meta p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 92px;
}

.home-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 8px 0 84px;
}

.home-load-more-status,
.city-grid-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.home-load-more-status:empty {
  display: none;
}

.home-load-more-sentinel {
  width: 100%;
  height: 1px;
}

.city-grid-empty {
  grid-column: 1 / -1;
  padding: 28px 0 96px;
  text-align: center;
}

.city-card-skeleton {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.58) 50%, rgba(255, 255, 255, 0) 70%),
    #d9d1c4;
  background-size: 220% 100%;
  animation: card-skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes card-skeleton-shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.city-card {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1 / 1;
  border-radius: var(--card-radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  transform: translateY(0) scale(1);
  transition: transform 180ms ease, box-shadow 220ms ease;
}

.card-image,
.mobile-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--color-navy);
}

.card-image {
  grid-area: 1 / 1 / -1 / -1;
}

.card-image.is-missing,
.mobile-card-image.is-missing {
  display: none;
}

.card-image.is-background-source,
.mobile-card-image.is-background-source {
  opacity: 0;
}

.city-card:focus-within {
  box-shadow:
    0 0 0 4px rgba(47, 155, 87, 0.32),
    var(--shadow-card);
}

.city-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(10, 25, 45, 0.25) 0%,
      rgba(10, 25, 45, 0.1) 45%,
      rgba(10, 25, 45, 0.7) 100%
    );
  pointer-events: none;
}

.photo-credit {
  position: absolute;
  z-index: 7;
  max-width: calc(100% - 24px);
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  pointer-events: none;
  text-align: right;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.76);
}

.photo-credit a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: auto;
}

.photo-credit-muted {
  color: rgba(255, 255, 255, 0.58);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.28);
}

.photo-credit a:hover,
.photo-credit a:focus-visible {
  background: transparent;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.save-city-btn {
  position: absolute;
  z-index: 4;
  top: 11px;
  right: 11px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  transition: opacity 160ms ease, transform 160ms ease, color 160ms ease;
}

.save-city-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: transparent;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55));
  transition: fill 160ms ease, stroke 160ms ease, transform 160ms ease;
}

.save-city-label {
  display: none;
}

.city-card:hover .save-city-btn,
.compare-city-panel:hover .save-city-btn,
.compare-city-panel:focus-within .save-city-btn {
  opacity: 1;
  transform: translateY(0);
}

.city-card .save-city-btn.is-saved,
.compare-city-panel .save-city-btn.is-saved {
  opacity: 0;
  transform: translateY(-2px);
}

.city-card:hover .save-city-btn.is-saved,
.compare-city-panel:hover .save-city-btn.is-saved,
.city-card:focus-within .save-city-btn.is-saved,
.compare-city-panel:focus-within .save-city-btn.is-saved {
  opacity: 1;
  transform: translateY(0);
}

.save-city-btn:hover:not(.is-saved),
.save-city-btn:focus-visible:not(.is-saved) {
  color: #ffffff;
  background: transparent;
}

.save-city-btn:hover:not(.is-saved) svg,
.save-city-btn:focus-visible:not(.is-saved) svg {
  fill: #ff4b4b;
  stroke: #ffffff;
  transform: scale(1.08);
}

.save-city-btn.is-saved {
  color: #ffffff;
  background: transparent;
}

.save-city-btn.is-saved svg {
  fill: #ff4b4b;
  stroke: #ffffff;
}

.save-city-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
  outline: 2px solid rgba(255, 255, 255, 0.76);
  outline-offset: 2px;
}

.save-city-btn.is-popping {
  animation: favorite-pop 300ms cubic-bezier(0.2, 0.85, 0.3, 1.35);
}

@keyframes favorite-pop {
  0% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(0) scale(0.78);
  }
  72% {
    transform: translateY(0) scale(1.16);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.card-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  color: white;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.48);
}

.card-front {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: stretch;
  opacity: 1;
  transform: scale(1);
  transition: opacity 180ms ease, transform 180ms ease;
}

.card-front > :not(.card-image) {
  position: relative;
  z-index: 1;
}

.mobile-city-card {
  display: none;
}

.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.card-link:focus-visible {
  outline: 3px solid rgba(47, 155, 87, 0.46);
  outline-offset: 4px;
  border-radius: var(--card-radius);
}

.card-top,
.card-bottom {
  display: flex;
  justify-content: space-between;
}

.card-top {
  align-items: flex-start;
  align-self: start;
}

.card-bottom {
  align-items: flex-end;
  align-self: end;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 13px;
  gap: 10px;
  min-width: 0;
}

.rank-wrap {
  display: flex;
  align-items: flex-start;
}

.price-top {
  margin: 0;
  font-size: clamp(0.98rem, 1.08vw, 1.06rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-align: right;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank {
  min-width: 46px;
  min-height: 46px;
  margin: -18px 0 0 -18px;
  padding: 11px 12px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 14px 0;
  background: rgba(16, 43, 78, 0.85);
  font-size: clamp(1.25rem, 1.42vw, 1.38rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.card-center {
  text-align: center;
  align-self: center;
  justify-self: center;
  width: 100%;
  margin: 0;
  padding: 0 clamp(8px, 4cqw, 16px);
}

.city-name {
  margin: 0;
  font-family: "Public Sans", sans-serif;
  font-size: clamp(1.62rem, 2vw, 1.9rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

.city-location {
  margin: 8px 0 0;
  font-size: clamp(0.92rem, 1.03vw, 1rem);
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-strip {
  margin: 0;
  font-size: clamp(1.08rem, 1.2vw, 1.24rem);
  letter-spacing: 0;
  line-height: 1.1;
  font-weight: 600;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.metric-left {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  white-space: nowrap;
  color: #eef4fb;
  font-weight: 600;
}

.metric-aqi {
  line-height: 1;
  font-size: clamp(0.84rem, 0.94vw, 0.94rem);
  letter-spacing: 0;
  opacity: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.aqi-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(16, 43, 78, 0.48);
  backdrop-filter: blur(4px);
  font-size: clamp(0.82rem, 0.92vw, 0.92rem);
  font-weight: 800;
}

.aqi-leaf {
  display: none;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  color: #eef4fb;
  opacity: 0.96;
}

.aqi-leaf svg {
  width: 100%;
  height: 100%;
  display: block;
}

.aqi-leaf path {
  fill: currentColor;
}

.aqi-label {
  letter-spacing: 0.01em;
}

.aqi-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.aqi-dot.aqi-good {
  background: #62d873;
}

.aqi-dot.aqi-moderate {
  background: #f3c34d;
}

.aqi-dot.aqi-sensitive {
  background: #ff7e00;
}

.aqi-dot.aqi-unhealthy {
  background: #e05a5a;
}

.aqi-dot.aqi-very-unhealthy {
  background: #8f3f97;
}

.aqi-dot.aqi-hazardous {
  background: #7e0023;
}

.aqi-dot.aqi-unknown {
  background: #8f9aa7;
}

.aqi-value {
  letter-spacing: 0;
  font-weight: 700;
}

.metric-temp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
  font-size: clamp(0.98rem, 1.08vw, 1.06rem);
  line-height: 1;
  letter-spacing: 0;
}

.weather-icon {
  width: clamp(1rem, 1.1vw, 1.12rem);
  height: clamp(1rem, 1.1vw, 1.12rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transform: translateY(1px);
}

.weather-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.temp-value {
  line-height: 0.95;
}

.card-hover {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: clamp(11px, 5.4%, 18px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 200ms ease;
  background:
    linear-gradient(to top, rgba(3, 7, 12, 0.92), rgba(3, 8, 14, 0.76) 58%, rgba(3, 8, 14, 0.58)),
    radial-gradient(circle at 20% 6%, rgba(255, 255, 255, 0.08), transparent 38%);
}

.city-card.is-hover-active .card-hover {
  opacity: 1;
}

.city-card.is-hover-active .card-front {
  opacity: 0;
  transform: scale(0.985);
}

.hover-modal-button-spacer {
  flex: 0 0 clamp(34px, 15%, 48px);
}

.hover-modal-button {
  position: absolute;
  z-index: 5;
  top: clamp(12px, 5.5%, 18px);
  left: clamp(11px, 5.4%, 18px);
  max-width: calc(100% - clamp(48px, 18%, 60px));
  min-height: clamp(34px, 13.5%, 46px);
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0 clamp(9px, 4.2%, 16px);
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 2.5%, 10px);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: "Inter", "Public Sans", sans-serif;
  font-size: clamp(0.8rem, 5cqw, 1.02rem);
  font-weight: 600;
  line-height: 1.12;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(3px);
  transform: translateY(3px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.city-card.is-hover-active .hover-modal-button,
.hover-modal-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hover-modal-button:hover,
.hover-modal-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.46);
}

.hover-modal-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .city-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 16px 34px rgba(16, 43, 78, 0.18);
  }

}

.hover-modal-icon {
  width: clamp(18px, 7.5cqw, 23px);
  height: clamp(18px, 7.5cqw, 23px);
  flex: 0 0 auto;
}

.hover-modal-icon svg,
.hover-metric-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hover-modal-icon path,
.hover-modal-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hover-modal-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hover-modal-arrow {
  margin-left: 1px;
  flex: 0 0 auto;
  font-size: clamp(1.24rem, 6cqw, 1.78rem);
  line-height: 0.7;
}

.hover-bars {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 3.8%, 12px);
  margin-top: 0;
  justify-content: center;
  flex: 1;
}

.hover-row {
  display: grid;
  grid-template-columns: clamp(24px, 10.6cqw, 30px) minmax(72px, 0.74fr) minmax(96px, 1.26fr);
  align-items: center;
  column-gap: clamp(6px, 2.4cqw, 9px);
  min-height: clamp(30px, 11.8cqw, 36px);
}

.hover-metric-icon {
  width: clamp(24px, 10.6cqw, 30px);
  height: clamp(24px, 10.6cqw, 30px);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--color-green-600);
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(4, 10, 17, 0.22);
}

.hover-metric-icon svg {
  width: clamp(15px, 6.6cqw, 19px);
  height: clamp(15px, 6.6cqw, 19px);
}

.hover-metric-icon path,
.hover-metric-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hover-label {
  font-family: "Inter", "Public Sans", sans-serif;
  font-size: clamp(0.9rem, 5.8cqw, 1.12rem);
  color: #ffffff;
  font-weight: 650;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hover-track {
  width: 100%;
  height: clamp(15px, 6.4cqw, 20px);
  border-radius: 999px;
  background: rgba(207, 216, 226, 0.42);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(7, 18, 31, 0.28);
}

.hover-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--metric-good);
  transition: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.hover-fill::after {
  content: attr(data-value);
}

.hover-fill.tone-good {
  background: var(--metric-good);
}

.hover-fill.tone-ok {
  background: var(--metric-ok);
}

.hover-fill.tone-bad {
  background: var(--metric-bad);
}

.hover-fill.tone-na {
  background: rgba(120, 138, 158, 0.5);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.64rem, 3.4cqw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0;
}

.hover-score {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(6, 15, 26, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(5, 12, 21, 0.16);
}

.hover-score[data-tone="good"] {
  border-color: rgba(58, 190, 128, 0.46);
}

.hover-score[data-tone="ok"] {
  border-color: rgba(232, 184, 67, 0.46);
}

.hover-score[data-tone="bad"] {
  border-color: rgba(225, 79, 79, 0.46);
}

@container (max-width: 260px) {
  .card-hover {
    padding: 10px;
  }

  .hover-modal-button {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 44px);
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .hover-modal-button-spacer {
    flex-basis: 32px;
  }

  .hover-bars {
    gap: 7px;
  }

  .hover-row {
    grid-template-columns: 26px minmax(58px, 0.68fr) minmax(68px, 1.32fr);
    column-gap: 6px;
    min-height: 29px;
  }

  .hover-metric-icon {
    width: 26px;
    height: 26px;
  }

  .hover-metric-icon svg {
    width: 16px;
    height: 16px;
  }

  .hover-label {
    font-size: 0.84rem;
  }

  .hover-track {
    height: 14px;
  }
}

.mobile-card-metric {
  min-width: 0;
}

.filter-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: min(560px, calc(100vw - 48px));
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  background: #f8fafc;
  border: none;
  border-right: 1px solid rgba(16, 43, 78, 0.12);
  border-radius: 0;
  box-shadow: 12px 0 30px rgba(7, 20, 35, 0.14);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: opacity 180ms ease, transform 180ms ease;
  transform: translateX(-102%);
}

.filter-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.filter-drawer header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.filter-drawer h2 {
  margin: 0;
  font-family: inherit;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--color-navy-900);
}

.filter-section-kicker {
  margin: 0 0 2px;
  color: var(--color-muted-text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-drawer header button {
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-navy-900);
  border-radius: 14px;
  padding: 0 16px;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.filter-drawer header button:hover,
.filter-drawer header button:focus-visible {
  background: var(--color-green-100);
  border-color: rgba(47, 155, 87, 0.42);
  outline: none;
}

.filter-caption {
  margin: -2px 0 0;
  color: var(--color-muted-text);
  font-size: 0.88rem;
}

#filter-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.filter-section {
  display: grid;
  gap: 12px;
}

.filter-section h3 {
  margin: 0;
  color: var(--color-navy-900);
  font-weight: 650;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 10px;
}

.filter-chip-grid .filter-chip {
  width: 100%;
  justify-content: center;
}

.mobile-show-results {
  display: none;
}

.compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 52;
  background: var(--color-navy-900);
  color: var(--color-white);
  text-align: center;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 28px rgba(16, 43, 78, 0.22);
}

.compare-bar p {
  margin: 0;
  font-weight: 800;
}

.paywall-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 53;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px 72px calc(16px + env(safe-area-inset-bottom)) 22px;
  background: rgba(16, 43, 78, 0.76);
  color: var(--color-white);
  box-shadow: 0 -14px 30px rgba(16, 43, 78, 0.24);
  backdrop-filter: blur(6px);
}

.paywall-cta-bar p {
  margin: 0;
  font-size: clamp(0.92rem, 1.7vw, 1.1rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.paywall-cta-action {
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--color-green-600);
  color: var(--color-white);
  font: inherit;
  font-weight: 800;
  line-height: 1;
  padding: 12px 20px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(21, 30, 43, 0.2);
  transition:
    background-color 170ms ease,
    color 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.paywall-cta-action:hover {
  background: var(--color-green-700);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(35, 122, 69, 0.24);
  transform: translateY(-1px);
}

.paywall-cta-close {
  position: absolute;
  top: 8px;
  right: 14px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.display-prefs-dock {
  position: fixed;
  left: var(--page-gutter);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 54;
  transition: bottom 180ms ease;
}

.display-prefs-dock.is-hidden {
  display: none;
}

body.city-page .display-prefs-dock {
  display: none;
}

.display-prefs-dock.is-lifted {
  bottom: calc(96px + env(safe-area-inset-bottom));
}

.display-prefs-shell {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 24px rgba(16, 43, 78, 0.12);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.display-pref-field {
  margin: 0;
}

.display-pref-field + .display-pref-field {
  border-left: 1px solid var(--color-border);
}

.display-pref-field select {
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-navy-900);
  font-family: "Public Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
  transition: background-color 140ms ease;
}

.display-pref-field select:hover:not(:focus-visible) {
  background: var(--color-green-100);
  color: var(--color-green-700);
}

.display-pref-field select:focus-visible {
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(47, 155, 87, 0.36);
}

.display-pref-field select:active {
  background: var(--color-green-100);
}

body.has-paywall-cta .card-grid {
  padding-bottom: 148px;
}

body.has-paywall-cta .city-detail {
  padding-bottom: 132px;
}

.compare-selected {
  outline: 6px solid rgba(47, 155, 87, 0.78);
  outline-offset: -6px;
  box-shadow: 0 18px 34px rgba(35, 122, 69, 0.26);
}

.compare-selected .save-city-btn:not(.is-saved) {
  color: #fff;
}

.compare-modal-card,
.route-modal-card {
  width: min(1180px, 100%);
  background: var(--bg);
  border-radius: 20px;
  box-shadow: 0 24px 50px rgba(8, 20, 34, 0.32);
  padding: 24px;
  position: relative;
  display: grid;
  gap: 18px;
}

.compare-modal-card h2,
.route-modal-card h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(1.8rem, 2.9vw, 2.4rem);
}

.route-modal-hero {
  border-radius: 16px;
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(rgba(7, 18, 31, 0.2), rgba(7, 18, 31, 0.64));
}

#city-route-modal .route-modal-card {
  padding: 0;
  gap: 0;
  overflow-x: hidden;
  background: var(--rcf-cream-100);
}

#city-route-modal .route-modal-hero {
  border-radius: 0;
  min-height: 286px;
  position: relative;
  align-items: center;
  padding: 38px 28px;
  overflow: hidden;
  color: var(--rcf-navy-900);
  background-position: center;
}

#city-route-modal .route-modal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(250, 249, 247, 0.96) 0%,
      rgba(250, 249, 247, 0.86) 22%,
      rgba(250, 249, 247, 0.52) 43%,
      rgba(250, 249, 247, 0.16) 64%,
      rgba(250, 249, 247, 0) 100%
    );
  pointer-events: none;
}

#city-route-modal .route-modal-hero-copy {
  position: relative;
  z-index: 1;
  max-width: min(460px, 52%);
}

#city-route-modal .route-modal-tabs {
  width: fit-content;
  max-width: calc(100% - 36px);
  margin: 14px 18px 0;
  padding: 6px;
  gap: 4px;
  border: 1px solid var(--rcf-border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(16, 43, 78, 0.12);
  position: relative;
  z-index: 2;
}

#city-route-modal .route-modal-tabs a,
#city-route-modal .route-modal-tabs button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  color: var(--rcf-navy-900);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
}

#city-route-modal .route-modal-tabs a.is-active,
#city-route-modal .route-modal-tabs button.is-active {
  background: var(--rcf-navy-900);
  color: var(--rcf-white);
  border-color: var(--rcf-navy-900);
  box-shadow: 0 8px 18px rgba(16, 43, 78, 0.18);
}

#city-route-modal .route-modal-tabs a:hover:not(.is-active),
#city-route-modal .route-modal-tabs button:hover:not(.is-active) {
  background: var(--rcf-green-50);
  color: var(--rcf-green-700);
  border-color: #cfe8d8;
}

#city-route-modal .route-modal-tabs a:active:not(.is-active),
#city-route-modal .route-modal-tabs button:active:not(.is-active) {
  color: var(--color-green-700);
  border-color: rgba(47, 155, 87, 0.42);
}

#city-route-modal .route-modal-body {
  padding: 12px 18px 24px;
  background: var(--rcf-cream-100);
}

#city-route-modal .modal-close {
  z-index: 3;
  top: 12px;
  right: 12px;
  color: rgba(16, 38, 58, 0.88);
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.72);
}

.route-modal-hero-copy p,
.route-modal-hero-copy h2 {
  margin: 0;
}

.route-modal-hero-copy p {
  margin-top: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--rcf-navy-800);
  opacity: 1;
}

.route-modal-hero-copy h2 {
  margin-top: 0;
  color: var(--rcf-navy-900);
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 0.95;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.route-modal-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.route-modal-tabs a,
.route-modal-tabs button {
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  color: #2f4358;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.route-modal-tabs a.is-active,
.route-modal-tabs button.is-active {
  color: var(--color-green-700);
  border-bottom-color: var(--color-green-600);
}

.route-modal-tabs a:hover:not(.is-active),
.route-modal-tabs button:hover:not(.is-active) {
  color: var(--color-green-700);
  border-bottom-color: var(--color-green-600);
}

.route-modal-tabs a:active:not(.is-active),
.route-modal-tabs button:active:not(.is-active) {
  color: var(--color-green-700);
  border-bottom-color: var(--color-green-600);
}

.route-modal-body {
  min-height: 260px;
}

.route-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.route-metric-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 8px;
}

.route-metric-card h3 {
  margin: 0;
  color: #51667e;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.route-metric-card p {
  margin: 0;
  color: #0f263a;
  font-size: 1.02rem;
  font-weight: 700;
}

.route-metric-note {
  margin: 0;
  color: #4b627a;
  font-size: 0.83rem;
}

.route-modal-skeleton {
  display: grid;
  gap: 10px;
}

.route-modal-skeleton span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf2f7 0%, #dfe8f1 50%, #edf2f7 100%);
  background-size: 240% 100%;
  animation: route-skeleton 1.2s ease infinite;
}

.route-modal-skeleton span:nth-child(1) {
  width: 92%;
}

.route-modal-skeleton span:nth-child(2) {
  width: 78%;
}

.route-modal-skeleton span:nth-child(3) {
  width: 86%;
}

.route-modal-shared {
  display: grid;
  gap: 22px;
}

.route-modal-shared .detail-section-context {
  margin: 0;
}

.route-modal-shared .detail-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.route-modal-shared .detail-template-columns {
  margin-top: 0;
}

#city-route-modal .route-modal-shared .detail-ledger-columns {
  gap: 24px;
}

#city-route-modal .route-modal-shared .detail-ledger-column {
  background: var(--rcf-white);
  border: 1px solid var(--rcf-border-soft);
  border-radius: var(--rcf-radius-xl);
  box-shadow: var(--rcf-shadow-md);
  overflow: hidden;
}

#city-route-modal .route-modal-shared .detail-ledger-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  min-height: 70px;
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--rcf-border-soft);
}

#city-route-modal .route-modal-shared .detail-ledger-card-title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

#city-route-modal .route-modal-shared .detail-ledger-card-title-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rcf-radius-pill);
  background: var(--rcf-green-600);
  color: var(--rcf-white);
  box-shadow: 0 8px 18px rgba(47, 155, 87, 0.18);
}

#city-route-modal .route-modal-shared .detail-ledger-card-title-icon.has-asset-icon {
  background: transparent;
  box-shadow: none;
}

#city-route-modal .route-modal-shared .detail-ledger-card-title-icon .detail-ledger-row-icon-svg,
#city-route-modal .route-modal-shared .detail-ledger-card-title-icon .detail-ledger-icon-img {
  width: 21px;
  height: 21px;
}

#city-route-modal .route-modal-shared .detail-ledger-card-title-icon.has-asset-icon .detail-ledger-icon-img {
  width: 36px;
  height: 36px;
}

#city-route-modal .route-modal-shared .detail-ledger-card-title {
  margin: 0;
  color: var(--rcf-navy-900);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
}

#city-route-modal .route-modal-shared .detail-ledger-card-score {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: 0 0 auto;
}

#city-route-modal .route-modal-shared .detail-ledger-card-score-label {
  color: var(--rcf-navy-700);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

#city-route-modal .route-modal-shared .detail-ledger-card-score-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--rcf-radius-pill);
  background: var(--rcf-green-600);
  color: var(--rcf-white);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

#city-route-modal .route-modal-shared .detail-ledger-shell[data-section="overview"] .detail-ledger-row.is-overview-header-metric {
  display: none;
}

#city-route-modal .route-modal-shared .detail-ledger-row {
  min-height: 54px;
  grid-template-columns: minmax(150px, 1fr) minmax(96px, max-content) minmax(118px, 26%);
  padding: 12px 24px;
  border-bottom: 1px solid var(--rcf-border-soft);
  column-gap: 18px;
  row-gap: 8px;
}

#city-route-modal .route-modal-shared .detail-ledger-row-text .detail-ledger-value {
  grid-column: 2 / 4;
  justify-self: end;
  text-align: right;
}

#city-route-modal .route-modal-shared .detail-ledger-label {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  color: var(--rcf-navy-900);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
}

#city-route-modal .route-modal-shared .detail-ledger-row-icon {
  color: var(--rcf-navy-700);
}

#city-route-modal .route-modal-shared .detail-ledger-row-icon,
#city-route-modal .route-modal-shared .detail-ledger-row-icon-svg,
#city-route-modal .route-modal-shared .detail-ledger-icon-img {
  width: 22px;
  height: 22px;
}

#city-route-modal .route-modal-shared .detail-ledger-value {
  justify-self: end;
  text-align: right;
  color: var(--rcf-navy-900);
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
}

#city-route-modal .route-modal-shared .detail-ledger-row[data-tone="good"] .detail-ledger-value {
  color: var(--metric-good-text);
}

#city-route-modal .route-modal-shared .detail-ledger-row[data-tone="ok"] .detail-ledger-value {
  color: var(--metric-ok-text);
}

#city-route-modal .route-modal-shared .detail-ledger-row[data-tone="bad"] .detail-ledger-value {
  color: var(--metric-bad-text);
}

#city-route-modal .route-modal-shared .detail-ledger-row.is-neutral-text-value .detail-ledger-value {
  color: var(--rcf-navy-900);
}

#city-route-modal .route-modal-shared .detail-ledger-track {
  height: 10px;
  background: var(--rcf-track);
  box-shadow: inset 0 1px 2px rgba(16, 43, 78, 0.06);
}

#city-route-modal .route-modal-shared .detail-ledger-track-fill {
  background: var(--metric-good);
  box-shadow: inset 0 -1px 0 rgba(11, 31, 58, 0.12);
}

#city-route-modal .route-modal-shared .detail-ledger-track-fill.tone-ok {
  background: var(--metric-ok);
}

#city-route-modal .route-modal-shared .detail-ledger-track-fill.tone-bad {
  background: var(--metric-bad);
}

#city-route-modal .route-modal-shared .detail-ledger-track-fill.tone-na {
  background: var(--rcf-muted-light);
}

#city-route-modal .route-modal-shared .detail-ledger-track-text,
#city-route-modal .route-modal-shared .detail-ledger-track-overlay-text,
#city-route-modal .route-modal-shared .detail-ledger-track-empty-text {
  font-size: 0.95rem;
  font-weight: 800;
}

#city-route-modal .route-modal-shared .detail-budget-breakdown {
  margin-top: 6px;
  border-color: var(--rcf-border);
  border-radius: var(--rcf-radius-md);
  background: linear-gradient(90deg, var(--rcf-green-50), var(--rcf-white));
  padding: 10px 12px;
}

.compare-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compare-city-panel {
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.compare-city-header {
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.compare-city-header p,
.compare-city-header h3 {
  margin: 0;
}

.compare-city-header p {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.94;
}

.compare-city-header h3 {
  font-family: "Newsreader", serif;
  font-size: 2rem;
  line-height: 1;
  margin-top: 6px;
}

.compare-city-metrics {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.compare-city-row {
  display: grid;
  grid-template-columns: minmax(128px, 40%) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.compare-city-label {
  color: #334c64;
  font-weight: 700;
  font-size: 0.92rem;
}

.compare-city-track {
  height: 28px;
  border-radius: 999px;
  background: var(--metric-track);
  overflow: hidden;
  position: relative;
}

.compare-city-track-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 999px;
  background: var(--metric-good);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.compare-city-track-fill.tone-ok {
  background: var(--metric-ok);
}

.compare-city-track-fill.tone-bad {
  background: var(--metric-bad);
}

.compare-city-track-fill.tone-na {
  background: rgba(122, 139, 158, 0.55);
}

.compare-city-track-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(7, 18, 31, 0.25);
  padding: 0 8px;
}

.compare-city-track-empty-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5f738b;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 23, 39, 0.56);
  z-index: 55;
}

.is-hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(7, 18, 31, 0.64);
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-backdrop:not(.is-hidden) {
  cursor: zoom-out;
}

.modal-backdrop:not(.is-hidden) .modal-card,
.modal-backdrop:not(.is-hidden) .compare-modal-card,
.modal-backdrop:not(.is-hidden) .route-modal-card {
  cursor: auto;
}

.compare-route-card {
  max-height: min(90vh, 920px);
  overflow: auto;
}

.route-modal-card {
  max-height: min(90vh, 920px);
  overflow-y: auto;
  transition: opacity 180ms ease, transform 180ms ease;
}

body.city-page-transitioning #city-route-modal .route-modal-card {
  opacity: 0;
  transform: translateY(8px) scale(0.995);
}

.compare-route-grid {
  overflow-x: hidden;
  padding-bottom: 2px;
}

.modal-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(16, 38, 58, 0.16);
  border-radius: 15px;
  box-shadow: 0 14px 32px rgba(7, 20, 35, 0.28);
  padding: 22px;
  position: relative;
  display: grid;
  gap: 14px;
}

@keyframes route-skeleton {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: none;
  background: transparent;
  font-size: 1.45rem;
  color: #435b75;
  cursor: pointer;
}

.modal-card h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(1.7rem, 3.1vw, 2.15rem);
  line-height: 1.05;
  color: #10263a;
}

.modal-card p {
  margin: 0;
  color: #435b75;
}

.notice {
  min-height: 18px;
  font-size: 0.88rem;
  color: #60758b;
  font-weight: 600;
}

.notice.error {
  color: var(--danger);
}

.modal-form {
  display: grid;
  gap: 8px;
}

.modal-form label {
  color: #10263a;
  font-size: 0.9rem;
  font-weight: 700;
}

.modal-form input {
  border: 1px solid #c9d8e6;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 1rem;
  background: #fff;
}

.modal-form button,
.primary-action,
.ghost-action,
#detail-lock-action,
.filter-toggle,
.compare-toggle,
#reset-filters {
  font: inherit;
}

.modal-form button,
.primary-action,
#detail-lock-action {
  border: 1px solid transparent;
  background: var(--color-green-600);
  color: var(--color-white);
  padding: 11px 12px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(47, 155, 87, 0.2);
  transition:
    background-color 170ms ease,
    color 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.modal-form button:hover,
.primary-action:hover,
#detail-lock-action:hover {
  background: var(--color-green-700);
  color: var(--color-white);
  border-color: var(--color-green-700);
  box-shadow: 0 10px 22px rgba(35, 122, 69, 0.22);
  transform: translateY(-1px);
}

.secondary-action {
  border: 1px solid #cad5e0;
  background: #fff;
  color: #29435b;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-action {
  border: 1px solid #bdd0e3;
  background: #fff;
  color: #1f4667;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.text-action {
  border: none;
  background: transparent;
  padding: 0;
  color: #2f5578;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  border-top: none;
  background: var(--color-cream-50);
  padding: 0 var(--page-gutter) 28px;
}

.site-footer .container {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--color-green-100);
  border: 1px solid #cfe8d8;
  border-radius: 16px;
}

.site-footer p {
  margin: 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-navy-900);
}

.site-footer p::before {
  content: "✓";
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--color-green-600);
  color: var(--color-white);
  font-weight: 800;
}

.city-detail {
  padding: 28px 0 54px;
  position: relative;
}

.back-link {
  text-decoration: none;
  color: #2e4764;
  font-weight: 700;
}

.city-detail h1 {
  margin: 14px 0 2px;
  font-family: "Newsreader", serif;
  font-size: clamp(2rem, 5vw, 3rem);
}

#detail-location {
  margin: 0 0 14px;
  color: #4b5e75;
  font-weight: 600;
}

.detail-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.detail-section-nav a {
  text-decoration: none;
  border: 1px solid #c9d7e5;
  border-radius: 10px;
  padding: 7px 11px;
  color: #355371;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-section-nav a.is-active {
  background: var(--color-green-100);
  color: var(--color-green-700);
  border-color: rgba(47, 155, 87, 0.42);
}

.detail-section-nav a:hover:not(.is-active) {
  background: var(--color-green-100);
  color: var(--color-green-700);
  border-color: rgba(47, 155, 87, 0.42);
}

.detail-section-nav a:active:not(.is-active) {
  color: var(--color-green-700);
  border-color: rgba(47, 155, 87, 0.42);
}

.detail-section-intro {
  margin: 0 0 16px;
  color: #506984;
}

.detail-section-context {
  margin: 0 0 14px;
  background: #fff;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.detail-section-context-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-section-context h2 {
  margin: 0;
  font-size: 1.1rem;
  font-family: "Public Sans", sans-serif;
}

.detail-section-updated {
  margin: 0;
  color: #6a8198;
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-section-summary,
.detail-section-takeaway {
  margin: 0;
  color: #415b74;
}

.detail-section-takeaway {
  font-weight: 700;
  color: #2d4762;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  transition: filter 180ms ease;
}

.detail-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.detail-card h2 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #52657d;
}

.detail-card p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.detail-template-columns {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  transition: filter 180ms ease;
}

.detail-rows-block {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.detail-rows-heading-wrap {
  display: flex;
  align-items: baseline;
}

.detail-rows-heading {
  margin: 0;
  font-size: 0.88rem;
  color: #52657d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-rows-grid .route-metric-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.detail-ledger-shell {
  margin-top: 0;
}

.detail-ledger-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-height: none;
  overflow: visible;
}

.metric-rating-legend {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(140px, 0.32fr);
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 43, 78, 0.06);
}

.metric-rating-legend-title,
.metric-rating-legend-note {
  margin: 0;
  color: #35516b;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.metric-rating-legend-note {
  border-left: 1px solid #d8e3ef;
  padding-left: 18px;
  color: #52657d;
  font-size: 0.74rem;
  font-weight: 700;
}

.metric-rating-legend-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-rating-legend-item {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
}

.metric-rating-legend-dot {
  width: 11px;
  height: 11px;
  margin-top: 2px;
  border-radius: 999px;
  background: #2f9b57;
}

.metric-rating-legend-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.metric-rating-legend-label {
  color: #1f3a54;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
}

.metric-rating-legend-description {
  color: #52657d;
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.1;
}

.metric-rating-legend-item[data-rating-band="excellent"] .metric-rating-legend-dot {
  background: var(--metric-excellent);
}

.metric-rating-legend-item[data-rating-band="very_good"] .metric-rating-legend-dot {
  background: var(--metric-very-good);
}

.metric-rating-legend-item[data-rating-band="good"] .metric-rating-legend-dot {
  background: var(--metric-good);
}

.metric-rating-legend-item[data-rating-band="moderate"] .metric-rating-legend-dot {
  background: var(--metric-ok);
}

.metric-rating-legend-item[data-rating-band="poor"] .metric-rating-legend-dot {
  background: var(--metric-bad);
}

.metric-rating-legend-item[data-rating-band="very_poor"] .metric-rating-legend-dot {
  background: var(--metric-very-bad);
}

@media (max-width: 980px) {
  .metric-rating-legend {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
  }

  .metric-rating-legend-note {
    border-left: 0;
    border-top: 1px solid #d8e3ef;
    padding: 12px 0 0;
  }

  .metric-rating-legend-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lifestyle-ledger-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .metric-rating-legend {
    padding: 12px;
  }

  .metric-rating-legend-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
  }

  .metric-rating-legend-label {
    font-size: 0.72rem;
  }

  .metric-rating-legend-description {
    font-size: 0.64rem;
  }

  .lifestyle-ledger-row-head {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .lifestyle-ledger-badge {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .lifestyle-ledger-note {
    margin-left: 31px;
  }
}

.detail-ledger-column {
  display: grid;
  gap: 0;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: #fff;
  overflow: visible;
}

.detail-ledger-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(142px, 38%) minmax(74px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e4ecf4;
}

.detail-ledger-row:last-child {
  border-bottom: none;
}

.detail-ledger-shell[data-section="climate"] .detail-ledger-row {
  grid-template-columns: minmax(142px, 0.9fr) minmax(0, 1.1fr) minmax(86px, 22%);
}

.detail-ledger-shell[data-section="climate"] .detail-ledger-value {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.detail-ledger-row.has-breakdown {
  align-items: start;
}

.detail-ledger-shell.is-text-only .detail-ledger-row {
  grid-template-columns: minmax(142px, 42%) minmax(0, 1fr);
}

.detail-ledger-row-text {
  align-items: center;
}

.detail-ledger-row-text .detail-ledger-value {
  grid-column: 2 / 4;
  justify-self: end;
  text-align: right;
}

.international-guide-groups {
  display: grid;
  gap: 18px;
}

.international-guide-group {
  display: grid;
  gap: 8px;
}

.international-guide-group-title {
  margin: 0;
  color: var(--rcf-ink);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
}

.international-guide-group-rows {
  display: grid;
  gap: 8px;
}

.detail-ledger-shell[data-section="international-retiree-guide"] .detail-ledger-row {
  grid-template-columns: minmax(180px, 44%) minmax(0, 1fr);
}

.detail-ledger-shell[data-section="international-retiree-guide"] .detail-ledger-value {
  grid-column: 2;
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.detail-ledger-shell[data-section="lifestyle-recreation"] .detail-ledger-row.is-long-text-value {
  grid-template-columns: 1fr;
  align-items: start;
}

.detail-ledger-shell[data-section="lifestyle-recreation"] .detail-ledger-row.is-long-text-value .detail-ledger-value {
  grid-column: 1;
  justify-self: start;
  max-width: 72ch;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.lifestyle-ledger-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.lifestyle-ledger-card,
.lifestyle-takeaway {
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.lifestyle-ledger-card-rows {
  display: grid;
}

.lifestyle-ledger-row {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border-top: 1px solid #e4ecf4;
}

.lifestyle-ledger-row-head {
  display: grid;
  grid-template-columns: 22px minmax(120px, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.lifestyle-ledger-icon,
.lifestyle-ledger-icon .detail-ledger-row-icon-svg {
  color: #334f68;
}

.lifestyle-ledger-label {
  min-width: 0;
  color: #334f68;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.lifestyle-ledger-badge {
  justify-self: end;
  max-width: 100%;
  border: 1px solid rgba(47, 155, 87, 0.24);
  border-radius: 999px;
  background: rgba(47, 155, 87, 0.08);
  color: var(--rcf-green-700, #207a45);
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.lifestyle-ledger-note {
  margin: 0 0 0 31px;
  max-width: 68ch;
  color: #415b74;
  font-size: 0.92rem;
  line-height: 1.45;
}

.lifestyle-takeaway {
  margin-top: 14px;
  padding: 16px;
}

.lifestyle-takeaway h2 {
  margin: 0 0 8px;
  color: var(--rcf-navy-900, #102b4e);
  font-family: "Public Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.lifestyle-takeaway p {
  margin: 0;
  max-width: 76ch;
  color: #2d4762;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.55;
}

.lifestyle-takeaway-summary {
  margin-bottom: 8px !important;
  color: #415b74 !important;
  font-weight: 600 !important;
}

@media (max-width: 980px) {
  .lifestyle-ledger-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .lifestyle-ledger-row-head {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .lifestyle-ledger-badge {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

.detail-ledger-label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #334f68;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.detail-ledger-row-icon,
.detail-ledger-row-icon-svg,
.detail-ledger-icon-img {
  width: 22px;
  height: 22px;
  color: currentColor;
}

.detail-ledger-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-ledger-icon-img {
  display: block;
  object-fit: contain;
}

.detail-ledger-label-text {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-ledger-label-text.has-tooltip {
  cursor: help;
}

.detail-ledger-label-text.has-tooltip:focus-visible {
  outline: 2px solid rgba(48, 107, 162, 0.35);
  outline-offset: 1px;
  border-radius: 6px;
}

.detail-ledger-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(280px, 70vw);
  border-radius: 10px;
  border: 1px solid #d6dfeb;
  background: #ffffff;
  color: #33495f;
  box-shadow: 0 14px 34px rgba(13, 30, 52, 0.16);
  padding: 9px 10px;
  display: grid;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 12;
}

.detail-ledger-tooltip::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 12px;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-left: 1px solid #d6dfeb;
  border-top: 1px solid #d6dfeb;
  transform: rotate(45deg);
}

.detail-ledger-tooltip-line a {
  color: #1d5d97;
  text-decoration: underline;
}

.detail-ledger-label-text.has-tooltip:hover .detail-ledger-tooltip,
.detail-ledger-label-text.has-tooltip:focus-within .detail-ledger-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.detail-ledger-column .detail-ledger-row:nth-last-child(-n + 4) .detail-ledger-tooltip {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(-4px);
}

.detail-ledger-column .detail-ledger-row:nth-last-child(-n + 4) .detail-ledger-tooltip::before {
  top: auto;
  bottom: -5px;
  border-left: none;
  border-top: none;
  border-right: 1px solid #d6dfeb;
  border-bottom: 1px solid #d6dfeb;
}

.detail-ledger-value {
  justify-self: start;
  text-align: left;
  color: #1f3246;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.detail-ledger-track {
  height: 10px;
  border-radius: 999px;
  background: var(--metric-track);
  overflow: hidden;
  position: relative;
}

.detail-ledger-track-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 999px;
  background: var(--metric-good);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.detail-ledger-track-fill.tone-ok {
  background: var(--metric-ok);
}

.detail-ledger-track-fill.tone-bad {
  background: var(--metric-bad);
}

.detail-ledger-track-fill.tone-na {
  background: rgba(122, 139, 158, 0.52);
}

.detail-ledger-track-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(7, 18, 31, 0.25);
  padding: 0 10px;
}

.detail-ledger-track-empty-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #5f738b;
  font-size: 0.88rem;
  font-weight: 700;
}

.detail-ledger-track-overlay-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1f3246;
  font-size: 0.88rem;
  font-weight: 700;
}

.detail-budget-breakdown {
  grid-column: 1 / -1;
  margin-top: 4px;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
}

.detail-budget-breakdown-summary {
  cursor: pointer;
  color: #2d4f72;
  font-size: 0.8rem;
  font-weight: 700;
  list-style: none;
}

.detail-budget-breakdown-summary::-webkit-details-marker {
  display: none;
}

.detail-budget-breakdown-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.detail-budget-breakdown-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #1f3246;
  font-size: 0.79rem;
  font-weight: 600;
}

.detail-budget-breakdown-label {
  color: #3e5b78;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.detail-budget-breakdown-value {
  color: #123a5f;
  font-weight: 700;
}

.detail-source-link.is-placeholder {
  text-decoration: none;
  cursor: default;
}

.detail-template-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid #d8e3ef;
}

.detail-template-card h2 {
  margin: 0 0 10px;
  color: #334d66;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-points-list,
.detail-sources-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.detail-points-list li,
.detail-sources-list li {
  border: 1px solid #e1e9f2;
  border-radius: 10px;
  padding: 10px;
  background: #fbfdff;
}

.detail-point-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.detail-point-label {
  color: #38516a;
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-point-value {
  color: #10263a;
  font-weight: 800;
}

.detail-point-note,
.detail-source-note {
  margin: 0;
  color: #55708b;
  font-size: 0.84rem;
}

.detail-source-link {
  color: #1f4e77;
  font-weight: 700;
  text-decoration: none;
}

.detail-source-meta {
  margin: 4px 0 0;
  color: #6b8198;
  font-size: 0.81rem;
}

.detail-lock {
  margin-top: 16px;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.detail-lock[hidden] {
  display: none !important;
}

.detail-lock h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: 1.55rem;
}

.detail-lock p {
  margin: 0;
  color: #4f6984;
}

#city-detail-root.is-locked .detail-grid {
  filter: blur(5px);
  pointer-events: none;
}

#city-detail-root.is-locked .detail-section-context,
#city-detail-root.is-locked .detail-template-columns,
#city-detail-root.is-locked .detail-ledger-shell {
  filter: blur(5px);
  pointer-events: none;
}

body.city-page {
  background: var(--rcf-cream-100);
  color: var(--rcf-navy-900);
}

.city-page .site-header {
  display: none;
}

.city-page .city-detail {
  padding: 0 0 62px;
  background: var(--rcf-cream-100);
}

.city-detail-shell {
  position: relative;
}

.city-hero {
  position: relative;
  background: var(--rcf-cream-100);
}

.city-hero-media {
  position: relative;
  min-height: 356px;
  background:
    linear-gradient(130deg, rgba(2, 14, 30, 0.22), rgba(2, 14, 30, 0.5)),
    url("https://images.unsplash.com/photo-1492571350019-22de08371fd3?auto=format&fit=crop&w=2400&q=80");
  background-size: cover;
  background-position: center;
}

.city-hero-photo-credit {
  right: var(--page-gutter);
  bottom: 12px;
}

.route-photo-credit {
  right: 14px;
  bottom: 14px;
}

#city-route-modal .route-photo-credit {
  right: 28px;
  bottom: 18px;
}

.city-hero-overlay {
  min-height: 356px;
  display: flex;
  align-items: center;
  padding: 96px var(--page-gutter) 54px;
  position: relative;
  background:
    linear-gradient(
      180deg,
      rgba(2, 14, 30, 0.5) 0%,
      rgba(2, 14, 30, 0.22) 42%,
      rgba(2, 14, 30, 0.5) 100%
    );
}

.city-hero-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 80px;
  padding: 14px var(--page-gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  z-index: 4;
}

.city-hero-topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  flex: 1 1 auto;
}

.city-hero-logo-menu .logo-menu-trigger {
  min-height: 72px;
  gap: 0;
  padding: 0 4px 0 0;
}

.city-hero-logo-menu .logo-mark {
  width: 58px;
  height: 58px;
}

.city-hero-logo-menu .logo-menu-trigger::after {
  content: none;
}

.city-page .city-hero-topbar .toolbar-caret {
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(16, 38, 58, 0.72));
}

.city-page .city-hero-topbar .logo-menu {
  top: calc(100% + 8px);
}

.city-hero-search {
  min-width: 0;
  flex: 1 1 auto;
  max-width: min(360px, 46vw);
}

.city-hero-search-shell {
  width: 100%;
  min-width: 0;
  border-color: var(--rcf-border);
  background: var(--rcf-white);
  box-shadow: 0 8px 18px rgba(16, 43, 78, 0.08);
}

.city-hero-search-submit {
  flex: 0 0 auto;
}

.city-hero-favorite-btn {
  position: static;
  top: auto;
  right: auto;
  width: auto;
  min-width: 104px;
  min-height: 50px;
  height: auto;
  padding: 0 18px;
  border-radius: var(--rcf-radius-md);
  border: 1px solid var(--rcf-green-600);
  background: var(--rcf-green-600);
  color: var(--rcf-white);
  opacity: 1;
  transform: none;
  text-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 10px 20px rgba(47, 155, 87, 0.22);
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 160ms ease;
}

.city-hero-favorite-btn.save-city-btn svg {
  display: none;
}

.city-hero-favorite-btn .save-city-label {
  display: inline;
  font-family: "Public Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.city-hero-favorite-btn.is-saved {
  color: var(--rcf-white);
  background: var(--rcf-green-700);
  border-color: var(--rcf-green-700);
}

.city-hero-favorite-btn:hover:not(.is-saved),
.city-hero-favorite-btn:focus-visible:not(.is-saved),
.city-hero-favorite-btn.is-saved:hover,
.city-hero-favorite-btn.is-saved:focus-visible {
  color: var(--rcf-green-700);
  background: var(--rcf-green-50);
  border-color: rgba(47, 155, 87, 0.42);
  box-shadow: none;
  transform: none;
}

.city-hero-favorite-btn:focus-visible {
  outline: 3px solid rgba(47, 155, 87, 0.28);
  outline-offset: 3px;
}

.city-hero-favorite-btn[aria-busy="true"] {
  opacity: 0.74;
  cursor: wait;
}

.city-hero-heading {
  width: min(1240px, 92vw);
  margin: 0 auto;
  text-align: center;
  color: var(--rcf-white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.52);
}

.city-page .back-link.city-hero-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: var(--page-gutter);
  top: 56%;
  width: 36px;
  height: 36px;
  margin: 0;
  color: var(--rcf-white);
  font-size: 0;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-50%);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.54);
}

.city-page .back-link.city-hero-back-link::before {
  content: "‹";
  font-family: "Public Sans", sans-serif;
  font-size: 2.75rem;
  line-height: 1;
}

.city-page .back-link.city-hero-back-link:hover,
.city-page .back-link.city-hero-back-link:focus-visible {
  color: var(--rcf-white);
  text-decoration: none;
}

.city-hero-heading #detail-name {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.75rem, 4.2vw, var(--rcf-text-4xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--rcf-white);
}

.city-hero-heading #detail-location {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--rcf-text-lg);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.city-detail-tabs-shell {
  position: relative;
  z-index: 4;
  margin-top: 0;
  padding: 14px 0 0;
  background: var(--rcf-cream-100);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.city-detail-tabs-inner {
  padding: 0;
  display: block;
}

.city-page .back-link {
  text-decoration: none;
  color: var(--rcf-navy-900);
  font-size: 0.95rem;
  font-weight: 600;
  width: fit-content;
}

.city-page .detail-section-nav.city-detail-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  margin: 0;
  max-width: 100%;
  padding: 6px;
  gap: 4px;
  border: 1px solid var(--rcf-border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(16, 43, 78, 0.08);
  pointer-events: auto;
}

.city-page .detail-section-nav.city-detail-tabs a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0 22px;
  color: var(--rcf-navy-900);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
}

.city-page .detail-section-nav.city-detail-tabs a:first-child {
  border-radius: 6px;
}

.city-page .detail-section-nav.city-detail-tabs a:last-child {
  border-radius: 6px;
}

.city-tab-icon,
.city-tab-icon-svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.city-page .detail-section-nav.city-detail-tabs a.is-active {
  color: var(--rcf-white);
  background: var(--rcf-navy-900);
  border-color: var(--rcf-navy-900);
  box-shadow: 0 8px 18px rgba(16, 43, 78, 0.18);
}

.city-page .detail-section-nav.city-detail-tabs a:hover:not(.is-active) {
  color: var(--rcf-green-700);
  background: var(--rcf-green-50);
  border-color: #cfe8d8;
}

.city-detail-content {
  padding-top: 28px;
  display: grid;
  gap: 22px;
  background: var(--rcf-cream-100);
}

.city-detail-content .detail-section-context {
  margin: 0;
}

.city-detail-content .detail-template-columns {
  margin-top: 0;
}

.city-page .detail-ledger-columns {
  gap: 24px;
}

.city-page .detail-ledger-column {
  background: var(--rcf-white);
  border: 1px solid var(--rcf-border-soft);
  border-radius: var(--rcf-radius-xl);
  box-shadow: var(--rcf-shadow-md);
  overflow: hidden;
}

.city-page .detail-ledger-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  min-height: 70px;
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--rcf-border-soft);
}

.city-page .detail-ledger-card-title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.city-page .detail-ledger-card-title-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rcf-radius-pill);
  background: var(--rcf-green-600);
  color: var(--rcf-white);
  box-shadow: 0 8px 18px rgba(47, 155, 87, 0.18);
}

.city-page .detail-ledger-card-title-icon.has-asset-icon {
  background: transparent;
  box-shadow: none;
}

.city-page .detail-ledger-card-title-icon .detail-ledger-row-icon-svg,
.city-page .detail-ledger-card-title-icon .detail-ledger-icon-img {
  width: 21px;
  height: 21px;
}

.city-page .detail-ledger-card-title-icon.has-asset-icon .detail-ledger-icon-img {
  width: 36px;
  height: 36px;
}

.city-page .detail-ledger-card-title {
  margin: 0;
  color: var(--rcf-navy-900);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
}

.city-page .detail-ledger-card-score {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: 0 0 auto;
}

.city-page .detail-ledger-card-score-label {
  color: var(--rcf-navy-700);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.city-page .detail-ledger-card-score-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--rcf-radius-pill);
  background: var(--rcf-green-600);
  color: var(--rcf-white);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.city-page .detail-ledger-shell[data-section="overview"] .detail-ledger-row.is-overview-header-metric {
  display: none;
}

.city-page .detail-ledger-row {
  min-height: 54px;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.1fr) minmax(104px, 22%);
  padding: 12px 24px;
  border-bottom: 1px solid var(--rcf-border-soft);
  column-gap: 18px;
  row-gap: 8px;
}

.city-page .detail-ledger-row-text .detail-ledger-value {
  grid-column: 2 / 4;
  justify-self: end;
  text-align: right;
}

.city-page .detail-ledger-label {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  color: var(--rcf-navy-900);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
}

.city-page .detail-ledger-row-icon {
  color: var(--rcf-navy-700);
}

.city-page .detail-ledger-row-icon,
.city-page .detail-ledger-row-icon-svg,
.city-page .detail-ledger-icon-img {
  width: 22px;
  height: 22px;
}

.city-page .detail-ledger-value {
  justify-self: end;
  text-align: right;
  color: var(--rcf-navy-900);
  font-size: 0.98rem;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.city-page .detail-ledger-row[data-tone="good"] .detail-ledger-value {
  color: var(--rcf-green-700);
}

.city-page .detail-ledger-row[data-tone="ok"] .detail-ledger-value {
  color: var(--rcf-gold-600);
}

.city-page .detail-ledger-row[data-tone="bad"] .detail-ledger-value {
  color: var(--rcf-red-600);
}

.city-page .detail-ledger-row.is-neutral-text-value .detail-ledger-value {
  color: var(--rcf-navy-900);
}

.city-page .detail-ledger-track {
  height: 10px;
  background: var(--rcf-track);
  box-shadow: inset 0 1px 2px rgba(16, 43, 78, 0.06);
}

.city-page .detail-ledger-track-fill {
  background: var(--rcf-green-600);
  box-shadow: inset 0 -1px 0 rgba(11, 31, 58, 0.12);
}

.city-page .detail-ledger-track-fill.tone-ok {
  background: var(--rcf-gold-500);
}

.city-page .detail-ledger-track-fill.tone-bad {
  background: var(--rcf-red-600);
}

.city-page .detail-ledger-track-fill.tone-na {
  background: var(--rcf-muted-light);
}

.city-page .detail-ledger-track-text,
.city-page .detail-ledger-track-overlay-text,
.city-page .detail-ledger-track-empty-text {
  font-size: 0.95rem;
  font-weight: 800;
}

.city-page .detail-budget-breakdown {
  margin-top: 6px;
  border-color: var(--rcf-border);
  border-radius: var(--rcf-radius-md);
  background: linear-gradient(90deg, var(--rcf-green-50), var(--rcf-white));
  padding: 10px 12px;
}

.city-page .detail-budget-breakdown-summary {
  color: var(--rcf-navy-800);
  font-size: 0.9rem;
  font-weight: 700;
}

.city-page .detail-section-context,
.city-page .detail-template-card,
.city-page .detail-lock {
  background: var(--rcf-white);
  border: 1px solid var(--rcf-border-soft);
  border-radius: var(--rcf-radius-xl);
  box-shadow: var(--rcf-shadow-md);
}

.city-page .detail-section-context {
  padding: 22px 24px;
}

.city-page .detail-section-context h2,
.city-page .detail-template-card h2 {
  color: var(--rcf-navy-900);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.55rem;
  letter-spacing: 0;
  text-transform: none;
}

.city-page .detail-section-summary,
.city-page .detail-section-takeaway {
  color: var(--rcf-navy-800);
  font-size: 1rem;
  line-height: 1.5;
}

.city-page .detail-section-takeaway {
  color: var(--rcf-green-700);
  font-weight: 800;
}

.profile-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.9) 0, rgba(250, 249, 247, 0.78) 34%, rgba(250, 249, 247, 0.92) 68%),
    linear-gradient(135deg, var(--rcf-cream-100) 0%, #faf9f7 48%, #f2f1ef 100%);
}

.profile-shell {
  min-height: 100vh;
  padding: 0 0 72px;
}

.profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  margin-bottom: 0;
  padding: 0 40px;
  background: var(--rcf-white);
  border-bottom: 1px solid var(--rcf-border-soft);
  box-shadow: var(--rcf-shadow-sm);
}

.profile-topbar .logo-menu-wrap {
  flex: 0 0 auto;
}

.profile-topbar .logo-menu-trigger {
  min-height: 56px;
  gap: 10px;
  padding: 0 8px 0 0;
}

.profile-topbar .logo-mark {
  width: 50px;
  height: 50px;
  border-radius: 12px;
}

.profile-topbar .toolbar-caret {
  color: var(--rcf-green-700);
  filter: none;
  margin-left: 0;
}

.profile-topbar .logo-menu-trigger:hover .toolbar-caret,
.profile-topbar .logo-menu-trigger:focus-visible .toolbar-caret,
.profile-topbar .logo-menu-trigger[aria-expanded="true"] .toolbar-caret {
  color: var(--rcf-green-700);
}

.profile-logo-wordmark {
  color: var(--rcf-navy-900);
  font-size: 1.56rem;
}

.profile-topbar .profile-topbar-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-topbar-link {
  color: var(--rcf-navy-900);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 160ms ease;
}

.profile-topbar-link:hover,
.profile-topbar-link:focus-visible {
  color: var(--rcf-green-700);
}

.profile-card {
  width: min(900px, calc(100% - 32px));
  margin: 56px auto 0;
  background: var(--rcf-white);
  border: 1px solid var(--rcf-border-soft);
  border-radius: 20px;
  box-shadow: var(--rcf-shadow-lg);
  padding: 38px 40px 32px;
  display: grid;
  gap: 0;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rcf-border-soft);
}

.profile-header-badge {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--rcf-green-100);
  color: var(--rcf-green-700);
  box-shadow: inset 0 0 0 1px rgba(47, 155, 87, 0.08);
}

.profile-header-badge svg,
.profile-field-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.profile-card-heading {
  min-width: 0;
}

.profile-card h1 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--rcf-navy-900);
}

.profile-card p {
  margin: 0;
  color: var(--rcf-navy-800);
  font-size: 1rem;
  line-height: 1.5;
}

.profile-card-heading p {
  margin-top: 12px;
  color: var(--rcf-navy-800);
}

.profile-status {
  min-height: 0;
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--rcf-navy-800);
  font-weight: 600;
}

.profile-status.is-error {
  color: var(--danger);
}

.profile-form {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

.profile-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-field-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.profile-field-icon {
  width: 48px;
  height: 48px;
  margin-top: 24px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--rcf-green-700);
  background: var(--rcf-green-50);
  box-shadow: inset 0 0 0 1px rgba(47, 155, 87, 0.08);
}

.profile-field-icon svg {
  width: 24px;
  height: 24px;
}

.profile-field label {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--rcf-navy-900);
}

.profile-field small {
  color: var(--rcf-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin-top: 4px;
}

.profile-field input,
.profile-field textarea {
  width: 100%;
  border: 1px solid var(--rcf-border);
  border-radius: 11px;
  padding: 0 14px;
  min-height: 48px;
  font-size: 1rem;
  font-family: "Public Sans", sans-serif;
  color: var(--rcf-navy-900);
  background: var(--rcf-white);
  box-shadow: inset 0 1px 2px rgba(16, 43, 78, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.profile-field textarea {
  min-height: 112px;
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}

.profile-field input:focus,
.profile-field textarea:focus {
  border-color: var(--rcf-green-600);
  box-shadow: 0 0 0 3px rgba(47, 155, 87, 0.15);
  outline: none;
}

.profile-field input[readonly],
.profile-field textarea[readonly] {
  background: #f4f7fa;
  color: var(--rcf-navy-800);
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 66px;
}

.profile-primary-action {
  border: none;
  background: var(--rcf-green-600);
  color: var(--rcf-white);
  border-radius: 12px;
  min-height: 46px;
  padding: 0 18px;
  font-family: "Public Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(47, 155, 87, 0.2);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.profile-primary-action:hover,
.profile-primary-action:focus-visible {
  background: var(--rcf-green-700);
  color: var(--rcf-white);
  outline: none;
  box-shadow: 0 10px 22px rgba(35, 122, 69, 0.2);
}

.profile-secondary-action {
  align-self: flex-start;
  border: 1px solid var(--rcf-border);
  background: var(--rcf-white);
  color: var(--rcf-navy-900);
  border-radius: 10px;
  min-height: 40px;
  margin-top: 10px;
  padding: 0 14px;
  font-family: "Public Sans", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.profile-secondary-action:hover,
.profile-secondary-action:focus-visible {
  border-color: var(--rcf-green-600);
  color: var(--rcf-green-700);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 155, 87, 0.12);
}

.profile-public-url {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin-top: 0;
  padding: 22px 0 0 66px;
  border-top: 1px solid var(--rcf-border-soft);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rcf-navy-800);
  overflow-wrap: anywhere;
}

.profile-public-url:empty {
  display: none;
}

.profile-public-url::before {
  content: "↗";
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--rcf-green-700);
  font-size: 1.2rem;
  line-height: 1;
  background: var(--rcf-green-50);
  box-shadow: inset 0 0 0 1px rgba(47, 155, 87, 0.08);
}

.profile-public-url a {
  color: var(--rcf-green-700);
  text-decoration: none;
  font-weight: 700;
}

.profile-public-url a:hover,
.profile-public-url a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .profile-topbar {
    min-height: 68px;
    padding: 0 18px;
    gap: 14px;
  }

  .profile-topbar .logo-menu-trigger {
    gap: 8px;
  }

  .profile-topbar .logo-mark {
    width: 46px;
    height: 46px;
  }

  .profile-logo-wordmark {
    font-size: 1.22rem;
  }

  .profile-topbar-link {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .profile-card {
    width: calc(100% - 32px);
    margin-top: 32px;
    padding: 24px;
    border-radius: 18px;
  }

  .profile-card-header {
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
  }

  .profile-header-badge {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .profile-header-badge svg {
    width: 26px;
    height: 26px;
  }

  .profile-card h1 {
    font-size: 1.9rem;
  }

  .profile-card-heading p {
    margin-top: 8px;
  }

  .profile-field-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .profile-field-icon {
    width: 44px;
    height: 44px;
  }

  .profile-form-actions,
  .profile-public-url {
    padding-left: 56px;
  }
}

@media (max-width: 520px) {
  .hero-community-avatars img {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .hero-community-avatars img + img {
    margin-left: -12px;
  }

  .profile-logo-wordmark {
    display: none;
  }

  .profile-topbar .toolbar-caret {
    margin-left: -8px;
  }

  .profile-card {
    width: calc(100% - 24px);
    padding: 22px;
  }

  .profile-card-header {
    display: grid;
  }

  .profile-field-row {
    grid-template-columns: 1fr;
  }

  .profile-field-icon {
    display: none;
  }

  .profile-form-actions,
  .profile-public-url {
    padding-left: 0;
  }

  .profile-public-url {
    align-items: flex-start;
  }
}

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

@media (max-width: 1280px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .home-page:not(.member-home) .toolbar-primary {
    flex: 1 1 100%;
  }

  .home-page:not(.member-home) .toolbar-secondary {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

@media (max-width: 1480px) {
  .member-home .toolbar-primary {
    flex: 1 1 100%;
  }

  .member-home .toolbar-secondary {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

@media (max-width: 1220px) {
  .toolbar-primary {
    flex: 1 1 100%;
  }

  .toolbar-secondary {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

@media (max-width: 1060px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding-bottom: 42px;
  }

  .hero-copy-wrap {
    justify-items: center;
  }

  .hero-community-proof {
    justify-items: center;
  }

  .hero-trust-list {
    justify-content: center;
  }

  .hero-auth-panel {
    width: min(350px, 86vw);
    margin-inline: auto;
    padding: 14px 14px 12px;
    gap: 8px;
  }

  .hero-panel-media {
    min-height: 170px;
    height: 170px;
  }

  .hero-auth-panel h2 {
    font-size: 1.58rem;
  }

  .hero-auth-panel p {
    font-size: 0.9rem;
  }

  .hero-auth-form input,
  .hero-auth-form button {
    padding: 9px 11px;
  }

  .sort-control {
    min-width: 280px;
  }

  .marketing-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-step-card:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 980px) {
  .toolbar-primary {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto minmax(220px, 1fr) minmax(148px, auto);
    align-items: center;
  }

  .search-shell {
    width: 100%;
    flex: none;
  }

  .toolbar-join-cta {
    min-height: 48px;
    max-width: 170px;
    padding-inline: 14px;
    font-size: 0.92rem;
  }
}

@media (max-width: 900px) {
  .home-page .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar-join-cta {
    display: none;
  }
}

@media (max-width: 820px) {
  .city-hero-overlay {
    padding-top: 78px;
    min-height: 390px;
  }

  .city-hero-media {
    min-height: 390px;
  }

  .city-hero-logo-menu .logo-mark {
    width: 58px;
    height: 58px;
  }

  .city-hero-search {
    max-width: min(280px, 56vw);
  }

  .city-hero-favorite-btn {
    min-width: 98px;
    min-height: 46px;
    padding: 0 12px;
  }

  .city-hero-favorite-btn .save-city-label {
    font-size: 0.98rem;
  }

  .city-hero-photo-credit {
    right: 14px;
    bottom: 10px;
    max-width: calc(100% - 28px);
  }

  .city-hero-heading #detail-location {
    font-size: 1rem;
  }

  .header-row {
    flex-wrap: wrap;
    align-items: center;
  }

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

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

  .listing-layout,
  body.filters-open .listing-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-right: none;
    border-radius: 0;
    border-left: none;
    box-shadow: none;
    padding: 18px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    transform: translateX(-100%);
    opacity: 1;
  }

  .filter-drawer.is-open {
    transform: translateX(0);
  }

  .mobile-show-results {
    position: sticky;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border: none;
    border-radius: 14px 14px 0 0;
    background: var(--color-green-600);
    color: var(--color-white);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    margin-top: auto;
    box-shadow: 0 -10px 22px rgba(35, 122, 69, 0.2);
  }
}

@media (max-width: 620px) {
  .home-page .card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .city-card {
    aspect-ratio: auto;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 31, 54, 0.12);
  }

  .city-card::after {
    display: none;
  }

  .card-link {
    height: auto;
    cursor: pointer;
  }

  .card-front,
  .card-hover,
  .hover-modal-button {
    display: none;
  }

  .mobile-city-card {
    display: block;
    overflow: hidden;
    border-radius: inherit;
    background: #ffffff;
    color: var(--color-navy);
    text-shadow: none;
  }

  .mobile-city-card-media {
    position: relative;
    min-height: 158px;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
  }

  .mobile-card-image {
    z-index: 0;
  }

  .mobile-city-card-media::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(
      180deg,
      rgba(10, 25, 45, 0) 0%,
      rgba(10, 25, 45, 0.34) 54%,
      rgba(10, 25, 45, 0.72) 100%
    );
    pointer-events: none;
  }

  .mobile-card-rank {
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 10px;
    min-width: 28px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 43, 78, 0.92);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
  }

  .mobile-card-aqi {
    position: static;
    z-index: 1;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ffffff;
    background: transparent;
    backdrop-filter: none;
    font-size: inherit;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.44);
  }

  .mobile-card-aqi-label {
    letter-spacing: 0;
  }

  .mobile-card-aqi-value {
    min-width: 1.25em;
    text-align: right;
  }

  .mobile-card-image-bottom {
    position: absolute;
    z-index: 1;
    right: 12px;
    bottom: 11px;
    left: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 9px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.58);
  }

  .mobile-card-temp,
  .mobile-card-cost {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }

  .mobile-card-cost {
    margin-left: auto;
    justify-content: flex-end;
    text-align: right;
  }

  .city-card .save-city-btn,
  .city-card .save-city-btn.is-saved {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    opacity: 1;
    transform: none;
    color: #ffffff;
    background: transparent;
  }

  .city-card .save-city-btn svg {
    width: 22px;
    height: 22px;
  }

  .mobile-city-card-body {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 18px 20px 14px;
  }

  .mobile-city-title {
    margin: 0 0 18px;
    color: var(--color-navy);
    font-family: "Public Sans", sans-serif;
    font-size: clamp(1.05rem, 5.8vw, 1.22rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .mobile-retiree-fit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
  }

  .mobile-card-label,
  .mobile-card-metric-label {
    color: var(--color-navy);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.25;
  }

  .mobile-fit-score-wrap {
    min-width: 82px;
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-content: end;
    column-gap: 4px;
    color: var(--color-navy);
    text-align: right;
  }

  .mobile-fit-score {
    color: var(--color-green-600);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 0.95;
  }

  .mobile-fit-scale {
    color: var(--color-navy);
    font-size: 0.86rem;
    font-weight: 700;
  }

  .mobile-fit-badge {
    grid-column: 1 / -1;
    margin-top: 4px;
    color: var(--color-green-600);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.1;
  }

  .mobile-card-metrics {
    display: grid;
    gap: 13px;
    margin: 0;
  }

  .mobile-card-metric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .mobile-card-metric-label {
    min-width: 0;
  }

  .mobile-card-metric-value {
    margin: 0;
    text-align: right;
    white-space: nowrap;
    color: var(--color-green-600);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .mobile-card-metric[data-tone="ok"] .mobile-card-metric-value,
  .mobile-fit-badge[data-tone="ok"] {
    color: #a56f09;
  }

  .mobile-card-metric[data-tone="bad"] .mobile-card-metric-value,
  .mobile-fit-badge[data-tone="bad"] {
    color: #b8463d;
  }

  .mobile-card-metric[data-tone="na"] .mobile-card-metric-value,
  .mobile-fit-badge[data-tone="na"] {
    color: var(--muted);
  }

  .mobile-card-cta {
    min-height: 40px;
    margin-top: 14px;
    border: 1px solid rgba(35, 122, 69, 0.48);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-green-700);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 16px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .city-card {
    max-width: none;
  }

  .hero-media {
    min-height: auto;
    background-image: url("/assets/hero-tropical-beach-poster.jpg");
  }

  .hero-overlay {
    min-height: auto;
    background: transparent;
  }

  .hero-content {
    padding-top: 54px;
    padding-bottom: 88px;
  }

  .hero-toolbar {
    margin-top: 0;
  }

  .hero-auth-panel h2 {
    font-size: 1.5rem;
  }

  .marketing-section {
    padding-top: 42px;
  }

  .marketing-section h2 {
    margin-bottom: 0;
    font-size: clamp(1.7rem, 8vw, 2.1rem);
  }

  .hero-premium .marketing-section-subtitle,
  .marketing-section-subtitle {
    margin-bottom: 20px;
    font-size: 0.94rem;
  }

  .marketing-card-grid {
    grid-template-columns: 1fr;
  }

  .marketing-step-card {
    min-height: 0;
    padding: 22px 18px 20px;
  }

  .hero-premium .marketing-step-card h3,
  .marketing-step-card h3 {
    font-size: 0.98rem;
  }

  .hero-premium .marketing-step-card p,
  .marketing-step-card p {
    max-width: none;
    color: var(--color-muted-text);
    font-size: 0.86rem;
    line-height: 1.5;
    text-shadow: none;
  }

  .listing-toolbar {
    gap: 10px;
    padding: 10px 0;
  }

  .toolbar-primary,
  .toolbar-secondary {
    flex-wrap: wrap;
    gap: 10px;
  }

  .toolbar-button,
  .sort-control,
  .search-shell {
    min-width: 0;
  }

  .sort-control {
    position: static;
  }

  .toolbar-secondary {
    position: relative;
  }

  .sort-popover {
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 190px);
  }

  .search-shell {
    flex: 1 1 200px;
  }

  .toolbar-join-cta {
    display: none;
  }

  .compare-route-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 2px;
  }

  .compare-route-tabs a,
  .compare-route-tabs button {
    padding: 7px 8px;
    font-size: 0.85rem;
  }

  .compare-route-card {
    width: min(100vw, 100%);
    height: min(96vh, 96vh);
    border-radius: 0;
    padding: 14px;
  }

  .route-modal-card {
    width: min(100vw, 100%);
    height: min(96vh, 96vh);
    border-radius: 0;
    padding: 14px;
    gap: 12px;
    overflow: auto;
  }

  .route-modal-hero {
    min-height: 140px;
    padding: 12px;
  }

  #city-route-modal .route-modal-card {
    padding: 0;
    gap: 0;
  }

  #city-route-modal .route-modal-hero {
    min-height: 234px;
    padding: 30px 22px 62px;
  }

  #city-route-modal .route-modal-hero-copy {
    max-width: min(420px, 62%);
  }

  #city-route-modal .route-modal-tabs {
    max-width: calc(100% - 28px);
    margin: -25px 14px 0;
    padding: 6px;
  }

  #city-route-modal .route-modal-body {
    padding: 10px 14px 14px;
  }

  #city-route-modal .route-modal-shared .detail-ledger-columns {
    grid-template-columns: 1fr;
    gap: 18px;
    max-height: none;
    overflow: visible;
  }

  #city-route-modal .route-modal-shared .detail-ledger-row,
  #city-route-modal .route-modal-shared .detail-ledger-shell.is-text-only .detail-ledger-row {
    grid-template-columns: minmax(150px, 1fr) minmax(92px, max-content) minmax(112px, 25%);
    min-height: 58px;
    padding: 13px 16px;
    gap: 8px 14px;
  }

  #city-route-modal .route-modal-shared .detail-ledger-card-header {
    padding: 16px;
  }

  #city-route-modal .route-modal-shared .detail-ledger-card-score {
    gap: 8px;
  }

  #city-route-modal .route-modal-shared .detail-ledger-label,
  #city-route-modal .route-modal-shared .detail-ledger-value {
    font-size: 0.95rem;
  }

  #city-route-modal .route-modal-shared .detail-ledger-track {
    height: 10px;
  }

  .route-modal-hero-copy h2 {
    font-size: clamp(2.1rem, 8vw, 3.1rem);
  }

  .route-metric-grid {
    grid-template-columns: 1fr;
  }

  .compare-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .compare-city-header {
    min-height: 124px;
    padding: 10px;
  }

  .compare-city-header p {
    font-size: 0.74rem;
  }

  .compare-city-header h3 {
    font-size: clamp(1.3rem, 6.2vw, 1.85rem);
    margin-top: 4px;
  }

  .compare-city-metrics {
    padding: 10px;
    gap: 8px;
  }

  .compare-city-row {
    grid-template-columns: minmax(112px, 40%) minmax(0, 1fr);
    gap: 8px;
  }

  .compare-city-label {
    font-size: 0.84rem;
    line-height: 1.2;
  }

  .compare-city-track {
    height: 24px;
  }

  .compare-city-track-text,
  .compare-city-track-empty-text {
    font-size: 0.76rem;
  }

  .paywall-cta-bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 56px calc(14px + env(safe-area-inset-bottom)) 14px;
  }

  .paywall-cta-bar p {
    width: 100%;
    font-size: 0.95rem;
  }

  .paywall-cta-action {
    width: 100%;
    max-width: 220px;
    justify-content: center;
    display: inline-flex;
  }

  .display-prefs-dock {
    left: 10px;
  }

  .display-prefs-dock.is-lifted {
    bottom: calc(138px + env(safe-area-inset-bottom));
  }

  .display-pref-field select {
    font-size: 0.88rem;
    min-height: 36px;
    padding: 0 10px;
  }
}

@media (max-width: 520px) {
  :root {
    --page-gutter: 12px;
  }

  .city-hero-topbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .city-hero-topbar-left {
    width: 100%;
  }

  .city-hero-logo-menu .logo-mark {
    width: 56px;
    height: 56px;
  }

  .city-hero-search {
    flex: 1 1 auto;
  }

  .city-hero-search-shell {
    width: 100%;
  }

  .city-hero-favorite-btn {
    margin-left: auto;
    min-height: 44px;
    min-width: 94px;
    padding: 0 12px;
  }

  .city-hero-favorite-btn .save-city-label {
    font-size: 0.94rem;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

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

  .hero-premium h1 {
    font-size: clamp(2rem, 9vw, 2.35rem);
  }

  .hero-premium p {
    font-size: 1.05rem;
  }

  .hero-search-card {
    min-height: 52px;
    padding-left: 14px;
  }

  .hero-search-card button {
    min-height: 38px;
    padding-inline: 14px;
    font-size: 0.85rem;
  }

  .hero-trust-list {
    gap: 10px 14px;
  }

  .hero-trust-list li {
    font-size: 0.88rem;
  }

  .hero-trust-list span {
    width: 18px;
    height: 18px;
  }

  .hero-auth-panel {
    width: min(100%, 360px);
  }

  .marketing-card-grid {
    grid-template-columns: 1fr;
  }

  .grid-container {
    padding-inline: 12px;
  }

  .logo-wordmark {
    display: none;
  }

  .toolbar-primary {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .toolbar-secondary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .logo-menu {
    min-width: 220px;
  }

  .filter-chip-grid {
    grid-template-columns: 1fr 1fr;
  }

  .paywall-cta-bar {
    padding-right: 44px;
  }

  .paywall-cta-action {
    max-width: none;
    width: 100%;
  }

  .display-prefs-dock {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .display-prefs-shell {
    width: 100%;
  }

  .display-pref-field {
    flex: 1 1 33%;
    min-width: 0;
  }

  .display-pref-field select {
    width: 100%;
    font-size: 0.84rem;
    padding: 0 8px;
  }

  .display-prefs-dock.is-lifted {
    bottom: calc(148px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 900px) {
  .detail-ledger-columns {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .detail-ledger-row {
    padding: 10px;
    grid-template-columns: minmax(128px, 1fr) minmax(74px, max-content) minmax(86px, 24%);
    gap: 8px 12px;
  }

  .detail-ledger-shell.is-text-only .detail-ledger-row {
    grid-template-columns: minmax(118px, 42%) minmax(0, 1fr);
  }

  .detail-ledger-label {
    font-size: 0.82rem;
  }

  .detail-ledger-value {
    font-size: 0.82rem;
  }

  .detail-ledger-track {
    height: 10px;
  }

  .detail-ledger-track-text,
  .detail-ledger-track-empty-text {
    font-size: 0.78rem;
  }

  .detail-budget-breakdown {
    padding: 7px 8px;
  }

  .detail-budget-breakdown-item {
    font-size: 0.74rem;
  }
}

@media (max-width: 520px) {
  .detail-ledger-row {
    grid-template-columns: minmax(96px, 1fr) minmax(64px, max-content) minmax(68px, 21%);
    gap: 8px 10px;
  }

  .detail-ledger-value {
    max-width: 110px;
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-primary,
  .toolbar-secondary {
    grid-template-columns: 1fr;
  }

  .search-shell,
  .sort-control,
  .toolbar-button,
  .toolbar-join-cta {
    width: 100%;
  }

  .logo-menu-wrap {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .city-page .city-hero-media,
  .city-page .city-hero-overlay {
    min-height: 340px;
  }

  .city-page .city-hero-overlay {
    padding-top: 118px;
  }

  .city-hero-logo-menu .logo-menu-trigger::after {
    font-size: 1.45rem;
  }

  .city-page .detail-section-nav.city-detail-tabs a {
    min-height: 50px;
    padding: 0 20px;
  }
}

@media (max-width: 980px) {
  .city-page .detail-ledger-columns {
    grid-template-columns: 1fr;
    gap: 18px;
    max-height: none;
    overflow: visible;
  }

  .city-page .detail-ledger-row,
  .city-page .detail-ledger-shell.is-text-only .detail-ledger-row {
    grid-template-columns: minmax(150px, 1fr) minmax(92px, max-content) minmax(112px, 25%);
    min-height: 58px;
    padding: 13px 16px;
    gap: 8px 14px;
  }

  .city-page .detail-ledger-card-header {
    padding: 16px;
  }

  .city-page .detail-ledger-card-score {
    gap: 8px;
  }

  .city-page .detail-ledger-label,
  .city-page .detail-ledger-value {
    font-size: 0.95rem;
  }

  .city-page .detail-ledger-track {
    height: 10px;
  }

  .city-page .detail-ledger-track-text,
  .city-page .detail-ledger-track-overlay-text,
  .city-page .detail-ledger-track-empty-text {
    font-size: 0.86rem;
  }
}

@media (max-width: 520px) {
  .city-page .city-hero-topbar {
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .city-page .city-hero-topbar-left {
    width: 100%;
    gap: 10px;
  }

  .city-hero-logo-menu .logo-menu-trigger::after {
    display: none;
  }

  .city-page .city-hero-search {
    max-width: none;
  }

  .city-page .city-hero-media,
  .city-page .city-hero-overlay {
    min-height: 330px;
  }

  .city-page .city-hero-overlay {
    padding-top: 148px;
    padding-bottom: 32px;
  }

  .city-hero-heading #detail-name {
    font-size: clamp(2rem, 10vw, 2.4rem);
  }

  .city-detail-content {
    padding-top: 20px;
  }

  .city-detail-tabs-shell {
    margin-top: 0;
    padding-top: 12px;
  }

  #city-route-modal .route-modal-tabs {
    margin-top: 12px;
  }

  .city-page .detail-section-nav.city-detail-tabs a {
    min-height: 48px;
    padding: 0 16px;
    font-size: 0.95rem;
  }

  #city-route-modal .route-modal-shared .detail-ledger-row,
  #city-route-modal .route-modal-shared .detail-ledger-shell.is-text-only .detail-ledger-row {
    grid-template-columns: minmax(112px, 1fr) minmax(72px, max-content) minmax(72px, 20%);
    gap: 8px 10px;
  }

  #city-route-modal .route-modal-shared .detail-ledger-value {
    max-width: 118px;
    white-space: normal;
  }

  .city-page .detail-ledger-row,
  .city-page .detail-ledger-shell.is-text-only .detail-ledger-row {
    grid-template-columns: minmax(112px, 1fr) minmax(72px, max-content) minmax(72px, 20%);
    gap: 8px 10px;
  }

  .city-page .detail-ledger-value {
    max-width: 118px;
    white-space: normal;
  }
}

.home-page:not(.city-page) .hero-premium :where(
  p,
  input,
  button,
  small,
  .notice,
  .hero-trust-list,
  .marketing-step-card,
  .marketing-step-card h3,
  .marketing-step-card p
),
.home-page:not(.city-page) .card-grid,
.home-page:not(.city-page) .card-grid .city-card,
.home-page:not(.city-page) .card-grid .city-card *,
.home-page:not(.city-page) .home-load-more,
.home-page:not(.city-page) .city-grid-empty,
.home-page:not(.city-page) .paywall-cta-bar,
.home-page:not(.city-page) .paywall-cta-bar * {
  font-family: "Public Sans", sans-serif;
}
