/* Landing. Colours, type, spacing and shared controls all come from tokens.css —
   only layout lives here. */

/* ---------- layout ---------- */

.wrap {
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: max(var(--gut), env(safe-area-inset-left));
}

/* The reading column is narrow and sits left of centre inside the wrap, so the
   page stays left-weighted. Only the coverage list uses the full width. */
.col { max-width: 36rem; }

.band { padding-block: var(--band); }

.site-head {
  padding-block: var(--s5);
  padding-top: max(var(--s5), env(safe-area-inset-top));
}

/* ---------- wordmark ---------- */

.mark {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.mark-glyph { width: 20px; height: 20px; flex: none; }
.mark-glyph circle:first-of-type { stroke: var(--dim); }
.mark-glyph circle:last-of-type  { fill: var(--moss); }

.mark-word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Naming the region up front: whoever opens this should know in one glance
   whether it is about where they live. */
.mark-place {
  padding-left: var(--s2);
  border-left: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--noise);
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(1.5rem, 6vw, 3rem) var(--band); }

.lead {
  margin-top: var(--s5);
  font-size: clamp(1.0625rem, 3.6vw, 1.1875rem);
  line-height: 1.5;
  color: var(--text);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.cta-row .btn { width: 100%; max-width: 24rem; }

.cta-note {
  margin-top: var(--s3);
  font-size: 0.9375rem;
  color: var(--noise);
}

/* Stated up front rather than in the small print at the bottom: alerts are not
   live yet, and tonight the official channels are the ones that matter. */
.notice {
  margin-top: var(--s5);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--dim);
}

/* ---------- steps ---------- */

/* An <ol> because точка → радиус → оповещения is a real sequence; the markers
   are hidden because a visible 1-2-3 adds nothing a reader does not already see. */
.steps {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s5);
}

.steps h3 { font-size: 1.125rem; color: var(--text); }
.steps h3 + p { margin-top: var(--s1); }

/* Framed because it is a promise, not a paragraph. */
.frame {
  padding: clamp(1.25rem, 4vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--surface);
}

.frame h2 + p { margin-top: var(--s2); }

.aside {
  margin-top: var(--s5);
  padding-left: var(--s4);
  border-left: 2px solid var(--line);
  font-size: 0.9375rem;
  color: var(--noise);
}

/* ---------- install ---------- */

.how { margin-top: var(--s5); }
.how h3 + p { margin-top: var(--s1); }

/* ---------- faq ---------- */

.faq { margin-top: var(--s5); }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 3.25rem;
  padding: var(--s2) 0;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  margin-left: auto;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--noise);
}

.faq details[open] summary::after { content: '\2212'; }

.faq details p {
  max-width: 32rem;
  padding-bottom: var(--s4);
}

/* ---------- footer ---------- */

.site-foot {
  padding-block: var(--s6);
  padding-bottom: max(var(--s7), env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.site-foot .mark { margin-bottom: var(--s4); }

.foot-lead {
  max-width: 34rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--dim);
}

.foot-note {
  margin-top: var(--s4);
  max-width: 32rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--noise);
}

/* ---------- head row with the theme toggle ---------- */

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r2);
  background: none;
  color: var(--text);
  cursor: pointer;
}

.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--surface); border-color: var(--line); }

.glyph-sun { display: none; }
:root[data-theme="light"] .glyph-sun { display: block; }
:root[data-theme="light"] .glyph-moon { display: none; }

/* ---------- coverage ---------- */

.cover {
  padding-block: var(--band);
  background: var(--surface);
}

.cover-intro { margin-top: var(--s4); }

/* The legend sits with the list, not at the bottom of the page. */
.legend {
  display: grid;
  gap: var(--s2);
  margin: var(--s5) 0 0;
  padding: var(--s4);
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--bg);
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--dim);
}

.legend-item b { color: var(--text); font-weight: 600; }

/* Colour is never the only carrier: each level has its own fill pattern, and
   every row also spells the status out in words. */
.dot {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 0.28em;
  border-radius: var(--r3);
  border: 2px solid currentColor;
}

.dot--regular { color: var(--ok); background: currentColor; }

.dot--patchy {
  color: var(--mid);
  background: linear-gradient(to right, currentColor 0 50%, transparent 50% 100%);
}

.dot--sparse { color: var(--low); background: transparent; }

.cover-find { margin-top: var(--s5); }

.cover-box {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: var(--tap);
  max-width: 26rem;
  padding: 0 var(--s2) 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--bg);
}

.cover-box:focus-within { border-color: var(--moss); }
.cover-glyph { flex: none; width: 20px; height: 20px; color: var(--noise); }

.cover-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--ui);
  font-size: 1.0625rem;
  appearance: none;
  -webkit-appearance: none;
}

.cover-input::placeholder { color: var(--noise); }
.cover-input:focus { outline: none; }
.cover-input::-webkit-search-decoration,
.cover-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.cover-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--r3);
  background: none;
  color: var(--dim);
  cursor: pointer;
}

.cover-clear svg { width: 18px; height: 18px; }
.cover-clear:hover { color: var(--text); background: var(--surface); }

.cover-count { margin-top: var(--s2); font-size: 0.875rem; color: var(--noise); }

.cover-list {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s5);
}

@media (min-width: 46rem) {
  .cover-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

.city {
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--bg);
  overflow: hidden;
}

.city-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: var(--tap);
  padding: var(--s2) var(--s4);
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--ui);
  cursor: pointer;
  text-align: left;
}

.city-name {
  flex: 1 1 auto;
  font-family: var(--display);
  font-size: 1.125rem;
  line-height: 1.3;
}

.city-tally { flex: none; font-size: 0.8125rem; color: var(--noise); }

.city-chevron {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--dim);
  transition: transform 160ms ease;
}

.city-head[aria-expanded="true"] .city-chevron { transform: rotate(180deg); }

.areas {
  margin: 0;
  padding: 0 var(--s4) var(--s3);
  list-style: none;
  display: grid;
  gap: 2px;
}

.area {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s2) 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.area-name { flex: 1 1 auto; min-width: 0; color: var(--text); }
.area-status { flex: none; font-size: 0.8125rem; color: var(--noise); }

.area-km {
  flex: none;
  min-width: 4.25rem;
  text-align: right;
  font-size: 0.875rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.cover-empty {
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--bg);
  color: var(--dim);
  font-size: 0.9375rem;
}

.cover-foot {
  margin-top: var(--s5);
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--noise);
}
