/* FORM STUDIO: the four-stage film (Joshua, 24 Nov 2026: "finding research on one, actually write it on two,
   cross out and change things on three, then fold up into an email and send").
   Drawn by studio-how.js as a pure function of time, so the same code plays on the page and renders the video.
   Every size is in em and the stage's em follows its own width, so it scales as one picture. */
.film-stage { position: relative; font-size: 14px; aspect-ratio: 100 / 60; background: #fff; border: 1px solid var(--night, #0d1020); overflow: hidden; color: #0d1020; font-family: "Jost", Futura, "Century Gothic", "Segoe UI", system-ui, sans-serif; line-height: 1.4; }
/* narrow stage (a phone): studio-how.js adds .narrow and sets the stage's font size in pixels from its width,
   so nothing here depends on container units, which older iPhones do not have */
.film.narrow .film-stage { aspect-ratio: 40 / 66; }
.film.narrow .mail { font-size: 1em; }
.film.narrow .l-research { grid-template-columns: 1fr; gap: 1.6em; }
.film.narrow .r-item:nth-child(3) { display: none; }
.film.narrow .r-note { font-size: 1.45em; margin-top: .7em; }
.film.narrow .r-note em { display: none; }
.film.narrow .film-steps button { font-size: 1.1em; letter-spacing: .05em; }
.film.narrow .film-steps button i { margin-right: .35em; }
.film-stage * { box-sizing: border-box; }

/* the four stages across the top: they light as the film reaches them, and a tap jumps to one */
.film-steps { position: absolute; top: 0; left: 0; right: 0; height: 6.4em; display: flex; border-bottom: 1px solid #0d1020; z-index: 5; background: #fff; }
.film-steps button { flex: 1; margin: 0; padding: 0; border: 0; border-right: 1px solid #cfd4e6; background: #fff; color: #6c7390; font: 600 1.3em/1 inherit; font-family: inherit; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.film-steps button:last-child { border-right: 0; }
.film-steps button i { font-style: normal; color: #2743ff; margin-right: .6em; }
.film-steps button.done { color: #0d1020; }
.film-steps button.now { background: #0d1020; color: #c6f432; } .film-steps button.now i { color: #c6f432; }
.film-steps button:focus-visible { outline: 2px solid #2743ff; outline-offset: -4px; }

.film-layer { position: absolute; top: 6.4em; bottom: 5em; left: 0; right: 0; padding: 3.4em 4.4em 0; will-change: opacity, transform; }
.film-k { font-size: 1.2em; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #2743ff; display: flex; justify-content: space-between; gap: 1em; }
.film-k b { color: #6c7390; font-weight: 600; }
.film-h { font-size: 3em; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; margin: .3em 0 .5em; }
.caret::after { content: ""; display: inline-block; width: .08em; height: .95em; margin-left: .06em; vertical-align: -.1em; background: #2743ff; opacity: var(--caret, 1); }

/* 1 research: a search box types a question, pages are read, the line that answers it is found, and the fact
   is saved to the notes. Four searches. No tick boxes (Joshua, 24 Nov). */
.l-research { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4.4em; align-content: start; }
.r-box { display: flex; align-items: center; gap: .9em; height: 4.4em; border: 1px solid #0d1020; padding: 0 1.2em; margin-top: 1.1em; }
.r-box svg { flex: none; width: 1.8em; height: 1.8em; }
.r-qy { font-size: 1.75em; font-weight: 500; white-space: nowrap; overflow: hidden; }
.r-res { position: relative; margin-top: .6em; }
.r-item { padding: 1em 0; border-bottom: 1px solid #e1e5f1; }
.r-item u { display: block; height: .55em; background: #e1e5f1; margin-top: .65em; text-decoration: none; }
.r-item u.t { height: .6em; margin-top: 0; background: #b9c2f5; }
.r-item .hit { display: none; font-size: 1.45em; line-height: 1.3; margin-top: .3em; color: #0d1020; }
.r-item .hit span { background: #c6f432; padding: 0 .12em; }
.r-item.found u.x { display: none; } .r-item.found .hit { display: block; }
.r-scan { position: absolute; left: 0; right: 0; height: 2px; background: #2743ff; }
.r-note { font-size: 1.6em; line-height: 1.3; padding: .15em 0 .15em .8em; border-left: .2em solid #c6f432; margin-top: .95em; color: #0d1020; }
.r-note em { display: block; font-style: normal; font-size: .58em; letter-spacing: .12em; text-transform: uppercase; color: #6c7390; margin-top: .35em; }

/* 2 write and 3 check: the piece is typed, then every sentence is tested */
.w-p { font-size: 1.75em; line-height: 1.5; color: #454b63; margin: 0 0 .6em; }
.w-s { background-image: linear-gradient(rgba(198,244,50,var(--a,0)), rgba(198,244,50,var(--a,0))); background-repeat: no-repeat; background-size: var(--w, 0%) 100%; }
.w-old { overflow: hidden; }
.w-old .w-s { background-image: linear-gradient(rgba(198,244,50,var(--a,0)), rgba(198,244,50,var(--a,0))), linear-gradient(#e0352b, #e0352b); background-size: var(--w, 0%) 100%, var(--x, 0%) .09em; background-position: 0 0, 0 56%; }
.w-old.dead .w-s { color: #9aa0b5; }
.w-new .w-s { background: #c6f432; color: #0d1020; padding: 0 .1em; }
.w-made { font-size: 1.05em; letter-spacing: .12em; text-transform: uppercase; color: #6c7390; border-top: 1px solid #e1e5f1; padding-top: .9em; margin-top: 1.2em; }

/* 4 send: the page becomes a letter, folds in three, drops into an envelope and goes */
.l-send { display: flex; align-items: center; justify-content: center; padding-top: 0; }
.mail { position: relative; width: 30em; height: 34em; font-size: .9em; }
.letter { position: absolute; left: 2em; top: 0; width: 26em; height: 33em; z-index: 2; }
.fold { position: absolute; left: 0; width: 26em; height: 11em; background: #fff; border: 1px solid #0d1020; padding: 1.5em 1.8em; }
.fold.top { top: 0; transform-origin: 50% 100%; z-index: 3; } .fold.mid { top: 11em; border-top: 0; border-bottom: 0; z-index: 1; } .fold.bot { top: 22em; transform-origin: 50% 0; z-index: 2; }
.fold u { display: block; height: .5em; background: #cfd4e6; margin-bottom: .75em; text-decoration: none; }
.fold u.k { width: 34%; height: .4em; background: #2743ff; } .fold u.h { height: 1.1em; background: #0d1020; width: 92%; } .fold u.h2 { height: 1.1em; background: #0d1020; width: 58%; } .fold u.s { width: 62%; } .fold u.g { width: 40%; background: #c6f432; }
.pocket { position: absolute; left: 0; top: 19em; width: 30em; height: 15em; z-index: 3; background: #fff; border: 1px solid #0d1020; }
.pocket svg, .flap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flap { position: absolute; left: 0; top: 19em; width: 30em; height: 8.5em; transform-origin: 50% 0; }
/* the stamp (Joshua, 25 Nov: the block looked "AI and clunky; make it look good and swift"): no block, no frame.
   The logo itself lands on the flap in one quick press, the envelope gives slightly, and the five dots light. */
.mark { position: absolute; left: 8em; top: 20.2em; width: 14em; height: 2.8em; z-index: 6; display: flex; align-items: center; justify-content: center; gap: .8em; white-space: nowrap; color: #0d1020; }
.mark .sd { display: grid; grid-template-columns: repeat(3, .56em); gap: .26em; }
.mark .sd i { width: .56em; height: .56em; border-radius: 50%; background: #c9cee0; } .mark .sd i.on { background: #2743ff; }
.mark b { font-size: 1.7em; font-weight: 700; letter-spacing: -.01em; } .mark b span { font-weight: 400; margin-left: .28em; }
.sent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sent b { font-size: 5.4em; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.sent b mark { background: #c6f432; color: #0d1020; padding: 0 .12em; }
.sent span { font-size: 1.8em; color: #454b63; margin-top: .7em; }

.film-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 5em; border-top: 1px solid #cfd4e6; display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: 0 1.2em 0 4.4em; background: #fff; z-index: 5; }
.film-foot span { font-size: 1.3em; color: #6c7390; }
.film-foot button { font: 600 1.15em/1 inherit; font-family: inherit; letter-spacing: .1em; text-transform: uppercase; color: #0d1020; background: #c6f432; border: 1px solid #0d1020; padding: .8em 1.1em; cursor: pointer; }
.film-foot button[hidden] { display: none; }
