/* ============================================================
   fin-ovz.ru — макет портала финансовой грамотности для ОВЗ
   Дизайн: Эхо (светлая/тёмная тема, цветовая кодировка уровней)
   ============================================================ */

:root {
  --bg: #f5f7fc;
  --bg-soft: #eef1f9;
  --surface: #ffffff;
  --surface-2: #f3f5fb;
  --text: #24337a;
  --muted: #5b6484;
  --line: #e5e9f4;
  --line-soft: #eef1f8;
  --navy: #24337a; /* тёмно-синий (осветлённый): заголовки и меню */

  --sky: #0ea5e9;
  --indigo: #4f46e5;
  --emerald: #0ea766;
  --violet: #8b5cf6;

  --radius: 18px;
  --radius-sm: 13px;
  --shadow: 0 20px 44px -26px rgba(19, 30, 64, .40);
  --shadow-sm: 0 10px 24px -18px rgba(19, 30, 64, .40);
  --container: 1180px;
  --header-h: 70px;

  --grad-sky: linear-gradient(135deg, #38bdf8, #0284c7);
  --grad-indigo: linear-gradient(135deg, #6366f1, #4338ca);
  --grad-emerald: linear-gradient(135deg, #34d399, #059669);
  --grad-violet: linear-gradient(135deg, #a78bfa, #7c3aed);

  /* Фирменный цвет ИКП (#833e63) */
  --ikp-1: #b85a8b;
  --ikp-2: #833e63;
  --ikp-3: #5f2b47;
}

[data-theme="dark"] {
  --bg: #0a0f1e;
  --bg-soft: #0e1428;
  --surface: #121a30;
  --surface-2: #16203a;
  --text: #e9edfb;
  --muted: #9aa5c6;
  --line: #23304f;
  --line-soft: #1b2542;
  --navy: #dbe4ff;
  --shadow: 0 22px 48px -28px rgba(0, 0, 0, .75);
  --shadow-sm: 0 12px 26px -20px rgba(0, 0, 0, .8);
  --ikp-1: #f2c1da;
  --ikp-2: #e099c1;
  --ikp-3: #cb7aa6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .brand-text, .level-kicker { font-family: "Onest", "Inter", sans-serif; }
h1, h2, h3, h4 { color: var(--navy); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.grad { background: linear-gradient(120deg, var(--ikp-1), var(--ikp-2) 50%, var(--ikp-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--indigo); color: #fff; padding: 10px 16px; border-radius: 0 0 12px 0; z-index: 200; }
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 34px -30px rgba(20, 30, 60, .6); }
.nav { display: flex; align-items: center; gap: 26px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; letter-spacing: -.2px; }
.brand-text small { font-size: .72rem; color: var(--muted); font-weight: 500; }
.brand-logo { height: 38px; width: auto; flex: none; }
.brand-partner { height: 56px; margin-right: -6px; }
.brand-emblem { height: 38px; width: auto; flex: none; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 9px 13px; border-radius: 10px; font-size: .93rem; font-weight: 500; color: var(--navy); transition: background .2s, color .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links .nav-glossary { display: inline-flex; align-items: center; gap: 7px; color: var(--navy); font-weight: 600; }
.nav-links .nav-glossary .nav-glossary-logo { width: 50px; height: 50px; border-radius: 50%; flex: none; }

/* ---------- Nav dropdown (Уровни образования) ---------- */
.nav-drop { position: relative; }
.nav-drop-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 10px; font-family: inherit; font-size: .93rem; font-weight: 500; color: var(--navy); background: none; border: 0; cursor: pointer; transition: background .2s, color .2s; }
.nav-drop-toggle:hover { color: var(--text); background: var(--surface-2); }
.nav-caret { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .22s; }
.nav-drop.open .nav-caret { transform: rotate(-90deg); }
.nav-drop-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px; max-width: 360px; padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 120; }
.nav-drop.open .nav-drop-menu, .nav-drop:hover .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop-menu a { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: .92rem; font-weight: 500; line-height: 1.3; color: var(--text); }
.nav-drop-menu a .tab-dot { margin-top: 6px; }
.nav-drop-menu a:hover { background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle, .burger {
  width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  transition: background .2s, border-color .2s, transform .15s;
}
.theme-toggle:hover, .burger:hover { background: var(--surface-2); }
.theme-toggle:active { transform: scale(.94); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
.burger { display: none; flex-direction: column; gap: 5px; }
.burger span { width: 19px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 74px 0 46px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.b1 { width: 460px; height: 460px; background: #6366f1; top: -180px; right: -80px; }
.b2 { width: 380px; height: 380px; background: #0ea5e9; top: 20px; left: -120px; opacity: .35; }
.b3 { width: 320px; height: 320px; background: #a78bfa; bottom: -160px; left: 40%; opacity: .3; }
[data-theme="dark"] .blob { opacity: .32; }
.hero-inner { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font-size: .82rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.eyebrow .icon { width: 16px; height: 16px; color: var(--indigo); }
.hero h1 { font-size: clamp(1.55rem, 3.2vw, 2.6rem); line-height: 1.14; letter-spacing: -.8px; margin: 22px 0 16px; font-weight: 800; }
.hero .lead { font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--muted); max-width: 720px; margin: 0; }
.hero .lead + .lead { margin-top: 13px; }
#hero { scroll-margin-top: calc(var(--header-h) + 8px); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 34px; }
.hero-head { display: flex; align-items: center; gap: clamp(18px, 3vw, 34px); margin: 22px 0 16px; }
.hero-head h1 { margin: 0; }
.hero-coin { width: clamp(84px, 11vw, 150px); height: auto; flex: none; filter: drop-shadow(0 6px 18px rgba(30, 40, 90, .18)); }
.stat b { display: block; font-family: "Onest", sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat span { font-size: .86rem; color: var(--muted); }

/* Hero: правая колонка с баннером «Конструктор» */
.hero-cols { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 30px; align-items: start; margin-top: 28px; }
.hero-main { min-width: 0; }
.hero-main .lead { max-width: none; }
@media (max-width: 720px) { .hero-br { display: none; } }
.hero-banner { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, #eaf1ff, #d5e3ff); box-shadow: var(--shadow-sm); }
.hb-top { display: flex; align-items: flex-start; gap: 14px; }
.hb-logo { width: 62px; height: 62px; flex: none; order: 2; }
.hb-head { display: flex; flex-direction: column; gap: 4px; }
.hb-title { font-family: "Onest", sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; font-size: 1.12rem; line-height: 1.05; color: var(--navy); }
.hb-sub { font-size: .78rem; line-height: 1.35; color: var(--muted); }
.hb-text { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--text); }
.hb-btn { align-self: flex-start; background: var(--navy); color: #fff; font-weight: 600; font-size: .84rem; padding: 9px 20px; border-radius: 999px; transition: transform .15s, filter .2s; }
.hb-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
[data-theme="dark"] .hero-banner { background: linear-gradient(135deg, #141d38, #1a2748); }

/* ---------- Constructor banner ---------- */
.constructor { padding: 4px 0 10px; }
.ctor-card { display: flex; align-items: center; gap: 22px; padding: 22px 26px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(135deg, #eaf1ff, #d5e3ff); box-shadow: var(--shadow-sm); }
.ctor-logo { width: 104px; height: 104px; flex: none; }
.ctor-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ctor-title { margin: 0; font-family: "Onest", sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; font-size: 1.12rem; line-height: 1.35; color: var(--navy); }
.ctor-text { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--text); }
.ctor-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; background: #2b377b; color: #fff; font-weight: 600; font-size: .9rem; padding: 11px 24px; border-radius: 999px; transition: transform .15s, filter .2s; }
.ctor-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.ctor-btn .icon { width: 17px; height: 17px; }
[data-theme="dark"] .ctor-card { background: linear-gradient(135deg, #141d38, #1a2748); }

/* ---------- Dots (используются в меню уровней) ---------- */
.tab-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.d-sky { background: var(--sky); } .d-indigo { background: var(--indigo); }
.d-emerald { background: var(--emerald); } .d-violet { background: var(--violet); }

/* ---------- Level sections ---------- */
.level { padding: 58px 0; scroll-margin-top: calc(var(--header-h) + 14px); }
.level.alt { background: var(--bg-soft); }
.level-head { max-width: 760px; margin-bottom: 30px; }
.level-kicker { display: inline-block; font-size: .84rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; padding: 6px 12px; border-radius: 8px; margin-bottom: 14px; }
.level-top { display: flex; align-items: center; justify-content: flex-start; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.level-top .level-kicker { margin-bottom: 0; }
.level-top .cats { margin: 0; }
.k-sky { color: #0369a1; background: color-mix(in srgb, var(--sky) 15%, transparent); }
.k-indigo { color: #4338ca; background: color-mix(in srgb, var(--indigo) 15%, transparent); }
.k-emerald { color: #047857; background: color-mix(in srgb, var(--emerald) 16%, transparent); }
.k-violet { color: #6d28d9; background: color-mix(in srgb, var(--violet) 16%, transparent); }
[data-theme="dark"] .k-sky { color: #7dd3fc; } [data-theme="dark"] .k-indigo { color: #a5b4fc; }
[data-theme="dark"] .k-emerald { color: #6ee7b7; } [data-theme="dark"] .k-violet { color: #c4b5fd; }
.level-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.7px; margin: 0 0 10px; font-weight: 800; }
.level-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }
.level-intro { margin: 0 0 16px; }
.level-intro p { margin: 0 0 8px; }
.level-intro p:last-child { margin-bottom: 0; }

/* ---------- Иконки категорий обучающихся ---------- */
.cats { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 18px 0 4px; padding: 0; list-style: none; }
.cats li { position: relative; display: flex; align-items: center; justify-content: center; height: 27px; outline: none; }
.cats li img { height: 100%; width: auto; display: block; transition: transform .15s ease; }
.cats li:hover img, .cats li:focus-visible img { transform: translateY(-3px); }
.cats li::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%) translateY(4px); width: max-content; max-width: 250px; background: var(--navy); color: #fff; font-size: .78rem; line-height: 1.35; font-weight: 500; padding: 7px 11px; border-radius: 9px; text-align: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .16s, transform .16s; box-shadow: 0 10px 26px -14px rgba(10,18,45,.65); z-index: 20; }
.cats li::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--navy); opacity: 0; visibility: hidden; transition: opacity .16s; z-index: 21; }
.cats li:hover::after, .cats li:focus-visible::after, .cats li:hover::before, .cats li:focus-visible::before { opacity: 1; visibility: visible; }
.cats li:hover::after, .cats li:focus-visible::after { transform: translateX(-50%) translateY(0); }
.level-credit { margin: 26px 0 0; color: var(--muted); font-size: .92rem; }
.badge-dev { display: inline-block; margin-top: 14px; font-size: .82rem; font-weight: 600; color: #6d28d9; background: color-mix(in srgb, var(--violet) 14%, transparent); border: 1px dashed color-mix(in srgb, var(--violet) 45%, transparent); padding: 7px 13px; border-radius: 10px; }
.sub-head { font-size: 1.06rem; font-weight: 700; margin: 34px 0 16px; color: var(--text); display: flex; align-items: center; gap: 12px; }
.sub-head::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--indigo); }

/* ---------- Grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 18px; }
.tbooks { margin-top: 18px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.res { padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: transform .18s, box-shadow .18s, border-color .18s; }
.res:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--indigo) 30%, var(--line)); }
.res h3 { font-size: 1.08rem; margin: 8px 0 0; letter-spacing: -.2px; }
.res .muted { margin: 0; font-size: .92rem; }
.res .btn { margin-top: auto; align-self: flex-start; }

.res-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.res-icon .icon { width: 24px; height: 24px; }
.c-sky { background: var(--grad-sky); } .c-indigo { background: var(--grad-indigo); }
.c-emerald { background: var(--grad-emerald); } .c-violet { background: var(--grad-violet); }

/* compact horizontal rows */
.res.sm { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; min-height: 74px; }
.res.sm .res-text { flex: 1; }
.res.sm h4 { margin: 0; font-size: .97rem; font-weight: 600; line-height: 1.35; }
.res.sm h4 small { font-weight: 500; color: var(--muted); }
.res.sm .res-icon { width: 40px; height: 40px; border-radius: 11px; }
.res.sm .res-icon .icon { width: 20px; height: 20px; }

.mini-btn {
  flex: none; font-size: .84rem; font-weight: 600; color: #fff;
  background: var(--grad-violet); padding: 8px 14px; border-radius: 10px; white-space: nowrap;
}

/* wide link cards */
.wide { display: flex; align-items: center; gap: 18px; padding: 20px 22px; transition: transform .18s, box-shadow .18s; }
.wide:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wide-violet { grid-column: 1 / -1; margin-top: 18px; }
.wide-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.wide-icon .icon { width: 25px; height: 25px; }
.wide-body { flex: 1; }
.wide-body h3 { margin: 0 0 4px; font-size: 1.04rem; letter-spacing: -.2px; }
.wide-body p { margin: 0; color: var(--muted); font-size: .9rem; }
.wide-arrow { width: 22px; height: 22px; color: var(--muted); transition: transform .18s, color .18s; }
.wide:hover .wide-arrow { transform: translateX(4px); color: var(--indigo); }

/* ---------- Lesson dropdown (Сценарии занятий) ---------- */
.lesson-drop { margin-top: auto; align-self: flex-start; position: relative; }
.lesson-drop > summary { list-style: none; cursor: pointer; }
.lesson-drop > summary::-webkit-details-marker { display: none; }
.lesson-drop > summary .icon { width: 18px; height: 18px; transition: transform .18s; }
.lesson-drop[open] > summary .icon { transform: rotate(-90deg); }
.lesson-list {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 130;
  min-width: 250px; max-width: 300px; margin: 0;
  padding: 10px 14px 10px 34px; list-style: decimal;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
  font-size: .9rem; line-height: 1.35; color: var(--text);
}
.lesson-list li { padding: 3px 0; }
.lesson-list li::marker { color: var(--muted); font-weight: 600; }

/* tbook */
.tbook { padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 16px; row-gap: 8px; text-align: left; transition: transform .18s, box-shadow .18s; }
.tbook:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cover { width: 100%; max-width: 210px; aspect-ratio: 3 / 4; border-radius: 12px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 18px 14px; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.cover b { font-family: "Onest", sans-serif; font-size: 2.1rem; font-weight: 800; letter-spacing: -1px; margin-top: 6px; }
.cover span { font-size: .9rem; font-weight: 600; background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 999px; }
.grad-indigo { background: var(--grad-indigo); } .grad-sky { background: var(--grad-sky); }
.grad-emerald { background: var(--grad-emerald); } .grad-violet { background: var(--grad-violet); }
.tbook .cover-photo { grid-row: 1; }
.cover-photo { display: block; height: 143px; width: fit-content; flex: none; border: 0; border-radius: 9px; overflow: hidden; }
.cover-photo img { display: block; height: 143px; width: auto; }
.tbook-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tbook-body h4 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.tbook-body .muted { font-size: .88rem; margin: 0; }
.tbook-alt { grid-column: 1 / -1; margin-top: 2px; font-size: .84rem; font-weight: 600; color: var(--indigo); line-height: 1.35; }
.tbook-alt:hover { text-decoration: underline; }
.tbook-alt .icon { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- Авторский коллектив ---------- */
.author { padding: 8px 0 64px; }
.author-card { display: flex; align-items: center; gap: 26px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.author-photo { width: 132px; height: 132px; flex: none; border-radius: 50%; object-fit: cover; }
.author-body { flex: 1; }
.author-lead { margin: 0 0 12px; font-size: 1rem; color: var(--text); }
.author-role { margin: 0 0 12px; font-size: .95rem; color: var(--muted); line-height: 1.45; }
.author-role strong { color: var(--navy); }
.author-contacts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .95rem; }
.author-contacts a { color: var(--indigo); font-weight: 600; }
.author-contacts a:hover { text-decoration: underline; }
.author-title { margin: 0 0 22px; font-size: clamp(1.35rem, 2.6vw, 1.75rem); color: var(--navy); text-align: center; }
.author-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 16px; }
.author-grid .author-card { align-items: flex-start; }
.author-initials { display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--indigo) 12%, var(--surface)); color: var(--indigo); font-weight: 700; font-size: 2rem; letter-spacing: .04em; }
@media (max-width: 900px) {
  .author-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .author-card { flex-direction: column; text-align: center; gap: 18px; }
  .author-contacts { justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; padding: 10px 16px; border-radius: 11px; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s; }
.btn .icon { width: 17px; height: 17px; }
.btn-soft { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-soft:hover { background: color-mix(in srgb, var(--indigo) 12%, var(--surface-2)); }
.btn-solid { background: var(--grad-indigo); color: #fff; box-shadow: 0 12px 24px -14px rgba(79,70,229,.9); margin-top: auto; }
.btn-solid:hover { transform: translateY(-1px); }
.tbook .btn { grid-column: 3; grid-row: 1 / span 2; margin: 0; width: auto; justify-content: center; white-space: nowrap; }

/* ---------- Partners ---------- */
.partners { padding: 52px 0; }
.partners-title { text-align: center; color: var(--muted); font-size: .9rem; font-weight: 600; margin: 0 0 22px; }
.partners-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.partner { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 26px; box-shadow: var(--shadow-sm); }
.partner img { display: block; height: 56px; width: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 52px 0 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: .92rem; max-width: 340px; margin: 0; }
.footer-col h4 { font-size: .95rem; margin: 0 0 12px; }
.footer-col a { display: block; color: var(--muted); font-size: .92rem; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .88rem; }
.footer-top { font-weight: 600; }

/* ---------- to-top ---------- */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; z-index: 80; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top .icon { width: 21px; height: 21px; transform: rotate(-90deg); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-cols { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 20px; gap: 2px;
    transform: translateY(-140%); transition: transform .28s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 12px 12px; border-radius: 10px; }
  .nav-drop { width: 100%; }
  .nav-drop-toggle { width: 100%; justify-content: space-between; padding: 12px; }
  .nav-drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 2px 0 6px 10px; display: none; }
  .nav-drop.open .nav-drop-menu { display: flex; }
  .ctor-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ctor-btn { align-self: flex-start; }
  .burger { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
  .hero-stats { gap: 22px; }
}
@media (max-width: 420px) {
  .brand-text small { display: none; }
  .container { width: min(100% - 28px, var(--container)); }
}

/* ---------- Фильтр материалов ---------- */
.filter-panel { padding: 34px 0 6px; }
.filter-title { margin: 0 0 18px; font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; color: var(--navy); letter-spacing: -.4px; }
.filter-groups { display: grid; gap: 20px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.filter-group { display: grid; gap: 10px; }
.filter-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: #2b357e; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease; }
.chip:hover { border-color: #2b357e; color: #2b357e; }
.chip:active { transform: scale(.96); }
.chip.is-active { background: #2b357e; border-color: #2b357e; color: #fff; }
.chip-icon { width: 18px; height: 18px; object-fit: contain; flex: none; }
.chip.is-active .chip-icon { filter: brightness(0) invert(1); }
.filter-result { margin: 14px 2px 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 640px) {
  .filter-groups { padding: 18px 16px; }
  .chip { padding: 6px 12px; font-size: .85rem; }
}

/* ---------- Форма заявки (#apply) ---------- */
.apply { padding: 52px 0 64px; }
.apply-box { max-width: 660px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 34px 30px; }
.apply-lead { color: var(--muted); text-align: center; max-width: 560px; margin: 0 auto 26px; font-size: .95rem; line-height: 1.55; }
.apply-form { display: grid; gap: 16px; }
.apply-field label { display: block; font-weight: 700; color: var(--navy); font-size: .9rem; margin-bottom: 7px; }
.apply-field .req { color: #c0392b; }
.apply-field input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--text); background: #fff; transition: border-color .16s, box-shadow .16s; }
.apply-field input::placeholder { color: #a3abc4; }
.apply-field input:focus { outline: none; border-color: #2b357e; box-shadow: 0 0 0 3px rgba(43,53,126,.13); }
.apply-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); line-height: 1.45; cursor: pointer; }
.apply-consent input { width: auto; margin-top: 3px; flex: none; accent-color: #2b357e; }
.apply-consent a { color: #2b357e; }
.apply-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.apply-submit { justify-self: start; background: #2b357e; color: #fff; border: none; border-radius: 12px; padding: 13px 26px; font-weight: 700; font-size: .95rem; cursor: pointer; transition: background .16s, transform .06s; }
.apply-submit:hover { background: #232b66; }
.apply-submit:active { transform: scale(.98); }
.apply-submit:disabled { opacity: .6; cursor: default; }
.apply-msg { margin: 2px 0 0; font-size: .9rem; line-height: 1.45; min-height: 1px; }
.apply-msg.ok { color: #0a7a4a; }
.apply-msg.err { color: #c0392b; }
@media (max-width: 560px){ .apply-box { padding: 26px 18px; } .apply-submit { justify-self: stretch; } }

/* ---------- Юридическая страница (privacy) ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 40px 24px 72px; }
.legal-back { display: inline-block; margin-bottom: 20px; color: #2b357e; font-weight: 600; }
.legal h1 { font-size: clamp(1.5rem, 4vw, 2rem); color: var(--navy); margin: 0 0 8px; }
.legal .legal-date { color: var(--muted); font-size: .9rem; margin: 0 0 26px; }
.legal h2 { font-size: 1.1rem; color: var(--navy); margin: 26px 0 8px; }
.legal p, .legal li { color: var(--text); line-height: 1.6; font-size: .96rem; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.legal a { color: #2b357e; }
