/* =====================================================================
   Resilience Community Mesh Network — stylesheet
   ---------------------------------------------------------------------
   BRAND TOKENS: swap official hex codes / fonts in the :root block below.
   Everything else in this file references those variables.
   ===================================================================== */

/* ---------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------- */
:root {
  /* --- Resilience Community Mesh logo palette (masthead) --- */
  --mesh-navy-1: #0d2b4f;
  --mesh-navy-2: #163f6e;
  --mesh-navy-3: #1e5285;
  --mesh-blue:   #1c6fb0;
  --mesh-teal:   #2ab9c6;
  --mesh-teal-2: #7fd3dc;

  /* --- ROAR brand palette (navy / lime / teal / green) --- */
  --roar-navy: #2f5a80;
  --roar-lime: #9dbe3c;
  --roar-teal: #4fb6c6;
  --roar-green: #2e8049;

  /* --- surfaces --- */
  --bg: #eef3f6;
  --bg2: #e6eef2;
  --bg-glow: #dbe8f7;
  --panel: #ffffff;
  --panel2: #f2f7f8;
  --inset: #f6fafb;
  --line: #d8e4e8;
  --line2: #c2d5da;

  /* --- text --- */
  --txt: #22303b;
  --txt2: #3c4c58;
  --muted: #5a6d78;

  /* --- functional --- */
  --brand: #2f5a80;
  --brand-dk: #234863;
  --brand-ink: #2f5a80;
  --accent: #21808f;
  --accent2: #2e8049;
  --warn: #b56b00;
  --warn-bg: #fff8ec;
  --warn-ink: #8a5100;
  --danger: #c22f40;
  --purple: #5b3fc4;
  --purple-bg: #f5f2fe;

  /* --- phase colours --- */
  --before: #21808f;
  --during: #c22f40;
  --after: #2e8049;

  /* --- type --- */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --head: 'Public Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* --- effects --- */
  --shadow: 0 1px 2px rgba(16, 38, 64, .06), 0 6px 20px -8px rgba(16, 38, 64, .14);
  --shadow-sm: 0 1px 2px rgba(16, 38, 64, .08);
  --radius: 16px;
  --radius-sm: 12px;
  --focus: 0 0 0 3px rgba(33, 128, 143, .85);

  /* --- map (constant across themes: it reads as a radar console) --- */
  --map-bg: #081420;
  --map-land: #122a1f;
  --map-river: #2a6df0;
  --map-ink: #dbe4f0;
}

[data-theme="dark"] {
  --bg: #0a141d;
  --bg2: #071019;
  --bg-glow: #10283d;
  --panel: #101e2a;
  --panel2: #0d1a24;
  --inset: #0d1a25;
  --line: #1e3242;
  --line2: #2b4759;

  --txt: #e8f0f6;
  --txt2: #c4d4e0;
  --muted: #92a8b8;

  --brand: #8fbde6;
  --brand-dk: #b3d5f2;
  --brand-ink: #8fbde6;
  --accent: #4fb6c6;
  --accent2: #57bd7d;
  --warn: #f0a52e;
  --warn-bg: #2a2013;
  --warn-ink: #f5c069;
  --danger: #ef6274;
  --purple: #a493f0;
  --purple-bg: #1d1a35;

  --before: #4fb6c6;
  --during: #ef6274;
  --after: #57bd7d;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -10px rgba(0, 0, 0, .7);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --focus: 0 0 0 3px rgba(79, 182, 198, .9);
}

/* ---------------------------------------------------------------
   2. BASE
   --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, var(--bg-glow), transparent),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--txt);
  font-family: var(--font);
  font-size: clamp(13.5px, 13px + .12vw, 15px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: var(--head); }

button { font: inherit; }

:where(a) { color: var(--accent); }

/* Visible, consistent focus ring everywhere */
:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--focus);
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  font-family: var(--head);
  font-weight: 700;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

.wrap {
  max-width: 1340px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 22px);
}

/* ---------------------------------------------------------------
   3. MASTHEAD
   --------------------------------------------------------------- */
.masthead {
  background:
    radial-gradient(120% 160% at 88% -30%, rgba(42, 185, 198, .28), transparent 60%),
    linear-gradient(100deg, var(--mesh-navy-1), var(--mesh-navy-2) 52%, var(--mesh-navy-3));
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(14px, 2vw, 20px) clamp(16px, 2.4vw, 26px);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, .14);
  position: relative;
  overflow: hidden;
}
.masthead::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--mesh-navy-1) 0 25%, var(--mesh-blue) 25% 50%,
    var(--mesh-teal) 50% 75%, var(--mesh-teal-2) 75% 100%);
}
.mast-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 4px;
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .45);
}
.mast-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 520px) { .mast-mark { width: 38px; height: 38px; border-radius: 9px; padding: 3px; } }

.masthead h1,
.masthead .mast-title {
  margin: 0;
  font-size: clamp(18px, 15px + 1vw, 24px);
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.15;
}
.masthead h1 small,
.masthead .mast-title small {
  display: block;
  font-size: clamp(11px, 10px + .2vw, 12.5px);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #a9e2ea;
  margin-top: 4px;
}

.mast-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.liveflag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}
.liveflag i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #6ff0bd;
  box-shadow: 0 0 0 4px rgba(111, 240, 189, .25);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(111, 240, 189, 0); } }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 30px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--head);
  cursor: pointer;
  transition: background .15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .22); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------------------------------------------------------------
   4. SUB-HEADER
   --------------------------------------------------------------- */
.top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.eyebrow {
  font-family: var(--head);
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-dk);
  margin: 0;
}
.badge {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.aw {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  box-shadow: var(--shadow-sm);
}
.aw .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(181, 107, 0, .18);
  flex: 0 0 auto;
}
.aw .lbl {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.aw .val { font-weight: 700; font-size: 13px; color: var(--txt); }

/* ---------------------------------------------------------------
   5. CARDS + LAYOUT
   --------------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(14px, 1.8vw, 20px);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

.card h2,
.card h3 {
  margin: 0 0 13px;
  font-size: 12px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--brand-ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card h2::before,
.card h3::before {
  content: "";
  width: 14px; height: 3px;
  border-radius: 3px;
  background: var(--mesh-teal);
  flex: 0 0 auto;
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } }

.col > .card + .card { margin-top: 16px; }

/* ---------------------------------------------------------------
   6. STATUS BOXES
   --------------------------------------------------------------- */
.status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 860px) { .status-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.status-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--line2);
}
.status-box .k {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  font-weight: 600;
}
.status-box .v {
  font-family: var(--head);
  font-size: clamp(18px, 15px + .8vw, 23px);
  font-weight: 800;
  margin-top: 4px;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.status-box .sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

.phase-BEFORE { border-top-color: var(--before) !important; }
.phase-DURING { border-top-color: var(--during) !important; }
.phase-AFTER  { border-top-color: var(--after) !important; }

/* ---------------------------------------------------------------
   7. TIMELINE
   --------------------------------------------------------------- */
.tl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.btn {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  min-height: 44px;
  font-weight: 700;
  font-family: var(--head);
  cursor: pointer;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  transition: filter .15s ease, transform .06s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn { text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.sec {
  background: var(--panel);
  color: var(--brand-ink);
  border-color: var(--line2);
}
.btn.tiny { padding: 7px 12px; min-height: 36px; font-size: 12px; }

.tl-time {
  font-variant-numeric: tabular-nums;
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(15px, 13px + .4vw, 18px);
  margin-left: 4px;
  color: var(--txt);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.tl-time small { color: var(--muted); font-weight: 500; font-family: var(--font); font-size: 12px; }

.tl-band {
  height: 9px;
  border-radius: 6px;
  margin: 10px 0 3px;
  background: linear-gradient(90deg, var(--before) 0 50%, var(--during) 50% 66.6%, var(--after) 66.6% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  height: 26px;
  cursor: pointer;
}
.tl-marks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 600;
}
@media (max-width: 620px) { .tl-marks span:nth-child(even) { display: none; } }

.tl-progress {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  margin-top: 10px;
  overflow: hidden;
}
.tl-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .3s linear;
}

.kbd-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  background: var(--inset);
  border: 1px solid var(--line2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--txt2);
}

/* ---------------------------------------------------------------
   8. SCREEN NODE GRID
   --------------------------------------------------------------- */
.screens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 11px;
  padding: 0;
  margin: 0;
  list-style: none;
}
@media (max-width: 420px) { .screens { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); } }

.node {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  transition: border-color .3s ease, background .3s ease, opacity .3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.node .ic { font-size: 21px; line-height: 1.1; }
.node .nm { font-family: var(--head); font-weight: 600; font-size: 12.5px; margin-top: 5px; color: var(--txt); }
.node .ty { font-size: 10.5px; color: var(--muted); }
.node .st {
  font-size: 10px;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  background: var(--panel2);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}
.node.dormant { opacity: .68; }
.node.alerted { border-color: var(--warn); background: var(--warn-bg); }
.node.alerted .st { background: rgba(181, 107, 0, .14); color: var(--warn-ink); border-color: rgba(181, 107, 0, .4); }
.node.pending { border-color: var(--purple); background: var(--purple-bg); }
.node.pending .st {
  background: rgba(91, 63, 196, .13);
  color: var(--purple);
  border-color: rgba(91, 63, 196, .4);
  animation: blink 1.2s infinite;
}
.node.live {
  border-color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 8%, var(--panel));
  box-shadow: 0 0 0 1px var(--accent2) inset, var(--shadow-sm);
}
.node.live .st { background: rgba(46, 128, 73, .16); color: var(--accent2); border-color: rgba(46, 128, 73, .45); }
.node.live::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(46, 128, 73, .12), transparent);
  animation: sheen 2.6s linear infinite;
}
.node[aria-pressed="true"] { box-shadow: var(--focus), var(--shadow-sm); }

@keyframes sheen { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes blink { 50% { opacity: .5; } }

.node .pill {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 8.5px;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .4px;
  background: var(--panel);
}
.node.auto .pill { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.node.optin .pill { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 45%, transparent); }

/* ---------------------------------------------------------------
   9. REGION MAP
   --------------------------------------------------------------- */
.map-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.maptog {
  font-size: 12px;
  color: var(--txt2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-weight: 500;
  min-height: 34px;
}
.maptog input { accent-color: var(--accent); width: 17px; height: 17px; }
.map-hint { margin-left: auto; font-size: 11px; color: var(--muted); }

.map-shell { position: relative; }
#map {
  width: 100%;
  height: auto;
  background: var(--map-bg);
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  display: block;
}
.mapinfo {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(9, 20, 34, .93);
  border: 1px solid #24405c;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11.5px;
  max-width: 62%;
  pointer-events: none;
  color: #e6eef8;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6);
}
.mapinfo b { color: #6fe8bf; }
@media (max-width: 520px) { .mapinfo { max-width: calc(100% - 24px); font-size: 11px; } }

.zone { cursor: pointer; transition: filter .3s ease; }
.zone:hover { filter: brightness(1.25); }
.pin { cursor: pointer; }
.radar-sweep {
  transform-origin: 600px 40px;
  animation: radar 6s linear infinite;
}
@keyframes radar { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------
   10. ACTIVITY LOG
   --------------------------------------------------------------- */
.log {
  max-height: 290px;
  overflow: auto;
  font-size: 12px;
  padding-right: 4px;
  margin: 0;
  list-style: none;
  overscroll-behavior: contain;
}
.log li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 9px;
}
.log li:last-child { border-bottom: 0; }
.log .t {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: 0 0 52px;
  font-weight: 600;
}
.log .dot-d { color: var(--danger); }
.log .dot-b { color: var(--accent); }
.log .dot-a { color: var(--accent2); }
.log .dot-w { color: var(--warn); }

/* ---------------------------------------------------------------
   11. WEATHER PANEL
   --------------------------------------------------------------- */
.alertlvl {
  font-family: var(--head);
  font-weight: 800;
  padding: 10px;
  border-radius: 11px;
  text-align: center;
  margin-bottom: 12px;
  border: 1.5px solid var(--line2);
  letter-spacing: .5px;
  font-size: clamp(13px, 12px + .3vw, 15px);
}
.weat .rows { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.weat .r {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  background: var(--inset);
  border-radius: 9px;
  border: 1px solid var(--line);
}
.weat .r dt { color: var(--txt2); }
.weat .r dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--txt);
  font-family: var(--head);
}

/* ---------------------------------------------------------------
   12. PERMISSION CARD
   --------------------------------------------------------------- */
.perm {
  background: linear-gradient(180deg, var(--purple-bg), var(--panel));
  border: 1.5px solid var(--purple);
  border-radius: 13px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.perm .hd { font-family: var(--head); font-weight: 700; color: var(--purple); font-size: 12.5px; margin-bottom: 7px; }
.perm .bd { font-size: 12px; color: var(--txt2); margin-bottom: 11px; }
.perm .acts { display: flex; gap: 9px; flex-wrap: wrap; }
.perm .acts button {
  flex: 1 1 140px;
  font-size: 12px;
  padding: 10px;
  min-height: 44px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 700;
  font-family: var(--head);
}
.grant { background: var(--accent2); color: #fff; }
.deny { background: var(--panel); color: var(--muted); border-color: var(--line2); }
.perm-note { font-size: 12px; }
.perm-note.ok { color: var(--accent2); font-weight: 600; }
.perm-note.muted { color: var(--muted); }

/* ---------------------------------------------------------------
   13. AUDIENCE CONTENT PREVIEW
   --------------------------------------------------------------- */
.aud-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.aud-tabs button {
  font-size: 11.5px;
  padding: 8px 13px;
  min-height: 38px;
  border-radius: 30px;
  background: var(--panel);
  border: 1px solid var(--line2);
  color: var(--txt2);
  cursor: pointer;
  font-weight: 600;
  transition: border-color .15s ease, background .15s ease;
}
.aud-tabs button:hover { border-color: var(--accent); }
.aud-tabs button[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
[data-theme="dark"] .aud-tabs button[aria-selected="true"] { color: #0a141d; }

/* the "screen" mock stays dark in both themes: it represents a real device */
.screenmock {
  background: linear-gradient(160deg, #0d1c2e, #081420);
  border: 1px solid #21344b;
  border-radius: 14px;
  padding: clamp(16px, 2.2vw, 22px);
  min-height: 158px;
  color: #fff;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .35);
}
.screenmock .mh { font-size: 10px; letter-spacing: 2.5px; color: #9dc0e2; text-transform: uppercase; font-weight: 700; }
.screenmock .mt { font-family: var(--head); font-size: clamp(17px, 14px + 1vw, 22px); font-weight: 800; margin: 9px 0 7px; line-height: 1.18; }
.screenmock .mb { font-size: 13px; color: #cddaea; margin: 0; }
.screenmock .mreg {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px;
  line-height: 1.55;
  color: #b9cee2;
}
.screenmock .mreg b { color: #ffffff; }
.screenmock .mreg a {
  color: #6fe0b4;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.screenmock .cta {
  margin-top: 14px;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--head);
  background: var(--roar-green);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}
.screenmock.lvl-watch { border-color: #d99000; box-shadow: inset 0 0 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(217, 144, 0, .4); }
.screenmock.lvl-warn { border-color: #e2485a; box-shadow: inset 0 0 40px rgba(0, 0, 0, .35), 0 0 22px -6px #e2485a; }
.screenmock.lvl-recover { border-color: #35a05c; box-shadow: inset 0 0 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(53, 160, 92, .4); }

/* ---------------------------------------------------------------
   14. KPIs + LEGEND
   --------------------------------------------------------------- */
.kpis { display: flex; gap: 11px; flex-wrap: wrap; margin: 0; }
.kpi {
  flex: 1 1 92px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px;
  text-align: center;
}
.kpi dd {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(18px, 15px + .8vw, 23px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand-ink);
}
.kpi dt {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
  margin-top: 2px;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  padding: 0;
  list-style: none;
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw {
  width: 11px; height: 11px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, .12);
  flex: 0 0 auto;
}
.sw-land { background: #122a1f; }
.sw-river { background: #2a6df0; }
.sw-radar { background: linear-gradient(90deg, #22c55e, #ffe100, #ff8a00, #e51616, #ff3df0); }
.sw-flood { background: rgba(214, 58, 75, .55); }
.sw-dormant { background: #9fb0c4; }
.sw-alerted { background: var(--warn); }
.sw-pending { background: var(--purple); }
.sw-live { background: var(--accent2); }
.legend .ink-accent { color: var(--accent); }
.legend .ink-purple { color: var(--purple); }
.legend .ink-live { color: var(--accent2); }

/* ---------------------------------------------------------------
   15. ABOUT / FOOTER
   --------------------------------------------------------------- */
.disclaimer {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--mesh-teal);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--txt2);
  line-height: 1.65;
}
.disclaimer strong { color: var(--txt); }

.site-footer {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 20px;
  text-align: center;
  line-height: 1.75;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.site-footer a { color: var(--accent); }

.partners-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 10px;
}
.partner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 20px);
  flex-wrap: wrap;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 9px clamp(14px, 3vw, 20px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.plogo { display: block; width: auto; }
.plogo-ezypa { height: 22px; border-radius: 3px; }
.plogo-aw { height: 34px; }
.plogo-rule {
  width: 1px;
  align-self: stretch;
  min-height: 26px;
  background: var(--line2);
}
@media (max-width: 380px) {
  .plogo-rule { display: none; }
  .plogo-aw { height: 30px; }
}

.noscript-note {
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  color: var(--warn-ink);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* ---------------------------------------------------------------
   16. ERROR PAGE
   --------------------------------------------------------------- */
.errorpage {
  max-width: 620px;
  margin: 8vh auto;
  text-align: center;
  padding: 24px;
}
.errorpage .code {
  font-family: var(--head);
  font-size: clamp(56px, 12vw, 96px);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -2px;
}
.errorpage h1 { font-size: clamp(20px, 4vw, 28px); margin: 8px 0 10px; color: var(--txt); }
.errorpage p { color: var(--muted); margin: 0 0 22px; }

/* ---------------------------------------------------------------
   17. MOTION / CONTRAST / PRINT PREFERENCES
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .node.live::after { display: none; }
  .radar-sweep { display: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #3f5059; --line: #9fb3bb; --line2: #7d949d; }
  [data-theme="dark"] { --muted: #cddcE7; --line: #43647a; --line2: #5d8098; }
  .node.dormant { opacity: .85; }
}

@media print {
  body { background: #fff; }
  .liveflag, .icon-btn, .tl-head, .map-controls, .kbd-hint, .aud-tabs { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; border-color: #bbb; }
  .cols { grid-template-columns: 1fr; }
  .log { max-height: none; overflow: visible; }
}

/* ---------------------------------------------------------------
   18. ELEMENT NORMALISATION (semantic markup, no layout surprises)
   --------------------------------------------------------------- */
.node .ic,
.node .nm,
.node .ty { display: block; }
.tl-time,
.kbd-hint,
.noscript-note,
.map-hint,
.perm p,
.site-footer p { margin: 0; }
.kbd-hint { margin-top: 10px; }
.perm .hd { margin-bottom: 7px; }
.perm .bd { margin-bottom: 11px; }
.alertlvl { margin: 0 0 12px; }
.site-footer p + p { margin-top: 6px; }
.weat .r dt,
.kpi dt { margin: 0; }
