/* ClientSpout public pages. Mobile first, system fonts, no web font requests. */
:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --ink: #15212b;
  --muted: #4b5966;
  --line: #d9dfe3;
  --brand: #1d4f73;
  --call: #0e6e38;
  --call-hover: #0a5a2d;
  --focus: #f0b400;
  --warn-bg: #fff8e6;
  --warn-line: #e3c46a;
  --radius: 12px;
  --bar-h: 76px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  /* room for the fixed call bar on phones */
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: #cfe3f2; }

.skip {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 30;
  background: var(--ink); color: #fff; padding: 0.6rem 0.9rem; border-radius: 8px;
}
.skip:focus { top: 0.5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: max(1rem, env(safe-area-inset-left, 0px)); }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; padding: 0.6rem 0; }
.nav-wide { display: none; }
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px; padding: 0 0.9rem; border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 1rem; background: var(--surface);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.menu[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 25;
  display: grid; min-width: 14rem; padding: 0.4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(21, 33, 43, 0.14);
}
.menu-list a { display: flex; align-items: center; min-height: 44px; padding: 0 0.75rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.menu-list a:hover { background: var(--bg); }

/* Breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.15rem 0.4rem; list-style: none; margin: 0; padding: 0.9rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 0.4rem; color: #8a96a1; }
.crumbs a { color: var(--muted); }

/* Type */
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 800; max-width: 22ch; }
h2 { font-size: 1.3rem; font-weight: 750; margin-bottom: 0.6rem; }
p { margin: 0 0 0.8rem; max-width: 68ch; }
.lead { font-size: 1.125rem; color: var(--muted); margin-top: 0.6rem; }
.eyebrow { font-size: 0.9375rem; font-weight: 650; color: var(--brand); text-transform: none; margin: 0 0 0.35rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }
.source { color: var(--muted); font-size: 0.9375rem; }
.num { font-variant-numeric: tabular-nums; }
.r { text-align: right; }

main { padding-bottom: 2.5rem; }
.hero { padding: 1.1rem 0 0.4rem; }
.block { margin-top: 1.75rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.65rem 1.15rem; border-radius: 10px; border: 0;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-call { background: var(--call); color: #fff; font-size: 1.125rem; }
.btn-call:hover { background: var(--call-hover); }
.btn-call:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.ico { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.card-h { font-size: 1.15rem; margin-bottom: 0.7rem; }
.call-card { margin-top: 1rem; }
.call-card .fine { margin: 0.75rem 0 0; }
.call-off { background: var(--warn-bg); border-color: var(--warn-line); }
.call-off .card-h { margin-bottom: 0.4rem; }
.fine { font-size: 0.875rem; color: var(--muted); }
.call-off p { margin-bottom: 0; }
.call-off .fine { margin-top: 0.5rem; }

/* Sticky call bar: phones only */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 0.75rem;
  min-height: var(--bar-h);
  padding: 0.7rem max(1rem, env(safe-area-inset-right, 0px)) calc(0.7rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(21, 33, 43, 0.08);
}
.callbar .btn-call { flex: 1; min-height: 52px; }
.callbar-live { flex-wrap: wrap; row-gap: 0.3rem; padding-top: 0.55rem; }
.callbar-live .btn-call { flex: 1 1 100%; }
.callbar-fine { flex: 1 1 100%; margin: 0; font-size: 0.8125rem; line-height: 1.3; color: var(--muted); text-align: center; }
body:has(.callbar-live) { padding-bottom: calc(var(--bar-h) + 1.4rem + env(safe-area-inset-bottom, 0px)); }
.callbar-num { font-weight: 600; opacity: 0.95; margin-left: 0.2rem; }
.callbar-off { justify-content: space-between; }
.callbar-note { margin: 0; font-size: 0.9375rem; color: var(--muted); line-height: 1.3; }
.callbar-off .btn { flex: none; min-height: 48px; padding-inline: 1rem; font-size: 1rem; }

/* Search */
.search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; margin: 0.4rem 0 0; max-width: 34rem; }
.search label { font-weight: 600; font-size: 0.9375rem; }
.search-row { display: flex; gap: 0.5rem; }
.search input {
  width: 100%;
  flex: 1; min-width: 0; min-height: 48px; padding: 0.6rem 0.8rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid #a9b4bd; border-radius: 10px;
}
.search input:focus { border-color: var(--brand); }

/* Service tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.tile {
  display: grid; gap: 0.2rem; padding: 0.95rem 2.4rem 0.95rem 1rem; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; min-height: 44px;
}
.tile::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); }
.tile:hover { border-color: var(--brand); }
.tile-title { font-weight: 750; font-size: 1.1rem; }
.tile-text { color: var(--muted); font-size: 0.9375rem; }

/* Pick lists (states, counties) */
.pick { list-style: none; margin: 0; padding: 0; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pick li + li { border-top: 1px solid var(--line); }
.pick a { display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 0.6rem 2.4rem 0.6rem 1rem; position: relative; color: var(--ink); text-decoration: none; font-weight: 650; }
.pick a::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); }
.pick a:hover { background: #eef3f7; }
.pick-meta { font-weight: 400; font-size: 0.875rem; color: var(--muted); }

/* Row lists (alerts, declarations, storms) */
.rows { list-style: none; margin: 0 0 0.8rem; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.row-link { display: grid; gap: 0.15rem; padding: 0.7rem 0; min-height: 44px; text-decoration: none; color: var(--ink); }
.row-title { font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 0.15em; }
.row-meta { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Advice */
.advice { margin: 0 0 0.6rem; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.6rem; }
.advice li { counter-increment: step; position: relative; padding: 0.8rem 0.9rem 0.8rem 3.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.advice li::before {
  content: counter(step); position: absolute; left: 0.85rem; top: 0.8rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.875rem;
}

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.6rem; margin: 0 0 0.6rem; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 0.9rem; }
.facts dt { font-size: 0.875rem; color: var(--muted); }
.facts dd { margin: 0.15rem 0 0; font-size: 1.4rem; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Disclosure toggles and tables */
.more { margin: 0.4rem 0 0.8rem; }
.more summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--brand); }
.grid { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.9375rem; }
.grid caption { text-align: left; font-size: 0.875rem; color: var(--muted); padding: 0 0 0.4rem; }
.grid th, .grid td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
.grid th.r, .grid td.r { text-align: right; }
.grid tr:last-child td { border-bottom: 0; }

/* Search results */
.results { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--bg); }

.note p { color: var(--muted); }
.prose-page { padding-top: 1.1rem; }
.prose-page h1 { margin-bottom: 1rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 1.25rem 0 1.5rem; font-size: 0.9375rem; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }

/* County layout */
.county-call .call-card { margin-top: 0.9rem; }

@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-counties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-counties li + li { border-top: 0; }
  .pick-counties li { border-bottom: 1px solid var(--line); }
  .pick-counties li:nth-child(odd) { border-right: 1px solid var(--line); }
}

@media (min-width: 900px) {
  body, body:has(.callbar-live) { padding-bottom: 0; }
  .callbar { display: none; }
  .nav-wide { display: flex; gap: 0.25rem; }
  .nav-wide a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.7rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 550; }
  .nav-wide a:hover { background: var(--bg); }
  .menu { display: none; }
  .hero { padding-top: 1.75rem; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick:not(.pick-counties) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick:not(.pick-counties) li + li { border-top: 0; }
  .pick:not(.pick-counties) li { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
  .pick-counties { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick-counties li:nth-child(odd) { border-right: 0; }
  .pick-counties li { border-right: 1px solid var(--line); }
  .county {
    display: grid; grid-template-columns: minmax(0, 1fr) 22rem; column-gap: 2.5rem;
    grid-template-areas: "hero call" "body call";
    align-items: start;
  }
  .county-hero { grid-area: hero; }
  .county-call { grid-area: call; position: sticky; top: 1rem; padding-top: 1.75rem; }
  .county-call .call-card { margin-top: 0; padding: 1.25rem; }
  .county-body { grid-area: body; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* County answer summary, FAQ, related links, sources */
.summary { margin: 0.75rem 0 0; padding: 0.75rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); }
.updated { margin: 0.5rem 0 0; }
.faq h3 { font-size: 1.05rem; margin: 1.1rem 0 0.25rem; }
.faq p { margin: 0; }
.related h3 { font-size: 1rem; margin: 1rem 0 0.5rem; }
.chips-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--bg); }
.sources { margin: 0; padding-left: 1.1rem; }
.sources li { margin: 0.35rem 0; }
.foot-disclosure { font-weight: 600; }
