:root {
  --bg: #121212;
  --surface: #1b1b1b;
  --surface-2: #242424;
  --line: #323232;
  --text: #f0f0f0;
  --muted: #a6a6a6;
  --faint: #777777;
  --red: #D40E1E;
  --red-text: #ff4d5a;      /* readable red for small text on dark */
  --red-glow: rgba(212, 14, 30, .18);
  --snow: #b9d4f5;
  --rain: #5c8ff0;
  --wind: #e0a43a;
  --good: #3ecf8e;
  --track: #2a2a2a;
  --radius: 14px;
  color-scheme: dark;
}

/* Theme: dark by default (dark-first). theme.js sets <html data-theme="dark|light|auto">
   from the Appearance setting; "auto" follows the device. */
:root[data-theme="light"] {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f0f2f6;
  --line: #dde1e8;
  --text: #12161d;
  --muted: #586274;
  --faint: #8a93a3;
  --red-text: #c10c1b;
  --red-glow: rgba(212, 14, 30, .09);
  --snow: #7aa3d6;
  --rain: #3c6fd6;
  --wind: #b07410;
  --good: #138a55;
  --track: #e7eaf0;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #f4f5f8;
    --surface: #ffffff;
    --surface-2: #f0f2f6;
    --line: #dde1e8;
    --text: #12161d;
    --muted: #586274;
    --faint: #8a93a3;
    --red-text: #c10c1b;
    --red-glow: rgba(212, 14, 30, .09);
    --snow: #7aa3d6;
    --rain: #3c6fd6;
    --wind: #b07410;
    --good: #138a55;
    --track: #e7eaf0;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
.wrap.narrow:has(.signin-page) { max-width: 1000px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.loading { color: var(--muted); padding: 40px 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  min-height: 61px;
}
.top-inner { display: flex; align-items: center; gap: 12px 18px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; color: var(--red); }
.nav { display: flex; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); background: var(--surface-2); }
.nav-link .icon { width: 15px; height: 15px; }

.threshold { display: flex; align-items: center; gap: 6px; }
.threshold-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
.threshold-value { min-width: 44px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.step, .icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.step:hover, .icon-btn:hover { border-color: var(--red); }
.step:disabled, .icon-btn:disabled { opacity: .35; cursor: default; border-color: var(--line); }
.step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 13px; font-weight: 700;
  padding: 9px 14px; border-radius: 10px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
}
.btn:hover { border-color: var(--red); }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-on { border-color: color-mix(in srgb, var(--red) 60%, var(--line)); color: var(--red-text); }
.btn-quiet { background: transparent; }
.btn-lg { font-size: 15px; padding: 12px 20px; }

/* Banner */
.banner {
  margin: 20px 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 22px;
  overflow: hidden;
}
.banner.is-powder {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  background: radial-gradient(120% 140% at 0% 0%, var(--red-glow), transparent 60%), var(--surface);
}
.banner-skeleton { color: var(--muted); }
.banner-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red-text); margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.banner.is-none .banner-eyebrow { color: var(--muted); }
.banner h1 { margin: 0; font-size: clamp(24px, 4.4vw, 38px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.banner h1 a { text-decoration: none; }
.banner h1 a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.banner-hits { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.banner-hits a { display: block; text-decoration: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 14px; }
.banner-hits a:hover { border-color: var(--red); }
.banner-hits b { color: var(--red-text); font-weight: 800; }
.banner-sub { margin: 8px 0 0; color: var(--muted); }
.banner.is-error h1 { font-size: 22px; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; margin: 0 0 18px; }
.explainer { color: var(--faint); font-size: 13px; margin: 0; max-width: 820px; }
.dash-note { color: var(--muted); font-size: 13px; margin: 0; }
.dash-note a, .explainer a { color: var(--red-text); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.card.has-powder { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card-title { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.card h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.card-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.now { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.now b { display: block; font-size: 20px; color: var(--text); font-weight: 700; line-height: 1.1; }
.fav-btn { background: none; border: 0; padding: 2px; margin: -1px 0 0 -2px; color: var(--faint); cursor: pointer; border-radius: 6px; }
.fav-btn .icon { width: 20px; height: 20px; }
.fav-btn:hover { color: var(--text); }
.fav-btn.on { color: #f5b301; }

.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.total { background: var(--surface-2); border-radius: 10px; padding: 10px 8px; text-align: center; }
.total-num { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.total-num small { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 1px; }
.total-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 3px; }

/* Night chart */
.chart-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; }
.chart-title span:last-child { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); }
.chart { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 150px; align-items: end; padding-top: 18px; }
.thresh-plot { position: absolute; left: 0; right: 0; top: 18px; bottom: 0; pointer-events: none; z-index: 2; }
.thresh-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--red) 70%, transparent); }
.thresh-line span { position: absolute; right: 0; top: -17px; font-size: 10px; font-weight: 700; color: var(--red-text); background: var(--surface); padding: 0 3px; }
.bar-col {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch;
  height: 100%; min-width: 0; position: relative;
  background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;
  border-radius: 6px;
}
.bar-col:hover .bar, .bar-col[aria-pressed="true"] .bar { filter: brightness(1.12); }
.bar-col[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--text); }
.bar-val { font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; margin-bottom: 3px; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 1px; flex-shrink: 0; }
.bar-val .icon { width: 11px; height: 11px; }
.bar { border-radius: 6px 6px 3px 3px; background: var(--snow); min-height: 3px; flex-shrink: 0; display: block; }
.bar.zero { background: var(--track); }
.bar.powder { background: var(--red); box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 40%, transparent), 0 6px 18px -6px var(--red); }
.bar.rain { background: repeating-linear-gradient(135deg, var(--rain) 0 5px, color-mix(in srgb, var(--rain) 55%, transparent) 5px 10px); }
.bar.partial { opacity: .75; }
.bar-col.rain .bar-val { color: var(--rain); }
.bar-col.powder .bar-val { color: var(--red-text); }
.bar-labels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.bar-label { text-align: center; font-size: 11px; line-height: 1.35; color: var(--muted); min-width: 0; display: flex; flex-direction: column; }
.bar-label b { color: var(--text); font-weight: 700; font-size: 12px; }
.bar-label .temps { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-label .wind { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-label .wind small { font-size: 9px; margin-left: 1px; }

.night-detail { display: none; margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.night-detail.open { display: block; }
.nd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.night-detail dl { margin: 0; display: grid; gap: 3px; }
.night-detail dl div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.night-detail dt { color: var(--muted); font-size: 12px; }
.night-detail dd { margin: 0; font-variant-numeric: tabular-nums; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pill .icon { width: 11px; height: 11px; }
.pill-powder { background: var(--red); color: #fff; }
.pill-rain { background: color-mix(in srgb, var(--rain) 22%, transparent); color: var(--rain); }
.pill-snow { background: color-mix(in srgb, var(--snow) 22%, transparent); color: var(--snow); }
.pill-wind { background: color-mix(in srgb, var(--wind) 20%, transparent); color: var(--wind); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .l-snow { background: var(--snow); }
.legend .l-powder { background: var(--red); }
.legend .l-rain { background: repeating-linear-gradient(135deg, var(--rain) 0 3px, color-mix(in srgb, var(--rain) 55%, transparent) 3px 6px); }
.legend-note { color: var(--faint); margin-left: auto; }

.card-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.details-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--red-text); text-decoration: none; }
.details-link:hover { text-decoration: underline; }
.details-link .icon { width: 14px; height: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; text-decoration: none;
  padding: 6px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}
.links a:hover { border-color: var(--red); }
.links .icon { width: 12px; height: 12px; color: var(--muted); }

.foot { color: var(--faint); font-size: 12px; padding-top: 28px; padding-bottom: 40px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }

/* ---- Resort page ---- */
.crumbs { margin: 16px 0 4px; font-size: 13px; }
.crumbs a { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--text); }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.hero h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.hero-meta { margin: 6px 0 12px; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-actions .btn .icon { width: 15px; height: 15px; }
.hero-actions .btn-on .icon { color: #f5b301; }
.hero-now { display: flex; flex-direction: column; text-align: right; color: var(--muted); font-size: 13px; }
.hero-now b { font-size: 32px; color: var(--text); line-height: 1; margin-bottom: 4px; }
.verdict { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.verdict li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.verdict .v-good { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); }
.verdict .v-good b { color: var(--red-text); }
.verdict .v-ok b { color: var(--good); }
.verdict .v-bad b { color: var(--rain); }

.section { margin: 0 0 22px; }
.section.card { gap: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 720px; }
.section-head a, .section-sub a { color: var(--red-text); }
.section-head a .icon { width: 12px; height: 12px; vertical-align: -1px; margin-left: 3px; }
.section-sub { color: var(--muted); font-size: 13px; margin: -4px 0 10px; }
.sub-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 8px; }

/* Periods strip */
.periods { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.period { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.period.night { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.period.is-deep { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); }
.period.is-rain { border-color: color-mix(in srgb, var(--rain) 50%, var(--line)); }
.period h3 { margin: 0; font-size: 13px; font-weight: 800; }
.p-icon .icon { width: 34px; height: 34px; stroke-width: 1.6; color: var(--text); }
.period.is-rain .p-icon .icon { color: var(--rain); }
.period.is-deep .p-icon .icon { color: var(--red-text); }
.p-text { margin: 0; font-size: 12px; color: var(--muted); min-height: 2.7em; line-height: 1.35; }
.period .hi, .period .lo { font-weight: 800; font-size: 15px; }
.period .lo { color: var(--snow); }
.period dl { margin: 4px 0 0; display: grid; gap: 2px; font-size: 12px; }
.period dl div { display: flex; justify-content: space-between; gap: 6px; }
.period dt { color: var(--faint); }
.period dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.period dd small { color: var(--faint); font-weight: 500; }
.p-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* Segmented control */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { font: inherit; font-size: 12px; font-weight: 700; border: 0; background: none; color: var(--muted); padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }

/* Hourly chart: fixed y-axis column + scrolling plot */
.hc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hc-read { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; min-height: 42px; font-variant-numeric: tabular-nums; }
.hc-read span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.hc-read .icon { width: 13px; height: 13px; }
.hc-read .r-rain { color: var(--rain); font-weight: 700; }
.hc-read .r-past { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-left: 4px; }
.hc-body { position: relative; }
.hc-axis-svg { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; overflow: visible; font-family: inherit; }
.hc-axis-bg { fill: var(--surface); }
.hc-axis-edge { stroke: var(--line); }
.hc-scroll { margin-left: 60px; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; }
.hc-svg { display: block; touch-action: pan-x; cursor: crosshair; font-family: inherit; }
.hc-ptitle { fill: var(--muted); font-size: 10.5px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.hc-tick-lbl { fill: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.hc-tick-lbl.is-freeze { fill: var(--snow); font-weight: 700; }
.hc-tick-lbl.is-elev { fill: var(--muted); font-weight: 700; }
.hc-tick-lbl.is-mid { fill: var(--red-text); }
.hc-rain-key { fill: var(--rain); opacity: .8; }
.hc-grid { stroke: var(--line); stroke-width: 1; opacity: .7; }
.hc-grid.is-freeze { stroke: var(--snow); stroke-dasharray: 3 4; opacity: .8; }
.hc-grid.is-elev { stroke: var(--faint); stroke-dasharray: 4 4; opacity: .9; }
.hc-grid.is-mid { stroke: var(--red); opacity: .8; }
.hc-night { fill: var(--text); opacity: .06; }
.hc-past { fill: var(--bg); opacity: .35; }
.hc-day { stroke: var(--line); stroke-width: 1; }
.hc-daylbl { fill: var(--text); font-size: 11px; font-weight: 700; }
.hc-tick { fill: var(--faint); font-size: 9px; }
.hc-snow { fill: var(--snow); }
.hc-rain { fill: var(--rain); opacity: .85; }
.hc-rain-track { fill: none; stroke: var(--line); }
.hc-temp { fill: none; stroke: #f08a5d; stroke-width: 2; stroke-linejoin: round; }
.hc-fzl { fill: none; stroke: var(--rain); stroke-width: 2; stroke-linejoin: round; }
.hc-wind { fill: none; stroke: var(--wind); stroke-width: 2; stroke-linejoin: round; }
.hc-gust { fill: none; stroke: var(--wind); stroke-width: 1; stroke-dasharray: 2 3; opacity: .8; }
.hc-now { stroke: var(--red); stroke-width: 1.5; }
.hc-nowlbl { fill: var(--red-text); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.hc-pastlbl { fill: var(--faint); font-size: 10px; font-weight: 700; }
.hc-cursor { stroke: var(--text); stroke-width: 1; opacity: .6; pointer-events: none; }

/* Last 48 h + SNOTEL */
.notes { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.notes li, .card-note { border-radius: 10px; padding: 9px 12px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); border-left-width: 4px; }
.card-note { font-size: 12.5px; margin: 0; padding: 7px 10px; background: var(--surface-2); }
.notes .note-warn, .card-note.note-warn { border-left-color: var(--wind); }
.notes .note-bad, .card-note.note-bad { border-left-color: var(--rain); }
.notes .note-good { border-left-color: var(--good); }
.notes .note-ok { border-left-color: var(--faint); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.stat-num { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-num small { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 3px; }
.stat.is-rain .stat-num { color: var(--rain); }
.stat.is-up .stat-num { color: var(--good); }
.stat.is-down .stat-num { color: var(--wind); }
.snotel { margin-top: 18px; }
.spark { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 120px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 10px 6px; margin-bottom: 8px; }
.spark-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; min-width: 0; }
.spark-val { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.spark-bar { display: block; background: var(--snow); border-radius: 4px 4px 2px 2px; min-height: 2px; flex-shrink: 0; max-height: calc(100% - 34px); }
.spark-lbl { font-size: 10px; color: var(--faint); margin-top: 3px; }
.small { font-size: 12px; }

/* Go-now banner */
.banner.go-now { border-color: var(--red); background: radial-gradient(130% 160% at 0% 0%, rgba(212, 14, 30, .35), transparent 65%), var(--surface); }
.banner.go-now .banner-eyebrow { color: #fff; background: var(--red); display: inline-flex; padding: 3px 9px; border-radius: 999px; }
.verdict .v-warn b { color: var(--wind); }
.nd-pills { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* Settings alert blocks */
.alert-block { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.alert-block h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }

/* Elevation table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.el-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.el-table th, .el-table td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.el-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; vertical-align: bottom; }
.el-table th small, .el-table td small { display: block; font-size: 11px; font-weight: 500; color: var(--faint); text-transform: none; letter-spacing: 0; }
.el-table tbody th { text-align: left; font-weight: 700; }
.el-table td { font-weight: 700; }
.el-table td .icon { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.el-table .el-powder { color: var(--red-text); background: var(--red-glow); }
.el-table .el-rain { color: var(--rain); }
.el-table .el-zero { color: var(--faint); }
.el-table tr:last-child th, .el-table tr:last-child td { border-bottom: 0; }
.el-sum th, .el-sum td { background: var(--surface-2); }

/* Webcams */
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; }
.cam { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cam-open { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); border: 0; padding: 0; cursor: zoom-in; }
.cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 9px 12px; }
.cam figcaption a { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); text-decoration: none; }
.cam figcaption a:hover { color: var(--text); }
.cam figcaption .icon { width: 12px; height: 12px; }
.cam.cam-off { display: none; }
.cam-links a { display: inline-flex; align-items: center; gap: 3px; margin-right: 10px; }
.cam-links .icon { width: 11px; height: 11px; }

/* Webcam lightbox */
.lightbox { width: min(1400px, 96vw); max-width: none; max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #000; color: #f0f0f0; overflow: hidden; }
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #161616; }
.lb-actions { display: flex; gap: 8px; }
.lightbox .btn { background: #242424; color: #f0f0f0; border-color: #323232; }
.lightbox .btn .icon { width: 13px; height: 13px; }
.lightbox .btn[hidden] { display: none; }
.lb-stage { position: relative; display: grid; place-items: center; background: #000; }
.lb-img { display: block; max-width: 100%; max-height: calc(94vh - 100px); object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav .icon { width: 22px; height: 22px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-count { margin: 0; padding: 6px 12px 10px; font-size: 12px; color: #a6a6a6; background: #161616; }

/* NWS */
.nws { margin: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nws-row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.nws-row:last-child { border-bottom: 0; }
.nws dt { font-weight: 800; font-size: 14px; }
.nws dt small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.nws dd { margin: 0; font-size: 14px; color: var(--muted); }
.nws.collapsed .more { display: none; }
#nws-more { margin-top: 10px; }

/* ---- Settings / forms ---- */
.page-h { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em; margin: 22px 0 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.panel h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; margin: 0 0 8px; }
.panel h2 .icon { width: 18px; height: 18px; color: var(--red-text); }
.panel p { margin: 0 0 10px; }
.panel.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between p { margin: 0; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row input { flex: 1 1 220px; }
input[type="email"], .select {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 42px;
}
input[type="email"]:focus, .select:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
.select { width: 100%; max-width: 380px; }
.form-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.form-msg.ok { color: var(--good); }
.form-msg.err { color: var(--red-text); }
.form-msg a { color: inherit; }
.callout { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 10px 0 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); flex-shrink: 0; }
.checks { border: 0; padding: 0; margin: 6px 0 12px; }
.checks:disabled { opacity: .5; }

.order-list { list-style: none; padding: 0; margin: 10px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.order-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
.order-row.fav { background: color-mix(in srgb, #f5b301 6%, transparent); }
.order-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; }
.order-name small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.order-moves { display: flex; gap: 6px; }
.order-divider { padding: 6px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); background: var(--surface-2); border-bottom: 1px solid var(--line); }

/* Support */
.support .lead { font-size: 18px; font-weight: 700; }
.support-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.support-option { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--surface-2); }
.support-option.featured { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); background: radial-gradient(120% 140% at 0% 0%, var(--red-glow), transparent 60%), var(--surface-2); }
.support-option .btn { margin-top: auto; width: 100%; }
.price { font-size: 30px; font-weight: 800; margin: 0; line-height: 1.1; }
.price small { font-size: 14px; color: var(--muted); font-weight: 600; }
.fine { font-size: 12px; color: var(--faint); }
.support-hero { margin-top: 22px; }

@media (max-width: 720px) {
  .threshold-label { display: none; }
  .nav-link span { display: none; }
  .nav-link { padding: 8px; }
  .brand span { font-size: 17px; }
  .top-inner { gap: 8px 10px; }
  .nws-row { grid-template-columns: 1fr; gap: 2px; }
  .legend-note { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .banner { padding: 16px; }
  .card { padding: 14px; }
  .chart { gap: 4px; height: 130px; }
  .bar-labels { gap: 4px; }
  .bar-val { font-size: 11px; }
  .bar-label { font-size: 10px; }
  .hero-now { text-align: left; }
}

/* ---- Admin ---- */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head .page-h { margin-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 14px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.kpi-num { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.kpi-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.agrid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.agrid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
.astack { display: grid; gap: 14px; }
.astack .panel { margin-bottom: 0; }
.achart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.achart-head h2 { margin: 0; }
.achart-read { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 1.5em; }
.ab-plot { display: grid; grid-template-columns: auto 1fr; gap: 8px; height: 150px; margin-top: 12px; }
.ab-grid { display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.ab-bars { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0 calc(50% - 1px), var(--line) calc(50% - 1px) 50%); }
.ab-col { flex: 1; height: 100%; display: flex; align-items: flex-end; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; }
.ab-bar { display: block; width: 100%; background: var(--snow); border-radius: 4px 4px 0 0; }
.ab-col:hover .ab-bar, .ab-col:focus-visible .ab-bar { filter: brightness(1.15); }
.ab-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin: 4px 0 0 36px; }
.hbars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 7px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-label a { text-decoration: none; }
.hb-label a:hover { text-decoration: underline; }
.hb-track { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.hb-fill { display: block; height: 100%; background: var(--snow); border-radius: 4px; }
.hb-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-val small { color: #f5b301; font-weight: 700; margin-left: 4px; display: inline-flex; align-items: center; gap: 2px; }
.hb-val .icon, .panel .muted .icon { width: 11px; height: 11px; color: #f5b301; vertical-align: -1px; }
.atable { width: 100%; border-collapse: collapse; font-size: 13px; }
.atable th, .atable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.atable thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.atable tbody th { font-weight: 600; }
.atable .num { text-align: right; font-variant-numeric: tabular-nums; }
.atable .wrap-cell { white-space: normal; min-width: 160px; }
.atable a { color: inherit; }
#users .form-row input { min-width: 200px; }
input[type="search"] { font: inherit; font-size: 14px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
code { font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.agrid2, .agrid3 { margin-bottom: 14px; }

/* Region chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .icon { width: 13px; height: 13px; color: #f5b301; }
.chip-n { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chip.on .chip-n { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
.chip-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.empty { color: var(--muted); grid-column: 1 / -1; padding: 24px 0; }
@media (max-width: 560px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
}

/* Sign in: header button, account avatar, big sign-in card */
.header-signin { padding: 8px 14px; font-size: 13px; }
.header-signin .icon { width: 15px; height: 15px; }
.account-link { display: inline-flex; text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 800; font-size: 15px; }
.account-link:hover .avatar { filter: brightness(1.1); }

.signin-card {
  position: relative;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center;
  background: radial-gradient(120% 140% at 0% 0%, var(--red-glow), transparent 60%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line));
  border-radius: 18px; padding: 28px; margin: 18px 0;
}
.signin-card h2 { margin: 0 0 14px; font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.signin-card .banner-eyebrow { margin-bottom: 8px; }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.benefits li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; font-size: 15px; }
.benefits b { font-weight: 800; }
.bf-text { color: var(--muted); }
.bf-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--red) 16%, var(--surface-2)); color: var(--red-text); }
.bf-icon .icon { width: 19px; height: 19px; }
.signin-form { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.signin-form label { font-weight: 700; font-size: 14px; }
.signin-form input { font-size: 17px; min-height: 50px; padding: 12px 14px; width: 100%; background: var(--surface); }
.signin-form .btn { width: 100%; }
.signin-form .btn .icon { width: 18px; height: 18px; }
.signin-fine { margin: 0; font-size: 12px; color: var(--faint); }
.signin-form .form-msg { margin: 0; }
.signin-form .form-msg.ok { color: var(--text); background: color-mix(in srgb, var(--good) 14%, transparent); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); border-radius: 10px; padding: 10px 12px; }
.signin-dismiss { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.signin-dismiss:hover { background: var(--surface-2); color: var(--text); }
.signin-card.compact { padding: 22px 24px; gap: 22px; }
.signin-card.compact h2 { font-size: clamp(22px, 3vw, 28px); }
.signin-card.compact .benefits { gap: 10px; }
.signin-card.compact .benefits li { font-size: 14px; }
.signin-card.compact .bf-text::before { content: " "; }
.signin-page { max-width: 980px; margin: 0 auto; }
.signin-page .signin-card { margin-top: 26px; }
.signin-after { text-align: center; font-size: 13px; }
@media (max-width: 760px) {
  .signin-card { grid-template-columns: 1fr; padding: 22px 18px; gap: 18px; }
  .signin-card.compact .benefits li:nth-child(n+3) { display: none; }
  .header-signin span, .header-signin { font-size: 13px; }
}

/* Appearance picker */
.seg-lg button { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 8px 14px; }
.seg-lg .icon { width: 15px; height: 15px; }
@media (max-width: 480px) { .seg-lg { display: flex; } .seg-lg button { flex: 1; justify-content: center; padding: 8px 6px; } }
