/* The landing page makes one choice; each search has its own working surface. */
[data-legacy-map-slot], [data-legacy-finder-slot] { display: none !important; }
/* Fit the visible viewport; the main area scales to the space left by navigation. */
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) {
  min-height: 100vh; min-height: var(--home-viewport-height, 100dvh); height: auto;
  padding-bottom: 0;
  display: grid; grid-template-rows: auto minmax(min-content, 1fr) auto; background: #fff;
}
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .masthead { background: #fff; }
html.street-page[data-appearance=modern] body.grid-site.street-site main.home-landing {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr) auto; container-type: inline-size;
  align-items: stretch; gap: 0; padding: 0; min-height: 0;
}
html.street-page[data-appearance=modern] body.grid-site.street-site .home-doorway {
  grid-column: 1 / -1; position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  flex: 1; min-height: 0;
  padding: 0 20px; background: #fff; border: 0; box-sizing: border-box;
}
html.street-page[data-appearance=modern] body.grid-site.street-site .home-doorway h1 {
  max-width: 760px; margin: 0 0 min(32px, calc(var(--home-content-height, 60dvh) * 0.04));
  font-family: var(--brand-font); font-weight: 800; line-height: 1.08;
  font-size: max(1.5rem, min(4.75rem, calc(var(--home-content-height, 60dvh) * 0.095), 11.3vw));
  letter-spacing: -.035em; text-wrap: balance;
}
.home-search-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 332px); gap: 12px; }
.home-search-intro { max-width: 38rem; margin: 0 0 min(24px, calc(var(--home-content-height, 60dvh) * 0.03)); color: #66666b; font-size: min(.875rem, max(12px, calc(var(--home-content-height, 60dvh) * 0.04))); line-height: 1.55; text-wrap: pretty; }
.home-search-intro span { display: block; }
html.street-page[data-appearance=modern] body.grid-site.street-site .home-search-paths a {
  display: inline-flex; align-items: center; justify-content: center; min-height: clamp(44px, calc(var(--home-content-height, 60dvh) * 0.08), 56px); min-width: 0;
  padding: min(14px, calc(var(--home-content-height, 60dvh) * 0.02)) min(16px, 2vw); border: 1px solid var(--accent); border-radius: 12px;
  background: var(--accent); color: white; font: 500 min(1rem, max(14px, calc(var(--home-content-height, 60dvh) * 0.04)))/1.4 var(--sans); text-decoration: none;
}
html.street-page[data-appearance=modern] body.grid-site.street-site .home-search-paths a:hover { background: var(--accent-ink); }
html.street-page[data-appearance=modern] body.grid-site.street-site .home-explore-prompt { margin: min(20px, calc(var(--home-content-height, 60dvh) * 0.03)) 0 0; font-size: min(.875rem, max(12px, calc(var(--home-content-height, 60dvh) * 0.04))); color: #66666b; }
html.street-page[data-appearance=modern] body.grid-site.street-site .home-shortcuts {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 0 max(24px, env(safe-area-inset-right)) min(8px, calc(var(--home-content-height, 60dvh) * 0.01)) max(24px, env(safe-area-inset-left));
}
html.street-page[data-appearance=modern] body.grid-site.street-site .home-shortcut {
  display: flex; flex-direction: column; align-items: center; gap: min(10px, calc(var(--home-content-height, 60dvh) * 0.02));
  width: 144px; min-width: 0; min-height: 44px; padding: 4px; border-radius: 16px;
  color: #515154; text-align: center; text-decoration: none;
}
.home-shortcut-icon {
  display: grid; place-items: center; width: clamp(32px, calc(var(--home-content-height, 60dvh) * 0.12), 56px); height: clamp(32px, calc(var(--home-content-height, 60dvh) * 0.12), 56px);
  border: 1px solid #d7dce0; border-radius: 16px; background: #fff; color: var(--accent-ink);
}
.home-shortcut-icon--shield { background: var(--accent-soft); border-color: #d7d7d7; color: var(--accent-ink); }
.home-shortcut-icon svg { width: clamp(18px, calc(var(--home-content-height, 60dvh) * 0.06), 28px); height: clamp(18px, calc(var(--home-content-height, 60dvh) * 0.06), 28px); }
.home-shortcut-label { font: 500 min(.8125rem, max(11px, calc(var(--home-content-height, 60dvh) * 0.03)))/1.4 var(--sans); max-width: 100%; overflow-wrap: anywhere; }
.home-shortcut:hover .home-shortcut-icon { background: var(--accent-soft); border-color: #979797; }
.home-shortcut:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) footer.home-footer {
  grid-row: 3;
  flex: none; justify-content: center; gap: 0 min(20px, 3vw); width: 100%; max-width: none; margin: min(48px, 5dvh) 0 0;
  padding: min(8px, 1dvh) min(20px, 4vw) max(8px, env(safe-area-inset-bottom));
  border: 0; border-top: 1px solid #e8e8ed; background: #fff;
}
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) footer.home-footer a {
  display: inline-flex; align-items: center; min-width: 44px; min-height: 32px; padding-block: 0;
  font-size: min(.75rem, max(10px, 2dvh)); line-height: 1.4; color: #66666b;
}
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) footer.home-footer .city-switch {
  flex-basis: auto;
}
/* Scale only the homepage header when the visible screen has little room. */
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .masthead .wordmark { font-size: min(2.85rem, 7dvh, 11.7vw); line-height: 1.2; }
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .masthead-brand > .masthead-note { font-size: min(.6875rem, max(8px, 2dvh), 2.6vw); }
html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) :is(.primary-nav a, .session-link, .page-menu > summary) { font-size: min(.875rem, max(12px, min(4dvh, 3.6vw))); line-height: 1.4; }
html.street-page[data-appearance=modern] body.grid-site.street-site main.list-search-page { padding-block: 0 36px; }
html.street-page[data-appearance=modern] body.grid-site.street-site .list-search-page .home-finder { padding-block: clamp(28px, 6vh, 64px); }
html.street-page[data-appearance=modern] body.grid-site.street-site .list-search-page .home-finder h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
html.street-page[data-appearance=modern] body.grid-site.street-site .search-switch { display: block; margin: 0 auto 20px; font-size: .875rem; color: var(--accent-ink); }
.list-search-page > .search-switch { grid-column: 1 / -1; }
html.street-page[data-appearance=modern] body.grid-site.street-site .list-search-page #home-search { max-width: 620px; }
html.street-page[data-appearance=modern] body.grid-site.street-site .list-search-page #home-locate { min-height: 64px; font-size: 1.125rem; }
html.street-page[data-appearance=modern] body.grid-site.street-site main.map-page {
  width: 100%; max-width: none; margin: 0; padding: 0; display: block;
  height: calc(100dvh - var(--search-header-height, 100px)); min-height: 0;
}
html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page .home-map-shell {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; height: 100%; min-height: 0; margin: 0; padding: 12px 16px 0; overflow: auto; box-sizing: border-box;
}
.map-page .map-topbar { flex-shrink: 0; }
.map-page .home-map-shell > :not(.home-map-stage) { flex-shrink: 0; }
.map-page .map-route-links { display: flex; gap: 20px; align-items: center; margin-bottom: 8px; }
.map-page .map-route-links h1 { font-size: 1.25rem; margin: 0 auto 0 0; }
.map-page .map-route-links a { font-size: .875rem; min-height: 44px; display: inline-flex; align-items: center; }
html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page .home-map-stage { flex: 1; min-height: 220px; border-radius: 16px; }
html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page #home-map { height: 100%; min-height: 220px; touch-action: none; }
html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page .map-list { flex-shrink: 0; margin: 8px 0 0; max-height: 45%; overflow: auto; background: #fff; }
html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page .map-list > summary { position: sticky; top: 0; background: #fff; z-index: 2; }
html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page .map-privacy { flex-shrink: 0; margin: 0; padding-bottom: env(safe-area-inset-bottom); }
.map-page .map-privacy[open] { max-height: 35%; overflow: auto; }
.map-page #save-status:empty { display: none; }
@media (max-height: 600px) and (min-width: 600px) {
  html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page .home-map-stage,
  html.street-page[data-appearance=modern] body.grid-site.street-site #main.map-page #home-map { min-height: 140px; }
}
@media (max-width: 420px) {
  html.street-page[data-appearance=modern] body.grid-site.street-site .home-doorway { padding-inline: 16px; }
}
@media (max-width: 760px) {
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .masthead .wordmark { font-size: min(2.2rem, 7dvh, 9vw); }
}
@media (max-height: 450px) {
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .masthead { min-height: 0; padding-block: 4px 0; }
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .masthead-brand { top: 0; gap: 0; }
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .primary-nav { margin-top: 0; }
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .primary-nav a { min-height: 32px; padding-block: 0; }
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) footer.home-footer { margin-top: min(8px, 2dvh); }
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) footer.home-footer a { min-height: 24px; }
}
@media (max-height: 450px) {
  .home-search-intro { font-size: min(.875rem, max(10px, calc(var(--home-content-height, 60dvh) * 0.04))); }
  html.street-page[data-appearance=modern] body.grid-site.street-site .home-explore-prompt { font-size: min(.875rem, max(10px, calc(var(--home-content-height, 60dvh) * 0.04))); }
  html.street-page[data-appearance=modern] body.grid-site.street-site .home-shortcuts { padding-inline: max(4vw, env(safe-area-inset-left), env(safe-area-inset-right)); }
  html.street-page[data-appearance=modern] body.grid-site.street-site .home-shortcut { flex-direction: row; justify-content: center; gap: 6px; }
  .home-shortcut-icon { flex-shrink: 0; }
  .home-shortcut-label { font-size: 10px; }
}
@media (max-width: 300px) {
  html.street-page[data-appearance=modern] body.grid-site.street-site:has(main.home-landing) .masthead .wordmark { font-size: min(2.2rem, 7dvh, 8vw); }
}
@media (forced-colors: active) {
  html.street-page[data-appearance=modern] body.grid-site.street-site .home-search-paths a { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
}

@media (forced-colors: active) {
  .home-shortcut-icon, .home-shortcut:hover .home-shortcut-icon { background: Canvas; color: LinkText; border-color: LinkText; }
  .home-shortcut:focus-visible { outline-color: Highlight; }
}
