/* «Апекс» — direction v1 «Олимпиадный азарт».
   Light, colour-blocked brand page: violet drench (hero), lemon drench (teachers, form),
   ink as structure, magenta/coral as sparks. Sharp corners everywhere (radius 0);
   the only round shapes are the mascot and the bodies on the orbit diagram. */

:root {
  /* brand palette (CONTENT.md) */
  --lemon: #fff851;
  --violet: #a400ff;
  --purple: #6922bf;
  --magenta: #f400ff;
  --coral: #ff8562;
  --lilac: #faf0ff;
  --lilac-2: #efd9ff;
  --ink: #0d0b10;          /* near-black tinted toward violet */
  --ink-2: #2b2731;
  --muted: #4b4553;        /* 9.3:1 on white */
  --paper: #fdfcff;        /* off-white, chroma toward the brand violet */
  --rule: rgb(13 11 16 / 0.16);
  --error: #c2003a;        /* 5.9:1 on white */

  --font: "Geologica", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --math: "PT Serif", "Times New Roman", Georgia, serif;

  /* type scale (fluid for display, fixed for text) */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-lg: 1.25rem;
  --t-h3: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  --t-h2: clamp(2rem, 1.25rem + 2.6vw, 3.5rem);
  --t-hero: clamp(2.4rem, 0.9rem + 5.6vw, 6rem);

  /* spacing (4pt base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);

  /* motion: one signature curve, three durations */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --d-quick: 160ms;
  --d-std: 280ms;
  --d-slow: 700ms;

  /* z-index scale */
  --z-base: 1;
  --z-sticky: 100;
  --z-menu: 200;
  --z-skip: 300;

  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
sup { font-size: 0.62em; line-height: 0; vertical-align: 0.6em; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.hero :focus-visible, .ask :focus-visible, .price :focus-visible { outline-color: var(--lemon); }
.hero .sheet :focus-visible, .site-header .nav.is-open :focus-visible { outline-color: var(--violet); }

[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: var(--z-skip);
  background: var(--ink); color: #fff; padding: var(--s3) var(--s4); text-decoration: none;
}
.skip:focus { top: var(--s4); }
.nowrap-any { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.m, i.m { font-family: var(--math); font-style: italic; white-space: nowrap; }
.m i { font-style: italic; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }

.h2 {
  font-size: var(--t-h2);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.h3 { font-size: var(--t-h3); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: var(--t-lg); line-height: 1.45; max-width: 46ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: 0 var(--s5);
  border: 2px solid var(--ink); border-radius: 0;
  font-weight: 700; font-size: var(--t-base); line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform var(--d-quick) var(--ease-out), background-color var(--d-quick) ease, color var(--d-quick) ease, border-color var(--d-quick) ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 44px; padding: 0 var(--s4); font-size: var(--t-sm); }
.btn-lg { min-height: 58px; padding: 0 var(--s6); font-size: var(--t-lg); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
.btn-lemon { background: var(--lemon); color: var(--ink); border-color: var(--lemon); }
.btn-line-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.7); }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: var(--violet); border-color: var(--violet); }
  .btn-line:hover { background: var(--ink); color: #fff; }
  .btn-lemon:hover { background: #fff; border-color: #fff; }
  .btn-line-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--lemon); color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: background-color var(--d-std) ease, border-color var(--d-std) ease;
}
.site-header.is-scrolled { background: var(--paper); border-bottom-color: var(--rule); }
.site-header.over-hero:not(.is-scrolled) { background: var(--violet); color: #fff; }
.site-header.over-hero:not(.is-scrolled) .brand-text span { color: rgb(255 255 255 / 0.86); }
@media (min-width: 900px) {
  .site-header.over-hero:not(.is-scrolled) .nav a { background-image: linear-gradient(currentColor, currentColor); }
}
.site-header.over-hero:not(.is-scrolled) .header-cta { background: var(--lemon); color: var(--ink); border-color: var(--lemon); }
@media (hover: hover) and (pointer: fine) {
  .site-header.over-hero:not(.is-scrolled) .header-cta:hover { background: #fff; border-color: #fff; }
}
.header-row { display: flex; align-items: center; gap: var(--s5); height: var(--header-h); }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text span { font-size: var(--t-xs); color: var(--ink-2); }
.nav { display: flex; gap: var(--s5); position: relative; }

/* where am I: a violet bar slides under the section you are reading (one page, not separate pages) */
.nav a[aria-current] { color: var(--violet); }
.nav-ink {
  position: absolute; left: 0; bottom: 0; width: 1px; height: 3px; background: var(--violet);
  transform-origin: left center; opacity: 0; pointer-events: none;
  transition: transform 520ms var(--ease-out), opacity var(--d-std) ease;
}
.nav-ink.on { opacity: 1; }
@media (min-width: 900px) {
  .site-header.over-hero:not(.is-scrolled) .nav a[aria-current] { color: var(--lemon); }
  .site-header.over-hero:not(.is-scrolled) .nav-ink { background: var(--lemon); }
}
.site-header.over-hero:not(.is-scrolled) .brand-text .nav-now { color: var(--lemon); }
.nav-ink.jump { transition: opacity var(--d-std) ease; }
.brand-text .nav-now { display: none; font-size: var(--t-xs); font-weight: 700; color: var(--violet); white-space: nowrap; }
@keyframes now-in { from { opacity: 0; transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  .nav-ink { transition: opacity var(--d-std) ease; }
  .brand-text .nav-now { animation: none !important; }
}
.nav a { text-decoration: none; font-weight: 500; font-size: var(--t-sm); padding: var(--s2) 0; background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 2px no-repeat; transition: background-size var(--d-std) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { background-size: 100% 2px; } }
.menu-btn { display: none; }

@media (max-width: 1099px) { .hide-sm { display: none; } }
@media (max-width: 899px) {
  .menu-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    border: 2px solid currentColor; background: transparent; color: inherit; cursor: pointer; padding: 0;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    display: block; width: 18px; height: 2px; background: currentColor; content: "";
    transition: transform var(--d-std) var(--ease-out), opacity var(--d-quick) ease;
  }
  .menu-icon { position: relative; }
  .menu-icon::before { position: absolute; top: -6px; }
  .menu-icon::after { position: absolute; top: 6px; }
  .menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
  .header-row { gap: var(--s3); }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); z-index: var(--z-menu);
    flex-direction: column; gap: 0; padding: var(--s3) var(--gutter) var(--s5);
    background: var(--paper); color: var(--ink); border-bottom: 2px solid var(--ink);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--d-quick) ease, transform var(--d-std) var(--ease-out), visibility 0s linear var(--d-std);
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a { font-size: var(--t-lg); padding: var(--s4) 0; border-bottom: 1px solid var(--rule); background: none; }
  .nav-ink { display: none; }
  .nav a[aria-current]::before {
    content: ""; display: inline-block; width: 10px; height: 10px; margin-right: var(--s3);
    background: var(--violet); vertical-align: 0.08em;
  }
  /* the menu is folded on phones, so the header names the current section next to the logo */
  .brand-text.has-now > span:not(.nav-now) { display: none; }
  .brand-text.has-now .nav-now { display: block; animation: now-in var(--d-std) var(--ease-out); }
}
@media (max-width: 420px) {
  .brand-text span { display: none; }
  .header-cta { padding: 0 var(--s3); }
}
@media (max-width: 389px) {
  .brand { gap: var(--s2); }
  .brand img { width: 34px; height: 34px; }
  .header-cta { font-size: 0.875rem; padding: 0 10px; }
}
/* narrow phones: even out ragged body copy with Russian hyphenation (headings never hyphenate) */
@media (max-width: 520px) {
  p, li, dd, figcaption, .rung-full {
    -webkit-hyphens: manual; hyphens: manual;
    hyphenate-limit-chars: 8 4 3;
  }
  h1, h2, h3, .statement, .btn, .stream-text b { -webkit-hyphens: manual; hyphens: manual; }
}

/* ---------- hero ---------- */
.hero { background: var(--violet); color: #fff; padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 7vw, 96px); }
.hero-title {
  font-size: var(--t-hero);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: clamp(24px, 3.5vw, 48px);
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-title .line > span { display: block; }
.line-violet { color: var(--violet); }
.hero .line-violet { color: var(--lemon); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.hero-lead { font-size: var(--t-lg); line-height: 1.45; max-width: 30ch; font-weight: 500; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); margin-top: var(--s6); }

/* the problem sheet */
.sheet {
  background: #fff; color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 0 22px 48px -20px rgb(22 0 48 / 0.6);
}
.problem {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: var(--s5);
  padding: clamp(16px, 2.2vw, 28px);
}
.sheet-kicker {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--purple); margin-bottom: var(--s3);
}
.problem-q { font-size: 1.0625rem; line-height: 1.45; font-weight: 600; letter-spacing: 0; text-wrap: pretty; }
.control { margin-top: var(--s5); }
.control-label { display: block; font-size: var(--t-sm); font-weight: 500; margin-bottom: var(--s2); }
.control-row { display: flex; align-items: center; gap: var(--s4); }
.control-val {
  min-width: 6.2ch; text-align: right; font-weight: 800; font-size: var(--t-lg);
  font-variant-numeric: tabular-nums;
}
.control-hint { font-size: var(--t-xs); color: var(--muted); margin-top: var(--s1); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 44px; background: transparent; cursor: pointer; margin: 0;
  --fill: 15%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; background: linear-gradient(90deg, var(--violet) var(--fill), var(--lilac-2) var(--fill));
}
input[type="range"]::-moz-range-track { height: 6px; background: var(--lilac-2); }
input[type="range"]::-moz-range-progress { height: 6px; background: var(--violet); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px;
  background: var(--ink); border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ink);
  transition: transform var(--d-quick) var(--ease-out);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; background: var(--ink); border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ink);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]:focus-visible { outline-offset: 0; }

.readouts { display: grid; gap: var(--s2); margin-top: var(--s4); }
.readouts > div { display: grid; grid-template-columns: 5.5em 1fr; align-items: baseline; gap: var(--s3); border-top: 1px solid var(--rule); padding-top: var(--s2); }
.readouts dt { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.readouts dd { font-size: var(--t-base); }
.readouts b { font-weight: 800; font-variant-numeric: tabular-nums; font-size: var(--t-lg); }

.status {
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  font-size: var(--t-sm); line-height: 1.4; font-weight: 500;
  background: var(--lilac); border: 1.5px solid var(--ink);
  transition: background-color var(--d-std) ease;
}
.status[data-state="hit"] { background: var(--coral); font-weight: 700; }
.status.pop { animation: pop 420ms var(--ease-out); }
@keyframes pop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.solution { margin-top: var(--s3); font-size: var(--t-sm); }
.solution summary {
  cursor: pointer; font-weight: 700; padding: var(--s2) 0; list-style: none;
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px;
}
.solution summary::-webkit-details-marker { display: none; }
.solution summary::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--d-std) var(--ease-out);
}
.solution[open] summary::before { transform: rotate(45deg); }
.solution ol { padding-left: 1.3em; display: grid; gap: var(--s2); }
.solution[open] ol { animation: fade-down var(--d-std) var(--ease-out); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } }

.orbit-fig { align-self: center; background: #fff; }
#orbit { width: 100%; height: auto; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.grid-line { stroke: rgb(105 34 191 / 0.10); stroke-width: 0.6; }
.planet-orbits circle { fill: none; stroke: rgb(13 11 16 / 0.32); stroke-width: 0.7; }
.planet { fill: var(--ink); }
.sun { fill: var(--lemon); stroke: var(--ink); stroke-width: 1.2; }
.comet-orbit { fill: none; stroke: var(--violet); stroke-width: 1.6; }
.comet { fill: var(--magenta); stroke: var(--ink); stroke-width: 0.8; }
.comet-tail { stroke: var(--coral); stroke-width: 2.2; stroke-linecap: round; }
.dim line { stroke: var(--ink); stroke-width: 0.8; stroke-dasharray: 2 2; }
.svg-label { font-family: var(--font); fill: var(--ink-2); font-size: 8px; font-weight: 500; }
.svg-label-strong { fill: var(--ink); font-weight: 700; }
.scale-bar line { stroke: var(--ink); stroke-width: 1; }
.handle { cursor: ew-resize; }
.handle-hit { fill: transparent; }
.handle-dot { fill: var(--violet); stroke: #fff; stroke-width: 2; transition: r var(--d-quick) var(--ease-out); }
.handle:hover .handle-dot, .is-dragging .handle-dot { r: 6; }

/* ---------- proof / protocol ---------- */
.proof { padding: var(--section) 0; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.proof-photo { position: sticky; top: calc(var(--header-h) + 24px); }
.proof-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 52% 50%; }
.proof-body .lead { margin-top: var(--s4); }
.protocol { width: 100%; border-collapse: collapse; margin-top: var(--s7); }
.protocol th {
  text-align: left; font-size: var(--t-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding: 0 0 var(--s3); border-bottom: 2px solid var(--ink);
}
.protocol td { padding: var(--s5) 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.protocol td:last-child { padding-top: calc(var(--s5) + 0.35em); }
.protocol td + td, .protocol th + th { padding-left: var(--s5); }
.protocol td:last-child { font-size: var(--t-base); max-width: 44ch; }
.res {
  width: 1%; white-space: nowrap;
  font-size: clamp(2.25rem, 1.5rem + 2.2vw, 3.75rem); font-weight: 800; line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.res-accent { color: var(--violet); }
.res-text { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); letter-spacing: -0.02em; }
.footnote { font-size: var(--t-xs); color: var(--muted); margin-top: var(--s4); }

/* ---------- teachers ---------- */
.teachers { background: var(--lemon); color: var(--ink); padding: var(--section) 0 clamp(64px, 8vw, 112px); }
.teachers-title { font-size: var(--t-h3); font-weight: 700; color: var(--violet); letter-spacing: 0; margin-bottom: var(--s5); }
.statement {
  font-size: clamp(1.75rem, 1rem + 2.3vw, 3rem); line-height: 1.16; font-weight: 700;
  letter-spacing: -0.025em; max-width: 26ch;
}
.statement mark {
  color: #fff; background: linear-gradient(var(--violet), var(--violet)) left center / 100% 100% no-repeat;
  padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  transition: background-size 900ms var(--ease-out);
}

.program {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) clamp(32px, 5vw, 80px);
  margin-top: clamp(48px, 6vw, 88px); padding-top: var(--s5); border-top: 2px solid var(--ink);
  max-width: 980px;
}
.program h3 { font-size: var(--t-h3); line-height: 1.2; margin-bottom: var(--s2); }
.program p { max-width: 42ch; }

/* ---------- why ---------- */
.why { padding: var(--section) 0; }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.why-feature { position: sticky; top: calc(var(--header-h) + 24px); }
.why-feature > p { max-width: 52ch; margin-top: var(--s3); }
.equation { background: var(--lilac); border: 2px solid var(--ink); padding: var(--s5) var(--s5) var(--s4); margin: var(--s6) 0 var(--s6); }
.eq-line { font-size: clamp(1.9rem, 1.2rem + 2vw, 2.9rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.eq-sign { color: var(--violet); padding: 0 0.12em; }
.eq-note { font-size: var(--t-sm); color: var(--muted); margin-top: var(--s2); }
.reasons { list-style: none; display: grid; gap: 0; margin-top: clamp(0px, 9vw, 132px); }
.reasons li { padding: var(--s6) 0; border-top: 2px solid var(--ink); }
.reasons li:last-child { padding-bottom: 0; }
.reasons p { margin-top: var(--s3); max-width: 56ch; color: var(--ink-2); }

/* ---------- stream tokens (numeral + label always carry the meaning; colour only echoes it) ---------- */
.st-1 { --st-bg: var(--lilac);   --st-fg: var(--ink); --st-sub: var(--ink-2); }
.st-2 { --st-bg: var(--lilac-2); --st-fg: var(--ink); --st-sub: var(--ink-2); }
.st-3 { --st-bg: var(--violet);  --st-fg: #fff;       --st-sub: rgb(255 255 255 / 0.9); }
.st-4 { --st-bg: var(--purple);  --st-fg: #fff;       --st-sub: rgb(255 255 255 / 0.88); }
.st-5 { --st-bg: var(--ink);     --st-fg: #fff;       --st-sub: rgb(255 255 255 / 0.8); }

/* ---------- annual course: intro ---------- */
.course { padding: var(--section) 0; border-top: 1px solid var(--rule); }
.course-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "title galaxy" "intro galaxy";
  grid-template-rows: auto 1fr;
  gap: var(--s6) clamp(32px, 5vw, 80px); align-items: start;
}
.course-title { grid-area: title; }
.course-intro { grid-area: intro; }

/* galaxy: a dark sheet beside the course intro, never behind text */
.galaxy {
  grid-area: galaxy; background: var(--ink); color: #fff; border: 2px solid var(--ink);
  box-shadow: 0 22px 48px -22px rgb(22 0 48 / 0.55);
}
.galaxy-stage {
  position: relative; aspect-ratio: 5 / 4;
  background: radial-gradient(ellipse at 52% 50%, #2a0a4d 0%, #12081f 62%, var(--ink) 100%);
}
.galaxy-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: ew-resize; }
.galaxy-ctrl { padding: var(--s4) var(--s5) var(--s5); border-top: 1px solid rgb(255 255 255 / 0.18); }
.galaxy .control-val { color: var(--lemon); min-width: 3.6ch; }
.galaxy-cap { margin-top: var(--s2); font-size: var(--t-sm); line-height: 1.5; color: rgb(255 255 255 / 0.86); min-height: 3em; }
.galaxy input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--lemon) var(--fill), rgb(255 255 255 / 0.28) var(--fill));
}
.galaxy input[type="range"]::-moz-range-track { background: rgb(255 255 255 / 0.28); }
.galaxy input[type="range"]::-moz-range-progress { background: var(--lemon); }
.galaxy input[type="range"]::-webkit-slider-thumb { background: var(--lemon); border-color: var(--ink); box-shadow: 0 0 0 2px var(--lemon); }
.galaxy input[type="range"]::-moz-range-thumb { background: var(--lemon); border-color: var(--ink); box-shadow: 0 0 0 2px var(--lemon); }
.galaxy :focus-visible { outline-color: var(--lemon); }
.course-title {
  font-size: clamp(2.6rem, 0.9rem + 5.2vw, 5.75rem); line-height: 0.98; font-weight: 800;
  letter-spacing: -0.035em;
}
.course-intro p + p { margin-top: var(--s3); max-width: 46ch; color: var(--ink-2); }
.course-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

.theses {
  list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 var(--s5); margin-top: clamp(48px, 6vw, 80px);
}
.theses li { border-top: 2px solid var(--ink); }
.theses a {
  display: block; padding: var(--s4) 0 var(--s2); text-decoration: none; color: var(--ink-2);
  font-size: var(--t-sm); line-height: 1.45;
}
.theses b { display: block; color: var(--ink); font-size: var(--t-base); line-height: 1.3; margin-bottom: var(--s1); }
.theses a::after {
  content: ""; display: block; width: 8px; height: 8px; margin-top: var(--s3);
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); transition: transform var(--d-std) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .theses a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .theses a:hover::after { transform: translateY(4px) rotate(45deg); }
}

/* ---------- stream ladder: I → V → diploma ---------- */
.streams { margin-top: clamp(72px, 9vw, 128px); }
.streams-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s4) clamp(32px, 5vw, 80px); align-items: end;
}
.streams-title { font-size: clamp(1.75rem, 1.15rem + 1.8vw, 2.75rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; }
.streams-head p { max-width: 46ch; }

.ladder {
  list-style: none; display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.15fr);
  gap: var(--s3); align-items: end; margin-top: var(--s7);
}
.rung-btn {
  position: relative; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); text-align: left;
  padding: var(--s4) var(--s4) var(--s5); border: 2px solid var(--ink); border-radius: 0; cursor: pointer;
  background: var(--st-bg); color: var(--st-fg);
  transition: transform var(--d-std) var(--ease-out), box-shadow var(--d-std) var(--ease-out);
}
.rung-1 .rung-btn { min-height: 200px; }
.rung-2 .rung-btn { min-height: 240px; }
.rung-3 .rung-btn { min-height: 280px; }
.rung-4 .rung-btn { min-height: 320px; }
.rung-5 .rung-btn { min-height: 360px; }
.rung-num { font-size: clamp(2.5rem, 1.5rem + 2.4vw, 4.25rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.03em; }
.rung-label { font-size: clamp(1.05rem, 0.85rem + 0.6vw, 1.4rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.rung-full { margin-top: auto; font-size: var(--t-xs); line-height: 1.35; color: var(--st-sub); text-wrap: pretty; }
.rung-mark {
  position: absolute; top: var(--s3); right: var(--s3);
  padding: 2px var(--s2); font-size: var(--t-xs); font-weight: 700; line-height: 1.3;
  background: var(--lemon); color: var(--ink); border: 1.5px solid var(--ink);
  opacity: 0; transform: translateY(-4px) scale(0.96);
  transition: opacity var(--d-quick) ease, transform var(--d-std) var(--ease-out);
}
.rung-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 3px var(--magenta); }
.rung-btn.st-3[aria-pressed="true"], .rung-btn.st-4[aria-pressed="true"], .rung-btn.st-5[aria-pressed="true"] {
  box-shadow: inset 0 0 0 3px var(--lemon), 0 0 0 3px var(--magenta);
}
.rung-btn[aria-pressed="true"] .rung-mark { opacity: 1; transform: none; }
.rung-btn.st-3:focus-visible, .rung-btn.st-4:focus-visible, .rung-btn.st-5:focus-visible { outline-color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .rung-btn:hover { transform: translateY(-6px); } }
.rung-btn:active { transform: scale(0.985); }

.goal {
  min-height: 400px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s4);
  padding: var(--s4) var(--s4) var(--s5); background: var(--lemon); border: 2px solid var(--ink);
  font-size: clamp(1.5rem, 1rem + 1.4vw, 2.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em;
}
.goal-small { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }

.ladder-axis {
  position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s4);
  margin-top: var(--s3); padding: var(--s2) var(--s5) 0 0; border-top: 2px solid var(--ink);
  font-size: var(--t-xs); color: var(--muted); font-weight: 500;
}
.ladder-axis::after {
  content: ""; position: absolute; right: 0; top: -7px; width: 12px; height: 12px;
  border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: rotate(45deg);
}

.stream-card {
  margin-top: var(--s5); padding: var(--s5); background: #fff; border: 2px solid var(--ink);
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: center; gap: var(--s5) clamp(24px, 4vw, 64px);
}
.stream-body { display: grid; gap: var(--s4); justify-items: start; }
.stream-text { font-weight: 500; max-width: 54ch; font-size: var(--t-lg); line-height: 1.45; }

/* Kepler orbits: five streams around one goal (pointer shortcut; the ladder is the real control) */
.kepler { margin: 0; }
.kepler-svg { display: block; width: 100%; height: auto; overflow: visible; }
.k-rings circle { fill: none; stroke: var(--rule); stroke-width: 1.5; transition: stroke var(--d-std) ease, stroke-width var(--d-std) ease; }
.k-glow { fill: var(--lemon); opacity: 0.55; }
.k-goal { fill: var(--lemon); stroke: var(--ink); stroke-width: 0.09; stroke-linejoin: round; }
.k-node { cursor: pointer; }
.k-dot { transform-box: fill-box; transform-origin: center; transition: transform var(--d-std) var(--ease-out); }
.k-dot circle { fill: var(--st-bg); stroke: var(--ink); stroke-width: 2; }
.k-dot text { fill: var(--st-fg); font: 800 17px var(--font); text-anchor: middle; pointer-events: none; }
.kepler[data-active] .k-node:not(.is-on) { opacity: 0.45; }
.k-rings circle.is-on { stroke: var(--magenta); stroke-width: 3; }
.k-node.is-on .k-dot { transform: scale(1.3); }
.k-node.is-on .k-dot circle { stroke-width: 2.5; }
@media (hover: hover) and (pointer: fine) { .k-node:hover .k-dot { transform: scale(1.18); } .k-node.is-on:hover .k-dot { transform: scale(1.3); } }
.kepler-cap { margin-top: var(--s3); font-size: var(--t-xs); line-height: 1.5; color: var(--muted); text-align: center; max-width: 40ch; margin-inline: auto; }
.stream-text b { font-weight: 800; }
.stream-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.stream-card.swap .stream-text { animation: fade-down var(--d-std) var(--ease-out); }

/* ---------- schedule: fixture grid ---------- */
.schedule { background: var(--lilac); padding: var(--section) 0; }
.schedule-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s4) clamp(32px, 5vw, 80px); align-items: end;
}
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s7); }
.filter-label { font-weight: 600; font-size: var(--t-sm); margin-right: var(--s2); }
.chip-btn {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3) 0 var(--s2);
  border: 2px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink);
  font-size: var(--t-sm); font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color var(--d-quick) ease, color var(--d-quick) ease, transform var(--d-quick) var(--ease-out);
}
.chip-btn b {
  display: inline-grid; place-items: center; min-width: 2.1em; height: 28px; padding: 0 0.3em;
  background: var(--st-bg); color: var(--st-fg); border: 1.5px solid var(--ink); font-weight: 800;
}
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 0 0 3px var(--magenta); }
.chip-btn[aria-pressed="true"] b { border-color: #fff; }
.chip-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .chip-btn:not([aria-pressed="true"]):hover { background: var(--lilac-2); } }
.week-readout { margin-top: var(--s4); font-weight: 500; min-height: 1.55em; }
.week-readout b { font-weight: 800; }

.week {
  --mpx: 0.8px;          /* vertical pixels per minute */
  --head: 52px;
  --span: 660;           /* minutes shown: 10:00–21:00 */
  margin-top: var(--s4);
  display: grid; grid-template-columns: 60px minmax(0, 1fr);
  background: #fff; border: 2px solid var(--ink);
  box-shadow: 0 18px 40px -18px rgb(60 0 90 / 0.3);
}
.week-times { position: relative; height: calc(var(--head) + var(--span) * var(--mpx) + 14px); border-right: 2px solid var(--ink); }
.week-times span {
  position: absolute; right: var(--s2); top: calc(var(--head) + var(--m) * var(--mpx));
  transform: translateY(-50%); font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums;
}
.week-days { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.day + .day { border-left: 1px solid var(--rule); }
.day-name {
  display: grid; place-items: center; height: var(--head);
  border-bottom: 2px solid var(--ink); font-weight: 800; font-size: var(--t-base);
}
.day-sun .day-name, .day-sat .day-name { background: var(--lilac); }
.dn-f { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.slots {
  list-style: none; position: relative; height: calc(var(--span) * var(--mpx) + 14px);
  background: repeating-linear-gradient(to bottom, transparent 0 calc(60 * var(--mpx) - 1px), var(--rule) calc(60 * var(--mpx) - 1px) calc(60 * var(--mpx)));
}
.slot {
  position: absolute; left: 5px; right: 5px;
  top: calc(var(--from) * var(--mpx)); height: calc((var(--to) - var(--from)) * var(--mpx));
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: var(--s1) var(--s2); overflow: hidden;
  background: var(--st-bg); color: var(--st-fg); border: 1.5px solid var(--ink);
  font-size: var(--t-xs); line-height: 1.2;
  transition: background-color var(--d-std) ease, color var(--d-std) ease, border-color var(--d-std) ease, box-shadow var(--d-std) var(--ease-out);
}
.slot-num { font-size: var(--t-sm); font-weight: 800; }
.slot-time { font-variant-numeric: tabular-nums; font-weight: 500; }
.slot-sat {
  justify-content: flex-start; padding-top: var(--s3);
  background: repeating-linear-gradient(-45deg, var(--lemon) 0 10px, #fffbb0 10px 20px); color: var(--ink);
}
.slot-sat .slot-num { font-size: var(--t-sm); line-height: 1.25; }
/* a stream is picked: its two slots stay filled and ringed, the rest turn to outlines */
.week[data-active] .slot:not(.is-on) { background: #fff; color: var(--muted); border-color: var(--rule); }
.slot.is-on { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 3px var(--magenta); z-index: 1; }
.slot.is-on.st-3, .slot.is-on.st-4, .slot.is-on.st-5 { box-shadow: inset 0 0 0 2px var(--lemon), 0 0 0 3px var(--magenta); }

/* ---------- load builder ---------- */
.load { padding: var(--section) 0; }
.load-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6) clamp(32px, 5vw, 80px); align-items: start; }
.load-copy { position: sticky; top: calc(var(--header-h) + 24px); }
.load-copy .lead { margin-top: var(--s4); }
.core { background: var(--ink); color: #fff; padding: var(--s5); border: 2px solid var(--ink); }
.core-tag {
  display: inline-block; padding: 2px var(--s2); background: var(--lemon); color: var(--ink);
  font-size: var(--t-xs); font-weight: 700; line-height: 1.4;
}
.core-name { margin-top: var(--s3); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
.core-desc { margin-top: var(--s2); color: rgb(255 255 255 / 0.86); max-width: 48ch; }
.plus { font-size: clamp(2.5rem, 2rem + 1.5vw, 3.5rem); font-weight: 800; line-height: 1; color: var(--violet); padding: var(--s3) 0 var(--s2) var(--s4); }
.addons { border: 0; margin: 0; padding: 0; min-width: 0; border-bottom: 2px solid var(--ink); }
.addons legend { padding: 0; margin-bottom: var(--s3); font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.addon {
  position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px var(--s4);
  padding: var(--s4) var(--s3); border-top: 1px solid var(--rule); cursor: pointer;
  transition: background-color var(--d-quick) ease;
}
.addon:first-of-type { border-top: 2px solid var(--ink); }
.addon input { position: absolute; left: var(--s3); top: var(--s4); width: 28px; height: 28px; margin: 0; opacity: 0; cursor: pointer; }
.addon-box {
  grid-row: 1 / span 2; width: 28px; height: 28px; border: 2px solid var(--ink); background: #fff; position: relative;
  transition: background-color var(--d-quick) ease, border-color var(--d-quick) ease;
}
.addon-box::after {
  content: ""; position: absolute; left: 8px; top: 3px; width: 8px; height: 14px;
  border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(45deg) scale(0.4); opacity: 0;
  transition: transform var(--d-std) var(--ease-out), opacity var(--d-quick) ease;
}
.addon input:checked + .addon-box { background: var(--violet); border-color: var(--violet); }
.addon input:checked + .addon-box::after { opacity: 1; transform: rotate(45deg) scale(1); }
.addon input:focus-visible + .addon-box { outline: 3px solid var(--violet); outline-offset: 3px; }
.addon:has(input:checked) { background: var(--lilac); }
.addon-name { font-size: var(--t-lg); font-weight: 700; line-height: 1.25; }
.addon-desc { color: var(--ink-2); font-size: var(--t-sm); }
@media (hover: hover) and (pointer: fine) { .addon:hover .addon-box { border-color: var(--violet); } }
.builder-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); margin-top: var(--s5); }
.builder-sum { font-size: var(--t-lg); font-weight: 700; line-height: 1.3; max-width: 40ch; }
.builder-sum .eq-sign { font-weight: 800; padding: 0 0.15em 0 0; }

/* ---------- curatorship + balance wheel ---------- */
.curator { padding: var(--section) 0; border-top: 1px solid var(--rule); }
.curator-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7) clamp(32px, 5vw, 80px); align-items: start; }
.curator-copy .lead { margin-top: var(--s4); }
.curator-claim { margin-top: var(--s6); font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.85rem); font-weight: 700; line-height: 1.22; letter-spacing: -0.02em; max-width: 26ch; }
.duties { list-style: none; margin-top: var(--s6); }
.duties li { position: relative; padding: var(--s3) 0 var(--s3) 30px; border-top: 1px solid var(--rule); font-weight: 500; max-width: 48ch; }
.duties li::before {
  content: ""; position: absolute; left: 2px; top: calc(var(--s3) + 0.45em); width: 14px; height: 8px;
  border-left: 2.5px solid var(--violet); border-bottom: 2.5px solid var(--violet); transform: rotate(-45deg);
}

.wheel { margin: 0; padding: clamp(18px, 2.6vw, 36px); }
.wheel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.wheel .stamp-sm { font-size: 1.05rem; border-width: 4px; padding: 0 var(--s3); margin: 2px var(--s1) 0 0; transform: rotate(-6deg); flex: none; }
.wheel-lede { margin-top: var(--s2); color: var(--ink-2); font-size: var(--t-sm); max-width: 48ch; }
.wheel-svg { display: block; width: 100%; max-width: 540px; height: auto; margin: var(--s4) auto 0; overflow: visible; }
.w-ring, .w-spoke { fill: none; stroke: rgb(105 34 191 / 0.18); stroke-width: 1; }
.w-ring:last-of-type { stroke: rgb(13 11 16 / 0.3); }
.w-you { fill: rgb(164 0 255 / 0.13); stroke: var(--violet); stroke-width: 3; stroke-linejoin: round; }
.wheel-svg .w-you { stroke-dasharray: 1; }
.w-med { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 7 5; stroke-linejoin: round; }
.w-best { fill: none; stroke: #c400cc; stroke-width: 2.5; stroke-dasharray: 0.5 6; stroke-linecap: round; stroke-linejoin: round; }
.w-best-mark { fill: #c400cc; stroke: #fff; stroke-width: 1; }
.w-dot { fill: var(--violet); stroke: #fff; stroke-width: 1.5; }
.w-dot-low { fill: #fff; stroke: var(--violet); stroke-width: 3; }
.w-label { font-family: var(--font); font-size: 16px; font-weight: 600; fill: var(--ink); }
@media (min-width: 640px) { .w-label { font-size: 13px; } .wheel-svg { max-width: 470px; } }
.wheel-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s5); font-size: var(--t-sm); font-weight: 500; }
.wheel-legend li { display: inline-flex; align-items: center; gap: var(--s2); }
.wheel-legend svg { width: 36px; height: 12px; flex: none; overflow: visible; }
.wheel figcaption { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); font-size: var(--t-sm); color: var(--ink-2); max-width: 62ch; }

/* ---------- price (ink) ---------- */
.price { background: var(--ink); color: #fff; padding: var(--section) 0; }
.price-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6) clamp(32px, 5vw, 80px); align-items: start; }
.price .lead { margin-top: var(--s4); color: rgb(255 255 255 / 0.86); }
.tariffs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid rgb(255 255 255 / 0.6); border-bottom: 1px solid rgb(255 255 255 / 0.25); }
.tariff { padding: var(--s5) var(--s5) var(--s5) 0; }
.tariff + .tariff { padding: var(--s5) 0 var(--s5) var(--s5); border-left: 1px solid rgb(255 255 255 / 0.25); }
.tariff dt { font-size: var(--t-sm); font-weight: 600; color: rgb(255 255 255 / 0.78); }
.tariff dd { margin-top: var(--s3); }
.amount {
  display: block; white-space: nowrap; font-size: clamp(2.1rem, 1.4rem + 2.2vw, 3.6rem); font-weight: 800;
  line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.tariff-pack .amount { color: var(--lemon); }
.per { display: block; margin-top: var(--s2); color: rgb(255 255 255 / 0.86); }
.terms { list-style: none; }
.terms li { position: relative; padding: var(--s4) 0 var(--s4) 30px; border-bottom: 1px solid rgb(255 255 255 / 0.25); }
.terms li::before {
  content: ""; position: absolute; left: 2px; top: calc(var(--s4) + 0.45em); width: 14px; height: 8px;
  border-left: 2.5px solid var(--lemon); border-bottom: 2.5px solid var(--lemon); transform: rotate(-45deg);
}
.price-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.price-note { margin-top: var(--s3); font-size: var(--t-xs); color: rgb(255 255 255 / 0.72); }

/* hero offer line */
.hero-offer { margin-top: var(--s4); max-width: 32ch; font-weight: 500; }
.hero-offer a { color: var(--lemon); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* program link inside the lemon block */
.program a { font-weight: 700; color: var(--purple); text-decoration-thickness: 2px; text-underline-offset: 3px; white-space: nowrap; }

/* stream picker in the consultation form */
.stream-field, .msgr-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.stream-field legend, .msgr-field legend { padding: 0; margin-bottom: var(--s2); font-weight: 600; font-size: var(--t-sm); }
.stream-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.field .opt-chip { position: relative; display: block; font-weight: 500; cursor: pointer; }
.opt-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt-chip span {
  display: flex; align-items: center; gap: var(--s2); min-height: 52px; height: 100%; padding: var(--s2) var(--s3);
  border: 2px solid var(--ink); background: #fff; font-size: var(--t-sm); line-height: 1.25;
  transition: background-color var(--d-quick) ease, color var(--d-quick) ease;
}
.opt-chip b { font-weight: 800; font-size: var(--t-base); min-width: 1.6em; }
.opt-chip input:checked + span { background: var(--ink); color: #fff; }
.opt-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--violet); }
@media (hover: hover) and (pointer: fine) { .opt-chip input:not(:checked):hover + span { background: var(--lilac); } }

/* contact channel: the same chips joined into one segmented control (real radios, arrow keys) */
.msgr-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.msgr-options .opt-chip + .opt-chip { margin-left: -2px; } /* adjacent chips share one 2px border */
.msgr-options .opt-chip:has(input:checked), .msgr-options .opt-chip:focus-within { z-index: var(--z-base); }
.msgr-options .opt-chip span { justify-content: center; min-height: 48px; padding-inline: var(--s2); font-weight: 600; text-align: center; }
.msgr-options .opt-chip input:focus-visible + span { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--violet); }
.field-hint { font-size: var(--t-sm); color: var(--muted); }

/* ---------- signup ---------- */
.signup { background: var(--lemon); padding: var(--section) 0; }
.signup-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.signup .lead { margin-top: var(--s5); }
.gets { list-style: none; margin-top: var(--s4); display: grid; gap: var(--s3); max-width: 44ch; }
.gets li { padding-left: 28px; position: relative; font-weight: 500; }
.gets li::before { content: ""; position: absolute; left: 0; top: 0.48em; width: 14px; height: 8px; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg); }
.form-sheet { padding: clamp(20px, 3vw, 40px); position: relative; min-height: 360px; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s5); }
.field { display: grid; gap: var(--s2); align-content: start; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: var(--t-sm); }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 54px; padding: var(--s3) var(--s4);
  border: 2px solid var(--ink); border-radius: 0; background: #fff; font-size: var(--t-base);
  transition: border-color var(--d-quick) ease, box-shadow var(--d-quick) ease;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #6a6472; opacity: 1; } /* 5.6:1 on white */
.field input:focus-visible, .field textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--violet); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field.shake { animation: shake 320ms var(--ease-in-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 100% { transform: none; } }
.err { color: var(--error); font-size: var(--t-sm); font-weight: 500; display: flex; gap: var(--s2); align-items: baseline; }
.err::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--error); color: #fff; font-size: 0.8em; font-weight: 800; transform: translateY(0.1em); }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.form-status { font-size: var(--t-sm); font-weight: 500; color: var(--muted); max-width: 46ch; }
.form-status[hidden] { display: none; }
.form-status.is-error { color: var(--error); }
.form-status a { font-weight: 700; }
.form.is-sending button[type="submit"] { opacity: 0.6; cursor: progress; }

/* personal-data consent: a real checkbox, never pre-ticked */
.consent { display: flex; gap: var(--s3); align-items: flex-start; font-weight: 500; font-size: var(--t-sm); line-height: 1.45; cursor: pointer; }
.field .consent input {
  flex: none; appearance: none; -webkit-appearance: none; width: 26px; min-height: 0; height: 26px; padding: 0; margin: 0;
  border: 2px solid var(--ink); background: #fff; display: grid; place-items: center; cursor: pointer;
}
.field .consent input::after {
  content: ""; width: 12px; height: 7px; margin-top: -3px; border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform var(--d-quick) var(--ease-out);
}
.field .consent input:checked { background: var(--ink); }
.field .consent input:checked::after { transform: rotate(-45deg) scale(1); }
.consent a { text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.consent span { padding-top: 2px; }
/* honeypot: off-screen for people, still a field for naive bots */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.success { display: grid; justify-items: start; gap: var(--s3); padding: var(--s4) 0; }
.success:focus { outline: none; }
.success[hidden] { display: none; }
.stamp {
  font-weight: 800; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--violet); border: 4px double var(--violet); padding: var(--s1) var(--s4); transform: rotate(-4deg);
  margin-bottom: var(--s3); line-height: 1.15;
}
.success.is-in .stamp { animation: stamp 460ms var(--ease-out) both; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-9deg) scale(1.35); } 70% { opacity: 1; transform: rotate(-3deg) scale(0.98); } 100% { transform: rotate(-4deg) scale(1); } }
.success-title { font-size: var(--t-h3); font-weight: 700; line-height: 1.25; }
.success-text { max-width: 52ch; }

/* ---------- ask / contacts (ink) ---------- */
.ask { background: var(--ink); color: #fff; padding: var(--section) 0 0; }
/* the footer on its own, when the dark contacts section is not the last block of a page */
.footer-shell { background: var(--ink); color: #fff; }
.ask-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.ask .lead { margin-top: var(--s4); color: rgb(255 255 255 / 0.86); }
.contacts { list-style: none; margin-top: var(--s7); border-top: 1px solid rgb(255 255 255 / 0.25); }
.contacts a {
  display: flex; flex-direction: column; gap: 2px; padding: var(--s4) 0; text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / 0.25);
}
.c-label { font-size: var(--t-sm); color: rgb(255 255 255 / 0.75); }
.c-val { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 700; letter-spacing: -0.015em; transition: color var(--d-quick) ease; }
@media (hover: hover) and (pointer: fine) { .contacts a:hover .c-val { color: var(--lemon); } }
.form-dark .field input, .form-dark .field textarea { background: #1b1820; color: #fff; border-color: rgb(255 255 255 / 0.6); }
.form-dark .field input::placeholder, .form-dark .field textarea::placeholder { color: #aaa3b3; } /* 7.4:1 on #1b1820 */
.form-dark .field input:focus-visible, .form-dark .field textarea:focus-visible { box-shadow: 0 0 0 3px var(--lemon); border-color: var(--lemon); }
.form-dark .field.is-invalid input, .form-dark .field.is-invalid textarea { border-color: #ff7a9c; box-shadow: 0 0 0 1px #ff7a9c; }
.form-dark .err { color: #ff8fab; }
.form-dark .err::before { color: var(--ink); background: #ff8fab; }
.form-dark .form-status { color: rgb(255 255 255 / 0.8); }
.form-dark .form-status.is-error { color: #ff8fab; }
.form-dark .form-status a { color: var(--lemon); }
.form-dark .field .consent input { background: #1b1820; border-color: rgb(255 255 255 / 0.6); }
.form-dark .field .consent input:checked { background: var(--lemon); border-color: var(--lemon); }
.form-dark .field .consent input::after { border-color: var(--ink); }
.form-dark .field .consent input:focus-visible { box-shadow: 0 0 0 3px var(--lemon); }
.form-dark .consent a { color: var(--lemon); }
.field.is-invalid .consent input { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.form-dark .field.is-invalid .consent input { border-color: #ff7a9c; box-shadow: 0 0 0 1px #ff7a9c; }
.form-dark .opt-chip span { background: #1b1820; color: #fff; border-color: rgb(255 255 255 / 0.6); }
.form-dark .opt-chip input:checked + span { background: var(--lemon); color: var(--ink); border-color: var(--lemon); }
.form-dark .msgr-options .opt-chip input:focus-visible + span { box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--lemon); }
@media (hover: hover) and (pointer: fine) { .form-dark .opt-chip input:not(:checked):hover + span { background: var(--ink-2); } }
.form-dark .field-hint { color: rgb(255 255 255 / 0.75); }
.success-dark .stamp { color: var(--lemon); border-color: var(--lemon); }
.success-dark .success-text { color: rgb(255 255 255 / 0.86); }

.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4);
  margin-top: clamp(64px, 8vw, 112px); padding-top: var(--s5); padding-bottom: var(--s6);
  border-top: 1px solid rgb(255 255 255 / 0.25);
  font-size: var(--t-xs); color: rgb(255 255 255 / 0.75); line-height: 1.5;
}
.site-footer img { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.site-footer > p:first-of-type { flex: 1 1 320px; }
.legal-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.legal-links a { color: rgb(255 255 255 / 0.85); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .legal-links a:hover { color: var(--lemon); } }

/* ---------- reveal (progressive: content is visible without JS) ---------- */
.js [data-reveal].pre { opacity: 0; transform: translateY(18px); }
.js [data-reveal].pre.in {
  opacity: 1; transform: none;
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .ladder .rung.pre { transform: translateY(40px); }
.js .ladder .rung.pre.in { transform: none; transition-delay: calc(var(--i, 0) * 90ms); }
/* the wheel draws its three lines when it scrolls in */
.js .wheel.pre .wheel-svg .w-you { stroke-dashoffset: 1; fill-opacity: 0; }
.js .wheel.pre .wheel-svg .w-med, .js .wheel.pre .wheel-svg .w-best,
.js .wheel.pre .wheel-svg .w-best-mark, .js .wheel.pre .wheel-svg .w-dot { opacity: 0; }
.js .wheel.pre.in .wheel-svg .w-you {
  stroke-dashoffset: 0; fill-opacity: 1;
  transition: stroke-dashoffset 1200ms var(--ease-in-out) 500ms, fill-opacity 600ms ease 1400ms;
}
.js .wheel.pre.in .wheel-svg .w-med, .js .wheel.pre.in .wheel-svg .w-best,
.js .wheel.pre.in .wheel-svg .w-best-mark { opacity: 1; transition: opacity 600ms ease 250ms; }
.js .wheel.pre.in .wheel-svg .w-dot { opacity: 1; transition: opacity 400ms ease 1500ms; }
.js [data-marker].pre-mark .statement mark { background-size: 0% 100%; }

/* ---------- load choreography ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .line > span { animation: rise 900ms var(--ease-out) both; }
  .hero-title .line + .line > span { animation-delay: 90ms; }
  .hero-copy { animation: fade-up 700ms var(--ease-out) 260ms both; }
  .problem { animation: sheet-in 900ms var(--ease-out) 200ms both; }
  .comet-orbit { stroke-dasharray: 1; animation: draw 1400ms var(--ease-in-out) 650ms both; }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(28px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0s !important; }
  .js [data-reveal].pre { opacity: 1; transform: none; }
  .js [data-marker].pre-mark .statement mark { background-size: 100% 100%; }
  .field.shake, .status.pop { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1179px) {
  /* single column: kicker, question, diagram, then controls */
  .problem { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .problem-text { display: contents; }
  .problem-text > * { order: 2; }
  .problem-text > .sheet-kicker, .problem-text > .problem-q { order: 0; }
  .orbit-fig { order: 1; margin-top: var(--s4); }
}
@media (max-width: 1179px) and (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
}
@media (max-width: 999px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-lead { max-width: 40ch; }
  .proof-grid, .why-grid, .signup-grid, .ask-grid,
  .course-head, .streams-head, .schedule-head, .load-grid, .curator-grid, .price-grid { grid-template-columns: minmax(0, 1fr); }
  .course-head { grid-template-areas: "title" "intro" "galaxy"; grid-template-rows: auto; }
  .galaxy { max-width: 640px; }
  .proof-photo, .why-feature, .load-copy { position: static; }
  .theses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wheel { max-width: 640px; }
  .proof-photo img { aspect-ratio: 4 / 3; }
  .reasons { margin-top: 0; }
}
@media (max-width: 959px) {
  /* ladder becomes a descending staircase: one rung per row, indented toward the goal */
  .ladder { grid-template-columns: minmax(0, 1fr); gap: var(--s2); align-items: stretch; }
  .rung .rung-btn { min-height: 0; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 2px var(--s3); align-items: baseline; padding: var(--s3) var(--s4); }
  .rung-num { grid-row: 1 / span 2; align-self: center; font-size: 2.25rem; }
  .rung-full { margin-top: 0; font-size: var(--t-xs); }
  .rung-mark { top: 50%; transform: translateY(-50%) scale(0.96); }
  .rung-btn[aria-pressed="true"] .rung-mark { transform: translateY(-50%); }
  .rung-btn[aria-pressed="true"] .rung-label { padding-right: 5.5em; }
  .rung-2 { margin-left: 8px; } .rung-3 { margin-left: 16px; } .rung-4 { margin-left: 24px; }
  .rung-5 { margin-left: 32px; } .rung-goal { margin-left: 40px; }
  .goal { min-height: 0; flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; padding: var(--s4); font-size: 1.6rem; }
  .goal-small { order: 2; font-size: 1.125rem; }
  .ladder-axis { display: none; }
  .stream-card { padding: var(--s4); grid-template-columns: minmax(0, 1fr); }
  .kepler { max-width: 340px; width: 100%; margin-inline: auto; }
  .stream-text { font-size: var(--t-base); }
}
@media (max-width: 899px) {
  /* schedule: per-day list */
  .week { display: block; box-shadow: none; }
  .week-times { display: none; }
  .week-days { display: block; }
  .day { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3) var(--s4); }
  .day + .day { border-left: 0; border-top: 1px solid var(--rule); }
  .day-name { display: block; height: auto; border: 0; padding-top: 10px; font-size: var(--t-base); font-weight: 700; }
  .day-sun .day-name, .day-sat .day-name { background: none; }
  .dn-s { display: none; }
  .dn-f { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
  .day-sun, .day-sat { background: var(--paper); }
  .slots { position: static; height: auto; background: none; display: grid; gap: var(--s2); }
  .slot {
    position: static; height: auto; min-height: 44px; flex-direction: row; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 0 var(--s3); padding: var(--s2) var(--s3);
  }
  .slot-time { font-size: var(--t-sm); }
  .slot-sat { padding-top: var(--s2); }
}
@media (max-width: 479px) {
  .day { grid-template-columns: 2.75rem minmax(0, 1fr); padding: var(--s3); }
  .dn-s { display: inline; }
  .dn-f { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .filter-label { flex-basis: 100%; }
}
@media (max-width: 639px) {
  .theses { grid-template-columns: minmax(0, 1fr); }
  .theses a::after { display: none; }
  .theses a { padding-bottom: var(--s4); }
  .tariffs { grid-template-columns: minmax(0, 1fr); }
  .tariff, .tariff + .tariff { padding: var(--s5) 0; border-left: 0; }
  .tariff + .tariff { border-top: 1px solid rgb(255 255 255 / 0.25); }
  .price-actions .btn, .course-actions .btn { width: 100%; }
  .stream-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-foot .btn, .stream-actions, .stream-actions .btn { width: 100%; }
  .core { padding: var(--s4); }
  .addon { padding-inline: var(--s2); }
  .addon input { left: var(--s2); }
  .wheel { padding: var(--s4) var(--s3); }
  .wheel-head, .wheel-lede, .wheel-legend, .wheel figcaption { padding-inline: var(--s1); }
}
@media (max-width: 639px) {
  .form { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .protocol thead { display: none; }
  .protocol tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: var(--s5) 0; border-bottom: 1px solid var(--rule); }
  .protocol tbody tr:first-child { border-top: 2px solid var(--ink); }
  .protocol td { padding: 0; border: 0; }
  .protocol td + td { padding-left: 0; }
  .protocol td:last-child { padding-top: 0; }
  .res { width: auto; }
  .program { grid-template-columns: minmax(0, 1fr); }
  .readouts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .site-footer { align-items: flex-start; }
}

/* ---------- secondary pages: privacy policy, consent, 404 ---------- */
.doc-body { background: var(--paper); }
.doc-header { position: static; }
.doc { max-width: 76ch; padding-top: clamp(32px, 6vw, 72px); padding-bottom: var(--s8); }
.doc h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.doc h2 { margin-top: var(--s7); font-size: var(--t-h3); line-height: 1.25; text-wrap: balance; }
.doc p, .doc ul { margin-top: var(--s3); line-height: 1.6; text-wrap: pretty; }
.doc ul { padding-left: 1.25em; display: grid; gap: var(--s2); }
.doc a { color: var(--purple); font-weight: 600; text-underline-offset: 3px; }
.doc-meta { color: var(--muted); font-size: var(--t-sm); }
.doc-footer { padding-top: var(--s5); padding-bottom: var(--s6); border-top: 1px solid var(--rule); font-size: var(--t-xs); color: var(--muted); line-height: 1.6; }
.doc-footer a { color: var(--ink-2); }
.doc a[href^="tel:"] { white-space: nowrap; }

/* =====================================================================
   Pages and blocks built in the CMS (course pages, the game, news).
   Same vocabulary as the hand-made sections: ink rules, sharp corners,
   lemon / violet / ink bands, lilac as the quiet surface.
   ===================================================================== */

/* a page that does not open with the violet first screen starts with its title */
.page-head { padding: clamp(40px, 6vw, 88px) 0 clamp(32px, 4vw, 56px); border-bottom: 2px solid var(--ink); }
.page-title { font-size: var(--t-h2); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; max-width: 18ch; }
.page-head .lead { margin-top: var(--s5); }
.page-head + .blk { padding-top: clamp(40px, 5vw, 72px); }

/* general blocks sit on the paper; two in a row share one gap instead of stacking two */
.blk { padding: var(--section) 0; }
.blk + .blk { padding-top: 0; }
.blk > .wrap > .h2, .blk-head-row { margin-bottom: clamp(24px, 3vw, 40px); }
.blk > .wrap > .h2 { max-width: 20ch; }
.blk-lead { margin-top: calc(-1 * var(--s3)); margin-bottom: clamp(24px, 3vw, 40px); }
.blk-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s4) var(--s6); }

/* running text */
.prose { max-width: 68ch; line-height: 1.6; }
.prose > * + * { margin-top: var(--s4); }
.prose h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.01em; }
.prose > * + h3 { margin-top: var(--s7); }
.prose ul, .prose ol { padding-left: 1.25em; display: grid; gap: var(--s2); }
.prose a { color: var(--purple); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .prose a:hover { color: var(--violet); } }

/* picture, gallery */
.shot img { width: 100%; }
.shot figcaption, .article-cover figcaption { margin-top: var(--s3); font-size: var(--t-sm); color: var(--muted); max-width: 68ch; }
.gallery { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s4); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* cards: ruled columns, like the theses under the course title */
.cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
.card { border-top: 2px solid var(--ink); padding: var(--s5) 0 var(--s7); }
.card img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; margin-bottom: var(--s5); }
.card p { margin-top: var(--s3); color: var(--ink-2); max-width: 46ch; }
.card-link { display: block; text-decoration: none; }
.card-link .h3::after { content: " →"; color: var(--violet); display: inline-block; transition: transform var(--d-std) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .card-link:hover .h3 { color: var(--violet); }
  .card-link:hover .h3::after { transform: translateX(4px); }
}

/* questions and answers */
.qa-list { max-width: 880px; border-top: 2px solid var(--ink); }
.qa { border-bottom: 1px solid var(--rule); }
.qa summary {
  position: relative; list-style: none; cursor: pointer;
  padding: var(--s5) 56px var(--s5) 0; font-size: var(--t-lg); font-weight: 700; line-height: 1.3;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: var(--s2); top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform var(--d-std) var(--ease-out);
}
.qa[open] summary { color: var(--violet); }
.qa[open] summary::after { transform: rotate(45deg); }
.qa .prose { padding-bottom: var(--s6); }
.qa[open] .prose { animation: fade-down var(--d-std) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .qa summary:hover { color: var(--violet); } }

/* table: scrolls sideways inside its own box on a phone, never the page */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; min-width: 520px; border-collapse: collapse; }
.tbl th {
  text-align: left; vertical-align: bottom; padding: 0 var(--s5) var(--s3) 0;
  font-size: var(--t-sm); font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--ink);
}
.tbl td { vertical-align: top; padding: var(--s4) var(--s5) var(--s4) 0; border-bottom: 1px solid var(--rule); }
.tbl td:first-child { font-weight: 700; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }

/* quote: the words carry it, the name answers in violet */
.quote { border-top: 2px solid var(--ink); padding-top: var(--s6); }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.6rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.02em;
  max-width: 26ch; text-wrap: balance;
}
.quote blockquote p::before { content: "«"; }
.quote blockquote p::after { content: "»"; }
.quote figcaption { margin-top: var(--s5); display: grid; gap: var(--s1); font-size: var(--t-sm); color: var(--muted); }
.quote figcaption b { font-size: var(--t-base); color: var(--violet); }

/* a coloured band with one action */
.band { padding: clamp(40px, 6vw, 80px) 0; }
.band-lemon { background: var(--lemon); color: var(--ink); }
.band-violet { background: var(--violet); color: #fff; }
.band-ink { background: var(--ink); color: #fff; }
.band-violet :focus-visible, .band-ink :focus-visible { outline-color: var(--lemon); }
.band-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5) var(--s8); }
.band-copy { flex: 1 1 420px; }
.band-title { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.75rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; max-width: 22ch; text-wrap: balance; }
.band-text { margin-top: var(--s3); font-size: var(--t-lg); line-height: 1.45; max-width: 48ch; }
.band-violet .band-text, .band-ink .band-text { color: rgb(255 255 255 / 0.86); }

/* teachers: a photo when there is one, otherwise the name stands on its rule */
.people { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--s7) clamp(24px, 3vw, 40px); }
.person { border-top: 2px solid var(--ink); padding-top: var(--s4); }
.person-photo { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: var(--s4); }
.person-blank { display: grid; place-items: center; background: var(--lilac); color: var(--purple); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
.person-name { font-size: var(--t-lg); line-height: 1.2; font-weight: 700; }
.person-role { margin-top: var(--s2); font-size: var(--t-sm); line-height: 1.45; color: var(--ink-2); }
.person-role + .person-role { margin-top: var(--s1); }

/* product: picture left, the offer right */
.product { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.product-plain { grid-template-columns: minmax(0, 1fr); max-width: 1320px; }
.product-main { width: 100%; }
.product-thumbs { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.product-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-info { position: sticky; top: calc(var(--header-h) + 24px); }
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); margin: var(--s5) 0 var(--s6); padding: var(--s4) 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.product-price b { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.product-price s { font-size: var(--t-lg); color: var(--muted); white-space: nowrap; }
.product-buy { margin-top: var(--s6); }
.product-note { margin-top: var(--s4); font-size: var(--t-sm); color: var(--muted); max-width: 48ch; }

/* news: a ruled list, the date first */
.news-list { list-style: none; border-top: 2px solid var(--ink); }
/* under the page title the list starts at the title's own rule */
.page-head + .news { padding-top: 0; }
.page-head + .news .news-list { border-top: 0; }
.page-head + .news .news-empty { padding-top: var(--s7); }
.news-item { border-bottom: 1px solid var(--rule); }
.news-item a { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5) clamp(24px, 4vw, 56px); padding: var(--s6) 0; text-decoration: none; }
.news-item.has-cover a { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); align-items: start; }
.news-thumb { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: var(--t-sm); color: var(--muted); }
.tag { background: var(--lemon); color: var(--ink); padding: 3px var(--s2); font-size: var(--t-xs); font-weight: 700; line-height: 1.3; }
.news-title { margin-top: var(--s3); font-size: var(--t-h3); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; max-width: 32ch; }
.news-lead { margin-top: var(--s2); color: var(--ink-2); max-width: 62ch; }
@media (hover: hover) and (pointer: fine) { .news-item a:hover .news-title { color: var(--violet); } }
.news-empty { font-size: var(--t-lg); color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4); margin-top: var(--s7); }
.pager > :last-child { justify-self: end; }
.pager > :first-child { justify-self: start; }
.pager-now { font-size: var(--t-sm); color: var(--muted); text-align: center; }

/* one piece of news */
.article .wrap { max-width: 960px; }
.article-head { padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 5vw, 64px); }
.back { display: inline-block; margin-bottom: var(--s6); font-size: var(--t-sm); font-weight: 600; text-underline-offset: 3px; }
.back::before { content: "← "; }
.article-title { margin-top: var(--s3); font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; }
.article-head .lead { margin-top: var(--s5); max-width: 60ch; }
.event { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin-top: var(--s5); padding: var(--s3) var(--s4); background: var(--lilac); border: 2px solid var(--ink); font-weight: 700; }
.event span { font-size: var(--t-sm); font-weight: 600; color: var(--purple); }
.article-cover { margin-top: var(--s7); }
.article-cover img { width: 100%; }
.article-head + .blk, .article-head + .band { padding-top: 0; }
.article > .blk:last-child { padding-bottom: var(--section); }
.article .quote blockquote p { max-width: none; }

@media (max-width: 899px) {
  .product { grid-template-columns: minmax(0, 1fr); }
  .product-info { position: static; }
}
@media (max-width: 599px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .people-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s4); }
  .news-item.has-cover a { grid-template-columns: minmax(0, 1fr); }
  .band-row .btn { width: 100%; }
  .product-buy .btn { width: 100%; white-space: normal; text-align: center; padding-block: var(--s3); }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-now { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .qa[open] .prose { animation: none; }
  .card-link .h3::after, .qa summary::after { transition: none; }
}

/* ---------- кнопка «Сфера влияния» в шапке (страница игры /sfera) ---------- */
.nav a.nav-sfera {
  display: inline-flex; align-items: center; align-self: center; min-height: 38px;
  padding: 0 12px; border: 2px solid currentColor; line-height: 1;
  font-weight: 700; background-image: none; white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .nav a.nav-sfera:hover { background: var(--lemon); color: var(--ink); border-color: var(--lemon); }
}
@media (max-width: 899px) { .nav a.nav-sfera { align-self: flex-start; margin-block: var(--s2); } }
