/* «Ультра Новый Завет» — zavet.sashakit.ru
   Мир: ночной лист. Тёплая бумага на чернильной тьме; канон холоден, твоя
   версия тепла — цвет несёт смысл разворота, а не украшает его.
   Сцена использования: вечер, человек один, читает подолгу. */

:root {
  /* ground */
  --ink:        #0a0908;
  --ink-2:      #100e0c;
  --ink-3:      #171412;
  --rule:       rgba(232, 224, 210, 0.13);
  --rule-soft:  rgba(232, 224, 210, 0.07);

  /* paper — тёплая сторона: голос книги, обращённый к читателю */
  --paper:      #e8e0d2;
  --paper-dim:  #ab9f8b;
  --paper-faint:#8c8274;

  /* canon — холодная сторона: текст, общий для всех */
  --canon:      #b9c2cc;
  --canon-dim:  #79828d;

  /* accent */
  --gold:       #d9a441;
  --gold-soft:  rgba(217, 164, 65, 0.16);
  --gold-line:  rgba(217, 164, 65, 0.42);
  --alarm:      #d97a5c;

  --pad:  clamp(20px, 5vw, 72px);
  --max:  1220px;
  --read: 68ch;

  --serif:  'Cormorant Garamond', 'Times New Roman', serif;
  --book:   'Literata', Georgia, 'Times New Roman', serif;
  --ui:     'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: rgba(217, 164, 65, 0.35) var(--ink);
  scrollbar-width: thin;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* поверхности, которые мы не рисовали, но которые всё равно наши */
::selection { background: rgba(217, 164, 65, 0.28); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: rgba(217, 164, 65, 0.3);
  border: 3px solid var(--ink);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(217, 164, 65, 0.5); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
input, textarea { caret-color: var(--gold); }

a { color: inherit; text-decoration: none; }
a.link {
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s var(--ease);
}
a.link:hover { text-decoration-color: var(--gold); }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 780px; }

/* ------------------------------------------------------------ type */

h1, h2, h3 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.02em; }

.display {
  font-size: clamp(48px, 11vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.04;
  text-wrap: balance;
}
.h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.16; }

.lede {
  font-family: var(--book);
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.62;
  color: var(--paper);
  max-width: var(--read);
}
.muted { color: var(--paper-dim); }
.small {
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--paper-faint);
}
.label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 30px;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), background-color 0.25s var(--ease),
              box-shadow 0.35s var(--ease), border-color 0.25s var(--ease);
}
.btn-gold {
  background: var(--gold);
  color: #17120a;
  box-shadow: 0 10px 30px -14px rgba(217, 164, 65, 0.7);
}
.btn-gold:hover {
  background: #e8b452;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -16px rgba(217, 164, 65, 0.8);
}
.btn-ghost { border: 1px solid var(--rule); color: var(--paper); }
.btn-ghost:hover { border-color: var(--gold-line); background: rgba(217, 164, 65, 0.06); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 9, 8, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--rule-soft);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.nav-title {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.01em;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 13px; color: var(--paper-dim); transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--paper); }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }
.nav-cta {
  color: var(--gold) !important;
  border: 1px solid var(--gold-line);
  padding: 9px 18px;
  border-radius: 2px;
  transition: background-color 0.2s var(--ease);
}
.nav-cta:hover { background: var(--gold-soft); }

/* ------------------------------------------------------------ ряд действий (Зеркало, читалка) */

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }

/* ------------------------------------------------------------ sections */

section { padding: clamp(64px, 10vh, 128px) 0; }
.section-head { margin-bottom: clamp(34px, 5vw, 64px); max-width: 30ch; }
.section-head p { margin-top: 18px; max-width: 56ch; }
.rule { height: 1px; background: var(--rule-soft); }

/* ------------------------------------------------------------ издания (цена) */

.editions { border-top: 1px solid var(--rule); }
.edition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto;
  gap: clamp(18px, 3vw, 44px);
  padding: clamp(28px, 3.5vw, 44px) 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
@media (max-width: 820px) { .edition { grid-template-columns: 1fr; gap: 18px; } }
.edition-name { font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); line-height: 1; }
.edition-line { margin-top: 10px; font-size: 14.5px; color: var(--paper-dim); max-width: 30ch; }
.edition-features { display: grid; gap: 9px; }
.edition-features li { list-style: none; display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--paper-dim); }
.edition-features svg { margin-top: 6px; color: var(--gold); }
.edition-buy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 190px; }
.price { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 42px); line-height: 1; font-variant-numeric: tabular-nums; }
.price-skeleton {
  display: inline-block;
  width: 5ch;
  height: 0.72em;
  background: linear-gradient(90deg, var(--ink-3), var(--ink-2), var(--ink-3));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 2px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.edition-featured { background: linear-gradient(180deg, rgba(217, 164, 65, 0.05), transparent 70%); }

/* ------------------------------------------------------------ footer */

.footer { padding: clamp(40px, 6vh, 72px) 0; border-top: 1px solid var(--rule-soft); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: baseline; }
.footer a { color: var(--paper-dim); font-size: 14px; }
.footer a:hover { color: var(--paper); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }

/* ------------------------------------------------------------ формы: Зеркало и настройка */

.q-stage { padding: clamp(46px, 9vh, 96px) 0 clamp(60px, 10vh, 120px); }
.q-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 34px;
}
.q-progress i {
  display: block;
  height: 2px;
  width: clamp(48px, 9vw, 90px);
  background: var(--rule);
  transition: background-color 0.4s var(--ease);
}
.q-progress i.done { background: var(--gold); }
.q-block { max-width: 680px; }
.q-block h2 { margin-bottom: 8px; font-size: clamp(26px, 3.4vw, 40px); }
.q-hint { color: var(--paper-faint); font-size: 14.5px; margin-bottom: 26px; max-width: 54ch; }

.field { margin-bottom: 30px; }
.field > label {
  display: block;
  font-family: var(--book);
  font-size: 19px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.field .field-hint { display: block; font-size: 13.5px; color: var(--paper-faint); margin-bottom: 14px; max-width: 52ch; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 15px 17px;
  color: var(--paper);
  font-family: var(--book);
  font-size: 16.5px;
  line-height: 1.6;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
input::placeholder, textarea::placeholder { color: #8b8274; }
input:focus, textarea:focus { outline: none; border-color: var(--gold-line); background: var(--ink-3); }
textarea { min-height: 148px; resize: vertical; }

.choices { display: grid; gap: 8px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 18px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.45;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.choice:hover { border-color: rgba(217, 164, 65, 0.3); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice .mark {
  flex: none;
  width: 16px; height: 16px;
  margin-top: 4px;
  border: 1px solid var(--paper-faint);
  border-radius: 50%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.choice.is-multi .mark { border-radius: 2px; }
.choice:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.choice:has(input:checked) .mark { border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--gold); }
.choice:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

.form-error {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(217, 122, 92, 0.5);
  border-radius: 2px;
  color: #eab9a7;
  font-size: 14.5px;
  background: rgba(217, 122, 92, 0.08);
}
.form-error:empty { display: none; }

/* ------------------------------------------------------------ ожидание отклика */

.waiting { max-width: 560px; padding: clamp(60px, 14vh, 140px) 0; }
.waiting h2 { margin-bottom: 18px; }
.waiting-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  font-size: 14.5px;
  color: var(--paper-dim);
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.7s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* ------------------------------------------------------------ отклик и текст главы */

.reading {
  font-family: var(--book);
  font-size: 18px;
  line-height: 1.82;
  max-width: var(--read);
}
.reading p + p { margin-top: 1.1em; }
.reading h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35em;
  margin: 1.6em 0 0.5em;
  color: var(--paper);
}
.reading.has-dropcap p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: 0.8;
  float: left;
  padding: 0.05em 0.12em 0 0;
  color: var(--gold);
}

/* ------------------------------------------------------------ читалка */

.reader-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
@media (max-width: 960px) { .reader-shell { grid-template-columns: 1fr; } }
.reader-aside {
  border-right: 1px solid var(--rule-soft);
  padding: 26px var(--pad) 60px;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}
@media (max-width: 960px) {
  .reader-aside {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--rule-soft);
    padding: 22px var(--pad) 6px;
  }
}
.reader-main { padding: clamp(34px, 6vh, 72px) var(--pad) 120px; min-width: 0; }
.reader-main .reading { margin: 0 auto; }

.ch-nav { margin-top: 20px; }
.ch-nav > summary { display: none; }
.ch-list { margin-top: 2px; display: grid; gap: 2px; }
@media (max-width: 960px) {
  .ch-nav > summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 14px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--serif);
    font-size: 20px;
    border-top: 1px solid var(--rule-soft);
  }
  .ch-nav > summary::-webkit-details-marker { display: none; }
  .ch-nav > summary::after {
    content: "+";
    font-size: 22px;
    line-height: 1;
    color: var(--gold);
    transition: transform 0.3s var(--ease);
  }
  .ch-nav[open] > summary::after { transform: rotate(45deg); }
  .ch-nav-count { font-family: var(--ui); font-size: 12.5px; color: var(--paper-faint); margin-left: auto; }
}
.ch-link {
  display: grid;
  grid-template-columns: 2em 1fr;
  gap: 10px;
  padding: 9px 10px 9px 0;
  border-radius: 2px;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--paper-dim);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
  text-align: left;
  width: 100%;
}
.ch-link:hover { color: var(--paper); background: rgba(232, 224, 210, 0.04); }
.ch-link[aria-current="true"] { color: var(--paper); }
.ch-link[aria-current="true"] .ch-num { color: var(--gold); }
.ch-num { font-family: var(--serif); font-variant-numeric: tabular-nums; color: var(--paper-faint); }
.ch-link.locked { color: var(--paper-faint); cursor: default; }
.ch-link.locked:hover { background: none; color: var(--paper-faint); }

.chapter-head { margin-bottom: clamp(26px, 4vh, 44px); max-width: var(--read); }
.chapter-head h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.02; margin: 8px 0 14px; }

.tune-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 36px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
  max-width: var(--read);
}
.tune-bar .label { margin-right: 6px; }
.chip {
  padding: 9px 16px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 13.5px;
  color: var(--paper-dim);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.chip:hover { border-color: var(--gold-line); color: var(--paper); }
.chip[aria-pressed="true"] { border-color: var(--gold); color: var(--paper); background: var(--gold-soft); }

.talk { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule-soft); max-width: var(--read); }
.talk-log { display: grid; gap: 18px; margin-bottom: 22px; }
.talk-msg { font-family: var(--book); font-size: 16.5px; line-height: 1.7; }
.talk-msg.from-me { color: var(--paper-dim); padding-left: 16px; border-left: 1px solid var(--rule); }
.talk-form { display: grid; gap: 12px; }
.talk-locked {
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--paper-dim);
  font-size: 15px;
}

.empty {
  padding: clamp(40px, 8vh, 90px) 0;
  max-width: 54ch;
  color: var(--paper-dim);
}
.empty h3 { color: var(--paper); margin-bottom: 12px; }

/* ============================================================ заглавная (редакция 3, 26.09.2026)
   Мир: затемнённый зал, текст как проекция на стене. Одна палитра — графит и свет,
   один акцент — красно-оранжевый свет диода, только на действии. Один шрифт.
   Никаких фонов, рамок, значков и тонов глав: тона живут в читалке /kniga/.
   Всё ниже ограничено body.home, Зеркало и читалка не затронуты. */

.home {
  --ink:        #0b0b0c;
  --ink-2:      #121214;
  --ink-3:      #1a1a1d;
  --paper:      #ecebe6;
  --paper-dim:  #a3a19b;
  --paper-faint:#85837e;
  --rule:       rgba(236, 235, 230, 0.14);
  --rule-soft:  rgba(236, 235, 230, 0.08);
  --gold:       #ff5a36;           /* акцент: свет диода */
  --gold-hover: #ff7352;
  --gold-soft:  rgba(255, 90, 54, 0.14);
  --gold-line:  rgba(255, 90, 54, 0.5);

  --serif: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --book:  var(--serif);
  --ui:    var(--serif);
  --max:   1180px;
  --pad:   clamp(22px, 6vw, 88px);
  --gap-section: clamp(104px, 18vh, 200px);

  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
}
html:has(body.home) { background: #0b0b0c; scrollbar-color: #3a3a3e #0b0b0c; }
.home ::selection { background: rgba(255, 90, 54, 0.32); color: #fff; }
.home :focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
html:has(body.home)::-webkit-scrollbar-thumb { background: #3a3a3e; border-color: #0b0b0c; }
html:has(body.home)::-webkit-scrollbar-track { background: #0b0b0c; }

.home h1, .home h2, .home h3 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.02em; }
.home .num { font-variant-numeric: tabular-nums; }
.home .note { font-size: 14px; line-height: 1.55; color: var(--paper-faint); max-width: 60ch; }
.home a.link { text-decoration-color: var(--rule); }
.home a.link:hover { text-decoration-color: var(--paper); }
.home section { padding: var(--gap-section) 0 0; }

/* кнопки: одна форма, акцент только у главного действия */
.home .btn {
  padding: 17px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  box-shadow: none;
}
.home .btn-gold { background: var(--gold); color: #0b0b0c; box-shadow: none; }
.home .btn-gold:hover { background: var(--gold-hover); transform: none; box-shadow: none; }
.home .btn-gold:active { transform: scale(0.98); }
.home .btn svg.arrow { flex: none; }
.home .btn-ghost { border: 1px solid var(--rule); color: var(--paper); }
.home .btn-ghost:hover { border-color: var(--paper-dim); background: transparent; }

.home .head {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
  margin-bottom: clamp(36px, 5vw, 64px);
  max-width: 22ch;
  text-wrap: balance;
}

/* ------------------------------------------------------------ верх */

.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.top .wrap { display: flex; justify-content: flex-end; padding-top: 22px; }
.top-link {
  font-size: 14px;
  color: var(--paper-dim);
  padding: 8px 0;
  transition: color 0.2s var(--ease);
}
.top-link:hover { color: var(--paper); }

/* ------------------------------------------------------------ первый экран */

.first {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 104px 0 clamp(56px, 11vh, 120px);
}
.first-title {
  font-size: clamp(3.4rem, 10.4vw, 8.25rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 300;
}
.first-title .rise { display: block; }
/* Название жирным, подпись «или как подружиться с роботом» (Саша, 17.10.2026). .home h1 весит больше .first-title, поэтому с .home. */
.home .first-title { font-weight: 700; }
/* Подзаголовок книги, маленькими буквами под названием (Саша, 16.10.2026): название без него читается как религиозный текст. */
.first-sub {
  margin-top: clamp(10px, 1.4vw, 18px);
  font-size: clamp(17px, 1.9vw, 26px);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--paper-dim);
}
.first-author {
  margin-top: clamp(18px, 2.4vw, 28px);
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--paper-dim);
}
.first-claim {
  margin-top: clamp(44px, 8vh, 88px);
  max-width: 28ch;
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.3;
  font-weight: 300;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.first-act {
  margin-top: clamp(32px, 5vh, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}
.first-act .note { max-width: 34ch; }

/* один авторский момент: текст проявляется, как свет проектора */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s var(--ease) both; }
  .first-title .rise:nth-child(2) { animation-delay: 0.12s; }
  .first-sub.rise    { animation-delay: 0.16s; }
  .first-author.rise { animation-delay: 0.2s; }
  .first-claim.rise  { animation-delay: 0.3s; }
  .first-act.rise    { animation-delay: 0.42s; }
}
@keyframes rise {
  from { opacity: 0.35; transform: translateY(8px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ------------------------------------------------------------ мысль */

.thought-main {
  max-width: 17ch;
  font-size: clamp(34px, 5.4vw, 76px);
  line-height: 1.06;
  font-weight: 300;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.thought-sub {
  margin-top: clamp(24px, 3vw, 40px);
  max-width: 30ch;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.35;
  font-weight: 300;
  color: var(--paper-dim);
  text-wrap: pretty;
}

/* ------------------------------------------------------------ три главы */

.ch { list-style: none; border-bottom: 1px solid var(--rule); }
.ch li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 5.5em;
  gap: clamp(16px, 3vw, 48px);
  align-items: baseline;
  padding: clamp(26px, 3.2vw, 40px) 0;
  border-top: 1px solid var(--rule);
}
.ch-title { font-size: clamp(26px, 3vw, 40px); line-height: 1.08; text-wrap: balance; }
.ch-line { font-size: 17px; line-height: 1.55; color: var(--paper-dim); max-width: 46ch; }
.ch-days { font-size: 14px; color: var(--paper-faint); text-align: right; white-space: nowrap; }
/* иллюстрации глав (27.09.2026): тихая миниатюра слева, на телефоне - над названием */
.ch li:has(.ch-img) { grid-template-columns: clamp(120px, 14vw, 200px) minmax(0, 1fr) minmax(0, 1.15fr) 5.5em; align-items: center; }
.ch-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #e4e2dc; }
@media (max-width: 760px) {
  .ch li { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .ch-line { grid-column: 1 / -1; grid-row: 2; }
  .ch-days { grid-column: 2; grid-row: 1; }
  .ch li:has(.ch-img) { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .ch li:has(.ch-img) .ch-img { grid-column: 1 / -1; grid-row: 1; margin-bottom: 8px; aspect-ratio: 16 / 9; }
  .ch li:has(.ch-img) .ch-title { grid-row: 2; }
  .ch li:has(.ch-img) .ch-days { grid-row: 2; }
  .ch li:has(.ch-img) .ch-line { grid-row: 3; }
}

/* оглавление: одна тихая ссылка, внутри только названия */
.toc { margin-top: 28px; }
.toc summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--paper-dim);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary:hover { color: var(--paper); }
.toc summary::after,
.faq summary::after {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.35s var(--ease);
}
.toc[open] summary::after,
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.toc-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px clamp(24px, 4vw, 56px);
  padding: 28px 0 8px;
}
@media (max-width: 860px) { .toc-body { grid-template-columns: 1fr; } }
.toc-group h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  margin-bottom: 12px;
}
.toc-group h3 span { display: block; font-weight: 400; color: var(--paper-faint); font-size: 13.5px; }
.toc-group ol { padding-left: 2.1em; font-size: 15px; line-height: 1.85; color: var(--paper-dim); }
.toc-group li::marker { color: var(--paper-faint); font-variant-numeric: tabular-nums; font-size: 13.5px; }

/* ------------------------------------------------------------ как это работает */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
}
.steps li { counter-increment: step; border-top: 1px solid var(--rule); padding-top: 22px; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 26px;
  font-size: 14px;
  color: var(--paper-faint);
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: clamp(21px, 1.9vw, 25px); font-weight: 400; line-height: 1.2; margin-bottom: 10px; }
.steps p { font-size: 16.5px; line-height: 1.55; color: var(--paper-dim); max-width: 32ch; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 36px; } .steps li::before { margin-bottom: 14px; } }

/* ------------------------------------------------------------ пример: одна фраза, два человека */

.proof-who { display: block; font-size: 14px; font-weight: 500; color: var(--paper-faint); margin-bottom: 14px; }
.proof-canon { max-width: 64ch; font-size: 16px; line-height: 1.6; color: var(--paper-faint); }
.proof-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 80px);
  margin: clamp(40px, 5vw, 64px) 0 clamp(28px, 3vw, 40px);
}
.proof-one { border-top: 1px solid var(--rule); padding-top: 24px; }
.proof-one blockquote {
  font-size: clamp(21px, 2.1vw, 28px);
  line-height: 1.4;
  font-weight: 300;
  letter-spacing: -0.01em;
  max-width: 30ch;
  text-wrap: pretty;
}
@media (max-width: 760px) { .proof-pair { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ издания */

.home .editions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px);
  border-top: 0;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.home .edition {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
  border-bottom: 0;
  background: none;
}
.home .edition-name { font-family: var(--ui); font-size: 16px; font-weight: 500; line-height: 1.3; }
.home .price { margin-top: 18px; font-family: var(--ui); font-weight: 300; font-size: clamp(38px, 4vw, 52px); letter-spacing: -0.03em; }
.home .edition-line { margin-top: 14px; font-size: 16.5px; line-height: 1.45; color: var(--paper); max-width: 28ch; }
.home .edition-features {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 18px 0 28px;
  padding: 0;
}
.home .edition-features li {
  display: block;
  list-style: none;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--paper-faint);
}
.home .edition-features .edition-limit { color: var(--paper-dim); }
@media (max-width: 900px) { .home .editions { grid-template-columns: 1fr; gap: 56px; } }

/* ------------------------------------------------------------ вопросы */

.home .faq .wrap > * { max-width: 780px; }
.home .faq details { border-top: 1px solid var(--rule); border-bottom: 0; padding: 0; }
.home .faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.home .faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--ui);
  font-size: clamp(17px, 1.5vw, 19px);
  cursor: pointer;
  list-style: none;
}
.home .faq summary::-webkit-details-marker { display: none; }
.home .faq summary::after { color: var(--paper-faint); }
.home .faq summary:hover::after { color: var(--paper); }
.home .faq details p { margin: -4px 0 24px; max-width: 62ch; font-size: 16px; color: var(--paper-dim); }

/* ------------------------------------------------------------ финал и подвал */

.last { padding-bottom: var(--gap-section) !important; }
.last-line {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  font-weight: 300;
  letter-spacing: -0.03em;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.foot { border-top: 1px solid var(--rule-soft); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14px; color: var(--paper-faint); }
.foot a { color: var(--paper-dim); transition: color 0.2s var(--ease); }
.foot a:hover { color: var(--paper); }

/* Светлый вариант главной (body.home.svet) — на выбор Саши, 27.09.2026 */
.home.svet {
  --ink:        #f6f5f1;
  --ink-2:      #efeee9;
  --ink-3:      #e6e4de;
  --paper:      #121214;
  --paper-dim:  #56544f;
  --paper-faint:#7c7a74;
  --rule:       rgba(18, 18, 20, 0.12);
  --rule-soft:  rgba(18, 18, 20, 0.07);
  --gold:       #e8471f;
  --gold-hover: #d33c16;
  --gold-soft:  rgba(232, 71, 31, 0.10);
  --gold-line:  rgba(232, 71, 31, 0.45);
}
html:has(body.home.svet) { background: #f6f5f1; scrollbar-color: #c9c7c0 #f6f5f1; }
.home.svet .btn-gold { color: #fff; }

/* ——— Светлая главная: декор — только отражённый свет (идея Саши 27.09.2026) ———
   Цвет света --amb/--amb2 (r,g,b) ставит landing.js по местному времени посетителя:
   рассвет — персик, утро — золото, день — холодный белый, закат — янтарь, вечер — сирень, ночь — синь.
   Кнопка — матовая светлая плашка, за которой светит этот свет. Других цветов на странице нет. */
.home.svet { --amb: 255, 196, 140; --amb2: 255, 150, 170; --gold: #121214; --gold-hover: #121214; }
/* свет отражённый (Саша, 30.09.2026): источник за краем экрана, на страницу ложится мягкая полоса отсвета, без пятен на тексте */
.home.svet::before {
  content: ""; position: fixed; top: -15vh; right: -46vw; width: 70vw; height: 130vh; pointer-events: none; z-index: 0;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--amb), .42), rgba(var(--amb2), .12) 60%, transparent 75%);
  filter: blur(26px); transition: background 60s linear;
}
.home.svet::after {
  content: ""; position: fixed; bottom: -30vh; left: -40vw; width: 60vw; height: 70vh; pointer-events: none; z-index: 0;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--amb2), .16), transparent 72%);
  filter: blur(30px); transition: background 60s linear;
}
.home.svet > * { position: relative; z-index: 1; }
/* Кнопка — глухая белая плашка; свет не светит из-за неё, а мягко отражается под ней. */
.home.svet .btn-gold {
  position: relative; color: #121214; background: #fff; border: 0;
  box-shadow:
    0 0 0 1px rgba(18, 18, 20, .06),
    0 1px 2px rgba(18, 18, 20, .05),
    0 12px 26px -12px rgba(var(--amb), .95);
  transition: box-shadow .6s ease, transform .2s ease;
}
.home.svet .btn-gold:hover {
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(18, 18, 20, .08),
    0 1px 2px rgba(18, 18, 20, .06),
    0 14px 30px -12px rgba(var(--amb), 1);
}
.home.svet ::selection { background: rgba(var(--amb), .45); }
@media (prefers-reduced-motion: reduce) { .home.svet::before, .home.svet::after { transition: none; } }
.home.svet .btn-ghost { background: #fff; border: 0; color: #121214;
  box-shadow: 0 0 0 1px rgba(18, 18, 20, .06), 0 10px 22px -14px rgba(var(--amb), .7); }
.home.svet .btn-ghost:hover { background: #fff; box-shadow: 0 0 0 1px rgba(18, 18, 20, .08), 0 12px 26px -14px rgba(var(--amb), .9); }

/* ——— Зеркало в светлом мире главной (body.home.svet.zerkalo), 30.09.2026 ———
   Пошагово: один вопрос на экран, на телефоне вопрос виден сразу под шапкой. */
.zerkalo { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.zerkalo main { flex: 1 0 auto; }
.zerkalo main section { padding: 0; }
.z-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.z-title { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.z-nav { display: flex; align-items: center; gap: 18px; }
.z-count { font-size: 14px; color: var(--paper-faint); }

.zerkalo .q-stage { padding: clamp(20px, 5vh, 64px) 0 clamp(48px, 8vh, 96px); }
.zerkalo .q-progress { gap: 6px; margin-bottom: clamp(28px, 5vh, 48px); max-width: 280px; }
.zerkalo .q-progress i { flex: 1; width: auto; height: 3px; border-radius: 3px; background: var(--rule); }
.zerkalo .q-progress i.done { background: var(--paper-dim); }
.zerkalo .q-progress i.now { background: var(--paper); }
.zerkalo .q-block { max-width: 620px; }
.zerkalo .q-hint { font-size: 15px; line-height: 1.55; color: var(--paper-dim); margin-bottom: 28px; max-width: 46ch; }
.zerkalo .q-hint[hidden], .zerkalo .q-back[hidden] { display: none; }

.zerkalo .field { margin-bottom: 0; }
.zerkalo .field > label {
  font-family: var(--ui); font-weight: 300; font-size: clamp(28px, 7vw, 44px);
  line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 12px; text-wrap: balance;
}
.zerkalo .field .field-hint { font-size: 15px; color: var(--paper-faint); margin-bottom: 18px; }
.zerkalo .field > label + .choices { margin-top: 22px; }

.zerkalo input[type="text"], .zerkalo input[type="email"], .zerkalo input[type="tel"], .zerkalo textarea {
  background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px;
  color: var(--paper); font-family: var(--ui); font-size: 18px; line-height: 1.5;
}
.zerkalo input:focus, .zerkalo textarea:focus { background: #fff; border-color: var(--paper-dim); }
.zerkalo input:focus-visible, .zerkalo textarea:focus-visible { outline: none; }
/* пример — заметно бледнее ответа, чтобы не казалось, что имя уже вписано */
.zerkalo input::placeholder, .zerkalo textarea::placeholder { color: rgba(18, 18, 20, 0.26); }

.zerkalo .choices { gap: 10px; }
.zerkalo .choice { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 17px 18px; font-size: 16.5px; }
.zerkalo .choice:hover { border-color: var(--paper-faint); }
.zerkalo .choice:has(input:checked) { background: #fff; border-color: var(--paper); box-shadow: 0 0 0 1px var(--paper); }
.zerkalo .choice .mark { margin-top: 3px; }

.zerkalo .q-actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.zerkalo .q-back { font-size: 14px; color: var(--paper-dim); padding: 12px 0; }
.zerkalo .q-back:hover { color: var(--paper); }
.zerkalo .q-note { margin-top: 18px; }
.zerkalo .form-error {
  margin: 16px 0 0; border-radius: 12px; border-color: rgba(200, 60, 25, 0.28);
  background: rgba(232, 71, 31, 0.06); color: #9c3515;
}

.zerkalo .waiting { padding: clamp(32px, 10vh, 120px) 0; }
.zerkalo [data-screen="echo"] { padding-top: clamp(20px, 5vh, 64px); }
.zerkalo [data-screen="offer"] { padding: clamp(56px, 10vh, 120px) 0; }
.zerkalo .edition-featured { background: none; }
.zerkalo .edition-features li span:first-child { display: none; }
.zerkalo .empty { padding: clamp(32px, 10vh, 120px) 0; }
.zerkalo .btn[hidden] { display: none; }
.zerkalo .q-progress { gap: 4px; }
/* «Дальше» у «можно несколько» не уезжает под варианты */
.zerkalo .q-actions { position: sticky; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 2; }

/* шкала согласия 1–7 (TIPI-RU) и профиль «Большой пятёрки» */
.scale-stem { display: block; font-size: 15px; color: var(--paper-faint); margin-bottom: 8px; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 26px; }
.scale-point { position: relative; display: flex; align-items: center; justify-content: center; height: 54px;
  border: 1px solid var(--rule); border-radius: 12px; background: #fff; cursor: pointer; font-size: 17px;
  font-variant-numeric: tabular-nums; transition: border-color .2s, background-color .2s, color .2s; }
.scale-point input { position: absolute; opacity: 0; width: 0; height: 0; }
.scale-point:hover { border-color: var(--paper-faint); }
.scale-point:has(input:checked) { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.scale-point:has(input:focus-visible) { outline: 2px solid var(--paper); outline-offset: 2px; }
.scale-ends { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--paper-faint); }
.profile { margin-bottom: clamp(40px, 7vh, 72px); padding-bottom: clamp(28px, 5vh, 48px); border-bottom: 1px solid var(--rule); }
.profile .label { margin-bottom: 22px; }
.trait + .trait { margin-top: 20px; }
.trait-top { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.trait-level { color: var(--paper-faint); font-size: 14px; white-space: nowrap; }
.trait-bar { height: 4px; margin: 8px 0; border-radius: 4px; background: var(--rule); overflow: hidden; }
.trait-bar i { display: block; height: 100%; border-radius: 4px; background: var(--paper); }
.trait-text { font-size: 14.5px; color: var(--paper-dim); line-height: 1.45; }
.trait-note { margin-top: 22px; }

/* телефон: главная без пустот между блоками (30.09.2026) */
@media (max-width: 760px) { .home { --gap-section: 76px; } }
