/* ==========================================================================
   Daniil English — public site (landing + login)
   Concept: a lesson on the page. You talk, the teacher corrects with a red pen,
   you see your progress. Ink, paper, highlighter, red pen.
   ========================================================================== */

/* Self-hosted fonts (no third-party requests; split by script so EN/SK visitors skip Cyrillic) */
@font-face {
  font-family: "Unbounded";
  src: url("/static/fonts/unbounded-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-017F, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Unbounded";
  src: url("/static/fonts/unbounded-cyrillic.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-017F, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Caveat";
  src: url("/static/fonts/caveat-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-017F, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Caveat";
  src: url("/static/fonts/caveat-cyrillic.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  /* palette */
  --ink: #1c1f4a;
  --ink-2: #262a5e;
  --ink-3: #14163a;
  --paper: #f4f6fc;
  --white: #ffffff;
  --line: #dde3f3;
  --line-2: #c6cee7;
  --text: #1c1f4a;
  --muted: #555a80;
  --hl: #ffd43b;            /* highlighter */
  --hl-soft: #fff1b8;
  --pen: #e5484d;           /* teacher's red pen */
  --pen-light: #ff8a8d;     /* red pen on ink */
  --lav: #b9aef0;
  --lav-soft: #eceaff;
  --go: #0b6b4b;            /* savings */
  --go-soft: #e2f4ec;
  --speak: #2bb673;         /* voice activity */
  --on-ink: #eef0fa;
  --on-ink-muted: #b6badb;

  /* type */
  --f-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  /* shape & motion */
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 30px;
  --shadow-soft: 0 1px 0 rgba(28, 31, 74, 0.05), 0 18px 40px -24px rgba(28, 31, 74, 0.35);
  --hard: 4px 4px 0 var(--ink);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* layout */
  --wrap: 1200px;
  --sec: clamp(4.25rem, 2.6rem + 5vw, 7.25rem);
  --topbar-h: 72px;

  interpolate-size: allow-keywords;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* fallback for older Safari */
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.ink :focus-visible {
  outline-color: var(--hl);
}

.sr-only {
  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: 1rem;
  top: -4rem;
  z-index: 300;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico .ico-fill,
.ico-fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- type ---------- */

.h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.15rem + 2.1vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.h3 {
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 0;
}

.lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 36em;
  margin-top: 1rem;
  text-wrap: pretty;
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.25rem, 1.5rem + 2vw, 3.5rem);
}

.sec-head .lead {
  margin-top: 0;
}

.link {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--hl);
  transition: text-decoration-color 0.2s;
}

.link:hover {
  text-decoration-color: var(--ink);
}

/* ---------- buttons ---------- */

.btn {
  --btn-shadow: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 3rem;
  padding: 0.8rem 1.35rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.16s var(--ease),
    box-shadow 0.16s var(--ease),
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn .ico {
  width: 1.2em;
  height: 1.2em;
}

.btn-primary {
  background: var(--hl);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--btn-shadow);
}

.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--btn-shadow);
}

.btn-primary:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--btn-shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--white);
}

.btn-lg {
  min-height: 3.5rem;
  padding: 1rem 1.6rem;
  font-size: 1.05rem;
}

.btn-sm {
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  box-shadow: 3px 3px 0 var(--btn-shadow);
}

.btn-sm:hover {
  box-shadow: 4px 4px 0 var(--btn-shadow);
}

.btn-block {
  width: 100%;
}

.ink .btn {
  --btn-shadow: #0b0d29;
  border-color: var(--ink-3);
}

.ink .btn-ghost {
  color: var(--on-ink);
  border-color: rgba(238, 240, 250, 0.4);
}

.ink .btn-ghost:hover {
  background: rgba(238, 240, 250, 0.08);
  border-color: var(--on-ink);
}

.btn[disabled] {
  opacity: 0.75;
  cursor: progress;
  transform: none;
}

/* ==========================================================================
   Header
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 246, 252, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background-color 0.25s;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(244, 246, 252, 0.94);
}

.topbar-in {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--topbar-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex: none;
}

.brand-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
  background: var(--white);
}

.brand-name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.6rem);
  margin-inline: auto;
}

.nav > a {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.2rem 0.1rem;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 0% 42%;
  transition: background-size 0.3s var(--ease);
}

.nav > a:hover,
.nav > a[aria-current="true"] {
  background-size: 100% 42%;
}

.nav-extra {
  display: none;
}

.topbar-act {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--white);
}

.lang a {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  line-height: 1;
}

.lang a:hover {
  color: var(--ink);
}

.lang a[aria-current="true"] {
  background: var(--ink);
  color: #fff;
}

.topbar-login {
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-login:hover {
  text-decoration: underline;
  text-decoration-color: var(--hl);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--white);
  cursor: pointer;
  position: relative;
  flex: none;
}

.burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.burger span:nth-child(1) {
  top: 16px;
}

.burger span:nth-child(2) {
  top: 25px;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  top: 20px;
  transform: rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(2rem, 0.8rem + 4vw, 4.5rem) 0 clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

/* notebook grid, fading out */
.hero::before {
  content: "";
  position: absolute;
  inset: calc(var(--topbar-h) * -1) 0 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

/* the red margin line of an exercise book */
.hero-grid::before {
  content: "";
  position: absolute;
  top: calc(-1 * clamp(2rem, 0.8rem + 4vw, 4.5rem) - var(--topbar-h));
  bottom: calc(-1 * clamp(2.5rem, 1.5rem + 3vw, 4.5rem));
  left: -30px;
  width: 1.5px;
  background: rgba(229, 72, 77, 0.45);
  pointer-events: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.95rem 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line-2);
  font-weight: 700;
  font-size: 0.92rem;
  animation: rise 0.6s var(--ease) both;
}

.bars {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}

.bars i {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: 50% 50%;
}

.bars i:nth-child(1) { transform: scaleY(0.45); }
.bars i:nth-child(2) { transform: scaleY(0.9); }
.bars i:nth-child(3) { transform: scaleY(0.6); }
.bars i:nth-child(4) { transform: scaleY(0.3); }

.hero-pill .bars {
  color: var(--speak);
}

.hero-pill .bars i {
  animation: talk 0.7s ease-in-out 4 alternate;
}

.hero-pill .bars i:nth-child(2) { animation-delay: 0.12s; }
.hero-pill .bars i:nth-child(3) { animation-delay: 0.24s; }
.hero-pill .bars i:nth-child(4) { animation-delay: 0.36s; }

.hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.05rem, 0.75rem + 3.35vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 1.4rem 0 0;
}

.ht {
  display: block;
}

.ht-l1,
.ht-l2 {
  display: block;
}

.nw {
  white-space: nowrap;
}

.ht-l1 {
  animation: rise 0.75s var(--ease) 0.08s both;
}

.ht-l2 {
  animation: rise 0.75s var(--ease) 0.22s both;
}

.ht-wrong {
  position: relative;
  display: inline-block;
  color: rgba(28, 31, 74, 0.36);
  animation: dim 0.4s ease 1.05s both;
}

.pen-strike {
  position: absolute;
  left: -5%;
  width: 110%;
  top: 34%;
  height: 0.42em;
  overflow: visible;
  pointer-events: none;
}

.pen-strike path {
  fill: none;
  stroke: var(--pen);
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.ht-wrong .pen-strike path {
  animation: strike 0.5s cubic-bezier(0.65, 0, 0.35, 1) 1s both;
}

.ht-fix {
  display: inline-block;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.4em;
  line-height: 0.8;
  letter-spacing: 0;
  color: var(--pen);
  transform: rotate(-5deg) translateY(-0.04em);
  transform-origin: 0 100%;
  margin-left: 0.08em;
  padding-right: 0.15em;
  animation: write 0.9s cubic-bezier(0.55, 0, 0.25, 1) 1.45s both;
}

.hero-sub {
  margin: 1.5rem 0 0;
  max-width: 33em;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
  color: var(--muted);
  text-wrap: pretty;
  animation: rise 0.7s var(--ease) 0.4s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
  margin-top: 2rem;
  animation: rise 0.7s var(--ease) 0.5s both;
}

.hero-note {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
  animation: rise 0.7s var(--ease) 0.55s both;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0;
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  animation: rise 0.7s var(--ease) 0.6s both;
}

.hero-proof li {
  display: flex;
  flex-direction: column;
  padding: 0 1.4rem;
  border-left: 1px solid var(--line-2);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.3;
}

.hero-proof li:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-proof b {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* --- the lesson call tile --- */

.call {
  position: relative;
  justify-self: end;
  width: min(100%, 430px);
  margin: 0;
  padding: 10px;
  background: var(--white);
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  box-shadow: 0 40px 70px -40px rgba(28, 31, 74, 0.45), 0 2px 0 rgba(28, 31, 74, 0.04);
  animation: tile-in 0.9s var(--ease) 0.25s both;
}

.call-video {
  position: relative;
  aspect-ratio: 1 / 1.02;
  border-radius: 22px;
  overflow: hidden;
  background: #e9e7e2;
}

.call-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

/* voice-activity ring: lights up while the teacher speaks */
.call-video::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 4px var(--speak);
  opacity: 0;
  animation: speaking 1.9s ease 3.05s both;
}

.call-chip,
.call-name {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  background: rgba(20, 22, 58, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
}

.call-chip {
  top: 12px;
  left: 12px;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}

.call-chip .ico {
  width: 1.1em;
  height: 1.1em;
}

.call-name {
  left: 12px;
  bottom: 12px;
  padding: 0.45rem 0.75rem 0.45rem 0.55rem;
  border-radius: 12px;
}

.call-name > span:not(.bars) {
  display: flex;
  flex-direction: column;
}

.call-name small {
  font-weight: 600;
  font-size: 0.72rem;
  opacity: 0.8;
}

.call-name .bars {
  color: var(--speak);
  margin-left: 0.25rem;
}

.call-name .bars i {
  animation: talk 0.42s ease-in-out 3.05s 4 alternate both;
}

.call-name .bars i:nth-child(2) { animation-delay: 3.13s; }
.call-name .bars i:nth-child(3) { animation-delay: 3.2s; }
.call-name .bars i:nth-child(4) { animation-delay: 3.28s; }

.call-caps {
  padding: 1rem 0.75rem 0.55rem;
  font-size: 1rem;
  line-height: 1.45;
}

.cap-you {
  animation: type-in 0.9s steps(26, end) 1.95s both;
  white-space: nowrap;
  overflow: hidden;
}

.cap-you b {
  color: var(--muted);
  font-weight: 700;
  margin-right: 0.2rem;
}

.cap-err {
  position: relative;
  display: inline-block;
  animation: dim 0.3s ease 2.85s both;
  color: rgba(28, 31, 74, 0.45);
}

.cap-err .pen-strike {
  top: 30%;
  height: 0.5em;
}

.cap-err .pen-strike path {
  stroke-width: 3.5;
  animation: strike 0.35s ease 2.8s both;
}

.cap-fix {
  margin-top: 0.15rem;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--pen);
  transform: rotate(-1.5deg);
  transform-origin: 0 50%;
  animation: write 0.8s cubic-bezier(0.55, 0, 0.25, 1) 3.05s both;
}

.pen-tick {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.05em;
  overflow: visible;
}

.pen-tick path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.call-sticker {
  position: absolute;
  top: -18px;
  right: -16px;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.85rem;
  background: var(--hl);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--hard);
  transform: rotate(5deg);
  line-height: 1.2;
  animation: stick 0.55s var(--spring) 1.2s both;
}

.call-sticker b {
  font-weight: 800;
  font-size: 0.95rem;
}

.call-sticker span {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ==========================================================================
   Pains as a chat
   ========================================================================== */

.talk {
  padding-block: var(--sec);
}

.talk-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.talk-head {
  position: sticky;
  top: calc(var(--topbar-h) + 2rem);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: clamp(1.1rem, 0.6rem + 2vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
}

.msg {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  max-width: min(32rem, 92%);
}

.msg p {
  padding: 0.85rem 1.1rem;
  border-radius: 20px;
  font-size: 1.02rem;
  line-height: 1.5;
}

.msg-me {
  align-self: flex-end;
}

.msg-me p {
  background: var(--lav-soft);
  border-bottom-right-radius: 6px;
}

.msg img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
}

.msg-slot {
  display: grid;
}

.msg-slot > .msg {
  grid-area: 1 / 1;
}

.msg-teacher p {
  background: var(--ink);
  color: #fff;
  border-bottom-left-radius: 6px;
  font-weight: 600;
}

.msg-typing {
  opacity: 0;
}

.msg-typing p {
  background: var(--paper);
  border-bottom-left-radius: 6px;
}

.typing {
  display: inline-flex;
  gap: 5px;
  padding: 0.35rem 0.1rem;
}

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: dot 1s ease-in-out infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

/* ==========================================================================
   Free lesson invitation
   ========================================================================== */

.free {
  padding-block: 0 var(--sec);
}

.free-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.ticks li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: 600;
}

.ticks .ico {
  width: 1.6rem;
  height: 1.6rem;
  margin-top: -0.1rem;
  color: var(--pen);
  stroke-width: 2.6;
}

.ticks .ico path {
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
}

.ticks-ink .ico {
  color: var(--hl);
}

.invite {
  position: relative;
  padding: 1.6rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r-l);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-1.2deg);
}

.invite-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding-bottom: 1.1rem;
  border-bottom: 1.5px dashed var(--line-2);
}

.invite-ico {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--hl);
  border: 2px solid var(--ink);
}

.invite-ico .ico {
  width: 1.5rem;
  height: 1.5rem;
}

.invite-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.invite-title {
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.25;
}

.invite-price {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.invite-meta {
  margin: 0.4rem 0 1.4rem;
}

.invite-meta div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.invite-meta dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.invite-meta dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.invite-foot {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ==========================================================================
   How lessons work — notebook cells, not cards
   ========================================================================== */

.lessons {
  padding-block: var(--sec);
  background: var(--white);
  border-block: 1px solid var(--line);
}

.feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
  border-left: 1px solid var(--line-2);
}

.feat {
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  transition: background-color 0.25s;
}

.feat:hover {
  background: var(--paper);
}

.feat-ico {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 42%, var(--hl) 0 52%, transparent 53%);
}

.feat-ico .ico {
  width: 1.75rem;
  height: 1.75rem;
}

.feat p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.weekly {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.weekly-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.ticks-2 {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 2rem;
}

/* ==========================================================================
   Progress — sample report (ink)
   ========================================================================== */

.ink {
  background: var(--ink);
  color: var(--on-ink);
}

.ink .lead {
  color: var(--on-ink-muted);
}

.progress {
  padding-block: var(--sec);
  position: relative;
  overflow: clip;
}

.progress-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.progress .ticks li {
  font-weight: 600;
}

.report {
  position: relative;
  margin: 0;
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--r-l);
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.7);
}

.report-tag {
  position: absolute;
  top: -1.05rem;
  right: 1.5rem;
  padding: 0.05rem 0.7rem;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--pen);
  background: var(--white);
  border-radius: 10px;
  transform: rotate(3deg);
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.report-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.report-title {
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.3;
}

.report-overall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  flex: none;
  border-radius: 50%;
  background: var(--hl);
  border: 2px solid var(--ink);
  line-height: 1;
}

.report-overall span {
  font-size: 0.62rem;
  font-weight: 800;
}

.report-overall b {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.45rem;
}

.report-sum {
  margin: 1rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.97rem;
}

.rings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.ring {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}

.ring svg {
  width: 4.1rem;
  height: 4.1rem;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-fg {
  fill: none;
  stroke-width: 4.5;
}

.ring-bg {
  stroke: var(--line);
}

.ring-fg {
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-dasharray: 100px;
  stroke-dashoffset: calc((100 - var(--v)) * 1px);
  transition: stroke-dashoffset 1.2s var(--ease);
}

.ring:nth-child(2) .ring-fg { transition-delay: 0.1s; }
.ring:nth-child(3) .ring-fg { transition-delay: 0.2s; }
.ring:nth-child(4) .ring-fg { transition-delay: 0.3s; }

.ring b {
  position: absolute;
  top: 2.05rem;
  transform: translateY(-50%);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
}

.ring span {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.25rem 0;
}

.metrics div {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: var(--paper);
}

.metrics dt {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
}

.metrics dd {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
}

.report-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.report-fix {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1.5px dashed var(--line-2);
}

.fix-line {
  font-weight: 600;
  line-height: 1.5;
}

.fix-wrong {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--pen);
  text-decoration-thickness: 2px;
  margin-right: 0.35rem;
}

.fix-right {
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--pen);
  white-space: nowrap;
}

.fix-rule {
  margin-top: 0.3rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.report-words {
  margin-top: 1rem;
}

.report-words ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.report-words li {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: var(--hl-soft);
  box-shadow: inset 0 -0.55em 0 var(--hl);
  font-weight: 700;
  font-size: 0.92rem;
}

/* ==========================================================================
   Teacher
   ========================================================================== */

.teacher {
  padding-block: var(--sec);
}

.teacher-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.video {
  position: relative;
  border-radius: var(--r-m);
  overflow: hidden;
  border: 2px solid var(--ink);
  aspect-ratio: 16 / 9;
  background: var(--ink);
  box-shadow: 8px 8px 0 var(--hl);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-facade {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  text-decoration: none;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.3s;
  filter: saturate(0.95) brightness(0.85);
}

.video-facade:hover img {
  transform: scale(1.03);
  filter: none;
}

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  background: var(--hl);
  color: var(--ink);
  border: 2px solid var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--spring);
}

.video-play .ico {
  width: 1.9rem;
  height: 1.9rem;
  margin-left: 0.2rem;
}

.video-facade:hover .video-play {
  transform: translate(-50%, -50%) scale(1.08);
}

.video-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 22, 58, 0.75);
  font-weight: 700;
  font-size: 0.85rem;
}

.ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2.5rem 0 0;
  border-top: 1px solid var(--line-2);
}

.ledger div {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-2);
}

.ledger div:nth-child(odd) {
  padding-right: 1rem;
  border-right: 1px solid var(--line-2);
}

.ledger div:nth-child(even) {
  padding-left: 1.4rem;
}

.ledger dt {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.ledger dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bio {
  margin-top: 1.25rem;
  max-width: 38em;
  color: var(--muted);
  text-wrap: pretty;
}

.teacher-copy .h3 {
  margin-top: 2rem;
}

.diff {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.5rem;
}

.diff li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-weight: 600;
  font-size: 0.98rem;
}

.diff .ico {
  color: var(--pen);
  stroke-width: 2.6;
  margin-top: 0.1rem;
}

/* cashback: the one item that links somewhere, so it reads as a link */
.diff .diff-cash {
  grid-column: 1 / -1;
}

.diff-cash a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem 0.45rem 0.6rem;
  border-radius: 12px;
  background: var(--go-soft);
  color: var(--go);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s;
}

.diff-cash a:hover {
  background: color-mix(in srgb, var(--go) 16%, var(--go-soft));
}

.diff-cash a span {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--go) 35%, transparent);
}

.diff .diff-cash .ico {
  color: var(--go);
  stroke-width: 2.2;
  margin-top: 0;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tags li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ==========================================================================
   Certificates — the real papers
   ========================================================================== */

.certs {
  padding-block: var(--sec);
  background: var(--white);
  border-block: 1px solid var(--line);
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.cert {
  --rot: -2deg;
  display: flex;
  flex-direction: column;
}

.cert:nth-child(2) {
  --rot: 1.6deg;
}

.cert:nth-child(3) {
  --rot: -0.8deg;
}

.cert-paper {
  display: block;
  margin-bottom: 1.4rem;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(28, 31, 74, 0.06), 0 22px 40px -24px rgba(28, 31, 74, 0.5);
  transform: rotate(var(--rot));
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    opacity 0.6s var(--ease);
}

.cert-paper:hover,
.cert-paper:focus-visible {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 1px 0 rgba(28, 31, 74, 0.06), 0 34px 50px -26px rgba(28, 31, 74, 0.55);
}

.cert-paper img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
}

.cert-hours {
  align-self: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  background: var(--hl);
  font-weight: 800;
  font-size: 0.82rem;
}

.cert p:not(.cert-hours) {
  margin: 0.4rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.96rem;
  flex: 1;
}

.cert .link {
  align-self: flex-start;
  font-size: 0.95rem;
}

/* ==========================================================================
   Pricing — the staircase
   ========================================================================== */

.pricing {
  padding-block: var(--sec);
}

.ladder {
  position: relative;
}

.ladder-cap {
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1rem;
}

.ladder-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ladder-bars {
  --base: 4.4rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.45rem, 1.6vw, 1.5rem);
  height: clamp(330px, 26rem + 4vw, 470px);
  padding-top: 3.25rem;
}

/* continuous baseline */
.ladder-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--base);
  height: 2px;
  background: var(--ink);
  pointer-events: none;
}

.lbar {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lbar-top {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
}

.lbar-per {
  display: block;
  text-align: center;
  font-weight: 800;
  font-size: clamp(0.88rem, 0.8rem + 0.3vw, 1.05rem);
  line-height: 1.15;
  margin-bottom: 0.55rem;
  white-space: nowrap;
}

.lbar-per small {
  font-weight: 600;
  font-size: 0.8em;
  color: var(--muted);
}

.lbar-col {
  position: relative;
  height: calc((100% - 2.4rem) * var(--hf));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0.7rem 0.25rem 0.85rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  transform-origin: 50% 100%;
  transition:
    background-color 0.25s,
    transform 0.7s var(--ease) calc(var(--i) * 80ms + 0.05s);
}

.lbar:hover .lbar-col {
  background: var(--hl-soft);
}

.lbar-n {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 0.9rem + 2.2vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.lbar-off {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--go-soft);
  color: var(--go);
  font-weight: 800;
  font-size: clamp(0.68rem, 0.62rem + 0.2vw, 0.8rem);
  white-space: nowrap;
}

.lbar-base {
  height: var(--base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  padding-top: 0.2rem;
}

.lbar-name {
  font-weight: 700;
  font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.98rem);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lbar-total {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(0.92rem, 0.8rem + 0.5vw, 1.2rem);
}

.ladder-note {
  position: absolute;
  /* sits right above the bar: column height + the per-lesson price line */
  bottom: calc((100% - 2.4rem) * var(--hf) + 2.6rem);
  left: -62%;
  display: flex;
  align-items: flex-start;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  line-height: 1;
  color: var(--pen);
  white-space: nowrap;
  transform: rotate(-6deg);
  pointer-events: none;
}

.ladder-note svg {
  width: 2.6rem;
  height: 2.2rem;
  margin-top: 0.35rem;
  margin-left: 0.1rem;
  overflow: visible;
}

.ladder-note path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* selected bar — radios first in DOM, matched by position */
.ladder-input:nth-of-type(1):checked ~ .ladder-bars .lbar:nth-of-type(1) .lbar-col,
.ladder-input:nth-of-type(2):checked ~ .ladder-bars .lbar:nth-of-type(2) .lbar-col,
.ladder-input:nth-of-type(3):checked ~ .ladder-bars .lbar:nth-of-type(3) .lbar-col,
.ladder-input:nth-of-type(4):checked ~ .ladder-bars .lbar:nth-of-type(4) .lbar-col,
.ladder-input:nth-of-type(5):checked ~ .ladder-bars .lbar:nth-of-type(5) .lbar-col,
.ladder-input:nth-of-type(6):checked ~ .ladder-bars .lbar:nth-of-type(6) .lbar-col {
  background: var(--hl);
  box-shadow: 4px 0 0 var(--ink);
}

.ladder-input:nth-of-type(1):checked ~ .ladder-bars .lbar:nth-of-type(1) .lbar-name,
.ladder-input:nth-of-type(2):checked ~ .ladder-bars .lbar:nth-of-type(2) .lbar-name,
.ladder-input:nth-of-type(3):checked ~ .ladder-bars .lbar:nth-of-type(3) .lbar-name,
.ladder-input:nth-of-type(4):checked ~ .ladder-bars .lbar:nth-of-type(4) .lbar-name,
.ladder-input:nth-of-type(5):checked ~ .ladder-bars .lbar:nth-of-type(5) .lbar-name,
.ladder-input:nth-of-type(6):checked ~ .ladder-bars .lbar:nth-of-type(6) .lbar-name {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--hl);
  text-decoration-thickness: 4px;
  text-underline-offset: 3px;
}

.ladder-input:nth-of-type(1):focus-visible ~ .ladder-bars .lbar:nth-of-type(1) .lbar-col,
.ladder-input:nth-of-type(2):focus-visible ~ .ladder-bars .lbar:nth-of-type(2) .lbar-col,
.ladder-input:nth-of-type(3):focus-visible ~ .ladder-bars .lbar:nth-of-type(3) .lbar-col,
.ladder-input:nth-of-type(4):focus-visible ~ .ladder-bars .lbar:nth-of-type(4) .lbar-col,
.ladder-input:nth-of-type(5):focus-visible ~ .ladder-bars .lbar:nth-of-type(5) .lbar-col,
.ladder-input:nth-of-type(6):focus-visible ~ .ladder-bars .lbar:nth-of-type(6) .lbar-col {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.ladder-panels {
  margin-top: 1.5rem;
}

.lpanel {
  display: none;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r-m);
  animation: panel-in 0.4s var(--ease);
}

.ladder-input:nth-of-type(1):checked ~ .ladder-panels .lpanel:nth-of-type(1),
.ladder-input:nth-of-type(2):checked ~ .ladder-panels .lpanel:nth-of-type(2),
.ladder-input:nth-of-type(3):checked ~ .ladder-panels .lpanel:nth-of-type(3),
.ladder-input:nth-of-type(4):checked ~ .ladder-panels .lpanel:nth-of-type(4),
.ladder-input:nth-of-type(5):checked ~ .ladder-panels .lpanel:nth-of-type(5),
.ladder-input:nth-of-type(6):checked ~ .ladder-panels .lpanel:nth-of-type(6) {
  display: grid;
}

.lpanel-name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lpanel-name span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0;
  color: var(--muted);
}

.lpanel-desc {
  margin-top: 0.75rem;
}

.lpanel-for {
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
}

.lpanel-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.75rem;
}

.lpanel-price b {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 1.8rem + 1.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.lpanel-old {
  font-size: 0.9rem;
  color: var(--muted);
}

.lpanel-old s {
  text-decoration-color: var(--pen);
  text-decoration-thickness: 2px;
  font-weight: 700;
}

.lpanel-per {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0.5rem 0 1.1rem;
  font-weight: 800;
}

.save {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--go-soft);
  color: var(--go);
  font-size: 0.85rem;
}

.lpanel-base {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
}

/* cashback for conducted lessons: a small rising staircase under the price ladder */
.cashback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: end;
  gap: 1.25rem clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border-radius: var(--r-m);
  border: 1px solid color-mix(in srgb, var(--go) 30%, var(--line-2));
  background: linear-gradient(135deg, var(--go-soft), var(--white) 70%);
}

.cashback-copy p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 34em;
}

.cashback-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 0.6rem;
}

.cashback-steps li {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  height: calc(4.4rem + var(--i, 0) * 1.25rem);
  padding: 0.7rem 0.75rem;
  border-radius: 14px 14px 6px 6px;
  background: var(--white);
  border: 1.5px solid var(--go);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease) calc(var(--i, 0) * 90ms + 0.15s);
}

.cashback-steps li:last-child {
  background: var(--go);
  color: #fff;
}

.cashback-steps b {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  letter-spacing: -0.02em;
  color: var(--go);
  line-height: 1.1;
}

.cashback-steps li:last-child b {
  color: #fff;
}

.cashback-steps span {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
}

.cashback-steps li:last-child span {
  color: rgba(255, 255, 255, 0.85);
}

html.js-anim [data-anim="cashback"]:not(.is-in) .cashback-steps li {
  transform: scaleY(0.2);
}

@media (max-width: 860px) {
  .cashback {
    grid-template-columns: minmax(0, 1fr);
  }

  .cashback-steps li {
    height: calc(5.4rem + var(--i, 0) * 1.1rem);
    padding: 0.65rem 0.55rem;
  }
}

@media (max-width: 380px) {
  .cashback-steps li {
    padding: 0.6rem 0.45rem;
  }

  .cashback-steps span {
    font-size: 0.72rem;
  }
}

.pricing-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.club,
.why {
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border-radius: var(--r-m);
}

.club {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem 1rem;
  align-content: center;
  background: var(--ink);
  color: var(--on-ink);
}

.club p:not(.club-price) {
  margin-top: 0.3rem;
  color: var(--on-ink-muted);
  font-size: 0.95rem;
}

.club-ico {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--lav);
  color: var(--ink);
  grid-row: span 2;
}

.club-ico .ico {
  width: 1.6rem;
  height: 1.6rem;
}

.club-price {
  grid-column: 2;
  margin-top: 0.6rem;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--hl);
  letter-spacing: -0.02em;
}

.why {
  border: 1px solid var(--line-2);
  background: var(--white);
}

.why ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.why li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.why li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 3px;
  background: var(--hl);
  border: 1.5px solid var(--ink);
}

.pricing-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pricing-free {
  margin-top: 0.5rem;
}

/* ==========================================================================
   Reviews (only when real reviews exist)
   ========================================================================== */

.reviews {
  padding-block: var(--sec);
  background: var(--white);
  border-block: 1px solid var(--line);
}

.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.review {
  padding: 1.5rem;
  border-radius: var(--r-m);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review blockquote {
  margin: 0;
  font-size: 1.02rem;
}

.review-by {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  font-size: 0.92rem;
}

.review-by span {
  color: var(--muted);
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
  padding-block: var(--sec);
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.faq-head {
  position: sticky;
  top: calc(var(--topbar-h) + 2rem);
}

.faq-head .btn {
  margin-top: 1.5rem;
}

.faq-list {
  border-top: 1px solid var(--line-2);
}

.qa {
  border-bottom: 1px solid var(--line-2);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  font-size: 1.07rem;
  line-height: 1.4;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:hover .qa-ico {
  background: var(--hl-soft);
}

.qa-ico {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  transition: transform 0.35s var(--ease), background-color 0.25s;
}

.qa-ico .ico {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.4;
}

.qa[open] .qa-ico {
  transform: rotate(45deg);
  background: var(--hl);
}

.qa-a p {
  margin: 0 0 1.4rem;
  max-width: 40em;
  color: var(--muted);
}

.qa::details-content {
  block-size: 0;
  overflow-y: clip;
  transition:
    block-size 0.4s var(--ease),
    content-visibility 0.4s allow-discrete;
}

.qa[open]::details-content {
  block-size: auto;
}

/* ==========================================================================
   Booking (ink)
   ========================================================================== */

.contact {
  padding-block: var(--sec);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: start;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  border: 2px solid var(--hl);
  color: var(--hl);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.steps b {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.3;
  padding-top: 0.2rem;
}

.steps span {
  color: var(--on-ink-muted);
  font-size: 0.97rem;
}

.direct {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(238, 240, 250, 0.16);
}

.direct p {
  color: var(--on-ink-muted);
  font-size: 0.95rem;
}

.direct-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.form-card {
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.4rem);
  border-radius: var(--r-l);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.7);
}

.form-card .btn {
  --btn-shadow: var(--ink);
  border-color: var(--ink);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.field-label {
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0;
}

.field-label em {
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.2rem;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--line-2);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 212, 59, 0.75);
}

.chips {
  border: 0;
  margin: 0 0 1.1rem;
  padding: 0;
  min-width: 0;
}

.chips legend {
  margin-bottom: 0.5rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  background: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s var(--ease);
}

.chip:hover span {
  border-color: var(--ink);
}

.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip input:active + span {
  transform: scale(0.96);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.pack-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.55rem 0.55rem 0.55rem 1rem;
  border-radius: 12px;
  background: var(--hl);
  border: 2px solid var(--ink);
  font-size: 0.95rem;
  animation: pop 0.4s var(--spring);
}

.pack-chip[hidden] {
  display: none;
}

.pack-chip-x {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 8px;
  border: 0;
  background: rgba(28, 31, 74, 0.1);
  color: var(--ink);
  cursor: pointer;
}

.pack-chip-x:hover {
  background: rgba(28, 31, 74, 0.2);
}

.pack-chip-x .ico {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.4;
}

.form .btn[type="submit"] {
  margin-top: 0.4rem;
}

.form-note {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.form-error {
  margin-bottom: 1.1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #fdeced;
  border: 1px solid #f4c3c5;
  color: #a5232a;
  font-weight: 600;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sent {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1rem 0 0.5rem;
}

.sent-check {
  width: 5rem;
  height: 5rem;
  margin-bottom: 0.4rem;
}

.sent-check circle {
  fill: var(--hl);
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-dasharray: 1;
  animation: strike 0.6s var(--ease) 0.1s both;
}

.sent-check path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  animation: strike 0.45s var(--ease) 0.55s both;
}

.sent-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.sent-title:focus {
  outline: none;
}

.sent p {
  max-width: 28em;
  color: var(--muted);
}

.sent .btn {
  margin-top: 0.8rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  background: var(--ink-3);
  color: var(--on-ink-muted);
  padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.92rem;
}

.foot-in {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.5rem 2.5rem;
  align-items: center;
}

.brand-foot {
  color: var(--on-ink);
}

.brand-foot .brand-av {
  border-color: var(--on-ink);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
}

.foot-nav a,
.foot-social a {
  text-decoration: none;
}

.foot-nav a:hover {
  color: #fff;
}

.foot-social {
  display: flex;
  gap: 0.6rem;
}

.foot-social a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  border: 1.5px solid rgba(238, 240, 250, 0.3);
  color: var(--on-ink);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.foot-social a:hover {
  background: var(--hl);
  color: var(--ink);
  border-color: var(--hl);
}

.foot-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(238, 240, 250, 0.12);
  font-size: 0.85rem;
}

.foot-credit a {
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 212, 59, 0.6);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.foot-credit a:hover {
  color: var(--hl);
  text-decoration-color: var(--hl);
}

/* ==========================================================================
   Mobile dock + exit reminder
   ========================================================================== */

.dock {
  display: none;
}

.exit {
  width: min(100% - 2rem, 430px);
  padding: 2.2rem 1.8rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: var(--r-l);
  background: var(--white);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  text-align: center;
}

.exit[open] {
  animation: pop 0.45s var(--spring);
}

.exit::backdrop {
  background: rgba(20, 22, 58, 0.5);
  backdrop-filter: blur(3px);
}

.exit-x-wrap {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.exit-x {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.exit-x .ico {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2.4;
}

.exit-av {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
}

.exit-title:focus {
  outline: none;
}

.exit-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.exit p {
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.exit-later {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Scroll-in states — only when JS is running (html.js-anim); content is never
   hidden without it. "is-in" = shown, "is-play" = arrived by scrolling.
   ========================================================================== */

html.js-anim [data-anim="chat"]:not(.is-in) .msg-me,
html.js-anim [data-anim="chat"]:not(.is-in) .msg-teacher {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
}

.chat .msg-me,
.chat .msg-teacher {
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.chat .msg-me {
  transform-origin: 100% 100%;
}

.chat.is-play .msg-me:nth-child(2) { transition-delay: 0.55s; }
.chat.is-play .msg-me:nth-child(3) { transition-delay: 1.1s; }
.chat.is-play .msg-teacher { transition-delay: 2.55s; }
.chat.is-play .msg-typing { animation: typing-show 1.05s ease 1.55s both; }

html.js-anim [data-anim="ticks"]:not(.is-in) .ico path {
  stroke-dashoffset: 24;
}

.ticks .ico path {
  transition: stroke-dashoffset 0.45s var(--ease);
}

.ticks li:nth-child(2) .ico path { transition-delay: 0.15s; }
.ticks li:nth-child(3) .ico path { transition-delay: 0.3s; }
.ticks li:nth-child(4) .ico path { transition-delay: 0.45s; }
.ticks li:nth-child(5) .ico path { transition-delay: 0.6s; }

html.js-anim [data-anim="report"]:not(.is-in) .ring-fg {
  stroke-dashoffset: 100px;
}

html.js-anim [data-anim="ladder"]:not(.is-in) .lbar-col {
  transform: scaleY(0.04);
}

html.js-anim [data-anim="ladder"]:not(.is-in) .lbar-per,
html.js-anim [data-anim="ladder"]:not(.is-in) .ladder-note {
  opacity: 0;
}

.lbar-per,
.ladder-note {
  transition: opacity 0.5s ease calc(var(--i, 2) * 80ms + 0.5s);
}

html.js-anim [data-anim="certs"]:not(.is-in) .cert-paper {
  opacity: 0;
  transform: translateY(46px) rotate(calc(var(--rot) * -3));
}

.cert:nth-child(2) .cert-paper { transition-delay: 0.1s; }
.cert:nth-child(3) .cert-paper { transition-delay: 0.2s; }
.cert-paper:hover { transition-delay: 0s; }

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes rise {
  from { opacity: 0; transform: translateY(0.6em); }
  to { opacity: 1; transform: none; }
}

@keyframes dim {
  from { color: var(--ink); }
}

@keyframes strike {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes write {
  from { clip-path: inset(-40% 110% -40% -10%); }
  to { clip-path: inset(-40% -10% -40% -10%); }
}

@keyframes type-in {
  from { clip-path: inset(-20% 100% -20% 0); }
  to { clip-path: inset(-20% 0 -20% 0); }
}

@keyframes tile-in {
  from { opacity: 0; transform: translateY(28px) rotate(2deg); }
  to { opacity: 1; transform: none; }
}

@keyframes stick {
  from { opacity: 0; transform: rotate(18deg) scale(0.6); }
  to { opacity: 1; transform: rotate(5deg); }
}

@keyframes talk {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}

@keyframes speaking {
  0% { opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes dot {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-4px); opacity: 1; }
}

@keyframes typing-show {
  0% { opacity: 0; transform: translateY(10px); }
  18% { opacity: 1; transform: none; }
  82% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .hero-grid::before {
    display: none;
  }
}

@media (max-width: 1180px) {
  :root {
    --topbar-h: 64px;
  }

  /* backdrop-filter would turn the header into the containing block of the fixed drawer */
  .topbar,
  .topbar.is-scrolled {
    background: var(--paper);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .topbar-in {
    gap: 1rem;
  }

  .burger {
    display: block;
  }

  .lang-desk,
  .topbar-login {
    display: none;
  }

  .topbar-act {
    margin-left: auto;
  }

  .nav {
    position: fixed;
    inset: var(--topbar-h) 0 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 1rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
    background: var(--paper);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav > a {
    padding: 1rem 0.25rem;
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--line-2);
    background: none;
  }

  .nav > a[aria-current="true"] {
    background: none;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--hl);
    text-decoration-thickness: 5px;
    text-underline-offset: 5px;
  }

  .nav-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .talk-grid,
  .free-grid,
  .progress-grid,
  .teacher-grid,
  .faq-grid,
  .contact-grid,
  .weekly,
  .sec-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .call {
    justify-self: start;
    width: min(100%, 420px);
    margin-top: 1rem;
  }

  .talk-head,
  .faq-head {
    position: static;
  }

  .feats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invite {
    max-width: 460px;
  }

  .pricing-more {
    grid-template-columns: minmax(0, 1fr);
  }

  .lpanel {
    grid-template-columns: minmax(0, 1fr);
  }

  .teacher-media {
    order: 2;
  }
}

@media (max-width: 860px) {
  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    gap: 0.6rem;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform 0.35s var(--ease);
  }

  .dock.is-on {
    transform: none;
  }

  .dock .btn {
    flex: 1;
    min-height: 3.1rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .dock-tg {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    flex: none;
    border-radius: 14px;
    border: 2px solid var(--ink);
    background: var(--white);
    color: var(--ink);
  }

  .dock-tg .ico {
    width: 1.4rem;
    height: 1.4rem;
  }

  .foot {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
  }

  .foot-in {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .foot-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .wrap {
    width: min(100% - 2rem, var(--wrap));
  }

  .topbar-cta {
    display: none;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .hero-title {
    margin-top: 1.1rem;
  }

  .hero-cta .btn {
    flex: 1 1 100%;
  }

  .hero-proof {
    flex-wrap: nowrap;
  }

  .hero-proof li {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 0.75rem;
    font-size: 0.8rem;
  }

  .ht-fix {
    margin-top: 0.12em;
  }

  /* booking: the form comes right after the heading, the steps follow */
  .contact-copy {
    display: contents;
  }

  .contact-grid {
    row-gap: 0;
  }

  .contact-copy .lead {
    margin-bottom: 1.75rem;
  }

  .form-card {
    order: 3;
  }

  .steps {
    order: 4;
    margin-top: 2.5rem;
  }

  .direct {
    order: 5;
  }

  .call {
    width: 100%;
  }

  .call-sticker {
    right: -6px;
  }

  .cap-you {
    font-size: 0.95rem;
  }

  .msg {
    max-width: 94%;
  }

  .feats {
    grid-template-columns: minmax(0, 1fr);
  }

  .ticks-2,
  .diff,
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .invite {
    transform: none;
    box-shadow: 6px 6px 0 var(--ink);
    padding: 1.25rem;
  }

  .invite-meta div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }

  .metrics dt {
    font-size: 1.1rem;
  }

  .rings {
    gap: 0.25rem;
  }

  .ring svg {
    width: 3.6rem;
    height: 3.6rem;
  }

  .ring b {
    top: 1.8rem;
    font-size: 0.9rem;
  }

  .ring span {
    font-size: 0.66rem;
  }

  .cert-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.25rem;
    margin-inline: -1rem;
    padding: 0.5rem 1rem 1rem;
    scrollbar-width: none;
  }

  .cert-list::-webkit-scrollbar {
    display: none;
  }

  .cert {
    flex: 0 0 78%;
    scroll-snap-align: center;
  }

  .ladder-bars {
    --base: 3.8rem;
    gap: 0.35rem;
    height: 330px;
  }

  .lbar-per small {
    display: block;
  }

  .lbar-col {
    height: calc((100% - 3.1rem) * var(--hf));
    border-radius: 12px 12px 0 0;
    padding-bottom: 0.6rem;
  }

  .lbar-off {
    top: 0.4rem;
    padding: 0.1rem 0.3rem;
  }

  .ladder-note {
    left: -80%;
    bottom: calc((100% - 3.1rem) * var(--hf) + 3.2rem);
  }

  .ladder-note svg {
    width: 2rem;
    height: 1.8rem;
  }

  .club {
    grid-template-columns: minmax(0, 1fr);
  }

  .club-ico {
    grid-row: auto;
  }

  .club-price {
    grid-column: 1;
  }

  .foot-in {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-social {
    grid-row: auto;
  }
}

@media (max-width: 380px) {
  .hero-proof li {
    padding: 0 0.5rem;
  }

  .lbar-name {
    font-size: 0.7rem;
  }
}

@media (hover: none) {
  .btn-primary:hover {
    transform: none;
    box-shadow: 4px 4px 0 var(--btn-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .typing i,
  .bars i {
    animation: none !important;
  }
}

/* ==========================================================================
   Login page (shares the public look)
   ========================================================================== */

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  position: relative;
  isolation: isolate;
}

.auth::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  opacity: 0.8;
}

.auth-card {
  width: min(100%, 430px);
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r-l);
  box-shadow: 8px 8px 0 var(--ink);
  animation: pop 0.45s var(--spring);
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.auth-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
}

.field-password {
  position: relative;
}

.field-password input {
  padding-right: 6rem;
}

.password-toggle {
  position: absolute;
  right: 0.45rem;
  bottom: 0.5rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--lav-soft);
}

.auth-back {
  display: block;
  margin-top: 1.4rem;
  text-align: center;
}

.alert-error {
  margin-bottom: 1.1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #fdeced;
  border: 1px solid #f4c3c5;
  color: #a5232a;
  font-weight: 600;
  font-size: 0.95rem;
}
