/* Beat `lp-road` of the landing page (LP, 2026-11-14; .scratch/ui_integration/briefs/LP_DESIGN.md §5 "1", LP_B1.md):
   its OWN styles only (its object, inside templates/dashboard/landing/road.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-road-.

   The lesson page's scene, reduced: its recipes are copied here under this prefix (lesson.css is not loaded on this
   page): the language words (.ls-lang/.ls-lg), the speaker's ring (.av2/.ls-av), the note (.nt), the comic's frame
   (.cm: 28px corners, its hairline and shadow), the line beads (.lnb: ink once seen, blue now) and the forward pearl
   (.go.sm: the kit's blue pearl with its chevron; .go.won: gold, glowing).

   WIDE (>= 1000px): ONE working view, the whole beat inside the screen with its top at the screen's top (the
   coordinator's correction, 2026-11-14). Two columns sharing one top edge: LEFT (36% of the content box, 40% on a
   screen under 820px tall) the
   statement (wrapping in the column, the frame's size and balance), the line, the language words, the turn; RIGHT
   the picture (the panel's own proportion 640:794, corners 28px), its top level with the statement's cap height
   (.1477em of the statement's size at its .96 line height, measured on Baloo 2 800), as tall as the screen allows (100svh less the beat's
   own top and foot) or as wide as its column allows, whichever is smaller; its right edge clamp(150px, 13vw, 220px)
   short of the content box's right edge. In that gap the gold run, from the picture's right-middle to the bend,
   carries the three beads and the forward pearl (52px), which stops 4-8px before the bend's 48px turn begins (the
   bend starts --lp-gap right of the content box); the beads are spread evenly between the picture's edge and the
   pearl. The turn's cell keeps the height of the tallest turn with every language on (road.js), so stepping or a
   language word never moves the layout.
   BELOW 1000px: the picture (the box's width up to 520px, at most 44svh tall, cropped from the bottom so the faces
   stay), the beads and the forward pearl in one row on a short gold run under it, the language words, the turn. */

.lp-road{--lp-road-L:36%;--lp-road-cg:clamp(28px,3vw,52px);--lp-road-top:clamp(34px,calc(9vh - 30px),88px);--lp-road-foot:max(12px,calc(12.5svh - 30px));--lp-road-pclear:clamp(40px,5.6vh,64px);--lp-road-cap:calc(.1477 * var(--lp-st-fs,clamp(38px,5vw,80px)));--lp-road-pmax:calc((100svh - var(--lp-road-top) - var(--lp-road-pclear) - var(--lp-road-cap)) * .80604);--lp-road-gr:clamp(150px,13vw,220px);--lp-road-po:max(8px,calc(52px - var(--lp-gap)));--lp-road-cell:30px;--lp-road-fs:clamp(28px,3vw,44px)}

@media (min-width:1000px) and (orientation:landscape),(min-width:1200px){
  /* one screen exactly (§7: the frame no longer forces it), the view set at its foot (LP_R2 R2/N2): the free
     space of the screen lies above the statement, where the hero's foot already leaves room, not under the turn,
     where it joined the tutor's statement into one half-screen hole; the turns' cell keeps its reserved height,
     so nothing moves as the visitor steps. The beat's foot puts the tallest state (Māmān, فارسی on, the note) at
     .125 of the screen above "Say it." (the coordinator, 2026-11-14: .12-.14; the tutor's statement caps lie ~30px
     under its beat's top), so the shortest turn (Omid) ends ~.31-.34 above it; the picture keeps a foot of its own
     (--lp-road-pclear) wherever the beat's foot is smaller */
  .lp-beat.lp-road{display:flex;flex-direction:column;justify-content:flex-end;min-height:100svh;padding-block:var(--lp-road-top) var(--lp-road-foot)}
  .lp-road .lp-in{display:grid;grid-template-columns:minmax(0,var(--lp-road-L)) minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:var(--lp-road-cg);align-items:start}
  .lp-road .lp-st{grid-column:1;grid-row:1}
  .lp-road .lp-ln{grid-column:1;grid-row:2;text-wrap:balance}
  .lp-road-ob{display:contents}
  .lp-road-col{grid-column:1;grid-row:3;margin-top:clamp(14px,2.6vh,34px)}
  .lp-road-stage{grid-column:2;grid-row:1 / span 3;justify-self:end;width:min(calc(100% - var(--lp-road-gr)),var(--lp-road-pmax));aspect-ratio:640/794;margin:var(--lp-road-cap) var(--lp-road-gr) max(0px,calc(var(--lp-road-pclear) - var(--lp-road-foot))) 0}
}
/* a short screen gives the column more width (its statement and line wrap less) and the picture less */
@media (min-width:1000px) and (max-height:820px) and (orientation:landscape),(min-width:1200px) and (max-height:820px){
  .lp-road{--lp-road-L:40%}
}

/* -- LEFT: the language words, then the turn ---------------------------------------------------------- */

.lp-road-col{min-width:0}
/* the lesson's language words: a word underlined in blue is on. Finglish is always on (it is the point), so it is
   a word, not a press. */
.lp-road-lang{display:flex;align-items:center;gap:18px;height:40px}
.lp-road-lg{position:relative;display:inline-flex;align-items:center;height:40px;padding:0 1px;font:700 16px/1 var(--fb);color:var(--faint);transition:color .2s}
.lp-road-lg span[lang="fa"]{font:600 17px/1 var(--ffa)}
.lp-road-lg::after{content:"";position:absolute;left:0;right:0;bottom:5px;height:3px;border-radius:2px;background:var(--blue);transform:scaleX(0);transform-origin:0 50%;transition:transform .3s cubic-bezier(.3,1.3,.5,1)}
.lp-road-lg[aria-pressed="true"],.lp-road-lg-fi{color:var(--ink)}
.lp-road-lg[aria-pressed="true"]::after,.lp-road-lg-fi::after{transform:scaleX(1)}
button.lp-road-lg:hover{color:var(--ink)}
.lp-road-lg:focus-visible{outline-offset:4px;border-radius:4px}

/* the turns: stacked without script; with it (.lp-road-js) all three share one cell, held at the height of the
   tallest with every language on (--lp-road-th, road.js), so a bead or a language word never moves the layout */
.lp-road-turns{margin:clamp(12px,2vh,26px) 0 0;padding:0;list-style:none}
.lp-road-turn + .lp-road-turn{margin-top:44px}
.lp-road-js .lp-road-turns{display:grid;align-content:start;min-height:var(--lp-road-th,0px)}
.lp-road-js .lp-road-turn{grid-area:1/1;min-width:0}
.lp-road-js .lp-road-turn + .lp-road-turn{margin-top:0}
.lp-road-js .lp-road-turn:not(.lp-road-on){visibility:hidden}

.lp-road-who{display:flex;align-items:center;gap:12px;min-height:44px}
.lp-road-av{flex:none;width:44px;height:44px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--line2)}
.lp-road-who b{font:800 22px/1.2 var(--fd);color:var(--ink)}

/* the Finglish: each chunk a spoken line (.lp-say, the frame's: its string under it, a press sounds it) */
.lp-road-fi{display:flex;flex-wrap:wrap;align-items:flex-start;column-gap:.3em;row-gap:.06em;margin-top:clamp(10px,1.8vh,20px);font-size:var(--lp-road-fs)}
.lp-road-ch .lp-say-fi{font-weight:700;line-height:1.08;letter-spacing:-.012em;padding-bottom:.3em}
.lp-road-ch:focus-visible{outline-offset:3px}
/* the Persian script under it (Vazirmatn, right to left, set from the column's left edge as the lesson sets it),
   the English under that */
.lp-road-fa{margin-top:.3em;font:600 calc(var(--lp-road-fs) * .64)/1.4 var(--ffa);color:var(--ink);text-align:left;text-wrap:balance}
.lp-road-en{margin-top:.3em;font:500 clamp(16px,min(1.35vw,2.3vh),21px)/1.35 var(--fb);color:var(--mut);text-wrap:balance}
.lp-road-fa + .lp-road-en{margin-top:2px}
.lp-road-ob[data-fa="0"] .lp-road-fa,.lp-road-ob[data-en="0"] .lp-road-en{display:none}
/* the chunk being heard, in all three (the lesson's chunk light) */
.lp-road-fa span,.lp-road-en span{border-radius:4px;white-space:nowrap;transition:background-color .2s,box-shadow .2s}
.lp-road-fa .lp-road-hl,.lp-road-en .lp-road-hl{background:var(--goldT);box-shadow:0 0 0 3px var(--goldT)}
/* Māmān's note (the lesson's .nt, its lantern) */
.lp-road-nt{display:flex;align-items:center;gap:12px;max-width:34em;margin-top:clamp(9px,1.5vh,18px);padding:clamp(5px,.9vh,10px) 16px clamp(5px,.9vh,10px) 10px;border-radius:16px;background:var(--goldT);color:#4A3200;font:600 clamp(15px,min(1.15vw,1.9vh),16px)/1.25 var(--fb)}
.lp-road-nt img{flex:none;width:clamp(30px,4vh,38px);height:clamp(30px,4vh,38px);object-fit:contain}

/* -- RIGHT: the picture ------------------------------------------------------------------------------- */

.lp-road-stage{position:relative}
/* the comic's frame (.cm): its hairline and shadow live on their own layer so the opening circle never cuts them */
.lp-road-stage::before{content:"";position:absolute;inset:0;border-radius:28px;box-shadow:0 0 0 1px var(--line),0 40px 60px -44px rgba(21,23,30,.55);transition:opacity .45s}
.lp-road-pic{position:absolute;inset:0;margin:0;overflow:hidden;border-radius:28px;background:#EDE9E0}
.lp-road-panel{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 0;opacity:0;transition:opacity .45s}
.lp-road-panel.lp-road-on{opacity:1}
/* a quiet ring on the speaker's head (the manifest's head point, road.js places it) */
.lp-road-ring{position:absolute;left:var(--lp-road-rx,50%);top:var(--lp-road-ry,40%);width:21%;aspect-ratio:1;border-radius:50%;box-shadow:0 0 0 2.5px rgba(255,255,255,.9),0 0 0 7px rgba(21,23,30,.08);transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:left .45s cubic-bezier(.3,.9,.3,1),top .45s cubic-bezier(.3,.9,.3,1),opacity .3s}
.lp-road-ob[data-state="open"] .lp-road-ring{opacity:1}

/* the picture pearl it opens out of (the kit's, the same picture), at the picture's centre */
.lp-road-pearl{position:absolute;left:50%;top:50%;z-index:2;display:none;width:min(300px,74%);height:auto;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;filter:drop-shadow(0 18px 16px rgba(21,23,30,.3));opacity:var(--lp-road-pa,1);pointer-events:none}
.lp-road-ob[data-state="pearl"] .lp-road-pearl,.lp-road-ob[data-state="opening"] .lp-road-pearl{display:block}
.lp-road-ob[data-state="pearl"] .lp-road-pic,.lp-road-ob[data-state="opening"] .lp-road-pic{clip-path:circle(var(--lp-road-r,148px) at 50% 50%)}
.lp-road-ob[data-state="pearl"] .lp-road-stage::before,.lp-road-ob[data-state="opening"] .lp-road-stage::before{opacity:0}
/* before it arrives the pearl is alone: the turn and the beads wait UNSEEN, never removed (review R15: hidden, they
   left the tab order and the accessibility tree, so Tab from the hero skipped the lesson); a focus inside brings the
   beat in (road.js) */
.lp-road-ob[data-state="pearl"] .lp-road-col,.lp-road-ob[data-state="pearl"] .lp-road-rail,.lp-road-ob[data-state="opening"] .lp-road-rail{opacity:0;pointer-events:none}

/* the hook: wide, the picture's box (the run ends at its right edge); while it is still a pearl, road.js narrows it
   to the open circle so the run ends at the rim */
.lp-road .lp-road-hook{left:50%;top:50%;width:var(--lp-road-hw,100%);height:0;transform:translateX(-50%)}

/* -- the line beads and the forward pearl, on the gold run ------------------------------------------------ */

/* without script there are no strings and nothing to step: the rail waits for road.js */
.lp-road-rail{display:none}
.lp-road-js .lp-road-rail{position:absolute;left:100%;top:50%;z-index:1;display:flex;align-items:center;width:calc(var(--lp-road-gr) - var(--lp-road-po));height:80px;margin-top:-40px;clip-path:inset(-60px -60px -60px 0)}
.lp-road-beads{flex:1;display:flex;align-items:center;justify-content:space-evenly;min-width:0}
.lp-road-bd{position:relative;flex:none;display:grid;place-items:center;width:var(--lp-road-cell);height:var(--lp-road-cell);margin:0 -10px;border-radius:50%;transform:translateX(var(--lp-road-x,0px))}
.lp-road-bd::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--paper);box-shadow:inset 0 0 0 2px var(--ink);transition:width .3s cubic-bezier(.3,1.6,.5,1),height .3s cubic-bezier(.3,1.6,.5,1),background-color .2s,box-shadow .2s,transform .2s}
.lp-road-bd.lp-road-seen::after{background:var(--ink)}
.lp-road-bd.lp-road-cur::after{width:20px;height:20px;background:var(--blue);box-shadow:0 0 0 5px rgba(28,57,187,.16)}
.lp-road-bd:hover::after{transform:scale(1.25)}
.lp-road-bd:focus-visible{outline-offset:1px}
/* the forward pearl: the kit's GO pearl at 52px with its chevron, no thread of its own (the gold string is its
   thread); gold, glowing, on the last line */
.lp-road-fw{position:relative;flex:none;width:52px;height:52px;border-radius:50%;transform:translateX(var(--lp-road-x,0px))}
.lp-road-fw canvas{display:block;width:52px;height:52px;border-radius:50%;filter:drop-shadow(0 7px 7px rgba(21,23,30,.32));transition:transform .45s cubic-bezier(.3,1.6,.5,1)}
.lp-road-fw::after{content:"";position:absolute;z-index:1;left:50%;top:50%;width:11px;height:11px;margin:-5.5px 0 0 -8px;border-top:3.5px solid #fff;border-right:3.5px solid #fff;border-radius:2px;transform:rotate(45deg);transition:transform .45s cubic-bezier(.3,1.6,.5,1);pointer-events:none}
.lp-road-fw:hover canvas{transform:translateX(5px) rotate(40deg) scale(1.04)}
.lp-road-fw:hover::after{transform:translateX(6px) rotate(45deg)}
.lp-road-fw:active canvas{transform:translateX(5px) scale(.92)}
.lp-road-fw:focus-visible{outline-offset:4px}
.lp-road-fw.lp-road-won::after{border-color:#2A1B00}
.lp-road-fw.lp-road-won canvas{animation:lp-road-glow 1.9s ease-out infinite}

/* -- the arrival and a turn: written, as the tutor writes its first line ---------------------------------- */

/* the frame in which the script takes over the still: nothing eases (review R19: one step) */
.lp-road-swap *,.lp-road-swap *::before,.lp-road-swap *::after{transition:none !important}

.lp-road-ob.lp-road-in .lp-road-lang{animation:lp-road-fade .35s ease both}
.lp-road-turn.lp-road-w .lp-road-av{animation:lp-road-pop .38s cubic-bezier(.3,1.5,.5,1) backwards}
.lp-road-turn.lp-road-w .lp-road-fi{animation:lp-road-write .6s cubic-bezier(.5,0,.2,1) .06s backwards}
.lp-road-turn.lp-road-w .lp-road-fa{animation:lp-road-write-rtl .5s cubic-bezier(.5,0,.2,1) .3s backwards}
.lp-road-turn.lp-road-w .lp-road-en{animation:lp-road-write .45s cubic-bezier(.5,0,.2,1) .4s backwards}
.lp-road-turn.lp-road-w .lp-road-nt{animation:lp-road-pop .4s cubic-bezier(.3,1.5,.5,1) .55s backwards}
.lp-road-fa.lp-road-w{animation:lp-road-write-rtl .5s cubic-bezier(.5,0,.2,1) backwards}
.lp-road-en.lp-road-w{animation:lp-road-write .45s cubic-bezier(.5,0,.2,1) backwards}

@keyframes lp-road-write{from{clip-path:inset(-24px calc(100% + 24px) -24px -24px)}to{clip-path:inset(-24px -24px -24px -24px)}}
@keyframes lp-road-write-rtl{from{clip-path:inset(-24px -24px -24px calc(100% + 24px))}to{clip-path:inset(-24px -24px -24px -24px)}}
@keyframes lp-road-pop{from{opacity:0;transform:scale(.86)}to{opacity:1;transform:none}}
@keyframes lp-road-fade{from{opacity:0}to{opacity:1}}
@keyframes lp-road-glow{0%{box-shadow:0 0 0 0 rgba(232,162,26,.6)}100%{box-shadow:0 0 0 20px rgba(232,162,26,0)}}

/* -- below 1000px: one column; the picture first, the beads on a short run under it ------------------------- */

@media (max-width:999px),(orientation:portrait) and (max-width:1199px){
  .lp-road-ob{display:flex;flex-direction:column;align-items:stretch}
  .lp-road-stage{order:1;width:min(100%,520px);height:auto;max-height:44svh;aspect-ratio:640/794}
  .lp-road-js .lp-road-rail{left:0;top:100%;width:100%;height:64px;margin-top:12px;padding-right:var(--lp-road-po);clip-path:inset(-40px -40px -40px 0)}
  .lp-road-js .lp-road-col{margin-top:calc(12px + 64px + 14px)}
  .lp-road-beads{flex:none;gap:2px;margin-left:auto;margin-right:14px}
  .lp-road-bd{margin:0}
  .lp-road-col{order:3;margin-top:22px}
  .lp-road-pearl{width:240px}
  .lp-road-ob[data-state="pearl"] .lp-road-pic{clip-path:circle(var(--lp-road-r,118px) at 50% 50%)}
  /* the run comes in from the bend under the picture and ends just before the first bead */
  .lp-road .lp-road-hook{left:calc(100% - var(--lp-road-po) - 52px - 14px - 3 * var(--lp-road-cell) - 4px - 4px);top:calc(100% + 12px + 32px);width:0;transform:none}
}
@media (max-width:699px),(orientation:portrait) and (max-width:1199px){
  .lp-road-ob{--lp-road-cell:26px;--lp-road-fs:30px}
  /* a phone holds no cell at Māmān's height (review R23): the turns' box is as tall as the turn shown */
  .lp-road-js .lp-road-turns{min-height:0}
  .lp-road-js .lp-road-turn:not(.lp-road-on){display:none}
  .lp-road-stage::before,.lp-road-pic{border-radius:24px}
  .lp-road-lang{gap:16px}
  .lp-road-who b{font-size:20px}
  .lp-road-fa{font-size:22px}
  .lp-road-en{font-size:17px}
  .lp-road-nt{font-size:15px}
}

@media (prefers-reduced-motion:reduce){
  .lp-road-panel,.lp-road-ring,.lp-road-stage::before,.lp-road-lg::after,.lp-road-bd::after,.lp-road-fw canvas,.lp-road-fw::after{transition:none}
  .lp-road-ob.lp-road-in .lp-road-lang,.lp-road-turn.lp-road-w .lp-road-av,.lp-road-turn.lp-road-w .lp-road-fi,.lp-road-turn.lp-road-w .lp-road-fa,.lp-road-turn.lp-road-w .lp-road-en,.lp-road-turn.lp-road-w .lp-road-nt,.lp-road-fa.lp-road-w,.lp-road-en.lp-road-w,.lp-road-fw.lp-road-won canvas{animation:none}
}
