/* ==========================================================================
   Engsite — стили сайта
   ========================================================================== */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-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: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-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; }
@font-face { font-family: "Playfair"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/playfair-display-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: "Playfair"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/playfair-display-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; }
@font-face { font-family: "Playfair"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("../fonts/playfair-display-cyrillic-wght-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("../fonts/playfair-display-latin-wght-italic.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 {
  --paper: #fbf7f0;
  --paper-2: #f4ede1;
  --card: #fffdf9;
  --ink: #14213d;
  --ink-2: #39466a;
  --muted: #6c7489;
  --line: #e8dfd0;
  --line-2: #d9cdb9;

  --red: #e0403a;    --red-soft: #fde5df;
  --blue: #2f5bea;   --blue-soft: #e3e9fd;
  --gold: #d99412;   --gold-soft: #fcefd0;
  --green: #17936a;  --green-soft: #daf2e7;

  --ac: var(--red);
  --ac-soft: var(--red-soft);

  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Playfair", Georgia, "Times New Roman", serif;

  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 8px 24px -12px rgba(20, 33, 61, .18);
  --shadow-lg: 0 2px 4px rgba(20, 33, 61, .04), 0 24px 48px -20px rgba(20, 33, 61, .3);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hdr: 72px;
}
.accent-red   { --ac: var(--red);   --ac-soft: var(--red-soft); }
.accent-blue  { --ac: var(--blue);  --ac-soft: var(--blue-soft); }
.accent-gold  { --ac: var(--gold);  --ac-soft: var(--gold-soft); }
.accent-green { --ac: var(--green); --ac-soft: var(--green-soft); }

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ac) 55%, transparent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold-soft); }

.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ac);
}
.kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1.5px solid var(--b);
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.btn .ico { transition: transform .25s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn--primary { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -12px rgba(20, 33, 61, .7); }
.btn--primary:hover { transform: translateY(-2px); background: var(--ac); border-color: var(--ac); box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--ac) 70%, transparent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ac); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

/* ---------- Maintenance bar (видит только администратор) ---------- */
.mbar { position: relative; z-index: 60; padding: 9px 16px; background: var(--gold); color: var(--ink); font-size: 14px; font-weight: 500; text-align: center; }
.mbar a { font-weight: 700; margin-left: 6px; }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50; height: var(--hdr);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
/* Фон с размытием — на псевдоэлементе: backdrop-filter на самой шапке сделал бы её
   опорным блоком для position: fixed, и мобильное меню обрезалось бы по высоте шапки. */
.hdr::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.hdr.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(20, 33, 61, .4); }
.hdr__in { display: flex; align-items: center; gap: 24px; height: 100%; }
.logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; text-decoration: none; flex: none; }
.logo__svg { display: block; width: 156px; height: auto; overflow: visible; transition: transform .4s var(--ease); transform-origin: left center; }
.logo:hover .logo__svg { transform: scale(1.04); }
.logo__tag { font-size: 12px; line-height: 1.1; color: var(--muted); padding-left: 2px; }
.logo--light .logo__tag { color: rgba(255, 255, 255, .6); }
.logo--big { align-items: center; }
.logo--big .logo__svg { width: 230px; }

.nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative; display: block; padding: 8px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2); white-space: nowrap; transition: color .2s, background .2s;
}
.nav__link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px;
  background: var(--ac); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--ink); }
.nav__search { position: relative; display: none; }
.nav__searchbtn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); transition: border-color .2s, color .2s, transform .3s var(--ease); }
.nav__searchbtn:hover { border-color: var(--ink); color: var(--ink); transform: rotate(-10deg); }
.nav__search input {
  width: 190px; height: 40px; padding: 0 38px 0 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); font: inherit; font-size: 14px; color: var(--ink); transition: width .3s var(--ease), border-color .2s;
}
.nav__search input:focus { width: 240px; border-color: var(--ink); outline: none; }
.nav__search button { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 27px; }
.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Decorative blobs ---------- */
.hero__bg, .phead__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.hero__bg::before, .phead__bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .45;
  mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 20%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 18s ease-in-out infinite; }
.blob--1 { width: 420px; height: 420px; background: var(--red-soft); top: -120px; right: 8%; }
.blob--2 { width: 360px; height: 360px; background: var(--blue-soft); bottom: -160px; right: 30%; animation-delay: -6s; }
.blob--3 { width: 300px; height: 300px; background: var(--gold-soft); top: 30%; left: -100px; animation-delay: -12s; }
.phead .blob--1 { background: var(--ac-soft); }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.06); }
  66% { transform: translate(-20px, 20px) scale(.96); }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: 64px 0 72px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; margin-bottom: 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--ink-2);
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 50%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.hero__title { font: 600 clamp(40px, 5.6vw, 72px)/1.04 var(--serif); letter-spacing: -.02em; margin-bottom: 24px; }
.hero__title em {
  font-style: italic; color: var(--red); position: relative; white-space: nowrap;
}
.hero__title em::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.08em; height: .28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 14 C 40 4, 70 4, 100 11 S 160 18, 198 6' fill='none' stroke='%23e0403a' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0); animation: draw 1.1s .7s var(--ease) forwards;
}
@keyframes draw { to { clip-path: inset(0 0 0 0); } }
.hero__lead { font-size: 19px; color: var(--ink-2); max-width: 560px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 44px 0 0; padding-top: 28px; border-top: 1px dashed var(--line-2); }
.stats__i { margin: 0; }
.stats dt { font: 600 38px/1 var(--serif); color: var(--ac); font-variant-numeric: tabular-nums; }
.stats dd { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

.hero__demo { position: relative; }
.chat {
  position: relative; z-index: 1; background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-lg); overflow: hidden; transform: rotate(1.2deg);
  transition: transform .6s var(--ease);
}
.chat:hover { transform: rotate(0) translateY(-4px); }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat__head b { display: block; font-size: 15px; }
.chat__head small { color: var(--muted); font-size: 13px; }
.chat__avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.chat__live { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); display: flex; align-items: center; gap: 6px; }
.chat__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.chat__body { height: 340px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden;
  mask-image: linear-gradient(transparent, #000 22%); -webkit-mask-image: linear-gradient(transparent, #000 22%); }
.bubble {
  align-self: flex-start; max-width: 82%; padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  background: var(--paper-2); font-size: 15px; line-height: 1.4;
  opacity: 0; transform: translateY(10px) scale(.96); transform-origin: left bottom;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.bubble.is-in { opacity: 1; transform: none; }
.bubble span { display: block; font-weight: 500; }
.bubble small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.bubble--r { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--ink); color: #fff; transform-origin: right bottom; }
.bubble--r small { color: rgba(255, 255, 255, .62); }
.bubble--typing { padding: 12px 16px; }
.bubble--typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite; }
.bubble--typing i:nth-child(2) { animation-delay: .15s; } .bubble--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat__foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); transition: background .2s, color .2s; }
.chat__foot:hover { background: var(--paper-2); color: var(--red); }

.sticker {
  position: absolute; z-index: 2; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; white-space: nowrap;
}
.sticker--1 { top: -18px; left: -26px; background: var(--gold); color: #fff; transform: rotate(-8deg); }
.sticker--2 { bottom: 70px; right: -34px; background: var(--blue); color: #fff; animation-delay: -2s; }
.sticker--3 { bottom: -16px; left: 22px; background: var(--card); border: 1px solid var(--line); animation-delay: -4s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Marquee ---------- */
.marquee-wrap { overflow: hidden; padding: 12px 0; }
.marquee { overflow: hidden; background: var(--ink); color: #fff; padding: 18px 0; transform: rotate(-1deg) scaleX(1.03); }
.marquee__track { display: flex; gap: 44px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: baseline; gap: 10px; font-size: 18px; white-space: nowrap; }
.marquee span::after { content: "✦"; color: var(--gold); margin-left: 34px; font-size: 14px; }
.marquee b { font: italic 600 22px var(--serif); }
.marquee i { font-style: normal; color: rgba(255, 255, 255, .55); font-size: 15px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Blocks ---------- */
.block { padding: 88px 0; }
.block.wrap { padding-inline: 0; }
.block--tight { padding: 40px 0 80px; }
.block--tint { background: var(--paper-2); border-block: 1px solid var(--line); }
.block__head { margin-bottom: 40px; max-width: 720px; }
.block__head h2, .wordday h2 { font: 600 clamp(30px, 3.6vw, 46px)/1.1 var(--serif); letter-spacing: -.015em; }
.block__lead { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.block__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.link-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--ac); white-space: nowrap; }
.link-more .ico { transition: transform .25s var(--ease); }
.link-more:hover .ico { transform: translateX(4px); }

/* Course cards */
.courses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.courses--two { grid-template-columns: repeat(2, 1fr); }
.course {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px 26px 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; text-decoration: none; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.course::before {
  content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; right: -90px; top: -90px; border-radius: 50%;
  background: var(--ac-soft); transition: transform .6s var(--ease);
}
.course:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--ac) 35%, var(--line)); }
.course:hover::before { transform: scale(1.5); }
.course__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--ac); color: #fff; margin-bottom: 10px; transition: transform .4s var(--ease); }
.course__icon .ico { width: 28px; height: 28px; }
.course:hover .course__icon { transform: rotate(-6deg) scale(1.05); }
.course__kicker { font-size: 13px; font-weight: 600; color: var(--ac); text-transform: uppercase; letter-spacing: .06em; }
.course__title { font: 600 26px/1.15 var(--serif); }
.course__lead { font-size: 15px; color: var(--ink-2); flex: 1; }
.course__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.course__go { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.course:hover .course__go { background: var(--ac); border-color: var(--ac); color: #fff; transform: rotate(-45deg); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { position: relative; padding: 26px 24px; background: var(--card); border-radius: 20px; border: 1px solid var(--line); }
.steps h3 { font: 600 22px/1.2 var(--serif); margin: 18px 0 8px; }
.steps p { font-size: 15px; color: var(--ink-2); margin: 0; }
.steps__n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 600 20px var(--serif); background: var(--ink); color: #fff; }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 47px; right: -18px; width: 18px; height: 2px; background: var(--line-2);
}

/* Lesson cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 18px 78px; min-height: 128px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--ac) 40%, var(--line)); }
.card__num {
  position: absolute; left: 18px; top: 18px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font: 600 20px/1 var(--serif); background: var(--ac-soft); color: var(--ac); transition: background .3s, color .3s, transform .3s var(--ease);
}
.card:hover .card__num { background: var(--ac); color: #fff; transform: rotate(-6deg); }
.card__title { font-weight: 600; font-size: 16px; line-height: 1.35; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--paper-2); font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.tag .ico { width: 14px; height: 14px; }
.card__done {
  position: absolute; right: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; transform: scale(0); transition: transform .4s var(--ease);
}
.card__done .ico { width: 15px; height: 15px; stroke-width: 2.6; }
.card.is-done .card__done { transform: scale(1); }
.card.is-done { background: color-mix(in srgb, var(--green-soft) 35%, var(--card)); }

/* Word of the day */
.wordday {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 48px; border-radius: 32px;
  background: var(--ink); color: #fff; position: relative; overflow: hidden; isolation: isolate;
}
.wordday::before { content: ""; position: absolute; z-index: -1; width: 500px; height: 500px; border-radius: 50%; left: -200px; bottom: -300px; background: radial-gradient(circle, rgba(232, 163, 23, .35), transparent 70%); }
.wordday .kicker { color: var(--gold); }
.wordday p { color: rgba(255, 255, 255, .72); margin: 14px 0 24px; max-width: 420px; }
.wordday .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.wordday .btn--ghost:hover { border-color: #fff; }
.flip { border: 0; background: none; padding: 0; perspective: 1200px; height: 240px; width: 100%; }
.flip__inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .8s var(--ease); transform-style: preserve-3d; }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px;
  border-radius: 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: center;
}
.flip__front { background: var(--paper); color: var(--ink); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); }
.flip__back { background: var(--gold); color: #fff; transform: rotateY(180deg); }
.flip__face small { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; opacity: .6; }
.flip__face b { font: 600 clamp(28px, 3.4vw, 42px)/1.15 var(--serif); }
.flip__face em { font-size: 14px; opacity: .65; font-style: normal; }

/* ---------- Page heads ---------- */
.phead, .ihead { position: relative; isolation: isolate; padding: 48px 0 44px; border-bottom: 1px solid var(--line); }
.phead--compact { padding-bottom: 36px; }
.phead__grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 48px; align-items: start; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ac); }
.phead__title { font: 600 clamp(36px, 4.8vw, 60px)/1.06 var(--serif); letter-spacing: -.02em; margin-bottom: 18px; }
.phead__lead { font-size: 19px; color: var(--ink-2); max-width: 720px; }
.phead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.phead__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ac); color: #fff; }
.progress { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); flex-basis: 100%; }
.progress__bar { width: 160px; height: 8px; border-radius: 8px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; flex: none; }
.progress__bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 8px; transition: width .8s var(--ease); }
.about-course {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 0; margin-top: 44px; overflow: hidden;
}
.about-course summary { display: flex; align-items: center; gap: 10px; padding: 18px 22px; font-weight: 600; cursor: pointer; list-style: none; }
.about-course summary::-webkit-details-marker { display: none; }
.about-course summary::after { content: "+"; margin-left: auto; font-size: 22px; font-weight: 400; color: var(--ac); transition: transform .3s var(--ease); }
.about-course[open] summary::after { transform: rotate(45deg); }
.about-course .prose { padding: 0 22px 20px; font-size: 15.5px; }

/* Toolbar & filters */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 28px; }
.filter { position: relative; display: flex; align-items: center; flex: 0 1 340px; }
.filter .ico { position: absolute; left: 16px; color: var(--muted); }
.filter input { width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font: inherit; font-size: 15px; color: var(--ink); }
.filter input:focus { outline: none; border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color .2s, background .2s, color .2s; }
.chip small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.chip:hover { border-color: var(--ac); color: var(--ac); }
.group-title { font: 600 30px/1.2 var(--serif); margin: 44px 0 20px; display: flex; align-items: baseline; gap: 14px; }
.group-title:first-of-type { margin-top: 8px; }
.group-title small { font: 500 15px var(--sans); color: var(--muted); }
.empty { padding: 40px 0; color: var(--muted); font-size: 17px; }

/* Video cards */
.vcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.vcard {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.vcard__thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--ac-soft), var(--paper-2)); overflow: hidden; }
.vcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.vcard:hover .vcard__thumb img { transform: scale(1.06); }
.vcard__play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--ac); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); transition: transform .35s var(--ease), background .3s, color .3s; }
.vcard__play .ico { width: 22px; height: 22px; margin-left: 3px; }
.vcard:hover .vcard__play { transform: scale(1.12); background: var(--ac); color: #fff; }
.vcard__noplay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--ac); }
.vcard__noplay .ico { width: 40px; height: 40px; }
.vcard__noplay small { font-size: 12px; font-weight: 600; color: var(--ink-2); opacity: .7; }
.vcard__time { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 600; }
.vcard__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.vcard__label { font-size: 12.5px; font-weight: 700; color: var(--ac); text-transform: uppercase; letter-spacing: .06em; }
.vcard__title { font-weight: 600; line-height: 1.35; margin-bottom: 6px; }

/* ---------- Item page ---------- */
.ihead__row { display: flex; gap: 24px; align-items: flex-start; }
.ihead__num {
  flex: none; width: 92px; height: 92px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ac); color: #fff; font: 600 40px/1 var(--serif); box-shadow: 0 16px 32px -16px var(--ac);
}
.ihead__num small { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .1em; opacity: .8; margin-bottom: 4px; }
.ihead__title { font: 600 clamp(28px, 3.6vw, 46px)/1.12 var(--serif); letter-spacing: -.015em; max-width: 900px; }
.ihead__en { font: italic 500 20px var(--serif); color: var(--muted); margin: 10px 0 0; }
.item__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; padding: 44px 0 24px; align-items: start; }
.item__main > * + * { margin-top: 32px; }
.item__side { position: sticky; top: calc(var(--hdr) + 20px); display: grid; gap: 16px; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow-lg); cursor: pointer; }
.player img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s, transform .8s var(--ease); }
.player:hover img { opacity: 1; transform: scale(1.03); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__btn { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%; background: var(--ac); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac) 60%, transparent); animation: ring 2.2s infinite; transition: transform .3s var(--ease); }
.player__btn .ico { width: 34px; height: 34px; margin-left: 5px; }
.player:hover .player__btn { transform: scale(1.08); }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 22px transparent; } }
.player__hint { position: absolute; left: 16px; bottom: 14px; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; }
.player.is-playing { cursor: auto; }
.player.is-playing > :not(iframe) { display: none; }
.note-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r); background: var(--ac-soft); }
.note-card .ico { width: 26px; height: 26px; color: var(--ac); margin-top: 2px; }
.note-card p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.audio { display: grid; gap: 10px; padding: 18px 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.audio span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.audio audio { width: 100%; }

.prose { font-size: 17px; }
.prose--lead { font-size: 19px; line-height: 1.65; color: var(--ink-2); padding-left: 22px; border-left: 3px solid var(--ac); }
.prose h3 { font: 600 24px/1.25 var(--serif); margin: 1.5em 0 .6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--ac); text-underline-offset: 3px; }
.prose > :last-child { margin-bottom: 0; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.panel__head h2 { display: flex; align-items: center; gap: 10px; font: 600 26px/1.2 var(--serif); }
.panel__head h2 .ico { color: var(--ac); }
.panel__head h2 small { font: 600 14px var(--sans); color: var(--ac); background: var(--ac-soft); padding: 2px 10px; border-radius: 999px; }
.panel__hint { font-size: 14px; color: var(--muted); margin: 20px 0 0; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .25s, color .25s, box-shadow .25s; }
.seg button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 2px 6px rgba(20, 33, 61, .12); }

.dialogue { display: flex; flex-direction: column; gap: 12px; }
.line { align-self: flex-start; max-width: 80%; padding: 12px 16px; border-radius: 18px 18px 18px 4px; background: var(--paper-2); }
.line--r { align-self: flex-end; border-radius: 18px 18px 4px 18px; background: var(--ac-soft); }
.line__en { margin: 0; font-weight: 600; font-size: 17px; }
.line__ru { margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; transition: filter .3s, opacity .3s; }
.dialogue.is-hidden .line__ru { filter: blur(6px); opacity: .55; cursor: pointer; user-select: none; }
.dialogue.is-hidden .line__ru.is-shown { filter: none; opacity: 1; }

.words { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.words li { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); transition: border-color .2s, transform .2s var(--ease); }
.words li:hover { border-color: var(--ac); transform: translateY(-2px); }
.words b { font-weight: 600; font-size: 16.5px; }
.words span { color: var(--ink-2); font-size: 14.5px; }
.words b, .words span { transition: filter .3s, opacity .3s; }
.words.hide-ru span, .words.hide-en b { filter: blur(6px); opacity: .5; cursor: pointer; user-select: none; }
.words li.is-shown span, .words li.is-shown b { filter: none; opacity: 1; }

.side-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.side-card h3 { font: 600 20px var(--serif); margin-bottom: 14px; }
.files { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.file { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); transition: border-color .2s; }
.file:hover { border-color: var(--line-2); }
.file__icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.file__icon--srt, .file__icon--vtt { background: var(--gold-soft); color: var(--gold); }
.file__icon--mp3 { background: var(--blue-soft); color: var(--blue); }
.file__body { display: grid; min-width: 0; flex: 1; }
.file__body b { font-size: 14.5px; line-height: 1.3; }
.file__body small { color: var(--muted); font-size: 12.5px; }
.file__actions { display: flex; gap: 4px; }
.file__actions a { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; }
.file__actions a:hover { background: var(--ink); color: #fff; }
.done-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: none; font-weight: 600; font-size: 15px; text-align: left; transition: border-color .2s, background .3s; }
.done-btn:hover { border-color: var(--green); }
.done-btn__box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease); }
.done-btn__box .ico { width: 16px; height: 16px; stroke-width: 2.8; }
.done-btn.is-done { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.done-btn.is-done .done-btn__box { background: var(--green); border-color: var(--green); color: #fff; transform: scale(1.1); }
.toc { display: flex; gap: 8px; margin-top: 14px; }
.toc a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 12px; background: var(--paper-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, color .2s; }
.toc a:hover { background: var(--ac-soft); color: var(--ac); }
.side-tip { padding: 18px 20px; border-radius: 20px; background: var(--gold-soft); font-size: 14.5px; }
.side-tip p { margin: 6px 0 0; color: var(--ink-2); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 0 88px; }
.pager__a { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.pager__a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--ac); }
.pager__a small { display: flex; align-items: center; gap: 6px; color: var(--ac); font-weight: 600; font-size: 13.5px; }
.pager__a b { font-weight: 600; line-height: 1.35; }
.pager__a--next { text-align: right; grid-column: 2; }
.pager__a--next small { justify-content: flex-end; }

/* ---------- Pages, search, 404 ---------- */
.page-body { max-width: 760px; }
.bigsearch { position: relative; display: flex; gap: 10px; align-items: center; max-width: 720px; }
.bigsearch > .ico { position: absolute; left: 20px; color: var(--muted); }
.bigsearch input { flex: 1; height: 58px; padding: 0 20px 0 52px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); font: inherit; font-size: 18px; color: var(--ink); }
.bigsearch input:focus { outline: none; border-color: var(--ink); }
.results { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; max-width: 860px; }
.result { display: grid; gap: 4px; padding: 18px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ac); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s; }
.result:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.result small { color: var(--ac); font-weight: 600; font-size: 13px; }
.result b { font-size: 17px; }
.result span { font-size: 15px; color: var(--ink-2); }
.notfound { padding: 100px 0 120px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.notfound__code { font: italic 700 clamp(120px, 20vw, 220px)/1 var(--serif); color: var(--red); margin: 0; animation: wobble 5s ease-in-out infinite; }
.notfound h1 { font: 600 36px var(--serif); }
.notfound p { max-width: 520px; color: var(--ink-2); }
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- Games ---------- */
.game { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); min-height: 420px; position: relative; overflow: hidden; }
.game h2 { font: 600 28px var(--serif); margin-bottom: 20px; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.lesson-btn { display: grid; justify-items: center; gap: 2px; padding: 14px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); transition: transform .25s var(--ease), border-color .2s, background .2s, color .2s; }
.lesson-btn b { font: 600 24px var(--serif); }
.lesson-btn small { font-size: 12px; color: var(--muted); }
.lesson-btn:hover { transform: translateY(-3px); border-color: var(--green); background: var(--green-soft); }
.lesson-btn.is-done { border-color: var(--green); }
.lesson-btn.is-done b { color: var(--green); }
.game__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 18px; }
.game__info { flex: 1; min-width: 200px; display: grid; }
.game__info b { font-size: 16px; line-height: 1.3; }
.game__info a { font-size: 14px; color: var(--green); }
.game__score { display: grid; justify-items: center; min-width: 84px; padding: 8px 14px; border-radius: 14px; background: var(--paper-2); }
.game__score span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.game__score b { font: 600 26px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.game__msg { min-height: 52px; padding: 14px 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); font-size: 15.5px; margin-bottom: 20px; transition: background .3s, border-color .3s; }
.game__msg.is-ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.game__msg.is-err { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pairs__col { display: grid; gap: 8px; align-content: start; }
.word {
  min-height: 52px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper);
  font-size: 16px; font-weight: 500; text-align: left; transition: transform .25s var(--ease), border-color .2s, background .2s, opacity .4s, max-height .4s;
}
.word:hover { border-color: var(--ink-2); }
.word.is-sel { border-color: var(--blue); background: var(--blue-soft); transform: scale(1.02); }
.word.is-ok { border-color: var(--green); background: var(--green-soft); animation: pop .4s var(--ease); }
.word.is-gone { opacity: 0; transform: scale(.9); pointer-events: none; }
.word.is-err { border-color: var(--red); background: var(--red-soft); animation: shake .4s; }
@keyframes pop { 50% { transform: scale(1.06); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.game__win { text-align: center; padding: 40px 0; display: grid; justify-items: center; gap: 8px; }
.game__win h2 { font-size: 40px; margin: 0; }
.game__win p { color: var(--ink-2); max-width: 520px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall 2.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(560px) rotate(720deg); opacity: 0; } }

.puzzle { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
.puzzle__side { display: grid; gap: 18px; }
.puzzle__side .seg { width: fit-content; }
.puzzle__side .seg button { white-space: nowrap; }
.puzzle__stats { display: flex; gap: 10px; }
.puzzle__hint { padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; justify-items: start; }
.puzzle__hint small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.puzzle__hint b { font: 600 22px var(--serif); }
.puzzle__answer { font: 600 18px var(--sans); letter-spacing: .12em; color: var(--blue); }
.board-wrap { position: relative; width: min(100%, 460px); justify-self: center; }
.board { position: relative; aspect-ratio: 1; width: 100%; padding: 10px; border-radius: 26px; background: var(--ink); box-shadow: var(--shadow-lg); outline: none; touch-action: manipulation; }
.tile {
  position: absolute; width: calc((100% - 20px) / 4 - 8px); height: calc((100% - 20px) / 4 - 8px);
  display: grid; place-items: center; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink);
  font: 600 clamp(26px, 6vw, 40px) var(--serif); text-transform: uppercase; box-shadow: inset 0 -4px 0 var(--line-2);
  transition: left .18s var(--ease), top .18s var(--ease), background .3s, color .3s;
}
.tile.is-right { background: var(--blue-soft); color: var(--blue); }
.tile.is-movable:hover { background: #fff; }
.board.is-won .tile { background: var(--green); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); animation: pop .5s var(--ease) both; }
.puzzle__win { position: absolute; inset: auto 0 -76px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.puzzle__win b { font: 600 24px var(--serif); color: var(--green); }

/* ---------- Footer ---------- */
.ftr { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 64px 0 28px; margin-top: 0; }
.ftr__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.ftr__note { margin: 18px 0 0; font-size: 14.5px; color: rgba(255, 255, 255, .6); max-width: 360px; }
.ftr h4 { color: #fff; font: 600 18px var(--serif); margin-bottom: 14px; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ftr ul a { text-decoration: none; font-size: 15px; transition: color .2s; }
.ftr ul a:hover { color: var(--gold); }
.ftr__bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13.5px; color: rgba(255, 255, 255, .5); }
.ftr__up { text-decoration: none; }
.ftr__up:hover { color: #fff; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.only-narrow { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .courses { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
}
@media (max-width: 1180px) {
  :root { --hdr: 64px; }
  .burger { display: block; }
  .logo__svg { width: 140px; }
  .nav {
    position: fixed; inset: var(--hdr) 0 0; flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 20px;
    background: var(--paper); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  html:has(.nav-open) { overflow: hidden; }
  .nav ul { flex-direction: column; }
  .nav__link { font-size: 22px; font-family: var(--serif); font-weight: 600; padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link::after { display: none; }
  .nav__search { display: block; }
  .nav__searchbtn { display: none; }
  .nav__search input, .nav__search input:focus { width: 100%; height: 50px; font-size: 16px; }
  .nav__search button { top: 9px; }
}
@media (max-width: 980px) {
  .hero { padding: 40px 0 56px; }
  .hero__grid, .phead__grid, .item__grid, .wordday, .puzzle { grid-template-columns: 1fr; }
  .hero__demo { max-width: 520px; width: 100%; margin: 0 auto; }
  .about-course { margin-top: 0; }
  .item__side { position: static; }
  .only-wide { display: none; } .only-narrow { display: inline; }
  .wordday { padding: 36px 28px; }
  .block { padding: 64px 0; }
  .puzzle__win { position: static; margin-top: 18px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .logo__tag { display: none; }
  .logo__svg { width: 136px; }
  .courses, .courses--two, .steps { grid-template-columns: 1fr; }
  .stats { gap: 14px 24px; }
  .stats dt { font-size: 30px; }
  .hero__lead, .phead__lead { font-size: 17px; }
  .chat__body { height: 300px; }
  .sticker--1 { left: 0; } .sticker--2 { right: 0; }
  .block__head--row { flex-direction: column; align-items: flex-start; }
  .cards { grid-template-columns: 1fr; }
  .ihead__row { flex-direction: column; gap: 16px; }
  .ihead__num { width: 72px; height: 72px; font-size: 32px; border-radius: 20px; }
  .panel { padding: 20px 16px; border-radius: 20px; }
  .line { max-width: 92%; }
  .pager { grid-template-columns: 1fr; }
  .pager__a--next { grid-column: auto; }
  .ftr__grid { grid-template-columns: 1fr; gap: 28px; }
  .ftr__bottom { flex-direction: column; }
  .game { padding: 20px 14px; border-radius: 20px; }
  .pairs { gap: 8px; }
  .word { font-size: 14.5px; padding: 8px 10px; min-height: 48px; }
  .bigsearch { flex-wrap: wrap; }
  .bigsearch .btn { width: 100%; }
  .marquee b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__title em::after { clip-path: none; }
}
