/* The teachers page: a week of lessons as a deck, Plan → Teach → Assign → Practice → Check in, then the
   deal. The teacher's pointer is a strip of tape in marker: it sticks to the bars, goes home on the
   student's phone, and is still on those bars when the week's practice comes back. */
:root { --h0: rgba(255,255,255,.07); --h1: #3E3373; --h2: #6B3483; --h3: #A83A78; --h4: #E2644C; --h5: #FFB23E }

/* the photograph behind the top of the page */
.tstage { position: relative; isolation: isolate; margin-top: -76px; padding-top: 76px; padding-bottom: clamp(56px, 8vw, 112px) }
.tstage .photo { position: absolute; inset: 0 0 auto; height: min(100%, 1100px); z-index: -1; overflow: hidden }
.tstage .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; filter: grayscale(1) contrast(1.1) brightness(.55) }
.tstage .photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,7,11,.55) 0%, rgba(6,7,11,.35) 30%, rgba(6,7,11,.8) 70%, var(--ground) 100%) }

.thero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; padding-block: clamp(28px, 4.5vh, 64px) clamp(22px, 3vh, 36px) }
.thero h1 { font-size: clamp(42px, 5vw, 76px); line-height: .98; letter-spacing: -.035em; font-weight: 800 }
.thero h1 em { font-style: normal; color: var(--seat) }
.thero .side { display: grid; gap: 20px; justify-items: start; padding-bottom: 6px }
.thero .acts { display: flex; flex-wrap: wrap; gap: 10px }
.say .real { display: inline-flex; align-items: center; margin-top: 10px }
.thero .lede { font-size: clamp(17px, 1.35vw, 20px); color: var(--soft); max-width: 40ch; line-height: 1.5 }

/* the deck */
.deck { position: relative; border-radius: 32px; padding: 10px 10px 0; display: grid; grid-template-rows: auto 1fr auto; grid-template-areas: "rail" "slides" "foot" }
.rail { grid-area: rail } .slides { grid-area: slides } .deckfoot { grid-area: foot }
/* wide screens: Back and Next ride at the end of the rail, so they're in view on every slide */
@media (min-width: 1101px) {
  .deck { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; grid-template-areas: "rail foot" "slides slides" }
  .deck .deckfoot { border-top: 0; padding: 0 4px 0 14px; gap: 10px }
  .deck .deckfoot .btn { min-height: 48px }
}
.rail { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 24px; background: rgba(6,7,11,.32); border: 1px solid rgba(255,255,255,.05) }
.stations { flex: 1; display: flex; align-items: center; padding: 0 clamp(4px, 2vw, 28px) }
/* a line runs from station to station; the stretch behind you is lit */
.stations .link { flex: 1; height: 1px; margin: 0 2px; background: rgba(255,255,255,.12); position: relative; overflow: hidden }
.stations .link::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--seat) 75%, transparent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--spring) }
.stations .link.done::after { transform: none }
.stations button { position: relative; z-index: 1; appearance: none; border: 0; background: none; color: var(--dim); font: 600 15px var(--body); letter-spacing: .005em;
  flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 16px; cursor: pointer; transition: color .2s, background-color .2s }
.stations button i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #0B0C13; box-shadow: 0 0 0 1.5px rgba(255,255,255,.28); flex: none; transition: background-color .25s, box-shadow .25s, transform .35s var(--spring) }
.stations button.done { color: var(--soft) }
.stations button.done i { background: color-mix(in srgb, var(--seat) 70%, #000); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--seat) 70%, transparent) }
.stations button[aria-selected="true"] { background: rgba(255,178,62,.12); color: var(--seat) }
.stations button[aria-selected="true"] i { background: var(--seat); box-shadow: 0 0 0 4px rgba(255,178,62,.18); transform: scale(1.2) }
@media (hover: hover) { .stations button:not([aria-selected="true"]):hover { color: var(--ink) } }
.rail .again { width: 20px; height: 20px; flex: none; margin: 0 10px 0 4px; fill: none; stroke: var(--dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .7 }
.deck[data-at="4"] .rail .again { stroke: var(--seat); opacity: 1 }

/* the deck is as tall as the slide showing; the one leaving fades out over it */
.slides { position: relative; overflow: hidden; overflow: clip }
.slide[inert] { position: absolute; top: 0; left: 0; right: 0 }
.slide { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(24px, 3.4vw, 52px); align-items: start;
  padding: clamp(20px, 2.4vw, 32px) clamp(14px, 2.4vw, 34px) clamp(14px, 2vw, 24px); transition: opacity .32s ease-out, transform .5s var(--spring), filter .32s ease-out }
.slide[inert] { opacity: 0; transform: translateX(calc(var(--dir, 1) * 48px)); filter: blur(6px); pointer-events: none; visibility: hidden; transition: opacity .2s ease-in, transform .3s ease-in, filter .2s ease-in, visibility 0s .3s }
.slide.before[inert] { transform: translateX(calc(var(--dir, 1) * -48px)) }
.say { padding-top: clamp(4px, 1.6vw, 24px) }
.say h2 { font-size: clamp(30px, 3vw, 46px); line-height: 1.04; letter-spacing: -.03em; max-width: 20ch }
.say p { margin-top: 18px; color: var(--soft); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; max-width: 32ch }
.say p.hint { margin-top: 22px; color: var(--seat); font: 400 25px/1.05 var(--hand); letter-spacing: .02em; min-height: 1.1em; max-width: 26ch }
.say .btn { margin-top: 28px }
.show { min-width: 0 }
.show h3 { font: 600 13px var(--body); letter-spacing: .02em; color: var(--dim) }

.deckfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(14px, 2.4vw, 34px) 16px; border-top: 1px solid rgba(255,255,255,.06) }
.textbtn { appearance: none; background: none; border: 0; color: var(--soft); font: 500 15px var(--body); min-height: 44px; padding: 0 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.3) }
.textbtn:disabled { opacity: 0; pointer-events: none }
@media (hover: hover) { .textbtn:hover { color: var(--ink); text-decoration-color: currentColor } }
.deckfoot .btn { min-width: 168px }
.deckfoot .btn .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }

/* Teach */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(6,7,11,.5); border: 1px solid rgba(255,255,255,.06) }
.seg button, .seg label span { appearance: none; border: 0; background: none; color: var(--soft); font: 500 14px var(--body); min-height: 38px; padding: 0 12px; border-radius: 11px; cursor: pointer; display: inline-flex; align-items: center; white-space: nowrap; transition: background-color .15s, color .15s }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--ground) }
#t-seat button[aria-checked="true"] { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent) }
#t-seat button::after { content: " off"; opacity: 0; width: 0; display: inline-block; overflow: hidden; transition: opacity .2s }
#t-seat button[aria-checked="true"]::after { opacity: 1; width: auto; margin-left: .25em }
@media (hover: hover) { .seg button:not([aria-checked="true"]):hover, .seg label:hover input:not(:checked) + span { background: rgba(255,255,255,.07); color: var(--ink) } }

/* each slide's picture: the real app doing the step (teach-scenes.js), the scene's pause under it */
.tshow { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0 }
.tshow .dev { width: 100% }
.tshow .dev.phone { width: min(100%, 252px) }
.say .hear { margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; padding-left: 16px }
.say .hear svg { width: 18px; height: 18px; flex: none }

/* the deal */
section.studio { padding-block: clamp(24px, 4vw, 64px) clamp(80px, 10vw, 140px) }
/* the deal sits on its own photograph, the way the home page's practice pane does */
.sgrid { position: relative; isolation: isolate; overflow: hidden; border-radius: 36px; padding: clamp(6px, 2vw, 32px);
  border: 1px solid var(--edge-lo); border-top-color: var(--edge); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(16px, 2.4vw, 32px); align-items: start }
.sgrid > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; z-index: -2; filter: grayscale(1) brightness(.62) contrast(1.1) }
.sgrid::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(6,7,11,.66) 0%, rgba(6,7,11,.74) 48%, rgba(6,7,11,.86) 100%) }
.price { position: relative; padding: clamp(18px, 2.4vw, 32px) }
.price::before { content: ""; position: absolute; inset: auto -10% -20% 20%; height: 70%; z-index: -1; background: radial-gradient(closest-side, rgba(255,178,62,.14), transparent); pointer-events: none }
.price h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.04; letter-spacing: -.03em; max-width: 15ch }
.tag { position: relative; margin-top: 36px; padding-top: 6px }
.tagrow { display: flex; align-items: center }
.tag .was { display: inline-block; font: 800 clamp(72px, 8vw, 118px)/.9 var(--display); letter-spacing: -.05em; color: rgba(244,242,238,.32); text-decoration-thickness: 5px; text-decoration-color: rgba(244,242,238,.5) }
.tag .sticker { position: relative; margin-left: .04em; font-size: clamp(72px, 8vw, 118px); --c: var(--guitar); --r: -7deg }
.tag .sticker span { font-size: clamp(64px, 7vw, 96px); line-height: .9; padding: 14px 26px 6px; min-width: 0 }
.tag .now { margin-top: 18px; font-size: 18px; color: var(--soft) }
.tag .now b { color: var(--ink); font: 700 22px var(--display); font-variant-numeric: tabular-nums }
.calc { margin-top: 30px; padding: 20px 20px 8px; border-radius: 22px; background: rgba(6,7,11,.55); border: 1px solid rgba(255,255,255,.08); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px) }
.calc label { display: block; font: 600 13px var(--body); color: var(--dim); letter-spacing: .02em }
.slide-row { display: flex; align-items: center; gap: 16px; margin-top: 6px }
.slide-row output { font: 700 28px var(--display); font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: right; color: var(--ink) }
input[type="range"] { flex: 1; appearance: none; -webkit-appearance: none; background: none; height: 44px; margin: 0; cursor: pointer; --p: 18% }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--seat) var(--p), rgba(255,255,255,.12) var(--p)) }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12) }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--seat) }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--ink); box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 -2px 0 rgba(0,0,0,.12) }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--ink); box-shadow: 0 4px 10px rgba(0,0,0,.5) }
input[type="range"]:focus-visible { outline: none }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--mark) }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--mark) }
.calc dl { margin: 8px 0 0 }
.calc dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 16px }
.calc dt { color: var(--soft) }
.calc dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500 }
.calc dd s { color: var(--dim) }
.calc .mine dt { color: var(--ink); font-weight: 600 }
.calc .mine dd b { font: 700 24px var(--display); color: var(--seat) }
.price .fine { margin-top: 16px; font-size: 14px; color: var(--dim); max-width: 44ch }

.ask { padding: clamp(18px, 2.4vw, 32px) }
.ask h2 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.12; letter-spacing: -.02em; max-width: 24ch }
.ask .lede { margin-top: 10px; color: var(--seat); font: 400 28px/1.05 var(--hand); letter-spacing: .02em }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 14px; margin-top: 28px }
.f { min-width: 0; margin: 0; padding: 0; border: 0 }
.f.wide { grid-column: 1 / -1 }
.f label, .f legend { display: block; font: 600 14px var(--body); color: var(--soft); margin: 0 2px 7px; padding: 0 }
.f label span { font-weight: 500; color: var(--dim); margin-left: 4px }
.f .err { margin: 6px 2px 0; font-size: 14px; color: #FF9DB8 }
.reach .seg { display: flex; width: 100% }
.reach .seg label { flex: 1; margin: 0; position: relative }
.reach .seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer }
.reach .seg label span { width: 100%; justify-content: center; min-height: 44px; color: var(--soft); font-size: 15px }
.reach .seg input:checked + span { background: var(--ink); color: var(--ground) }
.reach .seg input:focus-visible + span { outline: 2px solid var(--mark); outline-offset: 2px }
.ask .btn { margin-top: 22px; min-height: 56px; padding: 0 36px; font-size: 17px }
.formerr { margin-top: 16px; font-size: 15px; color: #FF9DB8 }
.sent { padding: 12px 0 4px; scroll-margin-top: 110px }
.sent h2 { font-size: clamp(30px, 3vw, 44px) }
.sent p { margin-top: 14px; font-size: 18px; color: var(--soft); overflow-wrap: anywhere }
@media (prefers-reduced-motion: no-preference) { .sent { animation: materialize .5s var(--spring) both } }

/* print: the assignment on paper, nothing else */
.printsheet { display: none }
@media print {
  @page { margin: 18mm }
  html, body { background: #fff !important; color: #111 !important }
  body > *:not(main), main > *:not(.printsheet) { display: none !important }
  .printsheet { display: block !important; font: 12pt/1.4 var(--body); color: #111 }
  .printsheet h1 { font: 700 24pt var(--display); margin: 0 }
  .printsheet .by { color: #555; margin: 2pt 0 14pt }
  .printsheet .note { font: 400 22pt/1.1 var(--hand); padding: 8pt 12pt; background: #FFE3B0; display: inline-block; transform: rotate(-1deg); margin-bottom: 16pt }
  .printsheet table { width: 100%; border-collapse: collapse; table-layout: fixed }
  .printsheet td { border: 1pt solid #bbb; height: 46pt; vertical-align: top; padding: 4pt 6pt; font: 700 16pt var(--display) }
  .printsheet td small { display: block; font: 400 8pt var(--body); color: #777 }
  .printsheet td.in { background: #FFF1D6; border-color: #C98A1A }
  .printsheet .foot { margin-top: 14pt; font-size: 9pt; color: #777 }
}

@media (prefers-contrast: more) { .deck, .sgrid, .calc { border: 1px solid #8A8A99 } .sgrid::before { background: rgba(6,7,11,.9) } .calc { background: #0B0C12; -webkit-backdrop-filter: none; backdrop-filter: none } }
@media (prefers-reduced-transparency: reduce) { .calc { background: #14151F; -webkit-backdrop-filter: none; backdrop-filter: none } .sgrid::before { background: rgba(6,7,11,.9) } }

@media (max-width: 1100px) {
  .slide { grid-template-columns: 1fr; align-items: start; gap: 22px }
  .say h2 { max-width: 20ch }
  .say p { max-width: 52ch }
  .say p.hint { margin-top: 12px }
  .say .btn { margin-top: 18px }
}
@media (max-width: 960px) {
  .thero { grid-template-columns: 1fr; gap: 18px }
  .sgrid { grid-template-columns: 1fr }
}
@media (max-width: 680px) {
  .stations { align-items: flex-start; padding: 0 2px }
  .stations button { flex-direction: column; gap: 6px; font-size: 12px; padding: 8px 4px 6px; min-height: 52px; border-radius: 12px }
  .stations .link { margin-top: 12.5px }
  .rail .again { display: none }
}
@media (max-width: 560px) {
  .tstage { padding-bottom: 40px }
  .thero h1 { font-size: min(38px, 9.6vw) }
  .deck { border-radius: 26px; padding: 6px 6px 0; margin-inline: -6px }
  .slide { padding: 22px 10px 12px }
  .say h2 { font-size: min(34px, 8.6vw) }
  .say p { margin-top: 12px; font-size: 16px }
  .say p.hint { font-size: 22px }
  .deckfoot { padding: 10px 10px 12px }
  .deckfoot .btn { min-width: 0; flex: 1; max-width: 240px }
  .tag .was, .tag .sticker { font-size: 76px }
  .tag .sticker span { font-size: 64px; padding: 12px 20px 5px }
  .fields { grid-template-columns: 1fr }
  .ask .btn { width: 100% }
  .price, .ask { padding: 22px 14px }
  .ask { border-top: 1px solid rgba(255,255,255,.1) }
  .calc { padding: 16px 14px 6px }
  .sgrid { border-radius: 28px; margin-inline: -6px; padding: 10px }
}
