/* Home Heads Up — hand-written, mobile-first, no framework. */
:root {
    --bg: #fdfcf9;
    --surface: #ffffff;
    --ink: #22303a;
    --muted: #5b6a75;
    --brand: #0f766e;
    --brand-ink: #ffffff;
    --accent: #f59e0b;
    --line: #e3e0d8;
    --focus: #1d4ed8;
    --radius: 12px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #131a20;
        --surface: #1b242c;
        --ink: #e8edf1;
        --muted: #9fb0bc;
        --brand: #2dd4bf;
        --brand-ink: #06302b;
        --line: #2c3843;
        --focus: #93c5fd;
    }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}
.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); }
h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.skip-link {
    position: absolute; left: -999px; top: 0;
    background: var(--surface); color: var(--ink); padding: 0.6rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand-mark { color: var(--brand); }
.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--brand); }

.hero { padding: 3rem 0 2.5rem; }
.hero h1 { margin: 0 0 0.6rem; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 38rem; }

.search-card, .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
    margin: 1.5rem 0;
}
.search-form { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.search-form label { flex-basis: 100%; font-weight: 600; }
.search-form input[type="search"] {
    flex: 1 1 16rem;
    font: inherit;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
}
.btn {
    display: inline-block;
    font: inherit; font-weight: 600;
    padding: 0.65rem 1.3rem;
    border-radius: 8px;
    border: none;
    background: var(--brand);
    color: var(--brand-ink);
    text-decoration: none;
    cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }

.feature-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding: 0; margin: 1.5rem 0; list-style: none; }
.feature-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.feature-grid h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.example-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.example-list li {
    background: var(--surface); border-left: 4px solid var(--brand);
    border-radius: 6px; padding: 0.6rem 0.9rem;
}

/* Pairs with .wrap on the same element — only add top spacing, never override
   .wrap's max-width or horizontal padding (that pushed crumbs out of the container). */
.breadcrumbs { padding-top: 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.35rem; padding: 0; margin: 0; font-size: 0.9rem; color: var(--muted); min-width: 0; }
.breadcrumbs li { display: inline-flex; align-items: baseline; min-width: 0; }
/* Long trailing crumbs (e.g. a full address) wrap instead of overflowing. */
.breadcrumbs li:last-child { overflow-wrap: anywhere; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.35rem; flex: none; }
.breadcrumbs a { color: var(--muted); }

article.prose, section.prose { max-width: 44rem; }
.prose h2 { border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }

table.data { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.97rem; }
table.data th, table.data td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.table-scroll { overflow-x: auto; }

ul.council-links { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.35rem 1.25rem; }
ul.council-links li { margin: 0; }

.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 99px; font-size: 0.8rem; font-weight: 600; }
.badge.automated { background: #d1fae5; color: #065f46; }
.badge.partially_automated { background: #fef3c7; color: #92400e; }
.badge.manual_only { background: #e5e7eb; color: #374151; }
@media (prefers-color-scheme: dark) {
    .badge.automated { background: #064e3b; color: #a7f3d0; }
    .badge.partially_automated { background: #78350f; color: #fde68a; }
    .badge.manual_only { background: #374151; color: #d1d5db; }
}

.uv-bands { list-style: none; padding: 0; display: grid; gap: 0.4rem; max-width: 34rem; }
.uv-bands li { display: flex; justify-content: space-between; padding: 0.5rem 0.9rem; border-radius: 8px; font-weight: 600; }
.uv-low { background: #a7f3d0; color: #064e3b; }
.uv-moderate { background: #fde68a; color: #713f12; }
.uv-high { background: #fdba74; color: #7c2d12; }
.uv-veryhigh { background: #fca5a5; color: #7f1d1d; }
.uv-extreme { background: #d8b4fe; color: #581c87; }

.faq dt { font-weight: 700; margin-top: 1.1rem; }
.faq dd { margin: 0.25rem 0 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); margin-top: 3.5rem; background: var(--surface); padding: 2rem 0 1.5rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.footer-brand { font-weight: 700; margin: 0 0 0.3rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.site-footer a { color: var(--ink); }
.attribution { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }

.store-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.2rem; }
.notice {
    border-left: 4px solid var(--accent);
    background: var(--surface);
    padding: 0.8rem 1rem; border-radius: 6px; margin: 1.25rem 0;
}
main { min-height: 55vh; padding-bottom: 2rem; }

/* --- Address autocomplete (combobox) --- */
.hhu-visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hhu-ac { position: relative; flex: 1 1 16rem; display: flex; }
.hhu-ac input[type="search"] { flex: 1 1 auto; width: 100%; }
.hhu-ac-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
    margin: 0; padding: 0.25rem; list-style: none;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    max-height: 20rem; overflow-y: auto;
}
.hhu-ac-opt {
    padding: 0.55rem 0.7rem; border-radius: 7px; cursor: pointer;
    font-size: 0.98rem; color: var(--ink); line-height: 1.35;
}
.hhu-ac-opt.is-active, .hhu-ac-opt:hover { background: var(--brand); color: var(--brand-ink); }

/* --- Bin-day result: coming-up list --- */
.headsup-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.headsup-list li {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem;
    padding: 0.7rem 0; border-bottom: 1px solid var(--line);
}
.headsup-list li:last-child { border-bottom: none; }
.headsup-date { font-weight: 700; min-width: 6.5rem; font-variant-numeric: tabular-nums; }
.headsup-bins { color: var(--muted); }
.feature-grid h3 .badge { vertical-align: middle; margin-left: 0.4rem; font-weight: 600; }

/* --- Today & tonight: weather + UV --- */
.today-metrics {
    list-style: none; padding: 0; margin: 0 0 1rem;
    display: grid; gap: 0.6rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}
.today-metrics li { display: flex; flex-direction: column; gap: 0.1rem; }
.metric-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.metric-value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.uv-pill { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 99px; font-size: 1.05rem; }

.headsup-nudges { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.headsup-nudges li {
    display: flex; flex-direction: column; gap: 0.15rem;
    border-left: 4px solid var(--brand); background: var(--bg);
    border-radius: 6px; padding: 0.6rem 0.9rem;
}
.headsup-nudges li.is-high { border-left-color: var(--accent); }
.headsup-nudges strong { font-weight: 700; }
.headsup-nudges span { color: var(--muted); font-size: 0.95rem; }
