/* Content pages (language landings, guides, alert history by place).
   Same visual language as the map app's dark-blue theme (css/themes.css) and
   the original /he/ landing: navy ground, blue accent, system font, one
   reading column. Written with logical properties so one sheet serves RTL
   (he, ar) and LTR (en, ru). Life-safety pages: no motion, no decoration that
   competes with the guidance. */

:root {
  color-scheme: dark;
  --bg: #060b18;
  --surface: #0d1b2e;
  --line: #1e3a5f;
  --line-soft: #132840;
  --text: #e2e8f0;
  --muted: #7a9bbe;          /* 6.8:1 on --bg, 6.0:1 on --surface */
  --label: #93c5fd;
  --accent: #3b82f6;
  --cta: #2563eb;            /* white on it 5.2:1 (on #3b82f6 only 3.7:1) */
  --cta-hover: #1d4ed8;
  --focus: #93c5fd;
  --official: #fbbf24;
  --official-bg: rgba(251, 191, 36, .08);
  --down: #ff2020;
  /* threat hues, same values as themes.css dark-blue */
  --k-missile: #ff2020;
  --k-uav: #c462ff;
  --k-terror: #ff2020;
  --k-earthquake: #fb7c3c;
  --k-tsunami: #2dd4bf;
  --k-hazmat: #a3e635;
  --k-radiological: #f472b6;
  --k-pre: #fbbf24;
  --k-end: #38bdf8;
  --k-general: #7a9bbe;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Hebrew', 'Noto Sans Arabic', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--label); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; inset-inline-start: .75rem; top: -3rem;
  background: var(--cta); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 10;
}
.skip:focus { top: .75rem; }

.page { max-width: 720px; margin: 0 auto; padding: 0 1.25rem 3rem; }

/* ── Top bar ── */
.site-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding-block: 1rem; margin-block-end: 1.5rem;
  border-block-end: 1px solid var(--line-soft);
}
.brand {
  color: #fff; font-weight: 700; letter-spacing: .14em; font-size: .9rem;
  direction: ltr; unicode-bidi: isolate;
}
.brand:hover { text-decoration: none; color: var(--label); }
.site-top nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; font-size: .92rem; }
.site-top nav a { color: var(--muted); padding-block: .5rem; }
.site-top nav a:hover, .site-top nav a[aria-current="page"] { color: var(--text); }
.site-top nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .35em; }
.site-top nav a.btn-radar {
  color: #fff; background: var(--cta); padding: .4rem .9rem; border-radius: 6px; font-weight: 600;
}
.site-top nav a.btn-radar:hover { background: var(--cta-hover); text-decoration: none; }

/* ── Breadcrumbs ── */
.crumbs { font-size: .85rem; color: var(--muted); margin-block-end: 1rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; }
.crumbs li:not(:last-child)::after { content: '›'; margin-inline-start: .35rem; color: var(--line); }
.crumbs a { color: var(--muted); }

/* ── Live-feed status banner (filled by /api/status) ── */
.status-banner {
  margin: 0 0 1.25rem; padding: .7rem .9rem; border: 1px solid var(--official);
  background: rgba(251, 191, 36, .1); color: var(--text); border-radius: 6px;
  font-size: .95rem; line-height: 1.5; text-wrap: pretty;
}
.status-banner[data-state="down"] { border-color: var(--down); background: rgba(255, 32, 32, .13); }

/* ── Headings and prose ── */
h1 { font-size: 1.75rem; font-weight: 700; color: #fff; line-height: 1.3; text-wrap: balance; margin-block-end: .75rem; }
h1 span { color: var(--accent); }
.lede { font-size: 1.08rem; color: var(--muted); margin-block-end: 1.5rem; max-width: 62ch; text-wrap: pretty; }
.updated { font-size: .85rem; color: var(--muted); margin-block-end: 1.5rem; }

h2 {
  font-size: 1.3rem; font-weight: 600; color: var(--label); line-height: 1.35;
  margin: 2.5rem 0 1rem; padding-block-end: .5rem; border-block-end: 1px solid var(--line);
  text-wrap: balance;
}
h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); margin: 1.5rem 0 .5rem; }

.prose p, .prose li { color: var(--text); max-width: 68ch; }
.prose p + p { margin-block-start: .75rem; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; margin-block: .5rem 1rem; }
.prose li + li { margin-block-start: .4rem; }
.prose li::marker { color: var(--label); }
.prose a { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: rgba(147, 197, 253, .45); }
.prose a:hover { text-decoration-color: var(--label); }
.prose strong { color: #fff; }
.muted { color: var(--muted); }

/* ── Hero (landings) ── */
.hero { text-align: center; margin-block: 1rem 3rem; }
.hero p { font-size: 1.05rem; color: var(--muted); margin: 0 auto 1.5rem; max-width: 560px; }
.cta {
  display: inline-block; background: var(--cta); color: #fff; padding: .75rem 2rem;
  border-radius: 8px; font-size: 1.1rem; font-weight: 600; transition: background .2s;
}
.cta:hover { background: var(--cta-hover); text-decoration: none; }

/* ── Official-source callout: the one element that must never be missed ── */
.official {
  border: 1px solid rgba(251, 191, 36, .55); background: var(--official-bg);
  border-radius: 8px; padding: 1rem 1.25rem; margin-block: 0 2rem;
}
.official > strong { display: block; color: var(--official); font-size: 1rem; margin-block-end: .35rem; }
.official p { color: var(--text); font-size: .95rem; line-height: 1.6; }
.official ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-block-start: .6rem; font-size: .92rem; }
.official a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(251, 191, 36, .6); text-underline-offset: .2em; }

/* ── Steps (how it works, landings) ── */
.how-it-works { display: grid; gap: 1.25rem; margin-block-end: 1rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; }
.step strong { color: var(--label); display: block; margin-block-end: .35rem; font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .95rem; }

.features { list-style: none; padding: 0; }
.features li { padding: .5rem 0; border-block-end: 1px solid var(--line-soft); font-size: .95rem; }
.features li::before { content: '\2713\0020'; color: var(--accent); font-weight: bold; }

/* ── Ordered guidance: the order is the priority the HFC gives ── */
.order { counter-reset: step; list-style: none; padding: 0; margin-block: .75rem 1.25rem; }
.order > li {
  counter-increment: step; position: relative; padding-inline-start: 2.4rem; margin-block-end: .85rem;
  max-width: 68ch;
}
.order > li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: .1rem;
  width: 1.65rem; height: 1.65rem; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--label); font-size: .85rem; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}

/* ── Situation blocks (indoors / outdoors / driving ...) ── */
.situation { border-block-start: 1px solid var(--line-soft); padding-block: 1rem .25rem; }
.situation:first-of-type { border-block-start: 0; }
.situation h3 { margin-block-start: 0; }

/* ── Alert kinds ── */
.kinds { display: grid; gap: 0; margin-block: .5rem 1rem; }
.kinds > div { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: .25rem 1.25rem; padding-block: .75rem; border-block-end: 1px solid var(--line-soft); }
.kinds dt { font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: .55rem; }
.kinds dd { color: var(--muted); font-size: .95rem; }
.kind-dot { inline-size: .6rem; block-size: .6rem; border-radius: 50%; flex: none; background: var(--k-general); transform: translateY(-.05rem); }
.k-missile { background: var(--k-missile); } .k-uav { background: var(--k-uav); } .k-terror { background: var(--k-terror); }
.k-earthquake { background: var(--k-earthquake); } .k-tsunami { background: var(--k-tsunami); }
.k-hazmat { background: var(--k-hazmat); } .k-radiological { background: var(--k-radiological); }
.k-pre { background: var(--k-pre); } .k-end { background: var(--k-end); }
@media (max-width: 560px) { .kinds > div { grid-template-columns: 1fr; } }

/* ── Data tables (alert history) ── */
.table-wrap { overflow-x: auto; margin-block: .75rem 1.5rem; border: 1px solid var(--line); border-radius: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
table.data caption { text-align: start; padding: .75rem 1rem .25rem; color: var(--muted); font-size: .85rem; caption-side: top; }
table.data th, table.data td { padding: .55rem 1rem; text-align: start; border-block-end: 1px solid var(--line-soft); white-space: nowrap; }
table.data .wrap { white-space: normal; min-width: 12rem; }
table.data thead th { color: var(--label); font-weight: 600; background: var(--surface); font-size: .85rem; }
table.data tbody tr:last-child td { border-block-end: 0; }
table.data td.num, table.data th.num { text-align: end; }
table.data .kind { display: inline-flex; align-items: baseline; gap: .45rem; }
table.data td.when { white-space: normal; }
table.data thead th.num { white-space: normal; }
table.data th .w { white-space: nowrap; }
table.data th .sub { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) {
  table.data { font-size: .88rem; }
  table.data th, table.data td { padding: .5rem .6rem; }
  table.data .wrap { min-width: 6.5rem; }
  table.data td.when { min-width: 5.5rem; }
  table.data .hide-sm { display: none; }
}

/* summary line (city pages): sentences, not a metric hero */
.summary { font-size: 1.05rem; margin-block-end: 1rem; max-width: 62ch; }
.summary strong { color: #fff; }
.notice { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .85rem 1rem; color: var(--muted); font-size: .95rem; margin-block: 1rem; }

/* ── Search (alerts index) ── */
.search { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem 1.5rem; }
.search label { flex-basis: 100%; color: var(--muted); font-size: .9rem; }
.search input {
  flex: 1 1 14rem; min-height: 44px; padding: .5rem .85rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
}
.search input:focus-visible { outline-offset: 0; border-color: var(--focus); }
.search button {
  min-height: 44px; padding: .5rem 1.25rem; font: inherit; font-weight: 600; color: #fff;
  background: var(--cta); border: 0; border-radius: 6px; cursor: pointer;
}
.search button:hover { background: var(--cta-hover); }

/* ── Link lists (nearby places, related guides) ── */
.links { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .5rem 1rem; padding: 0; }
.links a {
  display: inline-block; padding: .4rem .8rem; min-height: 44px; line-height: 1.75;
  border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface);
}
.links a:hover { border-color: var(--accent); text-decoration: none; }
.prose .links a { text-decoration: none; }

/* ── FAQ ── */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-block-end: .75rem; }
summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--text); font-size: .95rem; }
summary:hover { color: var(--label); }
details[open] summary { border-block-end: 1px solid var(--line-soft); }
details p { padding: 1rem 1.25rem; color: var(--muted); font-size: .92rem; line-height: 1.7; }

.sources { font-size: .85rem; color: var(--muted); margin-block-start: 2rem; }
.sources a { color: var(--muted); text-decoration: underline; text-underline-offset: .2em; }

/* ── Footer ── */
footer {
  margin-block-start: 3rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line);
  color: var(--muted); font-size: .85rem; text-align: center;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; margin-block-end: .75rem; }
footer nav a { padding-block: .35rem; }
footer .langs a { color: var(--muted); }
footer p + p { margin-block-start: .35rem; }

@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .page { padding-inline: 1rem; }
  .site-top { padding-block: .75rem; }
}

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