/* SWxSSA Alerts PWA, 0.6.0. Two themes, dark and light, chosen in Settings (Auto follows the phone) or with the
   header button; the page's <html data-theme> holds the one in use. Panels are frosted glass over soft colour glows
   (glassmorphism); the controls you press are soft, raised shapes that sink when pressed or chosen (neumorphism).
   The space pictures stay dark displays in both themes. Text: 16 px body, nothing under 12 px; every text colour at
   least 4.5:1 on its panel in each theme, worked out for each theme separately. Status colours always come with a
   word and a shape, never colour alone. (George, 4 Nov 2026, after designstudiouiux.com's 2026 mobile trends.) */
:root {
  color-scheme: dark;
  --page: #02050b;
  --sky: rgba(36, 104, 196, 0.3);
  --orb-1: rgba(30, 110, 230, 0.32); --orb-2: rgba(255, 128, 40, 0.14); --orb-3: rgba(130, 80, 255, 0.16);
  --gridline: rgba(110, 190, 255, 0.09);
  --glass: rgba(16, 30, 54, 0.52); --glass-hi: rgba(28, 50, 84, 0.5); --glass-edge: rgba(150, 205, 255, 0.2); --shine: rgba(255, 255, 255, 0.07);
  --bar: rgba(3, 8, 16, 0.66);
  --surface: #0f1c30; --neu-hi: rgba(130, 180, 240, 0.12); --neu-lo: rgba(0, 0, 0, 0.62);
  --well: rgba(1, 4, 9, 0.5);
  --line: rgba(110, 190, 255, 0.2); --line-2: rgba(110, 190, 255, 0.36); --grid: rgba(110, 190, 255, 0.1); --hair: var(--line);
  --ink: #f1f6ff; --ink-2: #c9d6e6; --muted: #9aabc0;
  --accent: #45e3ff; --accent-rgb: 69, 227, 255; --cyan: var(--accent); --chrome: var(--accent);
  --ok: #3ef0a5; --ok-rgb: 62, 240, 165;
  --warn: #ffc94a; --warn-rgb: 255, 201, 74;
  --fail: #ff5f6d; --fail-rgb: 255, 95, 109;
  --moderate: #ff9640; --extreme: #e07bff; --minor: var(--warn); --severe: var(--fail); --idle: var(--muted);
  --glow: 0.55;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  --tb-a: #2e2200; --tb-b: #241a00; --tb-ink: #ffd978; --tb-strong: #ffe9a8; --tb-edge: rgba(255, 201, 74, 0.45);
  --warnbox-ink: #ffe7a6; --plate: #cfd6df; --sw-edge: rgba(150, 205, 255, 0.34);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", "Roboto Mono", Consolas, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --r: 14px; --r-s: 10px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #e6ecf4;
  --sky: rgba(120, 180, 255, 0.35);
  --orb-1: rgba(90, 170, 255, 0.42); --orb-2: rgba(255, 170, 100, 0.34); --orb-3: rgba(175, 135, 255, 0.3);
  --gridline: rgba(30, 70, 120, 0.06);
  --glass: rgba(255, 255, 255, 0.5); --glass-hi: rgba(255, 255, 255, 0.72); --glass-edge: rgba(255, 255, 255, 0.9); --shine: rgba(255, 255, 255, 0.85);
  --bar: rgba(244, 248, 252, 0.68);
  --surface: #eaf0f7; --neu-hi: rgba(255, 255, 255, 0.95); --neu-lo: rgba(140, 158, 186, 0.55);
  --well: rgba(214, 224, 236, 0.7);
  --line: rgba(30, 60, 100, 0.14); --line-2: rgba(5, 101, 155, 0.38); --grid: rgba(30, 60, 100, 0.08);
  --ink: #0b1a2e; --ink-2: #2b3d55; --muted: #4f6178;
  --accent: #05659b; --accent-rgb: 5, 101, 155;
  --ok: #066c43; --ok-rgb: 6, 108, 67;
  --warn: #855400; --warn-rgb: 133, 84, 0;
  --fail: #bb1d2c; --fail-rgb: 187, 29, 44;
  --moderate: #9a4800; --extreme: #8a2fc4;
  --glow: 0.22;
  --shadow: 0 12px 30px rgba(60, 80, 120, 0.16);
  --tb-a: #fff1cc; --tb-b: #ffe7ad; --tb-ink: #5c3d00; --tb-strong: #3d2800; --tb-edge: rgba(133, 84, 0, 0.35);
  --warnbox-ink: #5c3d00; --sw-edge: rgba(43, 61, 85, 0.6);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page) radial-gradient(130% 55% at 50% -8%, var(--sky), transparent 62%) no-repeat; background-color: var(--page);
  -webkit-text-size-adjust: 100%; transition: background-color 0.3s; }
body { margin: 0; color: var(--ink); font: 16px/1.55 var(--sans); min-height: 100vh; padding-bottom: calc(80px + var(--safe-b));
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
/* behind everything: the stars and a faint grid, and three soft colour glows for the glass to blur */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='%23d6ecff'%3E%3Ccircle cx='12' cy='30' r='.7' opacity='.5'/%3E%3Ccircle cx='90' cy='12' r='.5' opacity='.4'/%3E%3Ccircle cx='170' cy='60' r='.9' opacity='.6'/%3E%3Ccircle cx='230' cy='20' r='.5' opacity='.35'/%3E%3Ccircle cx='40' cy='120' r='.6' opacity='.4'/%3E%3Ccircle cx='130' cy='150' r='.5' opacity='.3'/%3E%3Ccircle cx='210' cy='130' r='.8' opacity='.5'/%3E%3Ccircle cx='70' cy='210' r='.6' opacity='.45'/%3E%3Ccircle cx='160' cy='240' r='.5' opacity='.35'/%3E%3Ccircle cx='245' cy='200' r='.7' opacity='.5'/%3E%3Ccircle cx='110' cy='80' r='.4' opacity='.3'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(var(--gridline) 1px, transparent 1px), linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 260px 260px, 40px 40px, 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.2));
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.2)); }
:root[data-theme="light"] body::before { background-image: none, linear-gradient(var(--gridline) 1px, transparent 1px), linear-gradient(90deg, var(--gridline) 1px, transparent 1px); }
body::after { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(42vmax 42vmax at 8% 18%, var(--orb-1), transparent 70%),
    radial-gradient(38vmax 38vmax at 100% 46%, var(--orb-2), transparent 70%),
    radial-gradient(44vmax 44vmax at 20% 96%, var(--orb-3), transparent 70%); }
a { color: var(--accent); text-underline-offset: 3px; }
b, strong { font-weight: 650; }

/* (0.9.12: no test-service notice any more; its stripes kept unused) the test-service notice, in Settings, About and on the privacy page (George, 4 Nov: not at the top) */
.testbar { background: repeating-linear-gradient(135deg, var(--tb-a) 0 10px, var(--tb-b) 10px 20px); color: var(--tb-ink); font: 600 14px/1.45 var(--sans);
  padding: 10px 12px; margin: 6px 0 12px; border: 1px solid var(--tb-edge); border-radius: var(--r-s); }
.testbar b { color: var(--tb-strong); }
/* once the service is live (0.9.2): the same place, no stripes */
.notebar { font: 600 14px/1.45 var(--sans); color: var(--ink-2); padding: 10px 12px; margin: 6px 0 12px; border: 1px solid var(--line); border-radius: var(--r-s); }

/* header: glass */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; position: sticky; top: 0; z-index: 5;
  background: var(--bar); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-edge); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent); opacity: 0.45; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.brand > div { min-width: 0; }
.brand img, .brand .logo { width: 34px; height: 34px; border-radius: 9px; flex: none; }
/* the title sizes itself to the screen and wraps rather than slide under the buttons (George, 4 Nov: it did on his phone) */
.t1 { font: 700 clamp(14px, 4.3vw, 16px)/1.15 var(--sans); letter-spacing: 0.03em; overflow-wrap: anywhere; }
.t2 { font: 600 12px/1.2 var(--mono); letter-spacing: clamp(0.02em, 0.45vw, 0.1em); text-transform: uppercase; color: var(--accent); margin-top: 3px; }

main { max-width: 760px; margin: 0 auto; padding: 14px 16px 28px; outline: none; }
/* under every page (0.9.17, George: "Go for second wording for footer") */
.appfoot { max-width: 760px; margin: -12px auto 0; padding: 0 16px 20px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.pad { padding: 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }
h1 { font: 650 clamp(20px, 6.2vw, 23px)/1.2 var(--sans); letter-spacing: 0.01em; margin: 8px 0 12px; }
h2 { font: 650 16px/1.3 var(--sans); margin: 0 0 8px; letter-spacing: 0.01em; }
p { margin: 6px 0; }
.lead { color: var(--ink-2); }

/* section labels: a mono caption with a rule running out to the right */
.kick { display: flex; align-items: center; gap: 10px; font: 650 12px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 22px 0 10px; }
.kick::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), var(--glow)); flex: none; }
.kick::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.row .kick { margin: 0; flex: 1; }
.subhead { font: 14px/1.4 var(--mono); color: var(--ink-2); margin: 16px 0 2px; }
.subhead span { color: var(--accent); font-weight: 650; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; margin-right: 6px; }
.subhead b { color: var(--ink); }

/* panels: frosted glass with a bright top edge, and instrument corner brackets */
.card, .hero { position: relative; background: linear-gradient(160deg, var(--glass-hi), var(--glass)); border: 1px solid var(--glass-edge); border-radius: var(--r);
  padding: 16px; margin: 10px 0; box-shadow: inset 0 1px 0 var(--shine), var(--shadow);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
.card::before, .card::after, .hero::before, .hero::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; opacity: 0.85; }
.card::before, .hero::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-top-left-radius: var(--r); }
.card::after, .hero::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); border-bottom-right-radius: var(--r); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .hero { background: var(--surface); } .top, .tabs { background: var(--surface); }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .hero, .top, .tabs, dialog.help { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}
.card.link { display: block; color: inherit; text-decoration: none; transition: transform 0.15s; }
.card.link:active { transform: scale(0.985); }
/* 0.8.1: "Details ›" on everything that opens a page of its own */
.go-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.card.link.imp { display: flex; }                 /* like the cards that open nothing, so the button sits at the bottom */
.imp .go-row, .card.day .go-row { margin-top: auto; padding-top: 4px; }
.card.day .go-row { justify-content: center; }
.go { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px 6px 11px; border-radius: 999px; font: 650 12px/1 var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: -2px -2px 6px var(--neu-hi), 2px 2px 7px var(--neu-lo); }
.go .ico { width: 14px; height: 14px; }
.card.link:active .go { box-shadow: inset 2px 2px 5px var(--neu-lo), inset -2px -2px 5px var(--neu-hi); }
@media (hover: hover) { .card.link:hover { border-color: var(--line-2); } .card.link:hover .go { border-color: var(--accent); } }
.row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.row.start { justify-content: flex-start; align-items: flex-start; }

/* chips: a shape and a word for every state */
.chip { display: inline-flex; align-items: center; gap: 7px; font: 650 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; background: var(--glass); }
.chip::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.chip.live { color: var(--ok); } .chip.live::before { border-radius: 50%; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0.6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(var(--ok-rgb), 0); } }
.chip.stale { color: var(--warn); } .chip.stale::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.chip.missing, .chip.offline { color: var(--idle); } .chip.missing::before, .chip.offline::before { background: none; border: 2px solid currentColor; width: 6px; height: 6px; }
.chip.ended { color: var(--idle); } .chip.ended::before { width: 8px; height: 2px; }
.sev { display: inline-flex; align-items: center; gap: 7px; font: 700 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.sev::before { content: ""; width: 10px; height: 10px; background: currentColor; }
.sev.Minor { color: var(--minor); } .sev.Minor::before { border-radius: 50%; }
.sev.Moderate { color: var(--moderate); } .sev.Moderate::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sev.Severe { color: var(--severe); } .sev.Severe::before { transform: rotate(45deg) scale(.85); }
.sev.Extreme { color: var(--extreme); } .sev.Extreme::before { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sev.Unknown { color: var(--idle); }
.lv0 { color: var(--ok); } .lv1 { color: var(--minor); } .lv2 { color: var(--moderate); } .lv3 { color: var(--severe); } .lv4 { color: var(--extreme); }
.alert-item h3 { margin: 8px 0 4px; font-size: 16px; line-height: 1.35; }
.alert-item.ended { opacity: 0.75; }
/* CSEO's credit (0.9.12): the badge, and the line at the top of an alert's page and of CSEO's forecast cards */
.cseo-b { display: inline-block; font: 750 12px/1 var(--mono); letter-spacing: 0.08em; padding: 3px 6px 2px; border-radius: 5px; background: var(--accent); color: #03222b; vertical-align: 1px; white-space: nowrap; }
:root[data-theme="light"] .cseo-b { color: #fff; }
.cseo-t { color: var(--accent); }   /* CSEO, unbadged, in the blue of its numbers (0.9.13) */
.noaa-t { font: 650 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; }
.by { font: 650 12px/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); padding: 0 0 8px; margin: 0 0 10px; border-bottom: 1px solid var(--line-2); }
.sev-l { display: inline-flex; align-items: center; gap: 8px; }
.meta { font: 13px/1.5 var(--mono); color: var(--muted); }
.nw { white-space: nowrap; }
.saved { margin: 6px 0 0; min-height: 1.5em; }    /* room kept, so the card does not jump when it fills */
.row.sev-row { flex-wrap: wrap; row-gap: 4px; }
.meta.ev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bar { height: 8px; background: var(--well); border-radius: 4px; overflow: hidden; margin: 4px 0 6px; box-shadow: inset 1px 1px 3px var(--neu-lo); }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.55), var(--accent)); box-shadow: 0 0 10px rgba(var(--accent-rgb), var(--glow)); }
.bar.noaa > i { background: var(--muted); box-shadow: none; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
td, th { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--grid); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
pre.raw { white-space: pre-wrap; word-break: break-word; font: 13px/1.5 var(--mono); color: var(--ink-2); background: var(--well);
  border-radius: var(--r-s); padding: 12px; overflow-x: auto; box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }

/* controls: soft, raised shapes that sink when pressed (neumorphism) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 20px; border-radius: var(--r-s);
  border: 1px solid transparent; background: var(--surface); color: var(--accent); font: 650 15px/1 var(--sans); letter-spacing: 0.02em; cursor: pointer;
  box-shadow: -4px -4px 10px var(--neu-hi), 4px 4px 12px var(--neu-lo); margin: 4px 0; transition: box-shadow 0.15s, transform 0.15s; }
.btn:active { box-shadow: inset 3px 3px 8px var(--neu-lo), inset -3px -3px 8px var(--neu-hi); transform: translateY(1px); }
.btn.ghost { color: var(--ink); }
.btn:disabled { opacity: 0.5; box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.btn:focus-visible, .q:focus-visible, .modebtn:focus-visible, .card.link:focus-visible, .tabs a:focus-visible, .iconbtn:focus-visible, .segctl button:focus-visible,
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 3px; }
label.sw { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--grid); cursor: pointer; }
label.sw:last-child { border-bottom: 0; }
label.sw .sw-t { flex: 1; }
label.sw .d { font-size: 14px; color: var(--muted); }
/* the toggle switch: a pressed-in track with a raised knob that slides across, with a little weight */
.switch { position: relative; flex: none; width: 54px; height: 30px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: var(--well); transition: background 0.25s;
  box-shadow: inset 0 0 0 1.5px var(--sw-edge), inset 2px 2px 5px var(--neu-lo), inset -2px -2px 5px var(--neu-hi); }
.switch i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted);
  box-shadow: 2px 2px 5px var(--neu-lo), -1px -1px 3px var(--neu-hi); transition: transform 0.3s cubic-bezier(.3, 1.5, .5, 1), background 0.25s; }
.switch input:checked + i { background: rgba(var(--accent-rgb), 0.32); }
.switch input:checked + i::after { transform: translateX(24px); background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), var(--glow)), 2px 2px 5px var(--neu-lo); }
input[type=time], select { background: var(--well); color: var(--ink); border: 0; border-radius: var(--r-s); padding: 8px 10px; font: 16px var(--mono); min-height: 44px;
  box-shadow: inset 2px 2px 5px var(--neu-lo), inset -2px -2px 5px var(--neu-hi); }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0; }
.field select { flex: 1 1 180px; min-width: 0; font-family: var(--sans); }
/* a choice of a few: a pressed-in track, the chosen one raised */
.segctl { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 5px; border-radius: 14px; background: var(--well); margin: 10px 0 4px;
  box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.segctl button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  font: 650 14px/1 var(--sans); cursor: pointer; transition: background 0.2s, box-shadow 0.2s, color 0.2s; }
.segctl button .ico { width: 18px; height: 18px; }
.segctl button[aria-checked="true"] { background: var(--surface); color: var(--accent); box-shadow: -3px -3px 8px var(--neu-hi), 3px 3px 9px var(--neu-lo); }
/* the header's theme button */
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: var(--surface); color: var(--accent); box-shadow: -3px -3px 8px var(--neu-hi), 3px 3px 9px var(--neu-lo); transition: box-shadow 0.15s; }
.iconbtn:active { box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.iconbtn .ico { width: 20px; height: 20px; }
.iconbtn.turn .ico { animation: turn 0.5s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes turn { from { transform: rotate(-150deg) scale(0.5); opacity: 0; } }
.note { border-left: 2px solid var(--accent); padding: 6px 12px; color: var(--ink-2); font-size: 14px; margin: 12px 0; background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.1), transparent); border-radius: 0 var(--r-s) var(--r-s) 0; }
.warnbox { border: 1px solid rgba(var(--warn-rgb), 0.55); background: rgba(var(--warn-rgb), 0.1); border-radius: var(--r-s); padding: 10px 12px; font-size: 14.5px; color: var(--warnbox-ink); }

/* the tab bar: glass, the chosen tab sunk into a soft well */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); z-index: 10; padding: 4px 6px var(--safe-b);
  background: var(--bar); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border-top: 1px solid var(--glass-edge); }
.tabs a { position: relative; z-index: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 9px; color: var(--muted); text-decoration: none;
  font: 600 12px/1 var(--sans); letter-spacing: 0.03em; min-height: 58px; }
.tabs a .ico { width: 24px; height: 24px; transition: transform 0.2s; }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; z-index: -1; inset: 3px 6px; border-radius: 14px; background: var(--well);
  box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.tabs a[aria-current="page"] .ico { transform: translateY(-1px); filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), var(--glow))); }

.band { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--grid); }
.band b { font: 600 14px var(--mono); }
.band .ex { font-size: 13.5px; color: var(--muted); }
.dots { letter-spacing: 2px; color: var(--muted); }
.dots i { font-style: normal; color: var(--accent); text-shadow: 0 0 8px rgba(var(--accent-rgb), var(--glow)); }   /* a chance, not a hazard: no warning colours */
@media (min-width: 640px) { body { font-size: 16.5px; } }
/* the privacy notice (privacy.html): a plain reading page, no tab bar */
body.doc { padding-bottom: 32px; }
.doc main { max-width: 720px; margin: 0 auto; }
.doc li { margin: 4px 0; }

/* the three modes */
.hdr-r { display: flex; gap: 8px; align-items: center; flex: none; }
.modechip { text-decoration: none; color: var(--accent); min-height: 34px; padding: 0 11px; }
.modechip .ico { width: 17px; height: 17px; flex: none; }
/* on a narrow screen the mode chip and the offline chip show only their sign (the words stay for screen readers) */
@media (max-width: 419px) {
  .modechip { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .modechip .lbl, #net .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.modechip::before { display: none; }
button.modechip { font: 650 12px/1 var(--mono); letter-spacing: 0.08em; cursor: pointer; }
button.modechip:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* the detail switch under the header (0.8.0: Simple · More · Full from any screen) */
.modemenu { position: absolute; top: calc(100% + 8px); right: 12px; width: min(340px, calc(100vw - 24px)); padding: 12px 12px 8px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
.modemenu .mm-t { font: 650 12px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.modemenu .segctl { margin: 8px 0 6px; }
.modemenu .small { margin: 4px 2px 0; color: var(--ink-2); }
body[data-mode="everyday"] .tabs { grid-template-columns: repeat(4, 1fr); }
body[data-mode="everyday"] .tabs a[data-tab="pilot"] { display: none; }
body[data-mode="everyday"] { font-size: 17px; }
body[data-mode="everyday"] h1 { font-size: clamp(22px, 7vw, 26px); }

/* instrument readout line (Enthusiast, Professional) */
.telem { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font: 13px/1.3 var(--mono); color: var(--muted); letter-spacing: 0.06em;
  padding: 8px 10px; border-radius: var(--r-s); background: var(--well); margin: 2px 0 12px; box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.telem b { color: var(--ink); font-weight: 600; letter-spacing: 0.04em; }
.telem .chip { margin-left: auto; }

/* drawings (gfx.js): dark displays in both themes, so their own colours are always those of the dark theme */
.gfx { --ink: #f1f6ff; --ink-2: #c9d6e6; --muted: #9aabc0; --accent: #45e3ff;
  display: block; width: 100%; height: auto; margin: 6px auto; overflow: hidden; }
:root[data-theme="light"] .gfx { background: radial-gradient(120% 120% at 30% 20%, #0c1d38, #040a14); border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 3px 3px 10px var(--neu-lo), -3px -3px 10px var(--neu-hi); }
:root[data-theme="light"] .gfx.core { border-radius: 50%; }
:root[data-theme="light"] .card .gfx.wind, :root[data-theme="light"] .welcome-art .gfx { border-radius: 0; box-shadow: none; }
.gfx text { font: 13px var(--sans); }
.gfx .t-mut { fill: var(--muted); } .gfx .t-ink { fill: var(--ink); } .gfx .t-ink2 { fill: var(--ink-2); } .gfx .t-cy { fill: var(--accent); }
.gfx .b { font-weight: 700; } .gfx .mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; }
.gfx .t-big { fill: var(--ink); font-size: 25px; font-weight: 600; }
.gfx.sun { max-width: 380px; } .gfx.wind { max-width: 560px; } .gfx.dst { max-width: 520px; } .gfx.chart { max-width: 560px; }
.gfx.gauge { max-width: 190px; } .gfx.pic { max-width: 340px; }
.gfx.core { width: 132px; flex: none; margin: 0; }
.pt { animation: fly linear infinite; }
@keyframes fly { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.flow { stroke-dasharray: 4 6; animation: flow var(--dur, 2s) linear infinite; }
@keyframes flow { to { stroke-dashoffset: -40; } }
.field path { stroke-dasharray: 3 4; animation: flow 3.2s linear infinite; }
.field.fast path { animation-duration: 1.1s; }
.breathe { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.65; } }
.spin-slow { animation: spin 80s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lock { animation: lock 0.7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lock { from { transform: scale(1.7); opacity: 0; } }
.gfx .seg { animation: segon 0.25s ease-out both; }
@keyframes segon { from { opacity: 0; } }
.grow { stroke-dasharray: 900; stroke-dashoffset: 900; animation: grow 1.2s ease-out forwards; }
@keyframes grow { to { stroke-dashoffset: 0; } }
.expand { transform-box: fill-box; transform-origin: left center; animation: expand 2s ease-out infinite; }
@keyframes expand { from { transform: translateX(0) scale(.6); opacity: 1; } to { transform: translateX(150px) scale(1.2); opacity: 0; } }
.sway { animation: breathe 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .pt, .flow, .field path, .breathe, .spin-slow, .lock, .gfx .seg, .grow, .expand, .sway, .chip.live::before { animation: none !important; }
  .grow { stroke-dashoffset: 0; }
  .pt { opacity: .7; }
  .switch i::after, .btn, .segctl button, html { transition: none; }
  .iconbtn.turn .ico { animation: none; }
}

/* icon chips: small raised tiles */
.ichip { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 13px;
  color: var(--accent); background: var(--surface); box-shadow: -3px -3px 8px var(--neu-hi), 3px 3px 9px var(--neu-lo); }
.ichip .ico, .ico { width: 24px; height: 24px; }
.ichip.big { width: 58px; height: 58px; border-radius: 16px; } .ichip.big .ico { width: 30px; height: 30px; }
.ichip.dim { opacity: 0.55; }

/* Everyday: the answer */
.hero { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 16px; margin: 6px 0 12px; overflow: hidden; }
.hero-t { flex: 1 1 150px; min-width: 0; }
.hero.st0 { border-color: rgba(var(--ok-rgb), 0.45); } .hero.st1 { border-color: rgba(var(--warn-rgb), 0.55); } .hero.st2 { border-color: rgba(var(--fail-rgb), 0.6); }
.hero.st0 { background: radial-gradient(120% 90% at 0% 50%, rgba(var(--ok-rgb), 0.13), transparent 60%), linear-gradient(160deg, var(--glass-hi), var(--glass)); }
.hero.st1 { background: radial-gradient(120% 90% at 0% 50%, rgba(var(--warn-rgb), 0.14), transparent 60%), linear-gradient(160deg, var(--glass-hi), var(--glass)); }
.hero.st2 { background: radial-gradient(120% 90% at 0% 50%, rgba(var(--fail-rgb), 0.15), transparent 60%), linear-gradient(160deg, var(--glass-hi), var(--glass)); }
.hero-q { color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.hero-a { font: 750 clamp(32px, 10.5vw, 40px)/1.05 var(--sans); letter-spacing: 0.01em; margin: 4px 0 6px; } .hero-a.sm { font-size: 24px; }
.hero.st0 .hero-a { color: var(--ok); text-shadow: 0 0 22px rgba(var(--ok-rgb), var(--glow)); }
.hero.st1 .hero-a { color: var(--warn); text-shadow: 0 0 22px rgba(var(--warn-rgb), var(--glow)); }
.hero.st2 .hero-a { color: var(--fail); text-shadow: 0 0 22px rgba(var(--fail-rgb), var(--glow)); }
.hero p { margin: 0 0 10px; font-size: 15px; color: var(--ink-2); }
@media (max-width: 360px) { .gfx.core { width: 104px; } .hero-a { font-size: 34px; } }
.imps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.imps > .imp:last-child:nth-child(odd) { grid-column: 1 / -1; }
.imp { display: flex; flex-direction: column; gap: 8px; margin: 0; color: inherit; text-decoration: none; }
.imp h3 { margin: 4px 0 0; font-size: 16px; line-height: 1.25; }
.imp-w { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font: 650 15px/1.25 var(--sans); }
.imp.st0 .imp-w { color: var(--ok); } .imp.st1 .imp-w { color: var(--warn); } .imp.st2 .imp-w { color: var(--fail); } .imp.stn .imp-w { color: var(--ink-2); }
.imp p { margin: 0; color: var(--ink-2); font-size: 14px; }
/* level bars: how many segments are lit says the level, as well as the colour */
.lvbar { display: inline-flex; gap: 3px; flex: none; padding: 3px 4px; border-radius: 6px; background: var(--well); box-shadow: inset 1px 1px 3px var(--neu-lo), inset -1px -1px 3px var(--neu-hi); }
.lvbar i { width: 10px; height: 10px; transform: skewX(-18deg); border-radius: 2px; background: var(--grid); }
.lvbar.st0 i.on { background: var(--ok); box-shadow: 0 0 8px rgba(var(--ok-rgb), var(--glow)); }
.lvbar.st1 i.on { background: var(--warn); box-shadow: 0 0 8px rgba(var(--warn-rgb), var(--glow)); }
.lvbar.st2 i.on { background: var(--fail); box-shadow: 0 0 8px rgba(var(--fail-rgb), var(--glow)); }
.lvbar.stn i.on { background: var(--muted); }
.days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.card.day { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin: 0; padding: 14px 6px; }
.day b { font: 650 12.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.day span { font-size: 14px; line-height: 1.3; color: var(--ink); }
.day span.go { font-size: 12px; line-height: 1; color: var(--accent); padding: 5px 6px 5px 9px; }   /* the day's word, not its button */
.alert-item.plain h3 { margin: 0 0 4px; } .alert-item.plain p { margin: 0 0 6px; }

/* Enthusiast */
/* 0.8.2: NOAA's scales, a row each, with where the reading stands (More) and where each level starts (the help picture) */
.card.scales .sc + .sc { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.sc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sc-h b { font-size: 15px; } .sc-h span { font: 650 13px/1.2 var(--mono); letter-spacing: 0.04em; white-space: nowrap; }
.sc p.small { margin: 4px 0 0; color: var(--ink-2); }
.meter { margin: 8px 0 2px; }
.m-well { padding: 4px 3px; border-radius: 6px; background: var(--well); box-shadow: inset 1px 1px 3px var(--neu-lo), inset -1px -1px 3px var(--neu-hi); }
.m-bar, .m-lab { position: relative; display: grid; grid-template-columns: 5fr repeat(5, 1fr); }
.m-bar i, .ladder i { height: 8px; margin: 0 1.5px; border-radius: 2px; transform: skewX(-20deg); opacity: 0.3; }
.m-bar i.on { opacity: 1; box-shadow: 0 0 8px currentColor; }
.m0 { background: var(--ok); color: var(--ok); } .m1 { background: var(--minor); color: var(--minor); } .m2 { background: var(--moderate); color: var(--moderate); }
.m3, .m4 { background: var(--severe); color: var(--severe); } .m5 { background: var(--extreme); color: var(--extreme); }
.m-at { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--ink);
  box-shadow: 0 0 0 2px var(--surface), 0 0 10px rgba(var(--accent-rgb), var(--glow)); }
.m-lab { margin: 4px 3px 0; font: 12px/1 var(--mono); color: var(--muted); text-align: center; }
.m-lab span:first-child { text-align: left; padding-left: 4px; }
.ladder { width: 100%; border-collapse: collapse; font-size: clamp(12px, 3.8vw, 14px); font-variant-numeric: tabular-nums; }
.ladder th { font: 600 clamp(12px, 3.6vw, 13px)/1.25 var(--sans); text-align: right; vertical-align: bottom; padding: 0 0 6px 6px; color: var(--ink-2); }
.ladder th b { display: block; font-family: var(--mono); color: var(--accent); } .ladder th span { display: block; font: 12px/1.3 var(--mono); color: var(--muted); }
.ladder td { padding: 5px 0 5px 6px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.ladder td:first-child { text-align: left; padding-left: 0; } .ladder td:first-child i { display: inline-block; width: 12px; margin: 0 6px 0 2px; opacity: 1; vertical-align: 1px; }
.readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.readouts > div { border-radius: var(--r-s); padding: 8px 10px; background: var(--well); font: 13px var(--mono); color: var(--muted);
  box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.readouts b { font: 600 clamp(19px, 6vw, 24px)/1.15 var(--mono); color: var(--ink); text-shadow: 0 0 14px rgba(var(--accent-rgb), calc(var(--glow) * 0.5)); margin-right: 4px; }
.readouts span { display: block; font: 600 12px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
@media (min-width: 560px) { .readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: center; align-items: end; }
.why { background: var(--well); border-left: 2px solid var(--accent); border-radius: var(--r-s); padding: 10px 12px; margin-top: 10px; font-size: 15px;
  box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.why b { font: 650 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.why ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.why li { margin: 4px 0; }

/* Professional */
table.dense { width: 100%; border-collapse: collapse; font: 13px/1.4 var(--mono); margin: 6px 0 14px; }
table.dense th, table.dense td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.dense th { color: var(--accent); font: 650 12px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; border-bottom-color: var(--line-2); }
table.dense tr:nth-child(even) td { background: rgba(var(--accent-rgb), 0.04); }
table.dense.regs th, table.dense.regs td { padding-left: 4px; padding-right: 4px; }   /* eight columns, NOAA's X too, within a phone's width (0.9.15) */
body[data-mode="pro"] h2 { font: 650 12.5px/1.2 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 18px 0 6px; }
body[data-mode="pro"] .card h2 { margin-top: 0; }
.mono { font-family: var(--mono); }
.brk { overflow-wrap: anywhere; }   /* an alert's identifier in Full: 43 letters with no space, wider than a phone (0.9.17) */

/* "?" help: raised round buttons */
.q { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; margin-left: 4px; border-radius: 50%; border: 0; padding: 0;
  background: var(--surface); color: var(--accent); font: 700 15px/1 var(--mono); cursor: pointer; vertical-align: middle; flex: none;
  box-shadow: -3px -3px 7px var(--neu-hi), 3px 3px 8px var(--neu-lo); transition: box-shadow 0.15s; }
.q:active { box-shadow: inset 2px 2px 5px var(--neu-lo), inset -2px -2px 5px var(--neu-hi); }
.q.lbl { border-radius: 19px; padding: 0 14px; font: 650 13px/1 var(--mono); margin: 0 8px 8px 0; }
.helps { display: flex; flex-wrap: wrap; }
dialog.help { background: linear-gradient(160deg, var(--glass-hi), var(--glass)); color: var(--ink); border: 1px solid var(--glass-edge); border-radius: 20px;
  max-width: min(440px, calc(100vw - 32px)); padding: 20px; box-shadow: inset 0 1px 0 var(--shine), 0 24px 60px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); }
dialog.help::backdrop { background: rgba(0, 3, 8, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.help h2 { margin-top: 0; font-size: 19px; }
dialog.help .h-more { color: var(--ink-2); }
/* mode picker: raised cards; the chosen one sinks in, with an accent edge */
.modes { display: grid; gap: 12px; margin: 12px 0; }
.modebtn { position: relative; display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; min-height: 76px; padding: 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid transparent; color: var(--ink); font: inherit; cursor: pointer;
  box-shadow: -4px -4px 10px var(--neu-hi), 4px 4px 12px var(--neu-lo); transition: box-shadow 0.2s; }
.modebtn.on { border-color: rgba(var(--accent-rgb), 0.55); box-shadow: inset 3px 3px 8px var(--neu-lo), inset -3px -3px 8px var(--neu-hi); }
.modebtn.on::after { content: "✓"; position: absolute; top: 10px; right: 12px; color: var(--accent); font: 700 16px/1 var(--mono); }
.modebtn b { display: block; font-size: 18px; letter-spacing: 0.02em; } .modebtn .who { display: block; color: var(--accent); font-size: 14px; margin: 2px 0 4px; }
.modebtn .small { display: block; color: var(--ink-2); }
details.card summary { cursor: pointer; min-height: 32px; font-weight: 650; }
.welcome-art { margin: 0 -16px 6px; }
.welcome-art .gfx, .card .gfx.wind { width: calc(100% + 32px); max-width: none; margin-left: -16px; margin-right: -16px; }
.welcome-art .gfx { width: 100%; margin: 0; }

/* credits: every logo keeps its official colours on a light plate, as on the SWxSSA console, in both themes: CSEO's
   and C-SpaRC's at the top (0.9.7), the funding logos and the partners' at the bottom */
.brand-logos, .funding-logos { display: block; background: var(--plate); border-radius: 8px; padding: 4px 6px; margin: 12px 0 8px; box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25); }
.brand-logos { display: flex; align-items: center; justify-content: center; gap: 5%; padding: 8px 12px; }
.brand-logos .cs { width: 44%; max-width: 220px; height: auto; }
.brand-logos .cp { width: 13%; max-width: 66px; height: auto; }
.funding-logos img { display: block; width: 100%; height: auto; }
.funding-logos img + img { width: 88%; margin: 6px auto 2px; padding-top: 6px; border-top: 1px solid rgba(10, 30, 60, 0.2); }
.credits .funding { color: var(--muted); font-size: 13px; line-height: 1.45; }
.credits h3 { font-size: 15px; margin: 16px 0 4px; }
.facts { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 12px 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--well);
  box-shadow: inset 2px 2px 6px var(--neu-lo), inset -2px -2px 6px var(--neu-hi); }
.facts dt { font: 650 12px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; color: var(--ink-2); font-size: 14px; }

/* 0.8.0: Simple's answer at the top of More and Full; Simple's day picture beside More's numbers; short forms keep their case */
.card.inshort { margin: 6px 0 12px; }
.inshort .row.start { gap: 12px; align-items: center; }
.inshort .gfx.core { width: 76px; }
.grow1 { flex: 1; min-width: 0; }
.facts.abbr dt { text-transform: none; letter-spacing: 0.04em; }
