/* Общие стили четырёх лендингов. Цвета и шрифт меняются в :root. */
:root {
  --paper: #edf1f4;      /* холодная дымка неба */
  --surface: #ffffff;
  --ink: #11223a;        /* тёмно-синий, как стропы и ленты */
  --muted: #56667a;
  --line: #c9d3dc;
  --signal: #f25c0a;     /* оранжевый, как вытяжной парашют запаски */
  --signal-deep: #c84a07;
  --ok: #0f7b62;
  --ok-tint: #e1f0eb;
  --focus: #1d6fe0;
  --wrap: 1120px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--signal-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.measure { max-width: 62ch; }

/* ---------- типографика ---------- */
h1, h2, h3 { font-stretch: 118%; font-weight: 800; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; font-stretch: 110%; line-height: 1.2; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink); max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- шапка и подвал ---------- */
.site-head { padding: 20px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 800; font-stretch: 125%; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: -1px; box-shadow: inset 0 0 0 3px var(--paper), 0 0 0 1.5px var(--ink); }
.site-foot { border-top: 1px solid var(--line); margin-top: 96px; padding: 28px 0 40px; font-size: .9rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-foot a { color: var(--muted); }

/* ---------- кнопки и формы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px; border-radius: 8px; border: 1.5px solid var(--ink);
  background: var(--signal); color: var(--ink); font: inherit; font-weight: 800; font-stretch: 108%;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: #ff7026; color: var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; }
.btn-quiet:hover { background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

form { margin: 0; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
label { font-weight: 600; font-size: .95rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px; min-height: 48px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 3px solid rgba(29,111,224,.35); outline-offset: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #b42318; font-weight: 600; min-height: 1.2em; margin: 0 0 8px; }
[data-success] { display: none; }
form.is-done .form-fields { display: none; }
form.is-done [data-success] { display: block; padding: 18px; border-radius: 10px; background: var(--ok-tint); border: 1.5px solid var(--ok); }
[data-success] strong { display: block; font-stretch: 110%; font-size: 1.1rem; margin-bottom: 4px; }

/* ---------- секции ---------- */
section { padding: 64px 0 0; }
.hero { padding-top: 24px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.panel { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; padding: 28px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.note { border-left: 4px solid var(--signal); padding: 4px 0 4px 16px; color: var(--ink); }

ol.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
ol.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 14px; }
ol.steps li::before { content: counter(s); display: block; font-weight: 800; font-stretch: 125%; font-size: 2rem; line-height: 1; margin-bottom: 8px; color: var(--signal-deep); }

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 10px 0 0; color: var(--muted); max-width: 70ch; }

/* ---------- переключатель «продаю / покупаю» ---------- */
.segmented { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 10px; padding: 3px; gap: 3px; background: var(--surface); margin-bottom: 20px; }
.segmented button { font: inherit; font-weight: 700; border: 0; background: transparent; padding: 10px 18px; border-radius: 7px; cursor: pointer; color: var(--ink); }
.segmented button[aria-selected="true"] { background: var(--ink); color: var(--surface); }

/* ---------- паспорт снаряжения (H1) ---------- */
.passport { position: relative; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; padding: 22px 24px 18px; box-shadow: 8px 8px 0 var(--ink); }
.passport-head { display: flex; gap: 12px; align-items: baseline; border-bottom: 1.5px solid var(--ink); padding: 0 84px 10px 0; margin-bottom: 6px; }
.passport-head b { font-stretch: 125%; font-size: 1.05rem; }
.passport table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.passport th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 0; border-bottom: 1px dashed var(--line); }
.passport td { text-align: right; font-weight: 700; padding: 8px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.passport tr:last-child th, .passport tr:last-child td { border-bottom: 0; }
.stamp {
  position: absolute; right: -26px; top: -52px; width: 104px; height: 104px; border-radius: 50%;
  border: 3px solid var(--ok); color: var(--ok); background: rgba(255,255,255,.92);
  display: grid; place-items: center; text-align: center; transform: rotate(-12deg);
  font-weight: 800; font-stretch: 125%; line-height: 1.05; font-size: .82rem;
}
.stamp span { display: block; font-size: 1.15rem; }

/* ---------- экзамен (H3) ---------- */
.exam-figure { font-stretch: 125%; font-weight: 800; line-height: .9; font-size: clamp(4.5rem, 13vw, 9.5rem); letter-spacing: -0.03em; margin: 0; }
.exam-figure small { display: block; font-size: .18em; letter-spacing: 0; font-stretch: 110%; color: var(--muted); font-weight: 600; line-height: 1.3; margin-top: 8px; }
.score { display: grid; grid-template-columns: repeat(40, 1fr); gap: 3px; margin: 18px 0 8px; max-width: 520px; }
.score i { height: 22px; border-radius: 2px; background: var(--ink); }
.score i.miss { background: transparent; border: 1.5px solid var(--line); }
.lang-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; list-style: none; }
.lang-list li { border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .9rem; background: var(--surface); }
.lang-list li.soon { border-color: var(--line); color: var(--muted); background: transparent; }

/* ---------- база знаний (H4) ---------- */
.search-xl { display: flex; gap: 10px; margin: 24px 0 8px; max-width: 760px; }
.search-xl input { min-height: 60px; font-size: 1.15rem; border: 1.5px solid var(--ink); }
.search-xl .btn { min-height: 60px; }
.redirect-proof { font-family: var(--font); background: var(--surface); border: 1.5px dashed var(--ink); border-radius: 10px; padding: 14px 18px; display: inline-block; margin-top: 8px; }
.redirect-proof s { color: var(--muted); }
.guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
.guides li { border-top: 1.5px solid var(--ink); padding: 14px 0 22px; }
.guides li span { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* ---------- карта DZ (H2) ---------- */
.atlas { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 0; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--surface); height: min(76vh, 760px); }
.atlas-side { display: flex; flex-direction: column; border-right: 1.5px solid var(--ink); min-height: 0; }
.atlas-filters { padding: 14px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.atlas-count { font-size: .85rem; color: var(--muted); margin: 0; }
.atlas-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.atlas-list li { border-bottom: 1px solid var(--line); }
.atlas-list button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 12px 14px; cursor: pointer; }
.atlas-list button:hover, .atlas-list button[aria-current="true"] { background: var(--paper); }
.atlas-list button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.atlas-list b { display: block; font-weight: 700; }
.atlas-list span { font-size: .85rem; color: var(--muted); }
#map { width: 100%; height: 100%; background: #dfe6eb; }
.map-fallback { padding: 24px; color: var(--muted); }
.dz-card { min-width: 230px; font-family: var(--font); }
.dz-card h3 { font-size: 1.05rem; margin: 0 0 2px; }
.dz-card p { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.dz-card .btn { min-height: 40px; padding: 8px 12px; font-size: .9rem; width: 100%; margin-top: 6px; }
.leaflet-container { font: inherit; }

/* ---------- диалоги ---------- */
dialog { border: 1.5px solid var(--ink); border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); color: var(--ink); background: var(--surface); box-shadow: 8px 8px 0 var(--ink); }
dialog::backdrop { background: rgba(17, 34, 58, .45); }
.dialog-body { padding: 26px 26px 20px; }
.dialog-close { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; font: inherit; font-size: 1.6rem; line-height: 1; padding: 6px 10px; cursor: pointer; color: var(--ink); }

/* ---------- согласие на cookies ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; padding: 16px 18px; display: flex; gap: 16px; align-items: center; box-shadow: 6px 6px 0 var(--ink); }
.consent p { margin: 0; font-size: .9rem; }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
.consent .btn { min-height: 42px; padding: 8px 14px; }

/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 36px; }
  ol.steps, .guides { grid-template-columns: 1fr; }
  .atlas { grid-template-columns: 1fr; height: auto; }
  .atlas-side { border-right: 0; border-bottom: 1.5px solid var(--ink); max-height: 360px; }
  #map { height: 60vh; }
  .stamp { right: -6px; top: -48px; width: 92px; height: 92px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .consent { flex-direction: column; align-items: stretch; }
  .search-xl { flex-direction: column; }
  .passport { box-shadow: 5px 5px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* карта: статусы, легенда, проверка джамперами */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; flex: none; }
.dot-ok { background: var(--signal); box-shadow: 0 0 0 1.5px var(--ink); }
.dot-tbc { background: var(--surface); border: 1.5px dashed var(--muted); box-sizing: border-box; }
.map-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; color: var(--muted); max-width: 72ch; }
.map-legend li { display: flex; align-items: baseline; }
.atlas-toggle { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.atlas-toggle input { width: 18px; height: 18px; accent-color: var(--signal); }
.dz-status { font-size: .85rem !important; font-weight: 600; margin: 0 0 8px !important; }
.dz-status-ok { color: var(--ok) !important; }
.dz-status-tbc { color: var(--muted) !important; }
.dz-thanks { color: var(--ok) !important; font-size: .9rem !important; margin: 8px 0 0 !important; }
.dz-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0 !important; font-size: .85rem !important; }
.linklike { all: unset; cursor: pointer; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.linklike:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#map.is-picking, #map.is-picking .leaflet-interactive { cursor: crosshair; }
.pin-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pin-field .btn { width: auto; }
fieldset.field { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
fieldset.field legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.choice { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.choice input { width: 18px; height: 18px; accent-color: var(--signal); }
