/* Лендинг olymp — газетная полоса головоломок: серая газетная бумага, чёрная антиква PT Serif,
   узкий гротеск PT Sans Narrow для рубрик, колонки с линейками, красный штамп «Решено».
   Красный — только штамп и пометки; кнопки — чёрные с бумажным текстом. */
:root {
  --paper: #e8e4d8;
  --paper-2: #dfdacb;
  --paper-3: #f3f0e7;
  --ink: #1b1a17;
  --ink-2: #4a463e;
  --muted: #6b665b;
  --red: #c32a1e;
  --red-ink: #a3221a;
  --ok: #2f5d34;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --narrow: "PT Sans Narrow", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --mono: "PT Mono", ui-monospace, Consolas, "Courier New", monospace;
  --gut: clamp(16px, 3.6vw, 64px);
  --rule: 1px solid var(--ink);

  /* форма записи (core.css) */
  --lf-fg: var(--ink);
  --lf-muted: var(--muted);
  --lf-field: var(--paper-3);
  --lf-field-fg: var(--ink);
  --lf-border: #8d877a;
  --lf-accent: var(--ink);
  --lf-accent-fg: var(--paper-3);
  --lf-chip: var(--paper-3);
  --lf-chip-active: var(--ink);
  --lf-chip-active-fg: var(--paper-3);
  --lf-radius: 2px;
  --lf-font: var(--serif);
  --lf-error: var(--red-ink);
  --lf-focus: rgba(27, 26, 23, .22);
  --cta-glow: #1b1a17;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-anchor: none; }
body {
  margin: 0; color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.5; overflow-x: hidden;
  background-color: var(--paper);
  /* лёгкое зерно газетной бумаги */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .09 0 0 0 0 .07 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── кнопки ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  font: 700 18px/1 var(--serif); color: var(--paper-3); background: var(--ink); border: 2px solid var(--ink); border-radius: 2px;
  cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 4px 4px 0 rgba(27, 26, 23, .25);
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(27, 26, 23, .3); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(27, 26, 23, .3); }
.btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 16px; box-shadow: none; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper-3); box-shadow: none; transform: none; }
.micro { font: 400 15px/1.3 var(--narrow); color: var(--muted); letter-spacing: .02em; }

/* ── шапка ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 3px double var(--ink); }
.top-in { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px/1.05 var(--serif); margin-right: auto; }
.logo svg { width: 30px; height: 30px; flex: 0 0 auto; }
.logo small { display: block; font: 400 13px/1.2 var(--narrow); color: var(--muted); letter-spacing: .02em; }
.role { display: flex; border: 1px solid var(--ink); }
.role button { font: 700 15px/1 var(--narrow); padding: 9px 14px; background: transparent; color: var(--ink); border: 0; cursor: pointer; letter-spacing: .02em; }
.role button + button { border-left: 1px solid var(--ink); }
.role button.is-active { background: var(--ink); color: var(--paper-3); }
.role button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ── рубрика (кикер) ───────────────────────────────────── */
.kicker { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: var(--rule); font: 400 15px/1.2 var(--narrow); color: var(--muted); letter-spacing: .03em; }
.kicker b { font: 700 17px/1.2 var(--narrow); color: var(--ink); letter-spacing: .02em; }

/* ── первый экран ───────────────────────────────────────── */
.hero { padding: clamp(12px, 2vh, 26px) 0 clamp(22px, 3.4vh, 40px); overflow-x: clip; }
.solution { overflow: clip; overflow-clip-margin: 24px; }
.hero-in { position: relative; z-index: 1; }
.masthead {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 0 8px; border-bottom: 4px double var(--ink);
  font: 400 15px/1 var(--narrow); color: var(--ink-2); letter-spacing: .06em;
}
.masthead > :last-child { text-align: right; }
.mh-mid { font: italic 700 clamp(20px, 2.1vw, 30px)/1 var(--serif); letter-spacing: 0; color: var(--ink); }
.headline {
  font: 700 clamp(30px, min(3.5vw, 6.6vh), 60px)/1.06 var(--serif); letter-spacing: -.012em;
  text-align: center; padding: clamp(12px, 2.2vh, 24px) 0 clamp(12px, 2.2vh, 22px); text-wrap: balance;
}
.cols {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border-top: var(--rule); border-bottom: var(--rule);
}
.cols > * { padding: clamp(14px, 2.2vh, 24px) clamp(18px, 2.2vw, 36px); }
.cols > :first-child { padding-left: 0; border-right: var(--rule); }
.cols > :last-child { padding-right: 0; }

/* задача */
.task-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 2.4vw, 40px); align-items: start; padding-top: clamp(14px, 2.2vh, 22px); }
.grid-fig { margin: 0; position: relative; }
.grid3 { display: block; width: clamp(200px, min(18vw, 33vh), 320px); height: auto; overflow: visible; }
.g-paper { fill: var(--paper-3); }
.g-line { stroke: var(--ink); stroke-width: 2; fill: none; }
.g-frame { fill: none; stroke: var(--ink); stroke-width: 5; }
.g-hl { fill: rgba(195, 42, 30, .1); stroke: var(--red); stroke-width: 5; opacity: 0; transition: x .25s, y .25s, width .25s, height .25s, opacity .2s; }
.grid3.is-anim .g-hl { opacity: 1; }
.g-count { margin-top: 10px; min-height: 1.3em; font: 700 17px/1.3 var(--mono); color: var(--red-ink); text-align: center; }
.q { font: 700 clamp(24px, min(2vw, 3.6vh), 34px)/1.18 var(--serif); margin-bottom: clamp(12px, 2vh, 20px); }

.answer { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.opts label { position: relative; display: flex; }
.opts input { position: absolute; opacity: 0; pointer-events: none; }
.opts span {
  flex: 1; display: grid; place-items: center; height: clamp(54px, 7.4vh, 70px); cursor: pointer; user-select: none;
  font: 700 clamp(26px, 2.2vw, 34px)/1 var(--serif); background: var(--paper-3); border: 2px solid var(--ink); border-radius: 2px;
  transition: background .15s, color .15s, transform .15s;
}
.opts span:hover { transform: translateY(-2px); }
.opts input:checked + span { background: var(--ink); color: var(--paper-3); }
.opts input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.opts label.is-wrong span { background: transparent; color: var(--muted); border-style: dashed; text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; cursor: default; }
.opts label.is-right span { background: var(--ok); border-color: var(--ok); color: var(--paper-3); }
.field { flex: 1 1 160px; display: flex; }
.field input {
  width: 100%; height: 58px; padding: 0 16px; font: 700 30px/1 var(--serif); color: var(--ink);
  background: var(--paper-3); border: 2px solid var(--ink); border-radius: 2px; outline: none;
}
.field input:focus { box-shadow: 0 0 0 3px rgba(195, 42, 30, .25); }
.field input::placeholder { color: #9c9686; font-weight: 400; font-size: 22px; }
.btn-check { flex: 0 0 auto; min-width: 200px; }
.opts + .field + .btn-check, html[data-olymp-v="A"] .btn-check { width: 100%; }
html[data-olymp-v="A"] .field, html[data-olymp-v="B"] .opts { display: none; }
html:not([data-olymp-v]) .answer { visibility: hidden; }
.answer.is-locked, .opts label.is-off { pointer-events: none; }
.answer.is-locked .btn-check { opacity: .45; box-shadow: none; }
.answer.is-locked input { opacity: .8; }
.answer.is-shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.verdict { min-height: 1.45em; margin-top: 12px; font-size: 17px; line-height: 1.4; }
.verdict b { font-family: var(--narrow); font-size: 18px; letter-spacing: .02em; margin-right: 6px; }
.verdict.is-bad b { color: var(--red-ink); }
.verdict.is-ok b { color: var(--ok); }
.skip { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-top: clamp(8px, 1.6vh, 16px); padding-top: 10px; border-top: 1px dotted var(--ink-2); }
.skip a { font: 400 16px/1.3 var(--serif); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.skip a:hover { color: var(--ink); }

/* разбор */
.solution { position: relative; }
.steps { display: grid; gap: clamp(10px, 1.6vh, 16px); padding-top: clamp(14px, 2.2vh, 22px); }
.steps li { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 16px; align-items: center; }
.steps svg { width: 60px; height: 60px; overflow: visible; }
.m-grid rect { fill: var(--paper-3); stroke: var(--ink); stroke-width: 2.4; }
.m-grid path { stroke: var(--ink); stroke-width: 1; fill: none; }
.m-hl rect { fill: none; stroke: var(--red); stroke-width: 2.2; }
.m1 rect { fill: rgba(195, 42, 30, .14); stroke-width: 0; }
.m3 rect { stroke-width: 3.4; }
.steps b { display: block; font: 700 19px/1.25 var(--serif); }
.steps span { display: block; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.steps em { font-style: normal; font-weight: 700; color: var(--red-ink); }
/* до ответа разбор закрыт — шаги не видны и не читаются */
.solution:not(.is-open) .steps { visibility: hidden; }
.sol-cover { position: absolute; left: clamp(18px, 2.2vw, 36px); right: 0; top: 58px; display: grid; gap: 22px; padding-top: 10px; }
.sol-cover i { display: block; height: 60px; border-top: 1px dashed #a39d8e; background: repeating-linear-gradient(0deg, transparent 0 15px, rgba(27, 26, 23, .07) 15px 16px); }
.sol-cover p { font: italic 400 17px/1.4 var(--serif); color: var(--muted); text-align: center; }
.solution.is-open .sol-cover { display: none; }
.motion .solution.is-open .steps li { animation: step-in .5s cubic-bezier(.2, .7, .2, 1) both; }
.motion .solution.is-open .steps li:nth-child(2) { animation-delay: .25s; }
.motion .solution.is-open .steps li:nth-child(3) { animation-delay: .5s; }
@keyframes step-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sol-next { margin-top: clamp(12px, 2vh, 20px); padding-top: 12px; border-top: 1px dotted var(--ink-2); display: grid; gap: 12px; justify-items: start; }
.sol-line { font-size: 16px; line-height: 1.45; color: var(--ink-2); }

/* штамп «Решено» */
.stamp {
  position: absolute; right: 0; top: -14px; z-index: 2; pointer-events: none;
  padding: 6px 16px; border: 4px solid var(--red); border-radius: 6px; color: var(--red);
  font: 700 30px/1 var(--narrow); letter-spacing: .08em; transform: rotate(-11deg) scale(1.6); opacity: 0;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.55' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 1.75'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)'/%3E%3C/svg%3E");
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.55' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 1.75'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)'/%3E%3C/svg%3E");
}
.solution.is-solved .stamp { opacity: .92; transform: rotate(-11deg) scale(1); transition: transform .28s cubic-bezier(.3, 1.6, .5, 1), opacity .15s; }

/* форма на первом экране */
.reveal { margin-top: clamp(16px, 2.4vh, 28px); border: 2px solid var(--ink); background: var(--paper-3); scroll-margin-top: 76px; }
.motion .reveal { opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s; }
.motion .reveal.is-in { opacity: 1; transform: none; }
.reveal-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.reveal-h { position: relative; padding: 24px 28px; border-right: var(--rule); background: var(--paper-2); display: grid; align-content: start; gap: 14px; }
.reveal-t { font: 700 26px/1.2 var(--serif); }
.reveal-solved { display: flex; align-items: center; gap: 12px; font: 400 16px/1.3 var(--narrow); color: var(--ink-2); }
.mini-stamp { display: inline-block; padding: 3px 10px; border: 3px solid var(--red); border-radius: 4px; color: var(--red); font: 700 19px/1 var(--narrow); letter-spacing: .08em; transform: rotate(-6deg); }
.reveal-list { display: grid; gap: 8px; font-size: 16px; line-height: 1.4; }
.reveal-list li { padding-left: 22px; position: relative; }
.reveal-list li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border: 2px solid var(--ink); }
.reveal-x { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid transparent; cursor: pointer; color: var(--ink); }
.reveal-x:hover { border-color: var(--ink); }
.reveal-x svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.form-card { padding: 22px 28px 24px; }
.lf-input { font-family: var(--serif); }
.lf-submit { font-family: var(--serif); }
.lf-done-icon { background: var(--red); color: var(--paper-3); }

/* ── секции ниже ───────────────────────────────────────── */
.sec { padding: clamp(48px, 8vh, 96px) 0; }
.sec-rule { border-top: 4px double var(--ink); }
.sec-k { display: flex; align-items: center; gap: 12px; font: 400 16px/1.2 var(--narrow); letter-spacing: .05em; color: var(--ink-2); margin-bottom: 14px; }
.sec-k .no { display: inline-grid; place-items: center; min-width: 40px; height: 28px; border: 2px solid var(--ink); font: 700 15px/1 var(--mono); color: var(--ink); letter-spacing: 0; }
h2 { font: 700 clamp(30px, 3.4vw, 50px)/1.1 var(--serif); letter-spacing: -.01em; max-width: 22em; text-wrap: balance; }
.lead { margin-top: 16px; max-width: 40em; font-size: 19px; line-height: 1.55; color: var(--ink-2); }

/* две задачи — газетный разворот */
.pair { display: grid; grid-template-columns: 1fr 1fr; margin-top: 32px; border-top: 3px solid var(--ink); }
.ptask { padding: 22px 36px 26px 0; display: flex; flex-direction: column; gap: 14px; }
.ptask + .ptask { padding: 22px 0 26px 36px; border-left: var(--rule); }
.ptext { font-size: 18px; line-height: 1.55; }
.quotes { display: grid; gap: 6px; padding: 12px 16px; border-left: 3px solid var(--ink); background: rgba(243, 240, 231, .6); font-style: italic; }
.quotes b { font-style: normal; }
.pq { font: 700 21px/1.3 var(--serif); }
.popts { display: grid; grid-template-columns: repeat(4, minmax(0, 72px)); gap: 10px; }
.popts button { height: 54px; font: 700 26px/1 var(--serif); color: var(--ink); background: var(--paper-3); border: 2px solid var(--ink); border-radius: 2px; cursor: pointer; transition: transform .15s; }
.popts button:hover { transform: translateY(-2px); }
.popts button.is-wrong { color: var(--muted); border-style: dashed; text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; background: transparent; }
.popts button.is-right { background: var(--ok); border-color: var(--ok); color: var(--paper-3); }
.rebus { display: inline-grid; justify-items: end; align-self: flex-start; padding-left: 1.2em; font: 700 clamp(30px, 3vw, 40px)/1.15 var(--mono); letter-spacing: .14em; white-space: pre; }
.rebus span { display: block; position: relative; }
.rebus i { position: absolute; right: 100%; margin-right: .35em; font-style: normal; }
.rebus .rb-sum { border-top: 3px solid var(--ink); padding-top: 4px; justify-self: stretch; text-align: right; }
.pform { display: flex; gap: 10px; flex-wrap: wrap; }
.pform label { flex: 0 1 220px; display: flex; }
.pform input { width: 100%; height: 48px; padding: 0 14px; font: 700 24px/1 var(--mono); letter-spacing: .1em; background: var(--paper-3); color: var(--ink); border: 2px solid var(--ink); border-radius: 2px; outline: none; }
.pform input::placeholder { font: 400 18px/1 var(--serif); letter-spacing: 0; color: #9c9686; }
.pform input:focus { box-shadow: 0 0 0 3px rgba(195, 42, 30, .25); }
.pverdict { min-height: 1.4em; font-size: 17px; }
.pverdict b { font-family: var(--narrow); letter-spacing: .02em; margin-right: 6px; }
.pverdict.is-bad b { color: var(--red-ink); }
.pverdict.is-ok b { color: var(--ok); }
.phint { font-size: 16.5px; line-height: 1.45; padding: 8px 12px; border: 1px dashed var(--ink-2); background: rgba(243, 240, 231, .6); }
.linkbtn { align-self: flex-start; padding: 0; font: 400 16px/1.3 var(--serif); color: var(--ink-2); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.psol { counter-reset: s; display: grid; gap: 10px; padding-top: 12px; border-top: 1px dotted var(--ink-2); font-size: 16.5px; line-height: 1.5; }
.psol li { counter-increment: s; position: relative; padding-left: 34px; }
.psol li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; font: 700 14px/1 var(--mono); }
.psol em { font-style: normal; font-weight: 700; color: var(--red-ink); }

/* пробное: программа как колонка расписания */
.probnoe { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.timeline { border-top: 3px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; padding: 14px 0; border-bottom: var(--rule); }
.timeline .t { font: 700 17px/1.4 var(--mono); }
.timeline b { display: block; font-size: 19px; line-height: 1.3; }
.timeline span:not(.t) { display: block; font-size: 16.5px; color: var(--ink-2); }

/* курсы — четыре колонки с линейками */
.courses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 32px; border-top: 3px solid var(--ink); border-bottom: var(--rule); }
.course { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.course + .course { border-left: var(--rule); }
.course:first-child { padding-left: 0; }
.course:last-child { padding-right: 0; }
.c-n { font: 700 15px/1 var(--mono); color: var(--red-ink); }
.course h3 { font: 700 23px/1.2 var(--serif); }
.c-sub { font: italic 400 16px/1.3 var(--serif); color: var(--muted); }
.course ul { display: grid; gap: 6px; margin-top: 6px; font-size: 16.5px; line-height: 1.4; }
.course li { padding-left: 16px; position: relative; }
.course li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--ink); }
.lesson-how { margin-top: 30px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 28px; align-items: start; }
.lh-k { font: 700 18px/1.3 var(--narrow); letter-spacing: .03em; padding-top: 3px; }
.lesson-how ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: h; }
.lesson-how ol li { counter-increment: h; padding: 0 18px; border-left: 1px dotted var(--ink-2); }
.lesson-how ol li:first-child { border-left: 0; padding-left: 0; }
.lesson-how ol b { display: block; font-size: 18px; }
.lesson-how ol b::before { content: counter(h) ". "; color: var(--red-ink); font-family: var(--mono); font-size: 15px; }
.lesson-how ol span { display: block; font-size: 15.5px; color: var(--ink-2); line-height: 1.4; }
.lh-next { grid-column: 2; font-size: 16.5px; font-style: italic; color: var(--ink-2); padding-top: 12px; border-top: 1px dotted var(--ink-2); }

/* подарок */
.sec-gift { background: var(--paper-2); border-top: 4px double var(--ink); border-bottom: 4px double var(--ink); }
.gift { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.gift-cover { width: clamp(180px, 20vw, 300px); height: auto; border: 1px solid var(--ink); box-shadow: 10px 10px 0 rgba(27, 26, 23, .18); transform: rotate(-2deg); background: var(--paper-3); }
.ladder { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin: 24px 0; }
.ladder li { flex: 0 0 22px; border: 1.5px solid var(--ink); background: var(--paper-3); }
.ladder li:nth-child(1) { height: 10%; } .ladder li:nth-child(2) { height: 19%; } .ladder li:nth-child(3) { height: 28%; }
.ladder li:nth-child(4) { height: 37%; } .ladder li:nth-child(5) { height: 46%; } .ladder li:nth-child(6) { height: 55%; }
.ladder li:nth-child(7) { height: 64%; } .ladder li:nth-child(8) { height: 73%; } .ladder li:nth-child(9) { height: 82%; }
.ladder li:nth-child(10) { height: 100%; background: var(--ink); }
.gift-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); }
.faq { border-top: 3px solid var(--ink); }
.faq details { border-bottom: var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font: 700 20px/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 28px/1 var(--mono); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; font-size: 17.5px; line-height: 1.6; color: var(--ink-2); max-width: 46em; }

/* подвал */
.foot { padding: 28px 0 36px; border-top: 3px double var(--ink); font: 400 15px/1.5 var(--narrow); color: var(--ink-2); }
.foot-in { display: grid; gap: 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* ── планшет ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .courses { grid-template-columns: 1fr 1fr; }
  .course:nth-child(3) { border-left: 0; padding-left: 0; }
  .course:nth-child(2) { padding-right: 0; }
  .course:nth-child(n+3) { border-top: var(--rule); }
  .lesson-how { grid-template-columns: 1fr; }
  .lesson-how ol { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .lesson-how ol li:nth-child(3) { border-left: 0; padding-left: 0; }
  .lh-next { grid-column: 1; }
  .reveal-in { grid-template-columns: 1fr; }
  .reveal-h { border-right: 0; border-bottom: var(--rule); }
}

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .cols > * { padding-left: 0; padding-right: 0; }
  .cols > :first-child { border-right: 0; border-bottom: var(--rule); }
  .sol-cover { left: 0; }
  .pair { grid-template-columns: 1fr; }
  .ptask { padding-right: 0; }
  .ptask + .ptask { padding-left: 0; border-left: 0; border-top: var(--rule); }
  .probnoe, .faq-wrap { grid-template-columns: 1fr; }
}

/* ── телефон ─────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .top-in { height: 54px; gap: 10px; }
  .logo { font-size: 16px; }
  .logo small { display: none; }
  .logo svg { width: 26px; height: 26px; }
  .role button { padding: 8px 9px; font-size: 14px; }
  .top-cta { display: none; }
  .masthead { grid-template-columns: 1fr auto; font-size: 13px; }
  .masthead > :first-child { display: none; }
  .mh-mid { font-size: 20px; justify-self: start; }
  .headline { font-size: 27px; text-align: left; padding: 12px 0 12px; }
  .task-body { grid-template-columns: 1fr; gap: 12px; padding-top: 12px; }
  .grid-fig { display: flex; align-items: center; gap: 14px; }
  .grid3 { width: 150px; }
  .g-count { margin: 0; text-align: left; }
  .q { font-size: 23px; margin-bottom: 12px; }
  .opts span { height: 54px; font-size: 26px; }
  .btn-check { width: 100%; }
  .btn { width: 100%; }
  .gift-act .btn, .sol-next .btn { width: 100%; }
  .skip { flex-direction: column; }
  .stamp { top: -8px; font-size: 24px; }
  .steps b { font-size: 17.5px; }
  .steps span { font-size: 15px; }
  .reveal-h { padding: 18px 16px; }
  .reveal-t { font-size: 22px; }
  .form-card { padding: 16px; }
  .sec { padding: 44px 0; }
  h2 { font-size: 28px; }
  .lead { font-size: 17px; }
  .courses { grid-template-columns: 1fr; }
  .course, .course:nth-child(n) { padding: 16px 0; border-left: 0; }
  .course + .course { border-top: var(--rule); }
  .lesson-how ol { grid-template-columns: 1fr; gap: 10px; }
  .lesson-how ol li { border-left: 0; padding: 0; }
  .timeline li { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
  .timeline .t { font-size: 15px; }
  .gift { grid-template-columns: 1fr; justify-items: start; }
  .gift-cover { width: 170px; }
  .rebus { font-size: 30px; }
  .popts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .faq summary { font-size: 18px; }
}
