/* City Grid defaults to dark; the theme toggle can select the light palette. */
:root {
    color-scheme: dark;
    --home-bg: #101410;
    --home-surface: #181e18;
    --home-ink: #f4f6ee;
    --home-muted: #a1aa9c;
    --home-line: #30382c;
    --home-accent: #c2ef79;
    --home-on-accent: #182511;
    --home-hover: #242e20;
    --home-active: #2d3c22;
}
:root[data-theme="light"] {
    color-scheme: light;
    --home-bg: #f5f2e9;
    --home-surface: #eeece2;
    --home-ink: #252b24;
    --home-muted: #606759;
    --home-line: #d0d5c6;
    --home-accent: #45683e;
    --home-on-accent: #fff;
    --home-hover: #e5e9da;
    --home-active: #e0e8d6;
}
* { box-sizing: border-box; }
body.homepage {
    margin: 0;
    background: var(--home-bg);
    color: var(--home-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--home-accent);
    outline-offset: 4px;
}
[hidden] { display: none !important; }
.site-nav {
    max-width: 1320px;
    margin: auto;
    padding: 28px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--home-line);
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 750; letter-spacing: -1px; }
.logo-mark { display: flex; align-items: center; gap: 3px; height: 25px; color: var(--home-accent); }
.logo-mark i { display: block; background: currentColor; width: 4px; border-radius: 3px; height: 10px; }
.logo-mark i:nth-child(2) { height: 22px; }
.logo-mark i:nth-child(3) { height: 16px; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-caption { font-size: 12px; letter-spacing: .04em; color: var(--home-muted); margin: 0; }
.nav-caption span { display: inline-block; width: 6px; height: 6px; background: var(--home-accent); border-radius: 50%; margin-right: 8px; }
.theme-toggle {
    display: flex; align-items: center; gap: 8px; min-height: 44px;
    border: 1px solid var(--home-line); border-radius: 8px;
    padding: 10px 13px; color: var(--home-ink); background: var(--home-surface); font-size: 12px;
}
.theme-toggle:hover { border-color: var(--home-accent); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.theme-moon { display: none; }
:root[data-theme="light"] .theme-sun { display: none; }
:root[data-theme="light"] .theme-moon { display: block; }
.main { max-width: 1320px; margin: auto; padding: 0 48px; }
.hero { padding: 62px 0 48px; display: flex; justify-content: space-between; gap: 70px; align-items: flex-end; }
.hero-copy { max-width: 660px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--home-accent); font-weight: 650; margin: 0; }
.hero h1 { font-size: clamp(40px, 5vw, 66px); line-height: 1.03; letter-spacing: -3px; font-weight: 550; margin: 17px 0 22px; }
.hero h1 em { font-style: normal; color: var(--home-accent); }
.hero-description { font-size: 15px; color: var(--home-muted); line-height: 1.7; max-width: 445px; margin: 0; }
.hero-aside { font-size: 12px; line-height: 1.6; color: var(--home-muted); max-width: 160px; padding-bottom: 4px; margin: 0; }
.hero-aside strong { font-size: 44px; line-height: 1.2; display: block; color: var(--home-ink); font-weight: 450; letter-spacing: -2px; }
/* Scope shared-search palette overrides to this homepage. */
.homepage .search-form { max-width: 680px; margin-bottom: 0; }
.homepage .search-form label { color: var(--home-muted); margin-bottom: 9px; }
.homepage .search-row { gap: 10px; }
.homepage .search-form input {
    background: var(--home-surface); color: var(--home-ink); border-color: var(--home-line);
    border-radius: 10px; padding: 15px 19px; min-height: 52px;
}
.homepage .search-form input::placeholder { color: var(--home-muted); opacity: 1; }
.homepage .search-form input:focus { border-color: var(--home-accent); outline: 2px solid var(--home-accent); outline-offset: 2px; }
.homepage .search-form button { background: var(--home-accent); color: var(--home-on-accent); border-radius: 10px; min-height: 52px; }
.homepage .search-form button:hover { filter: brightness(1.08); background: var(--home-accent); }
.homepage .search-suggestions { background: var(--home-surface); border-color: var(--home-line); box-shadow: 0 8px 24px #0003; }
.homepage .search-suggestions [role="option"] { color: var(--home-ink); }
.homepage .search-suggestions .suggestion-tag { color: var(--home-accent); }
.homepage .search-suggestions .suggestion-uncovered, .homepage .search-suggestions .suggestion-empty { color: var(--home-muted); }
.homepage .search-suggestions [role="option"]:hover { background: var(--home-hover); }
.homepage .search-suggestions [role="option"][aria-selected="true"] { background: var(--home-active); border-left-color: var(--home-accent); color: var(--home-ink); }
.browse-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 42px 0 22px; }
.browse-head h2 { font-weight: 550; font-size: 22px; letter-spacing: -.6px; margin: 0; }
.browse-head p { font-size: 12px; color: var(--home-muted); margin: 0; }
.region-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.region-tabs button { border: 1px solid var(--home-line); border-radius: 100px; background: transparent; font-size: 12px; padding: 10px 17px; color: var(--home-muted); min-height: 44px; }
.region-tabs button[aria-pressed="true"] { background: var(--home-accent); color: var(--home-on-accent); border-color: var(--home-accent); }
.city-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.city-list li { min-width: 0; }
.city-link {
    min-height: 164px; height: 100%; background: var(--home-surface); border: 1px solid var(--home-line);
    border-radius: 11px; display: flex; flex-direction: column; padding: 23px; position: relative;
    overflow: hidden; transition: background .16s, border-color .16s, transform .16s;
}
.city-link:hover { background: var(--home-hover); border-color: var(--home-accent); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--home-muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.city-link h3 { font-size: 22px; font-weight: 500; letter-spacing: -.6px; margin: 26px 0 7px; position: relative; z-index: 1; overflow-wrap: anywhere; }
.city-country { font-size: 11px; color: var(--home-muted); position: relative; z-index: 1; }
.arrow { font-size: 20px; color: var(--home-accent); flex: none; }
.skyline { position: absolute; bottom: 0; right: 0; width: 115px; height: 90px; fill: var(--home-accent); opacity: .06; pointer-events: none; }
.city-link:hover .skyline { opacity: .13; }
.empty-cities { grid-column: 1 / -1; border: 1px dashed var(--home-line); border-radius: 10px; text-align: center; padding: 50px 20px; }
.empty-cities h3 { font-size: 20px; font-weight: 500; margin: 0 0 12px; }
.empty-cities p { color: var(--home-muted); font-size: 14px; margin: 0; }
.footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 37px 0 30px; margin-top: 36px; border-top: 1px solid var(--home-line); font-size: 11px; color: var(--home-muted); }
.footer .logo { font-size: 16px; }
.footer p { margin: 0; line-height: 1.6; }
.footer a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1000px) {
    .city-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .main { padding: 0 32px; }
    .site-nav { padding: 24px 32px; }
    .nav-caption { display: none; }
}
@media (max-width: 700px) {
    .site-nav { padding: 20px 22px; }
    .main { padding: 0 22px; }
    .logo { font-size: 22px; }
    .theme-toggle { font-size: 11px; padding: 10px; }
    .hero { padding: 40px 0 29px; gap: 20px; }
    .hero h1 { font-size: 44px; letter-spacing: -2px; margin-top: 14px; line-height: 1.07; }
    .hero-description { font-size: 13px; }
    .hero-aside { display: none; }
    .eyebrow { font-size: 9px; }
    .homepage .search-form input { font-size: 14px; padding: 14px; }
    .homepage .search-form button { font-size: 13px; padding: 12px 16px; }
    .browse-head { margin-top: 30px; margin-bottom: 18px; }
    .browse-head h2 { font-size: 20px; }
    .browse-head p { font-size: 10px; }
    .region-tabs { gap: 6px; margin-bottom: 21px; }
    .region-tabs button { font-size: 11px; padding: 9px 12px; }
    .city-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .city-link { padding: 17px; min-height: 150px; }
    .city-link h3 { font-size: 19px; margin-top: 25px; letter-spacing: -.5px; }
    .city-country { font-size: 10px; }
    .card-top { font-size: 9px; letter-spacing: .06em; }
    .arrow { font-size: 17px; }
    .footer { padding: 28px 0; align-items: flex-start; font-size: 10px; gap: 16px; }
    .footer p { max-width: 220px; }
}
@media (max-width: 350px) {
    .main { padding: 0 16px; }
    .site-nav { padding: 18px 16px; }
    .hero h1 { font-size: 38px; }
    .city-link { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .city-link { transition: none; }
}

.last-city { flex: none; width: 300px; }
.last-city > .eyebrow { margin-bottom: 12px; }
.last-city .city-link { min-height: 0; }
.last-city-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.last-city h2 { min-width: 0; font-size: 26px; font-weight: 550; letter-spacing: -.6px; margin: 0; overflow-wrap: anywhere; }
@media (max-width: 1000px) {
    .hero { gap: 28px; }
    .last-city { width: 250px; }
}
@media (max-width: 800px) {
    .hero { flex-direction: column; align-items: stretch; }
    .last-city { width: 100%; max-width: 445px; }
    .last-city .city-link { min-height: 0; padding: 16px 18px; }
    .last-city h2 { font-size: 23px; }
}
