/* countrysignal — map-first, warm, human design.
 * The map IS the app (Watch Duty / Citizen / Maps pattern): a full-viewport map
 * with calm overlays floating on top. Warm-light, Fraunces + Source Sans 3,
 * terracotta accent, green/amber/red = severity (red is sacred). */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-text: "Source Sans 3", system-ui, -apple-system, sans-serif;

  --paper: #fbf7f0;
  --paper-raised: #fffdf8;
  --paper-sunk: #f3ece0;
  --ink: #2b2622;
  --ink-soft: #6b6259;
  --ink-faint: #9a8f82;
  --line: #e9e0d2;

  --accent: #c8623a;
  --accent-soft: #fbe3da;

  --safe: #3f7d58;  --safe-bg: #e7f0e4;  --safe-ink: #2c5c3e;
  --watch: #c8881c; --watch-bg: #fbefd3; --watch-ink: #7a5410;
  --danger: #b23a2e; --danger-bg: #fbe5e1; --danger-ink: #7e261d;

  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --topbar-h: 60px;
  --sheet-peek: 132px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  font-size: 16px;
  overflow: hidden;
}

.screen { position: fixed; inset: 0; }
.hidden { display: none !important; }

/* ============ ONBOARDING ============ */
#onboarding {
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 26px max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
}
.ob-inner { max-width: 380px; width: 100%; text-align: center; }
.ob-icon { color: var(--accent); display: inline-grid; place-items: center; margin-bottom: 18px; position: relative; }
.ob-icon::after {
  content: ""; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(200,98,58,.5); animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping { 0%,100%{box-shadow:0 0 0 0 rgba(200,98,58,0);} 12%{box-shadow:0 0 0 12px rgba(200,98,58,.28);} }
.ob-brand { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); }
.ob-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(27px, 8vw, 33px); line-height: 1.18; letter-spacing: -0.01em; margin-top: 12px; }
.ob-sub { font-size: 16px; color: var(--ink-soft); margin-top: 12px; }
.ob-points { list-style: none; text-align: left; margin: 24px auto; max-width: 300px; display: flex; flex-direction: column; gap: 13px; }
.ob-points li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--ink); }
.ob-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.ob-dot--red { background: var(--danger); }
.ob-dot--amber { background: var(--watch); }
.ob-dot--green { background: var(--safe); }
.ob-live { font-size: 14px; color: var(--ink-soft); margin: 4px 0 22px; display: inline-flex; align-items: center; gap: 7px; }
.ob-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); animation: ping 2.6s var(--ease) infinite; }
.ob-trust { font-size: 12.5px; color: var(--ink-faint); margin-top: 16px; line-height: 1.5; }
.ob-preview-link { background: none; border: none; color: var(--ink-soft); font-family: var(--font-text); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-top: 14px; padding: 4px; }
.ob-preview-link:hover { color: var(--ink); }

/* ============ SAMPLE-ALERT PREVIEW ============ */
.apv { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; }
.apv__backdrop { position: absolute; inset: 0; background: rgba(43,38,34,.5); backdrop-filter: blur(2px); }
.apv__sheet { position: relative; max-width: 380px; width: 100%; background: var(--paper-raised); border-radius: 20px; padding: 22px; box-shadow: 0 12px 50px rgba(43,38,34,.35); animation: apvIn .25s var(--ease); }
@keyframes apvIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.apv__caption { font-size: 13px; color: var(--ink-soft); text-align: center; margin-bottom: 14px; }
.apv__notif { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; box-shadow: 0 3px 14px rgba(178,58,46,.12); }
.apv__notif-head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; }
.apv__notif-ico { font-size: 12px; }
.apv__notif-app { font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.apv__notif-time { margin-left: auto; }
.apv__notif-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--danger-ink); margin: 0 0 4px; }
.apv__notif-body { font-size: 14px; line-height: 1.45; color: var(--ink); margin: 0; }
.apv__note { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin: 16px 0 16px; text-align: center; }
.apv__sheet .btn { margin-top: 0; }

/* ============ BUTTONS ============ */
.btn {
  width: 100%; border: none; border-radius: var(--radius);
  padding: 16px 20px; font-family: var(--font-text); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform .12s var(--ease), filter .12s var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 2px 12px rgba(200,98,58,.3); }
.btn--ghost { background: transparent; color: var(--accent); font-weight: 600; margin-top: 10px; box-shadow: none; }

/* ============ MAP SCREEN ============ */
#map { position: absolute; inset: 0; z-index: 0; background: var(--paper-sunk); }
.leaflet-container { font-family: var(--font-text); background: var(--paper-sunk); }
.leaflet-control-zoom { display: none; } /* we use our own + pinch */

/* TOP BAR */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 600;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(251,247,240,0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__status { display: flex; align-items: center; gap: 11px; min-width: 0; }
.status-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: var(--safe); }
.status-dot.is-danger { background: var(--danger); animation: ping 1.8s var(--ease) infinite; }
.status-dot.is-watch { background: var(--watch); }
.topbar__text { display: flex; flex-direction: column; min-width: 0; }
.topbar__line { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__place { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__lang { flex: 0 0 auto; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }

/* LEGEND */
.legend {
  position: absolute; left: 16px; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 14px);
  z-index: 590; display: flex; gap: 12px;
  background: rgba(251,247,240,0.9); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px;
  font-size: 12px; color: var(--ink-soft); box-shadow: 0 2px 10px rgba(120,90,60,.08);
}
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__more { position: relative; }
.legend__more > summary { list-style: none; cursor: pointer; color: var(--ink-soft); border-left: 1px solid var(--line); padding-left: 12px; white-space: nowrap; }
.legend__more > summary::-webkit-details-marker { display: none; }
.legend__more > summary::after { content: " \25BE"; opacity: .6; }
.legend__more[open] > summary::after { content: " \25B4"; }
.legend__more[open] { display: flex; align-items: center; gap: 12px; }
.legend__more[open] > summary { border-left: none; padding-left: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--green { background: var(--safe); } .dot--amber { background: var(--watch); } .dot--red { background: var(--danger); }

/* RECENTER */
.recenter {
  position: absolute; right: 16px; z-index: 650;
  bottom: calc(var(--sheet-peek) + 16px + env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--paper-raised); border: 1px solid var(--line); color: var(--accent);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 3px 14px rgba(120,90,60,.18);
}

/* BOTTOM SHEET */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 700;
  background: var(--paper-raised);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 30px rgba(120,90,60,.14);
  padding: 0 20px env(safe-area-inset-bottom);
  transition: height .28s var(--ease);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sheet--peek { height: calc(var(--sheet-peek) + env(safe-area-inset-bottom)); }
.sheet--half { height: 56dvh; }
.sheet--full { height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top) - 8px); }
.sheet__grab { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 10px auto 8px; flex: 0 0 auto; cursor: grab; }
.sheet__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; flex: 0 0 auto; cursor: pointer; }
.sheet__title { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.sheet__count { font-size: 13px; color: var(--ink-soft); }
/* period selector (Today / 7d / 30d) */
.period { display: flex; gap: 8px; padding: 0 0 12px; flex: 0 0 auto; }
.period__btn {
  flex: 1; border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 8px 6px; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; font-family: var(--font-text);
  transition: all .12s var(--ease);
}
.period__btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.sheet__list { overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet__empty { padding: 24px 4px; text-align: center; color: var(--safe-ink); font-size: 15px; }

/* EVENT ROW */
.evt { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.evt:last-child { border-bottom: none; }
.evt-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: var(--paper-sunk); }
.evt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.evt-title { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt-meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.evt-level { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.lvl-red { background: var(--danger-bg); color: var(--danger-ink); }
.lvl-orange { background: var(--watch-bg); color: var(--watch-ink); }
.lvl-green { background: var(--safe-bg); color: var(--safe-ink); }

.sheet__share { padding: 18px 0 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.sheet__share strong { font-family: var(--font-display); font-size: 16px; }
.sheet__share p { font-size: 14px; color: var(--ink-soft); margin: 5px 0 12px; }
.sheet__disclaimer { font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; padding: 14px 0 18px; }

/* Custom Leaflet marker (severity color + hazard glyph) */
.cs-marker {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50% 50% 50% 4px;
  transform: rotate(45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  font-size: 14px;
}
.cs-marker > span { transform: rotate(-45deg); }
.cs-marker--red { background: var(--danger); }
.cs-marker--orange { background: var(--watch); }
.cs-marker--green { background: var(--safe); }
.cs-me { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(200,98,58,.3), 0 2px 6px rgba(0,0,0,.3); }

/* ---- Event detail panel ---- */
.detail {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 800;
  background: var(--paper-raised);
  border-radius: 22px 22px 0 0; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 30px rgba(120,90,60,.18);
  padding: 22px 22px calc(24px + env(safe-area-inset-bottom));
  max-height: 70dvh; overflow-y: auto;
}
.detail__back {
  background: var(--paper-sunk); border: none; border-radius: 999px;
  width: 36px; height: 36px; font-size: 18px; color: var(--ink); cursor: pointer; margin-bottom: 14px;
}
.detail__head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.detail__ico { font-size: 30px; width: 52px; height: 52px; border-radius: 50%; background: var(--paper-sunk); display: grid; place-items: center; flex: 0 0 auto; }
.detail__title { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.15; margin-bottom: 6px; }
.detail__impact { font-size: 15px; color: var(--ink); background: var(--paper-sunk); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; }
.detail__facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin-bottom: 18px; }
.detail__facts dt { font-size: 13px; color: var(--ink-soft); }
.detail__facts dd { font-size: 14px; color: var(--ink); font-weight: 600; text-align: right; }
.detail__note { font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 14px; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.detail__actions .btn { flex: 1 1 auto; }

/* new-danger flash banner (in-range only) */
.newflash {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 720;
  top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px);
  background: var(--danger); color: #fff; border: none; border-radius: 999px;
  padding: 11px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 18px rgba(178,58,46,.4);
  animation: flashin .3s var(--ease), pulse-red 2s var(--ease) infinite .3s;
}
@keyframes flashin { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes pulse-red { 0%,100% { box-shadow: 0 4px 18px rgba(178,58,46,.4); } 50% { box-shadow: 0 4px 26px rgba(178,58,46,.7); } }

/* small "turn on location" pill for denied/browse state */
.locpill {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 620;
  bottom: calc(var(--sheet-peek) + 16px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--paper); border: none; border-radius: 999px;
  padding: 11px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: 0 3px 14px rgba(0,0,0,.25);
}

/* --- conflict watch (prediction-market country signals) --- */
/* Violet identity: deliberately outside the green/amber/red severity scale,
   because these are probabilities, not confirmed events. */
.cs-marker--risk { background: #6b5ca5; }
.lvl-risk { background: #ece7f7; color: #4a3d80; }
.evt-ico--risk { color: #6b5ca5; font-size: 19px; display: grid; place-items: center; }

.risk { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.risk__head { margin-bottom: 4px; }
.risk__title { font-family: var(--font-display); font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.risk__glyph { color: #6b5ca5; font-size: 14px; }
.risk__sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.risk__list { display: flex; flex-direction: column; }

.risk__markets { margin-bottom: 6px; }
.mkt { padding: 12px 0; border-bottom: 1px solid var(--line); }
.mkt:last-child { border-bottom: none; }
.mkt__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mkt__q { font-size: 14px; font-weight: 600; line-height: 1.35; }
.mkt__prob { flex: 0 0 auto; font-weight: 700; font-size: 15px; color: #4a3d80; }
.mkt__inv { font-size: 12px; color: var(--ink-soft); font-style: italic; margin-top: 3px; }
.mkt__meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }
.mkt__meta a { color: #6b5ca5; font-weight: 600; text-decoration: none; }

/* --- family circle --- */
.fam__row { display: flex; gap: 10px; margin-top: 10px; }
.fam__input { flex: 1; min-width: 0; font-family: var(--font-text); font-size: 15px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-raised); color: var(--ink); }
.fam__input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.fam__members { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fam__chip { font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--paper-sunk); color: var(--ink); }
.fam__chip--self { background: var(--accent-soft); color: var(--accent); }
.btn--safe { background: var(--safe-bg); color: var(--safe-ink); border: 1px solid var(--safe); }
.fam__msg { font-size: 13px; color: var(--ink-soft); margin-top: 8px; min-height: 1em; }

/* --- traveler outlook (search + horizons + meta) --- */
.risk__search { margin: 10px 0 4px; }
.risk__meta-line { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.hz { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--paper-sunk); }
.hz:first-of-type { border-top: none; }
.hz__when { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: #4a3d80; white-space: nowrap; }
.hz__q { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.legal-link { color: var(--ink-faint); text-decoration: underline; }

/* ============================================================
   COUNTRY SHEET (#risk-detail) — rebuilt for traveler clarity.
   Scoped to #risk-detail so it never collides with the event
   detail panel or the conflict-watch list panel.
   ============================================================ */

/* Header: country name big, one honest level badge, quiet qualifiers below. */
#risk-detail .risk__head { margin: 2px 0 14px; }
#risk-detail .risk__head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#risk-detail .risk__title { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
#risk-detail .risk__badge {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
#risk-detail .risk__badge--avoid { background: var(--danger); color: #fff; }
#risk-detail .risk__badge--caution { background: var(--watch-bg); color: var(--watch-ink); }
#risk-detail .risk__badge--ok { background: var(--safe-bg); color: var(--safe-ink); }
#risk-detail .risk__meta-line { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; letter-spacing: 0.01em; }

/* Verdict: the one-sentence "should I go?" answer. Tinted, calm, readable. */
#risk-detail .risk__verdict {
  font-family: var(--font-display); font-size: 17px; line-height: 1.5; font-weight: 500;
  border-radius: var(--radius-sm); padding: 13px 15px; margin: 0 0 16px;
}
#risk-detail .risk__verdict--avoid { background: var(--danger-bg); color: var(--danger-ink); }
#risk-detail .risk__verdict--caution { background: var(--watch-bg); color: var(--watch-ink); }
#risk-detail .risk__verdict--ok { background: var(--safe-bg); color: var(--safe-ink); }

/* THE alert card: the dominant block. A colored spine on the left, a strong
   headline, the situation, and the plain "what it means for you" line. */
#risk-detail .alert-card {
  position: relative; border-radius: 14px; padding: 15px 16px 16px 18px; margin: 0 0 16px;
  border: 1px solid var(--line); overflow: hidden;
}
#risk-detail .alert-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
#risk-detail .alert-card--active { background: #fdf0ed; border-color: #f3d3cb; }
#risk-detail .alert-card--active::before { background: var(--danger); }
#risk-detail .alert-card--avoid { background: #fdf0ed; border-color: #f3d3cb; }
#risk-detail .alert-card--avoid::before { background: var(--danger); }
#risk-detail .alert-card--caution { background: #fdf6e7; border-color: #f0e2c0; }
#risk-detail .alert-card--caution::before { background: var(--watch); }
#risk-detail .alert-card--watch { background: var(--paper-sunk); border-color: var(--line); }
#risk-detail .alert-card--watch::before { background: var(--ink-faint); }

#risk-detail .alert-card__head {
  font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.25;
  color: var(--danger-ink); margin-bottom: 9px;
}
#risk-detail .alert-card--caution .alert-card__head { color: var(--watch-ink); }
#risk-detail .alert-card--watch .alert-card__head { color: var(--ink); }

#risk-detail .alert-card__pulse {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em;
  padding: 4px 10px 4px 9px; border-radius: 999px; margin-bottom: 11px;
}
#risk-detail .alert-card__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
#risk-detail .alert-card__pulse--surging { background: #fbe0d8; color: #a23a1e; }
#risk-detail .alert-card__pulse--surging .alert-card__dot { background: #d2492a; animation: momPulse 1.6s ease-in-out infinite; }
#risk-detail .alert-card__pulse--building { background: #f7e9cd; color: #7a5410; }
#risk-detail .alert-card__pulse--building .alert-card__dot { background: #c8881c; }
#risk-detail .alert-card__pulse--calming { background: #e2ecdd; color: #2c5c3e; }
#risk-detail .alert-card__pulse--calming .alert-card__dot { background: #3f7d58; }

#risk-detail .alert-card__what { font-size: 14.5px; line-height: 1.55; color: var(--ink); margin: 0 0 11px; }
#risk-detail .alert-card__means { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 0; }
#risk-detail .alert-card__means b { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 3px; }

/* Where, concretely: the cities/counties this actually touches. */
#risk-detail .where-line { font-size: 13.5px; line-height: 1.4; margin: 0 0 16px; padding: 2px; }
#risk-detail .where-line__lbl { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
#risk-detail .where-line__places { font-weight: 600; color: var(--ink); }

/* Outlook: "what could happen next" — section header + tight stat rows. */
#risk-detail .outlook-head { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 4px; }
.sc { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sc:last-of-type { border-bottom: none; }
.sc__pct { font-family: var(--font-display); font-size: 25px; font-weight: 600; text-align: right; line-height: 1.1; }
.sc__pct--low { color: var(--safe); }
.sc__pct--mid { color: var(--watch); }
.sc__pct--high { color: var(--danger); }
.sc__body { display: block; min-width: 0; }
.sc__txt { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sc__meta { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.sc__bar { display: block; height: 3px; background: var(--paper-sunk); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.sc__bar i { display: block; height: 100%; border-radius: 2px; }
.sc__bar--low { background: var(--safe); }
.sc__bar--mid { background: var(--watch); }
.sc__bar--high { background: var(--danger); }
#risk-detail .mkt--ground { margin-top: 4px; }
#risk-detail .risk__advice { margin-top: 12px; }

/* conflict markers: three violet intensities, size grows with severity */
.cs-marker--risk-mod { background: #9b8ec4; }
.cs-marker--risk-high { background: #6b5ca5; }
.cs-marker--risk-sev { background: #46336e; }
.legend__sep { width: 1px; height: 14px; background: var(--line); margin: 0 2px; }
.dot--risk-mod { background: #9b8ec4; }
.dot--risk-high { background: #6b5ca5; }
.dot--risk-sev { background: #46336e; }

/* permanent country labels under conflict bubbles: informative, not scary */
.risk-tip { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 4px rgba(43,38,34,.10); color: var(--ink); font-family: var(--font-text); font-size: 11px; font-weight: 700; letter-spacing: .01em; padding: 3px 9px; white-space: nowrap; }
.risk-tip::before { display: none; }
.risk-tip--mod { color: #6b5ca5; }
.risk-tip--high { color: #50408a; }
.risk-tip--sev { color: #38285c; }

/* conflict capsules: dot + country + level in one quiet editorial badge */
.cbadge { display: inline-flex; align-items: center; gap: 7px; transform: translate(-50%, -50%); background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 8px; box-shadow: 0 2px 8px rgba(43,38,34,.14); white-space: nowrap; cursor: pointer; font-family: var(--font-text); transition: transform .15s ease; }
.cbadge:hover { transform: translate(-50%, -50%) scale(1.07); }
.cbadge i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.cbadge b { font-size: 12px; font-weight: 700; color: var(--ink); }
.cbadge span { font-size: 11px; font-weight: 600; }
.cbadge--mod { opacity: .92; }
.cbadge--mod i { background: #9b8ec4; } .cbadge--mod span { color: #7a6daf; }
.cbadge--high i { background: #6b5ca5; } .cbadge--high span { color: #6b5ca5; }
.cbadge--sev { border-color: #d8cdec; padding: 6px 13px 6px 9px; }
.cbadge--sev i { background: #46336e; } .cbadge--sev b { font-size: 12.5px; }
.cbadge--sev span { color: #46336e; }

/* --- resolution curve (registry, market term structure) --- */
.deesc-line { font-size: 12.5px; color: var(--ink-soft); padding: 13px 0 2px; border-top: 1px dashed var(--line); margin-top: 10px; line-height: 1.65; }
.deesc-line b { color: var(--safe); font-weight: 700; }
@keyframes momPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(.82)} }

/* --- hazard locality (NWS counties): name exactly where the storm is --- */
.hz__where { display:block; font-size:12px; color:var(--ink-soft); margin-top:2px; }
