/* winfixer.ru — строгий «корпоративный» стиль в духе документации Microsoft/Apple.
   Светлая тема по умолчанию, тёмная — по настройке системы. Mobile-first: базовые стили
   для телефона, медиазапросы ниже только расширяют раскладку. Сборщик не нужен. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --surface-3: #e8ecf1;
  --line: #e3e7ed;
  --line-strong: #d0d6de;

  --heading: #0b1220;
  --text: #2a3140;
  --muted: #5a6475;
  --subtle: #8a93a3;

  --accent: #0a5cd5;
  --accent-hi: #0b4fb8;
  --accent-text: #0a5cd5;
  --accent-soft: #eef4ff;
  --accent-line: #b9d0f7;
  --on-accent: #ffffff;

  --ok: #12804a;
  --ok-soft: #edf8f1;
  --ok-line: #bfe3cd;
  --warn: #a15c00;
  --warn-soft: #fff7e8;
  --warn-line: #f2d7a6;

  --code-bg: #0f1623;
  --code-bar: #161e2d;
  --code-line: #253047;
  --code-text: #e6ebf3;
  --code-muted: #9aa6ba;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px -12px rgba(16, 24, 40, 0.14);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 24px 48px -16px rgba(16, 24, 40, 0.18);
  --header-bg: rgba(255, 255, 255, 0.86);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --max: 1200px;
  --header-h: 64px;
  --tabbar-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0c0e12;
    --bg-soft: #11141a;
    --surface: #151920;
    --surface-2: #1b2029;
    --surface-3: #252b36;
    --line: #232934;
    --line-strong: #2f3744;

    --heading: #f3f5f8;
    --text: #d3d8e0;
    --muted: #9aa3b2;
    --subtle: #6f7888;

    --accent: #3b82f6;
    --accent-hi: #5b97f8;
    --accent-text: #7cacff;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-line: rgba(91, 151, 248, 0.4);

    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.08);
    --ok-line: rgba(74, 222, 128, 0.26);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.08);
    --warn-line: rgba(251, 191, 36, 0.26);

    --code-bg: #0a0d12;
    --code-bar: #10141b;
    --code-line: #222935;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
    --header-bg: rgba(12, 14, 18, 0.82);
  }
}

/* ------------------------------------------------------------------ база */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 400 16px/1.7 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: clip;
}
/* Стоп-коды вроде IRQL_NOT_LESS_OR_EQUAL — одно «слово» шире экрана телефона. */
h1, h2, h3, p, li, a, span, summary, td { overflow-wrap: anywhere; }
pre, pre code { overflow-wrap: normal; }
.card-grid > li, .article-list > li, .link-grid > li, .menu-grid > li, .causes > li, .steps > li { min-width: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--accent-hi); }
p { margin: 0 0 16px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent-line); color: var(--heading); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.site-main { padding-bottom: 32px; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

/* ------------------------------------------------------------------ типографика */
h1, h2, h3 { color: var(--heading); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(30px, 7vw, 54px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; margin: 16px 0 18px; text-wrap: balance; }
h2 { font-size: clamp(22px, 4.4vw, 30px); margin: 0 0 20px; text-wrap: balance; }
h3 { font-size: 18px; margin: 0 0 8px; }
.lead { font-size: clamp(17px, 2.3vw, 19px); line-height: 1.65; color: var(--muted); max-width: 64ch; }
.text-gradient { color: var(--accent); }

/* ------------------------------------------------------------------ кнопки и чипы */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--font);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn--primary { color: var(--on-accent); background: var(--accent); box-shadow: var(--shadow-sm); }
.btn--primary:hover { color: var(--on-accent); background: var(--accent-hi); }
.btn--primary:active { transform: scale(0.98); }
.btn--ghost { color: var(--heading); background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.btn--block { width: 100%; }
.btn .icon { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.btn:hover .icon { transform: translateX(2px); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.chip .icon { width: 16px; height: 16px; }
.chip--accent { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); font-weight: 600; }
.chip--link { color: var(--text); box-shadow: var(--shadow-sm); transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease); }
.chip--link .icon { color: var(--accent-text); }
.chip--link:hover { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.chip__count { color: var(--subtle); font-variant-numeric: tabular-nums; }
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }

.icon-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--accent-text);
  background: var(--accent-soft);
}
.icon-tile--lg { width: 44px; height: 44px; border-radius: 12px; }
.icon-tile--lg .icon { width: 22px; height: 22px; }
.icon-tile--xl { width: 56px; height: 56px; border-radius: 14px; }
.icon-tile--xl .icon { width: 28px; height: 28px; }

/* ------------------------------------------------------------------ шапка */
.progress { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
}
/* Размытие на псевдоэлементе: backdrop-filter на самой шапке сделал бы её
   контейнером для position: fixed, и выпадающее меню обрезалось бы её высотой. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}
.header-bar { display: flex; align-items: center; gap: 16px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--heading); }
.brand:hover { color: var(--heading); }
.brand__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--on-accent);
  background: var(--accent);
}
.brand__mark path + path { fill: var(--accent); }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; line-height: 1.15; }
.brand__name span { color: var(--subtle); font-weight: 500; }
.brand__badge { display: none; color: var(--subtle); font-size: 12px; line-height: 1.3; white-space: nowrap; }

.menu-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.menu-btn:hover { border-color: var(--accent-line); color: var(--accent-text); }
.menu-btn__close { display: none; }
.menu-toggle:checked ~ .header-bar .menu-btn { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.menu-toggle:checked ~ .header-bar .menu-btn__open { display: none; }
.menu-toggle:checked ~ .header-bar .menu-btn__close { display: block; }
.menu-toggle:focus-visible ~ .header-bar .menu-btn { outline: 2px solid var(--accent); outline-offset: 3px; }

.menu-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: -1;
  background: rgba(11, 18, 32, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), visibility 0.2s;
}
.menu-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.menu-toggle:checked ~ .menu-panel { opacity: 1; visibility: visible; transform: none; }
.menu-toggle:checked ~ .menu-backdrop { opacity: 1; visibility: visible; }
body:has(.menu-toggle:checked) { overflow: hidden; }

.menu-panel__inner { padding-top: 20px; padding-bottom: calc(var(--tabbar-h) + 32px); }
.menu-panel__title { margin: 24px 0 12px; color: var(--subtle); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.menu-grid { display: grid; gap: 4px; }
.menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  transition: background 0.15s var(--ease);
}
.menu-link:hover, .menu-link.is-active { color: var(--heading); background: var(--surface-2); }
.menu-link.is-active .menu-link__name { color: var(--accent-text); }
.menu-link__text { display: flex; flex-direction: column; min-width: 0; }
.menu-link__name { font-weight: 600; line-height: 1.35; }
.menu-link__count { color: var(--subtle); font-size: 13px; }

/* ------------------------------------------------------------------ поиск */
.search { position: relative; }
.search--header { display: none; }
.search__form { position: relative; display: flex; align-items: center; }
.search__icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--subtle); pointer-events: none; }
.search__input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--heading);
  font: 400 15px/1 var(--font);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.search__input::placeholder { color: var(--subtle); }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search--header .search__input { background: var(--surface-2); border-color: transparent; }
.search--header .search__input:focus { background: var(--surface); border-color: var(--accent); }
.search__kbd {
  position: absolute;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--subtle);
  font: 500 12px/1 var(--mono);
}
.search__input:focus + .search__kbd { display: none; }
.search__results {
  margin-top: 8px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.search--header .search__results, .search--hero .search__results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  text-align: left;
}
.search__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
}
.search__item:hover, .search__item.is-active { background: var(--accent-soft); color: var(--heading); }
.search__title { font-weight: 500; line-height: 1.4; }
.search__cat { color: var(--accent-text); font-size: 12px; font-weight: 600; }
.search__empty { margin: 0; padding: 12px; color: var(--muted); font-size: 14px; }

.search--hero { max-width: 680px; margin: 32px auto 20px; }
.search--hero .search__input { height: 60px; padding-left: 50px; padding-right: 16px; border-radius: 14px; font-size: 17px; box-shadow: var(--shadow-lg); }
.search--hero .search__icon { left: 18px; width: 20px; height: 20px; }
.search__submit { display: none; }

/* ------------------------------------------------------------------ хлебные крошки */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 24px 0 0;
  color: var(--subtle);
  font-size: 14px;
}
.breadcrumbs .icon { width: 14px; height: 14px; color: var(--subtle); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-text); }
.breadcrumbs [aria-current="page"] { color: var(--subtle); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; }

/* ------------------------------------------------------------------ главная */
.hero {
  position: relative;
  padding: 48px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 50% 0%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.hero h1 { max-width: 18ch; margin-left: auto; margin-right: auto; }
.hero .lead { margin-left: auto; margin-right: auto; }
.hero__inner { position: relative; }
.hero__visual { display: none; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 600px;
  margin: 40px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stats li { padding: 16px 12px; }
.stats li + li { border-left: 1px solid var(--line); }
.stats strong { display: block; color: var(--heading); font-size: clamp(20px, 5vw, 26px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }

.section { padding: 56px 0 0; }
.section__head { margin-bottom: 24px; }
.section__head h2 { margin-bottom: 6px; }
.section__head p { margin: 0; color: var(--muted); }

.card-grid { display: grid; gap: 12px; }
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover { color: var(--text); border-color: var(--accent-line); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card__count { color: var(--subtle); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.card__title { color: var(--heading); font-size: 18px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; margin-bottom: 6px; }
.card__text { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--accent-text); font-size: 14px; font-weight: 600; }
.card__more .icon { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.card:hover .card__more .icon { transform: translateX(3px); }

.how { display: grid; gap: 12px; padding: 8px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line); }
.how__item { padding: 24px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.how__item h3 { margin: 16px 0 6px; }
.how__item p { margin: 0; color: var(--muted); font-size: 15px; }

.article-list { display: grid; gap: 8px; }
.article-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.article-row:hover { color: var(--text); border-color: var(--accent-line); box-shadow: var(--shadow); }
.article-row__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.article-row__title { color: var(--heading); font-weight: 600; line-height: 1.4; }
.article-row:hover .article-row__title { color: var(--accent-text); }
.article-row__desc { color: var(--muted); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-row__arrow { margin-left: auto; color: var(--subtle); transition: transform 0.15s var(--ease), color 0.15s var(--ease); }
.article-row:hover .article-row__arrow { color: var(--accent-text); transform: translateX(3px); }

.home-disclaimer { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ раздел */
.page-head { display: flex; flex-direction: column; gap: 20px; padding: 28px 0 8px; }
.page-head h1 { margin: 0 0 12px; }
.page-head .lead { margin-bottom: 18px; }

.filter { position: relative; display: flex; align-items: center; margin: 28px 0 20px; max-width: 520px; }
.filter__icon { position: absolute; left: 14px; color: var(--subtle); pointer-events: none; }
.filter__input {
  width: 100%;
  height: 46px;
  padding: 0 110px 0 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--heading);
  font: 400 15px/1 var(--font);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.filter__input::placeholder { color: var(--subtle); }
.filter__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.filter__count { position: absolute; right: 14px; color: var(--accent-text); font-size: 13px; font-weight: 600; }
.empty { padding: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ------------------------------------------------------------------ статья */
.article-layout { display: grid; gap: 40px; }
.post { min-width: 0; max-width: 760px; }
.post__header { padding-top: 20px; }
.post__header h1 { font-size: clamp(28px, 6vw, 42px); }
.post__section { padding-top: 48px; }
.post__section > h2 { padding-bottom: 14px; border-bottom: 1px solid var(--line); }

.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.meta li { display: inline-flex; align-items: center; gap: 8px; }
.meta .icon { width: 16px; height: 16px; color: var(--subtle); }

.jump { display: flex; gap: 8px; margin: 8px 0 24px; overflow-x: auto; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.jump a:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }

.notice {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left-width: 3px;
  font-size: 15px;
  line-height: 1.6;
}
.notice > .icon { width: 20px; height: 20px; margin-top: 2px; }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin: 0; }
.notice strong { color: var(--heading); }
.notice--warn { background: var(--warn-soft); border-color: var(--warn-line); border-left-color: var(--warn); }
.notice--warn > .icon { color: var(--warn); }
.notice--ok { background: var(--ok-soft); border-color: var(--ok-line); border-left-color: var(--ok); }
.notice--ok > .icon { color: var(--ok); }
/* Дисклеймер наверху статьи — спокойный серый, чтобы не пугать с первого экрана. */
.disclaimer.notice--warn { background: var(--bg-soft); border-color: var(--line); border-left-color: var(--line-strong); color: var(--muted); font-size: 13px; }
.disclaimer.notice--warn > .icon { color: var(--subtle); width: 18px; height: 18px; }
.disclaimer a { font-weight: 600; }

.causes { display: grid; gap: 10px; }
.cause {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.cause__mark { flex: none; display: flex; color: var(--accent-text); margin-top: 2px; }
.cause__mark .icon { width: 20px; height: 20px; }
.cause h3 { font-size: 16px; margin-bottom: 4px; }
.cause p { margin: 0; color: var(--muted); font-size: 15px; }

/* Шаги — вертикальная линия с номерами, как в документации. */
.steps { display: grid; gap: 0; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px;
  padding: 0 0 36px;
}
.step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 40px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step__index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px var(--bg);
}
.step:target .step__body > h3 { color: var(--accent-text); }
.step__body { min-width: 0; padding-top: 2px; }
.step__body > h3 { font-size: 19px; margin-bottom: 8px; }
.step__body > p { color: var(--text); }
.step__body > :last-child { margin-bottom: 0; }
.step__note { margin: 16px 0 8px; color: var(--muted); font-size: 14px; }
.step__warning, .step__check { margin: 16px 0; }

/* Код — тёмный в обеих темах, как терминал. */
.codeblock {
  margin: 8px 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--code-line);
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.codeblock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 6px 14px;
  border-bottom: 1px solid var(--code-line);
  background: var(--code-bar);
}
.codeblock__lang { display: inline-flex; align-items: center; gap: 8px; color: var(--code-muted); font-size: 13px; font-weight: 500; }
.codeblock__lang .icon { width: 16px; height: 16px; color: #7cacff; }
.codeblock--registry .codeblock__lang .icon { color: #fbbf24; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--code-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--code-text);
  font: 500 13px/1 var(--font);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.copy-btn .icon { width: 15px; height: 15px; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: #3a4558; }
.copy-btn:active { transform: scale(0.97); }
.copy-btn__done { display: none; }
.copy-btn.is-copied { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.1); }
.copy-btn.is-copied .copy-btn__icon { display: none; }
.copy-btn.is-copied .copy-btn__done { display: block; }
pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--code-line) transparent; }
pre code { font: 400 14px/1.65 var(--mono); color: var(--code-text); white-space: pre; }
:not(pre) > code { font-family: var(--mono); font-size: 0.88em; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--heading); }

.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  color: var(--heading);
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s var(--ease);
}
.faq__question:hover { color: var(--accent-text); }
.faq__question::-webkit-details-marker { display: none; }
.faq__chevron { color: var(--subtle); transition: transform 0.2s var(--ease); }
.faq__item[open] .faq__chevron { transform: rotate(180deg); color: var(--accent-text); }
.faq__answer { margin: 0; padding: 0 4px 20px; color: var(--muted); }

.toc { display: none; }
.toc__card { padding: 4px 0 0 20px; border-left: 1px solid var(--line); }
.toc__title { margin: 0 0 10px; color: var(--heading); font-size: 13px; font-weight: 650; }
.toc__list { margin-bottom: 20px; font-size: 14px; }
.toc .btn { min-height: 40px; padding: 0 14px; font-size: 14px; justify-content: space-between; }
.toc__list a {
  display: flex;
  gap: 10px;
  padding: 5px 10px;
  margin-left: -10px;
  border-radius: 6px;
  color: var(--muted);
  line-height: 1.4;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.toc__list a:hover { color: var(--heading); background: var(--surface-2); }
.toc__list a.is-active { color: var(--accent-text); font-weight: 600; }
.toc__list ol { margin: 2px 0 4px 2px; padding-left: 12px; border-left: 1px solid var(--line); }
.toc__list ol a { font-size: 13px; }
.toc__list ol span { flex: none; color: var(--subtle); font-weight: 600; font-variant-numeric: tabular-nums; }

.related { padding-top: 64px; }
.link-grid { display: grid; gap: 8px; }
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--heading);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), color 0.15s var(--ease);
}
.link-card:hover { color: var(--accent-text); border-color: var(--accent-line); box-shadow: var(--shadow); }
.link-card__title { font-weight: 500; line-height: 1.45; }
.link-card__arrow { color: var(--subtle); transition: transform 0.15s var(--ease), color 0.15s var(--ease); }
.link-card:hover .link-card__arrow { color: var(--accent-text); transform: translateX(3px); }

/* ------------------------------------------------------------------ соглашение */
.legal { max-width: 800px; }
.legal__section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.legal__section:first-of-type { margin-top: 24px; border-top: 1px solid var(--line); }
.legal__section h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 19px; }
.legal__section h2 span {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--accent-text);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 700;
}
.legal__section p { margin: 0; color: var(--muted); }

/* ------------------------------------------------------------------ подвал */
.site-footer { margin-top: 80px; padding: 48px 0 32px; border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: 14px; }
.site-footer__grid { display: grid; gap: 32px; }
.site-footer__about p { max-width: 42ch; margin: 14px 0 0; }
.site-footer__title { margin: 0 0 12px; color: var(--heading); font-size: 13px; font-weight: 650; }
.site-footer__col ul { display: grid; gap: 8px; }
.site-footer__col a { color: var(--muted); }
.site-footer__col a:hover { color: var(--accent-text); }
.site-footer__disclaimer { display: flex; gap: 10px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; line-height: 1.6; }
.site-footer__disclaimer .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--subtle); }
.site-footer__copy { margin: 16px 0 0; color: var(--subtle); font-size: 12px; }
.brand--footer .brand__mark { width: 30px; height: 30px; border-radius: 8px; }

/* ------------------------------------------------------------------ нижняя панель (телефон) */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--header-bg);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s var(--ease);
}
.tabbar__item .icon { width: 22px; height: 22px; transition: transform 0.15s var(--ease); }
.tabbar__item:hover, .tabbar__item:active { color: var(--accent-text); }
.tabbar__item:active .icon { transform: scale(0.9); }

/* ------------------------------------------------------------------ полоса прогресса чтения (без JS) */
@supports (animation-timeline: scroll()) {
  .page-article .progress {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    height: 2px;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* ------------------------------------------------------------------ ≥ 640px */
@media (min-width: 640px) {
  .wrap { padding: 0 28px; }
  .brand__badge { display: block; }
  .card-grid, .link-grid, .article-list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { flex-direction: row; align-items: flex-start; gap: 24px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); gap: 20px; }
  .step::before { left: 17px; top: 44px; }
  .step__index { width: 36px; height: 36px; font-size: 15px; }
  .search__submit { display: inline-flex; position: absolute; right: 8px; min-height: 44px; }
  .search--hero .search__input { padding-right: 110px; }
  .hero { padding: 88px 0 64px; }
}

/* ------------------------------------------------------------------ ≥ 900px: десктопная шапка */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .header-bar { gap: 24px; height: 64px; }
  .search--header { display: block; flex: 1; max-width: 420px; margin-left: auto; }
  .search--header .search__input { height: 40px; }
  .menu-btn { margin-left: 0; }
  .search--panel { display: none; }
  .menu-panel {
    bottom: auto;
    max-height: calc(100vh - var(--header-h));
    box-shadow: var(--shadow-lg);
  }
  .menu-panel__inner { padding-top: 8px; padding-bottom: 28px; }
  .menu-panel__title { margin-top: 20px; }
  .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body:has(.menu-toggle:checked) { overflow: auto; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section { padding-top: 80px; }
  .site-footer__grid { grid-template-columns: 1.4fr 2fr 1fr; gap: 48px; }
  .site-footer__col:nth-child(2) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .post__section { padding-top: 56px; }
  .causes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ ≥ 1120px: оглавление сбоку */
@media (min-width: 1120px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 72px; align-items: start; }
  .toc { display: block; position: sticky; top: calc(var(--header-h) + 32px); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; margin-top: 32px; }
  .jump { display: none; }
  .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ доступность */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media (hover: none) {
  .card:hover { transform: none; }
}
