/* Amadeus — "Gyva lenta". The page is a set of lesson boards: slate with grain, chalk text, the accent only for the thing
   the board is talking about. Caveat (chalk hand) for headings and the keyboard caption only.
   No colour literals here: every colour comes from theme.css, tints are color-mix() of those variables. */
@font-face { font-family: "Bravura"; src: url(fonts/bravura-sub.woff2) format("woff2"); font-display: block; }
/* Caveat and Commissioner, self-hosted (SIL OFL, fonts/OFL-*.txt): Google Fonts' variable woff2 files, latin and
   latin-ext subsets (latin-ext has ą č ę ė į š ų ū ž). The browser fetches a subset only when the page uses it. */
@font-face { font-family: "Caveat"; src: url(fonts/caveat-latin.woff2) format("woff2"); font-weight: 500 700; font-display: swap;
  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: "Caveat"; src: url(fonts/caveat-latin-ext.woff2) format("woff2"); font-weight: 500 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Commissioner"; src: url(fonts/commissioner-latin.woff2) format("woff2"); font-weight: 400 600; font-display: swap;
  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: "Commissioner"; src: url(fonts/commissioner-latin-ext.woff2) format("woff2"); font-weight: 400 600; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --hand: "Caveat", "Segoe Print", cursive;
  --sans: "Commissioner", "Avenir Next", "Segoe UI", sans-serif;
  --r: 22px; --gut: clamp(16px, 4vw, 40px);
  --pad-x: clamp(20px, 5vw, 64px);
  --drop: 0 30px 80px color-mix(in srgb, var(--shade) 45%, transparent);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--chalk); font: 400 18px/1.62 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
[id] { scroll-margin-top: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 30; padding: 10px 16px; border-radius: 999px; background: var(--chalk); color: var(--board); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* The logo is the studio's white PNG used as a mask, so it is painted in the theme's chalk colour. */
.logo { display: block; flex: none; text-decoration: none; }
.logo-img { display: block; height: 38px; aspect-ratio: 726 / 220; background: var(--chalk);
  -webkit-mask: url(img/logo.png) center / contain no-repeat; mask: url(img/logo.png) center / contain no-repeat; }

/* ---------- chalk ---------- */
/* Chalk text: the hand face, eroded by a fine noise mask so strokes break up like chalk on slate. */
.chalk {
  font-family: var(--hand); font-weight: 600; letter-spacing: .005em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.4 2.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.4 2.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  text-shadow: 0 0 1px color-mix(in srgb, var(--chalk) 45%, transparent);
  /* The mask only paints inside the box, and Caveat's descenders (p g j ą ų) and slanted ends reach outside the line
     box. So the box gets room on every side and negative margins give it back: the layout does not move.
     Set a chalk element's bottom margin with --mb, never with margin itself. */
  --mb: 0px;
  padding: .14em .32em .3em .1em;
  margin: -.14em -.32em calc(var(--mb) - .3em) -.1em;
}
.accent { color: var(--accent); }

/* ---------- boards ---------- */
/* Every section is a lesson frame, the same object as the textbook's player: rounded board, hairline edge, grain. */
.board {
  position: relative; isolation: isolate; margin: 0 auto 28px; max-width: 1240px; padding: clamp(28px, 5vw, 64px) var(--pad-x);
  border-radius: var(--r); background: var(--board);
  box-shadow: 0 0 0 1px var(--edge), var(--drop);
}
/* Eraser smudges and a vignette... */
.board::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(ellipse 38% 16% at 22% 30%, color-mix(in srgb, var(--chalk) 3.5%, transparent), transparent 70%),
    radial-gradient(ellipse 30% 12% at 74% 72%, color-mix(in srgb, var(--chalk) 3%, transparent), transparent 70%),
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 60%, color-mix(in srgb, var(--shade) 30%, transparent));
}
/* ...and grain: chalk dust, a chalk-coloured layer showing through a noise mask. */
.board::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--chalk); opacity: .085;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.kicker { margin: 0 0 14px; font: 600 13px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.kicker b { color: var(--accent); font-weight: 600; margin-right: .5em; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h2.chalk { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1; --mb: .45em; }
h3.chalk { font-size: clamp(1.75rem, 3vw, 2.15rem); line-height: 1.05; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--chalk); max-width: 34em; }
.dim { color: var(--dim); }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 15px 30px; border-radius: 999px; border: 0; background: var(--chalk); color: var(--board); font: 600 17px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--edge); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); background: transparent; }
.btn.small { padding: 10px 18px; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header ---------- */
.top { position: relative; z-index: 20; max-width: 1240px; margin: 0 auto; padding: 18px var(--gut); display: flex; align-items: center; gap: 28px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--dim); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.nav a:hover { color: var(--chalk); border-bottom-color: var(--faint); }
.nav .nav-cta { display: none; }
.lang { display: flex; gap: 4px; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.lang a, .lang span { padding: 6px 9px; border-radius: 999px; text-decoration: none; color: var(--dim); }
.lang a:hover { color: var(--chalk); }
.lang [aria-current] { background: var(--board-hi); color: var(--chalk); box-shadow: 0 0 0 1px var(--edge); }
.top > .btn { padding: 11px 20px; font-size: 15px; }
.menu-btn { display: none; align-items: center; gap: 10px; padding: 9px 14px 9px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--edge); font: 600 15px/1 var(--sans); cursor: pointer; }
.menu-btn:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.menu-btn svg { width: 22px; height: 18px; overflow: visible; }
.menu-btn .bar { transition: transform .25s, opacity .2s; transform-origin: 11px 9px; }
.menu-btn[aria-expanded="true"] .b1 { transform: translateY(6px) rotate(42deg); }
.menu-btn[aria-expanded="true"] .b2 { opacity: 0; }
.menu-btn[aria-expanded="true"] .b3 { transform: translateY(-6px) rotate(-42deg); }
main { padding: 0 var(--gut); }

/* ---------- hero: the lesson board ---------- */
.hero { overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(3.4rem, 8.4vw, 6.6rem); line-height: .84; --mb: .36em; }   /* Caveat's small x-height: tighter than 1 so the three lines read as one title */
.hero h1 .accent { display: block; }
.hero .lede { margin-bottom: 1.6em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { margin: 30px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--dim); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }

.lesson { position: relative; }
.lesson-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; min-height: 140px; }
.caption { font-size: clamp(2.3rem, 4.6vw, 3.4rem); line-height: 1; min-height: 1.1em; position: relative; }
.caption .name { font-size: 1.55em; color: var(--accent); }
.caption .alt { font-size: .62em; color: var(--dim); margin-left: .3em; }
.caption .write { display: inline-block; animation: write .45s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes write { from { clip-path: inset(-.4em 100% -.5em -.3em); } to { clip-path: inset(-.4em -.5em -.5em -.3em); } }
.arrow { position: absolute; left: clamp(160px, 42%, 272px); top: calc(100% - 26px); width: 74px; height: 58px; pointer-events: none; transition: opacity .4s; }
.arrow path { stroke-dasharray: 140; stroke-dashoffset: 140; animation: draw 1s .6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.played .arrow { opacity: 0; }
.staff { width: clamp(150px, 16vw, 200px); height: auto; overflow: visible; }
.staff .note { opacity: 0; transition: opacity .15s; }
.staff .note.on { opacity: 1; }
.glyph { font-family: Bravura; }

.keys { display: block; width: 100%; height: auto; margin-top: 40px; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.keys .case { fill: var(--key-black); }
.key { cursor: pointer; outline: none; }
.key rect { transition: fill .35s ease-out; }
.key.w rect { fill: var(--chalk); }
.key.b rect { fill: var(--key-black); }
.key.w:hover rect { fill: color-mix(in srgb, var(--chalk) 90%, var(--shade)); }
.key.b:hover rect { fill: color-mix(in srgb, var(--key-black) 75%, var(--edge)); }
.key.down rect { fill: var(--accent) !important; transition-duration: .04s; }
.key .ring { fill: none !important; stroke: transparent; stroke-width: 3; }
.key:focus-visible .ring { stroke: var(--accent); }
.key.w:focus-visible .ring { stroke: var(--accent-ink); }
.hint { margin: 14px 0 0; font-size: 13px; color: var(--dim); text-align: center; }
.hint kbd { font: 600 12px/1 var(--sans); padding: 3px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--edge); color: var(--dim); }

/* ---------- promises ---------- */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.promise svg { width: 100%; max-width: 220px; height: auto; margin: 0 0 18px -6px; overflow: visible; }
.promise h3 { --mb: .4em; }
.promise p { color: var(--dim); font-size: 16.5px; margin: 0; }
.sk { fill: none; stroke: var(--chalk); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sk.a { stroke: var(--accent); }
.sk.thin { stroke-width: 1.5; opacity: .55; }
.skf { fill: var(--chalk); }
.skf.a { fill: var(--accent); }

/* ---------- teacher ---------- */
.teacher { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.pinned { position: relative; margin: 18px 0 0; padding: 12px 12px 18px; background: var(--paper); color: var(--ink); border-radius: 3px; transform: rotate(-2.2deg);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--shade) 15%, transparent), 0 24px 50px color-mix(in srgb, var(--shade) 50%, transparent); max-width: 400px; }
.pinned img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; width: 100%; border-radius: 1px; background: color-mix(in srgb, var(--ink) 15%, var(--paper)); }
.pinned figcaption { margin-top: 12px; font: 500 15px/1.35 var(--sans); }
.pinned figcaption small { display: block; color: color-mix(in srgb, var(--ink) 72%, var(--paper)); font-size: 13px; }
.magnet { position: absolute; top: -14px; left: 50%; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 55%, var(--glint)), var(--accent) 45%, color-mix(in srgb, var(--accent) 72%, var(--shade)));
  box-shadow: 0 5px 8px color-mix(in srgb, var(--shade) 45%, transparent); }
.teacher-text p { max-width: 36em; }
.teacher-text em { font-style: normal; color: var(--chalk); border-bottom: 1.5px solid var(--accent); }
.story { margin-top: 34px; padding-top: 30px; border-top: 1.5px dashed var(--edge); }
.story h3 { --mb: .35em; }
.cred { list-style: none; margin: 4px 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cred li { font-size: 14px; padding: 6px 13px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--edge); color: var(--dim); }

/* ---------- learn: six annotated sketches on one board; the sketches are small working demos ---------- */
.cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 3.5vw, 48px); }
/* Subgrid: text first, sketch below. In each row the texts share one height, so the sketches start level, and the
   sketches share one height, so their controls line up. */
.card { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 0; padding: 22px 0 26px; border-top: 1.5px solid var(--edge); }
.demo { display: flex; flex-direction: column; align-items: flex-start; }
.demo svg { display: block; width: 100%; max-width: 240px; height: auto; overflow: visible; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
/* Controls and the line under them keep a fixed height, so nothing moves when text or labels change. */
.ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; margin-top: 8px; }
.ctrl .btn.small { padding: 7px 11px; font-size: 13.5px; gap: 5px; }
@media (min-width: 981px) and (max-width: 1180px) { .cards { column-gap: 22px; } .ctrl .btn.small { padding: 6px 9px; font-size: 12.5px; } .ctrl { gap: 5px; } }
.ctrl .btn svg { width: 12px; height: 12px; }
.ctrl .btn[disabled] { opacity: .45; cursor: default; }
.btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.say { margin: 0; min-height: 2.8em; font-size: 13.5px; line-height: 1.4; color: var(--dim); }
.demo > svg + .say { margin-top: auto; padding-top: 8px; }
.demo > .ctrl { margin-top: auto; }
.demo > .say { margin-top: 4px; }
.card-text { padding-bottom: 16px; }
.card-text .n { display: block; font: 600 12px/1 var(--sans); letter-spacing: .12em; color: var(--dim); margin-bottom: 6px; }
.card-text h3 { --mb: .2em; }
.card-text > p { color: var(--dim); font-size: 16px; margin: 0; }
.more { margin-top: 8px; font-size: 14.5px; color: var(--dim); }
.more summary { cursor: pointer; width: fit-content; color: var(--chalk); font-weight: 500; font-size: 13.5px; border-bottom: 1.5px dotted var(--faint); }
.more summary:hover { border-bottom-color: var(--accent); }
.more p { margin: 8px 0 0; }

/* demo drawings */
.mk .key { cursor: pointer; }
.mk.ro .key { cursor: default; }
.mk .case, .demo .case { fill: var(--key-black); }
.key.good rect:not(.ring) { fill: var(--accent) !important; }
.key.wrong rect:not(.ring) { fill: var(--bad) !important; }
.key.wrong { animation: shake .36s; transform-box: fill-box; }
@keyframes shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
.key.k1 rect:not(.ring) { fill: color-mix(in srgb, var(--dim) 70%, var(--chalk)) !important; }
.key.k2 rect:not(.ring) { fill: var(--accent) !important; }
.kname { font: 600 22px/1 var(--hand); fill: color-mix(in srgb, var(--key-black) 55%, var(--chalk)); pointer-events: none; }
.tag { font: 600 22px/1 var(--hand); fill: var(--accent); opacity: 0; }
.tag[data-i="0"] { fill: var(--chalk); }
.tag.on { opacity: 1; }
.dnote { transition: opacity .2s; }
.dnote.out { opacity: 0; }
.beat { fill: transparent; stroke: var(--chalk); stroke-width: 2; transition: fill .08s; }
.beat.count { stroke: var(--dim); fill: color-mix(in srgb, var(--dim) 35%, transparent); }
.beat.on { fill: var(--chalk); }
.rn .skf, .rn .sk { transition: fill .08s, stroke .08s; }
.rn.on .skf { fill: var(--accent); }
.rn.on .sk { stroke: var(--accent); }
.hit { opacity: 0; }
.hit.good { opacity: 1; fill: var(--good); }
.hit.bad { opacity: 1; fill: var(--bad); }
.tapzone.live { cursor: pointer; }
.snd { fill: transparent; stroke: var(--chalk); stroke-width: 2; transition: fill .1s; }
.snd.on { fill: var(--accent); stroke: var(--accent); }
.sndn { font: 600 18px/1 var(--hand); fill: var(--chalk); pointer-events: none; }
.snd.ask { stroke: var(--accent); stroke-width: 2.6; }
.sndn.ask { fill: var(--accent); }

.tn { opacity: 0; transition: opacity .2s; }
.tn.on { opacity: .75; }
.tn.new { opacity: 1; }
.tn.new .skf { fill: var(--accent); }
.sn .skf, .sn .sk { transition: fill .08s, stroke .08s; }
.sn.on .skf { fill: var(--accent); }
.sn.on .sk { stroke: var(--accent); }
.chord { font: 600 26px/1 var(--hand); fill: var(--dim); transition: fill .1s; }
.chord.on { fill: var(--accent); }

/* ---------- textbook ---------- */
.book { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.frame { display: block; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--edge), 0 24px 60px color-mix(in srgb, var(--shade) 50%, transparent); transition: box-shadow .25s; }
.frame:hover { box-shadow: 0 0 0 2px var(--accent), 0 24px 60px color-mix(in srgb, var(--shade) 50%, transparent); }
.frame svg { display: block; width: 100%; height: auto; }
.f-slate { fill: color-mix(in srgb, var(--board-hi) 75%, var(--edge)); }
.f-bar { fill: color-mix(in srgb, var(--board) 80%, var(--page)); }
.f-chalk { fill: var(--chalk); }
.f-accent { fill: var(--accent); }
.f-key { fill: var(--key-black); }
.f-edge { fill: var(--edge); }
.f-dim { fill: var(--dim); }
.book ul { margin: 0 0 28px; padding: 0; list-style: none; }
.book li { padding: 9px 0 9px 30px; position: relative; color: var(--dim); }
.book li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 14px; height: 10px; border-radius: 50%; background: var(--accent); transform: rotate(-20deg); }
.book li b { color: var(--chalk); font-weight: 500; }

/* ---------- prices ---------- */
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 72px); }
.menu { list-style: none; margin: 18px 0 14px; padding: 0; }
.menu li { display: flex; align-items: baseline; gap: 12px; padding: 4px 0; }
.menu .what { font-size: 18px; white-space: nowrap; }
.menu .dots { flex: 1; min-width: 20px; border-bottom: 3px dotted var(--faint); transform: translateY(-6px); }
.menu .cost { font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; white-space: nowrap; }
.menu .cost small { font-size: .55em; color: var(--dim); }
.where { color: var(--dim); font-size: 16px; margin: 0; }
.terms { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 12px; padding-top: 28px; border-top: 1.5px dashed var(--edge); }
.terms p { margin: 0; font-size: 15.5px; color: var(--dim); }
.terms b { display: block; color: var(--chalk); font-weight: 600; margin-bottom: 4px; }

/* ---------- FAQ: questions and answers written under each other, like the terms under the prices ---------- */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 72px); }
.qa { padding: 20px 0 22px; border-top: 1.5px dashed var(--edge); }
.qa h3 { font: 600 18px/1.35 var(--sans); color: var(--chalk); margin-bottom: 6px; }
.qa p { margin: 0; font-size: 16px; color: var(--dim); max-width: 36em; }
.qa a { color: var(--chalk); }

/* ---------- booking ---------- */
.booking { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; align-content: start; }
.form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; color: var(--dim); }
.field label .opt { font-weight: 400; }
.field input, .field textarea { font: 400 18px/1.4 var(--sans); color: var(--chalk); background: color-mix(in srgb, var(--chalk) 3%, transparent); border: 0; border-bottom: 1.5px solid var(--dim); border-radius: 6px 6px 0 0; padding: 12px 12px; width: 100%; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--dim) 75%, var(--board)); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 2px 0 var(--accent); }
.field [aria-invalid="true"] { border-bottom-color: var(--bad); }
.field textarea { min-height: 110px; resize: vertical; }
.err { margin: 0; font-size: 14px; color: var(--bad); }
.err:empty { display: none; }
/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.consent { margin: 0; font-size: 14px; color: var(--dim); flex: 1 1 16em; }
.consent a { color: var(--chalk); }
.done { outline: none; }
.done .chalk { --mb: 14px; font-size: clamp(2.2rem, 4.4vw, 3.2rem); line-height: 1.05; }
.fail { grid-column: 1 / -1; margin: 4px 0 0; padding: 18px 20px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--bad); outline: none; }
.fail p { margin: 0 0 12px; }
.fail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.fail-row .mail { font-weight: 600; font-size: 19px; text-decoration: none; border-bottom: 1.5px solid var(--accent); }
.copied { font-size: 14px; color: var(--good); }
.alt-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ---------- contacts / footer ---------- */
.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.contacts p { margin: 0; }
.contacts .k { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 600; margin-bottom: 6px; }
.contacts a { text-decoration: none; border-bottom: 1.5px solid var(--edge); }
.contacts a:hover { border-bottom-color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer { max-width: 1240px; margin: 0 auto; padding: 18px var(--gut) 40px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; color: var(--dim); font-size: 14px; }
footer .logo-img { height: 28px; opacity: .75; }
footer a { color: var(--dim); }
footer a:hover { color: var(--chalk); }
footer .lang { margin-left: auto; }

/* ---------- privacy page ---------- */
.doc { max-width: 900px; }
.doc h1.chalk { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1; --mb: .5em; }
.doc h2 { font: 600 20px/1.3 var(--sans); margin: 1.6em 0 .5em; }
.doc p, .doc li { color: var(--dim); max-width: 40em; }
.doc ul { padding-left: 1.2em; }
.draft { display: inline-block; margin: 0 0 22px; padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--chalk); font-size: 14px; }

/* ---------- intent pages (adults, children, theory, lessons in Vilnius) and the links to them ---------- */
.crumbs ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--dim); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--faint); }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--chalk); }
.landing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: clamp(24px, 5vw, 72px); align-items: center; }
.landing h1 { font-size: clamp(2.9rem, 6.6vw, 5.2rem); line-height: .9; --mb: .36em; }
.landing .lede { margin-bottom: 1.4em; }
.landing-art { display: block; width: 100%; height: auto; overflow: visible; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 5vw, 72px); align-items: start; }
/* The narrow column holds one long Lithuanian word per line («Pradedantiesiems»); the chalk mask clips anything that
   leaves the box, so the heading is a size smaller here and may break inside a word as a last resort. */
.split h2.chalk { font-size: clamp(2.1rem, 3.4vw, 3.3rem); overflow-wrap: anywhere; }
.prose p, .prose li { color: var(--dim); max-width: 38em; }
.prose > :last-child { margin-bottom: 0; }
.prose.after { margin-top: 28px; }
.ticks, .steps { margin: 0 0 1em; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 5px 0 5px 30px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 14px; height: 10px; border-radius: 50%; background: var(--accent); transform: rotate(-20deg); }
.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 10px 0 10px 46px; border-top: 1.5px dashed var(--edge); }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li::before { content: counter(step); position: absolute; left: 4px; top: 2px; font: 600 2.1rem/1 var(--hand); color: var(--accent); }
.steps li:first-child::before { top: -8px; }
.paths { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 clamp(24px, 4vw, 48px); }
.paths a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; height: 100%; padding: 20px 0 22px; border-top: 1.5px dashed var(--edge); text-decoration: none; }
.paths h3 { --mb: .2em; }
.paths p { margin: 0; color: var(--dim); font-size: 16px; }
.paths svg { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 20px; height: 20px; color: var(--dim); transition: transform .2s, color .2s; }
.paths a:hover svg { color: var(--accent); transform: translateX(4px); }
.paths a:hover h3 { color: var(--accent); }
.more-h { margin: 44px 0 4px; font: 600 13px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
footer .foot-links { flex-basis: 100%; }
footer .foot-links ul { list-style: none; margin: 0; padding: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 22px; border-bottom: 1.5px dashed var(--edge); }
footer .foot-links [aria-current] { color: var(--chalk); text-decoration: none; }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .js .menu-btn { display: inline-flex; order: 9; }   /* last on screen, but first in tab order before the panel it opens */
  .js .nav { position: absolute; top: calc(100% - 6px); left: var(--gut); right: var(--gut); margin: 0; padding: 18px 24px 24px; border-radius: 18px;
    background: var(--board); box-shadow: 0 0 0 1px var(--edge), var(--drop); }
  .js .nav:not(.open) { display: none; }
  .js .nav ul { flex-direction: column; gap: 0; }
  .js .nav li + li { border-top: 1.5px dashed var(--edge); }
  .js .nav a { display: block; padding: 10px 0 8px; border: 0; font: 600 2rem/1.1 var(--hand); color: var(--chalk); }
  .js .nav a:hover { color: var(--accent); }
  .js .nav .nav-cta { display: block; border: 0; padding-top: 16px; }
  .js .nav .nav-cta .btn { display: inline-flex; font: 600 17px/1 var(--sans); color: var(--board); padding: 15px 30px; }
  .js .nav .nav-cta .btn:hover { color: var(--accent-ink); }
  .nav ul { flex-wrap: wrap; gap: 8px 20px; }
  .top .lang { margin-left: auto; }
  .hero-grid, .teacher, .book, .booking, .split { grid-template-columns: minmax(0, 1fr); }
  .landing-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 170px); }
  .lesson-head { min-height: 0; }
  .promises { grid-template-columns: minmax(0, 1fr); }
  .promise { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 20px; align-items: start; }
  .promise svg { grid-row: span 2; margin: 0; }
  .pinned { max-width: 340px; margin-inline: auto; }
  .book .frame { order: 2; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .top { gap: 10px; flex-wrap: wrap; }
  .logo-img { height: 30px; }
  .top > .btn { display: none; }
  .menu-btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .menu-btn { padding: 10px 12px; }
  .board { margin-bottom: 18px; border-radius: 18px; }
  .staff { width: 112px; }
  .arrow { left: 168px; width: 56px; top: calc(100% - 20px); }
  .promise { display: block; }
  .promise svg { max-width: 150px; margin: 0 0 10px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px 0 20px; }
  .prices, .terms, .contacts, .form, .faq { grid-template-columns: minmax(0, 1fr); }
  .terms { gap: 16px; }
  .hint { display: none; }
  footer .lang { margin-left: 0; }
  .landing-grid { grid-template-columns: minmax(0, 1fr); }
  .landing-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .key.wrong { transform: none; }   /* no shake: the red key alone says "wrong" */
  .arrow path { stroke-dashoffset: 0; }
}
.contacts .k.gap { margin-top: 18px; }

/* ---------- 404 ---------- */
.missing { max-width: 900px; }
.missing h1.chalk { font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: 1; --mb: .4em; }
.missing .en { font-size: clamp(2rem, 4.4vw, 2.8rem); line-height: 1; --mb: .3em; margin-top: 28px; }
.missing [lang="en"] { margin-top: 36px; border-top: 1.5px dashed var(--edge); }
