/* Weather app — v4.
   Study-E aesthetic applied to the whole page: light atmospheric backdrop,
   glass tiles, cockpit-style readouts. Existing wx-tile chrome (in wx.css)
   kept intact; this file decorates the surrounding chrome + adds the new
   hero. */

/* ─────────────────────────────────────────────────────────────────
   Page surface — light atmospheric gradient
   ──────────────────────────────────────────────────────────────── */

body {
    background: url('clouds.avif') repeat fixed;
    color: var(--gray05);
    min-height: 100vh;
    position: relative;
}

.wx-page, .wx-header, footer.wx-footer, .tweaks-panel { position: relative; z-index: 1; }

.wx-page {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
}

.wx-page > .card { margin-top: 0; background: transparent; box-shadow: none; padding: 0; }

/* ─────────────────────────────────────────────────────────────────
   Panels — light glass treatment (HERO ONLY).
   Non-hero sections drop the chrome entirely and sit on the page bg.
   ──────────────────────────────────────────────────────────────── */

/* Hero panel — no chrome anymore, just content on the painterly sky bg. */
.panel.hero-panel {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 14px 18px 0;
    box-shadow: none;
    position: relative;
    overflow: visible;
}
.panel.hero-panel .bg-clouds { display: none; }

/* Non-hero panels: no chrome — just content on the page surface. */
.panel:not(.hero-panel) {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 8px 18px 16px;
    box-shadow: none;
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    flex-wrap: wrap;
}
.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.panel-title .panel-icon {
    color: hsl(220, 35%, 35%);
    width: 16px; height: 16px;
    display: inline-flex;
}
.panel-title h2 {
    font-size: var(--xl);
    margin: 0;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: hsl(220, 35%, 12%);
    line-height: 1;
}
.panel-title .panel-sub {
    font-family: var(--code);
    font-size: var(--sm);
    color: hsl(220, 15%, 38%);
    font-variant-numeric: tabular-nums;
}
.panel-meta {
    font-family: var(--code);
    font-size: 11px;
    color: hsl(220, 15%, 38%);
    font-variant-numeric: tabular-nums;
}
.panel-meta b { color: hsl(220, 35%, 12%); font-weight: 600; }

.panel-summary {
    font-size: var(--md);
    color: hsl(220, 25%, 18%);
    margin: -4px 0 14px;
    line-height: 1.45;
}
.panel-summary b { font-weight: 600; color: hsl(220, 35%, 12%); }

.panel-foot {
    color: hsl(220, 15%, 38%);
    font-size: var(--xs);
    line-height: 1.55;
    margin-top: 14px;
    max-width: 100ch;
}
.panel-foot b { color: hsl(220, 25%, 20%); }
.panel-foot a {
    color: hsl(220, 20%, 30%);
    font-family: var(--code);
    text-decoration: none;
    border-bottom: 1px dotted hsl(220, 15%, 55%);
}

/* ─────────────────────────────────────────────────────────────────
   Header (sticky)
   ──────────────────────────────────────────────────────────────── */

.wx-header {
    background: hsla(205, 35%, 90%, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: var(--md);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
}
.wx-wordmark {
    display: flex;
    align-items: baseline;
    gap: var(--xs);
    text-decoration: none;
    color: hsl(220, 35%, 12%);
}
.wx-wordmark .name { font-weight: 700; font-size: var(--lg); letter-spacing: -0.01em; }
.wx-wordmark .slash { color: hsl(220, 15%, 55%); font-weight: 400; }
.wx-wordmark .section { color: hsl(220, 20%, 32%); font-size: var(--md); }
.wx-header-spacer { flex: 1 1 auto; }

/* Buttons that live inside the airport-bar (geo-btn, refresh-btn). Override
   sea.css's default chunky button styling so they read as flush pills on the
   right edge of the input bar. */
.wx-airport-bar > button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    background: hsla(220, 25%, 96%, 0.6);
    border: none;
    border-left: 1px solid hsla(220, 15%, 70%, 0.4);
    border-radius: 0;
    color: hsl(220, 22%, 28%);
    font-family: 'Geist', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.wx-airport-bar > button:hover { background: hsla(220, 25%, 90%, 0.7); }
.wx-airport-bar > button:active { background: hsla(220, 25%, 86%, 0.85); }
.wx-airport-bar > button svg { flex: 0 0 auto; display: block; }
.wx-airport-bar > button span { line-height: 1; }

/* Spinner animation for the refresh icon. */
#refresh-btn.is-loading #refresh-icon { animation: wx-refresh-spin 0.8s linear infinite; }
@keyframes wx-refresh-spin { to { transform: rotate(360deg); } }

/* Pull-to-refresh indicator. Lives offscreen above the header; JS slides it
   into view as the user pulls down at the top of the page. */
.pull-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    transform: translateY(-100%);
    pointer-events: none;
    color: hsl(220, 30%, 25%);
    font-family: 'Geist', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    background: hsla(0, 0%, 100%, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid hsla(220, 15%, 70%, 0.3);
    transition: transform 0.25s cubic-bezier(.2,.7,.3,1);
}
/* While the user is actively dragging, we set the transform directly from JS,
   so transitions need to be off to follow the finger 1:1. */
.pull-refresh.dragging { transition: none; }
.pull-icon { transition: transform 0.2s ease-out; }
.pull-refresh.ready .pull-icon { transform: rotate(180deg); }
.pull-refresh.loading .pull-icon { animation: wx-refresh-spin 0.8s linear infinite; }

/* On narrow screens, drop the button labels so the input gets all the room. */
@media (max-width: 520px) {
    .wx-airport-bar > button span { display: none; }
    .wx-airport-bar > button { padding: 0 12px; }
}

.wx-airport-bar {
    display: flex;
    align-items: stretch;
    border: 1px solid hsla(220, 15%, 60%, 0.4);
    border-radius: 10px;
    background: hsla(0, 0%, 100%, 0.7);
    backdrop-filter: blur(8px);
    /* overflow:hidden previously clipped the rounded-corner contents — but it also
       clipped the suggestions dropdown that lives below the bar. Switch to position:relative
       so the dropdown can anchor here and overflow downward freely. */
    position: relative;
    min-width: 320px;
    max-width: 560px;
    flex: 1 1 auto;
}
.wx-airport-bar:focus-within {
    border-color: hsl(220, 60%, 50%);
    box-shadow: 0 0 0 3px hsla(220, 60%, 50%, 0.18);
}
.wx-airport-bar .selected {
    display: flex; flex-direction: column;
    padding: 6px 10px 6px 12px;
    border-right: 1px solid hsla(220, 15%, 70%, 0.4);
    background: hsla(220, 25%, 96%, 0.6);
    cursor: pointer;
    flex: 0 0 auto;
}
.wx-airport-bar .selected .id {
    font-family: var(--code);
    font-weight: 700;
    font-size: var(--md);
    line-height: 1;
    color: hsl(220, 35%, 12%);
}
.wx-airport-bar .selected .name {
    font-size: var(--xs);
    color: hsl(220, 15%, 40%);
    line-height: 1;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 16ch;
}
.wx-airport-bar input[type="text"] {
    border: none; background: transparent;
    padding: 6px 10px;
    font-family: var(--code);
    font-size: var(--sm);
    color: hsl(220, 25%, 18%);
    flex: 1 1 auto;
    outline: none;
    min-width: 0;
}
.wx-airport-bar input[type="text"]::placeholder { color: hsl(220, 15%, 55%); }
.wx-airport-bar .geo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    background: hsla(220, 25%, 96%, 0.6);
    border: none;
    border-left: 1px solid hsla(220, 15%, 70%, 0.4);
    color: hsl(220, 20%, 28%);
    font-size: var(--xs);
    cursor: pointer;
    border-radius: 0;
}
.wx-airport-bar .geo:hover { background: hsla(220, 25%, 90%, 0.7) !important; border-color: hsla(220, 15%, 70%, 0.4) !important; }

.wx-header-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: var(--sm);
}
.wx-header-links a {
    color: hsl(220, 20%, 30%);
    text-decoration: none;
    border-bottom: 1px dotted hsl(220, 15%, 60%);
    padding-bottom: 1px;
}
.wx-header-links a:hover { color: hsl(220, 35%, 12%); border-bottom-style: solid; }

/* ─────────────────────────────────────────────────────────────────
   HERO PANEL (Study-E design)
   ──────────────────────────────────────────────────────────────── */

/* hero panel has no chrome — the hero-panel rule above already sets transparent.
   This block is kept for the legacy gradient cleanup. */
.panel.hero-panel { background: transparent; }
.panel.hero-panel .bg-clouds {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

.hero-headline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.hero-headline .hero-id {
    font-family: var(--code);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: hsl(220, 35%, 12%);
}
.hero-headline .hero-cat-pill {
    font-family: var(--code);
    font-weight: 700;
    font-size: 18px;
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    line-height: 1;
    box-shadow: 0 4px 14px hsla(220, 60%, 30%, 0.25);
}
.hero-headline .hero-cat-pill[data-cond="vfr"]  { background: #15803d; box-shadow: 0 4px 14px hsla(140, 60%, 30%, 0.25); }
.hero-headline .hero-cat-pill[data-cond="mvfr"] { background: #1d4ed8; }
.hero-headline .hero-cat-pill[data-cond="ifr"]  { background: #b91c1c; box-shadow: 0 4px 14px hsla(5, 60%, 30%, 0.25); }
.hero-headline .hero-cat-pill[data-cond="lifr"] { background: #a21caf; box-shadow: 0 4px 14px hsla(295, 60%, 30%, 0.25); }
.hero-headline .hero-name-block {
    font-size: 15px;
    color: hsl(220, 25%, 20%);
    line-height: 1.3;
}
.hero-headline .hero-name-block .meta {
    display: block;
    font-family: var(--code);
    font-size: 11px;
    color: hsl(220, 15%, 38%);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.grid-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: hsl(40, 90%, 92%);
    border: 1px solid hsl(35, 80%, 55%);
    color: hsl(28, 70%, 25%);
    border-radius: 5px;
    font-family: var(--code);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: help;
    white-space: nowrap;
    font-weight: 600;
}
.grid-badge svg { color: hsl(28, 75%, 38%); flex: 0 0 auto; }

/* "Updated X min ago" — neutral green when an on-field METAR backs the hero. */
.grid-badge.is-fresh {
    background: hsl(140, 50%, 94%);
    border-color: hsl(140, 45%, 55%);
    color: hsl(150, 40%, 22%);
}
.grid-badge.is-fresh svg { color: hsl(150, 50%, 35%); }

/* When a hero value is pulled from a nearby reporting station's METAR (because
   the selected airport has no on-field obs), we append a small "(KSEA)" tag
   next to the value so the source is obvious at a glance. */
.hero-station-tag {
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 0.55em;
    font-weight: 500;
    color: hsl(220, 15%, 42%);
    margin-left: 5px;
    letter-spacing: 0.02em;
    vertical-align: 0.15em;
    font-variant-numeric: normal;
}

.hero-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    margin-top: 18px;
    position: relative;
    z-index: 1;
}

/* glass tile — shared by compass + gauge tiles */
.e-tile {
    background: hsla(0, 0%, 100%, 0.38);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid hsla(0, 0%, 100%, 0.5);
    border-radius: 16px;
    box-shadow:
        0 6px 22px hsla(220, 30%, 25%, 0.10),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.7),
        inset 0 -1px 0 hsla(220, 30%, 30%, 0.04);
}

.compass-tile {
    padding: 16px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.compass-tile #hero-compass svg { display: block; width: 260px; height: 260px; max-width: 100%; }
.compass-tile .compass-caption {
    font-family: var(--code);
    font-size: 11px;
    color: hsl(220, 15%, 35%);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    text-align: center;
}
.compass-tile .compass-caption b { color: hsl(220, 35%, 12%); font-weight: 700; }

.tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
}

.gauge-tile {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.gauge-tile .head,
.compass-tile .head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--code);
    font-size: 10.5px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: hsl(220, 15%, 35%);
    font-weight: 600;
}
.gauge-tile .head svg,
.compass-tile .head svg { color: hsl(220, 20%, 30%); }
/* Compass tile is otherwise center-aligned; keep its head pinned left to
   match the other stat tiles. */
.compass-tile .head { align-self: flex-start; margin-bottom: 4px; }
.gauge-tile .row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.gauge-tile .row .num {
    font-family: var(--code);
    font-size: 36px;
    font-weight: 700;
    line-height: 0.95;
    color: hsl(220, 35%, 12%);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.gauge-tile .row .num .u {
    font-size: 13px;
    color: hsl(220, 15%, 40%);
    font-weight: 400;
}
.gauge-tile .row .num.warn { color: hsl(28, 80%, 38%); }
.gauge-tile .sub {
    font-family: var(--code);
    font-size: 11px;
    color: hsl(220, 15%, 38%);
    font-variant-numeric: tabular-nums;
}
.cloud-pie { flex: 0 0 auto; margin-left: auto; }

/* horizontal visibility range bar */
.vis-bar-mini { width: 100%; margin-top: 4px; }
.vis-bar-mini .track {
    width: 100%; height: 6px;
    background: hsla(220, 15%, 60%, 0.18);
    border-radius: 3px;
    overflow: hidden;
}
.vis-bar-mini .fill {
    height: 100%;
    background: linear-gradient(90deg, hsl(140, 45%, 50%), hsl(140, 55%, 55%));
    border-radius: 3px;
}
.vis-bar-mini .axis {
    display: flex;
    justify-content: space-between;
    font-family: var(--code);
    font-size: 9px;
    color: hsla(220, 15%, 38%, 0.7);
    margin-top: 3px;
}

/* stacked-pair tiles (temp/dewpt and altim/density) */
.gauge-tile.temp .stack,
.gauge-tile.altim .stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    justify-content: center;
}
.gauge-tile.temp .stack .pair,
.gauge-tile.altim .stack .pair {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: baseline;
    gap: 12px;
}
.gauge-tile.temp .stack .pair .lbl,
.gauge-tile.altim .stack .pair .lbl {
    font-family: var(--code);
    font-size: 10px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: hsl(220, 15%, 42%);
    font-weight: 600;
}
.gauge-tile.temp .stack .pair .num,
.gauge-tile.altim .stack .pair .num {
    font-family: var(--code);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: hsl(220, 35%, 12%);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}
.gauge-tile.temp .stack .pair .num.dew { color: hsl(195, 50%, 32%); }
.gauge-tile.altim .stack .pair .num.da { color: hsl(220, 25%, 30%); }
.gauge-tile.temp .stack .pair .num .u,
.gauge-tile.altim .stack .pair .num .u {
    font-size: 12px;
    color: hsl(220, 15%, 40%);
    font-weight: 400;
}

/* hero bottom strip — hazards + sun */
.hero-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    margin-top: 14px;
    border-top: 1px solid hsla(220, 15%, 50%, 0.10);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.hazard-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hazard-chips .label {
    font-family: var(--code);
    font-size: 10px;
    letter-spacing: 0.10em;
    color: hsl(220, 15%, 35%);
    text-transform: uppercase;
    font-weight: 600;
    margin-right: 2px;
}
.hz-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: hsla(0, 0%, 100%, 0.65);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 500;
    color: hsl(220, 25%, 18%);
    border: 1px solid hsla(0, 0%, 100%, 0.55);
    box-shadow: 0 2px 8px hsla(220, 30%, 30%, 0.05);
    white-space: nowrap;
    font-family: var(--humanist);
}
.hz-chip[data-sev="moderate"] .dot { background: hsl(28, 90%, 55%); }
.hz-chip[data-sev="severe"]   .dot { background: hsl(5, 70%, 55%); }
.hz-chip[data-sev="obscure"]  .dot { background: hsl(220, 30%, 55%); }
.hz-chip[data-sev="ice"]      .dot { background: hsl(200, 55%, 50%); }
.hz-chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Sun-times row — two compact blocks (FAA day / FAA night start), wraps on
   narrow screens so it never runs off the right edge of the hero. */
.sun-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    font-family: var(--code);
    color: hsl(220, 15%, 35%);
    font-variant-numeric: tabular-nums;
}
.sun-bar .sun-block {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.sun-bar .sun-block .ico {
    color: hsl(35, 70%, 45%);   /* warm sunrise/sunset hue */
    flex: 0 0 auto;
}
.sun-bar .sun-block .lbl {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: hsl(220, 15%, 45%);
}
.sun-bar .sun-block .val {
    font-size: 12px;
    font-weight: 600;
    color: hsl(220, 35%, 12%);
}

/* ─────────────────────────────────────────────────────────────────
   Tile strips (forecast / TAF / nearby)
   ──────────────────────────────────────────────────────────────── */

.panel .wx-tiles {
    padding: 0;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 14px;
    scrollbar-width: thin;
    scrollbar-color: hsla(220, 15%, 60%, 0.6) transparent;
    gap: 10px;
}
.panel.hero-panel + * .wx-tiles { margin: 0 -18px; }
.panel .wx-tiles::-webkit-scrollbar { height: 8px; }
.panel .wx-tiles::-webkit-scrollbar-thumb { background: hsla(220, 15%, 60%, 0.6); border-radius: 4px; }
.panel .wx-tiles::-webkit-scrollbar-track { background: transparent; }

/* Refine the underlying wx-tile chrome — glass treatment matching the hero
   tiles. Inline TOD bg (now translucent) + backdrop-blur + soft border/shadow. */
.wx-tile {
    border-radius: 14px !important;
    border-width: 1px !important;
    border-style: solid !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
    box-shadow:
        0 4px 16px hsla(220, 30%, 25%, 0.08),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.45);
}

/* ─────────────────────────────────────────────────────────────────
   Hazard rows — glass cards
   ──────────────────────────────────────────────────────────────── */

.hazard-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.hazard-row {
    display: grid;
    grid-template-columns: 40px 110px 1fr 220px;
    gap: 14px;
    align-items: center;
    padding: 12px 16px 12px 8px;
    border-radius: 12px;
    background: hsla(0, 0%, 100%, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid hsla(0, 0%, 100%, 0.5);
    box-shadow:
        0 4px 14px hsla(220, 30%, 25%, 0.06),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.7);
}
.hazard-row .icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: white;
    margin-left: 6px;
    box-shadow: 0 2px 6px hsla(220, 30%, 25%, 0.15);
}
.hazard-row[data-sev="obscure"]  .icon { background: hsl(220, 35%, 50%); }
.hazard-row[data-sev="moderate"] .icon { background: hsl(28, 90%, 52%); }
.hazard-row[data-sev="severe"]   .icon { background: hsl(5, 70%, 48%); }
.hazard-row[data-sev="ice"]      .icon { background: hsl(200, 60%, 48%); }

.hazard-row .kind-block {
    display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.hazard-row .kind-block .kind {
    font-family: var(--code);
    font-size: 10px;
    letter-spacing: 0.10em;
    color: hsl(220, 20%, 28%);
    text-transform: uppercase;
    font-weight: 600;
}
.hazard-row .kind-block .sev {
    font-size: 11px;
    color: hsl(220, 15%, 38%);
    font-family: var(--code);
}
.hazard-row .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hazard-row .body .title { font-weight: 600; color: hsl(220, 35%, 12%); font-size: var(--md); }
.hazard-row .body .note { color: hsl(220, 20%, 28%); font-size: var(--sm); }
.hazard-row .timing {
    border-left: 1px solid hsla(220, 15%, 50%, 0.15);
    padding-left: 14px;
    display: flex; flex-direction: column; justify-content: center; gap: 3px;
    font-family: var(--code);
    font-variant-numeric: tabular-nums;
    font-size: var(--sm);
    color: hsl(220, 25%, 20%);
}
.hazard-row .timing .range { font-weight: 600; }
.hazard-row .timing .alt { color: hsl(220, 15%, 40%); font-size: var(--xs); }

.hazard-empty {
    display: flex; align-items: center; gap: 10px;
    color: hsl(220, 15%, 38%); font-size: var(--sm);
}
.hazard-empty .ok {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: hsl(140, 45%, 92%);
    color: hsl(140, 60%, 30%);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────
   Footer
   ──────────────────────────────────────────────────────────────── */

footer.wx-footer {
    padding: 14px 28px 28px;
    color: hsl(220, 15%, 38%);
    font-size: var(--xs);
    text-align: right;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}
footer.wx-footer a { color: hsl(220, 20%, 30%); }

/* ─────────────────────────────────────────────────────────────────
   Compact + split hero variants (Tweaks)
   ──────────────────────────────────────────────────────────────── */

.panel.hero-panel.compact .hero-body { grid-template-columns: 220px 1fr; }
.panel.hero-panel.compact .compass-tile #hero-compass svg { width: 200px; height: 200px; }

.panel.hero-panel .hero.split-cards { /* legacy class kept for the Tweaks split option, hidden in v4 */ display: none; }

/* ─────────────────────────────────────────────────────────────────
   Responsive
   ──────────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
    .hero-body { grid-template-columns: 1fr; gap: 14px; }
    .compass-tile #hero-compass svg { width: 220px; height: 220px; }
}
@media (max-width: 880px) {
    .panel { padding: 18px 18px 20px; }
    .panel .wx-tiles { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
    .tile-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .gauge-tile.temp .stack .pair, .gauge-tile.altim .stack .pair { grid-template-columns: 80px 1fr; }
    .hazard-row { grid-template-columns: 40px 110px 1fr; }
    .hazard-row .timing { display: none; }
}
@media (max-width: 720px) {
    .wx-header { padding: 10px 14px; }
    .wx-header-links { display: none; }
    .wx-airport-bar { min-width: 0; width: 100%; }
    .hero-headline .hero-id { font-size: 32px; }
    .hero-strip { flex-direction: column; align-items: flex-start; gap: 12px; }
    .panel { padding: 14px 16px 16px; }
    .panel .wx-tiles { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
    /* .sun-bar now wraps via its own flex-wrap rule — no track to size. */
}

/* ─────────────────────────────────────────────────────────────────
   Tweaks panel
   ──────────────────────────────────────────────────────────────── */

.tweaks-panel {
    position: fixed;
    right: 16px; bottom: 16px;
    width: 280px;
    background: hsla(0, 0%, 100%, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(220, 15%, 60%, 0.35);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    z-index: 50;
    font-family: var(--humanist);
    overflow: hidden;
    display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid hsla(220, 15%, 70%, 0.3);
    background: hsla(220, 25%, 96%, 0.5);
    cursor: grab;
}
.tweaks-panel header h3 { font-size: var(--sm); margin: 0; font-weight: 600; }
.tweaks-panel header button.close {
    border: none; background: transparent; padding: 0;
    font-size: 18px; cursor: pointer; color: hsl(220, 15%, 40%);
    line-height: 1; width: 22px; height: 22px;
}
.tweaks-panel .body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.tweaks-panel .section { display: flex; flex-direction: column; gap: 6px; padding: 0; }
.tweaks-panel .section .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: hsl(220, 15%, 45%);
    font-weight: 600;
}
.tweaks-panel .seg {
    display: flex;
    border: 1px solid hsla(220, 15%, 70%, 0.4);
    border-radius: 6px;
    overflow: hidden;
    background: hsla(220, 25%, 96%, 0.5);
}
.tweaks-panel .seg button {
    flex: 1 1 0;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-right: 1px solid hsla(220, 15%, 70%, 0.3);
    cursor: pointer;
    color: hsl(220, 20%, 28%);
    font-size: var(--xs);
    border-radius: 0;
}
.tweaks-panel .seg button:last-child { border-right: 0; }
.tweaks-panel .seg button:hover { background: hsla(220, 30%, 94%, 0.5) !important; }
.tweaks-panel .seg button.active {
    background: white !important;
    color: hsl(220, 35%, 12%);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px hsla(220, 15%, 70%, 0.4);
}
