/* mtprotoproxy.net — независимый справочник. Единственное место стилей: инлайн-style запрещён CSP.
   Палитра: глубокий индиго и сланец, один тёплый акцент (фильтр, «важно»). Шрифты: Onest, JetBrains Mono. */

:root {
  --container: 1200px;
  --prose: 720px;
  --gutter: clamp(16px, 4vw, 40px);
  --tap: 44px;

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --soft: #F3F3F8;
  --line: #E4E4EE;
  --line-2: #D3D3E2;
  --ink: #1C1E3A;
  --text: #2B2E4A;
  --muted: #5F6386;

  --indigo: #4340A8;
  --indigo-d: #2E2B7A;
  --indigo-s: #EEEDFA;
  --indigo-l: #CFCDF0;
  --warm: #D9702E;
  --warm-d: #A44F18;
  --warm-s: #FDF0E6;

  --r-s: 8px;
  --r: 14px;
  --r-l: 22px;
  --shadow: 0 1px 2px rgba(28, 30, 58, .04), 0 6px 24px -8px rgba(28, 30, 58, .10);
  --shadow-h: 0 2px 4px rgba(28, 30, 58, .05), 0 14px 36px -12px rgba(46, 43, 122, .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 128px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
svg { display: block; }
h1, h2, h3, p, ol, ul, figure, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--ink); font-weight: 650; letter-spacing: -.015em; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: .86em; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: .08em .35em; overflow-wrap: anywhere; }

a { color: var(--indigo); text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--indigo-l); text-underline-offset: 3px; }
a:hover { color: var(--indigo-d); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 6px;
}
.plain { text-decoration: none; color: inherit; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50; padding: 10px 14px; border-radius: var(--r-s);
  background: var(--ink); color: #fff; font-size: 14px;
}
.skip:focus { top: 8px; color: #fff; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.meta { color: var(--muted); font-size: 14px; line-height: 1.5; }
.ic { flex: none; }

/* ---------- знак и шапка ---------- */

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.mark { width: 32px; height: 32px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.logo-name b { font-weight: 700; color: var(--indigo); }
.logo-sub { font-size: 12px; color: var(--muted); letter-spacing: .02em; }

.hd {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 250, 247, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hd-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; min-height: 64px; position: relative; }
.hd-in .logo { margin-inline-end: auto; padding: 12px 0; }

/* переключатель языков: самоназвания, текущий выделен */
.langs { display: flex; gap: 2px; }
.langs a {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 10px; border-radius: 999px;
  font-size: 14px; color: var(--muted); text-decoration: none;
}
/* флаги разных пропорций (2:1, 7:4) — в одной рамке 3:2, лишнее по краям обрезается */
.flag { width: 18px; height: 12px; flex: none; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(28, 30, 58, .12); }
.langs a:hover { color: var(--indigo-d); background: var(--indigo-s); }
.langs a[aria-current] { color: var(--ink); font-weight: 600; background: var(--soft); }
.hd-nav {
  order: 3; flex: 1 0 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 10px;
}
.hd-nav::-webkit-scrollbar { display: none; }
.hd-nav a {
  flex: none; padding: 6px 12px; border-radius: 999px; font-size: 15px; line-height: 22px;
  color: var(--text); text-decoration: none; background: var(--soft);
}
.hd-nav a:hover { background: var(--indigo-s); color: var(--indigo-d); }
.hd-nav a[aria-current] { background: var(--indigo); color: #fff; }

/* поиск */
.search { position: relative; }
.search-btn {
  display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); color: var(--ink);
}
.search-field {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 0 14px; color: var(--muted);
}
.search-field:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 4px var(--indigo-s); }
.search-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink);
  height: 42px; font-size: 16px;
}
.search-field input::placeholder { color: #8A8DA8; }
.search-hd .search-field { display: none; }
.search-hd.is-open .search-field {
  display: flex; position: absolute; right: 0; top: calc(100% + 10px); width: min(92vw, 420px); z-index: 30; box-shadow: var(--shadow-h);
}
.search-res {
  position: absolute; z-index: 31; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-h);
  padding: 6px; max-height: 60vh; overflow: auto;
}
.search-hd.is-open .search-res { top: calc(100% + 64px); left: auto; right: 0; width: min(92vw, 420px); }
.search-res[hidden] { display: none; }
.search-res a { display: block; padding: 10px 12px; border-radius: 10px; font-size: 15px; line-height: 1.4; color: var(--ink); text-decoration: none; }
.search-res a:hover, .search-res a:focus-visible { background: var(--indigo-s); color: var(--indigo-d); }
.search-res .meta { display: block; padding: 10px 12px; }

/* ---------- общие элементы ---------- */

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  background: var(--indigo-s); color: var(--indigo-d); font-size: 13px; font-weight: 600; line-height: 20px;
  text-decoration: none; letter-spacing: .01em;
}
a.tag:hover { background: var(--indigo-l); color: var(--indigo-d); }
.lead { font-size: 19px; line-height: 1.6; color: var(--text); }
.sub { color: var(--muted); }
.block-h { font-size: 20px; line-height: 1.3; margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 10px 20px; border-radius: 12px;
  background: var(--indigo); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none;
}
.btn:hover { background: var(--indigo-d); color: #fff; }

.crumbs { padding: 20px 0 4px; font-size: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 10px; border-right: 1.5px solid var(--line-2); border-top: 1.5px solid var(--line-2); transform: rotate(45deg); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--indigo); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font-size: 15px; font-weight: 500;
  text-decoration: none;
}
.chip:hover { border-color: var(--indigo); color: var(--indigo); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line-2); color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none;
}
.pill:hover { border-color: var(--indigo); color: var(--indigo); }

/* врезки «важно / совет» */
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r); border: 1px solid; }
.callout p { font-size: 16px; line-height: 1.6; }
.callout .callout-h { font-weight: 650; color: var(--ink); margin-bottom: 4px; }
.callout-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.callout-warn { background: var(--warm-s); border-color: #F6D6BE; }
.callout-warn .callout-ic { background: #FBE0CB; color: var(--warm-d); }
.callout-tip { background: var(--indigo-s); border-color: #DEDCF4; }
.callout-tip .callout-ic { background: #DFDDF6; color: var(--indigo-d); }

/* рекламная врезка */
.cta {
  display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-top: 40px;
}
.cta-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--warm-s); color: var(--warm-d); }
.cta-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cta-title { font-size: 20px; font-weight: 650; color: var(--ink); margin: 2px 0 8px; }
.cta-body > p:not(.cta-label):not(.cta-title):not(.cta-note) { font-size: 16px; margin-bottom: 16px; }
.cta-note { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- письмо справа налево (fa, ar) ---------- */

/* Onest не покрывает вязь: латиница остаётся Onest, персидский и арабский — системными шрифтами с хорошей вязью.
   Разрядка ломает соединение букв, поэтому для RTL её нет; строку делаем чуть выше. */
[dir="rtl"] { --font: 'Onest', Tahoma, 'Segoe UI', 'Noto Sans Arabic', 'Geeza Pro', system-ui, sans-serif; }
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] * { letter-spacing: 0 !important; }
[dir="rtl"] .ic-dir { transform: scaleX(-1); }
[dir="rtl"] .crumbs li + li::before { transform: rotate(-135deg); }
[dir="rtl"] .tile-links li a::after { content: "←"; }
[dir="rtl"] code, [dir="rtl"] .code-block { direction: ltr; unicode-bidi: isolate; }

/* ---------- главная ---------- */

.hero {
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(67, 64, 168, .10), transparent 70%),
    radial-gradient(600px 300px at 0% 100%, rgba(217, 112, 46, .07), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-in { display: grid; gap: 32px; padding-top: 36px; padding-bottom: 44px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 4px var(--warm-s); }
.hero h1 { font-size: clamp(32px, 7.4vw, 54px); line-height: 1.08; letter-spacing: -.03em; margin: 14px 0 16px; font-weight: 700; }
.hero .lead { max-width: 600px; }
.search-hero { margin-top: 26px; max-width: 560px; }
.search-hero .search-field { border-radius: 16px; padding: 0 18px; box-shadow: var(--shadow); border-color: var(--line); }
.search-hero .search-field input { height: 58px; font-size: 17px; }
.search-hero .search-field .ic { color: var(--indigo); }
.hints { margin-top: 14px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.hints a { color: var(--text); text-decoration: none; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.hints a:hover { border-color: var(--indigo); color: var(--indigo); }
.hero-fig {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow);
  padding: 18px 6px 14px;
}
.hero-fig > svg { width: 100%; height: auto; margin: 0 auto; max-width: 560px; }
.hero-fig figcaption { font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: 12px; padding: 0 4px; text-align: center; }

/* макет настроек прокси в Telegram — тот же язык, что у макета бота: белая рамка, мягкий индиго, тёплый фильтр */
.hero-mock { container-type: inline-size; padding: 16px 12px 14px; }
.hm { display: grid; gap: 16px; }
.tg {
  width: 100%; max-width: 320px; margin: 0 auto; padding: 6px 14px 14px; border-radius: 26px;
  background: var(--surface); border: 1.8px solid var(--indigo-l); color: var(--ink); font-size: 14px; line-height: 1.35;
}
.tg-hd { display: flex; align-items: center; gap: 10px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.tg-back { width: 9px; height: 9px; border-bottom: 2px solid var(--indigo); border-inline-start: 2px solid var(--indigo); transform: rotate(45deg); margin-inline-start: 4px; }
[dir="rtl"] .tg-back { transform: rotate(-45deg); }
.tg-title { font-size: 16px; font-weight: 650; }
.tg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.tg-sw { position: relative; flex: none; width: 36px; height: 20px; border-radius: 10px; background: var(--indigo); }
.tg-sw::after { content: ""; position: absolute; top: 2px; inset-inline-end: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.tg-card { padding: 12px 12px 4px; border-radius: 14px; background: var(--indigo-s); }
.tg-st { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.tg-on { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: #1E6B5A; }
.tg-on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2E9C7E; box-shadow: 0 0 0 3px #D5EDE5; }
.tg-ping { font-size: 12.5px; color: var(--muted); }
.tg-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--indigo-l); }
.tg-kv div:first-child { border-top: 0; }
.tg-kv dt { color: var(--muted); font-size: 13px; }
.tg-kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.tg-sec { color: var(--warm-d); }
.tg-from { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.tg-from img { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.tg-from span { display: flex; flex-direction: column; min-width: 0; }
.tg-from b { font-size: 13.5px; font-weight: 600; }
.tg-from small { font-size: 12px; color: var(--muted); }

/* путь трафика: на узком — строкой из четырёх шагов, рядом с макетом — столбцом */
.hm-side { display: grid; gap: 12px; align-content: center; }
.hm-path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-path li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.3; }
.hm-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--indigo-s); color: var(--indigo); margin-bottom: 6px; }
.hm-filter .hm-ic { background: var(--warm-s); color: var(--warm-d); outline: 1.5px dashed var(--warm); outline-offset: -1.5px; }
.hm-path b { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.hm-path small { font-size: 12px; color: var(--muted); }
.hm-filter small { color: var(--warm-d); }
.hm-path li:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; inset-inline-end: -8px; width: 7px; height: 7px;
  border-top: 2px solid var(--indigo-l); border-right: 2px solid var(--indigo-l); transform: rotate(45deg);
}
[dir="rtl"] .hm-path li:not(:last-child)::after { transform: rotate(-135deg); }
.hm-safe {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--soft); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; color: var(--text);
}
.hm-safe .ic { color: var(--indigo); }

@container (min-width: 440px) {
  .hm { grid-template-columns: minmax(0, 1fr) 168px; align-items: center; gap: 20px; }
  .hm-path { grid-template-columns: none; gap: 16px; }
  .hm-path li { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: start; }
  .hm-ic { grid-row: span 2; margin: 0; }
  .hm-path b { align-self: end; }
  .hm-path small { align-self: start; }
  .hero-mock .hm-path li:not(:last-child)::after { top: calc(100% + 2px); inset-inline-end: auto; inset-inline-start: 15px; transform: rotate(135deg); }
  .hm-safe { align-items: flex-start; }
}

.sec { padding-top: 56px; }
.sec-head { max-width: 720px; margin-bottom: 24px; }
.sec-head h2, .faq > h2 { font-size: clamp(26px, 4.4vw, 34px); line-height: 1.2; letter-spacing: -.02em; }
.sec-head p { color: var(--muted); margin-top: 8px; }
.sec-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; max-width: none; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; white-space: nowrap; }

.tiles { display: grid; gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tile-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--indigo-s); color: var(--indigo); flex: none; }
.tile.t2 .tile-ic { background: #E7F1EE; color: #1E6B5A; }
.tile.t3 .tile-ic { background: var(--warm-s); color: var(--warm-d); }
.tile.t4 .tile-ic { background: #ECEFF6; color: #33456E; }
.tile.t5 .tile-ic { background: #F4ECF7; color: #6A3A80; }
.tile h3 { font-size: 21px; line-height: 1.3; margin-top: 6px; }
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile h3 a:hover { color: var(--indigo); }
.tile > p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.tile-links { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.tile-links li a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15.5px; line-height: 1.4;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
}
.tile-links li:last-child a { border-bottom: 0; padding-bottom: 0; }
.tile-links li a::after { content: "→"; color: var(--indigo); flex: none; }
.tile-links li a:hover { color: var(--indigo); }
.tile .chips { margin-top: auto; padding-top: 6px; }
.tile-all { background: var(--indigo-d); border-color: var(--indigo-d); color: #fff; text-decoration: none; justify-content: space-between; }
.tile-all .tile-ic { background: rgba(255, 255, 255, .12); color: #fff; }
.tile-all:hover { color: #fff; background: #26236A; }
.tile-all-n { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -.03em; margin-top: 10px; }
.tile-all-t { color: #D6D5F3; font-size: 16px; line-height: 1.5; }
.tile-all-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 8px; }

.how { display: grid; gap: 16px; counter-reset: how; }
.how li { padding: 24px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.how-n {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--indigo); color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 14px;
}
.how h3 { font-size: 19px; margin-bottom: 6px; }
.how p { font-size: 16px; color: var(--text); }
.sec .callout { margin-top: 16px; }

.news { display: grid; gap: 16px; }
.news-card {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text);
}
.news-card .tag { align-self: flex-start; }
.news-title { font-size: 19px; font-weight: 650; line-height: 1.35; color: var(--ink); letter-spacing: -.01em; }
.news-teaser { font-size: 15.5px; color: var(--muted); line-height: 1.55; }
.news-card .meta { margin-top: auto; padding-top: 4px; }
.news-card:hover .news-title { color: var(--indigo); }

.home-cta { display: grid; gap: 24px; align-items: center; }
.home-cta .cta { margin-top: 0; }
.mock { display: none; }
.mock figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }

.about-strip {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; border-radius: var(--r-l);
  background: var(--soft); border: 1px solid var(--line); font-size: 16px;
}
.about-ic { color: var(--indigo); flex: none; margin-top: 2px; }

/* аккордеон вопросов */
.faq { margin-top: 8px; }
.faq > h2 { margin-bottom: 20px; }
.faq-list { border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; min-height: 56px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--indigo-s) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234340A8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.faq-item[open] summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234340A8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}
.faq-item summary h3 { font-size: 17px; line-height: 1.45; font-weight: 600; letter-spacing: -.005em; margin: 0; }
.faq-item summary:hover h3 { color: var(--indigo); }
.faq-item > p { padding: 0 20px 20px; font-size: 16px; color: var(--text); max-width: 720px; }

/* ---------- статья, инструкция, термин ---------- */

.art { padding-bottom: 72px; }
.art-grid { display: grid; gap: 40px; margin-top: 12px; }
.art-main { max-width: var(--prose); min-width: 0; }
.art-head { padding: 16px 0 24px; }
.art-head h1, .page-head h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.15; letter-spacing: -.025em; margin: 14px 0 14px; font-weight: 700; }
.art-head .lead { color: var(--muted); }
.byline { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.byline a { color: var(--ink); font-weight: 600; text-decoration: none; }
.byline a:hover { color: var(--indigo); }
.byline span { display: inline-flex; align-items: center; gap: 8px; }
.byline span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }

.toc-side { display: none; }
.toc-inline { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 32px; }
.toc-inline summary {
  list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: baseline;
}
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary::after { content: "▾"; margin-inline-start: auto; color: var(--indigo); }
.toc-inline[open] summary::after { content: "▴"; }
.toc ol { counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; text-decoration: none; color: var(--text); font-size: 15px; line-height: 1.4; padding: 7px 0; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.toc a:hover { color: var(--indigo); }
.toc-inline nav { padding: 0 18px 12px; border-top: 1px solid var(--line); }
.toc-h { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.prose { color: var(--text); }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-size: clamp(24px, 4vw, 29px); line-height: 1.25; margin-top: 52px; }
.prose h3 { font-size: 20px; line-height: 1.35; margin-top: 32px; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose ul, .prose ol.plain-ol { display: grid; gap: 10px; }
.prose ul > li { position: relative; padding-inline-start: 26px; }
.prose ul > li::before { content: ""; position: absolute; inset-inline-start: 6px; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); }
.prose ol.plain-ol { counter-reset: ol; }
.prose ol.plain-ol > li { counter-increment: ol; position: relative; padding-inline-start: 38px; }
.prose ol.plain-ol > li::before {
  content: counter(ol); position: absolute; inset-inline-start: 0; top: .1em; width: 26px; height: 26px; border-radius: 50%;
  background: var(--indigo-s); color: var(--indigo-d); font-weight: 700; font-size: 14px; display: grid; place-items: center; line-height: 1;
}
.prose strong { color: var(--ink); font-weight: 650; }
.prose .callout { margin-top: 28px; margin-bottom: 8px; }

.code-block {
  display: block; padding: 16px 18px; border-radius: var(--r); background: #1F2140; color: #E8E8F6; border: 0;
  font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.code-block .hl { color: #FFB27A; }
.code-block .ul { color: #A9A6F2; text-decoration: underline; text-underline-offset: 3px; }

.fig {
  margin: 36px 0 !important; padding: 20px 6px 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line);
}
.fig svg { width: 100%; height: auto; max-width: 480px; margin: 0 auto; }
.fig figcaption { font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: 14px; text-align: center; }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.tbl th, .tbl td { text-align: start; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl thead th { background: var(--soft); font-weight: 600; color: var(--ink); font-size: 14px; }
.tbl tbody th { font-weight: 600; color: var(--ink); }
.params th { width: 34%; }
.params td { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }

.note-row { display: grid; gap: 10px; }
.sup { font-size: 12px; color: var(--indigo); font-weight: 600; margin-inline-start: 2px; }
.fn { font-size: 14.5px; line-height: 1.55; color: var(--muted); padding: 10px 14px; border-radius: var(--r-s); background: var(--soft); }
.fn b { color: var(--indigo); font-weight: 600; }

a.term { color: inherit; text-decoration-style: dotted; text-decoration-color: var(--indigo); text-decoration-thickness: 1.5px; cursor: help; }
a.term:hover { color: var(--indigo); }
.termcard {
  padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--indigo-l);
  box-shadow: var(--shadow-h); font-size: 15px; line-height: 1.55;
}
.termcard[hidden] { display: none; }
.termcard b { color: var(--indigo-d); }
.termcard a { white-space: nowrap; font-weight: 600; }

.steps { display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.steps .n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--indigo); color: #fff; font-weight: 700; font-size: 15px; line-height: 1;
}
.steps li > span:last-child { padding-top: 2px; }

.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a {
  flex: 1 0 auto; display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border-radius: 10px; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none;
}
.tabs a:hover { color: var(--indigo); }
.tabs a[aria-current] { background: var(--surface); color: var(--indigo-d); box-shadow: 0 1px 3px rgba(28, 30, 58, .12); }

.sources { margin-top: 48px !important; padding-top: 28px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 20px; margin-top: 0; }
.sources ol { counter-reset: src; display: grid; gap: 8px; margin-top: 14px; }
.sources li { counter-increment: src; display: flex; gap: 10px; font-size: 15px; line-height: 1.5; }
.sources li::before { content: counter(src) "."; color: var(--muted); font-family: var(--mono); font-size: 13px; padding-top: 2px; min-width: 22px; }
.prose .faq { margin-top: 52px; }
.prose .faq > h2 { margin-top: 0; font-size: clamp(24px, 4vw, 29px); }

.related { margin-top: 48px; }
.related-list { display: grid; gap: 10px; }
.related-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.related-card .ic { color: var(--indigo); margin-top: 2px; }
.related-card > span { display: flex; flex-direction: column; gap: 2px; }
.related-kind { font-size: 13px; color: var(--muted); font-weight: 500; }
.related-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.related-card:hover { border-color: var(--indigo-l); box-shadow: var(--shadow); }
.related-card:hover .related-title { color: var(--indigo); }
.devices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; font-size: 15px; color: var(--muted); }
.devices > span { margin-inline-end: 4px; }
.devices .ic { color: var(--indigo); }

.next {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; margin-top: 24px; padding: 20px 22px;
  border-radius: var(--r-l); background: var(--indigo-d); color: #fff; text-decoration: none;
}
.next:hover { background: #26236A; color: #fff; }
.next-k { grid-column: 1; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #C9C7F0; }
.next-t { grid-column: 1; font-size: 19px; font-weight: 650; line-height: 1.35; }
.next .ic { grid-column: 2; grid-row: 1 / span 2; }

.fresh-guide { margin-top: 48px; }
.fresh-guide ul { display: grid; gap: 0; border-top: 1px solid var(--line); }
.fresh-guide li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fresh-guide a { font-weight: 600; text-decoration: none; color: var(--ink); }
.fresh-guide a:hover { color: var(--indigo); }

/* термин */
.narrow { max-width: calc(var(--prose) + 2 * var(--gutter)); }
.term-page { max-width: var(--prose); padding-bottom: 72px; }
.term-name { font-size: clamp(38px, 8vw, 56px) !important; }
.term-full { font-size: 18px; color: var(--muted); margin-top: -4px; }
.term-def {
  display: grid; gap: 6px; padding: 20px 22px; border-radius: var(--r-l); margin-bottom: 36px;
  background: var(--indigo-s); border: 1px solid #DEDCF4; font-size: 18px; line-height: 1.6; color: var(--ink);
}
.term-def-k { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--indigo); }
.term-more { margin-top: 40px; }
.term-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.term-nav a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 650; font-size: 17px; text-decoration: none;
}
.term-nav a:hover { border-color: var(--indigo-l); color: var(--indigo); }
.term-nav .tn-next { text-align: end; }
.term-nav .meta { font-weight: 400; }

/* ---------- ленты, глоссарий, служебные ---------- */

.page-head { padding: 16px 0 32px; max-width: 760px; }
.page-head .lead { color: var(--muted); }
.page-head-ic { display: flex; gap: 18px; align-items: flex-start; max-width: 820px; }
.page-head-ic > .tile-ic { margin-top: 4px; display: none; }
.feed-group { margin-bottom: 48px; }
.feed-group-h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.feed-group-h h2 { font-size: 26px; line-height: 1.25; }
.feed-group-h h2 a:hover { color: var(--indigo); }
.feed { display: grid; gap: 16px; padding-bottom: 24px; }
.feed-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line);
}
.feed-card .tag { align-self: flex-start; }
.feed-card h2, .feed-card h3 { font-size: 20px; line-height: 1.35; }
.feed-card h2 a, .feed-card h3 a { color: var(--ink); text-decoration: none; }
.feed-card h2 a::after, .feed-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.feed-card:hover { border-color: var(--indigo-l); box-shadow: var(--shadow); }
.feed-card:hover h2 a, .feed-card:hover h3 a { color: var(--indigo); }
.feed-card > p:not(.meta) { color: var(--muted); font-size: 16px; }

.term-grid { display: grid; gap: 14px; padding-bottom: 72px; }
.term-card {
  display: flex; gap: 16px; height: 100%; padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
}
.term-card-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--indigo-s); color: var(--indigo); }
.term-card h2 { font-size: 22px; line-height: 1.25; }
.term-card .meta { margin: 2px 0 8px; }
.term-card-d { font-size: 16px; line-height: 1.55; }
.term-card:hover { border-color: var(--indigo-l); box-shadow: var(--shadow); }
.term-card:hover h2 { color: var(--indigo); }

.page-prose { max-width: var(--prose); padding-bottom: 72px; }
.page-prose > h2:first-child { margin-top: 0; }
.notfound { padding: 72px var(--gutter) 120px; max-width: 720px; }
.notfound h1 { font-size: clamp(32px, 6vw, 48px); margin: 14px 0; }
.notfound p + p { margin-top: 12px; }

/* ---------- подвал ---------- */

.ft { margin-top: 72px; background: #17183A; color: #C8C9E4; font-size: 15px; }
.ft a { color: #E9E9F8; text-decoration: none; }
.ft a:hover { color: #fff; text-decoration: underline; }
.ft-in { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.ft .logo { color: #fff; }
.ft .logo-name b { color: #B9B6F5; }
.ft .logo-sub { color: #9C9DC4; }
.ft-brand p { margin-top: 14px; max-width: 420px; line-height: 1.6; }
.ft-brand p a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); }
.ft-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.ft-h { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8F90B8; margin-bottom: 10px; }
.ft-col li + li { margin-top: 8px; }
.ft-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; color: #9C9DC4; }

/* ---------- адаптив ---------- */

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .page-head-ic > .tile-ic { display: grid; }
  .cta { flex-direction: row; gap: 18px; padding: 28px 30px; }
  html { scroll-padding-top: 88px; }
  .hero-fig { padding: 28px 24px 20px; }
  .fig { padding: 28px 24px 18px; }
  .ft-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .hd-in { flex-wrap: nowrap; gap: 28px; }
  .hd-in .logo { margin-inline-end: 0; }
  .hd-nav { order: 0; flex: 1; margin: 0; padding: 0; justify-content: center; overflow: visible; flex-wrap: wrap; }
  .hd-nav a { background: transparent; padding: 6px 10px; font-size: 14.5px; }
  /* языки на широком экране — отдельной тонкой строкой над меню, чтобы меню не переносилось */
  .hd-in .langs { order: -1; flex: 1 0 100%; justify-content: flex-end; padding-top: 4px; }
  .hd-in:has(.langs) { flex-wrap: wrap; row-gap: 0; }
  .hd-in .langs a { min-height: 26px; padding: 0 8px; font-size: 13px; }
  .search-hd { width: 230px; }
  .search-hd .search-btn { display: none; }
  .search-hd .search-field, .search-hd.is-open .search-field { display: flex; position: static; width: auto; box-shadow: none; }
  .search-hd .search-field input { height: 40px; font-size: 15px; }
  .search-hd.is-open .search-res, .search-hd .search-res { top: calc(100% + 8px); left: auto; right: 0; width: 380px; }

  .hero-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 56px; padding-top: 64px; padding-bottom: 72px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sec { padding-top: 80px; }
  .news { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-cta { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
  .mock { display: block; }
  .ft-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; }
}

@media (min-width: 1100px) {
  .art { max-width: calc(220px + 64px + var(--prose) + 2 * var(--gutter)); }
  .art-grid { grid-template-columns: 220px minmax(0, var(--prose)); gap: 64px; }
  .toc-side { display: block; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; padding-top: 28px; }
  .toc-side a { padding-block: 6px; padding-inline: 12px 0; border-inline-start: 2px solid var(--line); }
  .toc-side a:hover { border-inline-start-color: var(--indigo); }
  .toc-inline { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  a, .tile, .news-card, .feed-card, .related-card, .term-card, .chip, .pill, .btn, .tabs a, .faq-item summary::after {
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease);
  }
  .news-card:hover, .feed-card:hover, .term-card:hover, .related-card:hover { transform: translateY(-2px); }
  .termcard:not([hidden]), .search-res:not([hidden]) { animation: pop .2s var(--ease); }
  .faq-item[open] > p { animation: pop .2s var(--ease); }
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
