:root {
    --ink: #0f1410;
    --paper: #efe8d8;
    --mist: #cfc6b2;
    --gold: #c4a46a;
    --moss: #3f5c42;
    --alert: #b5523a;
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
    --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; min-height: 100%; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
}

.site-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 100dvh;
    background: var(--ink);
}

input, select, button, textarea { font: inherit; }

h1:focus { outline: none; }

.split {
    min-height: 100%;
}

.site-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: var(--ink);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 2rem 3rem;
    min-height: 22rem;
}

.hero-wash {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, #2a3a2c 0%, transparent 40%),
        linear-gradient(160deg, #141a15 0%, #0f1410 55%, #1a1610 100%);
}

.hero-grid {
    pointer-events: none;
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image:
        linear-gradient(#efe8d8 1px, transparent 1px),
        linear-gradient(90deg, #efe8d8 1px, transparent 1px);
    background-size: 48px 48px;
}

.hero-copy, .disclaimer { position: relative; }

.site-header {
    flex: 0 0 auto;
    z-index: 50;
    background: var(--ink);
    border-bottom: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--paper);
}

.nav-brand img {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.65rem;
    font-size: 13px;
}

.nav-links a {
    text-decoration: none;
    color: var(--gold);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.site-nav .nav-brand,
.site-nav.on-dark .nav-brand,
.site-nav.on-paper .nav-brand { color: var(--paper); }

.site-nav .nav-links a,
.site-nav.on-dark .nav-links a,
.site-nav.on-paper .nav-links a { color: var(--gold); }

.site-nav .nav-links a:hover,
.site-nav.on-dark .nav-links a:hover,
.site-nav.on-paper .nav-links a:hover {
    color: var(--paper);
}

.site-nav .nav-links a.active,
.site-nav.on-dark .nav-links a.active,
.site-nav.on-paper .nav-links a.active {
    color: var(--paper);
    border-bottom-color: var(--gold);
}

.page-shell {
    min-height: 100%;
    padding: 2rem 1.5rem 3rem;
}

.page-card {
    max-width: 32rem;
    margin: 2.5rem auto 0;
    background: var(--paper);
    color: var(--ink);
    border-radius: 16px;
    padding: 2rem 1.5rem 2.5rem;
}

.page-title {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin: 0.5rem 0 0;
}

.about {
    max-width: 38rem;
    margin: 3rem auto 0;
}

.about h1 {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.08;
    margin: 1rem 0 0;
}

.about h2 {
    margin: 2.25rem 0 0;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}

.about p, .about li {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--mist);
}

.about p { margin: 0.85rem 0 0; }

.about ul {
    margin: 0.85rem 0 0;
    padding-left: 1.15rem;
}

.about li + li { margin-top: 0.7rem; }

.about strong { color: var(--paper); font-weight: 600; }

.about-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 2rem 0 0;
}

.about-cta a { text-decoration: none; }

.already { max-width: 32rem; }

.location-block { margin-top: 0.25rem; }

.location-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.location-list li,
.location-list a,
.location-list .loc-main {
    display: block;
}

.location-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.45rem;
}

.location-row > a,
.location-row > .loc-main { min-width: 0; }

.location-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    padding: 0;
    border: 1px solid var(--mist);
    border-radius: 8px;
    background: transparent;
    color: var(--moss);
    cursor: pointer;
}

.icon-btn:hover,
.icon-btn:focus-visible {
    border-color: currentColor;
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.icon-btn:disabled { cursor: wait; opacity: 0.55; }
.icon-btn.danger { color: var(--alert); }
.icon-btn svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }

.location-confirm {
    margin-top: 0.4rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--gold);
    border-radius: 8px;
    background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.location-confirm p { margin: 0 0 0.55rem; font-size: 0.88rem; line-height: 1.4; }
.location-confirm > div { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; }

.confirm-btn {
    border: 0;
    border-radius: 6px;
    padding: 0.48rem 0.75rem;
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
}

.confirm-btn:disabled { cursor: wait; opacity: 0.65; }

.location-list a,
.location-list .loc-main {
    border: 1px solid var(--mist);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
    color: inherit;
}

.location-list a:hover { border-color: var(--moss); }

.location-list li.current .loc-main {
    border-color: var(--moss);
    background: color-mix(in srgb, var(--moss) 8%, transparent);
}

.location-list strong {
    display: block;
    font-size: 0.9rem;
}

.location-list span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: color-mix(in srgb, var(--ink) 65%, transparent);
}

.location-list em {
    display: inline-block;
    margin-top: 0.2rem;
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--moss);
}

.location-list li.paused em { color: var(--alert); }

@media (max-width: 430px) {
    .location-row { gap: 0.3rem; }
    .location-actions { gap: 0.2rem; }
    .icon-btn { width: 2.35rem; height: 2.35rem; }
}

.form-foot {
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.form-foot a { color: var(--moss); }

.text-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--moss);
    cursor: pointer;
    text-decoration: underline;
}

.submit.ghost {
    margin-top: 0.75rem;
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.submit.ghost:hover {
    background: var(--ink);
    color: var(--paper);
}

.unsub-block {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--mist);
}

.unsub-block .label { margin-top: 0; }

.eyebrow {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.gold { color: var(--gold); }
.moss { color: var(--moss); }

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.brand.center {
    flex-direction: column;
    gap: 0.9rem;
}

.brand img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 25%, transparent);
}

.brand.center img {
    width: 56px;
    height: 56px;
}

.hero h1 {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.05;
    max-width: 36rem;
    margin: 0;
}

.lede {
    max-width: 26rem;
    margin: 1.5rem 0 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--mist);
}

.now-in {
    position: relative;
    margin: 1.75rem 0 0;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
}

.city-roll {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-width: 28rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.city-roll a {
    display: inline-block;
    border: 1px solid color-mix(in srgb, var(--mist) 40%, transparent);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    color: var(--paper);
    font-size: 13px;
    text-decoration: none;
}

.city-roll a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.disclaimer {
    max-width: 22rem;
    margin: 4rem 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: color-mix(in srgb, var(--mist) 80%, transparent);
}

.site-footer {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 40;
    padding: 0.85rem 1.5rem 1rem;
    font-size: 12px;
    line-height: 1.5;
    background: #000;
    color: color-mix(in srgb, var(--mist) 78%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--gold) 18%, transparent);
}

.site-footer p { margin: 0; }

.site-footer p + p { margin-top: 0.35rem; }

.panel {
    background: var(--paper);
    color: var(--ink);
    padding: 5.75rem 1.5rem 3rem;
}

.signup { max-width: 32rem; margin: 0 auto; }

.signup h2 {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 2.25rem;
    margin: 0.5rem 0 0;
}

.hint {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.alert-section {
    min-width: 0;
    margin: 2rem 0 0;
    padding: 0.5rem 1rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--moss) 32%, var(--mist));
    border-radius: 10px;
    background: color-mix(in srgb, #fff 38%, transparent);
}

.alert-section legend {
    padding: 0 0.5rem;
    color: var(--moss);
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
}

.alert-description {
    margin: 0.15rem 0 1rem;
    color: color-mix(in srgb, var(--ink) 70%, transparent);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-section > .label:first-of-type { margin-top: 0; }
.alert-keywords { margin-top: 0; }

.banner {
    margin: 1.5rem 0 0;
    border-radius: 6px;
    background: #f3ddd6;
    color: var(--alert);
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
}

.banner.ok {
    background: #dce8dd;
    color: var(--moss);
}

.label {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plain {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chip {
    border: 1px solid var(--mist);
    background: transparent;
    color: inherit;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.chip.sm {
    padding: 0.4rem 0.75rem;
    font-size: 13px;
    line-height: 1.15;
    text-align: left;
}

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

.chip.on-ink {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.chip.on-moss {
    border-color: var(--moss);
    background: var(--moss);
    color: var(--paper);
}

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

.field { display: block; margin-top: 1rem; }

.field input, .field select, .suggest input {
    width: 100%;
    margin-top: 0.5rem;
    border: 1px solid var(--mist);
    background: #fff;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    outline: none;
}

.field input:focus, .field select:focus, .suggest input:focus {
    border-color: var(--ink);
}

.field input.ok { border-color: var(--moss); }
.field input.bad { border-color: var(--alert); }

.field input:disabled, .suggest input:disabled {
    background: #f4efe4;
    color: color-mix(in srgb, var(--ink) 45%, transparent);
    cursor: not-allowed;
}

.suggest { position: relative; margin-top: 0.5rem; }
.suggest input { margin-top: 0; }

.hits {
    position: absolute;
    inset-inline: 0;
    z-index: 10;
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    border: 1px solid var(--mist);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(15, 20, 16, 0.12);
}

.hits button {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}

.hits button:hover { background: #f4efe4; }

.city-hits {
    max-height: 16rem;
    overflow-y: auto;
}

.hits-more {
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
    color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.hits-google {
    display: flex;
    justify-content: flex-end;
    padding: 0.4rem 0.65rem 0.45rem;
    border-top: 1px solid var(--mist);
    background: #fff;
}

.hits-google img {
    display: block;
    height: 16px;
    width: auto;
}

.outside { margin-left: 0.5rem; color: var(--alert); font-size: 0.85em; }

.status {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.status.good { color: var(--moss); }
.status.bad { color: var(--alert); }

input[type="range"] {
    width: 100%;
    margin-top: 0.75rem;
    accent-color: var(--moss);
}

.submit {
    width: 100%;
    margin-top: 2rem;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    padding: 0.9rem 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.submit:hover { background: var(--moss); }
.submit:disabled { opacity: 0.5; cursor: wait; }

.thanks-card {
    max-width: 28rem;
    margin: 4rem auto 0;
    text-align: center;
}

.thanks-card h1 {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 3rem;
    margin: 1.5rem 0 0;
}

.thanks-card p {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--mist);
}

.about-cta .chip,
.about-cta .chip.on-moss {
    padding: 0.7rem 1.25rem;
    background: color-mix(in srgb, #0a0e0b 82%, transparent);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent);
    color: var(--gold);
    box-shadow: 0 8px 24px color-mix(in srgb, #000 35%, transparent);
    transform: scale(1);
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.about-cta .chip:hover,
.about-cta .chip.on-moss:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    transform: scale(1.06);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    background: var(--alert);
    color: #fff;
    padding: 0.75rem 1rem;
    z-index: 1000;
}

#blazor-error-ui.display-full, #blazor-error-ui.display-partial { display: block; }

@media (min-width: 960px) {
    .site-body:has(.split) {
        overflow: hidden;
    }

    .split {
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .site-nav { padding: 0.9rem 2.25rem; }
    .site-footer { padding: 0.85rem 2rem 1rem; }

    .hero {
        position: relative;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 3rem 4rem;
    }

    .panel {
        height: 100%;
        min-height: 0;
        overflow: auto;
        padding: 3rem 3.5rem 4rem;
    }

    .page-card { padding: 2.75rem 2.5rem 3rem; }
}
