/* WeatherPulse: shared application layout and weather views. */
@layer base, shell, weather, content, responsive, native;

@layer base {
  :root {
    color-scheme:light;
    --paper:#f3f5f7; --surface:#fff; --ink:#142b40; --muted:#586b7d;
    --line:#d9e1e8; --blue:#1263b7; --blue-soft:#eaf3fb;
    --nav:#142b40; --nav-ink:#f3f7fb; --nav-muted:#b1c3d4; --nav-active:#244a70;
    --space:clamp(20px,2.5vw,36px); --rail:216px; --header:68px;
    --safe-top:env(safe-area-inset-top,0px); --safe-bottom:env(safe-area-inset-bottom,0px);
    --safe-left:env(safe-area-inset-left,0px); --safe-right:env(safe-area-inset-right,0px);
    font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    font-synthesis:none;
  }
  :root[data-theme=dark] {
    color-scheme:dark; --paper:#0e1b29; --surface:#152536; --ink:#edf4fa;
    --muted:#a7b9cb; --line:#304456; --blue:#8acbff; --blue-soft:#203c54;
    --nav:#0b1a2a; --nav-active:#203e5c;
  }
  * { box-sizing:border-box; }
  body { margin:0;background:var(--paper);color:var(--ink);font-size:14px; }
  button,input,select { font:inherit; }
  button,a,input,select { -webkit-tap-highlight-color:transparent; }
  button { min-height:44px;color:inherit;cursor:pointer; }
  button:disabled { cursor:default;opacity:.6; }
  a { color:inherit;text-decoration:none; }
  h1,h2,h3,p { margin:0; }
  h1,h2,h3 { letter-spacing:-.025em;line-height:1.2;font-weight:650; }
  h1 { font-size:28px; } h2 { font-size:22px; } h3 { font-size:18px; }
  p { line-height:1.55; } svg { flex-shrink:0; }
  .icon { width:22px;height:22px;vertical-align:middle;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
  .sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }
  [hidden] { display:none!important; }
  :focus-visible { outline:3px solid #368ee0;outline-offset:3px; }
  .skip-link { position:fixed;left:12px;top:-100px;z-index:3000;background:var(--surface);padding:16px;border:1px solid var(--blue); }
  .skip-link:focus { top:12px; }
  .eyebrow { font-size:11px;line-height:1.4;letter-spacing:.08em;text-transform:uppercase;font-weight:700; }
  .muted { color:var(--muted); }
  .text-link { display:inline-flex;align-items:center;gap:8px;min-height:44px;color:var(--blue);font-weight:650;font-size:13px;line-height:1.45; }
  .text-link:hover { text-decoration:underline;text-underline-offset:3px; }
  .text-link .icon { width:18px;height:18px; }
  button.text-link { border:0;background:none;padding:0; }
  .button { display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--line);background:var(--surface);border-radius:4px;font-size:13px;font-weight:650; }
  .button:hover,.icon-button:hover { border-color:var(--blue);background:var(--blue-soft); }
  .button.primary { background:var(--blue);border-color:var(--blue);color:var(--surface); }
  [data-theme=dark] .button.primary { color:#102639; }
  .icon-button { display:grid;place-items:center;width:44px;height:44px;min-width:44px;flex-shrink:0;border:1px solid var(--line);border-radius:4px;background:var(--surface); }
  .first-paint { min-height:70vh;display:grid;place-content:center;gap:16px;text-align:center; }
  .loading-logo { display:block;max-width:100%;height:auto;margin-inline:auto;background:transparent; }
  .loading-view .loading-logo { margin:0 0 24px; }
}

@layer shell {
  .sidebar { position:fixed;inset:0 auto 0 0;width:var(--rail);padding:26px 16px 20px;background:var(--nav);color:var(--nav-ink);z-index:1100;display:flex;flex-direction:column; }
  .brand { display:flex;align-items:center;gap:8px;min-height:44px;font-size:18px;font-weight:750;letter-spacing:-.6px; }
  .brand img { width:34px;height:34px;object-fit:contain;border-radius:3px; }
  .brand-note { color:var(--nav-muted);font-size:11px;margin:7px 0 30px 3px;line-height:1.5; }
  .primary-nav { display:flex;flex-direction:column;gap:5px; }
  .nav-link { display:flex;align-items:center;gap:12px;padding:12px 14px;min-height:48px;font-size:14px;font-weight:600;border-radius:4px;color:var(--nav-muted);border-left:3px solid transparent; }
  .nav-link[aria-current=page] { background:var(--nav-active);color:var(--nav-ink);border-left-color:#69b5f4; }
  .nav-link:hover { background:var(--nav-active);color:var(--nav-ink); }
  .nav-link .icon { width:21px;height:21px; }
  .sidebar-footer { margin-top:auto;border-top:1px solid #ffffff26;padding-top:16px;font-size:11px;color:var(--nav-muted);line-height:1.8; }
  .sidebar-footer a { display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;text-underline-offset:3px; }
  .shell { margin-left:var(--rail);min-width:0; }
  .topbar { display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:0;z-index:1050;padding:calc(12px + var(--safe-top)) var(--space) 12px;min-height:calc(var(--header) + var(--safe-top));background:var(--surface);border-bottom:1px solid var(--line); }
  .topbar-page { font-size:13px;font-weight:700; }
  .topbar-page span { color:var(--muted);font-weight:450;padding-right:8px; }
  .topbar-tools { display:flex;align-items:center;gap:12px;min-width:0; }
  .location-button { border:0;background:none;display:flex;align-items:center;gap:8px;min-height:44px;max-width:360px;min-width:0;text-align:left;font-weight:650;font-size:13px; }
  .location-button>span { white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
  .location-button>.icon:first-child { width:18px;color:var(--blue); }
  .location-button>.icon:last-child { width:16px; }
  .mobile-nav { display:none; }
  #main { min-height:calc(100vh - var(--header));outline:none; }
  .page-content { max-width:1360px;margin:auto;padding:28px var(--space) 48px; }
  .page-heading { display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px; }
  .page-heading>div { min-width:0; }
  .page-heading .eyebrow { display:block;color:var(--blue);margin-bottom:6px; }
  .page-heading p { margin-top:8px;max-width:630px;color:var(--muted);font-size:13px; }
  .density { display:flex;align-items:center;padding:2px;background:var(--surface);border:1px solid var(--line);border-radius:4px;flex-shrink:0; }
  .density button { border:0;background:none;color:var(--muted);border-radius:2px;padding:8px 13px;min-height:44px;font-size:12px;font-weight:650; }
  .density button[aria-pressed=true] { background:var(--blue-soft);color:var(--blue); }
  [data-density=simple] .detail-only { display:none!important; }
  .notice { display:flex;align-items:center;gap:12px;padding:12px var(--space);background:var(--blue-soft);color:var(--ink);font-size:13px;line-height:1.5; }
  .notice button { margin-left:auto;flex-shrink:0; }
  .notice.warning { background:#fff0d4;color:#63450a; }
  .alert-strip { display:flex;align-items:center;justify-content:space-between;gap:12px;background:#942d24;color:#fff;padding:10px var(--space);font-size:14px;line-height:1.5; }
  .alert-strip .button { background:transparent;color:#fff;border-color:#ffffff90;flex-shrink:0; }
  .alert-strip .button:hover { background:#ffffff18; }
  .alert-detail { white-space:pre-line;font-size:14px;line-height:1.65;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:4px;margin-top:12px;overflow-wrap:anywhere; }
  dialog { width:min(550px,calc(100vw - 28px));max-height:85dvh;border:1px solid var(--line);border-radius:6px;padding:24px;background:var(--surface);color:var(--ink);box-shadow:0 16px 60px #00192e40; }
  dialog::backdrop { background:#0c223880; }
  .dialog-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px; }
  .dialog-heading h2 { font-size:22px; }
  .search-form { display:flex;gap:8px; }
  .search-form input { min-width:0;flex:1;width:100%;min-height:44px;background:var(--paper);border:1px solid var(--line);border-radius:4px;padding:10px 12px;color:var(--ink); }
  .search-status { color:var(--muted);font-size:13px;margin:12px 0;line-height:1.5; }
  .search-result { display:block;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);padding:12px 4px;min-height:56px; }
  .search-result:hover { background:var(--blue-soft); }
  .search-result strong,.search-result span { display:block; }
  .search-result span { font-size:12px;color:var(--muted);margin-top:4px; }
  .saved-location { display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line); }
  .saved-location>button:first-child { flex:1;min-width:0;text-align:left;border:0;background:none;min-height:44px;overflow-wrap:anywhere;font-size:13px; }
  .dialog-caption { font-size:12px;color:var(--muted);margin-top:16px;line-height:1.55; }
  .empty-state { min-height:45vh;display:grid;align-content:center;justify-items:start;gap:16px;max-width:640px;margin:auto;padding:40px var(--space); }
  .empty-state>.icon { width:32px;height:32px;color:var(--blue); }
  .empty-state p { color:var(--muted); }
  .skeleton { height:16px;border-radius:3px;background:var(--line);animation:breathe 1.8s ease-in-out infinite alternate; }
  .loading-view { padding:28px var(--space);min-height:50vh; }
  .loading-view .skeleton { margin:22px 0; }
  .loading-view .skeleton:nth-child(3) { height:180px;width:100%; }
  .loading-view .skeleton:nth-child(4) { width:65%; }
}

@layer weather {
  .sky-stage { background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line); }
  .hero-main { max-width:1360px;margin:auto;padding:24px var(--space) 18px; }
  .hero-date { display:flex;align-items:center;gap:8px;font-size:11px;line-height:1.5;text-transform:uppercase;letter-spacing:.07em;font-weight:650;color:var(--muted); }
  .live-dot { display:inline-block;width:6px;height:6px;flex-shrink:0;border-radius:50%;background:var(--blue); }
  .hero-place { font-size:28px;margin-top:6px;font-weight:650;overflow-wrap:anywhere; }
  .hero-reading { display:flex;align-items:center;gap:24px;margin-top:12px; }
  .hero-temperature { display:flex;align-items:flex-start;font-size:68px;font-weight:500;letter-spacing:-.06em;line-height:1.05;font-variant-numeric:tabular-nums; }
  .hero-temperature sup { font-size:.5em;line-height:1.35;font-weight:450;letter-spacing:0;margin-left:2px; }
  .hero-condition { display:flex;align-items:center;gap:10px;font-size:17px;font-weight:500;line-height:1.4; }
  .hero-condition .weather-icon { width:32px;height:32px; }
  .hero-observed { margin-top:10px;font-size:11px;color:var(--muted);line-height:1.5; }
  .hero-bottom { display:flex;justify-content:space-between;gap:20px;padding:14px var(--space);border-top:1px solid var(--line);max-width:1360px;margin:auto; }
  .hero-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(18px,4vw,56px); }
  .hero-metric { display:grid;gap:5px; }
  .hero-metric span { font-size:11px;color:var(--muted); }
  .hero-metric strong { font-size:18px;line-height:1.3;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums; }
  .hero-bottom .text-link { align-self:center;font-size:12px; }
  .time-strip { background:var(--surface);border-bottom:1px solid var(--line);padding:0 var(--space); }
  .time-strip-heading { display:flex;align-items:center;justify-content:space-between;padding:7px 0 0;gap:12px;max-width:1288px;margin:auto; }
  .time-strip-heading .eyebrow { color:var(--muted);font-size:11px; }
  .time-strip-heading .text-link { white-space:nowrap;flex-shrink:0;font-size:12px; }
  .hour-rail { display:flex;overflow-x:auto;scrollbar-width:thin;gap:0;scroll-snap-type:x proximity;padding:2px 0 12px;max-width:1288px;margin:auto; }
  .hour-choice { flex:1 0 74px;scroll-snap-align:start;border:0;border-right:1px solid var(--line);background:transparent;padding:10px 8px;display:grid;justify-items:center;gap:8px;border-radius:0;min-width:0; }
  .hour-choice:first-child { border-left:1px solid var(--line); }
  .hour-choice:hover { background:var(--paper); }
  .hour-choice[aria-pressed=true] { background:var(--blue-soft);color:var(--blue);box-shadow:inset 0 3px var(--blue); }
  .hour-choice:focus-visible,.day-choice:focus-visible { outline-offset:-3px; }
  .hour-choice span { font-size:11px; }
  .hour-choice strong { font-size:20px;font-weight:600;letter-spacing:-.025em; }
  .hour-choice small { font-size:11px;color:var(--blue); }
  .weather-icon { color:var(--blue);width:25px;height:25px; }
  @keyframes breathe { to { opacity:.4; } }
  :root[data-motion=off] .skeleton,body.page-hidden .skeleton { animation:none!important; }
  @media(prefers-reduced-motion:reduce) { * { animation:none!important;scroll-behavior:auto!important;transition:none!important; } }
}

@layer content {
  .briefing-grid { display:grid;grid-template-columns:1.2fr .8fr;gap:40px;padding-bottom:24px;border-bottom:1px solid var(--line); }
  .briefing-copy .eyebrow { color:var(--blue);margin-bottom:8px;display:block; }
  .briefing-copy h2 { max-width:620px;font-size:24px;line-height:1.3; }
  .briefing-copy p { margin-top:10px;color:var(--muted);font-size:13px;max-width:620px; }
  .brief-facts { display:grid;align-content:start; }
  .fact-row { display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line); }
  .fact-row:first-child { padding-top:0; }
  .fact-row:last-child { border-bottom:0; }
  .fact-row>.icon { color:var(--blue);width:20px;height:20px; }
  .fact-row div { flex:1;min-width:0; }
  .fact-row strong { display:block;font-weight:600;font-size:13px;line-height:1.5; }
  .fact-row small { display:block;margin-top:3px;font-size:11px;color:var(--muted);line-height:1.5; }
  .fact-row>span { color:var(--muted);font-size:12px; }
  .section-head { display:flex;align-items:center;justify-content:space-between;gap:16px;margin:28px 0 16px; }
  .section-head .eyebrow { display:block;color:var(--blue);margin-bottom:5px; }
  .section-head p { font-size:13px;color:var(--muted);margin-top:7px; }
  .activity-choices { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px; }
  .activity-chip { display:flex;align-items:center;gap:7px;background:var(--surface);border:1px solid var(--line);border-radius:4px;min-height:44px;padding:10px 13px;font-size:12px;font-weight:600; }
  .activity-chip .icon { width:17px;height:17px; }
  .activity-chip:hover { border-color:var(--blue); }
  .activity-chip[aria-pressed=true] { background:var(--blue-soft);border-color:var(--blue);color:var(--blue); }
  .activity-feature { display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:22px;border:1px solid var(--line);border-left:3px solid var(--blue);border-radius:4px;background:var(--surface); }
  .activity-feature .eyebrow { color:var(--blue);margin-bottom:7px;display:block; }
  .activity-feature h3 { font-size:21px; }
  .activity-feature p { font-size:13px;color:var(--muted);margin-top:8px; }
  .activity-window { border-left:1px solid var(--line);padding-left:24px;display:flex;flex-direction:column;justify-content:center;gap:8px; }
  .activity-window>strong { font-size:25px;font-weight:600;letter-spacing:-.025em; }
  .activity-window>span { font-size:13px;color:var(--muted);line-height:1.5; }
  .micro { color:var(--muted);font-size:11px;line-height:1.6;margin-top:10px; }
  .details-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line);border-left:1px solid var(--line);margin-top:24px;background:var(--surface); }
  .data-point { padding:18px;border-bottom:1px solid var(--line);border-right:1px solid var(--line);display:grid;gap:8px; }
  .data-point .icon { color:var(--blue);width:20px;height:20px; }
  .data-point span { color:var(--muted);font-size:12px; }
  .data-point strong { font-size:25px;font-weight:550;letter-spacing:-.035em;line-height:1.25; }
  .data-point small { color:var(--muted);font-size:11px;line-height:1.4; }
  .sponsor-band { display:flex;align-items:center;gap:20px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0;margin-top:28px; }
  .sponsor-art { width:130px;height:74px;flex-shrink:0;display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:4px;overflow:hidden;padding:5px; }
  .sponsor-art img { width:100%;height:100%;object-fit:contain; }
  .sponsor-copy { flex:1;min-width:0; }
  .sponsor-copy .eyebrow { color:var(--muted);font-size:10px; }
  .sponsor-copy>a { display:block;padding:7px 0;min-height:44px; }
  .sponsor-copy strong { display:block;font-size:14px;line-height:1.4;letter-spacing:-.01em; }
  .sponsor-controls { display:flex;gap:6px; }
  .sponsor-controls .icon-button { background:transparent; }
  .sponsor-list { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }
  .sponsor-tile { border:1px solid var(--line);border-radius:4px;background:var(--surface);padding:16px;min-width:0; }
  .sponsor-tile:hover { border-color:var(--blue); }
  .sponsor-tile img { width:100%;height:120px;object-fit:contain;background:white;border-radius:2px; }
  .sponsor-tile strong { display:block;font-size:13px;line-height:1.5;margin-top:12px; }
  .sponsor-tile span { font-size:11px;color:var(--muted);display:block;margin-top:6px; }
  .day-rail { display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding-bottom:6px; }
  .day-choice { min-width:88px;flex:1 0 88px;padding:10px 12px;min-height:44px;border:1px solid var(--line);border-radius:4px;background:var(--surface);display:grid;gap:5px;justify-items:center; }
  .day-choice[aria-pressed=true] { border-color:var(--blue);background:var(--blue-soft);color:var(--blue);font-weight:650; }
  .day-choice:hover { border-color:var(--blue); }
  .day-choice span { font-size:12px;white-space:nowrap; }
  .day-choice strong { font-size:18px;font-weight:600; }
  .day-choice small { color:var(--muted);font-size:11px; }
  .forecast-stage { background:var(--surface);border:1px solid var(--line);border-radius:4px;overflow:hidden;margin-top:12px; }
  .forecast-stage-heading { display:flex;justify-content:space-between;align-items:start;padding:20px 22px 10px;gap:16px; }
  .forecast-stage-heading>div:first-child { min-width:0; }
  .forecast-stage-heading .eyebrow { color:var(--muted);margin-bottom:6px;display:block; }
  .forecast-stage-heading h2 { font-size:23px; }
  .selected-hour { text-align:right;font-size:12px;flex-shrink:0;max-width:45%; }
  .selected-hour>span { display:block;line-height:1.45; }
  .selected-hour strong { display:block;font-size:38px;font-weight:550;letter-spacing:-.05em;line-height:1.3; }
  .chart-scroll { overflow-x:auto;scrollbar-width:thin; }
  .forecast-chart { width:100%;min-width:640px;height:225px;display:block; }
  .chart-caption { display:flex;align-items:center;flex-wrap:wrap;gap:14px;padding:0 22px 14px;font-size:11px;color:var(--muted); }
  .chart-key { display:flex;align-items:center;gap:6px; }
  .chart-key i { width:16px;height:3px;background:var(--blue); }
  .chart-key.rain i { height:10px;width:6px;opacity:.4; }
  .forecast-stage .hour-rail { padding:8px 14px 14px;border-top:1px solid var(--line); }
  .forecast-stage .hour-choice { min-width:72px; }
  .daily-list { border-top:1px solid var(--line); }
  .daily-row { display:grid;grid-template-columns:90px 1fr 60px minmax(130px,1fr);align-items:center;gap:20px;padding:15px 0;border-bottom:1px solid var(--line); }
  .daily-row>strong { font-size:13px; }
  .daily-condition { display:flex;align-items:center;gap:10px;font-size:13px;line-height:1.4;min-width:0; }
  .daily-rain { font-size:12px;color:var(--blue); }
  .range { display:flex;align-items:center;gap:10px;font-size:14px; }
  .range-track { background:var(--line);height:5px;flex:1;border-radius:2px;position:relative; }
  .range-track i { position:absolute;background:var(--blue);height:100%;border-radius:2px; }
  .hour-table-wrap { overflow:auto;border:1px solid var(--line);background:var(--surface); }
  .hour-table { width:100%;border-collapse:collapse;font-size:12px; }
  .hour-table td,.hour-table th { text-align:left;padding:12px;border-bottom:1px solid var(--line);white-space:nowrap; }
  .hour-table th { color:var(--muted);font-size:11px;background:var(--paper); }
  .hour-table tr:last-child td { border-bottom:0; }
  .hour-table tbody tr:hover { background:var(--blue-soft); }
  .planning-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }
  .planning-link { display:flex;flex-direction:column;align-items:start;background:var(--surface);padding:20px;border:1px solid var(--line);border-radius:4px;gap:12px;min-width:0; }
  .planning-link:hover { border-color:var(--blue); }
  .planning-link>.icon { color:var(--blue);width:25px;height:25px; }
  .planning-link h3 { font-size:19px; }
  .planning-link p { color:var(--muted);font-size:12px; }
  .planning-link small { display:block;margin-top:auto;padding-top:12px;font-size:11px;color:var(--muted);line-height:1.6;border-top:1px solid var(--line);width:100%; }
  .planning-link .text-link { font-size:12px; }
  .settings-section { background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:22px;margin:20px 0; }
  .settings-section h2 { font-size:21px;margin-bottom:18px; }
  .settings-section .section-head h2 { margin-bottom:0; }
  .preference-row { display:flex;justify-content:space-between;align-items:center;gap:24px;padding:16px 0;border-top:1px solid var(--line); }
  .preference-row:last-child { padding-bottom:0; }
  .preference-row strong { font-size:14px; }
  .preference-row p { color:var(--muted);font-size:12px;max-width:450px;margin-top:5px; }
  .preference-row select { min-height:44px;border:1px solid var(--line);background:var(--paper);color:var(--ink);padding:10px;border-radius:4px;font-size:13px;max-width:190px; }
  .switch { min-width:70px;min-height:44px;border:1px solid var(--line);border-radius:4px;background:var(--paper);font-size:13px; }
  .switch[aria-pressed=true] { background:var(--blue-soft);color:var(--blue);border-color:var(--blue); }
  .updates-lead { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:20px;margin-bottom:28px;min-width:0; }
  .update-card { border:1px solid var(--line);background:var(--surface);padding:18px;border-radius:4px;min-width:0;overflow-wrap:anywhere; }
  .update-card img { width:100%;max-width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:2px;margin-bottom:16px;background:var(--blue-soft); }
  .update-card .eyebrow { color:var(--blue);margin-bottom:8px; }
  .update-card h2 { font-size:22px;line-height:1.3; }
  .update-card p { color:var(--muted);font-size:13px;margin-top:10px; }
  .update-card small { color:var(--muted);font-size:11px;display:block;margin-top:12px;line-height:1.5; }
  .source-footer { padding-top:24px;color:var(--muted);font-size:11px;line-height:1.8; }
  .source-footer a { text-decoration:underline;text-underline-offset:2px; }
  .radar-layout { display:flex;flex-direction:column;height:calc(100dvh - var(--header) - var(--safe-top));min-height:530px; }
  .radar-topline { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px var(--space);background:var(--surface);border-bottom:1px solid var(--line); }
  .radar-topline h1 { font-size:28px; }
  .radar-topline p { color:var(--muted);font-size:12px;margin-top:5px; }
  .map-canvas { position:relative;flex:1;min-height:280px;isolation:isolate;background:#dce5ec; }
  #radar-map { position:absolute;inset:0;z-index:1; }
  .map-status { position:absolute;left:16px;top:16px;right:80px;z-index:500;pointer-events:none; }
  .map-status span { display:inline-block;max-width:100%;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:10px 12px;border-radius:4px;font-size:12px;line-height:1.5; }
  .map-controls { position:absolute;right:16px;top:16px;z-index:500;display:grid;gap:8px; }
  .radar-controls { background:var(--surface);padding:12px var(--space);border-top:1px solid var(--line); }
  .radar-timeline { display:flex;align-items:center;gap:14px; }
  .radar-timeline input { flex:1;min-width:0;min-height:44px;accent-color:var(--blue); }
  .radar-time { min-width:85px;text-align:right;font-size:13px;font-weight:650; }
  .radar-meta { display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:10px;font-size:11px;color:var(--muted);line-height:1.6; }
  .radar-legend { display:flex;align-items:center;gap:8px; }
  .radar-gradient { width:110px;height:6px;border-radius:2px;background:linear-gradient(90deg,#6bd466,#168134,#ece442,#ef8435,#d91b30,#e955da); }
  .leaflet-container { font-family:inherit!important; }
  .map-location-dot { width:16px;height:16px;border:3px solid white;background:#087fe7;border-radius:50%;box-shadow:0 0 0 6px #087fe72b,0 2px 6px #1239; }
  .leaflet-control-attribution { font-size:9px!important; }
  .leaflet-control-attribution a { color:#134b79!important; }
  .base-map { filter:saturate(.55); }
  [data-theme=dark] .base-map { filter:saturate(.4) brightness(.72); }
}

/* Mapbox's stylesheet is unlayered. Keep the absolutely positioned map host
   unlayered too so .mapboxgl-map cannot collapse it to a zero-height block. */
#radar-map.mapboxgl-map { position:absolute;inset:0; }

@layer responsive {
  @media(max-width:1120px) {
    :root { --rail:76px;--space:24px; }
    .sidebar { padding:22px 10px;align-items:center; }
    .brand-word,.brand-note,.primary-nav .nav-link span,.sidebar-footer { display:none; }
    .primary-nav { margin-top:26px; }
    .nav-link { padding:12px; }
    .briefing-grid { gap:24px; }
    .planning-link { padding:16px; }
    .sponsor-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  }
  @media(max-width:760px) {
    :root { --rail:0px;--space:20px;--header:64px; }
    .sidebar { display:none; }
    .shell { margin-left:0;padding-bottom:calc(72px + var(--safe-bottom)); }
    .topbar { padding:calc(10px + var(--safe-top)) max(16px,var(--safe-right)) 10px max(16px,var(--safe-left));min-height:calc(var(--header) + var(--safe-top));gap:10px; }
    .topbar-page { font-size:12px; }
    .topbar-page span { display:none; }
    .topbar-tools { flex:1;justify-content:flex-end;gap:6px; }
    .location-button { font-size:12px;max-width:min(280px,58vw);gap:6px; }
    .topbar .icon-button { border:0;background:none; }
    .mobile-nav { position:fixed;bottom:0;inset-inline:0;padding:5px max(6px,var(--safe-right)) calc(5px + var(--safe-bottom)) max(6px,var(--safe-left));display:flex;justify-content:space-around;z-index:1200;background:var(--nav);min-height:72px; }
    .mobile-nav .nav-link { display:flex;flex-direction:column;gap:5px;justify-content:center;flex:1;padding:7px 3px;min-height:60px;font-size:11px;border-radius:3px;max-width:110px;border-left:0;border-top:2px solid transparent; }
    .mobile-nav .nav-link[aria-current=page] { border-top-color:#69b5f4; }
    .mobile-nav .nav-link .icon { width:21px;height:21px; }
    .page-content { padding:22px var(--space) 32px; }
    .page-heading { align-items:start;flex-wrap:wrap;gap:14px;margin-bottom:20px; }
    .page-heading h1 { font-size:28px; }
    .page-heading p { font-size:13px; }
    .density button { font-size:12px;padding:8px 12px; }
    .hero-main { padding:20px var(--space) 16px; }
    .hero-date { font-size:10px; }
    .hero-place { font-size:26px; }
    .hero-reading { gap:20px;margin-top:14px; }
    .hero-temperature { font-size:56px; }
    .hero-condition { font-size:15px;gap:8px; }
    .hero-condition .weather-icon { width:28px;height:28px; }
    .hero-observed { margin-top:10px; }
    .hero-bottom { padding:13px var(--space);gap:10px; }
    .hero-metrics { flex:1;gap:12px; }
    .hero-metric strong { font-size:16px; }
    .hero-metric span { font-size:10px; }
    .hero-bottom>.text-link { display:none; }
    .hour-choice { flex-basis:68px; }
    .time-strip-heading .eyebrow { font-size:10px; }
    .briefing-grid { grid-template-columns:1fr;gap:18px;padding-bottom:22px; }
    .briefing-copy h2 { font-size:22px; }
    .brief-facts { grid-template-columns:1fr 1fr;gap:18px; }
    .fact-row { align-items:start;border-bottom:0;border-top:1px solid var(--line);padding:14px 0 0;gap:8px; }
    .fact-row:first-child { padding-top:14px; }
    .fact-row strong { font-size:12px; }
    .fact-row small { font-size:11px; }
    .fact-row>.icon { width:18px;height:18px; }
    .section-head { margin-top:24px;gap:12px; }
    .section-head h2 { font-size:21px; }
    .section-head .text-link { font-size:12px; }
    .activity-chip { padding:9px 11px;font-size:11px; }
    .activity-feature { grid-template-columns:1fr;gap:18px;padding:18px; }
    .activity-feature h3 { font-size:20px; }
    .activity-window { padding-left:0;padding-top:16px;border-left:0;border-top:1px solid var(--line); }
    .activity-window>strong { font-size:24px; }
    .details-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .data-point { padding:16px; }
    .sponsor-band { gap:12px;flex-wrap:wrap;margin-top:24px; }
    .sponsor-art { width:100px;height:64px; }
    .sponsor-copy strong { font-size:13px; }
    .sponsor-copy .eyebrow { font-size:9px; }
    .sponsor-controls { margin-left:auto; }
    .sponsor-list { gap:10px; }
    .sponsor-tile { padding:12px; }
    .sponsor-tile img { height:95px; }
    .sponsor-tile strong { font-size:12px; }
    .forecast-stage { margin-left:calc(-1 * var(--space));margin-right:calc(-1 * var(--space));border-radius:0;border-left:0;border-right:0; }
    .forecast-stage-heading { padding:18px var(--space) 10px; }
    .forecast-stage-heading h2 { font-size:21px; }
    .forecast-stage-heading .eyebrow { font-size:10px; }
    .selected-hour strong { font-size:32px; }
    .selected-hour { font-size:11px; }
    .chart-caption { padding:0 var(--space) 14px; }
    .day-choice { min-width:82px;flex-basis:82px; }
    .daily-row { grid-template-columns:48px minmax(0,1fr) 36px 88px;gap:10px;padding:14px 0; }
    .daily-row>strong { font-size:12px; }
    .daily-condition { font-size:11px;gap:6px; }
    .daily-condition .weather-icon { width:20px;height:20px; }
    .daily-rain { font-size:11px; }
    .range { gap:5px;font-size:12px; }
    .planning-grid { grid-template-columns:1fr; }
    .planning-link { display:grid;grid-template-columns:28px 1fr;gap:10px;padding:18px; }
    .planning-link h3 { align-self:center; }
    .planning-link p,.planning-link small,.planning-link .text-link { grid-column:2; }
    .planning-link small { padding-top:10px; }
    .settings-section { padding:18px; }
    .preference-row { flex-wrap:wrap;gap:12px; }
    .preference-row>div { flex:1 0 180px; }
    .preference-row>.density { flex:0 0 auto; }
    .updates-lead { grid-template-columns:minmax(0,1fr);gap:18px; }
    .radar-layout { height:calc(100dvh - var(--header) - 72px - var(--safe-top) - var(--safe-bottom));min-height:500px; }
    .radar-topline { padding:13px var(--space); }
    .radar-topline h1 { font-size:28px; }
    .radar-controls { padding:12px var(--space); }
    .radar-meta { flex-wrap:wrap;gap:8px; }
    .map-status { left:12px;top:12px;right:68px; }
    .map-controls { right:12px;top:12px; }
    .map-status span { padding:9px 10px;font-size:11px; }
    .radar-time { min-width:66px;font-size:12px; }
    dialog { padding:18px; }
  }
  @media(max-width:370px) {
    :root { --space:16px; }
    .topbar { padding-inline:12px;gap:6px; }
    .topbar-page { font-size:11px; }
    .location-button { max-width:180px;font-size:12px; }
    .location-button>.icon:first-child { display:none; }
    .hero-place { font-size:24px; }
    .hero-reading { gap:16px; }
    .hero-condition { font-size:14px; }
    .hero-metrics { grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 20px; }
    .hero-metric strong { font-size:17px; }
    .brief-facts { grid-template-columns:1fr;gap:14px; }
    .daily-row { grid-template-columns:42px minmax(0,1fr) 30px 75px;gap:8px; }
    .daily-condition .weather-icon { display:none; }
    .sponsor-controls { width:100%;justify-content:flex-end; }
    .mobile-nav .nav-link { font-size:10px; }
    .search-form .button { padding-inline:12px; }
    .alert-strip { flex-wrap:wrap; }
  }
}

@layer native {
  :root[data-native=true] { --native-clearance:max(var(--wp-native-tab-bar-offset,100px),var(--safe-bottom));--rail:0px; }
  [data-native=true] .sidebar,[data-native=true] .mobile-nav { display:none; }
  [data-native=true] .shell { margin-left:0;padding-bottom:var(--native-clearance); }
  [data-native=true] body::after { content:'';position:fixed;bottom:0;left:0;right:0;height:var(--native-clearance);background:var(--nav);z-index:1200;pointer-events:none;border-top:1px solid var(--line); }
  [data-native=true] .topbar { padding-left:max(20px,var(--safe-left));padding-right:max(20px,var(--safe-right)); }
  [data-native=true] .radar-layout { height:calc(100dvh - var(--header) - var(--safe-top) - var(--native-clearance));min-height:440px; }
  [data-native=true] dialog { max-height:calc(100dvh - var(--safe-top) - var(--native-clearance) - 32px);margin-top:max(16px,var(--safe-top)); }
}

/* Keep explicit names and dialog actions readable at larger phone text sizes. */
.stormy-perch-copy :is(.stormy-perch-greeting,.stormy-perch-place){overflow-wrap:anywhere}
:is(#location-dialog,#storm-profile-dialog) .dialog-heading>div{min-width:0;flex:1}
:is(#location-dialog,#storm-profile-dialog) :is(h2,p,legend,label){overflow-wrap:anywhere}
#storm-profile-dialog .profile-choice>span{min-width:0;overflow-wrap:anywhere}
#storm-profile-dialog .profile-dialog-actions{flex-wrap:wrap;align-items:stretch}
#storm-profile-dialog .profile-dialog-actions>:is(button,a){min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal}
#storm-profile-dialog .profile-dialog-actions>.button{flex:1 1 140px}
#stormy-dialog .stormy-dialog-brand>div{min-width:0;overflow-wrap:anywhere}
#stormy-dialog :is(.stormy-current-place,.stormy-scope,.stormy-question-examples button,.stormy-privacy){overflow-wrap:anywhere}
@media(max-width:760px){
  html[data-page] .broadcast-header .broadcast-masthead{grid-template-columns:minmax(0,1fr) 44px}
  html[data-page] .broadcast-header .broadcast-brand{min-width:0;max-width:100%;flex-shrink:1}
  html[data-page] .broadcast-header .broadcast-brand>span{min-width:0;overflow-wrap:anywhere}
  html[data-page] .broadcast-header .broadcast-brand img{flex-shrink:0}
}

/* Original transparent marks, matching the main header in both themes. */
.loading-brand{display:flex;align-items:center;justify-content:center;gap:10px;max-width:100%;color:var(--ink);font:700 clamp(24px,6vw,32px)/1.2 system-ui,sans-serif}
.loading-brand>.loading-logo{flex:0 0 64px;width:64px;height:64px;object-fit:contain;background:transparent;margin:0}
.loading-brand>.loading-logo-night{display:none}
.loading-brand>span{min-width:0;overflow-wrap:anywhere}
.loading-brand>span>span{color:var(--blue)}
:root:is([data-theme=dark],[data-theme=night]) .loading-brand>.loading-logo-day{display:none}
:root:is([data-theme=dark],[data-theme=night]) .loading-brand>.loading-logo-night{display:block}
.loading-view .loading-brand{justify-content:flex-start;margin-bottom:24px}
