/* ============ Дизайн-система курса доходно.ру ============
   Светлая тема — основная. Тёмная включается только переключателем в шапке. */
/* Палитра: антрацит · беж · золото.
   Светлые токены — для всей страницы и для блоков .on-light.
   Тёмные — для блоков .on-dark (шапка, первый экран, подвал) и для тёмной темы. */
:root, .on-light {
  --bg: #f5efe5;
  --bg-soft: #ede5d7;
  --surface: #fffcf7;
  --surface-2: #faf6ef;
  --border: #e4dacb;
  --border-2: #d6c8b2;
  --text: #23262b;
  --text-2: #4f5157;
  --text-3: #868178;
  --accent: #a07e3b;            /* золото для текста на светлом */
  --accent-2: #86692f;
  --accent-soft: #f3e8d2;
  --accent-grad: linear-gradient(100deg, #a07e3b 0%, #c29a4e 50%, #d9bb7c 100%);
  --gold: #c29a4e;
  --gold-soft: #f6ecd8;
  --ink: #26292e;
  --on-ink: #f5efe5;
  --btn-bg: #26292e;
  --btn-fg: #f5efe5;
  --btn-shadow: 0 10px 24px -10px rgba(30, 32, 36, .55);
  --danger: #b04a3c;
  --danger-soft: #f6e4df;
  --info: #4f6b8a;
  --info-soft: #e8edf2;
  --ok: #4d8460;
  --ok-soft: #e5efe6;
  --shadow-xs: 0 1px 2px rgba(35, 38, 43, .05);
  --shadow: 0 1px 2px rgba(35, 38, 43, .04), 0 10px 28px -8px rgba(35, 38, 43, .12);
  --shadow-lg: 0 2px 6px rgba(35, 38, 43, .05), 0 32px 64px -24px rgba(35, 38, 43, .28);
  color-scheme: light;
}
:root {
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --pill: 999px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
}
.on-dark, :root[data-theme="dark"] {
  --bg: #1e2024;
  --bg-soft: #26292e;
  --surface: #2a2d32;
  --surface-2: #30333a;
  --border: #393c43;
  --border-2: #4a4d55;
  --text: #f5efe5;
  --text-2: #cfc6b8;
  --text-3: #9b9488;
  --accent: #d4b06a;
  --accent-2: #e3c98f;
  --accent-soft: rgba(212, 176, 106, .14);
  --accent-grad: linear-gradient(100deg, #c29a4e 0%, #e3c98f 100%);
  --gold: #d4b06a;
  --gold-soft: rgba(212, 176, 106, .14);
  --ink: #f5efe5;
  --on-ink: #1e2024;
  --btn-bg: linear-gradient(135deg, #e3c98f 0%, #c29a4e 100%);
  --btn-fg: #1e2024;
  --btn-shadow: 0 10px 28px -10px rgba(194, 154, 78, .6);
  --danger: #e58a7c;
  --danger-soft: rgba(229, 138, 124, .14);
  --info: #9db4cf;
  --info-soft: rgba(157, 180, 207, .14);
  --ok: #8cc49d;
  --ok-soft: rgba(140, 196, 157, .14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
.on-dark, .on-light { color: var(--text); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-light h1, .on-light h2, .on-light h3, .on-light h4 { color: var(--text); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 .6em; color: var(--text); }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.035em; }
h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.6em; }
h4 { font-size: 1.05rem; font-weight: 700; margin-top: 1.2em; letter-spacing: -.015em; }
.hero-stats b, .price-card .price, .calc-out .big b, .brand { font-family: var(--font-head); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin: .3em 0; }
strong, b { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.muted { color: var(--text-2); }
.small { font-size: .9rem; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ============ Верхняя панель ============ */
.topbar {
  position: sticky; top: 0; z-index: 50; color: var(--text);
  display: flex; align-items: center; gap: 16px;
  height: 68px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.8) blur(16px);
  -webkit-backdrop-filter: saturate(1.8) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 1.2rem; letter-spacing: -.03em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-name span { color: var(--accent) !important; }
.brand-mark { width: 32px; height: 32px; flex: none; display: block; }
.topbar-nav { display: flex; gap: 2px; margin-left: 18px; padding: 4px; background: var(--bg-soft); border-radius: var(--pill); }
.topbar-nav a { color: var(--text-2); padding: 7px 16px; border-radius: var(--pill); font-weight: 600; font-size: .9rem; transition: all .15s; }
.topbar-nav a:hover { color: var(--text); }
.topbar-nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.topbar-spacer { flex: 1; }
.progress-pill { display: flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 600; color: var(--text-3); }
.progress-pill .bar { width: 110px; height: 6px; background: var(--bg-soft); border-radius: var(--pill); overflow: hidden; }
.progress-pill .bar i { display: block; height: 100%; width: 0; background: var(--accent-grad); border-radius: var(--pill); transition: width .5s ease; }
.progress-pill .pct { color: var(--text); font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--pill); font-weight: 650; font-size: 1rem; font-family: inherit;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; text-align: center;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--btn-shadow); }
.btn-primary:hover { color: var(--btn-fg); transform: translateY(-2px); filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: .88rem; }

/* ============ Главная ============ */
.hero { position: relative; padding: 104px 28px 96px; overflow: hidden; isolation: isolate; background: var(--bg); }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .7;
}
.hero::before { width: 680px; height: 560px; right: -160px; top: -200px; background: radial-gradient(circle at 40% 40%, rgba(212, 176, 106, .38), transparent 62%); }
.hero::after { width: 520px; height: 420px; left: -200px; bottom: -220px; background: radial-gradient(circle, rgba(212, 176, 106, .16), transparent 65%); }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  color: var(--text-2); font-weight: 600; font-size: .85rem; margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.hero h1 span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.18rem; color: var(--text-2); max-width: 580px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 0; margin-top: 52px; flex-wrap: wrap; }
.hero-stats > div { padding: 0 28px; border-left: 1px solid var(--border); }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.hero-stats span { color: var(--text-3); font-size: .88rem; }

.hero-card {
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow-lg); position: relative;
}
.hero-card h4 { margin: 0 0 4px; font-size: 1.1rem; }
.hero-card .deal-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.hero-card .deal-row:last-of-type { border-bottom: 0; }
.hero-card .deal-row span { color: var(--text-2); }
.hero-card .deal-row b { font-variant-numeric: tabular-nums; }
.hero-card .deal-total { margin-top: 14px; padding: 18px; border-radius: var(--r); background: #26292e; color: #f5efe5; display: flex; justify-content: space-between; align-items: center; }
.hero-card .deal-total .muted { color: rgba(245, 239, 229, .6); }
.hero-card .deal-total b { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(100deg, #e3c98f, #c29a4e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.float-chip {
  position: absolute; padding: 10px 16px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-weight: 650; font-size: .85rem; display: flex; gap: 8px; align-items: center;
  animation: float 5s ease-in-out infinite;
}
.float-chip.c1 { top: -20px; right: 24px; }
.float-chip.c2 { bottom: -22px; left: -24px; animation-delay: -2.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.section { padding: 96px 28px; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--text-2); font-size: 1.1rem; }
.section-alt { background: var(--bg-soft); }
.section.on-dark { background: var(--bg); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.kicker::before { content: ""; width: 28px; height: 1.5px; background: var(--accent-grad); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.module-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px;
  color: var(--text); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; overflow: hidden;
}
.module-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--accent)) 18%, transparent), transparent 70%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-2); color: var(--text); }
.module-card:hover::after { opacity: 1; }
.module-card .num { position: absolute; top: 20px; right: 24px; font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px var(--border-2); transition: -webkit-text-stroke-color .25s; }
.module-card:hover .num { -webkit-text-stroke-color: var(--gold); }
.module-card h3 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; }
.module-card p { color: var(--text-2); font-size: .95rem; margin: 0; flex: 1; }
.module-ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: #26292e; color: #d4b06a;
}
.module-ico svg { width: 24px; height: 24px; }
.module-card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.module-card .done-badge { position: absolute; top: 74px; right: 22px; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--pill); font-size: .76rem; font-weight: 600; background: var(--bg-soft); color: var(--text-2); white-space: nowrap; }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.gold { background: var(--gold-soft); color: var(--gold); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.blue { background: var(--info-soft); color: var(--info); }

.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; transition: box-shadow .25s; }
.feature:hover { box-shadow: var(--shadow); }
.feature h4 { margin: 0 0 8px; font-size: 1.1rem; }
.feature h4::before { content: ""; display: block; width: 36px; height: 4px; border-radius: var(--pill); background: var(--accent-grad); margin-bottom: 18px; }
.feature p { color: var(--text-2); margin: 0; font-size: .95rem; }

.steps { counter-reset: s; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.steps > div { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; }
.steps > div::before { content: "0" counter(s); display: block; font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 18px; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps h4 { margin: 0 0 6px; }
.steps p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* ============ Таблицы ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin: 1.4em 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; font-size: .8rem; color: var(--text-3); letter-spacing: .02em; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; background: var(--accent-soft); }
.dots { letter-spacing: 2px; color: var(--accent); white-space: nowrap; }
.dots i { color: var(--border-2); font-style: normal; }

/* ============ Макет урока ============ */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr) 230px; max-width: 1440px; margin: 0 auto; gap: 0; }
.sidebar {
  position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto;
  padding: 28px 16px 40px; border-right: 1px solid var(--border);
}
.sidebar-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin: 0 12px 12px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 12px; color: var(--text-2); font-weight: 550; font-size: .92rem; line-height: 1.3; transition: background .15s;
}
.side-link:hover { background: var(--bg-soft); color: var(--text); }
.side-link.active { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: var(--shadow-xs); }
.side-link.active .si { background: #26292e; color: #d4b06a; }
.side-link .si { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-soft); color: var(--accent); font-size: .78rem; font-weight: 700; }
.side-link .si svg { width: 16px; height: 16px; }
.side-link .sp { margin-left: auto; font-size: .74rem; color: var(--text-3); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.side-link .sp.full { color: var(--ok); }
.side-sep { height: 1px; background: var(--border); margin: 14px 12px; }

.content { padding: 44px 56px 100px; min-width: 0; }
.content-inner { max-width: 760px; margin: 0 auto; }
.toc { position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto; padding: 44px 20px; font-size: .86rem; }
.toc .sidebar-title { margin-left: 0; }
.toc a { display: block; padding: 6px 0 6px 14px; color: var(--text-3); border-left: 2px solid var(--border); line-height: 1.35; transition: color .15s; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--gold); font-weight: 650; }
.toc a.done::after { content: " ✓"; color: var(--ok); }

.module-hero {
  position: relative; border-radius: 28px; padding: 44px; margin-bottom: 48px; overflow: hidden; isolation: isolate;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
}
.module-hero::before {
  content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; right: -140px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 176, 106, .32), transparent 66%);
}
.module-hero .module-ico { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 20px; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.module-hero .module-ico svg { width: 28px; height: 28px; }
.module-hero .lesson-num { color: var(--accent); }
.module-hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 14px; }
.module-hero .lead { font-size: 1.12rem; color: var(--text-2); margin-bottom: 28px; max-width: 620px; }
.passport { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.passport > div { background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; }
.passport span { display: block; font-size: .74rem; color: var(--text-3); font-weight: 600; margin-bottom: 2px; }
.passport b { font-size: .98rem; font-weight: 700; }

.lesson { padding-top: 10px; margin-bottom: 64px; }
.lesson-num { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c, var(--accent)); margin-bottom: 10px; }
.lesson > .lesson-num::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.lesson > h2 { margin-bottom: .7em; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.lesson-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding: 14px 14px 14px 20px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.lesson-foot span { color: var(--text-2); font-size: .9rem; }
.mark-done.is-done { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.mark-done.is-done:hover { color: var(--ok); transform: none; }

/* ============ Блоки контента ============ */
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r); margin: 1.4em 0; }
.callout .ci { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.callout > div > :last-child { margin-bottom: 0; }
.callout b.t { display: block; margin-bottom: 4px; }
.callout.tip { background: var(--ok-soft); }
.callout.tip .ci { background: var(--ok); color: #fff; }
.callout.warn { background: var(--gold-soft); }
.callout.warn .ci { background: var(--gold); color: #fff; }
.callout.danger { background: var(--danger-soft); }
.callout.danger .ci { background: var(--danger); color: #fff; }
.callout.info { background: var(--info-soft); }
.callout.info .ci { background: var(--info); color: #fff; }

.case { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); margin: 1.8em 0; overflow: hidden; box-shadow: var(--shadow-xs); }
.case-head { padding: 16px 24px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; font-weight: 700; font-family: var(--font-head); letter-spacing: -.015em; }
.case-head .tag { margin-left: auto; font-family: var(--font); }
.case-body { padding: 20px 24px; }
.case-body > :last-child { margin-bottom: 0; }
.case .table-wrap { border: 0; border-radius: 0; margin: 0 -24px; background: transparent; }
.case .table-wrap table { min-width: 420px; }
.case td, .case th { padding-left: 24px; padding-right: 24px; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding: 11px 16px 11px 50px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin: 8px 0; cursor: pointer; user-select: none; transition: background .15s, border-color .15s; }
.checklist li:hover { border-color: var(--border-2); }
.checklist li::before { content: ""; position: absolute; left: 16px; top: 13px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-2); background: var(--surface); transition: all .15s; }
.checklist li.checked { background: var(--ok-soft); border-color: transparent; }
.checklist li.checked::before { background: var(--ok); border-color: var(--ok); }
.checklist li.checked::after { content: ""; position: absolute; left: 23px; top: 16px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 1.6em 0; counter-reset: f; }
.flow > div { position: relative; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); font-size: .9rem; counter-increment: f; }
.flow > div::before { content: counter(f); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c, var(--accent)); color: #fff; font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.flow > div b { display: block; margin-bottom: 2px; }
.flow > div span { color: var(--text-2); }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.4em 0; }
.pros-cons > div { border-radius: var(--r); padding: 20px 22px; border: 1px solid var(--border); background: var(--surface); }
.pros-cons h4 { margin-top: 0; }
.pros-cons .pros h4 { color: var(--ok); }
.pros-cons .cons h4 { color: var(--danger); }
.pros-cons ul { margin: 0; }

.formula { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; background: var(--surface-2); border: 1px solid var(--border); padding: 16px 20px; border-radius: var(--r); margin: 1.2em 0; font-size: .92rem; overflow-x: auto; position: relative; }
.formula::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, var(--accent)); }

.term { border-bottom: 1.5px dashed color-mix(in srgb, var(--accent) 70%, transparent); cursor: help; position: relative; }
.term-tip {
  position: absolute; z-index: 100; max-width: 300px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--on-ink);
  font-size: .85rem; line-height: 1.45; box-shadow: var(--shadow-lg); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.term-tip.show { opacity: 1; transform: translateY(0); }
.term-tip b { display: block; margin-bottom: 2px; }

.video-slot {
  aspect-ratio: 16 / 9; border-radius: var(--r-lg); border: 1px solid var(--border);
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c, var(--accent)) 10%, var(--surface-2)), var(--surface-2) 60%);
  display: grid; place-items: center; text-align: center; color: var(--text-3); margin: 1.4em 0 1.8em; font-size: .9rem;
}
.video-slot svg { width: 52px; height: 52px; margin: 0 auto 10px; color: var(--text-3); stroke-width: 1.5; }

/* ============ Калькулятор ============ */
.calc { border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); margin: 2.2em 0; overflow: hidden; }
.calc-head { padding: 18px 24px; display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.calc-head .module-ico { width: 40px; height: 40px; border-radius: 12px; }
.calc-head .module-ico svg { width: 20px; height: 20px; }
.calc-head b { display: block; font-family: var(--font-head); letter-spacing: -.015em; }
.calc-head span { font-size: .85rem; color: var(--text-2); }
.calc-body { display: grid; grid-template-columns: 1fr 1fr; }
.calc-inputs { padding: 22px 24px; display: grid; gap: 14px; align-content: start; }
.calc-inputs label { display: grid; gap: 6px; font-size: .84rem; font-weight: 550; color: var(--text-2); }
.calc-inputs .field { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; transition: border-color .15s, box-shadow .15s; }
.calc-inputs .field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); background: var(--surface); }
.calc-inputs input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; font-weight: 650; padding: 11px 0; font-variant-numeric: tabular-nums; }
.calc-inputs .unit { color: var(--text-3); font-size: .84rem; font-weight: 600; }
.calc-out { padding: 22px 24px; display: grid; gap: 6px; align-content: start; background: var(--surface-2); border-left: 1px solid var(--border); }
.calc-out .row { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; color: var(--text-2); padding: 7px 0; border-bottom: 1px solid var(--border); }
.calc-out .row b { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-out .big { margin-top: 10px; padding: 18px 20px; border-radius: var(--r); background: #26292e; color: #f5efe5; }
.calc-out .big span { font-size: .78rem; font-weight: 600; color: rgba(245, 239, 229, .6); letter-spacing: .02em; }
.calc-out .big b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, #e3c98f, #c29a4e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.calc-out .big.neg { background: var(--danger); }
.calc-out .big.neg span { color: rgba(255, 255, 255, .75); }
.calc-out .big.neg b { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.calc-out .verdict { margin-top: 6px; font-size: .88rem; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }

/* ============ Тест ============ */
.quiz { border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-lg); padding: 30px; margin: 2.4em 0; box-shadow: var(--shadow-xs); }
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.quiz-head h3 { margin: 0; font-size: 1.4rem; }
.quiz-score { margin-left: auto; font-weight: 600; color: var(--text-2); font-size: .88rem; padding: 6px 14px; border-radius: var(--pill); background: var(--bg-soft); }
.q { padding: 20px 0; border-top: 1px solid var(--border); }
.q p.qt { font-weight: 650; margin-bottom: 12px; }
.q .opts { display: grid; gap: 8px; }
.q button.opt {
  text-align: left; font: inherit; font-size: .95rem; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; transition: all .15s;
}
.q button.opt:hover:not(:disabled) { border-color: var(--text-3); background: var(--surface-2); }
.q button.opt.right { background: var(--ok-soft); border-color: var(--ok); font-weight: 650; }
.q button.opt.wrong { background: var(--danger-soft); border-color: var(--danger); }
.q button.opt:disabled { cursor: default; }
.q .explain { display: none; margin-top: 10px; font-size: .9rem; color: var(--text-2); padding: 12px 16px; border-radius: 12px; background: var(--bg-soft); }
.q.answered .explain { display: block; }

/* ============ Пагинация ============ */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; }
.pager a { display: block; padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: all .2s; }
.pager a:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.pager span { display: block; font-size: .8rem; color: var(--text-3); font-weight: 600; margin-bottom: 2px; }
.pager b { font-size: 1.05rem; font-family: var(--font-head); letter-spacing: -.02em; }
.pager .next { text-align: right; grid-column: 2; }

/* ============ Глоссарий ============ */
.gloss-search { width: 100%; padding: 16px 22px; font: inherit; font-size: 1.05rem; border-radius: var(--pill); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); outline: 0; margin-bottom: 28px; box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s; }
.gloss-search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.gloss-list { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.gloss-item { padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.gloss-item b { display: block; margin-bottom: 4px; font-family: var(--font-head); letter-spacing: -.015em; }
.gloss-item p { margin: 0; color: var(--text-2); font-size: .93rem; }

/* ============ Подбор стратегии ============ */
.picker { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 32px; box-shadow: var(--shadow-lg); }
.picker-q { margin-bottom: 22px; }
.picker-q > b { display: block; margin-bottom: 10px; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .9rem; font-weight: 550; padding: 9px 16px; border-radius: var(--pill); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--text-3); }
.chip.on { background: #26292e; border-color: #26292e; color: #f5efe5; }
.picker-result { margin-top: 10px; display: grid; gap: 10px; }
.pick { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); transition: border-color .15s; }
.pick:hover { color: var(--text); border-color: var(--border-2); }
.pick .module-ico { width: 42px; height: 42px; border-radius: 12px; flex: none; }
.pick .module-ico svg { width: 22px; height: 22px; }
.pick small { display: block; color: var(--text-2); font-size: .85rem; }
.pick .score { margin-left: auto; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ============ Футер ============ */
.footer { padding: 48px 28px; background: var(--bg); color: var(--text-3); font-size: .86rem; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer b { color: var(--text); }
.disclaimer { max-width: 720px; }

/* ============ Анимации появления ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ YouTube ============ */
.video-slot.has-video { border: 0; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.video-slot.has-video::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .6)); }
.video-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; background: none; border: 0; color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.yt-play svg { width: 72px; height: 72px; color: #fff; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5)); transition: transform .2s; }
.yt-play:hover svg { transform: scale(1.08); }

/* ============ Тарифы ============ */
.price-card { position: relative; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 32px; }
.price-card.featured { background: var(--bg); border-color: var(--border); box-shadow: var(--shadow-lg); }
.price-card.featured .muted, .price-card.featured li { color: var(--text-2); }
.price-card.featured .price { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-card h3 { margin: 0; font-size: 1.15rem; }
.price-card .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.price-card .price small { font-size: 1rem; font-weight: 600; opacity: .6; }
.price-card ul { list-style: none; padding: 0; margin: 6px 0 8px; flex: 1; }
.price-card li { padding-left: 28px; position: relative; font-size: .95rem; margin: .5em 0; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft); }
.price-card li::after { content: ""; position: absolute; left: 5.5px; top: 8px; width: 4px; height: 7px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.price-card .ribbon { position: absolute; top: 28px; right: 28px; background: var(--accent-grad); color: #1e2024; font-size: .76rem; font-weight: 700; padding: 5px 12px; border-radius: var(--pill); }

/* ============ FAQ ============ */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--r); padding: 0 22px; background: var(--surface); transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 650; font-size: 1.05rem; position: relative; font-family: var(--font-head); letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); font-size: 1.2rem; font-weight: 400; color: var(--text); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding-bottom: 18px; margin: 0; }

/* ============ Адаптив ============ */
@media (max-width: 1240px) {
  .layout { grid-template-columns: 270px minmax(0, 1fr); }
  .toc { display: none; }
  .content { padding: 40px 40px 90px; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 56px; }
  .hero-card { max-width: 480px; }
}
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .topbar-nav { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 68px; left: 0; bottom: 0; width: 300px; max-width: 86vw; height: auto; z-index: 40;
    background: var(--bg); transform: translateX(-100%); transition: transform .3s ease; box-shadow: var(--shadow-lg);
  }
  body.menu-open .sidebar { transform: none; }
  body.menu-open::after { content: ""; position: fixed; inset: 68px 0 0 0; background: rgba(24, 24, 27, .3); backdrop-filter: blur(2px); z-index: 30; }
  .content { padding: 28px 16px 80px; }
  .passport { grid-template-columns: repeat(2, 1fr); }
  .calc-body { grid-template-columns: 1fr; }
  .calc-out { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .progress-pill .bar { width: 56px; }
  .progress-pill .lbl { display: none; }
  .hero { padding: 56px 16px 56px; }
  .section { padding: 64px 16px; }
  .grid-2, .grid-3, .grid-4, .steps, .gloss-list, .pros-cons { grid-template-columns: 1fr; }
  .module-hero { padding: 28px 20px; border-radius: 22px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .float-chip.c2 { left: 10px; }
  .quiz, .picker { padding: 22px; }
  .price-card { padding: 26px; }
  .hero-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; }
  .hero-stats > div { padding: 0 14px; }
  .hero-stats b { font-size: 1.6rem; }
  .hero-stats span { font-size: .76rem; }
  .lesson-foot { border-radius: 18px; }
  .btn { padding: 13px 22px; }
}

/* ============ Фирменные детали ============ */
.gold-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.hero .btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.on-dark .steps > div { background: var(--bg-soft); border-color: var(--border); }
.on-dark .section-head p { color: var(--text-2); }
.footer .brand { color: var(--text); margin-bottom: 10px; }
.footer-inner { align-items: flex-start; }
:root[data-theme="dark"] .module-ico { background: var(--accent-soft); color: var(--accent); }

.hero-card.on-light { background: var(--surface); backdrop-filter: none; border-color: transparent; }
