:root {
  color-scheme: light;
  --bg: #f5f8fa;
  --surface: #ffffff;
  --ink: #12222d;
  --muted: #536571;
  --line: #dbe3e8;
  --brand: #0b5d7a;
  --brand-dark: #08445a;
  --brand-tint: #e3f0f5;
  --rain: #4a90b8;

  --low: #1d6b45;
  --low-bg: #e4f3ea;
  --watch: #7a5600;
  --watch-bg: #fdf1cf;
  --prepare: #a4470b;
  --prepare-bg: #fde6d4;
  --act: #a8201a;
  --act-bg: #fde1de;

  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--brand); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

button, input { font: inherit; }

button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 12px 20px;
}
button:hover { background: var(--brand-dark); }
button:disabled { opacity: .6; cursor: progress; }

button.link {
  background: none; color: var(--brand); padding: 0;
  text-decoration: underline; font-weight: 500;
}

input {
  width: 100%;
  border: 1px solid #b9c7d0;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid #7cc0dc; outline-offset: 2px;
}

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 22px; height: 22px; fill: var(--brand); }
nav { display: flex; gap: 20px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
nav a.nav-cta { color: var(--brand); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--brand-tint), var(--bg)); padding: 56px 0 40px; }
.eyebrow { color: var(--brand); font-weight: 600; margin: 0 0 8px; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); line-height: 1.15; margin: 0 0 16px; max-width: 760px; letter-spacing: -0.01em; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.check { display: flex; gap: 10px; max-width: 560px; }
.check input { flex: 1; font-size: 1.05rem; }
.check button { white-space: nowrap; }
.hint { color: var(--muted); margin: 14px 0 0; font-size: .95rem; }

/* Result */
.result { padding-top: 8px; padding-bottom: 24px; }
.loading, .error { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.error { color: var(--act); background: var(--act-bg); border-color: transparent; }

.banner {
  display: flex; gap: 18px; align-items: center;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--tint); color: var(--tone);
  border-left: 6px solid var(--tone);
}
.banner h2 { margin: 0 0 2px; font-size: 1.35rem; color: var(--ink); }
.banner p { margin: 0; color: var(--muted); }
.badge {
  flex: none; font-weight: 800; letter-spacing: .04em; font-size: .9rem;
  padding: 8px 12px; border-radius: 999px; background: var(--tone); color: #fff;
}
.lvl-0 { --tone: var(--low); --tint: var(--low-bg); }
.lvl-1 { --tone: var(--watch); --tint: var(--watch-bg); }
.lvl-2 { --tone: var(--prepare); --tint: var(--prepare-bg); }
.lvl-3 { --tone: var(--act); --tint: var(--act-bg); }

.notes { margin: 12px 0 0; padding: 0; list-style: none; }
.notes li { background: var(--surface); border: 1px dashed #b9c7d0; border-radius: 8px; padding: 10px 14px; margin-top: 8px; color: var(--muted); font-size: .95rem; }
.notes li.demo { border-color: var(--act); color: var(--act); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.card.wide { grid-column: 1 / -1; }
.card ul { margin: 0; padding-left: 20px; }
.card li + li { margin-top: 6px; }
.empty { color: var(--muted); margin: 0; }

.reason { display: flex; gap: 10px; align-items: baseline; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); transform: translateY(-1px); }

/* Rain chart */
.rain-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.rain-stats strong { color: var(--ink); }
.bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 140px; border-bottom: 1px solid var(--line); }
.bar { background: var(--rain); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar.zero { background: var(--line); }
.bar.lvl-1 { background: #d9a400; }
.bar.lvl-2 { background: #e0701f; }
.bar.lvl-3 { background: var(--act); }
.bar-labels { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.bar-labels span { text-align: center; white-space: nowrap; }

/* Gauges */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num { white-space: nowrap; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--tint); color: var(--tone); }
.chip.neutral { --tint: #eef2f5; --tone: var(--muted); }
.sub { color: var(--muted); font-size: .85rem; }

.warning + .warning { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.warning p { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }

/* How it works */
.how { padding-top: 40px; padding-bottom: 40px; }
.how h2, .signup h2 { font-size: 1.6rem; margin: 0 0 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 10px;
  background: var(--brand-tint); color: var(--brand); font-weight: 700;
}
.steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); }

/* Sign-up */
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 24px; padding-bottom: 56px; align-items: start; }
.price { font-size: 1.1rem; margin: 0 0 12px; color: var(--muted); }
.price strong { font-size: 2rem; color: var(--ink); }
.ticks { padding-left: 20px; margin: 0 0 16px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.plan.featured { border: 2px solid var(--brand); }
.plan h3 { margin: 0 0 4px; }
.plan .price strong { font-size: 1.5rem; }
.plan .ticks { margin: 0; font-size: .93rem; }
.ticks li + li { margin-top: 6px; }
.small { font-size: .88rem; color: var(--muted); }
.form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
.form input { margin-top: 6px; font-weight: 400; }
.form button { width: 100%; margin-top: 4px; }
.form-msg { margin: 12px 0 0; min-height: 1.5em; font-weight: 500; }
.form-msg.ok { color: var(--low); }
.form-msg.bad { color: var(--act); }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0; color: var(--muted); font-size: .88rem; }
.foot p { margin: 0 0 10px; max-width: 820px; }

/* Shared controls */
button.small { padding: 7px 12px; font-size: .88rem; color: #fff; }
button.ghost { background: transparent; color: var(--brand); border: 1px solid #b9c7d0; }
button.ghost:hover { background: var(--brand-tint); }
button.nav-link { color: var(--muted); text-decoration: none; }
select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #b9c7d0; border-radius: 8px; padding: 10px 12px;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { margin: 4px 0 0; }
.row { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; }
#account { display: flex; gap: 20px; align-items: center; }

/* Street reports and map */
.map { height: 320px; border-radius: 10px; border: 1px solid var(--line); margin: 12px 0; z-index: 0; }
.map.map-off { height: auto; padding: 12px; }
.report { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.report .dot { margin-top: 8px; }
.quote { margin: 4px 0; font-style: italic; }
.report .sub { margin: 4px 0 0; }
.report-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.report-form, .inline-form { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.report-form label, .inline-form label, .card form label, .panel label { display: block; font-weight: 600; margin-bottom: 12px; }
.report-form input, .inline-form input, .inline-form select, .panel textarea { margin-top: 6px; font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
legend { font-weight: 600; margin-bottom: 8px; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.report-form label.type {
  display: flex; gap: 8px; align-items: flex-start; margin: 0; cursor: pointer; font-weight: 500;
  border: 1px solid #b9c7d0; border-radius: 8px; padding: 10px; background: #fff;
}
.type input { width: auto; margin: 4px 0 0; }
.type:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

/* Rain over this postcode, ground wetness, post insights */
.rain-over { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: .92rem; }
.rain-over b { color: var(--ink); }
.ground { margin: 0 0 12px; font-weight: 600; font-size: .92rem; }
.ground-saturated { color: var(--act); }
.ground-wet { color: var(--prepare); }
.ground .sub { font-weight: 400; }
.insights { display: block; margin-top: 4px; }
.insights .chip { margin: 2px 4px 0 0; }

/* Local flood feed (dashboard) */
.alert-card { border: 2px solid var(--act); }
.alert-card h3 { margin-top: 0; }
.big-alert { background: var(--act); font-size: 1.05rem; padding: 14px 22px; }
.big-alert:hover { background: #8a1914; }
.feed { list-style: none; padding: 0; margin: 16px 0 0; }
.feed li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.feed .icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; background: var(--bg); }
.feed .lvl-1 .icon { background: var(--watch-bg); }
.feed .lvl-2 .icon { background: var(--prepare-bg); }
.feed .lvl-3 .icon { background: var(--act-bg); }
.feed .meta { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.feed .actions { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.feed .faded { opacity: .6; }
.network { padding-top: 8px; padding-bottom: 32px; }
.network h2 { font-size: 1.6rem; margin: 0 0 12px; }
.network-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.network-grid h3 { margin: 0 0 8px; }
.network-grid p { margin: 0; color: var(--muted); }

/* Street-level flood map */
.street h4 { margin: 20px 0 4px; font-size: 1rem; }
.forecast-panel { margin-bottom: 4px; }
.forecast-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid #b9c7d0; border-radius: 8px; overflow: hidden; margin-left: auto; }
.seg button { background: transparent; color: var(--brand); border-radius: 0; padding: 6px 12px; font-size: .86rem; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.loading-dim { opacity: .5; }
.rain-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 110px; margin-top: 10px; align-items: end; }
.rain-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; border-bottom: 1px solid var(--line); position: relative; }
.rain-col span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--muted); white-space: nowrap; }
.rain-col:nth-child(odd) span { visibility: hidden; }
.rain-col.now { border-left: 2px dashed var(--ink); }
.rain-col.now::before { content: "now"; position: absolute; top: -2px; left: 4px; font-size: .7rem; font-weight: 700; }
.rain-bar { background: var(--rain); border-radius: 3px 3px 0 0; }
.rain-col.past .rain-bar { opacity: .55; }
.rain-bar.lvl-1 { background: #d9a400; }
.rain-bar.lvl-2 { background: #e0701f; }
.rain-bar.lvl-3 { background: var(--act); }
.rain-strip + .sub { margin-top: 24px; }
.slider-row { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.slider-row input[type="range"] { flex: 1; padding: 0; border: 0; accent-color: var(--brand); }
#forecast-label { font-weight: 600; white-space: nowrap; }
.ok-line { color: var(--low); font-weight: 600; margin: 6px 0; }
.your-door { padding: 8px 12px; border-radius: 8px; background: var(--tint); margin: 8px 0 0; }
.your-door .chip { background: var(--tone); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); margin: -4px 0 8px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.street-list, .signal-list { list-style: none; padding: 0; margin: 8px 0 0; }
.street-list li, .signal-list li { padding: 6px 0; border-top: 1px solid var(--line); }
.depth { display: inline-block; min-width: 58px; text-align: center; color: #fff; font-weight: 700; font-size: .82rem; border-radius: 6px; padding: 2px 6px; margin-right: 8px; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
details summary { cursor: pointer; font-weight: 600; }
.sources { margin-top: 8px; font-size: .9rem; }
.sources ul { margin: 6px 0 0; padding-left: 18px; }

/* Door-level trigger */
.card.trigger[class*="lvl-"] { border-left: 6px solid var(--tone); }
.trigger-body { display: flex; gap: 20px; align-items: center; }
.trigger-body p { margin: 0 0 6px; }
.eta-box { flex: none; max-width: 230px; border-radius: 10px; padding: 14px 18px; background: var(--tint, var(--brand-tint)); color: var(--tone, var(--brand)); }
.eta-box strong { display: block; font-size: 1.6rem; line-height: 1.2; }
.with-unit { display: flex; align-items: center; gap: 8px; max-width: 220px; font-weight: 400; }
.presets { font-size: .9rem; color: var(--muted); }
.presets button { margin: 4px 4px 0 0; }

/* Sign-in dialog */
.dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(420px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(18, 34, 45, .25); }
.dialog::backdrop { background: rgba(18, 34, 45, .45); }
.dialog h2 { margin: 0 0 6px; }
.dialog #signin-cancel { display: block; margin: 12px auto 0; }
.dev-code { background: var(--watch-bg); color: var(--watch); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.demo-card { border: 2px solid var(--brand); }
.demo-card h3 { margin-top: 0; }
.demo-card button { width: 100%; }

/* Business dashboard */
.dash-head { padding: 28px 0 0; }
.dash-head h1 { margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin: 16px 0 20px; }
.tabs button { background: none; color: var(--muted); border-radius: 0; border-bottom: 3px solid transparent; padding: 10px 14px; white-space: nowrap; }
.tabs button:hover { background: var(--brand-tint); }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.panel { padding-bottom: 48px; }
.panel h2 { font-size: 1.4rem; }
.panel-tools { margin-bottom: 12px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 20px; }
.progress span { display: block; height: 100%; background: var(--low); }
.plan-level { margin-bottom: 24px; }
.plan-level h3 { display: flex; gap: 10px; align-items: center; font-size: 1.05rem; margin: 0 0 8px; }
.plan-level .badge { font-size: .78rem; padding: 5px 10px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap;
  padding: 10px 12px; margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.panel .checklist label { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 500; cursor: pointer; flex: 1 1 320px; }
.checklist input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.checklist li.done { background: var(--low-bg); border-color: transparent; }
.checklist li.done .task { text-decoration: line-through; color: var(--muted); }
.edit-list { display: grid; gap: 8px; margin-bottom: 12px; }
.edit-row { display: grid; gap: 8px; align-items: center; grid-template-columns: 130px 190px 1fr auto; }
.stock-row { grid-template-columns: 1.4fr 1.2fr 110px 1fr auto; }
.staff-row { grid-template-columns: 1fr 160px 1fr auto; }
.form-actions { margin-top: 16px; }
.panel label.check-line { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin-top: 16px; }
.check-line input { width: auto; margin-top: 4px; }
.channels { margin-bottom: 16px; }
.channels .row { gap: 8px 24px; }
.panel .channels label.check-line { margin: 0; }
.stat { text-align: right; color: var(--muted); }
.stat strong { display: block; font-size: 1.6rem; color: var(--ink); }
.seal { padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.seal.ok { background: var(--low-bg); color: var(--low); }
.seal.bad { background: var(--act-bg); color: var(--act); }
.log { margin-top: 16px; }
.log-entry { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.log-time { color: var(--muted); font-size: .88rem; }
.log-time strong { color: var(--ink); }
.log-entry .sub { margin-top: 4px; }
.log-entry img { display: block; max-width: min(280px, 100%); border-radius: 8px; margin-top: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; max-width: calc(100% - 32px);
}
.toast.bad { background: var(--act); }

/* Predict and reduce the damage */
.predict { padding-top: 8px; padding-bottom: 32px; }
.predict h2 { font-size: 1.6rem; margin: 0 0 16px; }
.predict-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.predict-grid h3 { margin: 0 0 10px; }
.predict-grid .ticks { margin: 0; }
.ai-next { background: var(--brand-tint); border-color: transparent; }
.ai-next p { margin: 0; }

/* Coming soon: SMS and WhatsApp alerts */
.soon { display: inline-block; background: var(--watch-bg); color: var(--watch); font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.alerts-soon { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 24px; padding-bottom: 40px; align-items: center; }
.alerts-soon h2 { font-size: 1.6rem; margin: 0 0 12px; }
.button-link { display: inline-block; background: var(--brand); color: #fff; font-weight: 600; padding: 12px 20px; border-radius: 8px; text-decoration: none; }
.button-link:hover { background: var(--brand-dark); }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.phones .small { grid-column: 1 / -1; margin: 0; }
.phone { margin: 0; background: #eef1f4; border: 8px solid #12222d; border-radius: 24px; padding: 14px 10px 10px; min-height: 260px; display: flex; flex-direction: column; }
.phone.whatsapp { background: #e6ddd4; }
.phone figcaption { font-size: .75rem; font-weight: 700; color: var(--muted); text-align: center; margin-bottom: 10px; }
.bubble { font-size: .84rem; line-height: 1.4; padding: 10px 12px; border-radius: 14px; max-width: 100%; }
.bubble.sms { background: #fff; border-top-left-radius: 4px; }
.bubble.wa { background: #fff; border-top-left-radius: 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
.phone .time { font-size: .7rem; color: var(--muted); margin-top: 4px; }

/* Register interest */
.interest { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 24px; padding-bottom: 56px; align-items: start; }
.interest h2 { font-size: 1.6rem; margin: 0 0 12px; }
.interest .privacy { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.interest fieldset { margin: 4px 0 14px; }
.interest .form label.check-line { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin: 0 0 8px; }
.interest .check-line input { width: auto; margin: 4px 0 0; }
.interest select { margin-top: 6px; font-weight: 400; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Admin */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.admin-stats .card h3 { font-size: .95rem; margin-bottom: 8px; }
.admin-stats ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.admin-stats li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line); }
.big-number { font-size: 2.6rem; font-weight: 800; line-height: 1; }
tr.test td { color: var(--muted); font-style: italic; }

/* Flood event report */
.doc { padding-top: 28px; padding-bottom: 48px; max-width: 900px; }
.doc-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 3px solid var(--brand); padding-bottom: 12px; }
.doc-title h1 { margin: 4px 0; }
.doc-title p { margin: 0; color: var(--muted); }
.doc-meta { margin: 16px 0; font-size: .95rem; }
.doc-meta th { width: 150px; color: var(--muted); font-weight: 600; }
.doc-section { margin-top: 28px; break-inside: avoid-page; }
.doc-section h2 { font-size: 1.2rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 0 0 12px; }
.doc-section .num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; margin-right: 10px; }
.findings { background: var(--brand-tint); border-radius: var(--radius); padding: 16px 20px; }
.findings h2 { border: 0; }
.findings li + li { margin-top: 6px; }
.doc-map { height: 320px; border: 1px solid var(--line); border-radius: 8px; }
.caption { font-size: .85rem; color: var(--muted); margin: 6px 0 12px; }
.caption .key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.doc-table { margin: 12px 0; font-size: .9rem; }
.doc-bars { display: grid; gap: 1px; align-items: end; height: 120px; border-bottom: 1px solid var(--line); margin-top: 12px; }
.doc-axis { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.photo-grid img { width: 100%; border-radius: 8px; }
.photo-grid figcaption { font-size: .82rem; color: var(--muted); }
.verify code { word-break: break-all; font-size: .85rem; }
.report-list { list-style: none; padding: 0; margin: 12px 0 0; }
.report-list li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.event-form .row label { margin: 0; }
.event-form input[type="datetime-local"] { width: auto; }

/* Sensors, the 2D model and council reports */
.twod-card { margin-top: 16px; }
.twod-card .map { height: 360px; }
.door-chart { display: flex; gap: 1px; align-items: flex-end; height: 90px; border-bottom: 1px solid var(--line); margin-top: 10px; }
.door-bar { flex: 1; background: var(--rain); border-radius: 2px 2px 0 0; }
.door-bar.lvl-1 { background: #d9a400; }
.door-bar.lvl-2 { background: #e0701f; }
.door-bar.lvl-3 { background: var(--act); }
.model-notes { margin-top: 12px; }
.model-notes summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.mini-table { font-size: .85rem; margin: 8px 0; }
.mini-table td, .mini-table th { padding: 4px 6px; }
.card .sensor-list { list-style: none; padding: 0; margin: 0; }
.sensor { padding: 10px 0; border-top: 1px solid var(--line); }
.sensor-test { margin-top: 6px; }
.sensor-test input { width: 90px; padding: 6px 8px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.token-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--brand-tint); }
.token-box code { display: block; word-break: break-all; background: var(--surface); padding: 8px; border-radius: 6px; margin: 6px 0; }
.token-box p { margin: 0 0 6px; }
.council-card { margin-top: 16px; }
.council-card .row label { margin: 0; }
.council-card select { margin-left: 6px; }
.small-link { font-size: .88rem; font-weight: 600; }
.button-link.ghost-link { background: transparent; color: var(--brand); border: 1px solid #b9c7d0; }
.button-link.ghost-link:hover { background: var(--brand-tint); }

/* Insurer claim checks */
.insurer { padding-bottom: 48px; }
.insurer .lede { margin-bottom: 20px; }
.insurer .card label { display: block; font-weight: 600; margin-bottom: 12px; }
.insurer .card label input, .insurer .card label select { margin-top: 6px; font-weight: 400; }
.insurer .grid { margin-top: 16px; }
.wide-card { margin-top: 16px; }
.key-row { align-items: flex-end; }
.key-row label { flex: 1; min-width: 240px; margin: 0; }
.more { margin: 0 0 14px; }
.more summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 10px; }
.more .row label { flex: 1; min-width: 140px; }
.table-scroll { overflow-x: auto; }
.bad-text { color: var(--act); font-size: .9rem; }
pre.code { background: #12222d; color: #e3f0f5; border-radius: 8px; padding: 14px; overflow-x: auto; font-size: .85rem; white-space: pre; }
.sample { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.sample p { margin: 2px 0 0; }
.verdict-mini { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--tint); }
.verdict-mini p { margin: 0 0 6px; }
.verdict-mini ul { margin: 0 0 8px; padding-left: 20px; font-size: .92rem; }
.verdict { margin: 20px 0 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--tint); border-left: 6px solid var(--tone); }
.verdict.lvl-0 { --tone: var(--muted); --tint: #eef2f5; }
.verdict-label { margin: 0; font-size: 1.45rem; font-weight: 700; color: var(--tone); }
.verdict-type { margin: 4px 0 0; }
.verdict-reasons { margin: 12px 0 0; padding: 0; list-style: none; }
.verdict-reasons li { margin-top: 8px; }
.sample-note { background: var(--watch-bg); color: var(--watch); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
.key-gate { max-width: 460px; margin: 24px auto; }
.key-gate label { display: block; font-weight: 600; margin: 12px 0; }
.key-gate input { margin-top: 6px; font-weight: 400; }
.chip.lvl-0 { --tint: #eef2f5; --tone: var(--muted); }

@media print {
  .top, .tabs, .foot, .no-print, .toast { display: none !important; }
  body { background: #fff; }
  .doc { padding-top: 0; }
  .doc-map { height: 260px; }
  a { color: inherit; }
}

@media (max-width: 760px) {
  .grid, .signup, .steps, .plans, .alerts-soon, .interest, .predict-grid, .network-grid { grid-template-columns: 1fr; }
  .trigger-body { flex-direction: column; align-items: flex-start; }
  .edit-row, .stock-row, .staff-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .edit-row input[name="text"] { grid-column: 1 / -1; }
  .log-entry { grid-template-columns: 1fr; gap: 4px; }
  .stat { text-align: left; }
  .check { flex-direction: column; }
  .hero { padding-top: 36px; }
  .banner { flex-direction: column; align-items: flex-start; gap: 10px; }
  nav a:not(.nav-cta) { display: none; }
  .bar-labels span { font-size: .62rem; }
  .gauge-range { display: none; }
}
