/* Lesson scale is independent of the homepage demonstration. The action dock
   is a flex sibling of the sole scrolling pane, so it reserves real space. */
.lesson-workspace-content{padding:18px 24px 24px}
.lesson-study-workspace{display:block;width:100%;max-width:960px;min-width:0;margin-inline:auto}
.lesson-study-heading{display:block;margin-bottom:14px}
.lesson-study-heading>span{display:block;color:#547494;font-size:14px;font-weight:600;line-height:1.5}
.lesson-study-heading h1{font-size:25px;line-height:1.3;color:var(--ink);margin:3px 0 0;font-weight:800;letter-spacing:0;overflow-wrap:anywhere}
.lesson-study-position{display:block;color:#547494;font-size:14px;line-height:1.5;margin-top:3px}
.lesson-study-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.lesson-study-main{display:block;min-width:0;width:100%;max-width:700px;margin-inline:auto;padding:18px;background:#fff;border:1px solid #d6e5f2;border-radius:12px;box-shadow:0 4px 16px rgba(45,91,133,.035);font-size:16px}
.lesson-study-main>h2{font-size:25px;line-height:1.35;margin-top:5px;letter-spacing:0}
.lesson-study-main>.screen-label{font-size:14px;line-height:1.5;letter-spacing:0}
.lesson-study-main>.intro{font-size:16px;line-height:1.65;margin-top:8px;max-width:none}
.lesson-study-mobile-context{display:none}
.lesson-study-sidebar{display:block;min-width:0;max-width:700px;width:100%;margin-inline:auto;background:#f8fbff;border:1px solid #d6e5f2;border-radius:12px;align-self:start}
.lesson-study-controls{margin:0;min-width:0}
.lesson-study-controls>summary{cursor:pointer;font-size:15px;font-weight:650;line-height:1.5;min-height:44px;padding:11px 16px;color:#286ba8}
.lesson-study-controls>summary:focus-visible{outline:3px solid #69a7e9;outline-offset:-3px;border-radius:inherit}
.lesson-study-controls-body{padding:16px}
.lesson-study-controls[open]>summary{border-bottom:1px solid #d6e5f2}
.lesson-study-overview{display:block}
.lesson-study-side-label{display:block;font-size:14px;color:#547494;font-weight:600;margin-bottom:9px}
.lesson-study-sidebar .lesson-course-context{display:block;padding:0;margin:0;border:0;border-radius:0;background:none}
.lesson-study-sidebar .lesson-course-context .screen-label{display:block;font-size:14px;line-height:1.5;letter-spacing:0;color:#547494}
.lesson-study-sidebar .lesson-course-context strong{display:block;font-size:16px;line-height:1.5;margin-top:4px;color:#234e73}
.lesson-study-sidebar .lesson-course-context small,.lesson-study-course small{display:block;font-size:14px;line-height:1.5;margin-top:4px;color:#547494}
.lesson-study-course>span{display:block;font-size:16px;font-weight:700;color:#234e73;line-height:1.5}
.lesson-study-progress-label{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:14px;color:#547494;margin-top:14px}
.lesson-study-progress-label strong{font-size:14px;color:#286ba8}
.lesson-study-progress{height:5px;border-radius:10px;background:#dceaf7;margin-top:6px}
.lesson-study-progress>span{display:block;height:100%;border-radius:inherit;background:#448dd5}
.lesson-study-note{font-size:14px;line-height:1.55;color:#547494;margin-top:9px}
.lesson-study-sidebar .coach-fit{display:block;margin-top:15px;border-top:1px solid #d6e5f2;padding:13px 0 0}
.lesson-study-sidebar .coach-fit>span{display:block;font-size:14px;color:#426b90;line-height:1.5;margin-bottom:8px}
.lesson-study-sidebar .coach-fit>div{display:flex;gap:7px;flex-wrap:wrap}
.lesson-study-sidebar .coach-fit button{font-size:14px;min-height:44px;padding:8px 10px}
.lesson-study-sidebar .coach-fit p{font-size:14px;line-height:1.6;margin-top:10px}
.lesson-study-sidebar .lesson-restart{display:block;width:100%;text-align:left;margin:14px 0 0;padding:10px 0;border-top:1px solid #d6e5f2;font-size:14px;min-height:44px;line-height:1.5;color:#547494}
.lesson-study-links{display:block;margin-top:6px}
.lesson-study-links button{display:block;min-height:44px;width:100%;background:none;color:#286ba8;font-size:14px;padding:9px 0;text-align:left;line-height:1.5}

/* Compact material and exercises; Hebrew marks retain generous line height. */
.lesson-study-main .reading-step-strip{gap:6px;margin-top:12px}
.lesson-study-main .reading-step-strip>span{font-size:14px;line-height:1.5;padding:5px 9px}
.lesson-study-main .reading-symbols{gap:10px;margin-top:14px}
.lesson-study-main .reading-symbols>div{min-width:86px;padding:12px}
.lesson-study-main .reading-symbols [lang=he]{font-size:32px;line-height:1.6}
.lesson-study-main .reading-symbols small{font-size:14px;line-height:1.5;margin-top:4px}
.lesson-study-main .curr-letter-symbols>div{min-height:120px;padding:12px}
.lesson-study-main .curr-letter-symbols [lang=he]{font-size:62px;line-height:1.3}
.lesson-study-main .alef-introduction{gap:18px;padding:14px 18px;margin-top:14px;min-height:120px}
.lesson-study-main .alef-introduction>span{font-size:64px;min-width:70px;line-height:1.4}
.lesson-study-main .alef-introduction small{font-size:14px;line-height:1.5;letter-spacing:0}
.lesson-study-main .alef-introduction strong{font-size:23px;margin-top:3px}
.lesson-study-main .alef-introduction p{font-size:16px;line-height:1.6;margin-top:4px}
.lesson-study-main .alef-vowel-demo{min-height:130px;gap:20px;padding:14px 18px}
.lesson-study-main .alef-demo-glyph{font-size:68px;line-height:1.4;min-width:76px}
.lesson-study-main .alef-vowel-demo small{font-size:14px;line-height:1.5}
.lesson-study-main .alef-vowel-demo strong{font-size:23px;margin-top:3px}
.lesson-study-main .alef-vowel-demo p{font-size:16px;line-height:1.6;margin-top:5px}
.lesson-study-main .alef-vowel-tabs{margin-top:14px}
.lesson-study-main .alef-vowel-tabs button{min-height:44px;font-size:23px}
.lesson-study-main .orli-tip,.lesson-study-main .reading-explanation{font-size:16px;line-height:1.65;padding:12px 14px;margin-top:14px}
.lesson-study-main .reading-explanation p+p{margin-top:8px}
.lesson-study-main .alef-key-rule{font-size:16px;line-height:1.65;padding:12px 14px;margin-top:12px}
.lesson-study-main .alef-reference>summary{font-size:14px;min-height:44px;padding-block:11px;line-height:1.6}
.lesson-study-main .alef-reference p,.lesson-study-main .alef-variant-row p,.lesson-study-main .alef-exception p{font-size:16px;line-height:1.65}
.lesson-study-main .alef-exception h3{font-size:16px;line-height:1.5}
.lesson-study-main .reading-examples-title{font-size:18px;margin-top:18px}
.lesson-study-main .reading-examples{gap:10px;margin-top:12px}
.lesson-study-main .reading-example{padding:14px 12px}
.lesson-study-main .reading-example>strong{font-size:32px;line-height:1.6}
.lesson-study-main .reading-meaning{font-size:16px;line-height:1.5}
.lesson-study-main .reading-phon,.lesson-study-main .curr-phon summary{font-size:14px;line-height:1.5}
.lesson-study-main .reading-audio button{font-size:14px;min-height:44px}
.lesson-study-main .reading-segments{margin-top:10px;margin-bottom:5px}
.lesson-study-main .reading-question,.lesson-study-main .question-hebrew{font-size:36px;line-height:1.6;margin-top:14px;padding:10px}
.lesson-study-main .reading-question.reading-question-glyph,.lesson-study-main .reading-question.curr-large-glyph{font-size:62px;line-height:1.4;padding:12px}
.lesson-study-main .reading-options:not(.reading-glyph-options),.lesson-study-main .answer-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.lesson-study-main .reading-glyph-options{grid-template-columns:repeat(auto-fit,minmax(100px,172px));gap:12px;justify-content:center;margin-top:14px}
.lesson-study-main .reading-options .answer,.lesson-study-main .answer-options .answer{font-size:16px;line-height:1.5;min-height:44px;padding:10px 13px;overflow-wrap:anywhere}
.lesson-study-main .reading-options [lang=he]{font-size:28px;line-height:1.6}
.lesson-study-main .reading-glyph-options .answer{min-height:116px;padding:10px;max-width:172px;text-align:center}
.lesson-study-main .reading-glyph-options [lang=he]{font-size:60px;line-height:1.4}
.lesson-study-main .reading-assembled{min-height:70px;margin-top:14px;padding:10px}
.lesson-study-main .reading-token-bank,.lesson-study-main .word-bank{gap:8px;margin-top:14px}
.lesson-study-main .reading-token-bank .word-chip,.lesson-study-main .word-chip{min-height:44px;padding:5px 13px;line-height:1.5}
.lesson-study-main .reading-assembled .placeholder,.lesson-study-main .sentence-slots .placeholder{font-size:14px;line-height:1.5}
.lesson-study-main .reading-actions{position:static;bottom:auto;margin-top:14px;padding:0;background:transparent}
.lesson-workspace-content .reading-actions:empty{display:none}
.lesson-study-main .reading-task-tools{justify-content:flex-start;gap:10px;flex-wrap:wrap;margin-top:10px}
.lesson-study-main .reading-task-tools button{font-size:15px;min-height:44px}
.lesson-study-main .full-button{width:auto;min-width:220px;max-width:100%;font-size:16px;min-height:44px;padding-inline:18px;gap:14px;margin-top:14px}
.lesson-study-main .reading-actions .full-button{margin-top:0}
.lesson-study-main>.skip-button{margin:10px 0 0;width:auto;font-size:15px;min-height:44px}
.lesson-study-main .practice-compose{position:static;top:auto;grid-template-columns:minmax(0,1fr);background:transparent;margin-top:10px;padding:7px 0}
.lesson-study-main .practice-compose input,.lesson-study-main .practice-compose textarea{font-size:16px;min-height:44px;line-height:1.5}
.lesson-study-main .practice-compose .send-button{min-height:44px}
.lesson-study-main .feedback{font-size:16px;line-height:1.65;padding:12px 14px;margin-top:12px}
.lesson-study-main .guided-note,.lesson-study-main .quiet-note{font-size:14px;line-height:1.6;margin-top:10px}
.lesson-study-main .word-cards,.lesson-study-main .letter-cards{gap:10px;margin-top:14px}
.lesson-study-main .word-card,.lesson-study-main .letter-card{padding:14px}
.lesson-study-main .word-card .ru,.lesson-study-main .letter-card>p{font-size:16px;line-height:1.6}
.lesson-study-main .word-card .phonetic,.lesson-study-main .letter-card>span{font-size:14px;line-height:1.5}
.lesson-study-main .word-card button{width:44px;min-height:44px}
.lesson-study-main .letters-orientation{margin:12px 0;padding:12px 14px}
.lesson-study-main .letters-orientation strong{font-size:16px;line-height:1.5}
.lesson-study-main .letters-orientation p{font-size:16px;line-height:1.65}
.lesson-study-main .color-word-card small{font-size:14px;line-height:1.5}
.lesson-study-main .color-word-card p{font-size:16px;line-height:1.5}
.lesson-study-main .color-word-tools button{font-size:14px;min-height:44px}
.lesson-study-main .ulpan-passage details p:not([lang=he]),.lesson-study-main .ulpan-model p:not([lang=he]),.lesson-study-main .ulpan-listen p:not([lang=he]){font-size:16px;line-height:1.65}
.lesson-study-main .chat-bubble{font-size:16px;line-height:1.7;padding:12px 14px}
.lesson-study-main .suggestions button{font-size:14px;min-height:44px}
.lesson-study-main .plan-card{padding:16px;margin-top:14px}
.lesson-study-main .plan-row{font-size:16px;padding-block:10px}
.lesson-study-main .stat{padding:14px 8px}
.lesson-study-main .stat span{font-size:14px;line-height:1.5}
.lesson-study-main .course-result-links{gap:10px 18px;flex-wrap:wrap}

/* The dock stays visible without covering material, feedback, or focused input. */
#lesson-action-dock{display:block;flex:none;position:relative;z-index:6;width:100%;margin:0;background:#fff;border-top:1px solid #d4e5f2;box-shadow:0 -4px 14px rgba(40,86,128,.045);padding:10px 24px calc(10px + env(safe-area-inset-bottom,0px))}
#lesson-action-dock[hidden]{display:none}
.lesson-action-dock-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:960px;min-width:0;margin-inline:auto}
.lesson-action-dock-status{font-size:14px;line-height:1.5;color:#547494;max-width:360px;min-width:0;overflow-wrap:anywhere}
.lesson-action-dock-status:empty{display:none}
.lesson-action-dock-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0;margin-left:auto}
#lesson-action-dock button{font-size:15px;line-height:1.5;min-height:44px;margin:0;padding:10px 15px;max-width:100%}
#lesson-action-dock .full-button{width:auto;min-width:200px;max-width:300px;gap:14px;justify-content:center}
#lesson-action-dock .reading-task-tools{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap;margin:0}
#lesson-action-dock .reading-task-tools>span{font-size:14px;line-height:1.5;color:#547494}
#lesson-action-dock .skip-button{display:inline-flex;align-items:center;justify-content:center;width:auto;background:transparent;border:1px solid #d4e5f2;border-radius:8px;color:#286ba8}
#lesson-action-dock button:focus-visible{outline:3px solid #69a7e9;outline-offset:2px}

@media(min-width:1000px){
  .app-shell>.lesson-workspace-content{padding:18px 24px 24px}
}
@media(min-width:1100px){
  .lesson-study-grid{grid-template-columns:minmax(0,700px) 240px;gap:20px}
  .lesson-study-controls[open]>summary{display:none}
  .lesson-study-controls-body{padding:16px}
}
@media(min-width:1100px) and (min-height:720px){
  .lesson-study-sidebar{position:sticky;top:0}
}
@media(min-width:781px) and (max-width:1099px){
  .lesson-study-workspace{max-width:700px}
  .lesson-action-dock-inner{max-width:700px}
}

/* Phones get readable type and 48px targets, rather than a scaled desktop card. */
@media(max-width:780px){
  .app-shell>.lesson-workspace-content{padding:14px 14px 18px}
  .lesson-study-workspace{max-width:700px}
  .lesson-study-heading{margin-bottom:10px}
  .lesson-study-heading>span{font-size:14px;line-height:1.5}
  .lesson-study-heading h1{font-size:24px;line-height:1.3;margin-top:2px}
  .lesson-study-main{font-size:18px;padding:14px;border-radius:10px}
  .lesson-study-main>h2{font-size:22px;line-height:1.35;margin-top:4px}
  .lesson-study-main>.screen-label{font-size:14px;line-height:1.5}
  .lesson-study-main>.intro{font-size:17px;line-height:1.65;margin-top:7px}
  .lesson-study-mobile-context{display:block}
  .lesson-study-mobile-context .lesson-course-context{margin-bottom:10px;padding:8px 10px;gap:2px 8px;font-size:14px;line-height:1.5}
  .lesson-study-mobile-context .lesson-course-context strong{font-size:15px}
  .lesson-study-mobile-context .lesson-course-context small{font-size:14px}
  .lesson-study-controls>summary{font-size:16px;min-height:48px;padding:12px 14px}
  .lesson-study-controls-body{padding:14px}
  .lesson-study-sidebar .coach-fit button,.lesson-study-sidebar .lesson-restart,.lesson-study-links button{font-size:15px;min-height:48px}
  .lesson-study-sidebar .coach-fit p,.lesson-study-note{font-size:15px}
  .lesson-study-main .reading-step-strip>span{font-size:14px;line-height:1.5;padding:5px 8px}
  .lesson-study-main .reading-symbols{margin-top:12px;gap:8px}
  .lesson-study-main .reading-symbols>div{min-width:80px;padding:12px 10px}
  .lesson-study-main .reading-symbols small{font-size:15px;line-height:1.5}
  .lesson-study-main .curr-letter-symbols [lang=he]{font-size:64px;line-height:1.4}
  .lesson-study-main .curr-letter-symbols>div{min-height:125px}
  .lesson-study-main .alef-introduction{padding:12px;gap:12px;min-height:120px}
  .lesson-study-main .alef-introduction>span{font-size:64px;min-width:56px}
  .lesson-study-main .alef-introduction small{font-size:14px}
  .lesson-study-main .alef-introduction strong{font-size:23px}
  .lesson-study-main .alef-introduction p,.lesson-study-main .alef-vowel-demo p{font-size:17px;line-height:1.6}
  .lesson-study-main .alef-vowel-demo{padding:12px;gap:12px;min-height:130px}
  .lesson-study-main .alef-demo-glyph{font-size:70px;min-width:64px}
  .lesson-study-main .alef-vowel-demo small{font-size:15px}
  .lesson-study-main .alef-vowel-demo strong{font-size:23px}
  .lesson-study-main .alef-vowel-tabs button{min-height:48px}
  .lesson-study-main .orli-tip,.lesson-study-main .reading-explanation,.lesson-study-main .alef-key-rule{font-size:17px;line-height:1.7;padding:12px;margin-top:12px}
  .lesson-study-main .alef-reference>summary{font-size:15px;min-height:48px;padding-block:12px}
  .lesson-study-main .alef-reference p,.lesson-study-main .alef-variant-row p,.lesson-study-main .alef-exception p{font-size:17px;line-height:1.7}
  .lesson-study-main .reading-examples{grid-template-columns:1fr;gap:10px}
  .lesson-study-main .reading-example{padding:14px 12px}
  .lesson-study-main .reading-meaning{font-size:18px;line-height:1.6}
  .lesson-study-main .reading-phon,.lesson-study-main .curr-phon summary{font-size:15px;line-height:1.5}
  .lesson-study-main .reading-audio button{font-size:15px;min-height:48px}
  .lesson-study-main .reading-options:not(.reading-glyph-options),.lesson-study-main .answer-options{grid-template-columns:1fr;gap:9px}
  .lesson-study-main .reading-options .answer,.lesson-study-main .answer-options .answer{font-size:17px;min-height:48px;line-height:1.6;padding:11px 13px}
  .lesson-study-main .reading-glyph-options{grid-template-columns:repeat(auto-fit,minmax(86px,1fr));gap:10px}
  .lesson-study-main .reading-glyph-options .answer{max-width:none;min-height:116px;padding:10px}
  .lesson-study-main .reading-glyph-options [lang=he]{font-size:62px;line-height:1.45}
  .lesson-study-main .reading-question,.lesson-study-main .question-hebrew{font-size:36px;line-height:1.65;margin-top:12px;padding:10px}
  .lesson-study-main .reading-question.reading-question-glyph,.lesson-study-main .reading-question.curr-large-glyph{font-size:64px;line-height:1.45;padding:10px}
  .lesson-study-main .reading-token-bank .word-chip,.lesson-study-main .word-chip{min-height:48px;font-size:26px}
  .lesson-study-main .reading-assembled .placeholder,.lesson-study-main .sentence-slots .placeholder{font-size:15px}
  .lesson-study-main .reading-task-tools button,.lesson-study-main .full-button,.lesson-study-main>.skip-button{min-height:48px;font-size:16px}
  .lesson-study-main .full-button{width:100%;min-width:0;justify-content:center}
  .lesson-study-main .practice-compose input,.lesson-study-main .practice-compose textarea{font-size:17px;line-height:1.5;min-height:48px;padding:11px 12px}
  .lesson-study-main .practice-compose .send-button{min-height:48px;min-width:48px}
  .lesson-study-main .feedback{font-size:17px;line-height:1.65;padding:12px;margin-top:10px}
  .lesson-study-main .guided-note,.lesson-study-main .quiet-note{font-size:15px;line-height:1.6}
  .lesson-study-main .word-card .ru,.lesson-study-main .letter-card>p{font-size:17px;line-height:1.65}
  .lesson-study-main .word-card .phonetic,.lesson-study-main .letter-card>span{font-size:15px}
  .lesson-study-main .word-card button{width:48px;min-height:48px}
  .lesson-study-main .letters-orientation{padding:12px;gap:10px}
  .lesson-study-main .letters-orientation strong,.lesson-study-main .letters-orientation p{font-size:17px;line-height:1.6}
  .lesson-study-main .color-word-card small{font-size:15px;line-height:1.5}
  .lesson-study-main .color-word-card p{font-size:17px;line-height:1.5}
  .lesson-study-main .color-word-tools button{font-size:15px;min-height:48px}
  .lesson-study-main .ulpan-passage details p:not([lang=he]),.lesson-study-main .ulpan-model p:not([lang=he]),.lesson-study-main .ulpan-listen p:not([lang=he]){font-size:17px;line-height:1.7}
  .lesson-study-main .ulpan-passage summary,.lesson-study-main .ulpan-model summary,.lesson-study-main .ulpan-listen .back-link{font-size:15px;min-height:48px}
  .lesson-study-main .chat-bubble,.lesson-study-main .plan-row{font-size:17px;line-height:1.7}
  .lesson-study-main .suggestions button{font-size:15px;min-height:48px}
  .lesson-study-main .stat span{font-size:14px;line-height:1.5}
  #lesson-action-dock{padding:8px 14px calc(8px + env(safe-area-inset-bottom,0px))}
  .lesson-action-dock-inner{display:flex;flex-direction:column;align-items:stretch;gap:5px;max-width:700px}
  .lesson-action-dock-status{font-size:14px;max-width:none}
  .lesson-action-dock-controls{width:100%;margin:0;gap:8px;justify-content:space-between}
  #lesson-action-dock button{font-size:16px;min-height:48px;padding:10px 12px}
  #lesson-action-dock .full-button{flex:1 1 100%;width:100%;min-width:0;max-width:none;order:2;justify-content:center}
  #lesson-action-dock .reading-task-tools{flex:1 1 auto;justify-content:flex-start;gap:8px}
}

/* VisualViewport sizes the shell; the reserved dock follows that smaller area. */
@media(max-width:780px){
  .keyboard-open .app-shell>.lesson-workspace-content{padding:8px 14px 12px}
  .keyboard-open .lesson-study-heading{margin-bottom:7px}
  .keyboard-open .lesson-study-heading h1{font-size:20px}
  .keyboard-open .lesson-study-main{padding:10px 12px}
  .keyboard-open .lesson-study-main>h2{font-size:21px}
  .keyboard-open .lesson-study-main>.screen-label{display:block;font-size:14px}
  .keyboard-open .lesson-study-main>.intro{display:block;font-size:17px;line-height:1.5;margin-top:5px}
  .keyboard-open .lesson-study-main .practice-compose{position:sticky;top:0;background:#fff;margin-top:6px;padding:6px 0;z-index:5}
  .keyboard-open .lesson-study-main .reading-question{font-size:30px;line-height:1.45;padding:7px;margin-top:8px}
  .keyboard-open .lesson-study-main .feedback{font-size:16px;padding:10px;margin-top:8px}
  .keyboard-open #lesson-action-dock{padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom,0px))}
  .keyboard-open .lesson-action-dock-status{font-size:14px;line-height:1.4}
  .keyboard-open .lesson-action-dock-inner{gap:3px}
}
