
@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Golos+Text:wght@400;500;600;700&family=PT+Mono&display=swap");

.ash {
  --ash-ink: #111111;
  --ash-muted: #4A4A44;
  --ash-paper: #F7F6F0;
  --ash-grid: #E7E5DB;
  --ash-line-soft: #CFCCC0;
  --ash-yellow: #FFD23F;
  --ash-yellow-soft: #FFF8D6;
  --ash-link-line: #E0B400;
  --ash-no-bg: #FDE2E1;   --ash-no: #9B1C1C;
  --ash-lim-bg: #FFF0B3;  --ash-lim: #5C4300;
  --ash-yes-bg: #DDF3E4;  --ash-yes: #14532D;
  --ash-shadow: 5px 5px 0 var(--ash-ink);
  --ash-font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ash-font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --ash-font-mono: "PT Mono", ui-monospace, Consolas, monospace;

  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 104px;
  color: var(--ash-ink);
  font-family: var(--ash-font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* фон «миллиметровка» */
  background-color: var(--ash-paper);
  background-image:
    linear-gradient(var(--ash-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ash-grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* локальный сброс (низкая специфичность) */
.ash *, .ash *::before, .ash *::after { box-sizing: border-box; }
.ash :where(h1, h2, h3, p, ul, ol, li, figure, figcaption) { margin: 0; padding: 0; }
.ash :where(ul, ol) { list-style: none; }
.ash svg { display: block; flex: 0 0 auto; max-width: 100%; }
.ash b { font-weight: 700; }

.ash a { color: var(--ash-ink); text-decoration: underline; text-decoration-color: var(--ash-link-line); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.ash a:hover { background: var(--ash-yellow); }
.ash a:focus-visible, .ash summary:focus-visible, .ash input:focus-visible { outline: 3px solid var(--ash-ink); outline-offset: 3px; }

/* ---------- Общие блоки ---------- */
.ash-col { max-width: 860px; }
.ash-col p { margin-bottom: 18px; }
.ash-box { background: #FFFFFF; border: 2px solid var(--ash-ink); box-shadow: var(--ash-shadow); }
.ash-caption { font-family: var(--ash-font-mono); font-size: 12px; line-height: 1.4; color: var(--ash-muted); margin-top: 10px; }
.ash .ash-caption--below { font-size: 13px; margin-top: 12px; }

/* ---------- Первый экран ---------- */
.ash-hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 24px;
}
.ash-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ash-tag { font-family: var(--ash-font-mono); font-size: 14px; line-height: 1.3; background: #fff; border: 2px solid var(--ash-ink); padding: 6px 12px; }
.ash-tag--yellow { background: var(--ash-yellow); }
.ash-hero__title {
  font-family: var(--ash-font-head); font-weight: 700;
  font-size: clamp(40px, 5.4vw, 76px); line-height: .98; text-transform: uppercase;
  color: var(--ash-ink); margin-bottom: 24px;
}
.ash-mark { background: var(--ash-yellow); padding: 0 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ash .ash-hero__subtitle { font-size: 20px; line-height: 1.5; margin-bottom: 20px; }
.ash-hero__meta { font-family: var(--ash-font-mono); font-size: 14px; line-height: 1.4; color: var(--ash-muted); }
.ash-hero__fig { padding: 20px; }
.ash-hero__fig svg { width: 100%; height: auto; }

/* ---------- Ключевые цифры: всегда в один ряд ---------- */
.ash-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 32px; }
.ash-key { padding: 20px; }
.ash-key__value { font-family: var(--ash-font-head); font-weight: 700; font-size: clamp(26px, 3.2vw, 44px); line-height: 1; }
.ash-key__label { font-size: 14px; line-height: 1.4; margin-top: 8px; }
.ash-key--yellow { background: var(--ash-yellow); }
.ash-key--dark { background: var(--ash-ink); color: #fff; }
.ash-key--dark .ash-key__label { color: var(--ash-grid); }

/* ---------- Вводный абзац и оглавление ---------- */
.ash-intro { padding-top: 48px; }
.ash .ash-lead { font-size: 20px; line-height: 1.7; margin-bottom: 32px; }
.ash-toc { display: flex; flex-wrap: wrap; gap: 10px; }
.ash .ash-toc a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px;
  background: #fff; border: 2px solid var(--ash-ink); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3;
}
.ash .ash-toc a:hover { background: var(--ash-yellow); }
.ash-toc a span { font-family: var(--ash-font-mono); font-weight: 400; }

/* ---------- Разделы ---------- */
.ash-sec { padding-top: 96px; scroll-margin-top: 16px; }
.ash-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  background: var(--ash-yellow); border: 2px solid var(--ash-ink);
  font-family: var(--ash-font-head); font-weight: 700; font-size: 28px; line-height: 1;
}
.ash-h2 {
  font-family: var(--ash-font-head); font-weight: 700; font-size: 46px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: .005em; color: var(--ash-ink); margin: 20px 0 24px;
}
.ash-h3 {
  font-family: var(--ash-font-head); font-weight: 600; font-size: 26px; line-height: 1.15;
  text-transform: uppercase; color: var(--ash-ink); margin: 44px 0 16px;
}

/* ---------- Таблицы ---------- */
.ash-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 2px solid var(--ash-ink); box-shadow: var(--ash-shadow); }
.ash-table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 15px; line-height: 1.5; }
.ash-table th {
  background: var(--ash-ink); color: #fff; text-align: left; font-weight: 600; font-size: 14px;
  padding: 14px 16px; vertical-align: bottom; border: 0;
}
.ash-table td { padding: 14px 16px; border: 0; border-top: 2px solid var(--ash-ink); vertical-align: top; background: none; }
.ash-table td + td, .ash-table th + th { border-left: 1px solid var(--ash-line-soft); }
.ash-table td:first-child { font-weight: 600; }
.ash-table th.ash-hl { background: var(--ash-yellow); color: var(--ash-ink); }
.ash-table td.ash-hl { background: var(--ash-yellow-soft); }
.ash-table .ash-w24 { width: 24%; }
.ash-table .ash-w22 { width: 22%; }
.ash-table .ash-w18 { width: 18%; }
.ash-table .ash-w-scale { width: 110px; }
.ash-cell-note { margin-top: 8px; }
.ash-size { font-family: var(--ash-font-head); font-size: 22px; font-weight: 700; }

.ash-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  font-weight: 600; font-size: 13px; line-height: 1.25; white-space: nowrap; border: 1.5px solid currentColor;
}
.ash-pill--no  { background: var(--ash-no-bg);  color: var(--ash-no); }
.ash-pill--lim { background: var(--ash-lim-bg); color: var(--ash-lim); }
.ash-pill--yes { background: var(--ash-yes-bg); color: var(--ash-yes); }

/* ---------- Правила трассировки ---------- */
.ash-rules li { display: flex; gap: 16px; padding: 18px 0; border-top: 2px solid var(--ash-ink); }
.ash-rules li:last-child { border-bottom: 2px solid var(--ash-ink); }
.ash-rules__key { flex: 0 0 120px; font-family: var(--ash-font-head); font-size: 30px; font-weight: 700; line-height: 1; }
.ash-rules__text { font-size: 17px; line-height: 1.65; }
.ash .ash-after { margin-top: 28px; }

/* ---------- Карточки и сетки ---------- */
.ash-grid { display: grid; gap: 20px; }
.ash-grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 12px; }
.ash-grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 20px 0 28px; }
.ash-card { padding: 22px; }
.ash-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ash-card__letter, .ash-card__num { font-family: var(--ash-font-head); font-size: 40px; font-weight: 700; line-height: 1; }
.ash-card__num { font-size: 44px; margin-bottom: 12px; }
.ash-card__title { font-weight: 700; font-size: 18px; line-height: 1.35; margin-bottom: 8px; }
.ash-card__kicker { font-family: var(--ash-font-mono); font-size: 13px; line-height: 1.4; margin-bottom: 10px; }
.ash .ash-card p { margin: 0; font-size: 15px; line-height: 1.65; }

/* ---------- Инструмент ---------- */
.ash-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; align-items: center; margin: 12px 0 28px; }
.ash-fig { padding: 20px; }
.ash-fig svg { width: 100%; height: auto; }
.ash .ash-split__text { font-size: 18px; line-height: 1.7; margin: 0; }

.ash-note {
  display: flex; gap: 18px; align-items: flex-start; margin-top: 32px;
  background: var(--ash-ink); color: #fff; padding: 24px 26px;
  border: 2px solid var(--ash-ink); box-shadow: 5px 5px 0 var(--ash-yellow);
}
.ash-note__label { flex: 0 0 auto; font-family: var(--ash-font-mono); font-size: 13px; line-height: 1.4; background: var(--ash-yellow); color: var(--ash-ink); padding: 4px 10px; }
.ash .ash-note p { margin: 0; font-size: 16px; line-height: 1.65; }

/* ---------- Важно ---------- */
.ash-warn { display: flex; gap: 18px; align-items: flex-start; background: var(--ash-yellow); border: 2px solid var(--ash-ink); padding: 24px 26px; }
.ash-warn__title { font-family: var(--ash-font-head); font-size: 20px; font-weight: 700; line-height: 1.2; text-transform: uppercase; margin-bottom: 6px; }
.ash .ash-warn p { margin: 0; font-size: 16px; line-height: 1.65; }

/* ---------- Чек-лист ---------- */
.ash-checklist { padding: 4px 0; }
.ash-chk { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-top: 2px solid var(--ash-ink); cursor: pointer; font-size: 16px; line-height: 1.6; }
.ash-chk:first-child { border-top: 0; }
.ash-chk input { width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--ash-ink); cursor: pointer; }
.ash-chk input:checked + span { text-decoration: line-through; text-decoration-color: var(--ash-muted); color: var(--ash-muted); }

/* ---------- Памятка ---------- */
.ash-memo {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff; border: 2px solid var(--ash-ink); box-shadow: var(--ash-shadow);
}
.ash-memo__item { padding: 22px; border-right: 2px solid var(--ash-ink); border-bottom: 2px solid var(--ash-ink); }
.ash-memo__item:nth-child(3n) { border-right: 0; }
.ash-memo__item:nth-last-child(-n+3) { border-bottom: 0; }
.ash-memo__value { font-family: var(--ash-font-head); font-size: 34px; font-weight: 700; line-height: 1.05; }
.ash-memo__label { font-size: 14px; line-height: 1.4; margin-top: 8px; }
.ash-memo__item--yellow { background: var(--ash-yellow); }
.ash-memo__item--dark { background: var(--ash-ink); color: #fff; }
.ash-memo__item--dark .ash-memo__label { color: var(--ash-grid); }

/* ---------- FAQ ---------- */
.ash-faq__item { border-top: 2px solid var(--ash-ink); }
.ash-faq__item:last-child { border-bottom: 2px solid var(--ash-ink); }
.ash-faq__item summary {
  cursor: pointer; list-style: none; position: relative; padding: 22px 64px 22px 0;
  font-size: 19px; font-weight: 600; line-height: 1.4;
}
.ash-faq__item summary::-webkit-details-marker { display: none; }
.ash-faq__item summary::after {
  content: "+"; position: absolute; right: 0; top: 16px; width: 40px; height: 40px;
  background: var(--ash-yellow); border: 2px solid var(--ash-ink);
  font-family: var(--ash-font-head); font-size: 26px; line-height: 36px; text-align: center;
}
.ash-faq__item[open] summary::after { content: "–"; }
.ash .ash-faq__item p { margin: 0 0 24px; font-size: 17px; line-height: 1.7; }

/* ---------- Планшеты ---------- */
@media (max-width: 900px) {
  .ash-memo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ash-memo__item, .ash-memo__item:nth-child(3n), .ash-memo__item:nth-last-child(-n+3) { border-right: 2px solid var(--ash-ink); border-bottom: 2px solid var(--ash-ink); }
  .ash-memo__item:nth-child(2n) { border-right: 0; }
  .ash-memo__item:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ---------- Телефоны ---------- */
@media (max-width: 640px) {
  .ash { padding: 0 16px 72px; font-size: 17px; }
  .ash-hero { padding-top: 40px; gap: 32px; }
  .ash .ash-hero__subtitle { font-size: 18px; }
  .ash-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ash-key { padding: 16px; }
  .ash .ash-lead { font-size: 18px; }
  .ash-sec { padding-top: 72px; }
  .ash-h2 { font-size: 32px; }
  .ash-h3 { font-size: 22px; }
  .ash-rules li { flex-wrap: wrap; }
  .ash-rules__key { flex-basis: 100%; }
  .ash-note, .ash-warn { flex-direction: column; padding: 20px; }
  .ash-memo { grid-template-columns: 1fr; }
  .ash-memo__item, .ash-memo__item:nth-child(n) { border-right: 0; border-bottom: 2px solid var(--ash-ink); }
  .ash-memo__item:last-child { border-bottom: 0; }
  .ash-memo__value { font-size: 28px; }
  .ash-faq__item summary { font-size: 17px; }
}
