/* ============================================================
   «Семейное издание» — Таня Этик
   Paper, ink, lingonberry. A printed family book on the web.
   ============================================================ */

:root {
  --paper: #F6F1E7;
  --ink: #221C14;
  --lingon: #9E3528;
  --lingon-deep: #8A2E23;
  --honey: #C29B5E;
  --honey-ink: #745D2E;     /* honey for small text on paper — passes AA */
  --honey-display: #9C7B40; /* honey for display-size numerals on paper — passes 3:1 */
  --tea: #EDE2CF;
  --fir: #44594A;
  --faded: #6B6357;
  --cream: #F6F1E7;

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Golos Text", Arial, sans-serif;

  --max-w: 1320px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-pad: clamp(72px, 10vw, 150px);
}

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

[hidden] { display: none !important; }
.nobr { white-space: nowrap; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* sticky header — anchors land below it */
  /* iOS Safari auto-inflates small text on some phones (font boosting). That blew up the
     11px header line and squeezed the burger until its bars had no width. Keep sizes as set. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain — feTurbulence noise, fixed overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 520;
  font-variation-settings: "opsz" 60;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(30px, 4.2vw, 54px); max-width: 21ch; }
h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 540; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
em { font-style: italic; }
s { text-decoration-thickness: 1.5px; }

::selection { background: var(--lingon); color: var(--cream); }

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

section { padding: var(--section-pad) 0; position: relative; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10001;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 18px;
  font-size: 14px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Eyebrow + folio ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faded);
  margin-bottom: clamp(20px, 3vw, 36px);
}
.eyebrow__rule {
  width: 24px;
  height: 2px;
  background: var(--lingon);
  flex: none;
  transform-origin: left center;
}
.folio {
  margin-left: auto;
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: 15px;
  color: var(--honey-ink);
  letter-spacing: 0.02em;
}

.section-intro {
  font-size: clamp(17px, 1.4vw, 19px);
  max-width: 58ch;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 4px;
  padding: 16px 28px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: color 0.25s ease-out;
}
.btn--primary {
  background: var(--ink);
  color: var(--cream);
  z-index: 0;
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--lingon);
  transform: translateX(-101%);
  transition: transform 0.25s ease-out;
}
.btn--primary:hover::before, .btn--primary:focus-visible::before { transform: translateX(0); }
.btn--submit {
  background: var(--lingon);
  color: var(--cream);
  transition: background 0.25s ease-out;
}
.btn--submit:hover, .btn--submit:focus-visible { background: var(--lingon-deep); }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(34, 28, 20, 0.35);
  transition: box-shadow 0.25s ease-out, background 0.25s ease-out;
}
.btn--quiet:hover, .btn--quiet:focus-visible { box-shadow: inset 0 0 0 1px var(--ink); background: rgba(34, 28, 20, 0.04); }
.btn--lg { padding: 18px 34px; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

.cta-microcopy {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faded);
}

.link-quiet {
  font-size: 15px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(34, 28, 20, 0.3);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s ease-out;
}
.link-quiet:hover { text-decoration-color: var(--lingon); }

.link-arrow {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--honey);
  padding-bottom: 3px;
  transition: border-color 0.25s ease-out, color 0.25s ease-out;
}
.link-arrow::after { content: " →"; color: var(--lingon); }
.link-arrow:hover { border-color: var(--lingon); color: var(--lingon-deep); }

/* ---------- Ляссе (ribbon bookmark) ---------- */
.lyasse {
  position: fixed;
  top: 0;
  right: 14px;
  width: 6px;
  height: 100vh;
  z-index: 999;
  pointer-events: none;
}
.lyasse span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lingon);
  transform: scaleY(0);
  transform-origin: top center;
}
@media (max-width: 767px) {
  .lyasse { top: 0; right: 0; left: 0; width: 100%; height: 3px; }
  .lyasse span { transform: scaleX(0); transform-origin: left center; }
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(34, 28, 20, 0.14);
}
.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* Wordmark = SVG from the brand kit (brand/logo/svg): script outlines + lingonberry i-dot.
   Sized to the box the 34px Licorice text used to occupy (≈153px wide). */
.brand__logo {
  display: block;
  align-self: flex-start;
  height: 38px;
  width: auto;
  margin: -3px 0 -3px;
}
.brand__line {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faded);
}
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav__link {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease-out;
}
.nav__link:hover { border-bottom-color: var(--lingon); }
.header__cta { flex: none; }

.burger {
  display: none;
  flex: none;               /* never shrink: the menu must survive any header squeeze */
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.burger span {
  display: block;
  width: 24px;              /* explicit — bars must not collapse if the button is squeezed */
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: var(--paper);
  padding: 110px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
  overflow-y: auto;
}
.mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}
.mobile-menu__nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__nav a {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(34, 28, 20, 0.12);
}
.mobile-menu__note {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faded);
  margin-top: -16px;
}

@media (max-width: 1080px) {
  .nav { display: none; }
  .header__cta { display: none; }
  .burger { display: flex; }
  .header__inner { gap: 16px; }
}

/* ---------- Hero — титульный лист ---------- */
.hero {
  min-height: calc(100svh - 73px);
  display: flex;
  align-items: center;
  padding: clamp(28px, 3.5vw, 56px) 0 clamp(40px, 5vw, 80px);
}
.hero__inner { width: 100%; }
.hero__eyebrow { margin-bottom: clamp(18px, 2.5vw, 32px); }
.hero__title {
  font-size: clamp(38px, 6vw, 88px);
  font-weight: 480;
  font-variation-settings: "opsz" 72;
  line-height: 1.06;
  letter-spacing: -0.012em;
  max-width: 19ch;
  margin-bottom: clamp(22px, 2.8vw, 40px);
}
.hero__line { display: block; }
.hero__line--2 { color: var(--ink); }
.hero__accent { position: relative; font-style: italic; white-space: nowrap; }
.hero__underline {
  position: absolute;
  left: -1%;
  bottom: -0.08em;
  width: 102%;
  height: 0.12em;
  color: var(--lingon);
  overflow: visible;
}
.hero__ghost {
  display: none;
  font-size: 0.32em;
  font-style: italic;
  font-weight: 400;
  color: rgba(34, 28, 20, 0.32);
  letter-spacing: 0;
  margin-top: 0.5em;
}
.reduced-motion .hero__ghost { display: block; }

.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: end;
}
.hero__subtitle {
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.6;
  max-width: 38ch;
  color: var(--ink);
  margin: 0;
}
.hero__toc { margin-bottom: clamp(20px, 2.6vw, 34px); }
.hero__toc li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(34, 28, 20, 0.12);
  font-size: 16px;
  max-width: 52ch;
}
.hero__toc li:first-child { border-top: 1px solid rgba(34, 28, 20, 0.12); }
.hero__toc-num {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: 15px;
  color: var(--honey-ink);
  flex: none;
}
.hero__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 24px;
}
.hero__cta .cta-microcopy { display: block; }

@media (max-width: 860px) {
  .hero { min-height: auto; }
  .hero__row { grid-template-columns: 1fr; gap: 32px; }
  .hero__subtitle { order: -1; max-width: 60ch; }
  .hero__title { max-width: none; }
}

/* ---------- Proof strip — колофон ---------- */
.proof {
  padding: 0;
  border-top: 1px solid rgba(34, 28, 20, 0.2);
  border-bottom: 1px solid rgba(34, 28, 20, 0.2);
}
.proof__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 22px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.proof__sep { color: var(--lingon); font-size: 12px; letter-spacing: 0; }
.proof__key {
  background-image: linear-gradient(var(--honey), var(--honey));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  padding-bottom: 3px;
}
@media (max-width: 860px) {
  .proof__list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; justify-content: start; }
  .proof__sep { display: none; }
  .proof__list li { font-size: 12px; }
}

/* ---------- Why — бабушка, форзац ---------- */
.why { background: var(--tea); }
.why__title { max-width: 24ch; }
.why__body {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(28px, 4vw, 56px);
}
.why__quote {
  grid-column: 1;
  margin: 0 0 28px;
}
.why__quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-variation-settings: "opsz" 48;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.22;
  margin: 0;
}
.why__dropcap {
  float: left;
  font-style: normal;
  font-weight: 560;
  font-size: 3.1em;
  line-height: 0.82;
  padding: 0.04em 0.12em 0 0;
  color: var(--lingon);
}
.why__text {
  grid-column: 1;
  font-size: clamp(17px, 1.4vw, 19px);
  max-width: 56ch;
}
.why__points {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  border-left: 1px solid rgba(34, 28, 20, 0.16);
  padding-left: 22px;
}
.why__ast {
  display: block;
  color: var(--lingon);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.18em;
}
.why__bird {
  position: absolute;
  right: var(--gutter);
  bottom: -26px;
  width: clamp(110px, 12vw, 170px);
  color: var(--ink);
  opacity: 0.2;
}
@media (max-width: 860px) {
  .why__body { grid-template-columns: 1fr; }
  .why__points { grid-column: 1; grid-row: auto; border-left: none; padding-left: 0; border-top: 1px solid rgba(34,28,20,0.16); padding-top: 22px; }
  .why__bird { position: static; display: block; margin: 36px 0 0 auto; }
}

/* ---------- Problem — каталожные карточки ---------- */
.problem__title { max-width: 24ch; }
.problem__intro { margin-bottom: clamp(36px, 5vw, 64px); }
.problem__wake { position: relative; white-space: nowrap; font-style: italic; font-weight: 500; }
.problem__wake-underline {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 8px;
  color: var(--lingon);
  overflow: visible;
}
@media (max-width: 600px) { .problem__wake { white-space: normal; } .problem__wake-underline, .about__underline { display: none; } }

.cards { display: grid; gap: clamp(18px, 2.5vw, 32px); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card--catalogue {
  background: #FBF7EF;
  border: 1px solid rgba(34, 28, 20, 0.22);
  border-radius: 3px;
  padding: 26px 26px 30px;
  position: relative;
}
.card--catalogue:nth-child(2) { transform: translateY(40px); }
.card--catalogue:nth-child(3) { transform: translateY(80px); }
.card__emblem {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.emblem-cyr { color: var(--ink); }
.emblem-arrow { color: var(--faded); font-size: 20px; font-family: var(--font-body); }
.emblem-lat { color: var(--faded); font-family: var(--font-body); font-weight: 400; }
.card__emblem--syllables { letter-spacing: 0.12em; color: var(--ink); display: block; }
.card__emblem--fade {
  display: block;
  background: linear-gradient(90deg, var(--ink) 15%, var(--faded) 65%, rgba(107, 99, 87, 0.4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card--catalogue h3 { font-size: 22px; margin-bottom: 10px; }
.card--catalogue p:last-child { font-size: 16px; color: var(--ink); margin: 0; }

.authors-note {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--ink);
  max-width: 56ch;
  margin-top: clamp(48px, 7vw, 110px);
}
.authors-note__ast { color: var(--lingon); font-size: 1.2em; flex: none; }

@media (max-width: 960px) {
  .cards--3 { grid-template-columns: 1fr; }
  .card--catalogue:nth-child(2), .card--catalogue:nth-child(3) { transform: none; }
  .authors-note { margin-top: 36px; }
}

/* ---------- Solution — нумерованный список ---------- */
.principles { margin-top: clamp(36px, 5vw, 64px); }
.principles__row {
  display: grid;
  grid-template-columns: minmax(80px, 2fr) minmax(0, 9fr);
  gap: clamp(20px, 4vw, 60px);
  padding: clamp(28px, 3.5vw, 44px) 0;
  border-top: 1px solid rgba(34, 28, 20, 0.18);
}
.principles__row:last-child { border-bottom: 1px solid rgba(34, 28, 20, 0.18); }
.principles__num {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 460;
  line-height: 0.9;
  color: var(--honey-display);
}
.principles__body { max-width: 56ch; }
.principles__heading { margin-bottom: 8px; }
.principles__key { position: relative; font-style: normal; }
.principles__underline {
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 8px;
  color: var(--lingon);
  overflow: visible;
}
.principles__body p { font-size: 17px; margin: 0; }

/* ---------- Programs — две книги ---------- */
.bookshelf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(36px, 5vw, 64px);
}
.bookcover {
  position: relative;
  background: var(--tea);
  border-radius: 3px;
  padding: clamp(32px, 4vw, 56px) clamp(28px, 3.5vw, 48px);
  border: 1.5px solid;
}
.bookcover::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid;
  border-color: inherit;
  border-radius: 2px;
  pointer-events: none;
  transition: transform 0.25s ease-out;
}
.bookcover:hover::before { transform: translate(4px, 4px); }
.bookcover--reading { border-color: var(--lingon); }
.bookcover--grammar { border-color: var(--fir); }
.bookcover__series {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faded);
  margin-bottom: 22px;
}
.bookcover__title { font-size: clamp(26px, 2.4vw, 32px); margin-bottom: 14px; }
.bookcover__text { font-size: 16px; margin-bottom: 26px; }
@media (max-width: 860px) { .bookshelf { grid-template-columns: 1fr; } }

/* ---------- Formats — разворот ---------- */
.formats { background: var(--tea); }
.spread {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  background: #F2EAD9;
  border: 1px solid rgba(34, 28, 20, 0.18);
  border-radius: 3px;
  margin-top: clamp(36px, 5vw, 64px);
}
.spread__page { padding: clamp(32px, 4vw, 60px) clamp(26px, 3.5vw, 56px); }
.spread__gutter {
  background: linear-gradient(90deg, rgba(34, 28, 20, 0) 0%, rgba(34, 28, 20, 0.18) 50%, rgba(34, 28, 20, 0) 100%);
  position: relative;
}
.spread__gutter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -24px;
  width: 48px;
  background: linear-gradient(90deg, rgba(34, 28, 20, 0) 0%, rgba(34, 28, 20, 0.05) 50%, rgba(34, 28, 20, 0) 100%);
}
.spread__page h3 { font-size: clamp(24px, 2.2vw, 30px); margin-bottom: 12px; }
.spread__page p:not(.stamp) { font-size: 16px; margin-bottom: 24px; }
.stamp {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1.5px solid var(--lingon);
  border-radius: 2px;
  color: var(--lingon);
  transform: rotate(-3deg);
  margin-bottom: 26px;
}
.stamp--premium {
  border-color: var(--honey);
  color: #7c6136;
  transform: rotate(2deg);
}
@media (max-width: 860px) {
  .spread { grid-template-columns: 1fr; }
  .spread__gutter { height: 1px; background: linear-gradient(0deg, rgba(34,28,20,0) 0%, rgba(34,28,20,0.18) 50%, rgba(34,28,20,0) 100%); }
  .spread__gutter::before { display: none; }
}

/* ---------- Diagnostic — красная нить ---------- */
.thread-steps { position: relative; margin-top: clamp(44px, 6vw, 80px); }
.thread-steps__path {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px;
  color: var(--lingon);
  pointer-events: none;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 48px);
}
.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: 20px;
  margin-bottom: 16px;
  background: var(--paper);
  transition: background 0.4s ease-out, color 0.4s ease-out, border-color 0.4s ease-out;
}
.steps__item.is-reached .steps__num {
  background: var(--lingon);
  border-color: var(--lingon);
  color: var(--cream);
}
.steps__item h3 { font-size: 22px; margin-bottom: 8px; }
.steps__item p { font-size: 16px; margin: 0; max-width: 34ch; }
.diagnostic__discount {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faded);
  border-top: 1px solid var(--honey);
  padding-top: 12px;
  margin-top: 18px;
}
.diagnostic__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-top: clamp(32px, 4vw, 48px);
}
.diagnostic .authors-note { margin-top: clamp(36px, 4vw, 56px); }
@media (max-width: 860px) {
  .thread-steps__path { display: none; }
  .steps { grid-template-columns: 1fr; padding-top: 0; gap: 0; position: relative; }
  .steps::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 10px;
    bottom: 30px;
    width: 1.5px;
    background: var(--lingon);
  }
  .steps__item { position: relative; padding: 0 0 36px 72px; }
  .steps__num { position: absolute; left: 0; top: 0; }
}

/* ---------- Groups — плакат с «4» ---------- */
.groups { overflow: hidden; background: var(--ink); color: var(--cream); }
.groups .eyebrow { color: rgba(246, 241, 231, 0.6); }
.groups .folio { color: var(--honey); }
.groups__giant {
  position: absolute;
  right: -0.06em;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: clamp(180px, 24vw, 320px);
  font-weight: 480;
  line-height: 1;
  color: var(--lingon);
  opacity: 0.92;
  pointer-events: none;
}
.groups__title { max-width: 18ch; }
.groups__text { max-width: 52ch; font-size: clamp(17px, 1.4vw, 19px); color: rgba(246, 241, 231, 0.85); }
.groups__key { position: relative; font-style: normal; font-weight: 600; color: var(--cream); white-space: nowrap; }
.groups__underline {
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 8px;
  color: var(--lingon);
  overflow: visible;
}
.groups__caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--honey);
  margin-top: 28px;
}
@media (max-width: 860px) {
  .groups__giant {
    font-size: 200px;
    opacity: 0.14;
    right: -20px;
    top: 30%;
  }
}

/* ---------- About — об авторе ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 100px);
  align-items: center;
}
.frame {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: 160px 160px 3px 3px;
  padding: 13px;
  aspect-ratio: 2 / 3;
  background: var(--tea);
}
.about__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 150px 150px 2px 2px;
}
.frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(34, 28, 20, 0.4);
  border-radius: 150px 150px 2px 2px;
  pointer-events: none;
}
.about__ghostname {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(72px, 8vw, 110px);
  color: rgba(34, 28, 20, 0.08);
  transform: translate(8%, -18%);
  user-select: none;
}
.about__name {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 64;
  font-size: clamp(56px, 6vw, 84px);
  line-height: 1;
  color: var(--ink);
}
.about__flourish {
  position: absolute;
  left: 4%;
  bottom: -0.28em;
  width: 92%;
  height: 0.22em;
  color: var(--lingon);
  overflow: visible;
}
.about__caption {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faded);
  margin-top: 18px;
}
.about__text { max-width: 56ch; font-size: clamp(17px, 1.4vw, 19px); }
.about__personal {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.8vw, 24px);
  margin: 26px 0;
}
.about__personal em { position: relative; }
.about__underline {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 8px;
  color: var(--lingon);
  overflow: visible;
}
.about__languages {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faded);
  border-top: 1px solid var(--honey);
  display: inline-block;
  padding-top: 12px;
  margin-top: 10px;
}
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__frontispiece { max-width: 340px; margin: 0 auto; }
}

/* ---------- Testimonials — честно ---------- */
.testimonials { background: var(--tea); padding-top: clamp(56px, 7vw, 100px); padding-bottom: clamp(56px, 7vw, 100px); }
.testimonials__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.testimonials .authors-note { margin-top: 24px; }
.testimonials__ghosts { display: flex; flex-direction: column; gap: 18px; }
.ghost-card {
  border: 1px dashed rgba(107, 99, 87, 0.7);
  border-radius: 3px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ghost-card span {
  display: block;
  height: 1px;
  background: rgba(107, 99, 87, 0.45);
}
.ghost-card span:nth-child(1) { width: 90%; }
.ghost-card span:nth-child(2) { width: 75%; }
.ghost-card span:nth-child(3) { width: 55%; }
@media (max-width: 860px) {
  .testimonials__grid { grid-template-columns: 1fr; }
  .testimonials__ghosts { flex-direction: row; }
  .ghost-card { flex: 1; }
}

/* ---------- Objections — переписка ---------- */
.letters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px) clamp(36px, 6vw, 110px);
  margin-top: clamp(36px, 5vw, 64px);
}
.letter { position: relative; padding-top: 30px; }
.letter::before {
  content: "«";
  position: absolute;
  top: -14px;
  left: -10px;
  font-family: var(--font-display);
  font-size: 90px;
  line-height: 1;
  color: var(--tea);
  z-index: -1;
}
.letter--offset { transform: translateY(40px); }
.letter__doubt {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(21px, 2vw, 25px);
  margin-bottom: 12px;
}
.letter__answer {
  font-size: 17px;
  margin: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(34, 28, 20, 0.16);
  max-width: 46ch;
}
@media (max-width: 860px) {
  .letters { grid-template-columns: 1fr; }
  .letter--offset { transform: none; }
}

/* ---------- Final — ночная глава ---------- */
.final {
  background:
    radial-gradient(2.5px 2.5px at 12% 18%, rgba(194, 155, 94, 0.8) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2px 2px at 27% 56%, rgba(194, 155, 94, 0.6) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(3px 3px at 41% 10%, rgba(194, 155, 94, 0.7) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2px 2px at 50% 38%, rgba(194, 155, 94, 0.55) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2.5px 2.5px at 18% 76%, rgba(194, 155, 94, 0.65) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2px 2px at 35% 88%, rgba(194, 155, 94, 0.55) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2.5px 2.5px at 8% 44%, rgba(194, 155, 94, 0.6) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2px 2px at 46% 64%, rgba(194, 155, 94, 0.5) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2.5px 2.5px at 22% 32%, rgba(194, 155, 94, 0.45) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2px 2px at 66% 14%, rgba(194, 155, 94, 0.6) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2.5px 2.5px at 80% 80%, rgba(194, 155, 94, 0.55) 0 38%, rgba(194, 155, 94, 0) 100%),
    radial-gradient(2px 2px at 90% 46%, rgba(194, 155, 94, 0.5) 0 38%, rgba(194, 155, 94, 0) 100%),
    var(--ink);
  color: var(--cream);
}
.final__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.final__title { color: var(--cream); font-size: clamp(32px, 4.4vw, 58px); max-width: 17ch; }
.final__text { color: rgba(246, 241, 231, 0.82); max-width: 48ch; font-size: clamp(17px, 1.4vw, 19px); }
.final__microcopy {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(246, 241, 231, 0.55);
  margin-top: 22px;
}

/* The form sheet */
.sheet {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: clamp(28px, 3.5vw, 44px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.form__field { margin-bottom: 22px; }
.form__field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faded);
  margin-bottom: 6px;
}
.form__field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(34, 28, 20, 0.35);
  border-radius: 0;
  padding: 8px 2px 10px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  transition: border-color 0.25s ease-out;
}
.form__field input::placeholder { color: rgba(107, 99, 87, 0.6); }
.form__field input:focus {
  outline: none;
  border-bottom: 1.5px solid var(--lingon);
}
.form__hint { font-size: 13px; color: var(--faded); margin: 8px 0 0; }
.form__error {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--lingon-deep);
  margin: 8px 0 0;
}
.form__consent { display: flex; flex-direction: column; gap: 14px; margin: 26px 0; }

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.checkbox input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.checkbox__box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid rgba(34, 28, 20, 0.5);
  border-radius: 3px;
  color: var(--fir);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease-out;
}
.checkbox__box svg { width: 14px; height: 14px; }
.checkbox__box .check-path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.25s ease-out;
}
.checkbox input:checked + .checkbox__box { border-color: var(--fir); }
.checkbox input:checked + .checkbox__box .check-path { stroke-dashoffset: 0; }
.checkbox input:focus-visible + .checkbox__box { outline: 2px solid var(--lingon); outline-offset: 2px; }
.checkbox--sm { font-size: 13px; align-items: center; }

.btn--submit { width: auto; }
.form .btn--submit { width: 100%; padding: 17px 28px; font-size: 17px; }
.form__reassurance {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--faded);
  margin: 14px 0 0;
  text-align: center;
}
.form__success {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--fir);
  margin: 18px 0 0;
}
.form__success-check { width: 22px; height: 22px; flex: none; color: var(--fir); }
.form__success .check-path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.form__success.is-shown .check-path { animation: drawcheck 0.5s ease-out 0.1s forwards; }
@keyframes drawcheck { to { stroke-dashoffset: 0; } }

@media (max-width: 960px) {
  .final__grid { grid-template-columns: 1fr; }
}

/* ---------- Footer — задняя обложка ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid rgba(246, 241, 231, 0.14);
  padding: clamp(64px, 8vw, 110px) var(--gutter) 56px;
}
.footer__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.footer__brand { margin: 0; line-height: 0; }
.footer__logo { display: block; height: 55px; width: auto; margin: 0 auto; }
.footer__brandline {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 241, 231, 0.55);
  margin: -10px 0 0;
}
.footer__rule { width: 56px; height: 1px; background: var(--honey); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }
.footer__nav a {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(246, 241, 231, 0.8);
  transition: color 0.25s ease-out;
}
.footer__nav a:hover { color: var(--cream); }
.footer__mission { font-size: 14px; color: rgba(246, 241, 231, 0.7); max-width: 52ch; margin: 0; }
.footer__note { font-size: 13px; color: rgba(246, 241, 231, 0.55); max-width: 52ch; margin: 0; }
.footer__rights { font-size: 13px; color: rgba(246, 241, 231, 0.55); margin: 0; }
.footer__rights span { color: var(--honey); }
.footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--cream);
  margin: 10px 0 0;
}

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 880;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--ink);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.35s ease-out, visibility 0s 0.35s;
}
.sticky-cta.is-visible {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.35s ease-out, visibility 0s;
}
.sticky-cta .btn { background: var(--lingon); color: var(--cream); flex: none; }
.sticky-cta .btn:hover { background: var(--lingon-deep); }
.sticky-cta__note {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  color: rgba(246, 241, 231, 0.6);
}
@media (max-width: 860px) { .sticky-cta { display: flex; } }

/* ---------- Cookies ---------- */
.cookies {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 885;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid rgba(34, 28, 20, 0.3);
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(34, 28, 20, 0.18);
  padding: 22px;
}
.cookies__text { font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
.cookies__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookies__settings { border-top: 1px solid rgba(34, 28, 20, 0.16); padding-top: 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.cookies__settings-title { font-weight: 600; font-size: 14px; margin: 0 0 4px; }
@media (max-width: 600px) {
  .cookies { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}

/* ---------- Pre-states for the JS choreography ----------
   Applied only when JS is confirmed working (.js, set inline in <head>;
   removed by main.js if GSAP fails to load) and motion is allowed. */
.js:not(.reduced-motion) .hero__eyebrow,
.js:not(.reduced-motion) .hero__line,
.js:not(.reduced-motion) .hero__subtitle,
.js:not(.reduced-motion) .hero__toc li,
.js:not(.reduced-motion) .hero__cta { opacity: 0; }
.js:not(.reduced-motion) .draw-path { visibility: hidden; }
.hero__mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* Reduced motion: everything visible, nothing moves */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Legal pages ---------- */
.legal { min-height: 60vh; }
.legal__title {
  font-size: clamp(30px, 4vw, 50px);
  max-width: 21ch;
}
.legal .authors-note { margin-top: 32px; margin-bottom: 40px; }

/* Long-form legal document */
.legal__meta {
  font-size: 14px;
  color: var(--faded);
  letter-spacing: 0.02em;
  margin: 0 0 clamp(28px, 4vw, 44px);
}
.legal__doc {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}
.legal__doc > p:first-of-type {
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.6;
}
.legal__doc h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 540;
  font-variation-settings: "opsz" 48;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 1.9em 0 0.55em;
}
.legal__doc h2:first-child { margin-top: 0; }
.legal__doc h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.7vw, 21px);
  font-weight: 560;
  margin: 1.5em 0 0.4em;
}
.legal__doc p { margin: 0 0 1em; }
.legal__doc ul { list-style: none; margin: 0 0 1.2em; padding: 0; }
.legal__doc li { position: relative; padding-left: 1.5em; margin-bottom: 0.5em; }
.legal__doc li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--lingon);
}
.legal__doc strong { font-weight: 600; }
.legal__doc a {
  color: var(--lingon-deep);
  text-decoration: underline;
  text-decoration-color: rgba(158, 53, 40, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s ease-out;
}
.legal__doc a:hover { text-decoration-color: var(--lingon); }
.legal__doc hr {
  border: none;
  border-top: 1px solid rgba(34, 28, 20, 0.14);
  margin: 2.2em 0;
}
.legal__back { margin-top: clamp(40px, 6vw, 64px); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--lingon);
  outline-offset: 3px;
}
.final a:focus-visible, .final button:focus-visible, .footer a:focus-visible { outline-color: var(--honey); }

/* ---------- Real testimonials (book quotes) — render when populated via CMS ---------- */
.testimonials__real { display: flex; flex-direction: column; gap: 18px; }
.book-quote {
  margin: 0;
  background: #FBF7EF;
  border: 1px solid rgba(34, 28, 20, 0.18);
  border-radius: 3px;
  padding: 22px 24px;
}
.book-quote blockquote {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.42;
  color: var(--ink);
}
.book-quote figcaption {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faded);
}
@media (max-width: 860px) {
  .testimonials__real { flex-direction: row; flex-wrap: wrap; }
  .book-quote { flex: 1 1 260px; }
}

/* ============================================================
   Careers page — /careers («Работа в школе»)
   Same paper-and-ink system; no GSAP on this page.
   ============================================================ */

.vac-header-cta { margin-left: auto; flex: none; }
@media (max-width: 600px) { .vac-header-cta { display: none; } }

.vac-hero { padding: clamp(48px, 7vw, 110px) 0 clamp(40px, 5vw, 80px); }
.vac-hero__title {
  font-size: clamp(34px, 4.8vw, 72px);
  font-weight: 490;
  font-variation-settings: "opsz" 72;
  line-height: 1.08;
  letter-spacing: -0.012em;
  max-width: 18ch;
  margin-bottom: clamp(18px, 2.4vw, 30px);
}
.vac-hero__subtitle {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  max-width: 56ch;
  margin-bottom: clamp(26px, 3.5vw, 44px);
}
.vac-hero__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 24px;
}

.vac-about__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(24px, 3vw, 40px);
  font-size: clamp(17px, 1.4vw, 19px);
}
.vac-about__cols p { max-width: 56ch; margin: 0; }
@media (max-width: 860px) { .vac-about__cols { grid-template-columns: 1fr; } }

.vac-phil { background: var(--tea); }
.vac-phil__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px) clamp(32px, 5vw, 80px);
  margin-top: clamp(32px, 4.5vw, 56px);
}
.vac-phil__item h3 { margin-bottom: 8px; }
.vac-phil__item p { font-size: 16.5px; margin: 0; max-width: 52ch; }
@media (max-width: 860px) { .vac-phil__grid { grid-template-columns: 1fr; gap: 28px; } }

.vac-offer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 32px);
  margin-top: clamp(32px, 4.5vw, 56px);
}
.vac-offer__card {
  background: #FBF7EF;
  border: 1px solid rgba(34, 28, 20, 0.22);
  border-radius: 3px;
  padding: 24px 24px 26px;
}
.vac-offer__card h3 { font-size: 20px; margin-bottom: 8px; }
.vac-offer__card p { font-size: 15.5px; margin: 0; color: var(--ink); }
@media (max-width: 960px) { .vac-offer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .vac-offer__grid { grid-template-columns: 1fr; } }

.vac-reqs__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 90px);
  margin-top: clamp(32px, 4.5vw, 56px);
}
.vac-reqs__col h3 { font-size: 18px; letter-spacing: 0.04em; margin-bottom: 18px; }
.vac-reqs__list li {
  position: relative;
  padding: 10px 0 10px 1.7em;
  border-bottom: 1px solid rgba(34, 28, 20, 0.12);
  font-size: 16.5px;
  max-width: 48ch;
}
.vac-reqs__list li:first-child { border-top: 1px solid rgba(34, 28, 20, 0.12); }
.vac-reqs__list li::before {
  position: absolute;
  left: 0;
  top: 10px;
}
.vac-reqs__list--must li::before { content: "—"; color: var(--ink); }
.vac-reqs__list--plus li::before { content: "+"; color: var(--honey-ink); font-weight: 600; }
.vac-reqs__note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--faded);
  margin: 16px 0 0;
  max-width: 44ch;
}
@media (max-width: 860px) { .vac-reqs__cols { grid-template-columns: 1fr; gap: 36px; } }

.vac-process .steps { margin-top: clamp(36px, 5vw, 64px); }
@media (min-width: 861px) {
  .steps--four { grid-template-columns: repeat(4, 1fr); }
}

/* Application — тёмная «ночная» глава, как финал главной */
.vac-apply { background: var(--ink); color: var(--cream); }
.vac-apply__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.vac-apply__body { position: sticky; top: 100px; }
.vac-apply .eyebrow { color: rgba(246, 241, 231, 0.6); }
.vac-apply__title { color: var(--cream); font-size: clamp(30px, 4vw, 52px); max-width: 16ch; }
.vac-apply__text { color: rgba(246, 241, 231, 0.82); max-width: 44ch; font-size: clamp(16px, 1.4vw, 18px); }
/* Honey rings only for focusables sitting on the dark ground; everything
   inside the paper sheet keeps the default lingonberry ring (honey on paper
   is ~2.3:1 and fails the 3:1 non-text contrast minimum). */
.vac-apply__body a:focus-visible { outline-color: var(--honey); }
@media (max-width: 960px) {
  .vac-apply__grid { grid-template-columns: 1fr; }
  .vac-apply__body { position: static; }
}

/* Form controls the index form doesn't have: select, textarea, file, pills */
.form__field select,
.form__field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(34, 28, 20, 0.35);
  border-radius: 0;
  padding: 8px 2px 10px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  transition: border-color 0.25s ease-out;
}
.form__field select:focus,
.form__field textarea:focus {
  outline: none;
  border-bottom: 1.5px solid var(--lingon);
}
/* Placeholder-muted until a real choice is made. `:invalid` can't be used —
   the selects deliberately carry no `required` (careers.js validates), so
   they are always valid. careers.js toggles this class instead. */
.form__field select.is-placeholder { color: rgba(107, 99, 87, 0.75); }
.form__field select option { color: var(--ink); background: var(--paper); }
.form__field textarea { resize: vertical; min-height: 72px; line-height: 1.5; }

.vac-form fieldset { border: none; margin: 0 0 22px; padding: 0; min-width: 0; }
/* The fields wrapper is itself a fieldset (ships disabled, JS enables it) —
   it must not inherit the 22px spacing meant for inner field groups. */
.vac-form fieldset.vac-form__fields { margin: 0; }
/* Disabled = no JS. Keep it legible rather than greyed into illegibility. */
.vac-form__fields[disabled] { opacity: 0.6; }
.vac-form legend {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faded);
  margin-bottom: 10px;
  padding: 0;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid rgba(34, 28, 20, 0.35);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s ease-out, background 0.2s ease-out;
}
.pill input:checked + span {
  border-color: var(--fir);
  background: rgba(68, 89, 74, 0.1);
  font-weight: 500;
}
.pill input:focus-visible + span { outline: 2px solid var(--lingon); outline-offset: 2px; }

.filefield { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filefield input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.filefield__btn { flex: none; margin: 0; }
.filefield input:focus-visible ~ .filefield__btn { outline: 2px solid var(--lingon); outline-offset: 2px; }
.filefield__name {
  font-size: 13.5px;
  color: var(--faded);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.filefield__name.is-file { color: var(--ink); font-weight: 500; }

/* Honeypot — offscreen, not display:none (bots skip those) */
.hp {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.vac-form .form__success { font-size: 17px; }

/* ============================================================
   Timed test — /careers/test
   Calm, not exam-like: one thing on screen, nothing to click away to.
   ============================================================ */
.test { padding: clamp(32px, 6vw, 72px) 0 clamp(60px, 10vw, 120px); }
.test__inner { max-width: 760px; }
.test__loading { color: var(--faded); font-size: 15px; }
.test__title { font-size: clamp(28px, 3.6vw, 44px); max-width: 20ch; }
.test__intro { font-size: clamp(17px, 1.4vw, 19px); max-width: 60ch; }
.test__greeting { font-family: var(--font-display); font-style: italic; font-size: 20px; color: var(--faded); margin-bottom: 4px; }
.test__points { display: flex; flex-direction: column; gap: 12px; margin: clamp(20px, 3vw, 30px) 0; }
.test__points li { position: relative; padding-left: 1.6em; font-size: 16.5px; max-width: 58ch; }
.test__points li::before { content: "—"; position: absolute; left: 0; color: var(--lingon); }
.test__attempts {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faded);
  border-top: 1px solid var(--honey); display: inline-block; padding-top: 10px; margin-bottom: 26px;
}
.test__startnote { display: block; margin-top: 12px; }

/* running clock in the header */
.test-clock { margin-left: auto; display: flex; align-items: baseline; gap: 8px; }
.test-clock__label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faded); }
.test-clock__value {
  font-family: var(--font-display); font-variant-numeric: tabular-nums;
  font-size: 22px; color: var(--ink); min-width: 3.5ch;
}
.test-clock.is-low .test-clock__value { color: var(--lingon); }

.test__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.test__section { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lingon); }
.test__progress { font-size: 13px; color: var(--faded); font-variant-numeric: tabular-nums; }
.test__bar { height: 2px; background: rgba(34, 28, 20, 0.14); margin-bottom: clamp(24px, 4vw, 40px); }
.test__bar span { display: block; height: 100%; background: var(--lingon); transition: width 0.35s ease-out; }

.test__q {
  font-size: clamp(21px, 2.3vw, 28px); font-weight: 520; line-height: 1.32;
  max-width: 54ch; margin-bottom: clamp(20px, 3vw, 30px);
}
.test__q:focus { outline: none; }
.test__options { display: flex; flex-direction: column; gap: 10px; margin-bottom: clamp(26px, 4vw, 40px); }
.test__option {
  text-align: left; font-family: var(--font-body); font-size: 16.5px; line-height: 1.5;
  padding: 16px 20px; background: #FBF7EF; color: var(--ink);
  border: 1px solid rgba(34, 28, 20, 0.22); border-radius: 3px; cursor: pointer;
  transition: border-color 0.18s ease-out, background 0.18s ease-out;
}
.test__option:hover { border-color: var(--ink); }
.test__option.is-chosen { border-color: var(--lingon); border-width: 1.5px; background: rgba(158, 53, 40, 0.05); }
.test__next:disabled, .test button:disabled { opacity: 0.45; cursor: default; }

.test__prompt { max-width: 62ch; margin-bottom: clamp(20px, 3vw, 28px); }
.test__prompt blockquote {
  margin: 1em 0; padding: 14px 18px; background: var(--tea);
  border-left: 2px solid var(--honey); font-size: 16px; line-height: 1.6;
}
.test__label { display: block; font-size: 13px; color: var(--faded); margin-bottom: 8px; }
.test__textarea {
  width: 100%; background: #FBF7EF; color: var(--ink);
  border: 1px solid rgba(34, 28, 20, 0.28); border-radius: 3px;
  padding: 16px 18px; font-family: var(--font-body); font-size: 16.5px; line-height: 1.6;
  resize: vertical; min-height: 220px;
}
.test__textarea:focus { outline: none; border-color: var(--lingon); }
.test__counter { font-size: 12px; color: var(--faded); margin: 8px 0 22px; font-variant-numeric: tabular-nums; }
.test__errortext {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(17px, 1.6vw, 20px); color: var(--lingon-deep); max-width: 54ch;
}

/* Video recording stage */
.test__points--video { margin-top: 6px; }
.vrec { position: relative; max-width: 560px; margin: clamp(18px, 3vw, 28px) 0; }
.vrec video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}
.vrec__timer {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--lingon);
  color: var(--cream);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  padding: 4px 12px;
  border-radius: 3px;
}
.vrec__controls { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 6px; }
.vrec__progress {
  height: 4px;
  max-width: 560px;
  background: rgba(34, 28, 20, 0.14);
  border-radius: 2px;
  margin: 14px 0;
  overflow: hidden;
}
.vrec__progress span { display: block; height: 100%; width: 0; background: var(--fir); transition: width 0.2s ease-out; }
.vrec__fallback {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 14px;
  color: var(--faded);
  border-top: 1px solid rgba(34, 28, 20, 0.14);
  padding-top: 18px;
  margin-top: clamp(20px, 3vw, 30px);
}

@media (max-width: 600px) {
  .test-clock__label { display: none; }
  .test__option { padding: 14px 16px; font-size: 16px; }
}
/* Echoes the submitted address so a typo is visible before the candidate
   spends days waiting for an email that was never deliverable. */
.form__success-email {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--faded);
  margin: 10px 0 0 34px;
  word-break: break-all;
}


/* ---- «next step» panel: shown in place of the plain confirmation once the
   application is accepted, so submitting reads as progress rather than an end. */
.next__steps {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Golos Text', system-ui, sans-serif; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faded); margin: 0 0 24px;
}
.next__step { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.next__dot {
  width: 21px; height: 21px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1.5px solid var(--rule); font-size: 11px; letter-spacing: 0; flex: none;
}
.next__step--done { color: var(--fir); }
.next__step--done .next__dot { background: var(--fir); border-color: var(--fir); color: var(--paper); }
.next__step--now { color: var(--ink); font-weight: 600; }
.next__step--now .next__dot { border-color: var(--lingon); color: var(--lingon); border-width: 2px; }
.next__sep { flex: 1 1 auto; height: 1px; background: var(--rule); min-width: 12px; }

.next__title {
  font-family: Literata, Georgia, serif; font-size: 27px; line-height: 1.22;
  margin: 0 0 12px; font-weight: 600; color: var(--ink);
}
.next__lead { margin: 0 0 20px; }
.next__facts { list-style: none; margin: 0 0 26px; padding: 0; }
.next__facts li { position: relative; padding-left: 22px; margin: 0 0 10px; line-height: 1.55; }
.next__facts li::before {
  content: ''; position: absolute; left: 3px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--lingon);
}
.next__cta { display: block; text-align: center; text-decoration: none; }
.next__later { margin: 14px 0 0; font-size: 14px; color: var(--faded); line-height: 1.5; }
@media (max-width: 640px) { .next__title { font-size: 23px; } }
