/* ==========================================================================
   mixento — общие стили лендинга (главная, «Кейсы», «Автопилот»)
   Палитра, сетка с крестиками, шапка, блоки главной, компоненты внутренних страниц.
   ========================================================================== */

:root {
  /* палитра v4 */
  --paper: #f3f1ec;     /* основной фон */
  --ink: #171715;       /* типографика */
  --signal: #f45132;    /* главный акцент */
  --cobalt: #2850f0;    /* дополнительный яркий */
  --butter: #f3d79e;    /* тёплые поверхности */
  --sage: #b6c4b1;      /* спокойные поверхности */
  --moss: #55694f;      /* акцент внутри текста: тёмный шалфей */
  --signal-ink: #c2381b; /* Signal для мелкого текста: 5:1 на бумаге */
  --concrete: #d2d0c9;  /* сетки, линии, разделители */

  --bg: var(--paper);
  --surface: var(--paper);
  --white: #fbfaf7;
  --gray: #6f6d66;        /* вторичный текст: 4,6:1 на бумаге */
  --text: #3a3935;
  --dark: var(--ink);
  --line: var(--concrete);
  --script: "Literata", Georgia, serif;
  --sans: "Onest", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --frame: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--sans); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

/* рамка страницы: две вертикальные линии по краям колонки */
.frame { max-width: var(--frame); margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); position: relative; }
.pad { padding-left: 56px; padding-right: 56px; }

/* горизонтальная линия с крестиками на концах */
.rule { position: relative; height: 0; border-top: 1px solid var(--line); }
.rule::before, .rule::after, .cell::before {
  content: ""; position: absolute; top: -6px; width: 11px; height: 11px; z-index: 2;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 11px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1px 11px no-repeat;
}
.rule::before { left: -6px; }
.rule::after { right: -6px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
.top .frame { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; }
.logo { display: inline-flex; justify-self: start; padding: 10px 0; color: var(--signal); }
.logo-mark { height: 22px; width: auto; display: block; }
.top nav { display: flex; gap: 28px; font-size: 14px; color: var(--text); }
.top nav a { display: inline-block; padding: 12px 0; }
.top nav a:hover { color: var(--ink); }
.top .go { justify-self: end; padding: 12px 0; font-size: 13px; color: var(--ink); }
.top .go::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-left: 8px; vertical-align: 1px; }
.top .go:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- первый экран: бумага, сетка в точку, ползающие точки ---------- */
.hero .frame {
  position: relative; min-height: calc(100vh - 64px); display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; border-color: var(--line); padding-top: 96px; padding-bottom: 64px;
  background: var(--paper);
}
/* сетка в точку и ползающие точки с лучами — один canvas */
.net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, rgba(0,0,0,.35) 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 70%, rgba(0,0,0,.35) 100%); }
.hero .tag, .hero-body { z-index: 1; }
/* заголовок во всю ширину колонки, под ним — абзац и кнопка в два столбца */
.hero-body { position: relative; color: var(--ink); display: flex; flex-direction: column; gap: 36px; }
/* кегль = меньшее из двух: по ширине колонки (строка «Твой канал» помещается)
   и по высоте окна (весь первый экран влезает без прокрутки) */
.hero h1 { margin: 0; font-weight: 600; line-height: .86; letter-spacing: -.065em;
  font-size: clamp(50px, min(calc((min(100vw, 1200px) - 112px) / 5.9), calc((100vh - 340px) / 2.05)), 167px); }
/* оптическое выравнивание: у крупных «Т» и «р» встроенный отступ слева ≈0,058 em —
   сдвигаем строки, чтобы краска встала на линию краски абзаца (у него ≈1,5 px) */
.hero h1 .grot { display: block; margin-left: calc(-0.059em + 1.5px); }
.hero h1 .script { margin-left: calc(-0.058em + 1.5px); display: block; font-family: var(--script); font-style: italic; font-weight: 400; font-size: 1.02em; letter-spacing: -.018em; word-spacing: -.02em; font-kerning: normal; font-feature-settings: "kern", "liga"; font-variation-settings: "opsz" 72; margin-bottom: .02em; }
.side { display: grid; grid-template-columns: minmax(0, 34em) auto; gap: 40px; justify-content: space-between; align-items: end; }
.side p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--text); }
.side p b { color: var(--ink); font-weight: 500; }
.brand { color: var(--signal-ink); font-weight: 500; }
.act { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 24px 0 20px;
  background: var(--signal); color: var(--ink); font: 500 15px/1 var(--sans); border-radius: 999px;
  transition: background .15s, color .15s;
}
.btn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn:hover::before { background: var(--signal); }
.hint { font-size: 13px; line-height: 1.45; color: var(--gray); }
.act .hint { text-align: right; }
.tag { position: absolute; top: 28px; left: 56px; right: 56px; display: flex; justify-content: space-between; font: 500 11px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gray); }

@media (max-width: 900px) {
  .side { grid-template-columns: 1fr; gap: 24px; }
  .act { align-items: flex-start; }
  .act .hint { text-align: left; }
}
@media (max-width: 720px) {
  .hero .frame { min-height: 0; padding-top: 120px; padding-bottom: 48px; }
  .hero h1 { font-size: calc((100vw - 32px) / 5.8); }
  .tag { left: 16px; right: 16px; }
  .tag span:last-child { display: none; }
}

/* ---------- зачем свой канал: одна строка — заголовок + три довода ---------- */
.why-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); border-top: 1px solid var(--line); }
.why-grid > * { position: relative; padding: 32px 28px 34px; border-right: 1px solid var(--line); min-height: 220px; display: flex; flex-direction: column; }
.why-grid > :last-child { border-right: 0; }
.why-grid > * + *::before {           /* крестики на пересечениях, как в «Как это работает» */
  content: ""; position: absolute; left: -6px; top: -6px; width: 11px; height: 11px; z-index: 2;
  background: linear-gradient(var(--ink), var(--ink)) center / 11px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1px 11px no-repeat;
}
.why-head h2 { margin: 0 0 auto; font-weight: 600; font-size: clamp(32px, 3.2vw, 46px); line-height: .98; letter-spacing: -.05em; }
.why-head p { margin: 24px 0 0; font-size: 15px; line-height: 1.45; color: var(--text); max-width: 22em; }
.why-item .n { font: 500 13px/1 var(--sans); color: var(--gray); letter-spacing: .02em; }
.why-item h3 { margin: auto 0 12px; font-weight: 600; color: var(--ink);
  font-size: clamp(24px, 2.2vw, 30px); line-height: 1.05; letter-spacing: -.02em; }
.why-item p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); max-width: 24em; }
/* subgrid: заголовки доводов стоят по нижнему краю на одной линии, тексты начинаются вровень (длинные реплики-заголовки) */
.why-grid { grid-template-rows: 1fr auto; }
.why-grid > * { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.why-head h2 { align-self: end; margin-bottom: 16px; }
.why-head p { margin-top: 0; }
.why-item h3 { align-self: end; margin: 0 0 16px; }
@media (max-width: 1000px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why-grid > * { min-height: 220px; border-bottom: 1px solid var(--line); }
  .why-grid > :nth-child(2n) { border-right: 0; }
  .why-grid > :nth-child(n+3) { border-bottom: 0; }
  .why-grid > * + *::before { display: none; }
}
@media (max-width: 720px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-grid > *, .why-grid > :nth-child(n+3) { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; padding: 28px 16px 30px; }
  .why-grid > :last-child { border-bottom: 0; }
  .why-grid { grid-template-rows: none; }
  .why-grid > * { display: flex; grid-row: auto; }
  .why-head h2 { margin-bottom: 0; }
  .why-head p { margin-top: 16px; }
  .why-item h3 { margin-top: 18px; margin-bottom: 16px; }
}

/* ---------- одна фраза: мостик перед «Как это работает» ---------- */
.statement { position: relative; isolation: isolate; background: var(--paper); padding-top: 160px; padding-bottom: 160px; }
.statement p { margin: 0; font-weight: 500; font-size: clamp(30px, 3.9vw, 54px); line-height: 1.12; letter-spacing: -.035em; max-width: 19em; }
.statement p span { color: var(--moss); font-family: var(--script); font-style: italic; font-weight: 600; font-size: 1em; letter-spacing: -.02em; font-variation-settings: "opsz" 72; }


/* шершавая поверхность блока-мостика (готовые бесшовные PNG, генератор — tools/make_paper.py).
   Два слоя: мягкие пятна камня и чёткое зерно бумаги. Мягкий свет — средний тон фона не меняется. */
.statement::before, .statement::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: soft-light;
}
.statement::before { background: url("paper-mottle.png") 0 0 / 800px 800px; opacity: .8; }
.statement::after  { background: url("paper-grain.png") 0 0 / 256px 256px; image-rendering: pixelated; opacity: .5; }

/* ---------- как работает ---------- */
.how-head { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end; padding-top: 120px; padding-bottom: 72px; }
.how-head h2, .terms h2 { margin: 0; font-weight: 600; font-size: clamp(44px, 5.6vw, 80px); line-height: .95; letter-spacing: -.05em; }
.how-head p { margin: 0; max-width: 26em; font-size: 17px; }

.cells { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.cell { position: relative; padding: 28px 28px 36px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 520px; }
.cell:last-child { border-right: 0; }
.cell:nth-child(2) { background: var(--butter); }
.cell:nth-child(4) { background: var(--sage); }
.cell:nth-child(2) p, .cell:nth-child(4) p { color: var(--ink); }
.cell:nth-child(2) .n, .cell:nth-child(4) .n { color: var(--ink); }
.cell:nth-child(4) .v-cal .days, .cell:nth-child(4) .v-cal .leg { color: var(--ink); }
.cell::before { left: -6px; }
.cell:first-child::before { display: none; }
.cell .n { font: 500 22px/1 var(--sans); letter-spacing: -.02em; color: var(--gray); }
.cell .vis { flex: 1; display: grid; place-items: center; padding: 28px 0; min-height: 230px; }
.cell h3 { margin: 0 0 12px; font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: -.045em; }
.cell p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--text); max-width: 22em; }

/* мини-визуалы */
.v-src { width: 100%; max-width: 230px; }
.v-src svg { width: 100%; height: auto; overflow: visible; }
.v-src text { font-family: var(--mono); font-size: 10.5px; fill: var(--ink); }

.v-drafts { width: 100%; max-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.v-drafts div { background: var(--white); border: 1px solid var(--line); padding: 10px 12px; font-size: 12.5px; line-height: 1.3; display: flex; justify-content: space-between; gap: 10px; }
.v-drafts div small { font: 400 11px/1.3 var(--mono); color: var(--gray); white-space: nowrap; }
.v-drafts div.on { border-color: var(--ink); background: var(--signal); box-shadow: 0 10px 24px -14px rgba(23,23,21,.5); transform: translateX(10px); }
.v-drafts div.on small { color: var(--ink); }

.v-edit { width: 100%; max-width: 230px; background: var(--white); border: 1px solid var(--line); padding: 14px; font-size: 12.5px; line-height: 1.55; }
.v-edit del { color: var(--gray); text-decoration-color: var(--signal); text-decoration-thickness: 2px; }
.v-edit ins { text-decoration: none; color: var(--ink); background: var(--butter); padding: 0 2px; }
.v-edit .say { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font: 400 11.5px/1.4 var(--mono); color: var(--gray); }
.v-edit .say b { font-weight: 400; color: var(--ink); }

/* «Как это работает»: переключатель «Авторский / Профильный» */
[hidden] { display: none !important; }
.how-side { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.how-switch { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; padding: 3px; background: var(--white); }
.how-switch button { min-height: 44px; padding: 0 20px; white-space: nowrap; border: 0; border-radius: 999px; background: none; font: 500 15px/1 var(--sans); color: var(--ink); cursor: pointer; letter-spacing: -.01em; }
.how-switch button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.how-switch button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.cell p a.more { color: var(--ink); border-bottom: 1px solid var(--signal); padding: 12px 0; white-space: nowrap; } /* ссылка на автопилот в шаге 03 профильного канала */
@media (max-width: 1000px) {
  .how-switch button { padding: 0 16px; font-size: 14px; }
}
@media (max-width: 720px) {
  .how-side { align-items: stretch; }
  .how-switch { display: flex; }
  .how-switch button { flex: 1; padding: 0 8px; }
}
/* шаги профильного канала: правила, режим */
.v-rules { width: 100%; max-width: 230px; display: flex; flex-direction: column; gap: 8px; }
.v-rules .lbl { font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
.v-rules .lbl + .chips + .lbl { margin-top: 6px; }
.v-rules .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v-rules .chip { padding: 5px 9px; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.2; background: var(--white); }
.v-rules .chip.on { border-color: var(--ink); }
.v-rules .chip.no { text-decoration: line-through; text-decoration-color: var(--signal); color: var(--gray); }
.v-mode { width: 100%; max-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.v-mode div { background: var(--white); border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.v-mode b { font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.v-mode span { font: 400 11.5px/1.3 var(--mono); color: var(--gray); }
.v-mode div.on { border-color: var(--ink); box-shadow: 0 10px 24px -14px rgba(23,23,21,.5); }
.v-mode div.on b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 7px; vertical-align: 1px; }
.v-cal { width: 100%; max-width: 230px; }
.v-cal .days, .v-cal .boxes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.v-cal .days { font: 400 11px/1 var(--mono); color: var(--gray); margin-bottom: 7px; text-transform: uppercase; }
.v-cal .boxes div { aspect-ratio: 1; border: 1px solid var(--line); background: var(--white); }
.v-cal .boxes div.p { background: var(--ink); border-color: var(--ink); }
.v-cal .boxes div.q { border: 1px solid var(--signal); background: var(--signal); }
.v-cal .leg { display: flex; gap: 14px; margin-top: 12px; font: 400 11px/1 var(--mono); color: var(--gray); text-transform: uppercase; }
.v-cal .leg span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: var(--ink); }
.v-cal .leg span + span::before { background: var(--signal); }

/* ---------- условия ---------- */
.terms { display: grid; grid-template-columns: 1fr 1.45fr; gap: 56px; padding-top: 120px; padding-bottom: 120px; }
.terms dl { margin: 6px 0 0; }
.terms .row { display: grid; grid-template-columns: 9em 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.4; }
.terms .row:first-child { border-top: 1px solid var(--line); }
.terms dt { color: var(--gray); }
.terms dt::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); margin-right: 10px; vertical-align: 1px; }
.terms dd { margin: 0; color: var(--ink); font-weight: 500; }
#faq .row, .terms.faq .row { grid-template-columns: 14em 1fr; } /* вопросы длиннее подписей «Условий» */

/* ---------- финал: чёрный блок ---------- */
.dark { background: var(--dark); color: #fff; }
.dark .frame { border-color: #2a2a2a; }
.final { padding-top: 140px; padding-bottom: 110px; }
.final h2 { margin: 0 0 56px; font-weight: 600; font-size: clamp(56px, 9.5vw, 140px); line-height: .9; letter-spacing: -.065em; }
.final h2 em { font-family: var(--script); font-style: italic; font-weight: 400; letter-spacing: -.018em; }
.final .links { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end; }
.final .big-link { font-weight: 500; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.1; color: var(--signal); }
.final .big-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.final p { margin: 0; color: #a9a9a6; max-width: 24em; }

footer { background: var(--dark); }
footer .frame { border-color: #2a2a2a; border-top: 1px solid #2a2a2a; display: flex; justify-content: space-between; align-items: center; height: 72px; font-size: 13px; color: #a3a19a; }
footer a { padding: 12px 0; }
footer a:hover { color: #fff; }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .cells { grid-template-columns: 1fr 1fr; }
  .cell { min-height: 460px; }
  .cell:nth-child(2) { border-right: 0; }
  .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cell:nth-child(3)::before { display: none; }
  .terms { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .pad { padding-left: 16px; padding-right: 16px; }
  .top nav { display: none; }
  .top .frame { grid-template-columns: 1fr auto; }
  .how-head, .final .links { grid-template-columns: 1fr; gap: 24px; }
  .hint { display: block; margin: 14px 0 0; }
  .statement { padding-top: 96px; padding-bottom: 96px; }
  .how-head { padding-top: 80px; padding-bottom: 48px; }
  .cells { grid-template-columns: 1fr; }
  .cell { border-right: 0; min-height: 0; }
  .cell + .cell { border-top: 1px solid var(--line); }
  .cell::before { display: none; }
  .terms { padding-top: 80px; padding-bottom: 80px; }
  .terms .row { grid-template-columns: 1fr; gap: 4px; }
  #faq .row, .terms.faq .row { grid-template-columns: 1fr; }
  .final { padding-top: 96px; padding-bottom: 64px; }
}
/* шаги: общие строки держат заголовки на одной высоте при разной длине текста */
@media (min-width: 721px) {
  .cell { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
}
/* когда рамка во всю ширину, крестики не выходят за край экрана */
@media (max-width: 1200px) {
  .rule::before { left: 0; }
  .rule::after { right: 0; }
}

/* ==========================================================================
   Шапка: активная страница и навигация на телефоне
   ========================================================================== */
.top nav a[aria-current="page"] { color: var(--ink); }
.top nav a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: 4px; background: var(--signal); border-radius: 1px; }
@media (max-width: 720px) {
  .top .frame { height: auto; padding-top: 14px; row-gap: 10px; }
  .top nav { display: flex; grid-column: 1 / -1; order: 3; gap: 22px; overflow-x: auto; padding-bottom: 12px;
    scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; }
}

/* ==========================================================================
   Внутренние страницы: шапка страницы вместо первого экрана
   ========================================================================== */
.page-head { padding-top: 64px; padding-bottom: 72px; }
.page-head .tag-line { display: block; font: 500 11px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gray); margin-bottom: 40px; }
.page-head h1 { margin: 0; font-weight: 600; font-size: clamp(48px, 7.6vw, 112px); line-height: .9; letter-spacing: -.06em; max-width: 11em; }
.page-head h1 .script { display: block; font-family: var(--script); font-style: italic; font-weight: 400; font-size: 1.02em; letter-spacing: -.018em; font-variation-settings: "opsz" 72; margin-left: calc(-0.058em + 1.5px); }
.page-head h1 .grot { display: block; margin-left: calc(-0.055em + 1.5px); }
.page-head .lead { margin: 40px 0 0; max-width: 36em; font-size: 19px; line-height: 1.5; color: var(--text); }
.page-head .lead b { color: var(--ink); font-weight: 500; }
@media (max-width: 720px) {
  .page-head { padding-top: 56px; padding-bottom: 56px; }
  .page-head .tag-line { margin-bottom: 28px; }
  .page-head .lead { font-size: 17px; margin-top: 28px; }
}

/* заголовок секции: крупно слева, пояснение справа (как «Как это работает») */
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end; padding-top: 112px; padding-bottom: 64px; }
.sec-head h2 { margin: 0; font-weight: 600; font-size: clamp(40px, 5vw, 72px); line-height: .95; letter-spacing: -.05em; }
.sec-head h2 em { font-style: normal; }
.sec-head p { margin: 0; max-width: 28em; font-size: 17px; color: var(--text); }
@media (max-width: 720px) { .sec-head { grid-template-columns: 1fr; gap: 20px; padding-top: 72px; padding-bottom: 40px; } }

/* общая плитка: клетки с линиями и крестиками на пересечениях */
.tiles { display: grid; border-top: 1px solid var(--line); }
.tiles > * { position: relative; padding: 28px 28px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.tiles.c3 { grid-template-columns: repeat(3, 1fr); }
.tiles.c4 { grid-template-columns: repeat(4, 1fr); }
.tiles.c5 { grid-template-columns: repeat(5, 1fr); }
.tiles.c3 > :nth-child(3n), .tiles.c4 > :nth-child(4n), .tiles.c5 > :nth-child(5n) { border-right: 0; }
.tiles .n { font: 500 13px/1 var(--sans); color: var(--gray); letter-spacing: .02em; }
.tiles h3 { margin: 0 0 10px; font-weight: 600; font-size: 22px; line-height: 1.08; letter-spacing: -.03em; }
.tiles p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--text); }
.tiles .ex { margin-top: auto; padding-top: 22px; font-family: var(--script); font-style: italic; font-weight: 600; color: var(--moss); font-size: 17px; line-height: 1.3; letter-spacing: -.01em; font-variation-settings: "opsz" 72; }
.tiles .ex::before { content: "«"; }
.tiles .ex::after { content: "»"; }
.tiles .meta { margin-top: 14px; font: 400 11px/1.45 var(--mono); color: var(--gray); text-transform: uppercase; letter-spacing: .02em; }
@media (max-width: 1000px) {
  .tiles.c4, .tiles.c5, .tiles.c3 { grid-template-columns: 1fr 1fr; }
  .tiles > * { border-right: 1px solid var(--line) !important; }
  .tiles > :nth-child(2n) { border-right: 0 !important; }
  /* нечётное число плиток: последняя растягивается, чтобы не было пустой клетки */
  .tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0 !important; }
}
@media (max-width: 720px) {
  .tiles.c4, .tiles.c5, .tiles.c3 { grid-template-columns: 1fr; }
  .tiles > * { border-right: 0 !important; padding: 24px 16px 28px; }
}

/* ==========================================================================
   «Кейсы»: история автора + макет ленты канала
   ========================================================================== */
.story { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.story > * { padding: 56px; }
.story > :first-child { border-right: 1px solid var(--line); }
.story.butter > :last-child { background: var(--butter); }
.story.sage > :last-child { background: var(--sage); }
.story.paper > :last-child { background: var(--white); }
.story .who { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.story .who .n { font: 500 13px/1 var(--sans); color: var(--gray); }
.story .who .role { font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gray); }
.story h2 { margin: 0 0 18px; font-weight: 600; font-size: clamp(40px, 4.4vw, 64px); line-height: .95; letter-spacing: -.05em; }
.story h2 em { font-style: normal; color: var(--gray); }
.story .about { margin: 0 0 30px; font-size: 18px; line-height: 1.5; color: var(--text); max-width: 30em; }
.story dl { margin: 0 0 30px; border-top: 1px solid var(--line); }
.story dl div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.story dt { color: var(--gray); }
.story dd { margin: 0; color: var(--ink); }
.story .result { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 500; letter-spacing: -.01em; max-width: 30em; }
.story .result em { font-family: var(--script); font-style: italic; font-weight: 600; color: var(--moss); font-variation-settings: "opsz" 72; }
.story .feeds { display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.story .feeds.two { flex-direction: row; align-items: flex-start; }
.story .feeds.two .feed { flex: 1; min-width: 0; }
.story .aside-note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
@media (max-width: 1000px) {
  .story { grid-template-columns: 1fr; }
  .story > :first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .story > * { padding: 40px 16px; }
  .story dl div { grid-template-columns: 1fr; gap: 2px; }
  .story .feeds.two { flex-direction: column; }
}

/* главная: «Мысли — в авторский. Факты — в канал о теме» — две колонки с макетами лент */
#pair .sec-head h2 em { color: var(--gray); }
.pair { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, auto); border-top: 1px solid var(--line); }
/* subgrid: подписи «Пример» и ленты в обеих колонках стоят на одной высоте */
.pair > * { display: grid; grid-row: span 6; grid-template-rows: subgrid; align-content: start; padding: 72px 28px 48px; }
.pair > :first-child { border-right: 1px solid var(--line); }
.pair > :last-child { background: var(--sage); }
.pair .kind { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--gray); margin-bottom: 18px; }
.pair > :last-child .kind { color: var(--ink); }
.pair h3 { margin: 0 0 20px; font-weight: 600; font-size: clamp(34px, 3.6vw, 54px); line-height: .95; letter-spacing: -.05em; } /* половина общего заголовка блока: «Мысли — в авторский.» / «Новости — в профильный.» */
.pair p { margin: 0 0 36px; font-size: 16px; line-height: 1.45; color: var(--text); max-width: 28em; }
.pair .ex-label { align-self: end; margin-bottom: 12px; font: 400 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .03em; color: var(--gray); }
.pair > :last-child .ex-label { color: var(--ink); }
.pair .feed { margin: 0; max-width: 460px; }
.pair .feed .post p { margin: 0; }
/* режимы профильного канала: две строки под описанием */
.pair .ex-label { grid-row: 5; } .pair .feed { grid-row: 6; } /* у авторского нет списка режимов: подпись и лента стоят вровень */
.pair .modes { list-style: none; margin: -16px 0 36px; padding: 0; border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); max-width: 28em; }
.pair .modes li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); font-size: 15px; line-height: 1.4; color: var(--text); }
.pair .modes b { font-weight: 600; color: var(--ink); }
.pair-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 32px; padding-bottom: 72px; border-top: 1px solid var(--line); }
.pair-foot p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); max-width: 30em; }
.pair-foot b { color: var(--ink); font-weight: 600; }
.pair-foot .sum { color: var(--ink); font-weight: 500; letter-spacing: -.01em; }
.pair-foot .auto { margin-top: 16px; font-size: 15px; }
.pair-foot .auto a { color: var(--ink); border-bottom: 1px solid var(--signal); padding: 12px 0; } /* зона нажатия 44 px без сдвига строки */
@media (max-width: 720px) {
  .pair { grid-template-columns: 1fr; grid-template-rows: none; }
  .pair > * { grid-row: auto; grid-template-rows: none; }
  .pair .ex-label, .pair .feed { grid-row: auto; }
  .pair > * { padding: 48px 16px 40px; }
  .pair > :first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .pair-foot { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; padding-bottom: 56px; }
  .pair .modes li { grid-template-columns: 1fr; gap: 2px; }
}

/* макет ленты Telegram-канала */
.feed { width: 100%; max-width: 420px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); box-shadow: 0 24px 48px -32px rgba(23,23,21,.35); }
.feed .ch { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.feed .ava { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--sans); }
.feed .ava.s { background: var(--signal); color: var(--ink); }
.feed .ava.m { background: var(--moss); color: var(--paper); }
.feed .ava.c { background: var(--cobalt); color: var(--white); }
.feed .ch b { display: block; font-weight: 600; font-size: 15px; letter-spacing: -.01em; line-height: 1.2; }
.feed .ch small { font: 400 11px/1.3 var(--mono); color: var(--gray); text-transform: uppercase; letter-spacing: .03em; }
.feed .post { padding: 14px 16px 16px; border-bottom: 1px solid var(--line); }
.feed .post:last-child { border-bottom: 0; }
.feed .fmt { display: inline-block; font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px; border: 1px solid var(--line); color: var(--gray); margin-bottom: 9px; }
.feed .post:first-of-type .fmt { border-color: var(--signal); color: var(--ink); background: color-mix(in srgb, var(--signal) 14%, transparent); }
.feed .post b { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.25; letter-spacing: -.015em; margin-bottom: 5px; }
.feed .post p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text); }

/* ==========================================================================
   «Автопилот»: сравнение режимов, шаги, панель настроек, шкала роста
   ========================================================================== */
.compare { border-top: 1px solid var(--line); }
.compare table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.compare thead th { font-weight: 600; font-size: 22px; letter-spacing: -.03em; padding-top: 28px; padding-bottom: 24px; }
.compare thead th em { font-style: normal; }
.compare tbody th { width: 22%; font-weight: 400; color: var(--gray); }
.compare td + td, .compare thead th + th + th { background: var(--butter); }
.compare td { width: 39%; border-left: 1px solid var(--line); }
.compare thead th + th { border-left: 1px solid var(--line); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
/* три колонки: «Авторский / Канал о теме / Дайджест», выделена последняя */
.compare.c3 tbody th { width: 19%; }
.compare.c3 td { width: 27%; }
.compare.c3 td + td, .compare.c3 thead th + th + th { background: none; }
.compare.c3 td:last-child, .compare.c3 thead th:last-child { background: var(--butter); }
.compare-note { padding-top: 24px; padding-bottom: 8px; font-size: 15px; color: var(--text); }
.compare-note a { color: var(--ink); border-bottom: 1px solid var(--signal); padding: 12px 0; } /* зона нажатия 44 px без сдвига строки */
/* на телефоне таблица превращается в карточки: параметр, затем оба режима с подписями */
@media (max-width: 720px) {
  .compare thead { display: none; }
  .compare table, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { padding: 18px 16px 6px; border-bottom: 1px solid var(--line); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th { width: auto; padding: 0 0 10px; border: 0; color: var(--ink); font-weight: 600; font-size: 17px; }
  .compare td { padding: 10px 12px 12px; margin-bottom: 12px; border: 1px solid var(--line); font-size: 15px; }
  .compare.c3 tbody th, .compare.c3 td { width: auto; }
  .compare td::before { content: attr(data-mode); display: block; margin-bottom: 4px; font: 400 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--gray); }
  .compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 1px solid var(--line); }
}

/* шаги автопилота: строка из пяти, номер крупно */
.steps5 .n { font: 500 22px/1 var(--sans); color: var(--gray); letter-spacing: -.02em; margin-bottom: 48px; }
.steps5 h3 { font-size: 28px; letter-spacing: -.04em; }
.steps5 > :nth-child(5) { background: var(--sage); }
.steps5 > :nth-child(5) .n, .steps5 > :nth-child(5) p { color: var(--ink); }

/* роль автора: текст слева, макет панели справа */
.editor { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.editor > * { padding: 56px; }
.editor > :first-child { border-right: 1px solid var(--line); }
.editor h2 { margin: 0 0 24px; font-weight: 600; font-size: clamp(36px, 4.2vw, 60px); line-height: .95; letter-spacing: -.05em; }
.editor h2 em { font-style: normal; }
.editor .text { margin: 0; font-size: 20px; line-height: 1.5; color: var(--text); max-width: 30em; }
.editor ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.editor li { display: grid; grid-template-columns: 11em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.editor li b { font-weight: 600; }
.editor li span { color: var(--text); }
.editor .panel-wrap { background: var(--butter); display: grid; place-items: center; align-content: center; }
.panel { width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--ink); box-shadow: 0 24px 48px -32px rgba(23,23,21,.45); font-size: 14px; }
.panel .bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--gray); }
.panel .live { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.panel .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 22%, transparent); }
.panel section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel section:last-child { border-bottom: 0; }
.panel h3 { margin: 0 0 9px; font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--gray); }
.panel .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.panel .chip { padding: 5px 9px; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.2; background: var(--paper); }
.panel .chip.on { border-color: var(--ink); }
.panel .chip.no { text-decoration: line-through; text-decoration-color: var(--signal); color: var(--gray); }
.panel .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.panel .row b { font-weight: 600; }
.panel-note { margin: 14px 0 0; font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink); text-align: center; }
@media (max-width: 1000px) {
  .editor { grid-template-columns: 1fr; }
  .editor > :first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .editor > * { padding: 40px 16px; }
  .editor li { grid-template-columns: 1fr; gap: 2px; }
}

/* рост: шкала из трёх этапов */
.scale { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.scale > div { position: relative; padding: 64px 28px 36px; border-right: 1px solid var(--line); }
.scale > div:last-child { border-right: 0; background: var(--butter); }
.scale > div::before { content: ""; position: absolute; top: 28px; left: 28px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); }
.scale > div:nth-child(2)::before { background: var(--butter); }
.scale > div:last-child::before { background: var(--signal); border-color: var(--signal); }
.scale > div::after { content: ""; position: absolute; top: 35px; left: 50px; right: 0; border-top: 1px dashed var(--gray); }
.scale > div:last-child::after { display: none; }
.scale b { display: block; font-weight: 600; font-size: 24px; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 10px; }
.scale p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); max-width: 22em; }
.scale > div:last-child p { color: var(--ink); }
.ads { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; padding-top: 56px; padding-bottom: 96px; }
.ads h3 { margin: 0; font-weight: 600; font-size: 30px; line-height: 1.02; letter-spacing: -.04em; }
.ads h3 em { font-family: var(--script); font-style: italic; font-weight: 400; }
.ads ol { list-style: none; counter-reset: ad; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.ads li { counter-increment: ad; display: grid; grid-template-columns: 32px 1fr; padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.4; }
.ads li::before { content: "0" counter(ad); font: 500 13px/1.6 var(--sans); color: var(--gray); }
@media (max-width: 1000px) {
  .scale { grid-template-columns: 1fr; }
  .scale > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .scale > div::after { display: none; }
  .ads { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  .scale > div { padding: 56px 16px 28px; }
  .scale > div::before { left: 16px; }
  .ads ol { grid-template-columns: 1fr; }
  .ads { padding-bottom: 64px; }
}

/* мелкое примечание под блоком */
.footnote { padding-top: 28px; padding-bottom: 28px; font-size: 13px; color: var(--gray); border-top: 1px solid var(--line); }

/* «Кейсы»: истории чередуют сторону макета */
.story.flip > :first-child { order: 2; border-right: 0; border-left: 1px solid var(--line); }
.story.flip > :last-child { order: 1; }
.story .channel { margin: -6px 0 24px; font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--gray); }
.story .channel b { font-weight: 400; color: var(--ink); }
@media (max-width: 1000px) {
  .story.flip > :first-child { order: 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .story.flip > :last-child { order: 1; }
}
/* «Что общего»: три клетки на Moss */
.common > * { min-height: 220px; }
.common h3 { margin-top: auto; }

/* ==========================================================================
   Правки после ревью 14.10
   ========================================================================== */
/* телефон: шапка не прилипает — две строки отнимали 13 % экрана */
@media (max-width: 720px) { .top { position: static; } }

/* кейсы: у Петра две ленты в колонку, вторая со сдвигом */
.story .feeds.two { flex-direction: column; align-items: stretch; }
.story .feeds.two .feed + .feed { margin-left: 15%; width: 85%; }
/* кейсы на телефоне: без списка настройки — его показывает макет ленты */
@media (max-width: 720px) { .story dl { display: none; } .story .feeds.two .feed + .feed { margin-left: 8%; width: 92%; } }
.story .about { margin-bottom: 24px; }

/* кейсы: строка-приглашение после историй */
.invite { padding-top: 28px; padding-bottom: 28px; font-size: 17px; border-top: 1px solid var(--line); }
.invite a { color: var(--ink); border-bottom: 1px solid var(--signal); }

/* шапка внутренней страницы: кнопка под вводной */
.page-head .act { flex-direction: row; align-items: center; gap: 20px; margin-top: 36px; }
.page-head .act .hint { text-align: left; }
@media (max-width: 720px) { .page-head .act { flex-direction: column; align-items: flex-start; } }

/* «Каким каналам подходит»: плитка 3×2, шестая клетка — подсказка */
.tiles .hint-cell { justify-content: flex-end; background: var(--white); }
.tiles .hint-cell p { font-size: 16px; color: var(--ink); }

/* шапка до 1000 px: навигация второй строкой, кнопка не ломается */
.top .go { white-space: nowrap; }
@media (max-width: 1000px) {
  .top .frame { grid-template-columns: 1fr auto; height: auto; padding-top: 10px; row-gap: 0; }
  .top nav { grid-column: 1 / -1; order: 3; gap: 24px; overflow-x: auto; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; }
}
