*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font-ui); font-feature-settings: "tnum" 1;
  background-image: radial-gradient(1200px 500px at 85% -10%, var(--bg-glow), transparent 70%);
  background-repeat: no-repeat; min-height: 100vh;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 1000; background: var(--header); color: #fff;
  border-bottom: 1px solid #1d1d1f;
}
.topbar-in { max-width: none; margin: 0; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-word { font-family: var(--font-brand); font-weight: 700; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.brand-word .o { color: var(--brand-red-hi); }
.brand-sub { font-size: 10.5px; letter-spacing: .2em; color: #9a9aa0; font-weight: 600; margin-top: 3px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #c9c9ce; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.on { color: #fff; background: #1b1b1e; }
.nav .btn-red { background: var(--brand-red); color: #fff; margin-left: 8px; }
.nav .btn-red:hover { background: var(--brand-red-hi); }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid #2a2a2e; background: #121214; display: grid; place-items: center; cursor: pointer; color: #ddd; }
.icon-btn:hover { background: #1d1d20; }
.menu-btn { display: none; }

/* ── Page ────────────────────────────────────────────────── */
.page { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) 48px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 34px 0 20px; flex-wrap: wrap; }
.hero h1 { margin: 0; font-family: var(--font-brand); font-weight: 700; font-size: clamp(32px, 5.2vw, 56px); line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 .o { color: var(--brand-red-hi); }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); margin-top: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(63,185,80,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,185,80,.55); } 70% { box-shadow: 0 0 0 8px rgba(63,185,80,0); } 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); } }
.clock { display: flex; align-items: baseline; gap: 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.clock b { color: var(--ink); font-weight: 600; }
.clock .z { color: var(--ink-2); }
.clock .z::after { content: ""; }
.clock .sep { color: var(--faint); }

.crumbs { padding-top: 22px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* ── Alerts ──────────────────────────────────────────────── */
.alerts { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 12px; padding: 12px 18px; margin-bottom: 20px; }
.alerts.has { border-left-color: var(--brand-red-hi); }
.alerts .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.alerts .msg { font-weight: 600; flex: 1; min-width: 0; }
.alerts .chk { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.alert-list { display: flex; flex-wrap: wrap; gap: 8px; }
.alert-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: var(--raised); font-size: 13px; font-weight: 600; }
.alert-pill i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
details.alert-more summary { cursor: pointer; font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; margin-top: 6px; }
.alert-detail { font-size: 13px; color: var(--ink-2); margin-top: 8px; display: grid; gap: 6px; }

/* ── Cards ───────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; position: relative; }
.card.red-top { border-top: 3px solid var(--brand-red); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.label { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .12em; padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.link { color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.link:hover { color: var(--brand-red-hi); }

.seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--brand-red); color: #fff; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 8px 14px; border-radius: 10px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--faint); }
.btn.red { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.btn.red:hover { background: var(--brand-red-hi); }

/* ── Home layout ─────────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.side { display: grid; gap: 20px; }
.map-card { padding: 0; overflow: hidden; }
.map-card .card-head { padding: 16px 18px 0; }
.map-card .obsmap { height: 500px; border-top: 1px solid var(--line); margin-top: 14px; }

/* My station card */
.mystn-name { font-family: var(--font-num); font-size: 26px; font-weight: 700; line-height: 1.05; text-decoration: none; display: block; }
.mystn-name:hover { color: var(--brand-red-hi); }
.mystn-temp { display: flex; align-items: flex-start; gap: 4px; margin: 6px 0 2px; }
.mystn-temp .v { font-family: var(--font-num); font-weight: 600; font-size: 84px; line-height: .9; }
.mystn-temp .u { font-family: var(--font-num); font-size: 30px; color: var(--muted); margin-top: 6px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 14px; }
.kv div { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.kv span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.kv b { font-family: var(--font-num); font-size: 22px; font-weight: 600; }
.card-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* Leaders */
.leaders { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.leaders li a { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; text-decoration: none; }
.leaders li a:hover { background: var(--surface-2); }
.leaders .rk { font-family: var(--font-num); color: var(--faint); font-weight: 700; font-size: 16px; }
.leaders .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaders .tm { font-size: 11.5px; color: var(--muted); }
.leaders .vl { font-family: var(--font-num); font-size: 24px; font-weight: 600; }
.leaders li:first-child .vl { color: var(--brand-red-hi); }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.stat .v { font-family: var(--font-num); font-size: 40px; font-weight: 600; line-height: 1; margin-top: 8px; }
.stat .s { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s a { color: var(--ink-2); text-decoration: none; }
.stat .s a:hover { color: var(--brand-red-hi); }

/* ── Map pieces ──────────────────────────────────────────── */
.obsmap { background: #0b0d10; position: relative; }
.map-chip { position: absolute; top: 12px; left: 12px; background: rgba(10,10,12,.82); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; letter-spacing: .02em; border: 1px solid rgba(255,255,255,.08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.map-bar { position: absolute; right: 10px; top: 54px; bottom: 34px; width: 46px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.map-bar-unit { font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000; }
.map-bar-track { position: relative; flex: 1; width: 100%; }
.map-bar-grad { position: absolute; right: 0; top: 0; bottom: 0; width: 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); }
.map-bar-track span { position: absolute; right: 18px; transform: translateY(-50%); font: 700 11px/1 var(--font-num); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; white-space: nowrap; }
.pop-name { font: 700 17px/1.1 var(--font-num); letter-spacing: .02em; }
.pop-temp { font: 600 44px/1 var(--font-num); margin: 6px 0 8px; }
.pop-row { display: flex; justify-content: space-between; border-top: 1px solid #26262a; padding: 5px 0; color: #b9b9c0; }
.pop-row b { color: #fff; font-weight: 600; }
.pop-time { color: #8b8b93; font-size: 11.5px; margin-top: 4px; }
.pop-link { display: block; margin-top: 10px; text-align: center; background: var(--brand-red); color: #fff !important; text-decoration: none; padding: 7px; border-radius: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* Full screen map */
.fullmap { position: fixed; inset: 60px 0 0 0; display: grid; grid-template-rows: auto 1fr; background: #0b0d10; }
.fullmap .panel { background: #111113; border-right: 1px solid #222226; overflow: auto; padding: 14px 0; color: #e6e6e8; }
.fullmap .panel h3 { margin: 10px 18px 6px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8b8b93; }
.fullmap .panel button { display: block; width: calc(100% - 20px); margin: 2px 10px; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 8px; color: #c9c9ce; cursor: pointer; font-size: 14.5px; border-left: 3px solid transparent; }
.fullmap .panel button:hover { background: #1a1a1d; color: #fff; }
.fullmap .panel button.on { background: #1c1c20; color: #fff; border-left-color: var(--brand-red-hi); font-weight: 600; }
.fullmap .panel .note { margin: 18px; font-size: 12px; color: #77777f; line-height: 1.5; }
.fullmap .obsmap { height: 100%; }
body.is-full .page { padding: 0; max-width: none; }
body.is-full footer { display: none; }
/* Full-width pages (Map, Radar): the header runs edge to edge, flush left like the page. */
/* The header runs edge to edge (logo at the left, menu at the right); the page
   content and the footer are centered in a 1320 px column. */


/* ── Station page ────────────────────────────────────────── */
.stn-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 10px 0 20px; }
.stn-head h1 { margin: 0; font-family: var(--font-num); font-weight: 700; font-size: clamp(36px, 5.4vw, 58px); line-height: .95; text-transform: uppercase; letter-spacing: .02em; }
.stn-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stn-meta b { color: var(--ink-2); }
.stn-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.cond { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2.2fr); gap: 20px; }
.hero-temp { display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.hero-temp .big { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; }
.hero-temp .big .v { font-family: var(--font-num); font-weight: 600; font-size: clamp(96px, 13vw, 150px); line-height: .85; letter-spacing: -.01em; }
.hero-temp .big .u { font-family: var(--font-num); font-size: 40px; color: var(--muted); margin-top: 8px; }
.hero-temp .feels { font-size: 17px; color: var(--ink-2); margin-top: 10px; }
.hero-temp .hilo { display: flex; gap: 24px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.hero-temp .hilo div span { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hero-temp .hilo div b { font-family: var(--font-num); font-size: 30px; font-weight: 600; }
.hero-temp .hilo div small { color: var(--muted); margin-left: 6px; font-size: 12px; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1240px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand-red); border-radius: 14px; padding: 16px; min-width: 0; }
.tile .val { font-family: var(--font-num); font-size: 40px; font-weight: 600; line-height: 1; margin-top: 12px; display: flex; align-items: baseline; gap: 4px; }
.tile .val small { font-size: 16px; color: var(--muted); font-weight: 500; }
.tile .sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.tile .bar { height: 5px; border-radius: 3px; background: var(--raised); margin-top: 10px; overflow: hidden; }
.tile .bar i { display: block; height: 100%; background: linear-gradient(90deg, #36c0a6, #2c5fd6); }
.wind-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.compass { width: 54px; height: 54px; flex: none; }

.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.cam { padding: 0; overflow: hidden; }
.cam .card-head { padding: 16px 18px 0; }
.cam img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-top: 14px; background: #000; }
.cam .cap { padding: 10px 18px 14px; font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.cam-empty { aspect-ratio: 16/9; display: grid; place-items: center; color: var(--muted); margin-top: 14px; background: var(--surface-2); }

.soil { width: 100%; border-collapse: collapse; font-size: 14px; }
.soil th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 0 8px; }
.soil td { padding: 9px 0; border-top: 1px solid var(--line-soft); }
.soil td.n { font-family: var(--font-num); font-size: 20px; font-weight: 600; }
.soil .mbar { height: 6px; border-radius: 3px; background: var(--raised); width: 80px; display: inline-block; vertical-align: middle; margin-left: 8px; overflow: hidden; }
.soil .mbar i { display: block; height: 100%; background: #2c8fd6; }

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.chart { height: 230px; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.uplot { font-family: var(--font-ui); }
.u-legend { display: none; }
.u-tooltip { position: absolute; pointer-events: none; z-index: 5; background: rgba(12,12,14,.92); color: #fff; border: 1px solid #333; border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; }

.fc { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.fc-day { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; text-align: center; min-width: 0; }
.fc-day .d { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.fc-day img { width: 52px; height: 52px; border-radius: 10px; margin: 10px auto; }
.fc-day .t { font-family: var(--font-num); font-size: 26px; font-weight: 600; }
.fc-day .t span { color: var(--muted); font-size: 20px; margin-left: 6px; }
.fc-day .w { font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 6px; min-height: 32px; }
.fc-day .p { font-size: 12px; color: #5fb7f2; font-weight: 600; margin-top: 4px; }
.fc-text { margin-top: 16px; display: grid; gap: 10px; }
.fc-text p { margin: 0; font-size: 14px; color: var(--ink-2); }
.fc-text b { color: var(--ink); }

/* ── Stations list ───────────────────────────────────────── */
.search { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 15px; color: var(--ink); outline: none; }
.search:focus { border-color: var(--brand-red); }
.stn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 18px; }
.stn-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; }
.stn-item:hover { border-color: var(--brand-red); }
.stn-item .nm { font-weight: 600; }
.stn-item .id { font-size: 11.5px; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.stn-item .t { font-family: var(--font-num); font-size: 32px; font-weight: 600; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 14px; }
.section-title h2 { margin: 0; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }

.skeleton { color: transparent !important; background: linear-gradient(90deg, var(--raised), var(--surface-2), var(--raised)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── Footer ──────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); margin-top: 40px; }
footer .in { max-width: 1320px; margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--brand-red-hi); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; }
  .side { grid-template-columns: 1fr 1fr; }
  .fc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cond, .two, .charts { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fullmap .panel { display: flex; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid #222; }
  .fullmap .panel h3, .fullmap .panel .note { display: none; }
  .fullmap .panel button { width: auto; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; margin: 0 2px; }
  .fullmap .panel button.on { border-bottom-color: var(--brand-red-hi); }
}
@media (max-width: 720px) {
  .menu-btn { display: grid; margin-left: auto; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--header); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; border-bottom: 1px solid #222; }
  .nav.open { display: flex; }
  .nav .btn-red { margin: 6px 0 0; text-align: center; }
  .side { grid-template-columns: 1fr; }
  .map-card .obsmap { height: 340px; }
  .fc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alerts { flex-wrap: wrap; gap: 6px 12px; }
  .alerts .msg { order: 3; flex-basis: 100%; }
  .alerts .chk { margin-left: auto; }
  .hero { padding-top: 24px; }
  .brand-sub { display: none; }
  .stat .v { font-size: 32px; }
}
@media (max-width: 420px) {
  .tile .val { font-size: 32px; }
  .brand-word { font-size: 15px; }
  .stat-row { gap: 12px; }
}
.stn-item .t { display: flex; align-items: center; gap: 10px; }
.tdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px var(--surface-2); }

.stn-right { display: grid; gap: 12px; justify-items: end; }
@media (max-width: 900px) { .stn-right { justify-items: start; } }
@media (max-width: 720px) {
  .map-bar { width: 34px; right: 4px; top: 50px; }
  .map-bar-grad { width: 9px; }
  .map-bar-track span { right: 13px; font-size: 9.5px; }
  .map-chip { font-size: 12.5px; padding: 6px 10px; top: 8px; left: 8px; }
}

/* ── MapLibre map ────────────────────────────────────────── */
.obsmap .maplibregl-ctrl-group { background: rgba(16,16,18,.9); border: 1px solid #2c2c31; box-shadow: none; }
.obsmap .maplibregl-ctrl-group button { width: 32px; height: 32px; }
.obsmap .maplibregl-ctrl-group button + button { border-top: 1px solid #2c2c31; }
.obsmap .maplibregl-ctrl-icon { filter: brightness(0) invert(1); opacity: 1; }
.obsmap .maplibregl-ctrl-attrib { background: rgba(10,10,12,.75); color: #999; font-size: 10px; }
.obsmap .maplibregl-ctrl-attrib a { color: #bbb; }
.obsmap .maplibregl-ctrl-attrib-button { filter: invert(1); }
.obsmap .maplibregl-control-container > div { z-index: 5; }
.obsmap .maplibregl-cooperative-gesture-screen { z-index: 6; font-family: var(--font-ui); }
.maplibregl-popup { z-index: 7; }
.obs-pop .maplibregl-popup-content { background: #141416; color: #f2f2f3; border-radius: 12px; border: 1px solid #2c2c31; box-shadow: 0 10px 30px rgba(0,0,0,.5); padding: 14px 16px; min-width: 200px; font-size: 13px; }
.obs-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: #141416; }
.obs-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: #141416; }
.obs-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: #141416; }
.obs-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: #141416; }
.pop-src { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #29c6f0; font-weight: 700; margin-bottom: 2px; }
.map-chip, .map-bar { z-index: 4; }
.sl-pane { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; transition: opacity .12s; }
.sl-pane.panning { opacity: 0; }

/* ── Map controls rail ────────────────────────────────────── */
.rail-root { position: absolute; z-index: 12; top: 54px; left: 12px; font-family: var(--font-ui); }   /* above the ring nodes and grips (8 to 9) */
.rail { display: flex; flex-direction: column; gap: 4px; padding: 5px; background: rgba(14,14,16,.88); border: 1px solid #2c2c31; border-radius: 12px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); width: max-content; }
.rail-sep { height: 1px; background: #2c2c31; margin: 2px 4px; }
.rail-item { position: relative; display: flex; align-items: center; }
.rail-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #b9b9c0; display: grid; place-items: center; cursor: pointer; position: relative; }
.rail-btn svg { width: 18px; height: 18px; }
.rail-btn:hover { background: #222226; color: #fff; }
.rail-btn.on { background: var(--brand-red); color: #fff; }
.rail-btn.open { background: #2a2a2f; color: #fff; }
.rail-btn[data-label]:hover::after { content: attr(data-label); position: absolute; left: calc(100% + 30px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: #000; color: #fff; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 6px; pointer-events: none; }
.rail-more { display: none; position: absolute; left: calc(100% + 4px); top: 50%; transform: translateY(-50%); width: 20px; height: 26px; border: 1px solid #2c2c31; border-radius: 6px;
  background: rgba(14,14,16,.92); color: #ddd; cursor: pointer; padding: 0; place-items: center; }
.rail-item.active .rail-more { display: grid; }
.rail-more svg { width: 13px; height: 13px; }
.rail-more.open { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.rail-pop { position: absolute; left: calc(100% + 30px); top: 0; width: 256px; background: rgba(14,14,16,.95); color: #e6e6e8; border: 1px solid #2c2c31; border-radius: 12px; padding: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pop-h { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 9px; }
.pop-h span { color: #8b8b93; font-weight: 600; letter-spacing: .12em; margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.chip { border: 1px solid #333338; background: #1b1b1e; color: #c9c9ce; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.chip:hover { color: #fff; border-color: #4a4a50; }
.chip.on { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.chip.ic svg { width: 13px; height: 13px; }
.sl { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; font-size: 12px; color: #a9a9b0; margin: 2px 0 6px; }
.sl input { width: 100%; accent-color: var(--brand-red); }
.mrms-leg { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 3px; margin-top: 4px; font: 600 10px/1.1 var(--font-num); color: #a9a9b0; }
.mrms-leg div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mrms-leg img { width: 100%; height: 8px; object-fit: cover; border-radius: 2px; }
#stream-legend { display: none; margin-top: 6px; }
#stream-legend:not(:empty) { display: block; }
#stream-status:not(:empty) { font-size: 12px; color: #e3b341; margin-top: 6px; }
.stream-bar { height: 8px; border-radius: 3px; border: 1px solid #3a3a40; }
.stream-bar-2 { margin-top: 6px; }
.stream-ticks { display: flex; justify-content: space-between; font: 600 10px/1 var(--font-num); color: #9a9aa2; margin-top: 3px; }
.stream-unit { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #6e6e76; text-align: right; margin-top: 1px; }
.adv-key { display: flex; flex-direction: column; gap: 4px; }
.adv-key-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #b9b9c0; }
.adv-swatch { width: 18px; height: 8px; border-radius: 2px; flex-shrink: 0; border: 1px solid #3a3a40; }

/* Streamline canvases (from SitAware's css/components.css) */
.streamlines-canvas { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.streamlines-canvas.active { opacity: 1; }
.streamlines-canvas.moving { opacity: 0; transition: opacity .12s ease; }
.streamlines-canvas.stain { opacity: 0; filter: blur(2.5px); }
.streamlines-canvas.stain.moving { opacity: 0 !important; transition: opacity .12s ease; }

@media (max-width: 720px) {
  .rail-root { top: 46px; left: 8px; }
  .rail-btn { width: 32px; height: 32px; }
  .rail-btn[data-label]:hover::after { display: none; }
  .rail-pop { width: min(256px, calc(100vw - 110px)); }
}

.rail-btn.dot::before { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #e3b341; box-shadow: 0 0 0 2px rgba(14,14,16,.9); }
.rail-pop .pop-h + .chips + .pop-h { margin-top: 4px; }

.pop-note { margin: 2px 0 0; font-size: 11.5px; line-height: 1.4; color: #8b8b93; }
.pop-note a { color: #c9c9ce; }

/* ── Map toolbar: networks, stacked variables ─────────────── */
.map-tb { padding: 10px 18px 12px; display: grid; gap: 8px; }
.map-tb.full { background: #111113; border-bottom: 1px solid #222226; padding: 10px 16px; }
.tb-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tb-label { flex: none; width: 74px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.map-tb.full .tb-label { color: #8b8b93; }
.tb-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; flex: 1; }
.tchip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: 700 11.5px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-tb.full .tchip { border-color: #2c2c31; background: #1a1a1d; color: #c9c9ce; }
.tchip:hover { color: var(--ink); border-color: var(--faint); }
.tchip.net.on { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.tchip.var.on { border-color: var(--vc); color: var(--ink); box-shadow: inset 0 -2px 0 var(--vc); }
.map-tb.full .tchip.var.on { color: #fff; }
.tchip.var.shade { background: var(--brand-red); border-color: var(--brand-red); color: #fff; box-shadow: none; }
.tchip i { font-style: normal; font: 700 10px/1 var(--font-num); width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--vc); color: #111; }
.tb-shade { flex: none; display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tb-shade select, .tb-inline select { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: 600 12px var(--font-ui); letter-spacing: 0; text-transform: none; }
.map-tb.full .tb-shade select, .map-tb.full .tb-inline select { background: #1a1a1d; color: #eee; border-color: #2c2c31; }
.tb-inline { display: inline-flex; gap: 4px; }
.nav .nav-item { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #c9c9ce; padding: 8px 12px; cursor: default; }
/* Legend on a small backing so it does not get lost in the map. */
.map-bar { background: rgba(12,12,14,.72); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 8px 6px 10px; width: 54px; right: 8px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.map-bar-track span { text-shadow: none; }
@media (max-width: 860px) {
  .tb-row { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .tb-label { width: auto; }
  .tb-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex-basis: 100%; }
  .tb-chips::-webkit-scrollbar { display: none; }
}
@media (max-width: 720px) {
  .map-bar { width: 42px; right: 4px; padding: 6px 4px 8px; }
}

.tchip.opts { flex: none; margin-left: auto; border-color: var(--line); }
.tchip.opts svg { width: 14px; height: 14px; }
.map-tb.full .tchip.opts { border-color: #3a3a40; }

.sl { grid-template-columns: 78px 1fr 36px; }
.sl b { font: 600 12px/1 var(--font-num); color: #fff; text-align: right; }

/* The legend is display:flex, which would otherwise override [hidden]. */
.map-bar[hidden] { display: none; }

.tb-plot { flex: none; display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tb-plot span { margin-right: 4px; }
.tchip.mode.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.map-tb.full .tchip.mode.on { background: #fff; border-color: #fff; color: #111; }
@media (max-width: 860px) { .tb-plot { flex-basis: 100%; } }

.tchip.reset { flex: none; margin-left: auto; }
.tchip.reset svg { width: 14px; height: 14px; }
.tchip.reset + .tchip.opts { margin-left: 0; }
/* Rings show/hide sits just left of Reset. Off: dimmed with a slash. */
.tchip.rings-vis + .tchip.reset, .tchip.rings-vis + .tchip.rings-vis { margin-left: 0; }
.tchip.rings-vis, .rail-btn[data-act="ringsvis"], .rail-btn[data-act="nwsvis"], .rail-btn[data-act="shpvis"] { position: relative; }
.tchip.rings-vis.off, .rail-btn[data-act="ringsvis"].off, .rail-btn[data-act="nwsvis"].off, .rail-btn[data-act="shpvis"].off { opacity: 1; }
/* Show/hide buttons: in color when on, gray when off (no slash). */

.map-tb:not(.full) .tchip.rings-vis .tb-txt { display: none; }

/* Thin legend numbers. */
.map-bar-track span { font: 400 10.5px/1 var(--font-ui); letter-spacing: .01em; color: #e6e6e8; }
.map-bar-unit { font-weight: 500; }

/* ── Legend: horizontal, bottom center, collapsible ───────── */
.map-legend { position: absolute; z-index: 4; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(560px, calc(100% - 140px));
  background: rgba(12,12,14,.86); color: #e6e6e8; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 8px 14px 10px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-family: var(--font-ui); user-select: none; }
.map-legend[hidden] { display: none; }
.lg-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lg-toggle { width: 22px; height: 22px; border: 0; background: transparent; color: #9a9aa2; cursor: pointer; display: grid; place-items: center; padding: 0; border-radius: 6px; }
.lg-toggle:hover { background: #222226; color: #fff; }
.lg-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.map-legend.closed .lg-toggle svg { transform: rotate(-90deg); }
.lg-title { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-unit { font-size: 11px; font-weight: 600; color: #7fb6ff; }
.lg-hint { margin-left: auto; font-size: 10.5px; color: #77777f; white-space: nowrap; }
.lg-range { margin-left: auto; font: 500 11px var(--font-ui); color: #ffd84a; white-space: nowrap; }
.lg-clear { border: 1px solid #3a3a40; background: transparent; color: #c9c9ce; font: 600 10.5px var(--font-ui); padding: 3px 8px; border-radius: 999px; cursor: pointer; }
.lg-clear:hover { color: #fff; border-color: #6a6a70; }
.lg-body { margin-top: 8px; }
.map-legend.closed { width: auto; padding: 5px 10px 5px 6px; }
.map-legend.closed .lg-body, .map-legend.closed .lg-hint, .map-legend.closed .lg-clear { display: none; }
.lg-track { position: relative; height: 12px; margin: 0 7px; }
.lg-grad { position: absolute; inset: 0; border-radius: 4px; border: 1px solid rgba(255,255,255,.18); }
.lg-dim { position: absolute; top: -1px; bottom: -1px; background: rgba(10,10,12,.72); }
.lg-handle { position: absolute; top: -4px; width: 8px; height: 20px; margin-left: -4px; background: #ffd84a; border: 1px solid #5a4700; border-radius: 3px; cursor: ew-resize; touch-action: none; }
.lg-handle b { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font: 600 10.5px var(--font-ui); color: #ffd84a; white-space: nowrap; }
.lg-ticks { position: relative; height: 13px; margin: 5px 7px 0; }
.lg-ticks span { position: absolute; transform: translateX(-50%); font: 400 10px/1 var(--font-ui); color: #b9b9c0; white-space: nowrap; }
@media (max-width: 720px) {
  .map-legend { width: calc(100% - 96px); left: 50%; bottom: 8px; padding: 6px 10px 8px; }
  .lg-hint { display: none; }
  .lg-ticks span:nth-child(even) { display: none; }
}

/* Map credit (i): a razor thin outlined circle instead of a filled disc. */
.obsmap .maplibregl-ctrl-attrib.maplibregl-compact { background: transparent; box-shadow: none; }
.obsmap .maplibregl-ctrl-attrib.maplibregl-compact.maplibregl-compact-show { background: rgba(10,10,12,.78); }
.obsmap .maplibregl-ctrl-attrib-button { filter: none; background-color: transparent; background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.5' fill='none' stroke='%23e6e6e8' stroke-width='.8'/%3E%3Ccircle cx='10' cy='6.4' r='.9' fill='%23e6e6e8'/%3E%3Cpath d='M10 8.6v5.6' stroke='%23e6e6e8' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.obsmap.map-light .maplibregl-ctrl-attrib-button {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.5' fill='none' stroke='%23222' stroke-width='.8'/%3E%3Ccircle cx='10' cy='6.4' r='.9' fill='%23222'/%3E%3Cpath d='M10 8.6v5.6' stroke='%23222' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Toolbar View row */
.tb-view { gap: 14px; flex-wrap: wrap; }
.tb-view .tb-shade { margin-left: auto; }

/* ── Header: black bar, red wordmark, DSOC logo ──────────── */
.brand-word { color: #fff; }
/* Live count of Kentucky stations reporting, beside the title (js/stationcount.js). */
.brand-count { display: inline-flex; align-items: baseline; gap: 5px; margin-left: 10px; padding: 3px 9px; border-radius: 999px; background: var(--brand-red); color: #fff; font: 700 10.5px var(--font-ui); letter-spacing: .12em; vertical-align: 2px; }
.brand-count b { font: 700 13px var(--font-num, inherit); letter-spacing: .02em; }
.brand-count[hidden] { display: none; }
.dsoc-logo { flex: none; display: grid; place-items: center; height: 44px; padding: 2px 4px; border-radius: 8px; }
.dsoc-logo img { height: 34px; width: auto; display: block; }
.dsoc-logo:hover { background: #161618; }
@media (max-width: 720px) { .dsoc-logo { height: 38px; } .dsoc-logo img { height: 28px; } }
@media (max-width: 420px) { .dsoc-logo img { height: 24px; } }
/* The wordmark shrinks to fit beside the logo and menu button on small screens. */
.brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.brand > div { min-width: 0; }
.brand-word { overflow: hidden; text-overflow: ellipsis; }
.menu-btn { flex: none; }
@media (max-width: 720px) { .brand-word { font-size: clamp(12px, 3.4vw, 17px); letter-spacing: .05em; } .topbar-in { gap: 10px; } }
@media (max-width: 720px) { .brand-word { white-space: normal; text-overflow: clip; font-size: 15px; line-height: 1.1; } }

/* The streamline canvases are drawn as map layers; the DOM copies stay hidden. */
.sl-pane { visibility: hidden; }
/* (i) credit: only the thin circle, nothing around it. */
.obsmap .maplibregl-ctrl-attrib.maplibregl-compact { border: 0; box-shadow: none; outline: 0; min-height: 22px; padding: 0 22px 0 0; }
.obsmap .maplibregl-ctrl-attrib.maplibregl-compact::after, .obsmap .maplibregl-ctrl-attrib.maplibregl-compact::before { display: none; content: none; }
.obsmap .maplibregl-ctrl-attrib-button { border: 0; box-shadow: none; outline: 0; border-radius: 0; background-color: transparent !important; }
.obsmap .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner { display: none; }

.pop-h.sub { margin: 10px 0 4px; font-size: 10px; color: #b9b9c0; }
.sl b { min-width: 46px; }

/* ── Multi-panel full map ─────────────────────────────────── */
.panels { display: grid; gap: 2px; background: #000; min-height: 0; }
.panels.p1 { grid-template-columns: 1fr; }
.panels.p2 { grid-template-columns: 1fr 1fr; }
.panels.p4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.panel-cell { position: relative; min-width: 0; min-height: 0; }
.panel-cell .pmap { position: absolute; inset: 0; }
/* Every panel shows its own map title. */
.panel-var { position: absolute; z-index: 8; top: 10px; left: 10px; max-width: calc(100% - 20px);
  background: rgba(10,10,12,.86); color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 7px 10px; font: 700 13px var(--font-ui); }
.panels.p4 .map-legend, .panels.p2 .map-legend { width: min(420px, calc(100% - 100px)); }
@media (max-width: 860px) {
  .panels.p2, .panels.p4 { grid-template-columns: 1fr; grid-auto-rows: minmax(300px, 1fr); overflow-y: auto; }
}

/* ── Left map menu: variables by category, then tools ─────── */
.rail-root { top: 76px; left: 10px; bottom: 60px; display: flex; pointer-events: none; }   /* clear of the map title */
.rail-root > * { pointer-events: auto; }
.rail { width: 196px; max-height: 100%; overflow: hidden; display: flex; flex-direction: column; gap: 0; padding: 6px; }
.rail-vars { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.rail-tools { display: flex; gap: 4px; padding-top: 6px; margin-top: 4px; border-top: 1px solid #2c2c31; }
.rail-tools .rail-item { position: static; }
.rail-tools .rail-more { position: static; transform: none; width: 18px; height: 34px; margin-left: 2px; }
.rv-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 6px; font: 700 10.5px var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: #8b8b93; }
.rv-collapse { width: 24px; height: 24px; border: 0; background: transparent; color: #b9b9c0; border-radius: 6px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.rv-collapse:hover { background: #222226; color: #fff; }
.rv-collapse svg, .rv-cat-h svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rv-cat-h { width: 100%; display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #e6e6e8; font: 600 13px var(--font-ui); padding: 7px 6px; border-radius: 8px; cursor: pointer; text-align: left; }
.rv-cat-h:hover { background: #1d1d20; }
.rv-cat-h svg { transition: transform .15s; color: #8b8b93; }
.rv-cat.open .rv-cat-h svg { transform: rotate(90deg); }
.rv-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-red-hi); margin-left: auto; }
.rv-list { display: grid; gap: 2px; padding: 2px 0 6px 14px; }
.rv-var { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #c9c9ce; font: 500 12.5px var(--font-ui); padding: 6px 8px; border-radius: 7px; cursor: pointer; text-align: left; border-left: 3px solid transparent; }
.rv-var:hover { background: #1d1d20; color: #fff; }
.rv-var.on { color: #fff; border-left-color: var(--vc); background: #1b1b1e; }
.rv-var.shade { background: var(--brand-red); color: #fff; border-left-color: var(--brand-red-hi); }
.rv-var em { margin-left: auto; font-style: normal; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.rv-num { width: 16px; height: 16px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; font: 700 10px/1 var(--font-num); background: var(--vc); color: #111; }
.rv-var:not(.on) .rv-num { background: transparent; border: 1px solid #3a3a40; }
/* Open menu: wide enough for every tool on one line (they wrap if not), and
   button names show below the button instead of over the next icon. */
.rail-root:not(.collapsed) .rail { width: 256px; }
.rail-root:not(.collapsed) .rail-tools { flex-wrap: wrap; }
.rail-root:not(.collapsed) .rail-btn[data-label]:hover::after { left: 50%; top: calc(100% + 6px); transform: translateX(-50%); z-index: 30; }
.rail-root:not(.collapsed) .rail-tools > :first-child .rail-btn[data-label]:hover::after,
.rail-root:not(.collapsed) .rail-tools > .rail-btn:first-child[data-label]:hover::after { left: 0; transform: none; }
.rail-root:not(.collapsed) .rail-vars { position: relative; z-index: 0; }
.rail-root:not(.collapsed) .rail-tools { position: relative; z-index: 2; }
.rv-var { min-width: 0; }
.rv-var > span:not(.rv-num) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Collapsed: a slim strip with the tools. */
.rail-root.collapsed .rail { width: auto; }
.rail-root.collapsed .rail-tools { flex-direction: column; border-top: 0; margin-top: 0; padding-top: 4px; }
.rail-root.collapsed .rail-tools .rail-more { position: absolute; left: calc(100% + 4px); transform: translateY(-50%); top: 50%; height: 26px; width: 20px; }
.rail-root.collapsed .rail-tools .rail-item { position: relative; }
.rail-root.collapsed .rail-pop { left: calc(100% + 30px); }
.rail-pop { left: calc(100% + 10px); }
/* Header: Home, red selection and focus */
.nav a.on { background: var(--brand-red); color: #fff; }
.nav a:focus-visible, .topbar .icon-btn:focus-visible, .brand:focus-visible, .dsoc-logo:focus-visible { outline: 2px solid var(--brand-red-hi); outline-offset: 2px; }
@media (max-width: 720px) {
  .rail { width: 168px; }
  .rail-root:not(.collapsed) .rail { width: min(236px, calc(100vw - 48px)); }
  .map-card .obsmap { height: 460px; }
}

/* Map credit: own (i) button, closed by default. */
.kwn-credit { position: absolute; z-index: 5; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; }
.kwn-credit-btn { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; color: #e6e6e8; display: grid; place-items: center; }
.kwn-credit-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: .8; }
.kwn-credit-btn svg .dot { fill: currentColor; stroke: none; }
.kwn-credit-btn svg path { stroke-width: 1.1; stroke-linecap: round; }
.obsmap.map-light .kwn-credit-btn { color: #222; }
.kwn-credit-text { background: rgba(10,10,12,.82); color: #c9c9ce; font: 11px var(--font-ui); padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.kwn-credit-text a { color: #fff; text-decoration: none; }
.kwn-credit-text[hidden] { display: none; }
/* Collapsed and open menus size to their contents, not the map's height. */
.rail-root { bottom: auto; max-height: calc(100% - 120px); }
.rail-root { flex-direction: column; }
.rail-root .rail { max-height: none; min-height: 0; flex: 0 1 auto; }   /* shrinks to the root's limit (inherit applied the limit twice) */

.tchip.net.overridden { opacity: .55; }
.tchip.net.combo { border-style: dashed; }
.tchip.net.combo.on { border-style: solid; }

/* Stations page: all networks */
.st-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.st-nets { display: flex; gap: 6px; flex-wrap: wrap; }
.st-nets .tchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--nc); display: inline-block; }
.st-nets .tchip.on { background: var(--surface); color: var(--ink); border-color: var(--nc); }
.st-nets .tchip:not(.on) { opacity: .5; }
.st-nets .tchip span { color: var(--muted); font-weight: 600; }
.net-tag { display: inline-block; font-size: 9.5px; letter-spacing: .1em; padding: 1px 6px; border-radius: 999px; color: #fff; background: var(--nc); margin-right: 4px; }
.stn-item .rain { font-family: var(--font-num); font-size: 26px; font-weight: 600; color: #0a8a5a; }
div.stn-item { cursor: default; }
.net-tag { box-shadow: 0 0 0 1px rgba(255,255,255,.28) inset; }

/* Map tools first, at the top of the left menu. */
.rail-tools { border-top: 0; margin-top: 0; padding-top: 0; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #2c2c31; }
.rail-root.collapsed .rail-tools { padding-bottom: 4px; margin-bottom: 4px; }

/* Home: statewide boxes 2 x 2 under the map; both columns end together. */
.home-grid { align-items: stretch; }
.home-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; flex: 1; }
.stat-grid .stat { display: flex; flex-direction: column; justify-content: center; }
.stat .s { white-space: normal; }
.side { display: flex; flex-direction: column; }
.side #leaders { flex: 1; }
@media (max-width: 1100px) { .side { display: grid; } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }

/* Footer: text left, DSOC logo bottom right. */
footer .in { align-items: flex-end; flex-wrap: nowrap; }
.foot-text { display: grid; gap: 14px; min-width: 0; }
.foot-logo { margin-left: auto; }
.foot-logo img { height: 40px; }
@media (max-width: 720px) { footer .in { flex-wrap: wrap; } .foot-logo { margin-left: 0; } }

/* ── Statewide boxes ──────────────────────────────────────── */
.stat-grid .stat { justify-content: flex-start; gap: 6px; padding: 22px 24px; overflow: hidden; isolation: isolate; }
.stat-grid .stat::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.05), transparent 60%);   /* older Safari, Android, Windows */
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%); }
.stat-grid .stat .v { font-size: 64px; line-height: .95; margin-top: 6px; display: flex; align-items: flex-start; gap: 4px; }
.stat-grid .stat .v sup { font-size: 20px; color: var(--muted); font-weight: 500; margin-top: 8px; }
.stat-grid .stat .s { font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stat-grid .stat .s a { color: var(--ink); }
.stat-body { margin-top: auto; padding-top: 14px; }
.stat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.stat-list li { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.stat-list li i { width: 8px; height: 8px; border-radius: 50%; }
.stat-list .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.stat-list .n a { color: var(--ink-2); text-decoration: none; }
.stat-list .n a:hover { color: var(--brand-red-hi); }
.stat-list b { font: 600 15px var(--font-num); }
.stat-hist { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.stat-hist span { flex: 1; border-radius: 3px 3px 0 0; min-width: 4px; opacity: .9; }
.stat-axis { display: flex; justify-content: space-between; font: 500 11px var(--font-ui); color: var(--muted); margin-top: 4px; }
.stat-nets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.stat-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.stat-grid { flex: 1 0 auto; }

/* ── Device compatibility: iPhone, iPad, Android, Apple Pencil, Windows, macOS ── */
/* No grey flash on tap, no 300 ms double-tap delay on buttons and links. */
a, button, select, input, .tchip, .chip, .rv-var, .rail-btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
/* iPhone notch and home bar: keep the header and maps clear of them. */
.topbar { padding-top: env(safe-area-inset-top); }
.topbar-in { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.page { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
body.is-full .page { padding: 0; }
.fullmap { top: calc(60px + env(safe-area-inset-top)); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
footer .in { padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 20px)); }
/* Touch screens (phones, tablets, Apple Pencil, Windows touch): hover-only
   tooltips would stick, and controls need finger-sized targets. */
@media (hover: none) {
  .rail-btn[data-label]:hover::after { display: none; }
}
@media (pointer: coarse) {
  .rail-btn { width: 42px; height: 42px; }
  .rail-tools .rail-more { height: 42px; width: 22px; }
  .tchip { padding: 10px 14px; }
  .chip { padding: 8px 12px; }
  .rv-cat-h { padding: 11px 8px; }
  .rv-var { padding: 10px 8px; }
  .rv-collapse, .lg-toggle { width: 34px; height: 34px; }
  .nav a { padding: 10px 14px; }
  .btn { padding: 11px 16px; }
  .seg button { padding: 10px 14px; }
  .lg-handle { width: 14px; margin-left: -7px; height: 26px; top: -7px; }
  .lg-handle::before { content: ""; position: absolute; inset: -12px -14px; }   /* bigger grab area */
  .sl input[type=range] { height: 28px; }
  .kwn-credit-btn { width: 34px; height: 34px; }
  /* iOS zooms the page when a field under 16 px gets focus. */
  input, select, textarea { font-size: 16px !important; }
}
/* Phones: the Map options and overlay panels sit over the menu instead of
   running off the right edge. */
@media (max-width: 720px) {
  .rail-pop { left: 0; top: 0; width: min(300px, calc(100vw - 36px)); max-height: 70vh; overflow-y: auto; z-index: 9; }
  .rail-root.collapsed .rail-pop { left: 0; }
}
/* Respect "reduce motion" for interface animation (the map's data still moves). */
@media (prefers-reduced-motion: reduce) {
  .live-dot, .skeleton { animation: none; }
  .lg-toggle svg, .rv-cat-h svg, .tg-box, .tg-box::after { transition: none; }
}
/* Windows and Linux: slim dark scrollbars in the map menus. */
.rail-vars::-webkit-scrollbar, .rail-pop::-webkit-scrollbar { width: 8px; }
.rail-vars::-webkit-scrollbar-thumb, .rail-pop::-webkit-scrollbar-thumb { background: #3a3a40; border-radius: 4px; }
.rail-vars::-webkit-scrollbar-track, .rail-pop::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 720px) { .nav { top: 100%; } }

/* Today's Leaders fills its card: tabs on one row, the ten rows share the
   height so the list reaches the bottom with the statewide boxes. */
#leadSeg { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; box-sizing: border-box; }
#leadSeg button { padding: 7px 4px; letter-spacing: .08em; text-align: center; }
.side #leaders { display: flex; flex-direction: column; }
.side #leaders .leaders { flex: 1; grid-auto-rows: 1fr; }
.side #leaders .leaders li { display: flex; }
.side #leaders .leaders li a { flex: 1; border-bottom: 1px solid var(--line); border-radius: 0; }
.side #leaders .leaders li:last-child a { border-bottom: 0; }
.side #leaders .leaders li a:hover { border-radius: 10px; }
.side #leaders .leaders .vl { font-size: 26px; }
@media (max-width: 1100px) { .side #leaders .leaders { grid-auto-rows: auto; } }

/* Network chips stay on one line (Combined Networks right of METAR); a bit
   tighter so all five fit, scrolling sideways only when the card is narrow. */
.tb-chips:has(> .tchip.net) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tb-chips:has(> .tchip.net)::-webkit-scrollbar { display: none; }
.tchip.net { flex: none; padding-left: 10px; padding-right: 10px; letter-spacing: .05em; }
.tb-chips .tb-inline { flex: none; }
.tchip.net { padding-left: 9px; padding-right: 9px; font-size: 11px; }
.tchip.reset { padding-left: 9px; padding-right: 9px; }
/* Home card: Reset and Map options as icons so the networks fit one line. */
.map-tb:not(.full) .tchip.opts .tb-txt { display: none; }
.map-tb:not(.full) .tchip.opts { padding-left: 9px; padding-right: 9px; }

/* Statewide cards flip open to a larger card on top of the page. */
.stat-grid .stat[data-flip] { cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.stat-grid .stat[data-flip]:hover { transform: translateY(-2px); border-color: var(--faint); }
.stat-grid .stat[data-flip]:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }
.flip-scrim { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background .5s ease, backdrop-filter .5s ease, -webkit-backdrop-filter .5s ease; }
.flip-scrim.on { background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.flip-box { position: fixed; z-index: 901; perspective: 1800px; transition: left .6s cubic-bezier(.2,.8,.2,1), top .6s cubic-bezier(.2,.8,.2,1), width .6s cubic-bezier(.2,.8,.2,1), height .6s cubic-bezier(.2,.8,.2,1); }
.flip-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.flip-box.open .flip-in { transform: rotateY(180deg); }
.flip-face { position: absolute !important; inset: 0; margin: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.flip-face.back { transform: rotateY(180deg); overflow-y: auto; overscroll-behavior: contain; padding: 28px 32px; }
.flip-face .v { font-family: var(--font-num); font-size: 64px; font-weight: 600; line-height: .95; margin-top: 6px; display: flex; align-items: flex-start; gap: 4px; }
.flip-face.back .v { font-size: 88px; }
.flip-face .v sup { font-size: 22px; color: var(--muted); font-weight: 500; margin-top: 8px; }
.flip-face .s { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flip-face .s a { color: var(--ink); text-decoration: none; }
.flip-face .stat-body { margin-top: 14px; }
.flip-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.flip-x:hover { border-color: var(--faint); }
.stat-list.big li { grid-template-columns: 24px 8px 1fr auto; font-size: 15px; padding: 9px 0; }
.stat-list.big li em { font-style: normal; font-family: var(--font-num); color: var(--faint); font-weight: 700; }
.stat-list.big li b { font-size: 18px; }
.stat-list.big .n { display: flex; align-items: center; gap: 6px; }
.stat-hist.big { height: 220px; }
.stat-hist.big span { position: relative; }
.stat-hist.big em { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font: 600 12px/1 var(--font-num); font-style: normal; color: var(--ink-2); }
.stat-axis.big { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.stat-axis.big span { text-align: center; font-size: 11px; }
.stat-table { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 14px; }
.stat-table th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.stat-table td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line-soft); font-family: var(--font-num); font-size: 17px; }
@media (prefers-reduced-motion: reduce) { .flip-box, .flip-in, .flip-scrim { transition-duration: .01s; } }
@media (max-width: 520px) { .flip-face.back { padding: 22px 18px; } .flip-face.back .v { font-size: 64px; } .stat-table td { font-size: 15px; } }
.flip-face { isolation: isolate; background: var(--surface); }
.flip-face::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.05), transparent 60%);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%); }


/* Radar page: the radar viewer fills the window under the header. */
.radar-frame { position: fixed; inset: 60px 0 0 0; width: 100%; height: calc(100% - 60px); border: 0; background: #000; }
.radar-frame { top: calc(60px + env(safe-area-inset-top)); height: calc(100% - 60px - env(safe-area-inset-top)); }
/* Radar "map only": the frame takes the whole screen, the KWN header hides. */
body.kwn-max .topbar { display: none !important; }
body.kwn-max .radar-frame { top: 0 !important; height: 100% !important; inset: 0 !important; }
/* Map page "map only": the map fills the screen; menus, title and color bar hide. */
body.kwn-max .fullmap { inset: 0 !important; top: 0 !important; grid-template-rows: 1fr !important; padding: 0 !important; }
@media (max-width: 720px) { body.kwn-max .fullmap .map-legend { display: none !important; } }   /* legends stay on computers */
body.kwn-max .fullmap .map-tb, body.kwn-max .fullmap .rail-root, body.kwn-max .fullmap .map-chip,
body.kwn-max .fullmap .maplibregl-ctrl-group, body.kwn-max .fullmap .kwn-credit, body.kwn-max .fullmap .map-tb + * .rail-root { display: none !important; }
.kwn-maxbtn, .kwn-fsbtn { display: grid !important; place-items: center; color: #fff !important; }
#kwn-maxexit { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 6000; width: 54px; height: 54px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(20,20,24,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #7fc4ff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
#kwn-maxexit[hidden] { display: none; }

/* About: big two-line headline (second line red), then the story and sources. */
.about { max-width: 980px; padding: 28px 0 40px; }
.about-h { margin: 0 0 30px; font-family: var(--font-brand); font-weight: 800; font-size: clamp(30px, 5vw, 60px); line-height: 1.02; letter-spacing: -.01em; text-transform: uppercase; color: var(--ink); }
.about-h span { display: inline; }
.about-group { margin-top: 34px; }
.about-group h2 { margin: 0 0 12px; font: 700 12px var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.about-group .about-sources { margin-top: 0; }
.about-h .red { color: var(--brand-red-hi); }
.about p { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.75; color: var(--ink-2); margin: 0 0 22px; max-width: 70ch; }
.about p a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand-red-hi); text-underline-offset: 3px; }
.about p a:hover { color: var(--brand-red-hi); }
.about-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 34px; }
.about-src { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.about-src:hover { border-color: var(--brand-red); transform: translateY(-2px); }
.about-what { font-size: 14px; line-height: 1.55; color: var(--ink-2); flex: 1; }
.about-link { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--brand-red-hi); }

/* Auto update switch in the map toolbar: a live dot while updating. */
.tchip.live i { width: 7px; height: 7px; border-radius: 50%; background: #8b8b93; flex: none; }
.tchip.live.on i { background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: kwn-live 2s infinite; }
.tchip.live small { font: 600 10.5px var(--font-num); letter-spacing: .04em; opacity: .75; text-transform: none; }
.tchip.live small:empty { display: none; }
@keyframes kwn-live { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.6); } 70% { box-shadow: 0 0 0 6px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
@media (prefers-reduced-motion: reduce) { .tchip.live.on i { animation: none; } }

/* Menu panels never run past the bottom of the map (iPhone and other short
   screens): they stop at the map's edge and scroll inside instead. */
@media (max-width: 720px) {
  .rail-root .rail-pop { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-sizing: border-box; }
}
/* Desktop: menu panels show full length, even past the bottom of a short map
   (the home card); the map lets them out instead of clipping them. */
@media (min-width: 721px) {
  .obsmap.maplibregl-map { overflow: visible; }
  .rail-root .rail-pop { z-index: 20; }
  /* ...but never past the bottom of the window: a long panel (Map options with
     shapefiles) scrolls inside. */
  .rail-root .rail-pop { max-height: max(320px, calc(100vh - 250px)); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
}
@media (max-width: 600px) {
  .rail-root .rail-pop { width: min(256px, calc(100vw - 32px)); }
}

/* Phones: the map toolbar is one row of network buttons plus Options, which
   opens View, Plots, Panels, Shade, Auto update, Reset and Map options. The
   map gets the rest of the screen. */
.tchip.tb-more { display: none; flex: none; }
.tchip.tb-more svg { width: 14px; height: 14px; }
.tchip.tb-more .tb-live { width: 6px; height: 6px; border-radius: 50%; background: #3ddc84; margin-left: -2px; }
@media (max-width: 720px) {
  .map-tb { padding: 8px 10px; gap: 8px; }
  .map-tb.full { padding: 8px 10px; }
  .map-tb .tb-label { display: none; }
  .map-tb .tb-row:first-child { flex-wrap: nowrap; align-items: center; gap: 6px; }
  .map-tb .tb-row:first-child .tb-chips { flex: 1 1 auto; flex-basis: auto; min-width: 0; }
  .tchip.tb-more { display: inline-flex; margin-left: 0; }
  .map-tb:not(.tb-open) .tb-view, .map-tb:not(.tb-open) .tchip.reset, .map-tb:not(.tb-open) .tchip.opts { display: none; }
  .map-tb.tb-open .tb-row:first-child { flex-wrap: wrap; }
  .map-tb.tb-open .tb-row:first-child .tb-chips { flex-basis: 100%; }
  .map-tb.tb-open .tchip.reset { margin-left: auto; }
  .map-tb .tchip.opts .tb-txt { display: none; }
  .map-tb .tchip.opts { padding-left: 9px; padding-right: 9px; }
  .map-tb .tb-view { gap: 8px; }
  .map-tb .tb-plot { flex-basis: auto; }
  .map-tb .tb-view .tb-shade { margin-left: 0; flex-basis: 100%; }
}

/* Map title: DSOC logo + KWN, plotted variables, shading and time. */
.map-chip { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 10px; max-width: calc(100% - 90px); }
.map-chip .mc-brand { display: flex; align-items: center; gap: 6px; padding-right: 10px; border-right: 1px solid rgba(255,255,255,.18); flex: none; }
.map-chip .mc-brand img { height: 18px; width: auto; display: block; }
.map-chip .mc-brand b { font: 800 13px var(--font-brand); letter-spacing: .08em; color: var(--brand-red-hi); }
.map-chip .mc-text { display: grid; min-width: 0; }
.map-chip .mc-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-chip .mc-sub { font-size: 11px; font-weight: 600; color: #b9b9c0; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .map-chip .mc-brand img { height: 14px; } .map-chip .mc-title { font-size: 12.5px; } }

/* Panel layout: one, two or four panels (keys 1, 2, 4), as in the radar's Layout group. */
.tb-layout { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: #141416; border: 1px solid #2c2c31; border-radius: 10px; }
.tb-layout button { width: 34px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #c9c9ce; cursor: pointer; }
.tb-layout button:hover { color: #fff; background: #222226; }
.tb-layout button.on { background: var(--brand-red); color: #fff; }
.tb-layout svg { width: 16px; height: 16px; }

/* Export menu (map toolbars). */
.tchip.exp { margin-left: 0; }
.exp-menu { position: fixed; z-index: 3000; width: 250px; padding: 8px; background: rgba(14,14,16,.97); color: #e6e6e8; border: 1px solid #2c2c31; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.55); font-family: var(--font-ui); }
.exp-menu .exp-h { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8b8b93; padding: 4px 8px 8px; }
.exp-menu button { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border: 0; background: transparent; color: #fff; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; }
.exp-menu button:hover { background: #222226; }
.exp-menu button b { font-size: 13.5px; font-weight: 700; }
.exp-menu button span { font-size: 11.5px; color: #8b8b93; }
.exp-menu button.busy span::after { content: " · preparing"; color: var(--brand-red-hi); }
.exp-menu .exp-note { font-size: 11px; line-height: 1.4; color: #77777f; padding: 8px 10px 4px; border-top: 1px solid #222226; margin-top: 6px; }
.exp-menu .exp-opt { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-top: 1px solid #222226; margin-top: 6px; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; }
.exp-menu .exp-opt input { width: 16px; height: 16px; accent-color: #e0262d; }
.exp-menu .exp-opt span { margin-left: auto; font-size: 11.5px; font-weight: 500; color: #8b8b93; }

/* Home button on the map zoom bar (back to Kentucky). */
.maplibregl-ctrl-group .kwn-home { display: grid; place-items: center; }
.maplibregl-ctrl-group .kwn-home svg { width: 16px; height: 16px; color: #fff; }
.maplibregl-ctrl-group .kwn-home:hover svg { color: #fff; }
/* Reset is labeled where there is room (the Map page), an icon elsewhere. */
.map-tb:not(.full) .tchip.reset .tb-txt { display: none; }
@media (max-width: 720px) { .map-tb .tchip.reset .tb-txt { display: none; } }
.pop-watch { display: block; margin-top: 6px; border: 0; background: transparent; color: var(--brand-red-hi); font: 700 12px var(--font-ui); cursor: pointer; padding: 0; text-align: left; }

/* Legend: smaller, so the map gets more room. */
.map-legend { width: min(440px, calc(100% - 140px)); padding: 5px 10px 6px; bottom: 10px; border-radius: 10px; }
.lg-head { gap: 6px; }
.lg-title, .lg-unit { font-size: 10px; }
.lg-hint { font-size: 9.5px; }
.lg-body { margin-top: 5px; }
.lg-track { height: 9px; }
.lg-handle { top: -4px; height: 17px; }
.lg-ticks { height: 11px; margin-top: 4px; }
.lg-ticks span { font-size: 9px; }
.panels.p4 .map-legend, .panels.p2 .map-legend { width: min(340px, calc(100% - 100px)); }
.panels.p4 .lg-hint, .panels.p2 .lg-hint { display: none; }

/* Side menu stops above the zoom bar (home, +, -) at the bottom left. */
.rail-root { bottom: 128px; }

/* Side menu: only as tall as its buttons (no empty space below), capped at
   the room available; the variable list slides out to the right. */
.rail-root { align-items: flex-start; }
.rail-root:not(.collapsed) .rail { animation: kwn-rail-out .2s ease-out; }
@keyframes kwn-rail-out { from { clip-path: inset(0 100% 0 0 round 12px); } to { clip-path: inset(0 0 0 0 round 12px); } }
@media (prefers-reduced-motion: reduce) { .rail-root:not(.collapsed) .rail { animation: none; } }

/* WBGT flag system picker and flag legend (Map style panel). */
.wb-sys { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; font-size: 12px; color: #a9a9b0; margin: 4px 0 8px; }
.wb-sys select { background: #1b1b1e; color: #fff; border: 1px solid #333338; border-radius: 8px; padding: 6px 8px; font: 600 12px var(--font-ui); min-width: 0; }
.wb-legend { display: grid; gap: 4px; margin-bottom: 6px; }
.wb-row { display: grid; grid-template-columns: 14px auto 1fr auto; gap: 8px; align-items: center; font-size: 11.5px; color: #c9c9ce; }
.wb-row i { width: 14px; height: 10px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.wb-row b { color: #fff; font-weight: 700; white-space: nowrap; }
.wb-row span { color: #a9a9b0; }
.wb-row em { font-style: normal; color: #8b8b93; white-space: nowrap; }

/* WBGT flag row in the map legend. */
.lg-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.08); }
.map-legend > .lg-flags { margin-top: 0; padding-top: 0; border-top: 0; }
.lg-ftitle { font: 700 10px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-right: 2px; }   /* same as the legend title */
.lg-flag { display: inline-flex; align-items: center; gap: 4px; font: 500 10px var(--font-ui); color: #c9c9ce; }
.lg-flag i { width: 12px; height: 8px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }

/* Map toolbar in one line on wider screens: networks, view, then the page buttons. */
@media (min-width: 861px) {
  .map-tb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
  .map-tb > .tb-row { display: contents; }
  .map-tb .tb-label { display: none; }
  .map-tb .tb-chips { order: 1; flex: 0 1 auto; }
  .map-tb .tb-plot, .map-tb .tchip.live, .map-tb .tb-layout, .map-tb .tb-shade { order: 2; }
  .map-tb .tb-view .tb-shade { margin-left: 0; }
  .map-tb .tchip.reset, .map-tb .tchip.opts { order: 3; }
  /* The page buttons sit flush right on their line, whichever of them comes first. */
  .map-tb .tb-chips ~ .tchip.reset { margin-left: 0; }
  .map-tb .tb-chips ~ .tchip.reset:not(.tchip.reset ~ .tchip.reset) { margin-left: auto; }
  /* Narrower maps (the Home card, smaller windows): exactly two lines.
     Line 1 networks, Stack/Switch and Plots; line 2 Auto update, layout,
     Shade, then Reset, Map options and Export at the right. */
  .map-tb { gap: 8px 6px; }
  .map-tb .tb-plot > span, .map-tb .tb-shade > span { display: none; }
  .map-tb .tchip.reset .tb-txt, .map-tb .tchip.opts .tb-txt { display: none; }
  .map-tb .tchip.reset, .map-tb .tchip.opts { padding-left: 9px; padding-right: 9px; }
  .map-tb .tb-shade select { max-width: 150px; }
  .map-tb { padding-left: 16px; padding-right: 16px; }
  .map-tb .tchip { font-size: 11px; letter-spacing: .04em; padding-left: 8px; padding-right: 8px; }
  .map-tb .tchip.net .net-ic { margin-right: 5px; }
  .map-tb .tb-chips { gap: 5px; }
  .map-tb .tb-plot { gap: 3px; }
}
.tchip.net .net-ic { width: 15px; height: 15px; flex: none; margin-right: 6px; vertical-align: -3px; }
.tchip.net { display: inline-flex; align-items: center; }

/* Network chips show each network's official logo on a white pill. */
/* Every chip stays white; a red outline marks the ones that are on. */
.tchip.net:has(.net-logo), .tchip.net.gauge { background: #fff; border-color: #fff; padding: 3px 10px; height: 32px; transition: box-shadow .15s; }
.tchip.net:has(.net-logo):hover, .tchip.net.gauge:hover { box-shadow: 0 0 0 2px rgba(190,20,27,.35); }
.tchip.net.on:has(.net-logo), .tchip.net.gauge.on { background: #fff; border-color: #fff; box-shadow: 0 0 0 2px var(--brand-red), 0 0 0 4px rgba(190,20,27,.25); }
.map-tb.full .tchip.net:has(.net-logo), .map-tb.full .tchip.net.gauge { background: #fff; border-color: #fff; }
.tchip.net.gauge { color: #1f6fd1; padding-left: 9px; padding-right: 9px; }
.tchip.net.gauge svg { width: 22px; height: 22px; display: block; }
.net-logo { display: block; width: auto; pointer-events: none; }
.net-logo.showMeso { height: 22px; }
.net-logo.showDsoc { height: 24px; }
.net-logo.showMetar, .net-logo.showCoco { height: 24px; }
.net-logo.showRwis, .net-logo.showMadis { width: 24px; height: 24px; }
@media (min-width: 861px) { .map-tb .tchip.net:has(.net-logo) { padding-left: 9px; padding-right: 9px; } }
.st-nets .tchip.net:has(.net-logo) { gap: 7px; }
/* Same chips as the map toolbar: always white, symbol only, red outline when on. */
.st-nets .tchip.net:has(.net-logo) { opacity: 1; filter: none; background: #fff; border-color: #fff; }
.st-nets .tchip.net.on:has(.net-logo) { box-shadow: 0 0 0 2px var(--brand-red), 0 0 0 4px rgba(190,20,27,.25); }
.st-nets .tchip.net:has(.net-logo) span { color: #555; }

@media (min-width: 861px) {
  /* Map page: one row. The network chips give way (scroll) before anything wraps. */
  .map-tb.full { flex-wrap: nowrap; }
  .map-tb.full .tb-chips { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .map-tb.full .tb-chips::-webkit-scrollbar { display: none; }
  .map-tb.full .tb-shade { flex: 0 1 170px; min-width: 110px; }
  .map-tb.full .tb-shade select { max-width: 100%; width: 100%; }
  .map-tb.full > .tb-row > *:not(.tb-chips):not(.tb-shade) { flex-shrink: 0; }
  /* Home page map card: exactly two rows. Row 1 networks, Stack/Switch and
     Plots; row 2 Auto update, Shade, then Reset, Map options and Export. */
  .map-tb:not(.full) .tb-chips { order: 1; }
  .map-tb:not(.full) .tb-plot { order: 2; }
  .map-tb:not(.full) .tchip.tb-expand { order: 3; margin-left: auto; }
  .map-tb:not(.full) .tb-view::before { content: ""; order: 4; flex-basis: 100%; height: 0; }
  .map-tb:not(.full) .tchip.live, .map-tb:not(.full) .tb-layout, .map-tb:not(.full) .tb-shade { order: 5; }
  .map-tb:not(.full) .tchip.reset, .map-tb:not(.full) .tchip.opts { order: 6; }
  .map-tb:not(.full) .tchip.reset { margin-left: auto; }
  .map-tb:not(.full) .tb-shade select { max-width: 220px; }
}
.tchip.tb-expand { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; flex: none; }
.tchip.tb-expand svg { width: 14px; height: 14px; }
.map-card .map-tb { padding-top: 14px; }
.obs-pop .pop-wet { color: #2f8cff; }
:root:not([data-theme=light]) .obs-pop .pop-wet { color: #7fd0ff; }
/* Stations page cards: rain today and rain rate under the station id. */
.stn-rain { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font: 600 11.5px var(--font-ui); color: var(--muted); }
.stn-rain .wet { color: #2f8cff; }
:root:not([data-theme=light]) .stn-rain .wet { color: #7fd0ff; }

/* Site rule for light mode: content follows the theme (pages, cards, tiles,
   the maps themselves); controls stay dark (toolbars, side menus, legends,
   popups, alert banners, Alert setup). The Home map card's toolbar is a
   control, so it is dark like the Map and Radar toolbars. */
.map-tb.dark { background: #111113; border-bottom: 1px solid #222226; color: #c9c9ce; }
.map-tb.dark .tb-label { color: #8b8b93; }
.map-tb.dark .tchip { border-color: #2c2c31; background: #1a1a1d; color: #c9c9ce; }
.map-tb.dark .tchip:hover { color: #fff; border-color: #4a4a50; }
.map-tb.dark .tchip.var.on { color: #fff; }
.map-tb.dark .tb-shade, .map-tb.dark .tb-plot { color: #8b8b93; }
.map-tb.dark .tb-shade select, .map-tb.dark .tb-inline select { background: #1a1a1d; color: #eee; border-color: #2c2c31; }
.map-tb.dark .tchip.opts { border-color: #3a3a40; }
.map-tb.dark .tchip.mode.on { background: #fff; border-color: #fff; color: #111; }
.map-tb.dark .tchip.net.on:not(:has(.net-logo)) { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.map-tb.dark .tchip.net:has(.net-logo), .map-tb.dark .tchip.net.gauge { background: #fff; border-color: #fff; color: #1f6fd1; }
.map-tb.dark .tb-layout { border-color: #2c2c31; }
.map-card .map-tb.dark { border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }


/* Phones: the clock wraps, so drop the divider that would start a line on its own. */
@media (max-width: 600px) { .clock .sep { display: none; } .stn-actions .stn-btns { margin-top: 10px; } }

/* Menu panels: wider, with the rounder card shape of the map popups, so
   labels and sliders sit on one line. Phones keep a fit-the-screen width. */
@media (min-width: 721px) {
  .rail-root .rail-pop { width: min(720px, calc(100vw - 120px)); border-radius: 16px; padding: 16px 18px; }
}
@media (max-width: 720px) {
  .rail-root .rail-pop { width: min(340px, calc(100vw - 32px)); border-radius: 16px; padding: 14px 16px; }
}
/* Wider panels give slider names room for one line. */
.rail-root .rail-pop .sl { grid-template-columns: minmax(0, max-content) minmax(90px, 1fr) 46px; gap: 10px; }
.rail-root .rail-pop .sl > span { white-space: nowrap; }
/* WBGT flag key on one row: tighter spacing, and the legend widens to fit it. */
.lg-flags { flex-wrap: nowrap; gap: 4px 8px; white-space: nowrap; }
.lg-flags > * { flex: none; }
.map-legend:has(.lg-flags) { max-width: calc(100% - 24px); width: max-content; }

/* Tuck the left menu away: the « button hides it to the left edge, leaving a
   small tab that brings it back (js/railtuck.js). */
.rail-root .rail-tab { display: none; }
.rail-root.tucked .rail, .rail-root.tucked .rail-pop { display: none !important; }
.rail-root.tucked .rail-tab { display: grid; place-items: center; pointer-events: auto; width: 20px; height: 54px; margin-left: -10px; padding: 0; border: 1px solid #2c2c31; border-left: 0; border-radius: 0 10px 10px 0; background: rgba(14,14,16,.88); color: #c9c9ce; cursor: pointer; }
.rail-root.tucked .rail-tab:hover { color: #fff; background: #222226; }
.rail-root .rail-tab svg { width: 15px; height: 15px; }
.rail-root:not(.collapsed) .rail-tuck { display: none; }
/* Map page panels: home and zoom only on panel 1 (the cameras move together). */
.panel-cell.sub .maplibregl-ctrl-bottom-left .maplibregl-ctrl-group { display: none; }
/* The tuck arrow is red, so it reads as the way to hide the menu. */
.rail-root .rail-tuck { color: #e0262d; }
.rail-root .rail-tuck:hover { color: #ff4a50; }
/* Short panels (the 4 panel layout): the side menu keeps its variable and tuck
   buttons in view. Smaller buttons, the full panel height on panels without a
   zoom bar, and the strip scrolls if it still does not fit. */
.rail-root.collapsed .rail { overflow-y: auto; scrollbar-width: none; }
.rail-root.collapsed .rail::-webkit-scrollbar { display: none; }
.rail-root.collapsed .rail-vars, .rail-root.collapsed .rail-tools { flex: none; }
.panels.p4 .rail-btn { width: 30px; height: 30px; }
.panels.p4 .rail-btn svg { width: 16px; height: 16px; }
.panels.p4 .rail-tools { gap: 2px; }
/* In 2 and 4 panels, panel 1's home and zoom buttons sit bottom right, so every
   panel's menu can use the panel's full height. */
.panels.p2 .rail-root, .panels.p4 .rail-root { bottom: 10px; max-height: calc(100% - 86px); }
.panels.p2 .panel-cell:not(.sub) .maplibregl-ctrl-bottom-left, .panels.p4 .panel-cell:not(.sub) .maplibregl-ctrl-bottom-left { left: auto; right: 0; bottom: 30px; }
.kwn-subrail .rail-root { max-height: calc(100% - 86px) !important; }
/* Footer logo: black on the light page, white on the dark one. */
.foot-logo .on-light { display: none; }
:root[data-theme="light"] .foot-logo .on-light { display: block; }
:root[data-theme="light"] .foot-logo .on-dark { display: none; }

/* Station history */
.hist-ctl { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 12px; }
.hist-ctl label { display: grid; gap: 4px; }
.hist-ctl input[type=month] { background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: 14px Inter, sans-serif; color-scheme: dark; }
.hist-ctl .small { flex-basis: 100%; }
.hist-tiles { margin-bottom: 14px; }
.hist-wrap { overflow-x: auto; margin-top: 8px; }
.hist-tbl { min-width: 760px; font-size: 13px; }
.hist-tbl td { padding: 6px 8px 6px 0; white-space: nowrap; }
.hist-tbl td small { color: var(--muted); font-size: 11px; }
.hist-tbl tr.part td { color: var(--muted); }

/* Home map card: the NWS and Shapes buttons share the Reset style, which pushes
   each one to the right on its own. Only the first of them takes the push, so
   the page buttons sit together at the right end of the row. */
@media (min-width: 861px) {
  .map-tb:not(.full) .tchip.reset ~ .tchip.reset { margin-left: 0; }
}

/* Compact side menu: smaller buttons so the whole menu fits the Home map card
   and shorter windows; if a map is still too short, the menu scrolls instead
   of being cut off. */
.rail-btn { width: 30px; height: 30px; border-radius: 7px; }
.rail-btn svg { width: 16px; height: 16px; }
.rail-root.collapsed .rail { overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.rail-root.collapsed .rail::-webkit-scrollbar { display: none; }
.rail-root.collapsed .rail-tools { gap: 2px; }
@media (max-height: 760px) {
  .rail-btn { width: 27px; height: 27px; }
  .rail-btn svg { width: 15px; height: 15px; }
}
@media (pointer: coarse) {
  .rail-btn { width: 36px; height: 36px; }
  .rail-tools .rail-more { height: 36px; }
}
/* Two columns when the closed menu is taller than the map allows (js/railtuck.js). */
.rail-root.collapsed.rail-2col .rail-tools { display: grid; grid-template-columns: repeat(2, auto); gap: 2px; }
.rail-root.collapsed.rail-2col [data-vars] { display: flex; justify-content: center; gap: 2px; }

/* Side menu: the station-variables button sits second among the tools; it
   shows only while the menu is closed (the open menu has its own < button). */
.rail-root:not(.collapsed) .rail-tools .rail-vars-btn { display: none; }
.rail-hidden-tool { display: none !important; }
/* MRMS radar rainfall row in the Rain category. */
.rv-mrms { display: flex; align-items: center; gap: 4px; }
.rv-mrms .rv-var { flex: 1; }
.rv-mrms .rv-num svg { width: 11px; height: 11px; }
.rv-mrms .rail-more { position: static; transform: none; height: 28px; width: 20px; }
.rv-mrms.active .rail-more { display: grid; }

/* Each menu tool keeps its own color, so they are easy to tell apart. */
.rail-tools [data-panel="style"] { color: #a78bfa; }
.rail-tools .rail-vars-btn { color: #ff7a59; }
.rail-tools [data-tg="stations"] { color: #8fd18a; }
.rail-tools [data-tg="showStreamlines"], .rail-tools [data-tg="stream"] { color: #5fd3e8; }
.rail-tools [data-panel="nws"] { color: #4aa3ff; }
.rail-tools [data-panel="kytc"] { color: #ff9f0a; }
.rail-tools [data-panel="places"] { color: #ff4f7b; }
.rail-tools [data-panel="sat"] { color: #39d98a; }
.rail-tools [data-rings], .rail-tools [data-act="rings"] { color: #ffd60a; }
.rail-tools .rail-btn:hover { filter: brightness(1.25); }
.rail-tools .rail-btn.on, .rail-tools .rail-btn.open { color: #fff; }

/* Top-right toolbar buttons: the same colors as the matching side menu tools. */
.map-tb .tchip[data-ringsvis] { color: #ffd60a; }
.map-tb .tchip[data-ltgvis] { color: #ffe600; }
.map-tb .tchip[data-wbgtvis] { color: #ff6a3d; }
.map-tb .tchip[data-nwsvis] { color: #4aa3ff; }
.map-tb .tchip[data-shpvis] { color: #36c0a6; }
.map-tb .tchip[data-reset] { color: #e6e6e8; }
.map-tb .tchip[data-opts] { color: #a78bfa; }
.map-tb .tchip[data-export] { color: #39d98a; }
.map-tb.dark .tchip[data-ringsvis] { color: #ffd60a; }
.map-tb.dark .tchip[data-ltgvis] { color: #ffe600; }
.map-tb.dark .tchip[data-wbgtvis] { color: #ff6a3d; }
.map-tb.dark .tchip[data-nwsvis] { color: #4aa3ff; }
.map-tb.dark .tchip[data-shpvis] { color: #36c0a6; }
.map-tb.dark .tchip[data-opts] { color: #a78bfa; }
.map-tb.dark .tchip[data-export] { color: #39d98a; }
/* Toggles: off is plain white (dark map) or near-black (light map), easy to see; on is the toggle's color. */
.map-tb .tchip.rings-vis.off { color: #2a2a2e !important; opacity: 1; }
.map-tb.dark .tchip.rings-vis.off { color: #ffffff !important; opacity: 1; }
/* About heading on one line: it may run wider than the text column, and it
   scales with the window (wraps only on phones). */
.about-h { white-space: nowrap; width: max-content; max-width: calc(100vw - 32px); font-size: clamp(22px, 4.4vw, 60px); }
@media (max-width: 600px) { .about-h { white-space: normal; width: auto; } }

/* Home title: smaller, since the same name is in the header right above it. */
.hero h1 { font-size: clamp(20px, 2.4vw, 30px); letter-spacing: .06em; }
/* Header count pill: "N Observation Sites". */
.brand-count { letter-spacing: .06em; text-transform: none; font-size: 11px; }

/* Clock: local time and UTC stay on one line; the Z is WKU red. */
.clock .clock-times { display: inline-flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.clock .zz { font-style: normal; color: var(--brand-red-hi); }
@media (max-width: 600px) {
  .clock .clock-times { gap: 8px; letter-spacing: .06em; }
  .clock .clock-times .sep { display: inline; }
}

/* Header count pill: one plain, easy to read face for the number and the words. */
.brand-count { padding: 4px 11px; gap: 6px; font: 600 12.5px/1.2 Inter, system-ui, sans-serif; letter-spacing: .02em; text-transform: none; vertical-align: 1px; }
.brand-count b { font: 700 13px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* Shading menu: always labeled, with a small color bar of the shaded scale. */
.tb-shade .tb-shade-lbl, .map-tb .tb-shade > .tb-shade-lbl { display: inline-flex !important; align-items: center; gap: 6px; font: 700 10.5px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: #c9c9ce; white-space: nowrap; }
.tb-shade-sw { width: 26px; height: 10px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); flex: none; }
.map-tb .tb-shade { gap: 8px; }
.map-tb.full .tb-shade { flex: 0 1 270px; }
.map-tb.full .tb-shade { flex: 0 1 196px; min-width: 140px; gap: 6px; }
.map-tb.full .tb-shade .tb-shade-lbl { letter-spacing: .08em; gap: 5px; }
.map-tb.full .tb-shade-sw { width: 18px; }

/* Footer: centered. Copyright, then the network's name line with the DSOC
   logo beside it, then Sign out. Data sources are on the About page. */
footer .in.foot-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; flex-wrap: nowrap; text-align: center; }
.foot-copy { font-size: 14px; color: var(--ink-2); }
.foot-org { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 16px; font-size: 13.5px; color: var(--muted); }
.foot-org .foot-logo { margin: 0; display: inline-flex; }
.foot-org .foot-logo img { height: 34px; width: auto; display: block; }
@media (max-width: 720px) { .foot-org { flex-direction: column; } }
/* One logo at a time: white on the dark theme, black on the light theme. */
.foot-org .foot-logo .on-light { display: none; }
:root[data-theme="light"] .foot-org .foot-logo .on-light { display: block; }
:root[data-theme="light"] .foot-org .foot-logo .on-dark { display: none; }

/* Footer order: copyright, the DSOC logo, then the name line. */
.foot-org { flex-direction: column; gap: 12px; }

/* Footer order: the DSOC logo, copyright, then the name line. */
.foot-center > .foot-logo { margin: 0; display: inline-flex; }
.foot-center > .foot-logo img { height: 34px; width: auto; display: block; }
.foot-center > .foot-logo .on-light { display: none; }
:root[data-theme="light"] .foot-center > .foot-logo .on-light { display: block; }
:root[data-theme="light"] .foot-center > .foot-logo .on-dark { display: none; }

/* Warmest, Coolest and Strongest gust cards: a small Kentucky county map in the
   top right corner, the top station's county filled (js/kymini.js). */
.card.stat.has-mini { position: relative; }
.stat .stat-mini { position: absolute; top: 16px; right: 16px; width: min(52%, 260px); pointer-events: none; }
.stat.has-mini .s { padding-right: 0; }
@media (max-width: 600px) { .stat .stat-mini { width: 48%; top: 14px; right: 14px; } }
/* The county map on a flipped card's back: below the close button, a little larger. */
.flip-face.back .stat-mini.back-mini { top: 60px; right: 32px; width: min(44%, 350px); }
@media (max-width: 520px) { .flip-face.back .stat-mini.back-mini { top: 58px; right: 18px; width: 42%; } }
/* Nothing shaded: one legend row per road and power layer on the map. */
.map-legend > .lg-flags + .lg-flags { margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.08); }
@media (max-width: 720px) { .lg-flags.lg-on { flex-wrap: wrap; white-space: normal; } }

/* Every map's zoom bar (Home, Map, Station, Radar) is dark in both themes, so
   home, +, -, map only and full screen are always white. */
.maplibregl-ctrl-group { background: rgba(16,16,18,.9) !important; }
.maplibregl-ctrl-group button { color: #fff !important; opacity: 1 !important; }
.maplibregl-ctrl-group button svg { color: #fff !important; }
.maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: brightness(0) invert(1) !important; opacity: 1 !important; }

/* MRMS rain total key in the map legend: a stepped bar in the service's colors. */
.lg-mrms { min-width: 240px; }
.lg-mrms + *, * + .lg-mrms { margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.08); }
.lg-mrms-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px; }
.lg-mrms-bar { height: 10px; border-radius: 3px; border: 1px solid rgba(255,255,255,.18); }
.lg-mrms-t { margin: 4px 0 0; }
.lg-mrms-t span:first-child { transform: none; }

/* Footer: sign out of Alerts (shown only while signed in). */
.foot-out { font-size: 12px; }
.foot-out[hidden] { display: none; }

/* Air Quality rows in the Variables menu: the AQI key under a row that is on. */
.rv-air-key .kt-key { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: 2px 0 6px 34px; font-size: 10.5px; color: #b9b9c0; }
.rv-air-key .kt-key span { display: inline-flex; align-items: center; gap: 4px; }
.rv-air-key .kt-key span::before { content: ''; width: 12px; height: 3px; border-radius: 2px; background: var(--c); }

/* Map page, two or four panels: the active panel (its menu used last; the toolbar's Shading sets it). */
#panels > .panel-cell { position: relative; }
#panels > .panel-cell.active::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--brand-red); pointer-events: none; z-index: 30; }

/* Variables menu: Clear all, beside the collapse arrow. */
.rv-head .rv-clear { margin-left: auto; margin-right: 6px; border: 1px solid #3a3a40; background: transparent; color: #ff6b6b; font: 700 10px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; cursor: pointer; }
.rv-head .rv-clear:hover { background: rgba(255,59,48,.14); border-color: #ff6b6b; }
