/* Climalerta — PWA styles.
   Brand direction 1A "Tormenta": Alert Orange #FB5E12 over Deep Navy #0B2A5B,
   Amber #FFB020, Paper #F7F5F1. Type: Plus Jakarta Sans (display + body),
   Space Grotesk (eyebrows, labels, tabular figures).

   The app runs the brand's DARK expression: the identity sheet ships an official
   on-dark lockup over #071E42, and the map is the primary surface — dark tiles,
   dark popups, and readable at night during an actual emergency.
   Semantic alert colors (functional UI only): red = danger, amber = caution. */
:root {
  /* Brand */
  --navy: #0B2A5B;          /* Deep Navy — brand core */
  --navy-deep: #071E42;     /* official on-dark surface */
  --navy-2: #0F2E5F;        /* raised surface: popups, map controls */
  --navy-3: #1A4183;        /* control hover */
  --orange: #FB5E12;        /* Alert Orange */
  --orange-soft: #FB8A4B;   /* on-dark wordmark accent, per the brand sheet */
  --amber: #FFB020;
  /* Shell */
  --ink: #eef2ff;
  --muted: #9fb0d8;
  --faint: #7E8CA5;
  --card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.10);
  --danger: #e5484d;
  --caution: #f5a524;
  --ok: #2fbf71;
  --radius: 14px;
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-label: 'Space Grotesk', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 18px; }

/* ── Header ─────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 42, 91, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 12px;
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-head); }
.brand:hover { text-decoration: none; }
.brand-icon { width: 34px; height: 34px; flex: none; border-radius: 9px; }
/* Wordmark per the brand sheet: 800 weight, tight tracking, the "a" in orange.
   On dark the accent lifts to --orange-soft so it stays legible over navy. */
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-name span { color: var(--orange-soft); }
.head-actions { margin-left: auto; display: flex; gap: 8px; }
.btn {
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--card-border); border-radius: 999px;
  background: var(--card); color: var(--ink);
  padding: 7px 14px; cursor: pointer; transition: background 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange:hover { background: #e85a15; }
.hidden { display: none !important; }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: 34px 0 10px; text-align: center; }
.hero h1 {
  font-family: var(--font-head); font-size: clamp(1.6rem, 4.8vw, 2.5rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.03em;
}
.hero h1 span { color: var(--orange); }
.hero p { color: var(--muted); margin-top: 10px; font-size: 1rem; max-width: 620px; margin-left: auto; margin-right: auto; }

/* Live-alert eyebrow — the brand's "ALERTA EN VIVO" pill with a pinging dot.
   Space Grotesk + wide tracking is the brand's label voice. */
.live-pill {
  display: inline-flex; align-items: center; gap: 9px;
  height: 32px; padding: 0 15px; margin-bottom: 16px;
  border-radius: 999px; background: rgba(251, 94, 18, 0.10);
  border: 1px solid rgba(251, 94, 18, 0.35);
  font-family: var(--font-label); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--orange-soft); text-transform: uppercase;
}
.live-pill .pip {
  position: relative; width: 8px; height: 8px; flex: none;
  border-radius: 999px; background: var(--orange);
}
.live-pill .pip::after {
  content: ''; position: absolute; inset: 0; border-radius: 999px;
  background: var(--orange); animation: clima-ping 2.4s ease-out infinite;
}
@keyframes clima-ping {
  0%   { transform: scale(0.72); opacity: 0.55; }
  70%  { opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* Brand lockup: the 1A badge inside two radiating alert rings. */
.hero-mark {
  position: relative; width: 116px; height: 116px;
  margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
}
.hero-mark .ring {
  position: absolute; inset: 0; border-radius: 30px;
  border: 2px solid var(--orange); opacity: 0;
  animation: clima-ping 3s ease-out infinite;
}
.hero-mark .ring.two { border-color: var(--amber); animation-delay: 0.9s; }
.hero-mark svg {
  position: relative; width: 88px; height: 88px; display: block;
  filter: drop-shadow(0 18px 32px rgba(251, 94, 18, 0.35));
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark .ring, .live-pill .pip::after { animation: none; }
  .hero-mark .ring { opacity: 0.18; }
}
@media (max-width: 560px) {
  .hero-mark { width: 92px; height: 92px; }
  .hero-mark svg { width: 70px; height: 70px; }
  .live-pill { font-size: 0.62rem; letter-spacing: 0.14em; padding: 0 12px; }
}
.offline-badge {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; font-size: 0.8rem; color: var(--muted);
  border: 1px solid var(--card-border); border-radius: 999px; padding: 5px 12px;
}
.offline-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.offline-badge.is-offline .dot { background: var(--caution); }

/* ── Big-quake alert banner ─────────────────────────── */
.alert-major {
  margin: 18px 0 0; padding: 14px 16px; border-radius: var(--radius);
  background: rgba(229, 72, 77, 0.14); border: 1px solid rgba(229, 72, 77, 0.45);
  display: flex; gap: 12px; align-items: flex-start;
}
.alert-major .ico { font-size: 1.4rem; line-height: 1; animation: pulse 1.6s infinite; }
.alert-major strong { color: #ff9b9e; }
.alert-major p { font-size: 0.9rem; color: var(--ink); margin-top: 3px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ── Sections ───────────────────────────────────────── */
.section { padding: 26px 0 6px; }
.section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.section-head .sub { font-family: var(--font-label); color: var(--faint); font-size: 0.75rem; letter-spacing: 0.04em; }

/* ── Quake list ─────────────────────────────────────── */
.quake-controls { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px solid var(--card-border);
  border-radius: 999px; padding: 5px 13px; cursor: pointer;
}
.chip.active { color: #fff; background: var(--orange); border-color: var(--orange); }
.quake-list { display: flex; flex-direction: column; gap: 8px; }
.quake {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 12px 14px;
}
.mag {
  flex: none; width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-label); font-weight: 700; font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.08); color: var(--ink);
}
.mag.m4 { background: rgba(245, 165, 36, 0.18); color: var(--caution); }
.mag.m5 { background: rgba(251, 94, 18, 0.22); color: var(--orange-soft); }
.mag.m6 { background: rgba(229, 72, 77, 0.25); color: #ff9b9e; animation: pulse 1.6s infinite; }
.quake-info { min-width: 0; }
.quake-place { font-weight: 600; font-size: 0.95rem; }
.quake-meta { color: var(--muted); font-size: 0.8rem; margin-top: 3px; }
.quake-state { color: var(--muted); font-size: 0.9rem; padding: 18px 4px; }
.feed-note { color: var(--muted); font-size: 0.75rem; margin-top: 10px; }

/* ── Quake map ──────────────────────────────────────── */
.map-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--card-border); background: var(--card);
}
/* Map is the primary interface — tall on desktop, still generous on phones. */
#quakeMap { height: 480px; width: 100%; background: #081F42; }
@media (max-width: 640px) { #quakeMap { height: 380px; } }
/* Leaflet's default light chrome clashes with the navy shell. */
.leaflet-container { font-family: var(--font-body); background: #081F42; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--navy-2); color: var(--ink); border: 1px solid var(--card-border);
}
.leaflet-popup-content { margin: 10px 12px; font-size: 0.85rem; line-height: 1.45; }
.leaflet-popup-content b { color: var(--orange-soft); }

/* 5-day forecast rows (city popups + geoResult) */
.fc-sev { display: inline-block; font-weight: 700; color: #9ecbff; margin-bottom: 4px; }
.fc-table { margin: 6px 0 8px; display: flex; flex-direction: column; gap: 3px; }
.fc-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
  font-size: 0.8rem; line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07); padding-bottom: 3px;
}
.fc-row:last-child { border-bottom: none; }
.fc-day { flex: none; min-width: 62px; font-weight: 700; }
.fc-cond { flex: none; opacity: 0.85; }
.fc-data { flex: 1 1 auto; opacity: 0.9; }
.geo-result .fc-table { margin-top: 8px; }
.geo-result .fc-row { border-bottom-color: rgba(74, 163, 255, 0.2); }
.leaflet-control-attribution {
  background: rgba(11, 42, 91, 0.8) !important; color: var(--muted) !important; font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a {
  background: var(--navy-2) !important; color: var(--ink) !important; border-color: var(--card-border) !important;
}
.leaflet-bar a:hover { background: var(--navy-3) !important; }
/* Epicentre markers — size by magnitude, colour matches the list badges. */
.quake-dot {
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.quake-dot.m4 { background: rgba(245, 165, 36, 0.75); }
.quake-dot.m5 { background: rgba(251, 94, 18, 0.8); }
.quake-dot.m6 { background: rgba(229, 72, 77, 0.85); }
.me-dot {
  border-radius: 50%; background: #4aa3ff;
  border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(74, 163, 255, 0.35);
}
/* Rain markers — blue scale by daily accumulation (volume, NOT an alert level). */
.rain-dot {
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.rain-dot.r1 { background: rgba(120, 190, 255, 0.65); }
.rain-dot.r2 { background: rgba(56, 150, 255, 0.75); }
.rain-dot.r3 { background: rgba(20, 100, 230, 0.85); }
.rain-dot.r4 {
  background: rgba(150, 60, 220, 0.9);
  animation: pulse 1.8s infinite;
}
/* Field-grid markers: smaller, dimmer than city markers so cities stay primary */
.city-wx.grid { opacity: 0.85; }
.wind-arrow.gw { font-size: 11px; }
.wind-arrow.gw.w2 { font-size: 12px; }
.wind-arrow.gw.w3 { font-size: 13px; }
.wind-arrow.gw.w4 { font-size: 14px; }
/* Safety-point markers (OSM assembly points / mapped shelters) */
.safe-dot {
  width: 22px; height: 22px; border-radius: 5px;
  background: var(--ok); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}
.shelter-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #2ab5a5; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1;
}
/* Pet care (vets / animal shelters) — deliberately smaller than the
   life-safety markers so the evacuation hierarchy stays readable. */
.pet-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #b06ad9; border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1;
}
.pet-dot.shelter { background: #8e44c9; border-radius: 5px; }

/* 72h forecast timeline */
.timeline {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
}
.tl-play { flex: none; width: 42px; padding: 7px 0; text-align: center; }
.timeline input[type="range"] {
  flex: 1 1 auto; accent-color: var(--orange); min-width: 0;
}
.timeline input[type="range"]:disabled { opacity: 0.4; }
.tl-label {
  flex: none; min-width: 130px; text-align: right;
  font-size: 0.82rem; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) { .tl-label { min-width: 105px; font-size: 0.75rem; } }

/* Layer toggles */
.layer-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.layer-chip {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--muted); background: transparent; cursor: pointer;
  border: 1px solid var(--card-border); border-radius: 999px; padding: 6px 13px;
  display: inline-flex; align-items: center; gap: 7px;
}
.layer-chip .swatch { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.layer-chip.active { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); }
.layer-chip[data-layer="quakes"].active { color: var(--orange-soft); }
.layer-chip[data-layer="rain"].active { color: #78beff; }
.layer-chip[data-layer="clouds"].active { color: #e8edf8; }
.layer-chip[data-layer="flood"].active { color: #3896ff; }
.layer-chip[data-layer="shelters"].active { color: var(--ok); }
.layer-chip[data-layer="pets"].active { color: #d9a6f5; }
.base-chip {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--muted); background: transparent; cursor: pointer;
  border: 1px solid var(--card-border); border-radius: 999px; padding: 6px 13px;
}
.base-chip.active { color: #fff; background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); }

/* Combined city weather marker: rain-severity ring + wind arrow */
.city-wx {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.city-wx.r1 { background: rgba(120, 190, 255, 0.4); border: 1.5px solid rgba(255,255,255,.6); }
.city-wx.r2 { background: rgba(56, 150, 255, 0.55); border: 1.5px solid rgba(255,255,255,.7); }
.city-wx.r3 { background: rgba(20, 100, 230, 0.7); border: 1.5px solid rgba(255,255,255,.8); }
.city-wx.r4 { background: rgba(150, 60, 220, 0.75); border: 2px solid #fff; animation: pulse 1.8s infinite; }
.wind-arrow {
  display: inline-block; font-size: 15px; line-height: 1;
  /* double shadow so arrows stay readable over bright satellite imagery */
  text-shadow: 0 0 3px rgba(0,0,0,.95), 0 0 6px rgba(0,0,0,.7);
}
.wind-arrow.w0 { color: #b9c8e8; font-size: 12px; opacity: .85; }
.wind-arrow.w1 { color: #ffffff; font-size: 14px; }
.wind-arrow.w2 { color: #f5a524; font-size: 16px; }
.wind-arrow.w3 { color: #FB5E12; font-size: 18px; }
.wind-arrow.w4 { color: #ff5a5f; font-size: 20px; animation: pulse 1.5s infinite; }

/* Live situation banner */
.hazard-summary {
  padding: 14px 16px; border-radius: var(--radius); margin-bottom: 14px;
  font-size: 0.92rem; line-height: 1.55;
  border: 1px solid var(--card-border); background: var(--card);
}
.hazard-summary.active { background: rgba(56, 150, 255, 0.12); border-color: rgba(56, 150, 255, 0.4); }
.hazard-summary.severe { background: rgba(150, 60, 220, 0.14); border-color: rgba(150, 60, 220, 0.5); }
.hazard-summary.calm { color: var(--muted); }
.hazard-summary strong { color: var(--ink); }
.hazard-summary-foot {
  margin-top: 8px; font-size: 0.78rem; color: var(--muted); line-height: 1.5;
}

.map-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.map-state {
  padding: 14px; color: var(--muted); font-size: 0.88rem; line-height: 1.5;
}
.geo-result {
  margin-top: 10px; padding: 12px 14px; border-radius: var(--radius);
  background: rgba(74, 163, 255, 0.1); border: 1px solid rgba(74, 163, 255, 0.35);
  font-size: 0.9rem; line-height: 1.5;
}
.geo-result strong { color: #9ecbff; }
.geo-note { color: var(--muted); font-size: 0.75rem; margin-top: 8px; line-height: 1.5; }

/* ── Emergency numbers ──────────────────────────────── */
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.number-card {
  display: block; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 14px; color: var(--ink); text-align: center;
}
.number-card:hover { text-decoration: none; background: rgba(255, 255, 255, 0.1); }
.number-card .num { font-family: var(--font-label); font-size: 1.6rem; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.number-card .label { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ── Guide cards ────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card {
  display: block; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px; color: var(--ink);
}
.card:hover { text-decoration: none; background: rgba(255, 255, 255, 0.1); border-color: rgba(251, 94, 18, 0.5); }
.card .ico { font-size: 1.7rem; }
.card h3 { font-family: var(--font-head); font-size: 1rem; margin-top: 10px; }
.card p { color: var(--muted); font-size: 0.83rem; margin-top: 6px; line-height: 1.45; }

/* ── Sources / footer ───────────────────────────────── */
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.source-pill {
  font-size: 0.8rem; color: var(--ink); border: 1px solid var(--card-border);
  border-radius: 999px; padding: 6px 13px; background: var(--card);
}
.source-pill:hover { text-decoration: none; background: rgba(255, 255, 255, 0.1); }
.disclaimer {
  margin-top: 30px; padding: 14px 16px; border-radius: var(--radius);
  border: 1px dashed var(--card-border); color: var(--muted); font-size: 0.8rem; line-height: 1.55;
}
.site-foot { padding: 26px 0 40px; color: var(--muted); font-size: 0.8rem; text-align: center; }
.site-foot a { color: var(--muted); text-decoration: underline; }

/* ── Guide pages ────────────────────────────────────── */
.guide-hero { padding: 36px 0 8px; }
.guide-hero .crumb { font-size: 0.8rem; color: var(--muted); }
.guide-hero h1 { font-family: var(--font-head); font-size: clamp(1.4rem, 4vw, 2rem); margin-top: 10px; line-height: 1.25; }
.guide-hero .lead { color: var(--muted); margin-top: 10px; max-width: 680px; line-height: 1.6; }
.phase { margin-top: 26px; }
.phase h2 {
  font-family: var(--font-head); font-size: 1.15rem;
  display: flex; align-items: center; gap: 10px;
}
.phase h2 .tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; background: rgba(251, 94, 18, 0.18); color: var(--orange-soft);
}
.phase ul { margin: 12px 0 0 2px; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.phase li {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 11px 14px; font-size: 0.92rem; line-height: 1.5;
}
.phase li strong { color: var(--orange-soft); }
.callout {
  margin-top: 24px; padding: 15px 17px; border-radius: var(--radius);
  background: rgba(229, 72, 77, 0.12); border: 1px solid rgba(229, 72, 77, 0.4);
  font-size: 0.92rem; line-height: 1.55;
}
.callout.safe { background: rgba(47, 191, 113, 0.1); border-color: rgba(47, 191, 113, 0.35); }
.faq { margin-top: 30px; }
.faq h2 { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 12px 15px; margin-bottom: 8px;
}
.faq summary { font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.faq details p { color: var(--muted); font-size: 0.88rem; margin-top: 9px; line-height: 1.55; }
.back-row { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Kit checklist ──────────────────────────────────── */
.kit-progress { margin: 18px 0 8px; }
.kit-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.kit-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--orange), var(--orange-soft)); transition: width 0.25s; }
.kit-count { color: var(--muted); font-size: 0.82rem; margin-top: 8px; }
.kit-group { margin-top: 22px; }
.kit-group h2 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 10px; }
.kit-item {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 7px; cursor: pointer;
  font-size: 0.9rem; line-height: 1.45;
}
.kit-item input { margin-top: 3px; accent-color: var(--orange); width: 16px; height: 16px; flex: none; }

/* ── Shared form primitives ──────────────────────────
   Used by "Personas perdidas" (.pl-*) and "Comparte lo que ves" (.sh-*).
   Both are client-only share composers, so they share the same chrome. */
.pl-guidance, .sh-guidance {
  padding: 13px 15px; border-radius: var(--radius); font-size: 0.9rem; line-height: 1.5;
  background: rgba(245, 165, 36, 0.10); border: 1px solid rgba(245, 165, 36, 0.4);
  margin-bottom: 14px;
}
.pl-guidance strong, .sh-guidance strong { color: var(--caution); }
.pl-form, .sh-form { display: flex; flex-direction: column; gap: 11px; }
.pl-grid, .sh-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }
@media (min-width: 560px) { .pl-grid, .sh-grid { grid-template-columns: 2fr 1fr; } }
.pl-form label, .sh-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.84rem; color: var(--muted); }
.pl-form input, .pl-form textarea,
.sh-form input, .sh-form textarea, .sh-form select {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--card-border); border-radius: 10px;
  padding: 9px 12px; width: 100%;
}
.pl-form input:focus, .pl-form textarea:focus,
.sh-form input:focus, .sh-form textarea:focus, .sh-form select:focus {
  outline: none; border-color: var(--orange); background: rgba(255, 255, 255, 0.08);
}
.pl-form textarea, .sh-form textarea { resize: vertical; }
/* Native select popups render on a white system surface on most platforms,
   so the options need dark-on-light or they are invisible. */
.sh-form select option { color: #111; background: #fff; }
.pl-geo, .sh-geo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-geo-state, .sh-geo-state { font-size: 0.8rem; color: var(--ok); }
.pl-err, .sh-err { color: #ff9b9e; font-size: 0.85rem; }
.pl-note, .sh-note { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.pl-card {
  margin-top: 16px; padding: 16px; border-radius: var(--radius);
  background: rgba(229, 72, 77, 0.10); border: 1px solid rgba(229, 72, 77, 0.45);
  display: flex; flex-direction: column; gap: 7px;
}
.pl-card-head { font-family: var(--font-head); font-weight: 700; color: #ff9b9e; letter-spacing: 0.5px; }
.pl-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; }
.pl-age { font-weight: 400; font-size: 0.95rem; color: var(--muted); }
.pl-row { font-size: 0.92rem; line-height: 1.45; }
.pl-elapsed {
  display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 0.78rem; font-weight: 700;
}
.pl-actions, .sh-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* ── Comparte lo que ves (caption composer) ──────────
   Orange accent, not the red of .pl-card — a photo caption is community
   context, not a missing-person alert, and the colours must not read alike. */
.sh-card {
  margin-top: 16px; padding: 16px; border-radius: var(--radius);
  background: rgba(251, 94, 18, 0.10); border: 1px solid rgba(251, 94, 18, 0.45);
  display: flex; flex-direction: column; gap: 9px;
}
.sh-card-head { font-family: var(--font-head); font-weight: 700; color: var(--orange-soft); letter-spacing: 0.5px; }
.sh-preview {
  font-family: var(--font-body); font-size: 0.88rem; line-height: 1.5; white-space: pre-wrap;
  word-break: break-word; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 12px;
}
.sh-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.sh-tips li { font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.kit-item.done { opacity: 0.55; text-decoration: line-through; }

@media (max-width: 560px) {
  .quake { gap: 11px; }
  .mag { width: 46px; height: 46px; font-size: 0.95rem; }
  .head-actions .btn { padding: 6px 11px; font-size: 0.78rem; }
}

/* ── Official SENAPRED alerts strip (js/alerts.js) ──── */
.oa-list { display: flex; flex-direction: column; gap: 8px; }
.oa-item {
  display: flex; gap: 10px; align-items: baseline;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 10px 14px; font-size: 0.9rem; line-height: 1.45;
}
.oa-level {
  flex: none; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--card-border); white-space: nowrap;
}
.oa-level.roja { color: #ff9a9d; border-color: rgba(229, 72, 77, 0.55); background: rgba(229, 72, 77, 0.14); }
.oa-level.amarilla { color: #ffd27d; border-color: rgba(245, 165, 36, 0.55); background: rgba(245, 165, 36, 0.12); }
.oa-level.preventiva { color: #9fd8ff; border-color: rgba(56, 150, 255, 0.5); background: rgba(56, 150, 255, 0.12); }
.oa-level.cancelada { color: var(--muted); }
.oa-t { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.oa-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.oa-state { color: var(--muted); padding: 8px 2px; font-size: 0.9rem; }

/* Feed unreachable. Deliberately not styled as an alert level — it is a
   statement about OUR relay, not about conditions in Chile. Reads as a
   caution so nobody mistakes an empty box for an all-clear. */
.oa-state.oa-down {
  color: var(--ink);
  background: rgba(217, 119, 6, 0.09);
  border-left: 3px solid #D97706;
  border-radius: 0 6px 6px 0;
  padding: 12px 14px;
  line-height: 1.55;
}
.oa-state.oa-down strong { font-weight: 700; }
.oa-state.oa-down a { color: inherit; text-underline-offset: 2px; }

/* ── Push opt-in card (js/push.js) ──────────────────── */
.push-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 16px 18px;
}
.push-card .push-txt { flex: 1 1 260px; }
.push-card .push-txt p { color: var(--muted); font-size: 0.88rem; margin-top: 4px; line-height: 1.5; }
.push-card .feed-note { flex-basis: 100%; margin-top: 0; }

/* ── FAQ accordion (index #preguntas) ───────────────── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-q {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 2px 14px;
}
.faq-q summary {
  cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 0.95rem;
  list-style: none; display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary::after { content: '+'; color: var(--orange); font-size: 1.3rem; flex: none; line-height: 1; }
.faq-q[open] summary::after { content: '–'; }
.faq-q p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; padding: 0 0 14px; }
