:root { --ink:#2b2622; --muted:#7a716a; --line:#e6ddd4; --bg:#faf7f3; --accent:#8c6a4f; --ok:#2e7d32; --err:#b3261e; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height:1.5; }
main { max-width: 32rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
h1 { font-weight: 600; font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-weight: 600; font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
p { margin: .5rem 0; }
.muted { color: var(--muted); }
.brand { font-size:.8rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-bottom:1.5rem; }
label { display:block; font-size:.9rem; margin:1rem 0 .35rem; }
input[type=email] { width:100%; font:inherit; padding:.75rem .9rem; border:1px solid var(--line); border-radius:.6rem; background:#fff; }
button, .btn { display:inline-block; font:inherit; font-weight:600; padding:.8rem 1.2rem; border:0; border-radius:.6rem; background:var(--accent); color:#fff; cursor:pointer; text-decoration:none; margin-top:1rem; }
button[disabled] { opacity:.6; cursor:default; }
.btn.secondary { background:#fff; color:var(--ink); border:1px solid var(--line); }
.msg { margin-top:1rem; padding:.75rem .9rem; border-radius:.6rem; background:#fff; border:1px solid var(--line); }
.msg.ok { border-color: var(--ok); }
.msg.err { border-color: var(--err); color: var(--err); }
.card { background:#fff; border:1px solid var(--line); border-radius:.8rem; padding:1.1rem 1.2rem; margin-top:1rem; }
.card h3 { margin:0 0 .25rem; font-size:1.05rem; }
.price { font-size:1.4rem; font-weight:600; margin:.5rem 0; }
.price-note { margin:-.25rem 0 1rem; font-size:.95rem; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:1.5rem; }
.topbar button { margin:0; padding:.5rem .8rem; background:#fff; color:var(--ink); border:1px solid var(--line); }
/* Stage 2: course player */
main.wide { max-width: 44rem; }
.crumb { font-size:.9rem; margin-bottom:1rem; display:inline-block; color:var(--accent); }
.bar { height:.6rem; background:var(--line); border-radius:1rem; overflow:hidden; margin:.75rem 0 .25rem; }
.bar > span { display:block; height:100%; width:0; background:var(--accent); border-radius:1rem; transition:width .3s; }
.section { background:#fff; border:1px solid var(--line); border-radius:.8rem; margin-top:1rem; overflow:hidden; }
.section > h2 { margin:0; padding:.9rem 1.1rem; font-size:1.05rem; display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.section .tag { font-size:.75rem; font-weight:500; color:var(--muted); white-space:nowrap; }
.section.locked { opacity:.6; }
.section.locked .lock-note { padding:0 1.1rem 1rem; margin:0; }
.lessons { list-style:none; margin:0; padding:0; }
.lessons li { border-top:1px solid var(--line); }
.lessons a, .lessons span.row { display:flex; gap:.75rem; align-items:center; padding:.85rem 1.1rem; color:var(--ink); text-decoration:none; min-height:3rem; }
.tick { flex:0 0 1.4rem; height:1.4rem; border-radius:50%; border:2px solid var(--line); display:inline-flex; align-items:center; justify-content:center; font-size:.8rem; color:#fff; }
.tick.done { background:var(--ok); border-color:var(--ok); }
.lessons .dur { margin-left:auto; font-size:.8rem; color:var(--muted); }
.video { position:relative; width:100%; aspect-ratio:16/9; background:#000; border-radius:.8rem; overflow:hidden; margin:1rem 0; }
/* Portrait (9:16) lessons: full width on a phone, a centred column on desktop, never taller than the screen. */
.video.portrait { aspect-ratio:9/16; width:min(100%, calc((100vh - 2rem) * 9 / 16)); width:min(100%, calc((100dvh - 2rem) * 9 / 16)); margin:1rem auto; }
/* On wider screens allow for the heading and progress bar above, so the whole video fits without scrolling. */
@media (min-width: 700px) { .video.portrait { width:min(100%, calc((100vh - 11rem) * 9 / 16)); width:min(100%, calc((100dvh - 11rem) * 9 / 16)); } }
.video iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.video.empty { display:flex; align-items:center; justify-content:center; color:#fff; font-size:.95rem; }
.nav { display:flex; justify-content:space-between; gap:.75rem; flex-wrap:wrap; margin-top:1.5rem; }
.nav .btn { margin-top:0; }
.files { background:#fff; border:1px solid var(--line); border-radius:.8rem; padding:1rem 1.2rem; margin:1rem 0; }
.files h2 { font-size:1rem; margin:0 0 .5rem; }
.files ul { margin:0; padding-left:1.1rem; }
.files li { margin:.35rem 0; }
