/* Стиль по слайдам курса Ивана («Foundation of meaning»):
   тёмно-зелёный + лайм для «обложек», светлый лист + оранжевый для содержания,
   рукописные номера, тонкая подпись «Иван Плотников» внизу. */
:root {
  --bg: #F2F3EF;
  --surface: #FFFFFF;
  --fg: #141712;
  --muted: #62675E;
  --line: #DCDED8;
  --accent: #E2621F;        /* оранжевый со слайдов: ключевые слова, номера */
  --accent-ink: #B04A12;    /* оранжевый для мелкого текста */
  --accent-soft: #F8E6D8;   /* персиковая плашка-вывод */
  --forest: #20321A;        /* фон обложек */
  --forest-2: #2A4122;
  --lime: #DDF57B;          /* акцент на зелёном */
  --on-forest: #F3F5EE;
  --on-forest-muted: #B6C2AA;
  --todo: #9A4B05;
  --todo-soft: #FBEEDB;
  --font-sans: "Manrope", "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #172413; --surface: #1F3019; --fg: #EEF2E8; --muted: #A9B59E; --line: #33472B;
    --accent: #DDF57B; --accent-ink: #DDF57B; --accent-soft: #2B4021;
    --forest: #0F190C; --forest-2: #1B2A16; --lime: #DDF57B; --on-forest: #F3F5EE; --on-forest-muted: #AEBBA2;
    --todo: #F0B35A; --todo-soft: #33260F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #172413; --surface: #1F3019; --fg: #EEF2E8; --muted: #A9B59E; --line: #33472B;
  --accent: #DDF57B; --accent-ink: #DDF57B; --accent-soft: #2B4021;
  --forest: #0F190C; --forest-2: #1B2A16; --lime: #DDF57B; --on-forest: #F3F5EE; --on-forest-muted: #AEBBA2;
  --todo: #F0B35A; --todo-soft: #33260F;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.6;
}
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; }

.band { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1080px; margin-inline: auto; }
.narrow { max-width: 760px; }

/* Шапка */
.top { padding-block: 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: -.01em; color: var(--fg); text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.brand .hand { font-family: var(--font-hand); font-weight: 700; font-size: 22px; color: var(--accent); }
.top nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--fg); }

/* Обложка: тёмно-зелёная, как первый слайд главы */
.cover { background: var(--forest); color: var(--on-forest); padding-block: 56px 48px; }
.cover .eyebrow { color: var(--on-forest-muted); }
.cover h1 em, .cover h2 em { color: var(--lime); }
.cover .lead { color: var(--on-forest-muted); }
.cover a:not(.btn) { color: var(--lime); }
.cover-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: start; }
.cover-num { font-family: var(--font-hand); font-weight: 700; color: var(--lime); font-size: clamp(72px, 14vw, 150px); line-height: .8; transform: translateY(6px); }
.cover-grid > div { min-width: 0; }
@media (max-width: 620px) { .cover-grid { grid-template-columns: 1fr; } .cover-num { font-size: 76px; } }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 10px; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.02em; margin: 0; }
h1 { font-weight: 800; font-size: clamp(32px, 6vw, 58px); line-height: 1.05; margin-bottom: 18px; max-width: 18ch; }
h2 { font-weight: 800; font-size: clamp(26px, 4vw, 38px); line-height: 1.12; margin-bottom: 14px; max-width: 24ch; }
h3 { font-weight: 700; font-size: 19px; line-height: 1.3; margin-bottom: 6px; letter-spacing: -.01em; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; max-width: 60ch; margin: 0 0 26px; text-wrap: pretty; }
p { margin: 0 0 14px; max-width: 66ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hand { font-family: var(--font-hand); font-weight: 700; }
.mark { display: inline-flex; gap: 10px; align-items: baseline; font-family: var(--font-hand); font-weight: 700; font-size: 24px; color: var(--lime); }
.mark::before { content: "✳"; font-family: var(--font-sans); font-size: 20px; }

section.block { padding-block: 64px 8px; }
section.block:last-of-type { padding-bottom: 64px; }

/* Кнопки */
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px;
  border-radius: 999px; font: 700 16px/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; background: var(--accent-ink); color: #fff;
}
.cover .btn { background: var(--lime); color: #1A2714; }
:root[data-theme="dark"] .btn:not(.ghost) { color: #1A2714; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost) { color: #1A2714; } }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.cover .btn.ghost { color: var(--on-forest); border-color: var(--forest-2); background: var(--forest-2); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: transform .15s, filter .15s; } .btn:hover { transform: translateY(-1px); filter: brightness(1.05); } }
.btn-note { font-size: 14px; color: var(--muted); }
.cover .btn-note { color: var(--on-forest-muted); }

/* Шаги со стрелками, как на слайдах «01 Our product → 02 Application» */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px 28px; list-style: none; margin: 24px 0 0; padding: 0; counter-reset: st; }
.steps li { counter-increment: st; position: relative; min-width: 0; }
.steps li::before { content: counter(st, decimal-leading-zero); font-family: var(--font-hand); font-weight: 700; font-size: 34px; line-height: 1; color: var(--accent); display: block; margin-bottom: 6px; }
.steps li p { font-size: 15px; color: var(--muted); margin: 0; }
.steps li h3 { font-size: 17px; }

/* Карточки */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card p { font-size: 15px; margin: 0; }
.card ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; }
.card li { margin-bottom: 6px; }

/* Плашка-вывод: персиковая, как «A strong final result…» */
.takeaway { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; font-weight: 600; max-width: 72ch; margin: 26px 0 0; }
.takeaway em { font-style: normal; color: var(--accent-ink); }

/* Ритм 3-3-3-6: дорожка монтажа */
.rhythm { display: flex; gap: 4px; margin: 26px 0 8px; max-width: 560px; }
.rhythm span { height: 40px; border-radius: 6px; background: var(--forest-2); display: grid; place-items: center; font: 700 13px var(--font-sans); color: var(--on-forest-muted); }
.rhythm span.hit { background: var(--lime); color: #1A2714; }
.rhythm-cap { font-size: 14px; color: var(--on-forest-muted); margin: 0; }

/* Программа марафона как таймлайн */
.timeline { list-style: none; margin: 26px 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline .tc { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.timeline p { font-size: 16px; margin: 4px 0 0; }
.timeline .task { font-size: 15px; color: var(--muted); }
.timeline .task b { color: var(--fg); font-weight: 600; }

/* Цена */
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; max-width: 560px; }
.price { font-weight: 800; font-size: clamp(36px, 6vw, 52px); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-top: 26px; align-items: stretch; }
.tariff { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tariff.hl { border: 2px solid var(--accent); }
.tariff .price { font-size: 34px; }
.tariff ul { margin: 0; padding-left: 18px; font-size: 15px; flex: 1; }
.tariff li { margin-bottom: 7px; }
.pill { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }

/* FAQ */
.faq { margin-top: 22px; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 16px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Сегменты */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 22px; }

/* Формы */
form.form { display: grid; gap: 18px; max-width: 640px; margin-top: 22px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="url"], input[type="tel"], textarea, select {
  font: 16px/1.4 var(--font-sans); padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.choices label { font-weight: 500; display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 15px; }
.choices input { accent-color: var(--accent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { margin-top: 4px; accent-color: var(--accent); }
.form-result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 640px; margin-top: 22px; }
.form-result pre { white-space: pre-wrap; font: 14px/1.5 var(--font-sans); background: var(--bg); padding: 14px; border-radius: 8px; margin: 12px 0; overflow-x: auto; }

/* Незаполненные данные из config.js */
.todo { background: var(--todo-soft); color: var(--todo); border: 1px dashed var(--todo); border-radius: 6px; padding: 0 6px; font-weight: 600; }

/* Подвал как на слайдах */
.foot { padding-block: 28px 40px; }
.foot .wrap { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--muted); }
.foot b { color: var(--fg); font-weight: 700; }
.foot a { color: var(--muted); }

/* Карта воронки (внутренняя страница) */
.map { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 0; }
.map > li { display: grid; grid-template-columns: 64px 1fr; gap: 0 18px; position: relative; padding-bottom: 22px; }
.map > li:not(:last-child)::after { content: ""; position: absolute; left: 31px; top: 54px; bottom: 4px; width: 2px; background: var(--line); }
.map .n { width: 64px; height: 54px; display: grid; place-items: center; font-family: var(--font-hand); font-weight: 700; font-size: 34px; color: var(--accent); }
.map .body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.map .body p { font-size: 15px; margin: 4px 0 0; }
.map .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.map .meta b { color: var(--fg); font-weight: 600; }
@media (max-width: 520px) { .map > li { grid-template-columns: 40px 1fr; gap: 0 10px; } .map .n { width: 40px; font-size: 28px; } .map > li:not(:last-child)::after { left: 19px; } }

.script { display: grid; gap: 12px; margin-top: 18px; max-width: 760px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 14px 16px; font-size: 15px; white-space: pre-line; min-width: 0; }
.msg .who { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; white-space: normal; }
.msg .kb { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; white-space: normal; }
.msg .kb span { font-size: 13px; font-weight: 600; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; background: var(--bg); }
.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
thead th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; max-width: 820px; }
.checklist li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 12px 42px; position: relative; font-size: 15px; }
.checklist li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border: 2px solid var(--accent); border-radius: 4px; }
code { font-size: .92em; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
