/* Library: the study room of the personal site. Same Night Acid ground and header as the site;
   the video sits on a lime plate, the tracklist and the review form are bone paper sheets. */
@import url("/fonts/web/fonts.css");

:root {
  --ink: #141414;
  --ink-2: #1C1C19;
  --ink-3: #24241F;
  --rule: #35352F;
  --bone: #EFE6D2;
  --bone-dim: #A9A390;
  --bone-mute: #5E5A50;
  --paper-dim: #6B6556;
  --lime: #D8FF3C;
  --pink: #FF4F9A;
  --f-head: "Dela Gothic One", "Arial Black", Impact, sans-serif;
  --f-sub: "Days One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --f-mono: "PT Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-read: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mis: -0.05em 0.05em 0 var(--pink);
  --maxw: 1240px;
  --torn: polygon(0 14px, 4% 6px, 9% 12px, 15% 3px, 22% 11px, 28% 5px, 35% 13px, 41% 5px, 48% 12px, 55% 2px, 61% 10px, 68% 5px, 74% 12px, 81% 4px, 87% 11px, 93% 5px, 100% 12px, 100% 100%, 0 100%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--ink); color: var(--bone); font-family: var(--f-read); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
main { flex: 1; outline: none; }
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--lime); color: var(--ink); padding: 10px 14px; font-family: var(--f-mono); text-decoration: none; }
.skip:focus { top: 12px; }

/* type */
.cap { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.mono { font-family: var(--f-mono); }
.dim { color: var(--bone-dim); }
.display { font-family: var(--f-head); font-size: clamp(40px, 7.2vw, 108px); line-height: .95; text-transform: uppercase; letter-spacing: 0; }
.display.m { font-size: clamp(34px, 5.6vw, 80px); }
.mis { color: var(--lime); text-shadow: var(--mis); }
.lead { font-size: 18px; line-height: 1.6; color: var(--bone-dim); max-width: 54ch; }
.chip { display: inline-block; font-family: var(--f-mono); font-size: 11px; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px 2px; background: var(--lime); color: var(--ink); }
.chip.ghost { background: transparent; color: var(--bone-dim); box-shadow: inset 0 0 0 1px var(--rule); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--f-mono); font-size: 13px; color: var(--bone-dim); }
.meta span { white-space: nowrap; }

/* buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--f-sub); font-size: 16px; line-height: 1.2; text-decoration: none; padding: 14px 22px; border: 0; transition: transform .15s ease, box-shadow .15s ease, color .15s ease, background .15s ease; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-lime { background: var(--lime); color: var(--ink); box-shadow: -5px 5px 0 var(--pink); }
.btn-lime:not(:disabled):hover { transform: translate(2px, -2px); box-shadow: -7px 7px 0 var(--pink); }
.btn-line { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 2px var(--bone); }
.btn-line:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--lime); color: var(--lime); }
.btn-ink { background: var(--ink); color: var(--bone); }
.btn-ink:not(:disabled):hover { color: var(--lime); transform: translate(2px, -2px); box-shadow: -4px 4px 0 var(--lime); }
.btn-block { width: 100%; }
.more { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); text-decoration: none; background: none; border: 0; padding: 0; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
.link { background: none; border: 0; padding: 0; font-family: var(--f-mono); font-size: 13px; color: var(--bone-dim); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--lime); }

/* header: same lockup and nav language as the site */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top, 0px); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.lockup svg { width: 36px; height: 36px; flex: none; color: var(--lime); transition: transform .5s ease; }
.lockup:hover svg { transform: rotate(-180deg); }
.lockup b { font-family: var(--f-sub); font-weight: 400; font-size: 15px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a, .nav button { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: 6px 10px; background: none; border: 0; color: var(--bone); }
.nav a:hover, .nav button:hover { color: var(--lime); }
.nav a[aria-current="page"] { background: var(--bone); color: var(--ink); }
.who { margin-left: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang { display: flex; box-shadow: inset 0 0 0 1px var(--rule); flex: none; }
.lang button { background: none; border: 0; padding: 6px 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--bone-dim); }
.lang button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
@media (max-width: 760px) {
  .who, .nav .nav-site { display: none; }
  .lockup b { display: none; }
  .nav a, .nav button { padding: 6px 7px; font-size: 12px; }
}

/* footer */
.foot { border-top: 1px solid var(--rule); margin-top: 96px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-block: 26px calc(26px + env(safe-area-inset-bottom, 0px)); font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); }
.foot a, .foot button { color: inherit; text-decoration: none; background: none; border: 0; padding: 0; letter-spacing: inherit; text-transform: inherit; font-size: inherit; font-family: inherit; }
.foot a:hover, .foot button:hover { color: var(--lime); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* paper: bone sheet with a torn top edge, as the site uses for long reading */
.paper { background: var(--bone); color: var(--ink); clip-path: var(--torn); padding-top: 34px; }
.paper :focus-visible { outline-color: var(--ink); }
.paper .dim { color: var(--paper-dim); }
.paper .btn-line { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.paper .btn-line:not(:disabled):hover { color: var(--ink); background: rgba(20, 20, 20, .06); }

/* boot and messages */
.boot { min-height: 50vh; display: grid; place-items: center; }
.boot::after { content: ""; width: 120px; height: 4px; background: linear-gradient(90deg, var(--lime) 0 30%, transparent 30%) 0 0 / 200% 100%, var(--rule); animation: boot 1s linear infinite; }
@keyframes boot { to { background-position: -200% 0, 0 0; } }
.err { font-family: var(--f-mono); font-size: 13px; line-height: 1.5; padding: 10px 12px; background: var(--ink); color: var(--bone); border-left: 4px solid var(--pink); }
.err:empty { display: none; }
.ok-note { font-family: var(--f-mono); font-size: 13px; color: var(--ink); background: var(--lime); padding: 10px 12px; }
.ok-note:empty { display: none; }

/* page head */
.head { padding-block: 56px 40px; display: grid; gap: 22px; }
.crumb { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-dim); text-decoration: none; justify-self: start; }
.crumb:hover { color: var(--lime); }

/* gate: sign-in */
.gate { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); gap: 56px; align-items: center; padding-block: 72px 40px; min-height: calc(100vh - 64px - 180px); }
.gate .copy { display: grid; gap: 26px; align-content: center; min-width: 0; }
.gate .display { font-size: clamp(40px, 5vw, 80px); }
.ticket { padding: 44px 34px 34px; display: grid; gap: 20px; box-shadow: none; }
.ticket .step { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; color: var(--paper-dim); }
.ticket h2 { font-family: var(--f-sub); font-size: 26px; line-height: 1.2; }
.ticket p { color: var(--paper-dim); font-size: 15px; }
.ticket p b { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim); }
.field input { width: 100%; border: 0; border-bottom: 2px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--f-read); font-size: 20px; padding: 10px 2px; border-radius: 0; }
.field input::placeholder { color: #A39C89; }
.field input:focus { outline: none; background: rgba(20, 20, 20, .05); }
.field input#otp { font-family: var(--f-mono); font-size: 30px; letter-spacing: .45em; }
.ticket form { display: grid; gap: 18px; }
.ticket .row { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.ticket .link { color: var(--ink); }
.ticket .link:disabled { color: var(--paper-dim); text-decoration: none; cursor: default; }
@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; gap: 36px; padding-block: 40px 24px; min-height: 0; }
  .ticket { padding: 38px 22px 26px; }
}

/* library shelf */
.shelf { display: grid; gap: 22px; }
.shelf-label { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--bone); padding-bottom: 12px; margin: 40px 0 22px; gap: 12px; }
.shelf-label h2 { font-family: var(--f-head); font-size: clamp(22px, 2.6vw, 32px); line-height: 1; text-transform: uppercase; }
.book { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule); padding: 30px 32px 30px 44px; }
.book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--lime); }
.book .body { display: grid; gap: 14px; min-width: 0; }
.book h3 { font-family: var(--f-sub); font-size: clamp(24px, 3vw, 36px); line-height: 1.15; }
.book h3 a { text-decoration: none; }
.book h3 a:hover { color: var(--lime); }
.book p { color: var(--bone-dim); max-width: 62ch; }
.book .act { display: grid; gap: 10px; justify-items: end; text-align: right; }
.book .act .where { font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); max-width: 26ch; }
.book.done::before { background: var(--bone); }
.soon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.book.soon { grid-template-columns: 1fr; align-items: start; background: transparent; padding: 26px 26px 28px; }
.book.soon::before { display: none; }
.book.soon h3 { font-size: clamp(22px, 2.4vw, 28px); }
.book.soon .for { font-family: var(--f-mono); font-size: 13px; color: var(--bone-dim); }
.book.soon .price { font-family: var(--f-head); font-size: 26px; line-height: 1; background: var(--lime); color: var(--ink); padding: 8px 12px 6px; justify-self: start; }
.book.soon .act { justify-items: start; text-align: left; }
.empty { padding: 32px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--bone-dim); display: grid; gap: 14px; justify-items: start; }
.note-line { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin-top: 26px; color: var(--bone-dim); font-size: 15px; }
@media (max-width: 760px) {
  .book { grid-template-columns: 1fr; padding: 24px 20px 24px 30px; }
  .book .act { justify-items: start; text-align: left; }
  .soon-grid { grid-template-columns: 1fr; }
}

/* progress bar: the single position indicator */
.bar { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); }
.bar i { position: relative; flex: 1; max-width: 340px; height: 6px; background: var(--rule); overflow: hidden; }
.bar i b { position: absolute; inset: 0 auto 0 0; background: var(--lime); }

/* course without lessons yet */
.c-solo { padding-block: 44px 34px; display: grid; gap: 18px; }
.c-solo .display { max-width: 16ch; }
.c-solo .lead { max-width: 70ch; }

/* course page (mix on variant B): the course on a bone sheet at the left (head + tracklist),
   the lesson in the right column: video on the lime plate, the lesson title, then one "next" card. */
.stage { display: grid; grid-template-columns: 330px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "head lesson" "list lesson"; column-gap: 48px; align-items: start; padding-top: 40px; }

/* course head: the top of the sheet, torn edge */
.c-head { grid-area: head; display: grid; gap: 14px; padding: 46px 24px 22px; }
.c-head .crumb { color: var(--paper-dim); }
.c-head .crumb:hover { color: var(--ink); }
.c-head .chip.ghost { color: var(--paper-dim); box-shadow: inset 0 0 0 1px rgba(20, 20, 20, .3); }
.c-title { font-family: var(--f-sub); font-size: 24px; line-height: 1.2; }
.c-head .lead { font-size: 15px; line-height: 1.55; color: var(--paper-dim); }
.c-head .meta { font-size: 12px; gap: 2px 14px; color: var(--paper-dim); }
.c-head .bar { color: var(--paper-dim); }
.c-head .bar i { background: rgba(20, 20, 20, .14); }
.c-head .bar i b { background: var(--ink); }
.c-head .course-bar:empty { display: none; }

/* tracklist: the rest of the sheet; stays in view while the lesson scrolls */
.tracklist { grid-area: list; align-self: stretch; background: var(--bone); color: var(--ink); padding-bottom: 12px; }
.tracklist :focus-visible { outline-color: var(--ink); }
.tl-in { position: sticky; top: 64px; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 24px 12px; border-top: 2px solid var(--ink); }
.tl-head h2 { font-family: var(--f-sub); font-size: 18px; }
.tl-head span, .tl-toggle span { font-family: var(--f-mono); font-size: 12px; color: var(--paper-dim); }
.tl-toggle { display: none; }
.tracks { position: relative; list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 64px - 60px); overflow: auto; overscroll-behavior: contain; border-top: 1px solid rgba(20, 20, 20, .14); }
.lesson-button { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) 18px; gap: 10px; align-items: start; text-align: left; background: none; border: 0; border-bottom: 1px solid rgba(20, 20, 20, .14); padding: 13px 24px; color: var(--ink); }
.lesson-button:hover { background: rgba(20, 20, 20, .06); }
.lesson-button .n { font-family: var(--f-mono); font-size: 13px; color: var(--paper-dim); padding-top: 2px; }
.lesson-button .t { display: grid; gap: 3px; min-width: 0; }
.lesson-button .t b { font-weight: 500; font-size: 15px; line-height: 1.35; }
.lesson-button .t small { font-family: var(--f-mono); font-size: 12px; color: var(--paper-dim); }
.lesson-button .t i { display: block; height: 2px; background: rgba(20, 20, 20, .14); margin-top: 6px; }
.lesson-button .t i[hidden] { display: none; }
.lesson-button .t i u { display: block; height: 100%; background: var(--ink); text-decoration: none; }
.lesson-button .s { font-family: var(--f-mono); font-size: 14px; line-height: 1.4; text-align: center; color: var(--ink); }
.lesson-button[aria-current="true"] { background: var(--lime); }
.lesson-button[aria-current="true"] .n, .lesson-button[aria-current="true"] .t small { color: #3B3F22; }
.lesson-button[aria-current="true"] .t i { background: rgba(20, 20, 20, .2); }

/* the lesson column */
.lesson { grid-area: lesson; min-width: 0; display: grid; gap: 34px; padding-top: 6px; }
.screen-wrap { min-width: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: -12px 12px 0 var(--lime); }
.screen video { width: 100%; height: 100%; background: #000; }
.screen .over { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; justify-items: center; text-align: center; background: rgba(20, 20, 20, .88); padding: 20px; }
.screen .over p { font-family: var(--f-mono); font-size: 13px; color: var(--bone-dim); }
.pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); }
.pbar .sp { display: flex; gap: 2px; box-shadow: inset 0 0 0 1px var(--rule); }
.pbar .sp button { background: none; border: 0; min-width: 52px; min-height: 36px; padding: 6px 10px; font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); }
.pbar .sp button:hover { color: var(--lime); }
.pbar .sp button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.pbar .sp[hidden] { display: none; }
.pbar .save-err { flex-basis: 100%; color: var(--pink); }
.pbar .save-err:empty { display: none; }

/* text lesson: the same plate as the video, the text on the dark sheet */
.screen.reading { aspect-ratio: auto; min-height: 240px; background: var(--ink-2); box-shadow: -12px 12px 0 var(--lime), inset 0 0 0 1px var(--rule); padding: clamp(22px, 4vw, 44px); }
.reader { max-width: 66ch; font-size: 18px; line-height: 1.66; display: grid; gap: 16px; align-content: start; }
.reader h3 { font-family: var(--f-sub); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
.reader h4 { font-family: var(--f-sub); font-size: 20px; line-height: 1.25; margin-top: 8px; }
.reader h5 { font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-dim); margin-top: 6px; }
.reader ul, .reader ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.reader a { color: var(--lime); text-underline-offset: 3px; overflow-wrap: anywhere; }
.reader strong { font-weight: 600; }

/* the lesson itself: the title is the loudest line of the page, nothing above it */
.now { display: grid; gap: 16px; }
.now h2 { font-family: var(--f-head); font-size: clamp(30px, 3.9vw, 56px); line-height: .98; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.now .text { font-size: 18px; line-height: 1.66; color: var(--bone); max-width: 66ch; }
.now .text p + p { margin-top: 14px; }
.now .group { margin-top: 12px; }
.seen { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-family: var(--f-mono); font-size: 13px; color: var(--bone-dim); cursor: pointer; justify-self: start; }
.seen input { appearance: none; width: 22px; height: 22px; margin: 0; box-shadow: inset 0 0 0 2px var(--bone-dim); display: grid; place-content: center; cursor: pointer; }
.seen input:checked { background: var(--lime); box-shadow: none; }
.seen input:checked::after { content: "✓"; color: var(--ink); font-size: 15px; line-height: 1; }

/* one call to action: the next lesson */
.steps { display: grid; gap: 14px; justify-items: start; }
.nav-l { font: inherit; color: inherit; background: none; border: 0; }
.nav-l[hidden] { display: none; }
.next-card { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k arr" "t arr"; gap: 6px 24px; align-items: center; text-align: left; padding: 22px 26px 24px; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule); transition: transform .15s ease, box-shadow .15s ease; }
.next-card .k { grid-area: k; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.next-card b { grid-area: t; font-family: var(--f-sub); font-weight: 400; font-size: clamp(20px, 2vw, 26px); line-height: 1.2; color: var(--bone); }
.next-card .arr { grid-area: arr; width: 44px; height: 44px; color: var(--lime); transition: transform .15s ease; }
.next-card:hover { transform: translate(3px, -3px); box-shadow: inset 0 0 0 1px var(--lime), -6px 6px 0 var(--lime); }
.next-card:hover .arr { transform: translateX(4px); }
.prev-link { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); padding: 10px 0; min-height: 44px; }
.prev-link:hover { color: var(--lime); }

@media (max-width: 1100px) and (min-width: 981px) { .stage { grid-template-columns: 300px minmax(0, 1fr); column-gap: 36px; } }

/* phone and tablet: compact course line, the video first, the tracklist folds under one button */
@media (max-width: 980px) {
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "lesson" "list"; padding-top: 20px; }
  .c-head { padding: 40px 18px 18px; gap: 10px; }
  .c-head .lead { display: none; }
  .c-title { font-size: 20px; }
  .lesson { padding-top: 26px; gap: 28px; }
  .screen-wrap { margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
  .screen, .screen.reading { box-shadow: none; }
  .screen.reading { padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
  .pbar { padding-inline: max(16px, env(safe-area-inset-left, 0px)); margin-top: 12px; }
  .pbar .sp { width: 100%; }
  .pbar .sp button { flex: 1; min-height: 44px; font-size: 13px; }
  .now h2 { font-size: clamp(28px, 8.6vw, 44px); }
  .now .text { font-size: 17px; }
  .steps { justify-items: stretch; }
  .prev-link { justify-self: start; }
  .next-card { padding: 18px 18px 20px; gap: 6px 16px; }
  .next-card .arr { width: 36px; height: 36px; }
  .tracklist { margin-top: 44px; clip-path: var(--torn); padding: 22px 0 6px; align-self: start; }
  .tl-in { position: static; }
  .tl-head { display: none; }
  .tl-toggle { width: 100%; min-height: 56px; display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; gap: 12px; align-items: center; background: none; border: 0; padding: 12px 18px; color: var(--ink); text-align: left; }
  .tl-toggle b { font-family: var(--f-sub); font-weight: 400; font-size: 20px; }
  .tl-toggle i { width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); justify-self: center; transition: transform .2s ease; }
  .tracklist.open .tl-toggle i { transform: rotate(-135deg) translate(-3px, -3px); }
  .tracks { display: none; max-height: none; overflow: visible; }
  .tracklist.open .tracks { display: block; }
  .lesson-button { padding: 14px 18px; min-height: 56px; }
}
@media (min-width: 720px) and (max-width: 980px) { .screen-wrap { margin-inline: 0; } .screen { box-shadow: -10px 10px 0 var(--lime); } .screen.reading { box-shadow: -10px 10px 0 var(--lime), inset 0 0 0 1px var(--rule); padding-inline: clamp(22px, 4vw, 44px); } .pbar { padding-inline: 0; margin-top: 24px; } .pbar .sp { width: auto; } }

/* sections below the stage */
.sec { margin-top: 96px; }
.sec-head { border-bottom: 2px solid var(--bone); padding-bottom: 14px; margin-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 24px; }
.sec-head h2 { font-family: var(--f-head); font-size: clamp(30px, 4.6vw, 58px); line-height: 1; text-transform: uppercase; }
.sec-head span { font-family: var(--f-mono); font-size: 13px; color: var(--bone-dim); }
.group + .group { margin-top: 44px; }
.group h3 { font-family: var(--f-sub); font-size: 20px; margin-bottom: 14px; display: flex; gap: 12px; align-items: baseline; }
.group h3 span { font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); }

.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.slide { position: relative; aspect-ratio: 16 / 10; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; text-align: left; background: var(--ink-2); border: 0; box-shadow: inset 0 0 0 1px var(--rule); padding: 18px 18px 16px; color: var(--bone); transition: transform .15s ease, box-shadow .15s ease; }
.slide:hover { transform: translate(3px, -3px); box-shadow: inset 0 0 0 1px var(--lime), -6px 6px 0 var(--lime); }
.slide .num { font-family: var(--f-head); font-size: 54px; line-height: .9; color: var(--bone-mute); }
.slide:hover .num { color: var(--lime); }
.slide b { font-family: var(--f-sub); font-weight: 400; font-size: 16px; line-height: 1.25; }
.slide small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); }

.files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.slides + .files { margin-top: 18px; }
@media (max-width: 560px) {
  .slides { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .slide { aspect-ratio: auto; min-height: 150px; padding: 14px 14px 12px; }
  .slide .num { font-size: 36px; }
  .slide b { font-size: 14px; }
}
.file { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.file .tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-align: center; padding: 8px 0 7px; box-shadow: inset 0 0 0 1px var(--bone-dim); color: var(--bone-dim); }
.file .tag.html { box-shadow: none; background: var(--bone); color: var(--ink); }
.file .nm { display: grid; gap: 2px; min-width: 0; }
.file .nm b { font-weight: 500; font-size: 16px; line-height: 1.35; }
.file .nm small { font-family: var(--f-mono); font-size: 12px; color: var(--bone-dim); }
.file .go { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .file { grid-template-columns: 44px minmax(0, 1fr); } .file .go { grid-column: 2; justify-content: flex-start; } }

/* chat: the one lime plate below the stage */
.chat { margin-top: 64px; background: var(--lime); color: var(--ink); padding: 30px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.chat h3 { font-family: var(--f-sub); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; }
.chat p { max-width: 56ch; margin-top: 8px; }
.chat .btn-ink:not(:disabled):hover { color: var(--lime); box-shadow: none; }

/* review: a bone sheet with a printed form */
.review { margin-top: 110px; padding-block: 64px 64px; }
.review .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; }
.review .intro { display: grid; gap: 16px; align-content: start; }
.review .intro h2 { font-family: var(--f-head); font-size: clamp(34px, 5vw, 64px); line-height: .95; text-transform: uppercase; }
.review .intro p { color: var(--paper-dim); max-width: 38ch; }
.review form { display: grid; gap: 22px; }
.review select, .review textarea { width: 100%; background: transparent; color: var(--ink); border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; padding: 10px 2px; font-size: 17px; }
.review select { appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141414' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 26px; }
.review textarea { min-height: 150px; resize: vertical; border: 2px solid var(--ink); padding: 12px 14px; line-height: 1.55; }
.review select:focus, .review textarea:focus { outline: none; background-color: rgba(20, 20, 20, .05); }
.rate { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.rate legend { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim); margin-bottom: 8px; padding: 0; }
.rate label { cursor: pointer; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate span { display: grid; place-items: center; min-width: 46px; height: 42px; padding: 0 12px; font-family: var(--f-mono); font-size: 14px; box-shadow: inset 0 0 0 2px var(--ink); }
.rate input:checked + span { background: var(--ink); color: var(--lime); }
.rate input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; box-shadow: inset 0 0 0 2px var(--ink); display: grid; place-content: center; cursor: pointer; }
.check input:checked { background: var(--ink); }
.check input:checked::after { content: "✓"; color: var(--lime); font-size: 14px; line-height: 1; }
.check small { display: block; color: var(--paper-dim); font-size: 13px; margin-top: 2px; }
.hint { font-family: var(--f-mono); font-size: 12px; color: var(--paper-dim); display: flex; justify-content: space-between; gap: 10px; }
.review .err { background: var(--ink); }
@media (max-width: 860px) { .review .wrap { grid-template-columns: 1fr; gap: 28px; } .review { padding-block: 52px; } }

/* finish */
.finish { margin-top: 0; padding-block: 72px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.finish h2 { font-family: var(--f-head); font-size: clamp(30px, 4.4vw, 56px); line-height: 1; text-transform: uppercase; }
.finish p { color: var(--bone-dim); margin-top: 10px; max-width: 50ch; }
.stamp { display: inline-block; font-family: var(--f-head); font-size: clamp(40px, 6vw, 80px); line-height: 1; text-transform: uppercase; color: var(--lime); text-shadow: var(--mis); transform: rotate(-4deg); }

/* viewer for presentations */
.viewer { position: fixed; inset: 0; z-index: 60; background: var(--ink); display: grid; grid-template-rows: auto 1fr; }
.viewer .vbar { display: flex; align-items: center; gap: 18px; padding: 12px max(16px, env(safe-area-inset-left, 0px)); padding-top: calc(12px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--rule); }
.viewer .vbar b { font-family: var(--f-sub); font-weight: 400; font-size: 16px; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer .vbar button { background: none; border: 0; padding: 6px 4px; }
.viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; }

/* consent (shown only when analytics is configured) */
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 40; max-width: 420px; padding: 34px 24px 22px; display: grid; gap: 14px; }
.consent h2 { font-family: var(--f-sub); font-size: 20px; }
.consent p { font-size: 14px; color: var(--paper-dim); }
.consent .row { display: flex; flex-wrap: wrap; gap: 10px; }
.consent .btn { font-size: 14px; padding: 10px 14px; }

/* payment and missing pages */
.status-card { margin-top: 10px; padding: 30px 32px; box-shadow: inset 0 0 0 1px var(--rule); background: var(--ink-2); display: grid; gap: 16px; justify-items: start; max-width: 640px; }
.status-card h2 { font-family: var(--f-sub); font-size: 26px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
