/* Beat `lp-tutor` of the landing page (LP 2026-11-14; round two, the owner's review of 2026-11-15:
   .scratch/ui_integration/briefs/LP_DESIGN.md §8.2, LP2_B1.md): its OWN styles only (its object, inside
   templates/dashboard/landing/tutor.html). The type, the content box, the strings, the spoken line (.lp-say) and the
   dock are the frame's (static/css/a2/landing.css). Flat, every class lp-tutor-.

   An EXHIBIT, not a chat: nothing on the sheet is somewhere to type.

   The tutor's own sheet (static/css/a2/tutor.css, board Tutor.dc.html; tutor.css is not loaded on this page, so its
   recipes are copied here under this prefix): the paper #F6F1E7 and its left-edge shadow, the weft ground (the kit's
   ruled lines), the blue thread as the margin rule, a knot for each thing said; the tutor's question on its string;
   the learner's line in blue to the right on its dotted leader; TUT-6's proof marks (the slip struck in pomegranate
   #C4304A, the fix written above it in #8A5A00, the app's colours); the one line of why ("One fix." pomegranate). The
   learner's writing is the kit's blue at 600 (the contract's rule).

   ONE MEASURE, --lp-tutor-p: the weft's pitch, from which every length of the sheet is drawn (the thread at 2.3p, the
   column at 4.1p, the knot .5p, the line boxes 2p, the type: the question 1.4p, the learner's line 1p, the small
   lines .8p). Phones and below 1000px: the app's own page, p = 20px (the kit's weft drawn by AFX, the thread 44px in,
   the column 72px, the question 25px, the learner 19px, the small lines 16px). WIDE (>= 1000px) the sheet is a
   MAGNIFIED view of the tutor's page (coordinator, 2026-11-15: the correction is the point of the beat): p grows with
   the window, 30px at 1440 and 36px at 2000 (the learner's line 30px / 36px), an even number of px so every rule is
   crisp, and the rules are drawn at that pitch by CSS (the kit's canvas weft is 20px apart).

   The opener (.lp-tutor-op) is the corner chrome's tutor button (static/css/a2.css .a2-tutor: 62px, #1C39BB, its
   shadow, the 28px glyph; 56px on a phone). It is seen only inside the play: it comes in where the conversation
   begins, presses itself and sinks into the first knot. It takes no press, is out of the tab order and hidden from
   assistive technology (the whole exchange is in the page as text).

   WIDE: the content box is two columns. Left, as wide as the statement's widest line ("Get corrected."; the line under
   it is never wider), the statement (two lines at every width: "Say it." / "Get corrected.") and the line, the
   statement's capitals level with "Chetori?"'s (LP_R2 R2/N2: cap top .1477em of the statement at /.96; "Chetori?"
   sits on a rule, its capitals .61em above it). Right, the sheet (the owner, 2026-11-15 late, §9.2: "bring the chat
   window more to left to fill up the blank space"): its left edge a fair gap after the statement (the same rule at
   every wide width: clamp(64px, 4.6vw, 96px)), its paper on to the window's right edge over the strings' lanes, so
   what was blank is ruled paper. The exchange keeps a conversation's measure in the sheet's left part (at most 21p:
   756px at 2000; the tutor's line at its left, the learner's line set to its right end), and never reaches the
   frame's content edge (--lp-right from the window's right), so the docked Get started, which lies on the sheet with
   no ground (data-lp-ground="sheet"), never covers a word; the paper and its rules simply run on to the right. The sheet is as tall as its content (§7, §8.2): the beat's
   top is the sheet's top edge (on screens taller than 900px the beat's top keeps a little ground, --lp-tutor-top),
   and under the sheet the beat keeps the join to the next statement (--lp-tutor-jn: a quarter of the screen from the
   sheet's foot to "Dinner table"'s capitals).
   BELOW 1000px: the sheet is a block the page's full width under the line, with the app's bottom-sheet top corners;
   the lanes pass behind it.

   THE RULED RHYTHM: no rule runs through a word. Every line of the exchange is a box 2p high that starts on the grid
   (the sheet's top padding and every box and gap a whole number of p), nudged by its own size (Baloo 2: a box of
   height L has its baseline at L/2 + .277em; capitals .61em, x-height .46em) either ON a rule (the question and the
   learner's answer, written on the line; the question's string half way to the next rule) or centred BETWEEN two
   rules (the small lines, "How are you?" and the why: baseline .5p + .5px + .201em under a rule). The rules lie .5p
   (mod p) under the sheet's top edge. From the sheet's top, in p, after the top padding t (1p wide, 2p on a phone):
   "Chetori?" on the rule at t+1.5, its string at t+2, "How are you?" between t+2.5 and t+3.5, a free row for the fix
   ("Khubam" in the gap over the line it corrects), "Khubi, mersi." on the rule at t+6.5, the why between t+7.5 and
   t+8.5, the foot at t+9 + the bottom padding (= t: the last rule .5p above it, as the first is .5p under the top).

   THE PLAY (once, when the beat is half in view and the opener's place is above the screen's lowest quarter: tutor.js
   adds .lp-tutor-on to the object box; about 3 s):
     0      the opener comes in where the first knot will be (.2s, from nothing: it never waited there)
     .2s    it is pressed (the kit's press: scale .94, the hover's darker blue, one ring)
     .15s   the sheet slides in from the right edge under it (the app's panel: .6s cubic-bezier(.3,.9,.3,1))
     .55s   the opener sinks into the first knot; .85s the knot is there and the thread is drawn up and down from it
     .9s    "Chetori?" writes itself in (the tutor's opening phrase, tu-writein), its string inks, "How are you?"
     1.6s   the learner's answer is written in, along its leader
     2.05s  "Khubi" is struck; 2.35s "Khubam" written above it; 2.65s the why (in by 3.0s)
   Before it (.lp-tutor-js alone) the sheet waits off the right edge, its lines unwritten, and nothing stands in its
   place (the opener is unseen). Without script, and under reduced motion (tutor.js adds .lp-tutor-done at once; the
   media query below too), it is all simply there and the opener is not drawn. */

.lp-tutor{--lp-tutor-jn:max(48px,calc(24svh - var(--lp-pb,99px) - .1477 * var(--lp-st-fs,64px)));--lp-tutor-top:clamp(0px,calc((100svh - 900px) * .8),96px);--lp-tutor-p:calc(14.6px + 1.071vw);--lp-tutor-t:var(--lp-tutor-p);--lp-tutor-tx:calc(2.3 * var(--lp-tutor-p));--lp-tutor-cx:calc(4.1 * var(--lp-tutor-p));--lp-tutor-fs:calc(1.4 * var(--lp-tutor-p));--lp-tutor-ms:var(--lp-tutor-p);--lp-tutor-ss:calc(.8 * var(--lp-tutor-p))}
/* the pitch in whole even px, so a rule (and its half) never falls between two pixel rows */
@supports (width:round(1px,2px)){
  .lp-tutor{--lp-tutor-p:round(calc(14.6px + 1.071vw),2px)}
}
/* on screens taller than 900px the lesson's picture ends closer to this beat (its foot is the lesson's, set for
   900px): the beat's top keeps the join near a quarter of the screen there (1000px high: 80px; 1100px: 96px) */
.lp-beat.lp-tutor{padding-block:var(--lp-tutor-top) var(--lp-tutor-jn)}
.lp-tutor .lp-in{display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:clamp(64px,4.6vw,96px)}
/* as wide as its longest unbreakable piece, "Get corrected." (a no-break space): so always the two lines */
.lp-tutor .lp-st{grid-area:1/1/2/2;width:min-content;max-width:7em;margin-top:calc(var(--lp-tutor-t) + 1.5 * var(--lp-tutor-p) - .61 * var(--lp-tutor-fs) - .1477 * var(--lp-st-fs,clamp(38px,5vw,80px)))}
.lp-tutor .lp-ln{grid-area:2/1/3/2;align-self:start}
/* the object's box: the right column, its paper run on to the window's edge; the first knot's middle, from the
   sheet's top (shared by the sheet and the opener) */
.lp-tutor .lp-ob{grid-area:1/2/3/3;display:flex;flex-direction:column;min-height:0;margin:0 calc(-1 * var(--lp-right)) 0 0}
.lp-tutor-ob{--lp-tutor-k1:calc(var(--lp-tutor-t) + 1.5 * var(--lp-tutor-p) - .23 * var(--lp-tutor-fs))}

/* -- the sheet ------------------------------------------------------------------------------------------- */

.lp-tutor-sheet{position:relative;z-index:2;flex:1 0 auto;padding:var(--lp-tutor-t) var(--lp-right) var(--lp-tutor-t) var(--lp-tutor-cx);background:#F6F1E7 repeating-linear-gradient(to bottom,transparent 0 calc(.5 * var(--lp-tutor-p)),rgba(72,85,105,.25) calc(.5 * var(--lp-tutor-p)) calc(.5 * var(--lp-tutor-p) + 1px),transparent calc(.5 * var(--lp-tutor-p) + 1px) var(--lp-tutor-p));box-shadow:-22px 0 44px -26px rgba(0,0,0,.55);color:var(--ink)}
/* the kit's weft (20px apart; it hums when plucked) where the pitch is the app's own (below 1000px); wide, the CSS rules */
.lp-tutor-fld{position:absolute;inset:0;z-index:0;display:none;width:100%;height:100%;pointer-events:none}
/* the thread: the page's margin rule, blue, edge to edge (this is a slice of the tutor's page) */
.lp-tutor-rule{position:absolute;z-index:1;left:calc(var(--lp-tutor-tx) - .05 * var(--lp-tutor-p));top:0;bottom:0;width:calc(.1 * var(--lp-tutor-p));background:#1C39BB;transform-origin:50% var(--lp-tutor-k1);pointer-events:none}
/* the exchange's measure: a conversation, not the sheet's width (21p: 756px at 2000, 630px at 1440; narrower where
   the strings' zone comes first) */
.lp-tutor-msgs{position:relative;z-index:2;display:flex;flex-direction:column;max-width:calc(21 * var(--lp-tutor-p))}
/* a knot hangs each thing said on the thread, on its line's x-height middle */
.lp-tutor-k{position:relative}
.lp-tutor-k::before{content:"";position:absolute;z-index:1;left:calc(var(--lp-tutor-tx) - var(--lp-tutor-cx) - .25 * var(--lp-tutor-p));top:calc(1.5 * var(--lp-tutor-p) - .23em);width:calc(.5 * var(--lp-tutor-p));height:calc(.5 * var(--lp-tutor-p));margin-top:calc(-.25 * var(--lp-tutor-p));border-radius:50%;background:#1C39BB;box-shadow:0 0 0 calc(.15 * var(--lp-tutor-p)) #F6F1E7}

/* the tutor's line: a string to hear (the frame's spoken line at the tutor's size) */
.lp-tutor-tu{font-size:var(--lp-tutor-fs)}
.lp-tutor-say{display:flex;width:fit-content;max-width:100%}
.lp-tutor-say .lp-say-fi{top:calc(.5 * var(--lp-tutor-p) - .277em);padding-bottom:0;line-height:calc(2 * var(--lp-tutor-p));white-space:normal}
.lp-tutor-say .lp-say-str{top:calc(1.15 * var(--lp-tutor-p) + .277em);bottom:auto;height:calc(.7 * var(--lp-tutor-p))}
.lp-tutor-say .lp-say-str path{stroke-width:calc(.1 * var(--lp-tutor-p))}
.lp-tutor-say:hover .lp-say-str path,.lp-tutor-say:focus-visible .lp-say-str path,.lp-tutor-say[data-playing="1"] .lp-say-str path{stroke-width:calc(.15 * var(--lp-tutor-p))}
.lp-tutor-say .lp-say-en{position:relative;top:calc(.5px - .076em);margin-top:0;font-size:var(--lp-tutor-ss);line-height:calc(2 * var(--lp-tutor-p))}

/* the learner's line: blue, to the right on a dotted leader; TUT-6: their own Persian marked as a teacher marks a
   page, the slip struck, the fix written above it (a free row for it above the line) */
.lp-tutor-me{display:flex;align-items:baseline;gap:calc(.5 * var(--lp-tutor-p));margin-top:var(--lp-tutor-p);font:600 var(--lp-tutor-ms)/calc(2 * var(--lp-tutor-p)) var(--fb);color:#1C39BB}
.lp-tutor-me > *{position:relative;top:calc(.5 * var(--lp-tutor-p) - .277em)}
.lp-tutor-ld{flex:1;min-width:calc(1.1 * var(--lp-tutor-p));border-bottom:calc(.1 * var(--lp-tutor-p)) dotted rgba(28,57,187,.5);transform:translateY(calc(-.25 * var(--lp-tutor-p)))}
.lp-tutor-me-t{min-width:0;max-width:82%;margin:0;text-align:right;overflow-wrap:anywhere}
.lp-tutor-marked::before{background:#C4304A}
.lp-tutor-fx{position:relative;display:inline-block;white-space:nowrap}
.lp-tutor-fx s{text-decoration:none;color:rgba(28,57,187,.66);background:linear-gradient(#C4304A,#C4304A) 0 56%/100% calc(.125 * var(--lp-tutor-p)) no-repeat}
/* the fix in the gap above the line it corrects (its baseline 1.2p over the learner's, tilted as a hand writes) */
.lp-tutor-fx em{position:absolute;left:50%;top:calc(-.2 * var(--lp-tutor-p) - .52em);font:800 1.08em/1 var(--fd);font-style:normal;color:#8A5A00;white-space:nowrap;transform:translateX(-50%) rotate(-3deg)}
/* the one line of why, under the learner's line, to the right, at the transcript's own size */
.lp-tutor-why-row{display:flex;justify-content:flex-end}
/* ONE line from 1000px (the owner: "the dash should be behind 'am is I.'"): "-i" and "-am" never part from their
   hyphen, each sentence an unbreakable piece (.lp-tutor-nb); on a phone it may wrap only between the two sentences */
.lp-tutor-why{position:relative;top:calc(.5px - .076em);max-width:100%;margin:0;text-align:right;white-space:nowrap;font:600 var(--lp-tutor-ss)/calc(2 * var(--lp-tutor-p)) var(--fb);color:var(--mut)}
.lp-tutor-nb{white-space:nowrap}
.lp-tutor-why b{font-weight:800;color:#C4304A}

/* -- the opener: the app's tutor button, where the tutor's page will open ---------------------------------------- */

/* drawn only DURING the play, over the sheet (which slides in under it), its middle on the first knot (the thread's x,
   the first line's x-height). It never waits in view (review R10: standing alone in the empty half before the play
   it read as a chat button at an arbitrary place): while the play waits it is laid out but unseen (tutor.js measures
   where it will stand), then it comes in, presses itself and sinks into that knot, all inside the play's own time,
   so no button is left on the page. It takes no press. */
.lp-tutor-op{position:absolute;z-index:3;top:var(--lp-tutor-k1);left:var(--lp-tutor-tx);display:none;place-items:center;width:62px;height:62px;border-radius:50%;background:#1C39BB;color:#fff;box-shadow:0 16px 26px -12px rgba(20,42,140,.85);transform:translate(-50%,-50%);pointer-events:none;cursor:default}
.lp-tutor-op svg{display:block;width:28px;height:28px}
.lp-tutor-js .lp-tutor-op{display:grid}
.lp-tutor-js:not(.lp-tutor-on) .lp-tutor-op{visibility:hidden}
.lp-tutor-done .lp-tutor-op{display:none}

/* -- the play ---------------------------------------------------------------------------------------------- */

/* waiting: the sheet off the window's right edge (the page root clips it), its lines unwritten */
.lp-tutor-js .lp-tutor-sheet{transform:translateX(103%)}
.lp-tutor-js.lp-tutor-on .lp-tutor-sheet{transform:none;transition:transform .6s cubic-bezier(.3,.9,.3,1) .15s}
.lp-tutor-js:not(.lp-tutor-on) .lp-tutor-fx s{background-size:0 calc(.125 * var(--lp-tutor-p))}
.lp-tutor-js:not(.lp-tutor-on) .lp-tutor-fx em,.lp-tutor-js:not(.lp-tutor-on) .lp-tutor-why-row{opacity:0}
/* playing (each part's first frame held until its moment: backwards). The opener is pressed (0-.3s) while the sheet
   slides in under it (.15-.75s); it sinks into the first knot (.55-.85s: its glyph goes, it shrinks to the knot's
   size in the knot's blue, round its own middle), and the knot takes its place at .85s; the thread is drawn up and
   down from it */
.lp-tutor-on .lp-tutor-op{animation:lp-tutor-come .2s cubic-bezier(.3,1.4,.5,1) both,lp-tutor-press .3s cubic-bezier(.3,.9,.3,1) .2s forwards,lp-tutor-sink .3s cubic-bezier(.5,0,.3,1) .55s forwards,lp-tutor-gone .01s linear .85s forwards}
.lp-tutor-on .lp-tutor-op svg{animation:lp-tutor-out .2s ease .5s forwards}
.lp-tutor-on .lp-tutor-tu::before{animation:lp-tutor-show .01s linear .84s backwards}
.lp-tutor-on .lp-tutor-rule{animation:lp-tutor-grow .5s cubic-bezier(.3,.9,.3,1) .85s backwards}
.lp-tutor-on .lp-tutor-say .lp-say-fi{animation:lp-tutor-writein .5s cubic-bezier(.5,0,.2,1) .9s backwards}
.lp-tutor-on .lp-tutor-say .lp-say-str{transform-origin:0 50%;animation:lp-tutor-ink .4s ease-out 1.2s backwards}
.lp-tutor-on .lp-tutor-say .lp-say-en{animation:lp-tutor-in .3s ease 1.3s backwards}
.lp-tutor-on .lp-tutor-me{animation:lp-tutor-pen .45s cubic-bezier(.5,0,.2,1) 1.6s backwards}
.lp-tutor-on .lp-tutor-me::before{animation:lp-tutor-knot .3s cubic-bezier(.3,1.6,.5,1) 1.6s backwards,lp-tutor-mark .25s ease 2.05s backwards}
.lp-tutor-on .lp-tutor-fx s{animation:lp-tutor-strike .4s cubic-bezier(.3,.9,.3,1) 2.05s backwards}
.lp-tutor-on .lp-tutor-fx em{animation:lp-tutor-write .4s cubic-bezier(.3,1.6,.5,1) 2.35s backwards}
.lp-tutor-on .lp-tutor-why-row{animation:lp-tutor-in .35s ease 2.65s backwards}
/* played (or arrived already played): no animation is left to start again */
.lp-tutor-done .lp-tutor-sheet{transition:none}
.lp-tutor-done .lp-tutor-op,.lp-tutor-done .lp-tutor-op svg,.lp-tutor-done .lp-tutor-rule,.lp-tutor-done .lp-tutor-tu::before,.lp-tutor-done .lp-tutor-say .lp-say-fi,.lp-tutor-done .lp-tutor-say .lp-say-str,.lp-tutor-done .lp-tutor-say .lp-say-en,.lp-tutor-done .lp-tutor-me,.lp-tutor-done .lp-tutor-me::before,.lp-tutor-done .lp-tutor-fx s,.lp-tutor-done .lp-tutor-fx em,.lp-tutor-done .lp-tutor-why-row{animation:none}

@keyframes lp-tutor-press{0%{transform:translate(-50%,-50%);box-shadow:0 16px 26px -12px rgba(20,42,140,.85),0 0 0 0 rgba(28,57,187,.45)}35%{transform:translate(-50%,-50%) scale(.94);background:#142A8C}100%{transform:translate(-50%,-50%);background:#142A8C;box-shadow:0 16px 26px -12px rgba(20,42,140,.85),0 0 0 16px rgba(28,57,187,0)}}
@keyframes lp-tutor-sink{from{background:#142A8C}to{width:calc(.5 * var(--lp-tutor-p));height:calc(.5 * var(--lp-tutor-p));background:#1C39BB;box-shadow:0 0 0 0 rgba(20,42,140,0)}}
@keyframes lp-tutor-come{from{opacity:0;transform:translate(-50%,-50%) scale(.6)}to{opacity:1;transform:translate(-50%,-50%)}}
@keyframes lp-tutor-out{to{opacity:0}}
@keyframes lp-tutor-gone{to{opacity:0}}
@keyframes lp-tutor-show{from{opacity:0}}
@keyframes lp-tutor-grow{from{transform:scaleY(0)}}
@keyframes lp-tutor-knot{from{transform:scale(0)}}
@keyframes lp-tutor-writein{from{clip-path:inset(-20% calc(100% + 2px) -20% 0)}to{clip-path:inset(-20% 0 -20% 0)}}
@keyframes lp-tutor-ink{from{transform:scaleX(0)}}
@keyframes lp-tutor-in{from{opacity:0;transform:translateY(6px)}}
@keyframes lp-tutor-pen{from{clip-path:inset(-80% calc(100% + 4px) -30% calc(-2.4 * var(--lp-tutor-p)))}to{clip-path:inset(-80% 0 -30% calc(-2.4 * var(--lp-tutor-p)))}}
@keyframes lp-tutor-mark{from{background:#1C39BB}}
@keyframes lp-tutor-strike{from{background-size:0 calc(.125 * var(--lp-tutor-p))}}
@keyframes lp-tutor-write{from{opacity:0;transform:translateX(-50%) rotate(-3deg) scale(.6)}}

/* -- below 1000px: the app's own page (p = 20px), a block the page's full width under the line ----------------- */

@media (max-width:999px),(orientation:portrait) and (max-width:1199px){
  .lp-tutor{--lp-tutor-p:20px;--lp-tutor-t:40px;--lp-tutor-tx:44px;--lp-tutor-cx:72px;--lp-tutor-fs:25px;--lp-tutor-ms:19px;--lp-tutor-ss:16px}
  .lp-beat.lp-tutor{padding-block:var(--lp-pb) var(--lp-tutor-jn)}
  .lp-tutor .lp-in{display:block}
  .lp-tutor .lp-st{margin-top:0}
  .lp-tutor .lp-ob{display:block;margin:clamp(28px,4.5vh,44px) calc(-1 * var(--lp-right)) 0 calc(-1 * var(--lp-pad))}
  .lp-tutor-msgs{max-width:540px}
  .lp-tutor-why{white-space:normal}
  .lp-tutor-sheet{border-radius:24px 24px 0 0;box-shadow:0 -18px 40px -22px rgba(0,0,0,.5)}
  .lp-tutor-fld{display:block}
  /* with script the kit draws the ruled ground (it hums when plucked) */
  .lp-tutor-js .lp-tutor-sheet{background-image:none}
  .lp-tutor-js.lp-tutor-on .lp-tutor-sheet{transition-duration:.55s}
}
@media (max-width:999px) and (min-width:700px) and (orientation:landscape){
  .lp-tutor-me-t{max-width:min(380px,82%)}
  .lp-tutor-why{max-width:min(440px,92%)}
}
@media (max-width:699px),(orientation:portrait) and (max-width:1199px){
  /* the phone's tutor button (a2.css: 56px, the glyph 26px); it sinks into the same knot */
  .lp-tutor-op{width:56px;height:56px}
  .lp-tutor-op svg{width:26px;height:26px}
}

@media (prefers-reduced-motion:reduce){
  .lp-tutor-js .lp-tutor-sheet{transform:none}
  .lp-tutor-js.lp-tutor-on .lp-tutor-sheet{transition:none}
  .lp-tutor-js .lp-tutor-op{display:none}
  .lp-tutor-on .lp-tutor-op,.lp-tutor-on .lp-tutor-op svg,.lp-tutor-on .lp-tutor-rule,.lp-tutor-on .lp-tutor-tu::before,.lp-tutor-on .lp-tutor-say .lp-say-fi,.lp-tutor-on .lp-tutor-say .lp-say-str,.lp-tutor-on .lp-tutor-say .lp-say-en,.lp-tutor-on .lp-tutor-me,.lp-tutor-on .lp-tutor-me::before,.lp-tutor-on .lp-tutor-fx s,.lp-tutor-on .lp-tutor-fx em,.lp-tutor-on .lp-tutor-why-row{animation:none}
}
