/* Cherry Pairs website. Tokens mirror the app (Nunito, cherry, pastel scene grounds).
   Source of truth for the look: the UI Designer's mockup (memory note `marketing-website`). */

/* ---------- font (self-hosted Nunito variable, OFL) ---------- */
@font-face { font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(../fonts/nunito-cyrillic-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(../fonts/nunito-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(../fonts/nunito-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(../fonts/nunito-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --cherry: #E02C4F;        /* buttons, big headings (white on it: bold/large only) */
  --cherry-deep: #C01C3C;   /* links, small red text, focus ring */
  --cherry-edge: #A8183A;   /* 3D bottom edge of red buttons */
  --cherry-wash: #FFF3F6;
  --rim: #F2C7D1;
  --gold: #FAA510;          /* only with dark text */
  --gold-edge: #D4860A;
  --ink: #2A1A20;
  --ink-2: #5E4A52;
  --ink-3: #7A6670;         /* small/secondary text: 5.3:1 on white, ≈4.9:1 on the pastel grounds (AA) */
  --paper: #FFFFFF;
  --line: #F0E1E6;
  --peach: #FEF1E7; --lilac: #EDE9FA; --sky: #E4F3FE; --mint: #E5F4ED; --sand: #FDF5E2;
  --ok: #1F7A3A; --ok-wash: #E3F5E8;
  --err: #B3261E; --err-wash: #FDECEA;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --wrap: 1160px;
  --r-s: 10px; --r-m: 18px; --r-l: 28px;
  --hdr-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: clip; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 900; }
p { margin: 0; }
a { color: var(--cherry-deep); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--cherry-deep); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 60; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cherry-deep); }
.note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #5B4BB0; background: #F1EEFD; border: 1px dashed #A99BE8; border-radius: 999px; padding: 2px 10px; }
.tbd { background: #FFF1B8; color: #5C4300; padding: 0 6px; border-radius: 6px; font-weight: 800; }

/* ---------- buttons ---------- */
.btn { --bg: var(--cherry); --edge: var(--cherry-edge); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 24px;
  border: 0; border-radius: 16px; background: var(--bg); color: var(--fg); font: 800 17px/1.1 var(--font);
  text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 var(--edge); transition: transform .08s, box-shadow .08s; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--edge); }
.btn--ghost { --bg: var(--paper); --edge: var(--rim); --fg: var(--cherry-deep); border: 2px solid var(--rim); }
.btn--gold { --bg: var(--gold); --edge: var(--gold-edge); --fg: var(--ink); }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: 15px; border-radius: 13px; box-shadow: 0 4px 0 var(--edge); }
.btn--sm:active { transform: translateY(4px); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 20px 8px 16px; border-radius: 14px;
  background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 5px 0 #000; }
a.store:active { transform: translateY(5px); box-shadow: none; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; line-height: 1.2; }
.store b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.store--soon { cursor: default; }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 20px; min-height: var(--hdr-h); }
/* Brand logo (SVG, colours and proportions fixed by the designer: never recolour or add effects). */
.logo { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.logo img { width: auto; height: 36px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 800; font-size: 16px; text-decoration: none; }
.nav a:hover { background: var(--cherry-wash); color: var(--cherry-deep); }
.nav a[aria-current="page"] { color: var(--cherry-deep); background: var(--cherry-wash); }
.hdr-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); font: 800 15px var(--font); cursor: pointer; }
.lang-btn:hover { border-color: var(--rim); }
.flag { width: 24px; height: 18px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); flex: none; }
.flag--none { display: block; background: #EFE6EA; } /* a course language with no flag file keeps the card's grid */
.chev { width: 14px; height: 14px; transition: transform .15s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 248px; max-height: min(70vh, 560px); overflow: auto; margin: 0; padding: 8px; list-style: none;
  background: var(--paper); border: 2px solid var(--rim); border-radius: var(--r-m); box-shadow: 0 18px 40px rgb(110 10 32 / .16); }
.lang-menu[hidden] { display: none; }
.lang-menu a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--cherry-wash); }
.lang-menu a:focus-visible { outline-offset: -3px; }
.lang-menu a[aria-current="true"] { background: var(--cherry-wash); color: var(--cherry-deep); font-weight: 900; }
.lang-menu a[aria-current="true"]::after { content: ""; margin-left: auto; width: 8px; height: 14px; border: solid var(--cherry-deep); border-width: 0 3px 3px 0; transform: rotate(45deg) translateY(-2px); }
.burger { display: none; width: 44px; height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; padding: 0; }
.burger > span[aria-hidden], .burger > span[aria-hidden]::before, .burger > span[aria-hidden]::after { display: block; width: 18px; height: 2.5px; margin: auto; background: var(--ink); border-radius: 2px; position: relative; content: ""; transition: transform .15s, background .15s; }
.burger > span[aria-hidden]::before { position: absolute; top: -6px; }
.burger > span[aria-hidden]::after { position: absolute; top: 6px; }
.burger[aria-expanded="true"] > span[aria-hidden] { background: transparent; }
.burger[aria-expanded="true"] > span[aria-hidden]::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] > span[aria-hidden]::after { transform: translateY(-6px) rotate(-45deg); }
.mnav { display: none; }

/* ---------- sections ---------- */
section { padding-block: 72px; }
.sec-head { display: grid; gap: 12px; justify-items: start; max-width: 640px; margin-bottom: 36px; }
.sec-head--flush { margin: 0; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.sec-head p { color: var(--ink-2); font-size: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: center; }
.soon { font-size: 15px; font-weight: 700; color: var(--ink-3); }

/* hero */
.hero { padding-block: 56px 80px; background:
  radial-gradient(60% 70% at 85% 30%, #FFE3EA 0%, transparent 70%),
  linear-gradient(180deg, var(--cherry-wash), var(--paper)); }
.hero .wrap, .status-page .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--cherry); }
.hero-copy, .status-copy { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.hero-copy > p:not(.soon) { font-size: 20px; color: var(--ink-2); max-width: 34ch; }
.hero-art { position: relative; justify-self: center; width: min(100%, 440px); padding-top: 70px; }
.bubble { position: absolute; top: 0; right: 4%; z-index: 1; padding: 12px 18px; background: #fff; border: 2px solid var(--rim); border-radius: 18px;
  box-shadow: 0 6px 0 var(--rim), 0 14px 24px rgb(110 10 32 / .18); font-size: 22px; font-weight: 900; }
.bubble::after { content: ""; position: absolute; left: 24px; bottom: -12px; width: 16px; height: 14px; background: #fff;
  clip-path: polygon(0 0, 100% 0, 30% 100%); filter: drop-shadow(0 2px 0 var(--rim)); }
.hero-art > img { width: 100%; filter: drop-shadow(0 16px 18px rgb(110 10 32 / .18)); }

/* demo board */
.demo { background: var(--sky); }
.demo .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.board { background: #fff; border-radius: var(--r-l); padding: 22px; box-shadow: 0 8px 0 #C9E2F5, 0 24px 48px rgb(30 80 130 / .12); min-width: 0; }
.board-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.board-top img { width: 32px; height: 32px; }
.tbar { flex: 1; height: 12px; border-radius: 99px; background: #EEF2F6; overflow: hidden; }
.tbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--cherry)); border-radius: inherit; transition: width 1s linear; }
.tnum { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.col { display: grid; gap: 12px; }
.tile { min-height: 56px; padding: 10px 12px; border: 2px solid #E6E9EE; border-radius: 14px; background: #fff; box-shadow: 0 4px 0 #E6E9EE;
  font: 800 18px var(--font); color: var(--ink); cursor: pointer; overflow-wrap: anywhere; transition: transform .1s, background .15s, border-color .15s, opacity .3s; }
.tile:disabled { cursor: default; }
.tile:not(:disabled):hover { border-color: #C9D6E4; }
.tile:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 #E6E9EE; }
.tile[aria-pressed="true"] { border-color: #5AA9E6; background: #EAF5FE; box-shadow: 0 4px 0 #5AA9E6; }
.tile.ok { border-color: #8FD19E; background: var(--ok-wash); box-shadow: 0 4px 0 #8FD19E; color: var(--ok); opacity: .6; }
.tile.bad { border-color: #F1A39C; background: var(--err-wash); box-shadow: 0 4px 0 #F1A39C; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.board-msg { margin-top: 16px; min-height: 44px; font-weight: 800; color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-msg img { width: 22px; height: 22px; }
.board-msg button { margin-left: auto; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: var(--r-l); background: var(--bgc); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #fff; color: var(--cherry); font-size: 22px; font-weight: 900; box-shadow: 0 4px 0 var(--edgec); }
.steps h3 { font-size: 22px; }
.steps p { color: var(--ink-2); }

/* leagues */
.leagues { background: var(--lilac); }
.ladder { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; align-items: end; }
.ladder li { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.ladder img { width: 100%; max-width: 96px; filter: drop-shadow(0 8px 8px rgb(60 40 120 / .18)); transform: translateY(calc(var(--i) * -6px)); }
.rules { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.rule { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; font-weight: 800; font-size: 15px; }
.rule i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }

/* languages */
.langs { background: var(--sand); }
/* Cards are only as wide as their content (owner: no "Доступно" badge; "soon" differs by colour only). */
.lg-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.lg { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 12px 18px 12px 14px; border-radius: var(--r-m); background: #fff; border: 2px solid #F3E6C4; min-width: 0; }
.lg .flag { width: 36px; height: 27px; border-radius: 6px; }
.lg div { min-width: 0; }
.lg b { display: block; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.lg small { color: var(--ink-3); font-weight: 700; font-size: 14px; }
.row-end { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 28px; }

/* final cta */
.final { padding-block: 24px 72px; }
.final-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 40px 48px; border-radius: 36px;
  background: radial-gradient(80% 120% at 100% 0%, #F2506F, var(--cherry) 60%); color: #fff; box-shadow: 0 10px 0 var(--cherry-edge); overflow: hidden; }
.final-card h2 { font-size: clamp(28px, 3.4vw, 42px); }
.final-card p { font-size: 18px; font-weight: 700; margin-top: 10px; }
.final-card .cta-row { margin-top: 24px; }
.final-card > img { width: 260px; margin-block: -20px -60px; }
.final-card .store { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--cherry-edge); }

/* ---------- status pages (404, coming soon) ---------- */
.status-page { padding-block: 64px 88px; background:
  radial-gradient(60% 70% at 85% 30%, #FFE3EA 0%, transparent 70%),
  linear-gradient(180deg, var(--cherry-wash), var(--paper)); }
.status-page h1 { font-size: clamp(34px, 4.6vw, 54px); }
.status-copy > p { font-size: 19px; color: var(--ink-2); max-width: 40ch; }
.status-page--404 .eyebrow { font-size: 15px; }
.lost-pair { position: absolute; left: 0; top: 34px; z-index: 1; display: flex; gap: 10px; transform: rotate(-6deg); }
.tile--lost { display: grid; place-items: center; min-width: 72px; cursor: default; font-size: 22px; font-weight: 900; color: var(--cherry-deep); }
.tile--q { border-style: dashed; border-color: var(--rim); box-shadow: 0 4px 0 var(--rim); color: var(--ink-3); transform: rotate(10deg) translateY(10px); }

.status-art > img { filter: drop-shadow(0 16px 18px rgb(110 10 32 / .18)); }
.status-page--done .status-art, .status-page--ready .status-art { width: min(100%, 380px); }

/* ---------- inner pages: hero, body, closing call to action ---------- */
.p-hero { --phbg: var(--sand); padding-block: 48px 40px; background: linear-gradient(180deg, var(--phbg), var(--paper)); }
.p-hero--sky { --phbg: var(--sky); }
.p-hero--mint { --phbg: var(--mint); }
.p-hero--lilac { --phbg: var(--lilac); }
.p-hero h1 { font-size: clamp(34px, 4.6vw, 54px); margin-top: 10px; }
.p-hero p { margin-top: 12px; color: var(--ink-2); font-size: 18px; max-width: 50ch; }
.p-body { padding-block: 8px 72px; }
.page-cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 32px; padding: 22px 26px;
  border-radius: var(--r-l); background: var(--cherry-wash); border: 2px solid var(--rim); }
.page-cta b { display: block; font-size: 20px; line-height: 1.3; }
.state-box { display: grid; justify-items: center; gap: 14px; padding: 48px 24px; text-align: center; border-radius: var(--r-l); background: var(--bgc, var(--sand)); }
.state-box--err { --bgc: var(--err-wash); margin-top: 16px; }
.state-box img { width: 180px; }
.state-box h2, .state-box h3 { font-size: 24px; }
.state-box p { color: var(--ink-2); max-width: 42ch; }

/* ---------- courses ---------- */
.c-group { display: grid; gap: 16px; }
.c-group + .c-group { margin-top: 44px; }
.c-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.c-title h2 { font-size: 26px; }
.count { font-weight: 800; color: var(--ink-3); font-size: 15px; }
.c-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.cc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 18px; border-radius: 22px; background: #fff;
  border: 2px solid #F3E6C4; box-shadow: 0 5px 0 #F3E6C4; min-width: 0; }
.cc .flag { grid-row: span 2; width: 52px; height: 39px; border-radius: 8px; }
.cc b { font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.cc small { color: var(--ink-3); font-weight: 700; font-size: 15px; }
/* "Soon" told by colour (same as the home cards); the group heading carries the word. */
.cc--soon { background: #F3EDE0; border-color: #F3EDE0; box-shadow: none; }
.cc--soon b, .cc--soon small { color: var(--ink-2); }
.cc--soon .flag { filter: grayscale(.6); opacity: .7; }

/* ---------- leaderboard ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-inline: -2px; scrollbar-width: thin; }
.chip { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 6px 16px 6px 10px; border-radius: 999px; border: 2px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 800; font-size: 15px; text-decoration: none; }
.chip:hover { border-color: var(--rim); color: var(--cherry-deep); }
.chip[aria-current="true"] { border-color: var(--cherry); background: var(--cherry-wash); color: var(--cherry-deep); }
.meta { display: grid; gap: 4px; margin: 16px 0 24px; }
.meta-title { font-size: 20px; }
.meta-note { color: var(--ink-3); font-weight: 700; font-size: 14px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; margin: 0 0 20px; padding: 0; list-style: none; }
.pod { --pbg: #FFF4D6; --pring: #FAA510; display: grid; justify-items: center; gap: 6px; padding: 22px 12px 18px; border-radius: var(--r-l); background: var(--pbg); text-align: center; min-width: 0; }
.pod--1 { order: 2; padding-top: 34px; }
.pod--2 { --pbg: #F1F3F7; --pring: #B8C0CC; order: 1; }
.pod--3 { --pbg: #FBEDE3; --pring: #D08A55; order: 3; }
.podium:has(.pod:only-child) { grid-template-columns: minmax(0, 320px); justify-content: center; }
.podium:has(.pod--2):not(:has(.pod--3)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pod .ava { width: 72px; height: 72px; font-size: 26px; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--pring); }
.pod--1 .ava { width: 92px; height: 92px; font-size: 32px; }
.medal { display: grid; place-items: center; width: 34px; height: 34px; margin-top: -24px; border-radius: 50%; background: var(--pring); color: var(--ink);
  font-weight: 900; font-size: 16px; border: 3px solid #fff; position: relative; }
.pod b { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; font-size: 18px; }
.pod .nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .flag { width: 20px; height: 15px; }
.stars, .num { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stars { color: var(--ink-2); font-size: 15px; }
.stars img, .num img { width: 18px; height: 18px; }
.ava { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  background: var(--av, #FFE3EA); color: var(--avf, var(--cherry-deep)); font-weight: 900; font-size: 17px; }
.lb-table { border-radius: var(--r-l); border: 2px solid var(--line); overflow: hidden; background: #fff; }
.lb-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 140px; align-items: center; gap: 12px; padding: 12px 20px; font-variant-numeric: tabular-nums; }
.lb-row + .lb-row { border-top: 1px solid var(--line); }
.lb-head { background: #FBF6F8; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.lb-row > :first-child { text-align: center; }
.lb-row > :last-child { text-align: right; justify-content: flex-end; }
.sm-only { display: none; }
.rk { font-weight: 900; font-size: 18px; color: var(--ink-2); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }

/* ---------- forms ---------- */
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
.aside { display: grid; gap: 14px; }
.info { --bgc: var(--cherry-wash); display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 20px; background: var(--bgc); }
.info--sky { --bgc: var(--sky); }
.info--mint { --bgc: var(--mint); }
.info .ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--cherry); font-weight: 900; }
.info h2 { font-size: 17px; line-height: 1.3; }
.info p { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.form-card { padding: 28px; border-radius: var(--r-l); background: #fff; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); min-width: 0; }
.form-card > h2 { font-size: 26px; margin-bottom: 6px; }
.form-lead { color: var(--ink-2); margin-bottom: 20px; }
.fields { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label { font-weight: 800; font-size: 15px; }
.opt-t { font-weight: 700; color: var(--ink-3); }
.inp { width: 100%; min-height: 50px; padding: 12px 14px; border: 2px solid #E6DADF; border-radius: 14px; background: #fff; color: var(--ink);
  font: 600 16px var(--font); transition: border-color .15s, box-shadow .15s; }
textarea.inp { min-height: 150px; resize: vertical; line-height: 1.5; }
select.inp { appearance: none; cursor: pointer; padding-right: 40px; background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%235E4A52' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.inp:hover { border-color: #D4C2C9; }
.inp:focus { outline: none; border-color: var(--cherry-deep); box-shadow: 0 0 0 4px #FFD9E1; }
.inp[aria-invalid="true"] { border-color: var(--err); background: #FFFAFA; }
.inp:disabled { background: #F6F2F4; color: var(--ink-3); }
.hint, .err { font-size: 14px; font-weight: 700; }
.hint { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-3); }
.hint > :last-child { font-variant-numeric: tabular-nums; }
.err { display: flex; gap: 6px; align-items: flex-start; color: var(--err); }
.err::before { content: "!"; display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--err); color: #fff; font-size: 12px; font-weight: 900; }
.err:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--cherry); flex: none; cursor: pointer; }
.check input[aria-invalid="true"] { outline: 2px solid var(--err); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-top: 4px; }
.form-foot--end { justify-content: flex-end; }
.btn[aria-busy="true"] { opacity: .8; cursor: progress; transform: none; }
.spin { width: 18px; height: 18px; border: 3px solid rgb(255 255 255 / .4); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 700; font-size: 15px; }
.banner[hidden] { display: none; }
.banner--err { background: var(--err-wash); color: var(--err); border: 2px solid #F5C2BD; }
.banner--info { background: #FFF8E6; color: #6B4E0E; border: 2px solid #F5DFA6; margin: 16px 0 0; }
.done { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 12px 8px; }
.done[hidden] { display: none; }
.done:focus { outline: none; }
.done img { width: 220px; }
.done h2 { font-size: 28px; }
.done h3 { font-size: 22px; }
.done p { color: var(--ink-2); max-width: 44ch; }
.done--left { justify-items: start; text-align: left; padding: 4px 0 0; }

/* ---------- account deletion ---------- */
.del-grid { display: grid; gap: 48px; }
.del-grid h2 { font-size: 26px; margin-bottom: 14px; }
.del-grid .form-card > h2 { margin-bottom: 6px; }
.sub { color: var(--ink-2); margin: -6px 0 14px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: h; }
.how-steps li { counter-increment: h; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: #fff; border: 2px solid var(--line); font-weight: 700; }
.how-steps li::before { content: counter(h); display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--cherry-wash); color: var(--cherry-deep); font-weight: 900; }
.data-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.data-col { padding: 20px; border-radius: 20px; background: var(--err-wash); }
.data-col--kept { background: var(--sand); }
.data-col h3 { font-size: 18px; margin-bottom: 10px; }
.data-col ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-weight: 600; }
.data-col p { margin-top: 12px; color: var(--ink-2); font-weight: 700; }

/* ---------- legal ---------- */
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 40px 72px; }
.toc { position: sticky; top: calc(var(--hdr-h) + 16px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - var(--hdr-h) - 32px); overflow: auto; padding: 18px; border-radius: 20px; background: #FBF6F8; }
.toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 32px; font-weight: 900; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 9px; height: 9px; border: solid var(--ink-3); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
.toc[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.toc ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 2px; color: var(--ink-3); font-weight: 700; }
.toc a { display: block; padding-block: 5px; color: var(--ink-2); font-weight: 700; text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc a:hover { color: var(--cherry-deep); text-decoration: underline; }
.doc { max-width: 70ch; min-width: 0; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); }
.doc .upd { margin-top: 10px; color: var(--ink-3); font-weight: 700; }
.doc .lead { font-size: 19px; color: var(--ink-2); margin-top: 20px; }
.doc .draft { margin-top: 16px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc p, .doc li { font-size: 17px; line-height: 1.7; color: var(--ink); }
.doc .lead, .doc .upd { color: var(--ink-2); }
.doc ul { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.totop { margin-top: 40px; font-weight: 800; }

/* ---------- footer ---------- */
.ftr { background: #2A1A20; color: #F3E6EA; padding-block: 56px 32px; }
.ftr .wrap { display: grid; gap: 40px; }
.ftr-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.ftr p { color: #CDB9C0; margin-top: 12px; max-width: 32ch; }
.ftr h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #FFB3C2; margin-bottom: 12px; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ftr ul a, .linkbtn { display: inline-flex; align-items: center; min-height: 44px; color: #F3E6EA; text-decoration: none; font-weight: 700; }
.ftr ul a:hover, .linkbtn:hover { color: #fff; text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.ftr-bot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 24px; border-top: 1px solid #4A3640; color: #B49FA7; font-size: 14px; }
.ftr :focus-visible { outline-color: #FFB3C2; }

/* ---------- cookie banner ---------- */
.ck { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; margin-left: auto;
  padding: 20px 22px; border-radius: var(--r-l); background: #fff; border: 2px solid var(--rim); box-shadow: 0 6px 0 var(--rim), 0 24px 48px rgb(110 10 32 / .2); }
.ck[hidden] { display: none; }
.ck h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.ck h2 img { width: 26px; height: 26px; }
.ck p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.ck-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ck-row .btn { flex: 1 1 140px; }
.ck-opts { display: grid; gap: 10px; margin-top: 14px; }
.ck-opts[hidden] { display: none; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #FBF6F8; cursor: pointer; }
.opt input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--cherry); flex: none; }
.opt b { display: block; font-size: 15px; }
.opt small { display: block; color: var(--ink-2); font-weight: 600; font-size: 13px; }

.toast { position: fixed; left: 50%; top: calc(var(--hdr-h) + 16px); transform: translateX(-50%); z-index: 50; padding: 10px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; max-width: calc(100% - 32px); text-align: center; }
.toast[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav, .hdr-cta { display: none; }
  .burger { display: grid; place-items: center; }
  .mnav { display: block; border-top: 1px solid var(--line); background: #fff; }
  .mnav[hidden] { display: none; }
  .mnav ul { list-style: none; margin: 0 auto; max-width: var(--wrap); padding: 12px 20px 20px; display: grid; gap: 4px; }
  .mnav a { display: block; padding: 12px 14px; border-radius: 12px; color: var(--ink); font-weight: 800; font-size: 18px; text-decoration: none; }
  .mnav a[aria-current="page"] { background: var(--cherry-wash); color: var(--cherry-deep); }
  .mnav .btn { display: flex; width: 100%; margin-top: 8px; color: #fff; }
  .hero .wrap, .demo .wrap, .status-page .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: min(100%, 340px); }
  .status-page .hero-art { width: min(100%, 300px); }
  .split { grid-template-columns: 1fr; }
  .data-cols { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .toc { position: static; max-height: none; }
  .steps { grid-template-columns: 1fr; }
  /* Number and title on one row ("1  Обери мову"), the text below them. */
  .steps li { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .steps li p { grid-column: 1 / -1; }
  /* Flex instead of grid so an incomplete last row (the Cherry league) is centred. */
  .ladder { --cols: 4; display: flex; flex-wrap: wrap; justify-content: center; row-gap: 24px; }
  .ladder li { flex: 0 0 calc((100% - (var(--cols) - 1) * 12px) / var(--cols)); }
  .ladder img { transform: none; }
  .rules { justify-content: center; }
  .final-card { grid-template-columns: 1fr; padding: 32px 24px 0; }
  .final-card > img { justify-self: center; width: 220px; margin: 0 0 -8px; }
  .ftr-top { grid-template-columns: 1fr 1fr; }
  .ftr-top > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  :root { --hdr-h: 64px; }
  body { font-size: 16px; }
  section { padding-block: 52px; }
  .hero { padding-block: 32px 56px; }
  .hdr .wrap { gap: 10px; padding-inline: 16px; }
  .wrap { padding-inline: 16px; }
  .hdr .logo img { height: 32px; }
  .lang-btn .lname { display: none; }
  .lang { position: static; }
  .lang-menu { position: fixed; left: 16px; right: 16px; top: calc(var(--hdr-h) + 8px + env(safe-area-inset-top, 0px)); width: auto;
    max-height: calc(100vh - var(--hdr-h) - 24px); max-height: calc(100dvh - var(--hdr-h) - 24px); }
  .hero-copy > p:not(.soon) { font-size: 18px; }
  /* Store badges: stacked, same width, centred in the column. */
  .cta-row { justify-self: stretch; justify-content: center; }
  .cta-row > * { flex: 1 1 100%; }
  .stores { width: 100%; flex-direction: column; align-items: center; }
  .store { width: min(100%, 280px); justify-content: center; }
  .board { padding: 16px; }
  .tile { font-size: 16px; }
  .ladder { --cols: 3; }
  /* Compact pills so two fit on a phone row instead of one per line. */
  .rules { gap: 8px; margin-top: 28px; }
  .rule { gap: 6px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
  .rule i { width: 8px; height: 8px; }
  .lg { gap: 10px; padding: 10px 14px 10px 12px; }
  .lg .flag { width: 30px; height: 22px; border-radius: 5px; }
  .lg b { font-size: 16px; }
  .lg small { font-size: 13px; }
  .p-hero { padding-block: 32px 28px; }
  /* One row per course on phones: flag | names, so 12 languages stay short. */
  .c-grid { gap: 12px; }
  .cc { gap: 2px 12px; padding: 14px 16px; border-radius: 18px; }
  .cc .flag { width: 40px; height: 30px; border-radius: 6px; }
  .cc b { font-size: 18px; }
  .cc small { font-size: 14px; }
  .page-cta { padding: 20px; }
  .podium { gap: 8px; }
  .pod { padding: 18px 6px 14px; border-radius: 20px; }
  .pod .ava { width: 52px; height: 52px; font-size: 20px; }
  .pod--1 .ava { width: 64px; height: 64px; font-size: 24px; }
  .pod b { font-size: 15px; }
  .pod .flag { display: none; }
  .stars { font-size: 14px; }
  .lb-row { grid-template-columns: 34px minmax(0, 1fr) 72px; gap: 8px; padding: 10px 12px; }
  .lb-head { font-size: 11px; letter-spacing: .03em; }
  .lg-only { display: none; }
  .sm-only { display: inline; }
  .lb-row .ava { width: 36px; height: 36px; font-size: 14px; }
  .who { gap: 8px; }
  .who .flag { display: none; }
  .form-card { padding: 20px; }
  .form-foot .btn { flex: 1 1 100%; }
  /* Brand on top, "Гра" | "Підтримка" side by side, legal links full width below. */
  .ftr-top { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .ftr-top > div:last-child { grid-column: 1 / -1; }
  .ck { left: 12px; right: 12px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
