/* Spacious editorial layout shared by every workspace. Colors live in brand-palette.css. */
/* Exercise conversations: a small overlay leaves the workbook visible. */
body[data-account-role="student"] .notification-button{display:grid!important}
body .notification-button[hidden]{display:none!important}
.exercise-chat{position:fixed;inset:auto 24px 24px auto;margin:0;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 112px);overflow:hidden;z-index:100;border:1px solid var(--line);background:var(--paper);color:var(--ink);box-shadow:0 10px 35px var(--workbook-shadow)}
.exercise-chat .field-comment-card{display:flex;flex-direction:column;max-height:calc(100dvh - 114px);padding:20px;background:var(--paper)}
.exercise-chat .field-comment-head{flex:none;gap:10px}.exercise-chat .field-comment-head h2{font-size:22px}.exercise-chat .field-comment-head p{font-size:12px;color:var(--muted)}
.exercise-chat .field-comment-context{flex:none;margin:14px 0 10px;max-height:125px;overflow:auto}
.exercise-chat .field-comment-context span{font-size:11px;background:var(--cream);color:var(--muted)}
.exercise-chat .field-comment-context p{font-size:12px;background:var(--card-surface);color:var(--ink)}
.chat-exercise-link{display:block;color:var(--link);text-decoration:underline;text-underline-offset:3px;line-height:1.6}
.chat-exercise-link:hover{color:var(--accent)}.chat-exercise-link:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:3px}
.exercise-chat .field-comment-context .chat-exercise-link span{padding:0;background:transparent;color:inherit;font-size:inherit;white-space:nowrap}
/* Hold the questioned item for a second, then fade back to its own colors. */
.comment-question-highlight{animation:comment-question-focus 2.2s ease-out both;scroll-margin-top:110px}
@keyframes comment-question-focus{0%,45%{background-color:var(--peach);box-shadow:0 0 0 2px var(--accent)}100%{background-color:var(--comment-before-background,transparent);box-shadow:var(--comment-before-shadow,none)}}
@media(prefers-reduced-motion:reduce){.comment-question-highlight{animation-duration:1.1s;animation-timing-function:steps(1,end)}}
.chat-messages{display:flex;flex-direction:column;gap:12px;min-height:120px;height:280px;overflow:auto;overscroll-behavior:contain;padding:12px 4px;margin-bottom:14px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.chat-message{align-self:flex-start;flex:none;max-width:88%;padding:10px 12px;border-radius:12px 12px 12px 3px;background:var(--cream);color:var(--ink);overflow-wrap:anywhere}
.chat-message.is-own{align-self:flex-end;border-radius:12px 12px 3px 12px;background:var(--peach)}
.chat-message-author{font-size:11px;font-weight:600;color:var(--ink)}.chat-message p{margin:5px 0;font-size:14px;line-height:1.5;white-space:pre-wrap}.chat-message time{font-size:10px;color:var(--ink);opacity:.75}
.chat-empty{margin:auto;text-align:center;font-size:13px;color:var(--muted);line-height:1.6}
.exercise-chat .field-comment-label{flex:none;font-size:12px;color:var(--muted)}.exercise-chat textarea{min-height:68px;max-height:140px;font-size:14px;background:var(--paper);color:var(--ink);border-color:var(--line)}
.exercise-chat .field-comment-status{flex:none;font-size:12px;line-height:1.4;color:var(--muted)}.exercise-chat .field-comment-actions{flex:none;margin-top:4px}.exercise-chat .field-comment-actions button{font-size:14px;min-width:96px}
.chat-teacher-label{display:grid;gap:6px;margin:4px 0 10px;font-size:12px;color:var(--muted)}.chat-teacher{padding:8px;font:inherit;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink)}
.chat-inbox-item{display:block;width:100%;text-align:left;font:inherit;background:var(--card-surface);color:var(--ink)}.chat-inbox-item:hover{background:var(--cream)}
.chat-inbox-item strong{font-size:14px}.chat-inbox-item .notification-state{font-size:10px;font-weight:400}.chat-inbox-preview{display:block;margin:10px 0 8px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;max-height:64px;overflow:hidden}
.chat-inbox-context{display:block;margin-bottom:8px;color:var(--muted);font-size:11px;line-height:1.5}.chat-inbox-item time{font-size:11px}
.field-comment-button.has-unread{box-shadow:0 0 0 2px var(--accent)}
.typed-exercise .field-comment-button:not(.exercise-comment-button){display:inline-grid;place-items:center;align-self:center;box-sizing:border-box;flex:0 0 36px;width:36px;min-width:36px;max-width:36px;height:36px;min-height:36px;max-height:36px;padding:0;float:none;margin:0 0 0 4px;line-height:1;vertical-align:middle}
.typed-exercise .field-comment-button:not(.exercise-comment-button) svg{display:block;grid-area:1/1;width:18px;height:18px;margin:0}
.student-interactive-card .bank-exercise-head:has(.exercise-comment-button,.teacher-check-label){display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.field-comment-button.exercise-comment-button{display:inline-flex;align-items:center;gap:8px;float:none;flex:none;width:auto;min-height:36px;margin:0;padding:8px 12px;font:500 13px var(--font-text);background:var(--cream);color:var(--ink);border-color:var(--line)}
.comment-toast{position:fixed;z-index:110;bottom:22px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:14px 20px;border:1px solid var(--line);border-radius:12px;background:var(--cream);color:var(--ink);box-shadow:0 4px 16px var(--card-shadow);font:500 14px var(--font-text)}
@media(max-width:600px){.exercise-chat{inset:auto 12px 12px auto;width:calc(100vw - 24px);max-height:calc(100dvh - 92px)}.exercise-chat .field-comment-card{padding:16px;max-height:calc(100dvh - 94px)}.chat-messages{height:230px;min-height:80px}.exercise-chat .field-comment-context{max-height:90px}}
:root{--page-gutter:clamp(24px,4vw,64px);--card-radius:14px;--font-heading:'Learn Symbols',Catamaran,Rubik,'Segoe UI',sans-serif;--font-text:'Learn Symbols',Rubik,'Segoe UI',sans-serif}
/* Shared tick silhouette, limited to tick characters; all text keeps its font. */
@font-face{font-family:'Learn Symbols';src:url('assets/tick.woff') format('woff');font-style:normal;font-weight:100 900;font-display:swap;unicode-range:U+2713-2714}
/* Nunito ExtraBold is reserved for the Freily wordmark. */
@font-face{font-family:Nunito;src:url('assets/fonts/Nunito-Variable.ttf') format('truetype');font-style:normal;font-weight:200 1000;font-display:swap}
/* Approved site typography: Catamaran headings and Rubik text/controls, served locally. */
@font-face{font-family:Catamaran;src:url('assets/fonts/Catamaran-Variable.ttf') format('truetype');font-style:normal;font-weight:100 900;font-display:swap}
@font-face{font-family:Rubik;src:url('assets/fonts/Rubik-Variable.ttf') format('truetype');font-style:normal;font-weight:300 900;font-display:swap}
@font-face{font-family:Rubik;src:url('assets/fonts/Rubik-Italic-Variable.ttf') format('truetype');font-style:italic;font-weight:300 900;font-display:swap}
body{overflow-x:clip;background:#fff}
body,button,input,select,textarea{font-family:var(--font-text)}
h1,h2,h3,h4,h5,h6,.brand,.book-cover-title{font-family:var(--font-heading)}
header{height:88px;background:#fff;border-bottom:1px solid #f1e7de}
.topbar{max-width:1440px;padding:0 var(--page-gutter);height:100%}
.brand{display:flex;align-items:center;gap:4px;flex:0 0 auto;width:max-content;padding:8px 12px;font-family:Nunito,Rubik,'Segoe UI',sans-serif;font-size:40px;font-weight:800;line-height:1;letter-spacing:-1.1px;white-space:nowrap}
.brand:before{content:none}
.brand .brand-wordmark{margin:0;color:var(--ink)}
.brand-mark{display:block;flex:none;width:56px;height:56px;object-fit:contain}
html[lang] .header-links{gap:clamp(16px,2.5vw,36px)}
.header-links button{font-size:14px;padding:20px 0;font-weight:500}
.header-actions{gap:12px}.role-pill{background:#f8eee4;font-size:15px;line-height:1.4;padding:10px 16px;border-radius:10px;white-space:nowrap}
.notification-button,.profile-button,.theme-toggle{background:transparent;border-color:transparent;width:38px;height:38px}
.language-switch{background:#f8eee4}
main{max-width:1440px;padding:0 var(--page-gutter)}
main>section{padding-bottom:32px}
h1{font-size:clamp(32px,3.5vw,48px);line-height:1.18;letter-spacing:-1.4px}
.design-hero,.library-heading,.bank-heading,.lessons-heading,.student-account-heading,.profile-heading{position:relative;isolation:isolate;margin:0 0 38px;padding:46px 0;min-height:210px}
.design-hero:before,.library-heading:before,.bank-heading:before,.lessons-heading:before,.student-account-heading:before,.profile-heading:before{content:'';position:absolute;inset:0;left:50%;width:100vw;transform:translateX(-50%);z-index:-1;background:var(--cream)}
.design-hero{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(240px,1fr);align-items:center;gap:24px;min-height:250px;padding-top:30px;padding-bottom:30px}
.design-hero h1{margin:18px 0 14px;font-weight:800}
.design-hero p,.library-heading p,.lessons-heading p,.student-account-heading p,.bank-heading p,.profile-heading p{font-size:16px;line-height:1.8;max-width:760px;margin:0}
.design-hero-art{width:100%;height:200px;object-fit:contain;display:block}
.design-crumb{font-size:18px;line-height:1.5;color:var(--muted)}
.design-crumb strong{font-weight:600;color:var(--link)}
.collection-heading{margin-bottom:24px}.collection-heading h2{font-size:30px;font-weight:800}
.catalog-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px;margin-bottom:22px}
.catalog-toolbar .catalog-search{flex:1 1 400px;margin:0}
.catalog-search label{width:100%;font-size:13px;gap:6px}
.catalog-search input{height:48px;border-radius:12px;padding:12px 18px;font-size:14px;background:white}
.catalog-search button{align-self:end;height:48px;padding:12px 20px;border-radius:12px}
.catalog-languages{display:block;flex:0 1 250px;width:250px;margin:0;padding:0;background:none}
.catalog-languages label{display:flex;flex-direction:column;gap:6px;font-size:13px}
.catalog-languages .studio-select-trigger{display:flex;justify-content:space-between;min-height:48px;border:2px solid var(--line);border-radius:12px;padding:12px 18px;background:var(--paper);color:var(--ink);font-size:14px;text-align:left}
.catalog-status:empty{display:none}.catalog-status{margin-bottom:18px}

/* Assigned exercises: readable navigation and stronger boundaries. */
.student-lesson-meta span{display:inline-flex;align-items:center;min-height:46px;padding:12px 16px;font-size:16px;line-height:1.4}
.student-lesson-workspace{grid-template-columns:230px minmax(0,1fr)}
.student-lesson-nav h2{font-size:16px}
.student-lesson-nav .student-exercise-number{width:32px;height:32px;font-size:14px}
.student-lesson-nav button .student-exercise-status{font-size:14px;font-weight:400}
.student-lesson-nav button[data-progress-status] .student-exercise-status{font-weight:400}
.student-interactive-card :is(.bank-original-reference,.bank-response,.typed-answer-row,.inline-passage-row,.bank-work-row,.match-choice,.word-dropzone,.crossword-answer-row,.answer-history-panel){border-width:2px}
.student-interactive-card{border-width:2px}
.student-interactive-card .bank-exercise-head{border-bottom-width:2px}
.student-interactive-card :is(input,textarea,select){border-width:2px}
.student-lesson-pager button{border-width:2px}
@media(max-width:850px){.student-lesson-workspace{grid-template-columns:1fr}.student-lesson-nav button{min-width:150px}}

/* Use the input's baseline, so inline history never shifts the sentence. */
[data-gap-fields] .inline-gap-answer{vertical-align:baseline}
.library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:26px}
.book-card,.student-lesson-card{background:var(--card-surface);padding:24px;border:0;border-radius:var(--card-radius);box-shadow:3px 4px 5px -2px var(--workbook-shadow)}
.book-card{display:grid;grid-template-columns:minmax(130px,.7fr) minmax(0,1.2fr);gap:24px;align-items:center;overflow:visible}
.book-cover{height:auto;min-width:0;overflow:visible;display:flex;justify-content:center;align-items:center}
.book-cover>img{width:100%;height:250px;object-fit:cover;border-radius:8px;filter:drop-shadow(0 4px 5px #17110f18)}
.book-cover:after,.book-cover-title,.book-cover>.book-level{display:none}
.book-body{display:flex;flex-direction:column;align-self:stretch;padding:0;min-width:0}.book-body h2{font-size:21px;font-weight:800;line-height:1.4;margin-bottom:8px}
.book-body p{font-size:13px;line-height:1.65;margin-bottom:14px}
.book-tags{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 18px}
.book-tags span{background:var(--cream);padding:9px 12px;font-size:12px;border-radius:10px;color:var(--ink)}
.book-tags span+span{background:var(--butter)}
.book-meta{gap:6px;margin-bottom:22px;color:var(--muted)}
.book-meta span{padding:0;background:none;font-size:12px}.book-meta span+span:before{content:'·';margin-right:6px}
.book-body .book-open{margin-top:auto;flex-shrink:0;width:100%;max-width:270px;min-height:47px;font-size:13px;font-weight:600;border-radius:12px;text-align:center}
.book-body .collection-added{font-size:11px;line-height:1.6}
/* Imported worksheets contain the question text, so keep scans legible at full width. */
.exercise-picture[data-source-worksheet]{width:100%;padding:12px;border-radius:10px;background:var(--paper)}
.exercise-picture[data-source-worksheet] img{width:100%;max-width:100%;max-height:none;border-radius:0}
.sentence-answer textarea{display:block;width:100%;min-height:120px;resize:vertical;padding:12px;border:2px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;line-height:1.65}
.sentence-answer textarea[rows="1"]{height:40px;min-height:40px;padding:5px 10px;line-height:1.4}
.design-callout{display:flex;align-items:center;gap:24px;padding:22px 26px;background:var(--cream);border-radius:14px;margin:24px 0 12px}
.design-callout>svg{width:60px;height:60px;flex:none;color:var(--accent)}
.design-callout h2{font-size:20px;margin:0 0 6px}.design-callout p{font-size:13px;color:var(--muted);margin:0;line-height:1.7}
.design-callout a{margin-left:auto;white-space:nowrap;color:var(--link);font-weight:700;font-size:13px;text-decoration:none}
.teacher-breadcrumb{padding-top:24px;margin-bottom:0;font-size:18px;line-height:1.5;min-height:40px;flex-wrap:wrap}
.teacher-breadcrumb button{font-size:inherit;line-height:inherit}
#unitsView>.teacher-breadcrumb{min-height:64px;margin:0;padding:16px 0;font-size:18px;line-height:1.5;flex-wrap:wrap}
#bankView>.teacher-breadcrumb{padding:16px 0 8px;margin:0;min-height:0}
.bank-heading{align-items:center;gap:32px}.bank-heading h1{font-size:44px;letter-spacing:-1.4px;margin:12px 0 14px}
#unitsView .bank-heading,#bankView .bank-heading{padding-right:300px}
#unitsView .bank-heading:after,#bankView .bank-heading:after{content:'';position:absolute;right:0;top:15px;width:270px;height:210px;background:url('assets/learning-hero.webp') center/contain no-repeat;pointer-events:none}
.bank-count{font-size:32px}.bank-count small{font-size:12px}
.unit-collection{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.unit-card{padding:24px;min-height:218px;border-radius:14px;border-color:var(--line);box-shadow:0 4px 18px #6a453508}
.unit-card h3{font-size:19px;margin-top:20px}.unit-card p,.unit-card .unit-cta{font-size:12px}.unit-card .unit-cta{margin-top:auto}
.bank-back{margin-top:20px;font-size:12px}
#bankBackToUnits{margin:0 0 20px;font-size:18px;line-height:1.4;color:var(--link)}
.bank-shell{grid-template-columns:220px minmax(0,1fr);gap:30px}
.bank-side{border-radius:14px;padding:22px;top:110px;max-height:calc(100vh - 132px)}
.bank-side h3{font-size:11px;line-height:1.6;letter-spacing:1px}
.bank-side button{min-height:40px;font-size:12px;border-radius:9px}
.bank-side-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.bank-exercise-card{border-radius:14px}.bank-exercise-head{padding:28px 30px}
.bank-exercise-head h2{font-size:23px;line-height:1.55}
.bank-practice{padding:22px 30px}.bank-practice p{line-height:1.8}
.bank-practice>h3{font-size:17px}.bank-response{min-height:110px}
.bank-checkbar button{padding:13px 20px;border-radius:9px;font-size:12px}
.exercise-type-chip{padding:7px 12px;font-size:10px}
.typed-answer-row{padding:16px;border-radius:11px}.bank-work-prompt{line-height:1.8}
.matching-board .match-choice{border-radius:11px;font-size:13px}
.bank-overview-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.bank-overview-top h2{font-size:28px;margin:0}.bank-overview-top p{font-size:13px;color:var(--muted)}
.exercise-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.exercise-overview-card{display:flex;align-items:flex-start;gap:12px;min-width:0;text-align:left;padding:18px;background:white;border:1px solid var(--line);border-radius:13px;min-height:125px}
.exercise-overview-card>b{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;background:var(--cream);font-size:12px}
.exercise-overview-card strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:13px;line-height:1.55;font-weight:600}
.exercise-overview-card small{display:block;margin-top:9px;font-size:10px;line-height:1.5;color:var(--muted)}
.exercise-overview-card:hover{border-color:var(--accent);background:var(--cream)}
.bank-overview-book{display:grid;gap:15px;font-size:14px;line-height:1.6}.bank-overview-book img{width:100%;height:200px;object-fit:contain}
.bank-overview-book a{font-size:12px;text-decoration:none;color:var(--link)}
.bank-exercise-overview-link{display:block;margin-top:18px;text-align:center;font-size:12px;color:var(--link);text-decoration:none}
.lessons-heading{align-items:center;gap:30px}.lessons-heading h1{font-size:44px;margin:8px 0 12px}
.lessons-heading>.primary{flex:none;padding:15px 23px;border-radius:12px;font-size:13px}
.lesson-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.lesson-card.book-card{display:grid;min-height:0;overflow:visible;font-weight:400}
.lesson-card .book-body h2{margin:0 0 8px}
.lesson-card .book-body p{display:block;margin:0 0 14px;-webkit-line-clamp:unset}
.lesson-card .book-open{display:flex;align-items:center;justify-content:center;padding:13px 16px;line-height:1.3}
.lesson-card.book-card:hover{background:var(--card-surface)}
@media(max-width:1000px){.lesson-grid{grid-template-columns:1fr}}
.lesson-panel{padding:28px;border-radius:14px}.lesson-panel h2{font-size:21px}.lesson-panel>p{font-size:13px;line-height:1.8}
.lesson-form-field span{font-size:12px}.lesson-form-field input,.lesson-form-field textarea,.lesson-picker select{font-size:14px;padding:13px 16px;border-radius:10px}
.lesson-editor-grid{gap:26px;grid-template-columns:minmax(0,1.65fr) minmax(290px,.8fr)}
.lesson-preview-top,.student-lesson-hero{border-radius:14px;padding:32px;background:var(--cream)}
.lesson-preview-top h2{font-size:30px;margin:10px 0}.student-lesson-hero h1{font-size:36px}
.lesson-preview-exercises{display:grid;gap:13px}.lesson-preview-exercise{border-radius:11px}
.student-account-profile{padding:28px;border-radius:14px}
#studentProfileCard .student-account-details{margin:0;padding-top:0;border-top:0}
.student-account-avatar{font-size:30px}
.student-account-identity>div:last-child{min-width:0}
.student-account-identity h2{font-size:30px;line-height:1.3;overflow-wrap:anywhere}
.student-account-identity p{font-size:16px;line-height:1.6;margin-bottom:0}
@media(max-width:600px){.student-account-avatar{font-size:26px}.student-account-identity h2{font-size:26px}.student-account-identity p{font-size:15px}}
.student-lesson-grid{gap:22px}.student-lesson-launch{display:flex;flex-direction:column;align-items:flex-start;min-height:230px}
.student-lesson-launch:hover{background:var(--card-surface);border:0}
.student-lesson-launch h3{font-size:25px;font-weight:800;line-height:1.4;margin:10px 0 8px}
.student-lesson-launch p{font-size:15px;line-height:1.65;margin-bottom:14px}
.student-lesson-launch .lesson-chip{margin-top:auto;margin-bottom:18px}
.student-lesson-launch .lesson-open{display:flex;width:100%;max-width:270px;flex-shrink:0;align-items:center;justify-content:center;min-height:47px;margin-top:0;padding:13px 16px;border:1px solid var(--accent);border-radius:12px;background:var(--accent);color:var(--accent-ink);font-size:18px;line-height:1.3;font-weight:400;box-shadow:2px 3px 4px -1px var(--card-shadow)}
@media(max-width:1200px){.student-lesson-card{padding:20px}.student-lesson-launch h3{font-size:22px}}
@media(max-width:1000px){.student-lesson-launch h3{font-size:26px}}
@media(max-width:480px){.student-lesson-card{padding:17px}.student-lesson-launch h3{font-size:20px}.student-lesson-launch p{font-size:13px}.student-lesson-launch .lesson-open{font-size:16px;min-height:40px;padding:10px}}
.student-account-heading h1,.profile-heading h1{font-size:44px}.student-account-details{gap:28px}
.student-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:start}
.student-profile{background:var(--card-surface);border:0;border-radius:14px;box-shadow:3px 4px 5px -2px var(--workbook-shadow);min-width:0;padding:26px}
.student-show-lessons{display:block;width:100%;margin-top:22px;padding:11px 14px;border:1px solid var(--line);border-radius:10px;background:var(--cream);color:var(--ink);font-size:14px;text-align:center}
.student-show-lessons:hover{background:var(--peach)}
#studentLessonsReview>.student-lesson-hero{margin:20px 0 28px}
body[data-account-role="teacher"][data-screen="student"] .header-links{display:flex!important}
body[data-account-role="teacher"][data-screen="student"] .teacher-footer-note{display:inline}
body[data-account-role="teacher"][data-screen="student"] .student-footer-note{display:none}
.student-profile-top{display:flex;flex-wrap:wrap;gap:14px;align-items:center}.student-profile-top>div{min-width:0}
.student-profile .student-tags{width:100%;display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.student-profile .student-email{overflow-wrap:anywhere;white-space:normal;font-size:11px}
.student-profile details{margin:24px 0 0;padding-top:18px;border-top:1px solid var(--line)}
.student-profile dl{grid-template-columns:1fr;gap:16px}.student-profile dd{font-size:13px;line-height:1.8}
.student-avatar,.student-account-avatar,.profile-avatar{border-radius:50%;background:var(--peach)}
.profile-heading{margin-top:0;text-align:left}.profile-shell{max-width:960px;margin:0 auto 50px}
.profile-card{padding:36px;border-radius:16px}.profile-card-head h2{font-size:27px}
.profile-details{gap:18px}.profile-details>div{padding:20px;border-radius:11px}.profile-details dd,.profile-goal{font-size:14px}
body[data-screen="login"] main{max-width:none;padding:0}
.auth-shell{grid-template-columns:minmax(0,1.1fr) minmax(400px,.9fr);min-height:calc(100vh - 88px)}
.auth-story{position:relative;min-height:700px;padding:64px clamp(32px,5vw,90px);background:var(--cream);overflow:hidden}
.auth-story:after{content:'';display:block;height:260px;width:min(95%,500px);background:url('assets/learning-hero.webp') center/contain no-repeat;order:1}
#loginView .auth-story{justify-content:center;gap:32px}
.login-quote{order:0;margin:0;max-width:620px;color:var(--ink)}
.login-quote blockquote{margin:0;padding:0;border:0}
#loginView .auth-story .login-quote-text{font-family:var(--font-heading);font-size:clamp(24px,2.3vw,36px);font-weight:600;line-height:1.4;letter-spacing:-.3px;color:var(--ink);margin:0}
.login-quote figcaption{margin-top:18px;color:var(--muted);font-size:16px;line-height:1.5}
@media(max-width:760px){#loginView .auth-story{gap:22px}#loginView .auth-story:after{position:static;width:min(100%,360px);height:180px;opacity:1}#loginView .auth-story .login-quote-text{font-size:25px}.login-quote figcaption{font-size:15px}}
.auth-story>div:first-child{order:0}.auth-story-note{order:2;margin-top:26px}
.auth-story h1{font-size:clamp(42px,4vw,64px);letter-spacing:-2px;line-height:1.1;max-width:620px}
.auth-story p{font-size:16px;line-height:1.8}.auth-panel{padding:56px clamp(28px,5vw,80px)}
.auth-card{max-width:460px;width:100%}.auth-card h2{font-size:36px}.auth-card>p{font-size:14px}
.auth-field span{font-size:12px}.auth-field input{height:52px;border-radius:10px;font-size:14px}
#loginForm .auth-field input{border-width:2px}
.auth-submit{height:51px;border-radius:11px;font-size:14px}.auth-signup{font-size:13px}
#loginView .auth-signup button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:44px;padding:11px 20px;border:2px solid var(--line);border-radius:10px;background:var(--cream);color:var(--ink);font:600 15px var(--font-text);box-shadow:1px 2px 3px -1px var(--card-shadow)}
#loginView .auth-signup button:hover{background:var(--peach);color:var(--ink)}
/* Sign-in keeps readable colors while the button moves under a press. */
/* Missing-word feedback covers a whole sentence only after its gaps are checked. */
.typed-exercise[data-exercise-type="insert-words"] :is(.typed-answer-row.correct,.inline-passage-row:has(.inline-gap-answer.correct):not(:has(.inline-gap-answer:not(.correct)))){background:var(--correct-surface);border-color:var(--correct-line);color:var(--correct-ink)}
.typed-exercise[data-exercise-type="insert-words"] :is(.typed-answer-row.wrong,.inline-passage-row:has(.inline-gap-answer.wrong)){background:var(--wrong-surface);border-color:var(--wrong-line);color:var(--wrong-ink)}
.typed-exercise[data-exercise-type="insert-words"] :is(.typed-answer-row.correct,.inline-passage-row:has(.inline-gap-answer.correct):not(:has(.inline-gap-answer:not(.correct)))) :is(.inline-exercise-sentence,.compiled-sentence){color:var(--correct-ink)}
.typed-exercise[data-exercise-type="insert-words"] :is(.typed-answer-row.wrong,.inline-passage-row:has(.inline-gap-answer.wrong)) :is(.inline-exercise-sentence,.compiled-sentence){color:var(--wrong-ink)}
#loginForm .auth-submit,#loginForm .auth-submit:hover,#loginForm .auth-submit:active{background:var(--accent);color:var(--accent-ink);transition:transform 120ms ease-out}
#loginForm .auth-submit:active:not(:disabled){transform:translate(2px,2px)}
@media(prefers-reduced-motion:reduce){#loginForm .auth-submit{transition:none}}
.welcome-shell{max-width:1000px;padding-top:46px}.welcome-shell .editorial-head h1{font-size:48px}
.role-grid{gap:28px}.role-card{border-radius:16px;padding:34px;border:1px solid var(--line);min-height:320px}
.role-card h2{font-size:28px}.role-card p{font-size:14px}.role-mark{border-radius:14px}
.signup-form{border-radius:15px;padding:32px}.signup-form h2{font-size:30px}
.studio-select-trigger,.studio-dropdown-menu,.notification-panel,.field-comment-dialog{border-radius:11px}
.notification-panel{top:96px;right:var(--page-gutter)}
footer{margin-top:54px;padding:28px 0;font-size:12px;line-height:1.8;color:var(--muted)}
@media(min-width:1550px){.exercise-overview-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1200px){.unit-collection{grid-template-columns:repeat(3,minmax(0,1fr))}.book-card{gap:16px;padding:20px;grid-template-columns:130px minmax(0,1fr)}.book-cover>img{height:210px}.book-body h2{font-size:18px}.design-hero{grid-template-columns:minmax(0,1.8fr) minmax(220px,1fr)}.design-hero h1{font-size:39px}.student-list{grid-template-columns:repeat(2,minmax(0,1fr))}.lesson-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.exercise-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){.topbar{gap:18px}.brand{font-size:32px}.brand-mark{width:44px;height:44px}.header-links button{font-size:12px}html[lang] .header-links{gap:18px}.header-actions{gap:8px}.header-actions .role-pill{display:none}.library-grid{grid-template-columns:1fr}.book-card{grid-template-columns:160px minmax(0,1fr)}.book-cover>img{height:225px}.book-body h2{font-size:22px}.design-hero p{font-size:15px}.design-callout{gap:18px}.design-callout a{white-space:normal}.bank-shell{grid-template-columns:185px minmax(0,1fr);gap:20px}.bank-side{padding:15px}.bank-practice{padding:20px}.bank-exercise-head{padding:24px}.bank-heading h1{font-size:38px}.unit-collection{grid-template-columns:repeat(2,minmax(0,1fr))}.lesson-editor-grid{grid-template-columns:minmax(0,1.4fr) minmax(250px,1fr)}}
@media(max-width:760px){header{height:auto;min-height:76px}.topbar{flex-wrap:wrap;padding-top:15px;padding-bottom:10px;gap:8px 18px}.header-links{display:flex;order:3;width:100%;justify-content:space-between}.header-links button{font-size:12px;padding:10px 0}.header-actions{margin-left:auto}html[lang] .header-links{gap:12px;flex-wrap:wrap}.design-hero{grid-template-columns:minmax(0,1fr);gap:4px;padding:28px 0;min-height:0}.design-hero-art{height:160px;max-width:360px;justify-self:center}.design-hero h1{font-size:34px}.design-hero p{font-size:14px}.library-heading,.bank-heading,.lessons-heading,.student-account-heading,.profile-heading{padding:30px 0;min-height:0;margin-bottom:28px}.library-heading h1,.bank-heading h1,.lessons-heading h1,.student-account-heading h1,.profile-heading h1{font-size:34px}.bank-heading p,.lessons-heading p,.library-heading p{font-size:14px}.bank-shell{grid-template-columns:1fr}.bank-side{position:static;max-height:none;padding:16px}.bank-side-grid{grid-template-columns:repeat(auto-fit,minmax(40px,1fr))}.bank-overview-book{grid-template-columns:75px minmax(0,1fr);align-items:center}.bank-overview-book img{height:100px;grid-row:span 2}.bank-overview-book a{grid-column:2}.bank-side button{min-height:36px}.bank-heading{margin-top:0}.bank-back{margin-top:14px}#unitsView .bank-heading,#bankView .bank-heading{padding-right:160px}#unitsView .bank-heading:after,#bankView .bank-heading:after{width:150px;height:160px}.bank-count{display:none}.bank-overview-top h2{font-size:25px}.student-list,.lesson-grid,.lesson-editor-grid{grid-template-columns:1fr}.lessons-heading{align-items:flex-start;flex-wrap:wrap}.lessons-heading>.primary{padding:12px 18px}.design-callout{flex-wrap:wrap;padding:22px}.design-callout>svg{width:40px;height:40px}.design-callout>div{flex:1;min-width:180px}.design-callout a{margin-left:0}.auth-shell{grid-template-columns:1fr}.auth-story{min-height:0;padding:35px var(--page-gutter)}.auth-story h1{font-size:42px}.auth-story:after{height:160px;position:absolute;width:190px;right:12px;bottom:10px;opacity:.4;z-index:0}.auth-story>div{position:relative;z-index:1}.auth-story p{font-size:14px;max-width:420px}.auth-story-note{margin-top:28px}.auth-panel{padding:36px var(--page-gutter)}.auth-card{max-width:540px}.profile-card{padding:26px}.profile-details{grid-template-columns:1fr 1fr}.welcome-shell{padding-top:30px}.welcome-shell .editorial-head h1{font-size:38px}footer{padding-bottom:40px}.bottomnav{display:none!important}}
@media(max-width:480px){.book-card{grid-template-columns:105px minmax(0,1fr);gap:15px;padding:17px}.book-cover>img{height:180px}.book-body h2{font-size:17px}.book-body p{font-size:11px;margin-bottom:8px}.book-tags{margin:10px 0;gap:5px}.book-tags span{padding:6px 8px;font-size:10px}.book-meta{margin-bottom:12px}.book-meta span{font-size:10px}.book-body .book-open{font-size:11px;padding:10px;min-height:40px}.book-body .collection-added{font-size:10px}.catalog-toolbar .catalog-search{flex-basis:100%}.catalog-search button{padding:12px;font-size:12px}.catalog-languages button{padding:11px 15px;font-size:12px}.collection-heading h2{font-size:26px}.collection-heading{align-items:center}.library-browse{padding:11px;font-size:11px}.unit-collection{grid-template-columns:1fr}.unit-card{min-height:170px}.exercise-overview-grid{grid-template-columns:1fr}.exercise-overview-card{min-height:95px}.profile-details{grid-template-columns:1fr}#unitsView .bank-heading,#bankView .bank-heading{padding-right:0}#unitsView .bank-heading:after,#bankView .bank-heading:after{display:none}.header-links button{font-size:11px}.profile-button,.notification-button,.theme-toggle{width:31px;height:31px}.language-switch button{padding:6px}.bank-practice{padding:16px}.bank-exercise-head{padding:20px}.bank-exercise-head h2{font-size:20px}.design-callout h2{font-size:18px}.profile-card-head{align-items:flex-start}.profile-card-head h2{font-size:23px}.student-profile{padding:22px}}


/* Shared type scale for Materials and My workbooks. */
:is(#storageView,#libraryView,#lessonsView) .book-body h2{font-size:25px}
:is(#storageView,#libraryView,#lessonsView) .book-body p{font-size:15px}
:is(#storageView,#libraryView,#lessonsView) .book-tags span,:is(#storageView,#libraryView,#lessonsView) .book-meta span{font-size:14px}
:is(#storageView,#libraryView,#lessonsView) .book-body .collection-added{font-size:13px}
:is(#storageView,#libraryView,#lessonsView) .book-body .book-open{font-size:18px;font-weight:400}
@media(max-width:1200px){:is(#storageView,#libraryView,#lessonsView) .book-body h2{font-size:22px}}
@media(max-width:1000px){:is(#storageView,#libraryView,#lessonsView) .book-body h2{font-size:26px}}
@media(max-width:480px){
 :is(#storageView,#libraryView,#lessonsView) .book-body h2{font-size:20px}
 :is(#storageView,#libraryView,#lessonsView) .book-body p{font-size:13px}
 :is(#storageView,#libraryView,#lessonsView) .book-tags span,:is(#storageView,#libraryView,#lessonsView) .book-meta span{font-size:12px}
 :is(#storageView,#libraryView,#lessonsView) .book-body .collection-added{font-size:12px}
 :is(#storageView,#libraryView,#lessonsView) .book-body .book-open{font-size:16px}
}

/* Materials search: stronger outlines and palette brown button text. */
#libraryView .catalog-search input,#libraryView .catalog-search button,#storageView .catalog-search input,#storageView .catalog-search button{border-width:2px}
#storageView .catalog-search button{color:var(--muted)}

/* Account preferences reuse the existing language and theme controls. */
.profile-settings{margin:28px 0;padding:22px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.profile-settings h3{margin:0 0 12px;font-size:23px;line-height:1.3}
.profile-setting-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:10px 0;color:var(--ink);font-size:15px}
.profile-settings .language-switch{padding:4px;border-radius:10px}
.profile-settings .language-switch button{padding:8px 15px;font-size:14px}
.profile-settings .theme-toggle{width:44px;height:44px}
@media(max-width:480px){.profile-settings{margin:22px 0;padding:18px 0}.profile-setting-row{font-size:14px}}

/* Header navigation grows on hover without a filled background or layout shift. */
.header-links button{background:transparent;transform-origin:center;transition:transform 180ms ease}
.header-links button:hover,.header-links button:focus-visible{background:transparent}
.header-links button:focus-visible{transform:scale(1.1)}
@media(hover:hover){.header-links button:hover{transform:scale(1.1)}}
@media(prefers-reduced-motion:reduce){.header-links button{transition:none}}

/* Collection actions: open the workbook or remove it with the trash control. */
.book-card-actions{display:flex;align-items:stretch;gap:10px;width:100%;max-width:324px;margin-top:auto}
.book-body .book-card-actions .book-open{flex:1;min-width:0;margin-top:0}
.book-body .collection-remove{display:grid;place-items:center;flex:0 0 44px;min-height:44px;margin:0;padding:10px;border:1px solid var(--peach);border-radius:11px;background:var(--peach);color:var(--ink);text-decoration:none;cursor:pointer}
.collection-remove svg{width:21px;height:21px;pointer-events:none}
.book-body .collection-remove:hover{background:var(--sand);border-color:var(--accent)}
.book-body .collection-remove:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.book-body .collection-remove:disabled{opacity:.5;cursor:default}
@media(max-width:480px){.book-card-actions{flex-wrap:wrap;gap:8px}.book-body .book-card-actions .book-open{flex:1 1 140px}.book-body .collection-remove{margin-left:auto}}

/* Persistent student rosters and personal account IDs. */
.add-student-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:20px 0 14px}
.add-student-form label{display:grid;gap:8px;flex:1 1 280px;max-width:460px;color:var(--muted);font-size:14px}
.add-student-form input{width:100%;min-width:0;height:48px;padding:10px 14px;border:2px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);font-size:16px;letter-spacing:.08em}
.add-student-form button{min-height:48px;padding:12px 22px;font-size:16px;font-weight:400}
.students-status{min-height:24px;margin:0 0 18px;color:var(--muted);font-size:14px;line-height:1.6}
.students-status[data-error="true"]{font-weight:600}
.students-empty{grid-column:1/-1;padding:28px;border:1px solid var(--line);border-radius:12px;color:var(--muted);font-size:15px}
.student-personal-id{user-select:all;overflow-wrap:anywhere;letter-spacing:.06em;font-size:15px}
.profile-details .profile-student-id{grid-column:1/-1}
.profile-student-id p{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
@media(max-width:480px){.add-student-form label{max-width:none;flex-basis:100%}.add-student-form button{width:100%}.student-personal-id{font-size:14px}}

/* Compact copy control beside the student's personal ID. */
.profile-details .student-id-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.copy-id-button{display:grid;place-items:center;flex:none;width:34px;height:34px;padding:6px;border:0;border-radius:7px;background:transparent;color:var(--muted);cursor:pointer}
.copy-id-button svg{width:20px;height:20px;pointer-events:none}
.copy-id-button:hover{background:var(--paper);color:var(--accent)}
.copy-id-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.copy-id-button:disabled{opacity:.5;cursor:default}
.copy-id-status{color:var(--muted);font-size:13px;letter-spacing:normal}

/* Larger, readable typography across the teacher's My students page. */
#studentsView .eyebrow{font-size:13px}
#studentsView .library-heading h1{font-size:48px}
#studentsView .library-heading p{font-size:18px}
#studentsView .section-top h2{font-size:30px}
#studentsView .add-student-form label{font-size:16px}
#studentsView .add-student-form input,#studentsView .add-student-form button{font-size:18px}
#studentsView .students-subtitle{font-size:15px}
#studentsView .students-status{font-size:16px}
#studentsView .students-empty{font-size:17px}
#studentsView .student-avatar{font-size:20px}
#studentsView .student-name{font-size:22px;line-height:1.35}
#studentsView .student-email{font-size:15px;line-height:1.6}
#studentsView .student-tags span{font-size:14px;line-height:1.5}
#studentsView .student-profile summary{font-size:16px;line-height:1.5}
#studentsView .student-profile dt{font-size:12px;line-height:1.5}
#studentsView .student-profile dd{font-size:16px;line-height:1.7}
@media(max-width:760px){#studentsView .library-heading h1{font-size:38px}#studentsView .section-top h2{font-size:28px}}
@media(max-width:480px){#studentsView .library-heading h1{font-size:36px}#studentsView .student-name{font-size:21px}}

/* Student search stays on the left; adding by ID lives in a compact dialog. */
.students-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:20px 0 22px}
.student-search{flex:1;max-width:480px;margin:0}
.student-search label{display:grid;gap:8px;color:var(--muted);font-size:16px}
.student-search input{width:100%;height:48px;padding:10px 14px;border:2px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);font-size:18px;min-width:0}
#openAddStudentButton{flex:none;min-height:48px;padding:12px 24px;font-size:18px;font-weight:400}
.add-student-dialog{width:min(460px,calc(100% - 32px));max-height:calc(100vh - 40px);padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);box-shadow:0 12px 32px var(--card-shadow);overflow:auto}
.add-student-dialog::backdrop{background:var(--card-shadow);backdrop-filter:blur(2px)}
.student-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.student-dialog-heading h2{margin:0;font-size:28px;line-height:1.3}
.student-dialog-close{display:grid;place-items:center;width:36px;height:36px;flex:none;padding:7px;border:0;background:transparent;color:var(--muted);border-radius:8px}
.student-dialog-close svg{width:20px;height:20px}
.add-student-dialog .students-subtitle{margin:0 0 18px}
.add-student-dialog .add-student-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0}
.add-student-dialog .add-student-form label{grid-column:1/-1;max-width:none}
.add-student-dialog .students-status{margin:14px 0 0;min-height:0}
.dialog-cancel{background:transparent;color:var(--muted)}
/* Selected navigation uses a cream pill; hover enlargement remains shared. */
.header-links button{font-size:18px;padding:12px 14px;border-radius:10px}
.header-links button.selected,.header-links button.selected:hover,.header-links button.selected:focus-visible{background:var(--cream);box-shadow:none;color:var(--muted)}
.student-header-nav{display:none}
body[data-account-role="student"] .student-header-nav{display:flex;align-items:center}
.student-header-nav button{min-height:44px;padding:12px 14px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-size:18px;font-weight:500}
.student-header-nav button.selected,.student-header-nav button:hover{background:var(--cream);box-shadow:none}
@media(max-width:760px){.student-header-nav{order:3;flex-basis:100%;justify-content:center}.student-header-nav button{font-size:16px}}
@media(max-width:1200px){.header-links button{font-size:16px;padding:10px}html[lang] .header-links{gap:12px}}
@media(max-width:760px){.header-links button{font-size:15px;padding:10px 9px}html[lang] .header-links{gap:8px}}
@media(max-width:480px){.students-toolbar{gap:12px;flex-wrap:wrap}.student-search{flex-basis:100%;max-width:none}#openAddStudentButton{margin-left:auto}.add-student-dialog{padding:22px}.add-student-dialog .add-student-form button{width:100%}}

/* Subtle depth for workbook actions, including the removal icon. */
.book-body .book-open,.book-body .collection-remove{box-shadow:2px 3px 4px -1px var(--card-shadow)}

/* Keep the lesson return action visible above the lesson header. */
:is(#studentLessonBack,#studentLessonsReview>.lesson-back){display:inline-flex;align-items:center;min-height:44px;padding:12px 18px;margin:5px 0 20px;border:0;border-radius:10px;background:var(--cream);color:var(--ink);font-size:16px;line-height:1.3;font-weight:600;box-shadow:2px 3px 5px -1px var(--card-shadow)}
:is(#studentLessonBack,#studentLessonsReview>.lesson-back):hover{background:var(--peach)}

/* Manual review uses the same controls and field sizes as automatic exercises. */
.lesson-assigned-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.teacher-check-toggle{min-height:38px;padding:8px 12px;border:1px solid var(--review-line);background:var(--paper);color:var(--review-ink)}
.teacher-check-toggle[aria-pressed="true"],.teacher-check-toggle:hover{background:var(--review-surface)}
.teacher-check-toggle:disabled{opacity:.45;cursor:default}
.teacher-check-label{display:inline-block;padding:7px 10px;border-radius:8px;background:var(--review-surface);color:var(--review-ink);font-size:13px}
.teacher-check-field{display:inline-flex;align-items:baseline;gap:6px;max-width:100%;vertical-align:baseline;border-radius:7px}
.teacher-check-field:has(.drawing-surface){display:flex;width:100%;align-items:flex-start}
.teacher-mark-buttons{display:inline-flex;flex:none;align-items:center;gap:3px}
.teacher-mark-buttons button{display:grid;place-items:center;flex:none;width:27px;height:27px;min-height:27px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-size:18px;line-height:1}
.teacher-mark-buttons [data-teacher-mark="correct"][aria-pressed="true"]{background:var(--correct-surface);color:var(--correct-ink);border-color:var(--correct-line)}
.teacher-mark-buttons [data-teacher-mark="wrong"][aria-pressed="true"]{background:var(--wrong-surface);color:var(--wrong-ink);border-color:var(--wrong-line)}
.teacher-mark-buttons button:disabled{opacity:.4;cursor:default}
[data-teacher-check] [data-teacher-result="pending"],[data-teacher-check] [data-teacher-result="pending"] input,[data-teacher-check] [data-teacher-result="pending"] textarea,[data-teacher-check] [data-teacher-result="pending"] [aria-pressed="true"]{background:var(--review-surface);border-color:var(--review-line);color:var(--review-ink)}
[data-teacher-check] [data-teacher-result="correct"],[data-teacher-check] [data-teacher-result="correct"] input,[data-teacher-check] [data-teacher-result="correct"] [aria-pressed="true"]{background:var(--correct-surface);border-color:var(--correct-line);color:var(--correct-ink)}
[data-teacher-check] [data-teacher-result="wrong"],[data-teacher-check] [data-teacher-result="wrong"] input,[data-teacher-check] [data-teacher-result="wrong"] [aria-pressed="true"]{background:var(--wrong-surface);border-color:var(--wrong-line);color:var(--wrong-ink)}
[data-teacher-check] .bank-answer-row[data-teacher-row-result="pending"]{background:var(--review-surface);border-color:var(--review-line)}
[data-teacher-check] .bank-answer-row[data-teacher-row-result="correct"]{background:var(--correct-surface);border-color:var(--correct-line)}
[data-teacher-check] .bank-answer-row[data-teacher-row-result="wrong"]{background:var(--wrong-surface);border-color:var(--wrong-line)}
[data-teacher-check] input:disabled{opacity:1}
[data-teacher-check] .matching-board .match-choice.is-paired,[data-teacher-check] .matching-board .match-right-choice.has-connections,[data-teacher-check] .matching-board .match-left-row.is-paired>.match-choice{background:var(--review-surface);border-color:var(--review-line);color:var(--review-ink)}
[data-teacher-check] .matching-board .match-left-row[data-teacher-row-result="correct"] .match-choice{background:var(--correct-surface);border-color:var(--correct-line);color:var(--correct-ink)}
[data-teacher-check] .matching-board .match-left-row[data-teacher-row-result="wrong"] .match-choice{background:var(--wrong-surface);border-color:var(--wrong-line);color:var(--wrong-ink)}
[data-teacher-check] [data-match-connections] path{stroke:var(--review-line)}
[data-teacher-check] .teacher-mark-buttons button{color:var(--ink);background:var(--paper)}
.teacher-hidden-field-label{padding:6px;font-size:12px}
@media(max-width:600px){.lesson-assigned-row,.lesson-candidate-controls{flex-wrap:wrap}.lesson-assigned-actions,.lesson-candidate-controls .teacher-check-toggle{width:100%}.teacher-mark-buttons button{width:30px;height:30px;min-height:30px}}

/* Native Espresso tables and source crossword cues reuse shared controls. */
.matching-board[data-moving-match-lines] .match-left-row.is-paired::after{display:none}
[data-original-layout] .typed-cross-cell input[data-cross-color="blue"]{background:var(--source-crossword-blue);border-color:var(--source-crossword-blue-line);color:var(--source-crossword-blue-ink)}
.typed-exercise:has(.exercise-table-wrap) .exercise-table th{width:auto}
.typed-exercise:has(.exercise-table-wrap) .exercise-table .inline-passage-row{padding:0;border:0;background:transparent}

/* All word/phrase fields use answer-based sizing; sentence writing stays wide. */
.image-field-scroll{overflow-x:auto}
.image-field-stage{position:relative;width:100%;min-width:760px}
.image-field-stage>img{display:block;width:100%;height:auto}
.image-field-slot{position:absolute;transform:translate(-50%,-50%)}
.image-field-slot .inline-passage-row{display:block;padding:0;border:0;background:transparent}
.image-field-slot .inline-gap-answer{margin:0}

.typed-cross-empty{border:1px solid var(--line);background:var(--paper);box-sizing:border-box}

.typed-exercise :is(.compiled-input-slot,.inline-gap-answer)[data-fit-placeholder]{width:calc(max(var(--answer-field-width,0px),var(--hint-field-width)) + var(--field-comment-space,0px))!important;min-width:0;max-width:100%}
.typed-exercise input[data-fit-placeholder]{width:max(var(--answer-field-width,0px),var(--hint-field-width))!important;min-width:0;max-width:100%}
.typed-exercise :is(.compiled-input-slot,.inline-gap-answer)[data-answer-size]:not([data-fit-placeholder]):has(.field-comment-button){width:calc(var(--answer-field-width) + var(--field-comment-space,46px))}
.teacher-check-field>:is(.compiled-input-slot,.inline-gap-answer){flex-shrink:0}
.compiled-answer-row .typed-answer-main{grid-template-columns:minmax(0,1fr)}
.compiled-answer-row .compiled-sentence{min-width:0;max-width:100%}
.compiled-answer-row .compiled-option-set{box-sizing:border-box;max-width:calc(100% - 8px)}
.exercise-subtitle{font-size:17px;font-weight:600;line-height:1.6;margin:0 0 8px}
.exercise-picture-readable{width:100%;max-width:100%;flex:1 1 100%}
.exercise-picture-readable img{display:block;width:100%;max-width:100%!important;height:auto;max-height:none!important;object-fit:contain}
.exercise-infobox{margin:20px 0}
.exercise-picture-infobox{width:100%;margin:0;max-width:100%}
.exercise-picture-infobox img{display:block;max-width:100%;width:auto;height:auto;max-height:none}
.typed-exercise .matching-board .match-choice input[data-match-text].typed-field-correct{background:var(--correct-surface);border-color:var(--correct-line);color:var(--correct-ink)}
.typed-exercise .matching-board .match-choice input[data-match-text].typed-field-wrong{background:var(--wrong-surface);border-color:var(--wrong-line);color:var(--wrong-ink)}
.typed-exercise [data-source-line="dashed"] input{border-style:dashed;border-width:2px}
.typed-exercise [data-source-line="thick"] input{border-style:solid;border-width:3px}
.typed-exercise .individual-choice-answer{display:block;border:0!important;padding:0;background:transparent!important}
.individual-choice-answer .option-groups{display:block}
.individual-choice-answer .option-set{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(58px,auto));grid-auto-flow:column;gap:12px;padding:0;background:transparent}
.typed-exercise .individual-choice-answer .option-set button{width:100%;min-height:58px;padding:14px 18px 14px 40px;border:2px solid var(--line);background:var(--paper);color:var(--ink);text-align:left;font-size:14px;line-height:1.5}
.typed-exercise .individual-choice-answer .option-set button[data-choice-result="correct"][aria-pressed="true"]{background:var(--correct-surface);border-color:var(--correct-line);color:var(--correct-ink)}
.typed-exercise .individual-choice-answer .option-set button[data-choice-result="wrong"][aria-pressed="true"]{background:var(--wrong-surface);border-color:var(--wrong-line);color:var(--wrong-ink)}
@media(max-width:600px){.individual-choice-answer .option-set{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-auto-flow:row}}
@media(min-width:801px){#loginView .auth-shell{grid-template-columns:minmax(400px,.9fr) minmax(0,1.1fr)}}
#lessonCreateButton{min-height:58px;padding:16px 28px;border-radius:18px;font-size:18px;font-weight:600;box-shadow:2px 4px 7px var(--card-shadow)}
@media(max-width:480px){#lessonCreateButton{min-height:52px;padding:14px 22px;border-radius:16px;font-size:16px}}
.image-field-slot .inline-gap-answer .answer-progress-line{position:absolute;left:calc(100% + 4px);top:8px;width:70px}
.image-field-slot .bank-field-feedback{position:absolute;left:calc(100% + 4px);top:25px;width:130px}

/* Espresso table rows close around row headers as well as ordinary data cells. */
.typed-exercise[data-native-reviewed] .exercise-table tbody>tr>th{border-top:2px solid var(--line);border-bottom:2px solid var(--line)}
.typed-exercise[data-native-reviewed] .exercise-table tbody>tr>:first-child{border-left:2px solid var(--line);border-top-left-radius:10px;border-bottom-left-radius:10px}

/* Example copy uses the full box width; source example numbers stay visible. */
.typed-exercise .exercise-example-row{background:var(--example-surface)}
.typed-exercise .exercise-example-row.example-without-label{grid-template-columns:minmax(0,1fr)}

/* Inline picture clues stay beside their gaps within a continuous source passage. */
.typed-exercise .inline-gap-picture{display:inline-block;vertical-align:middle;margin:3px 7px 3px 0}
.typed-exercise .inline-gap-picture .exercise-picture{display:inline-block;margin:0;vertical-align:middle}
.typed-exercise .inline-gap-picture .exercise-picture img{display:block;width:auto;height:72px;max-width:100px;object-fit:contain}

/* Omission choices stay neutral; the row still shows its checked result. */
.typed-exercise :is(.option-set,.compiled-option-set) button[data-neutral-choice][aria-pressed]:not([data-teacher-check="true"] button){background:var(--paper);border-color:var(--line);color:var(--ink)}
.typed-exercise button[data-omission-choice]{font-weight:800}
.typed-exercise button[data-neutral-choice][aria-pressed="true"]{font-weight:800}

/* The dragged piece occupies its insertion slot while its neighbours slide aside. */
.typed-exercise [data-reorder-widget] button:hover{transform:none}
.typed-exercise [data-reorder-widget] .is-reordering,.typed-exercise [data-order-bank-widget] .is-reordering{opacity:.35;cursor:grabbing;pointer-events:none}
.typed-exercise [data-reorder-widget] button,.typed-exercise [data-order-bank-widget] button{touch-action:manipulation}

/* Shared matching lists can link reusable items across two or three columns. */
.matching-lists-board{grid-template-columns:repeat(var(--match-list-count),minmax(0,1fr));gap:clamp(24px,4vw,54px);align-items:start}
.matching-lists-board .matching-column{min-width:0;gap:12px}
.matching-lists-board .match-choice{grid-template-columns:minmax(0,1fr);height:auto;min-height:52px;overflow-wrap:anywhere;text-align:left}
.matching-lists-board .match-choice[aria-pressed="true"]{outline:2px solid var(--accent);outline-offset:2px;background:var(--cream)}
.matching-lists-board .matching-connections{color:var(--link)}
.matching-lists-board .matching-connections .is-example{stroke-dasharray:4 4;opacity:.65}
.matching-lists-board .matching-connections .is-pending{stroke-width:3}
.matching-lists-board[data-adjacent-lists] .matching-column{position:relative;display:block}
.matching-lists-board[data-adjacent-lists] .match-choice{position:absolute;left:0;width:100%;margin:0}
.typed-exercise .matching-board.matching-lists-board[data-adjacent-lists] .match-choice[data-chain-result="correct"]{opacity:1;background:var(--correct-surface);border-color:var(--correct-line);color:var(--correct-ink)}
.typed-exercise .matching-board.matching-lists-board[data-adjacent-lists] .match-choice[data-chain-result="pending"]{opacity:1;background:var(--review-surface);border-color:var(--review-line);color:var(--review-ink)}
.typed-exercise .matching-board.matching-lists-board[data-adjacent-lists] .match-choice.is-rejected:disabled{opacity:1;background:var(--wrong-surface);border-color:var(--wrong-line);color:var(--wrong-ink)}
#unitsView>.bank-heading{margin-top:0}
.list-match-answers{display:grid;gap:10px;margin-top:18px}
.list-match-answer[data-empty-response="true"]{display:none}
.list-match-responses{display:grid;gap:6px;white-space:pre-line}
.list-match-responses>div{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}
.list-match-remove{flex:none;min-width:30px;min-height:30px;padding:4px 8px;border:1px solid var(--line);background:var(--paper);color:var(--ink);font-size:18px}
.list-match-remove:disabled{opacity:.45;cursor:default}

/* Classification keeps the printed examples inside two generous drop areas. */
.category-word-bank{align-items:start;min-height:58px}
.typed-exercise .category-token{display:grid;grid-template-columns:minmax(0,1fr);box-sizing:border-box;gap:4px;width:auto;max-width:100%;padding:6px;border:2px solid var(--line);border-radius:9px;background:var(--paper)}
.category-token .typed-answer-main{gap:4px}
.category-token .teacher-check-field{flex-wrap:wrap}
.category-token [data-category-word]{padding:8px 12px;border:0;background:transparent;color:var(--ink);font-size:14px;cursor:grab}
.category-token [data-category-word][aria-pressed="true"]{outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px}
.category-token [data-category-word]:disabled{cursor:default;opacity:1}
.category-token .bank-field-feedback{grid-column:1/-1;min-height:0;padding:0}
.category-token .answer-progress-line{margin:0;font-size:10px}
.category-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.category-group{min-width:0}
.category-group h3{font-size:16px;line-height:1.5;margin:0 0 10px}
.category-dropzone{display:flex;flex-wrap:wrap;align-content:flex-start;align-items:start;gap:10px;min-height:210px;padding:16px;border:2px dashed var(--line);border-radius:12px;background:var(--card-surface)}
.category-example{flex:0 0 100%;font-size:16px;padding-bottom:8px}
.category-dropzone.is-drop-target,.category-word-bank.is-drop-target{outline:2px solid var(--accent);outline-offset:2px;background:var(--cream)}
.category-dropzone:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:600px){.matching-lists-board{gap:18px}.matching-lists-board .match-choice{font-size:11px;padding:8px 6px;min-height:64px}.matching-lists-board .matching-column{gap:10px}.category-groups{gap:12px}.category-dropzone{padding:10px;min-height:220px}.category-group h3{font-size:13px}.category-token [data-category-word]{padding:6px;font-size:12px}}

/* Email account actions */
body[data-screen="authAction"] :is(.header-links,.header-right,footer,.bottomnav){display:none!important}
.auth-action-shell{max-width:620px;margin:0 auto;padding:56px 24px}
.auth-action-shell .auth-card{max-width:none}
.auth-action-shell h1{font-size:34px;margin:12px 0 18px}
.auth-action-shell .auth-card>p{font-size:16px;line-height:1.7;color:var(--muted)}
.auth-action-shell .auth-form{margin-top:28px}
.auth-action-status{font-size:15px;line-height:1.7;color:var(--ink)}
.auth-back-link{display:inline-block;margin-top:24px;color:var(--link);font-size:15px}
.auth-recovery-links{display:flex;gap:14px;flex-wrap:wrap;margin:18px 0;font-size:14px}
.auth-recovery-links a,.email-preview a{color:var(--link)}
.email-preview{margin-top:24px;padding:18px;border:2px solid var(--line);border-radius:12px;background:var(--cream);font-size:14px;line-height:1.6}
@media(max-width:480px){.auth-action-shell{padding:32px 0}.auth-action-shell h1{font-size:28px}}
/* Yandex ID uses the provider's neutral brand button; never send credentials from the client. */
[data-yandex-ui][hidden]{display:none!important}
.yandex-auth-entry{margin:22px 0 12px}
button.yandex-sign-in{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:44px;padding:10px 24px;border:0;border-radius:8px;background:var(--yandex-button);color:var(--yandex-button-ink);font:500 16px/24px Arial,sans-serif;cursor:pointer;box-shadow:none}
button.yandex-sign-in:hover{background:var(--yandex-button);color:var(--yandex-button-ink);filter:brightness(.9)}
button.yandex-sign-in:disabled{cursor:not-allowed;opacity:.5}
.yandex-sign-in svg{flex:0 0 24px}
.yandex-unavailable{font-size:13px;line-height:1.5;color:var(--muted);margin:10px 0 0}
.auth-method-divider{display:flex;align-items:center;gap:12px;margin:18px 0;color:var(--muted);font-size:13px}
.auth-method-divider::before,.auth-method-divider::after{content:"";height:1px;background:var(--line);flex:1}
.yandex-welcome{max-width:420px;margin:0 auto 28px}
.profile-yandex{margin:24px 0;padding:24px 0;border-top:1px solid var(--line)}
.profile-yandex p{color:var(--muted);font-size:14px;line-height:1.5}
#yandexConnect{width:auto;min-height:44px;padding:10px 18px}
.yandex-link-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);box-shadow:0 12px 48px var(--card-shadow)}
.yandex-link-dialog::backdrop{background:var(--modal-overlay)}
.yandex-link-dialog h2{margin:0;font-size:26px}
.yandex-link-dialog p{line-height:1.5}
#yandexSignupCard .auth-back-link{display:inline-block;margin-top:24px}
#yandexSignupEmail{overflow-wrap:anywhere;color:var(--muted)}
/* A correct infinitive opens an ordinary answer field; only wrong choices stay red chips. */
.typed-exercise .word-transform-slot{position:relative;display:inline-flex;align-items:center;vertical-align:middle;height:38px;min-height:38px;max-height:none;border:0;background:transparent;padding:0;line-height:normal}
.typed-exercise .word-transform-slot input[data-transform-answer]{box-sizing:border-box;height:38px;min-height:38px;margin:0;padding:7px 9px;line-height:1.3}
.typed-exercise .word-transform-slot[data-transform-ready="false"] input[data-transform-answer]{visibility:hidden}
.typed-exercise .word-transform-slot>[data-word-slot-button],
.typed-exercise .word-transform-slot>[data-compiled-word]{position:absolute;top:0;left:0;width:var(--answer-field-width);max-width:100%;height:38px;min-height:38px;box-sizing:border-box;border:2px dashed var(--line);border-radius:7px;background:var(--cream);color:var(--ink);font:inherit;padding:4px 8px}
.typed-exercise .word-transform-slot>[data-compiled-word].is-wrong{border-style:solid;border-color:var(--wrong-line);background:var(--wrong-surface);color:var(--wrong-ink)}
.typed-exercise .word-transform-slot>[data-compiled-word][hidden]{display:none!important}
.typed-exercise .word-transform-slot input[data-transform-answer]:not(.typed-field-correct):not(.typed-field-wrong){background:var(--cream);color:var(--ink);border-color:var(--line)}
.typed-exercise .word-transform-slot input[data-transform-answer]::placeholder{font-style:italic;color:var(--muted);opacity:.5}
.typed-exercise .word-transform-slot>.field-question-control{display:flex;align-items:center;width:100%;min-width:0}

/* Fragments use unrounded character widths and touch their printed word parts. */
.typed-exercise .word-fragment-group{display:inline-flex;flex-direction:column;align-items:flex-start;vertical-align:baseline;max-width:100%;line-height:inherit}
.typed-exercise .word-fragment-text{display:inline-block;white-space:nowrap;line-height:inherit;max-width:100%}
.typed-exercise .word-fragment-text .teacher-check-field{gap:0;margin:0;padding:0}
.typed-exercise [data-partial-word][data-answer-size]{box-sizing:border-box;width:calc(var(--answer-field-width) + 8px)!important;min-width:0;max-width:100%;margin-left:0;margin-right:0}
.typed-exercise :is(.compiled-input-slot,.inline-gap-answer)[data-partial-word] input{box-sizing:border-box;width:100%!important;min-width:0;max-width:100%;padding-left:2px;padding-right:2px;border-width:2px;font:inherit}
.typed-exercise .word-fragment-tools{display:flex;flex-wrap:wrap;gap:5px;white-space:normal;line-height:1.2}
.typed-exercise .word-fragment-tools:empty{display:none}
.typed-exercise .word-fragment-tools .field-comment-button{margin:0}
.typed-exercise .compiled-input-slot.is-wide[data-answer-size]{display:flex;width:100%!important;max-width:100%;margin:8px 0}
.typed-exercise .compiled-input-slot.is-wide input{width:100%!important;min-width:0;max-width:100%}

.typed-exercise .compiled-input-slot>input[data-answer-size],.typed-exercise .inline-gap-controls>input[data-answer-size]{width:100%;min-width:0;max-width:100%}

/* Separate personal-writing sections retain their own visible answer numbers. */
.exercise-numbered-group{margin-top:14px;padding:0;border:0;background:transparent}
.exercise-numbered-group>h3{font-size:17px;line-height:1.5;margin-bottom:14px}
.exercise-numbered-group-answers{display:grid;gap:12px}

/* Inline choice sentences keep compact spacing while allowing natural wrapping. */
.typed-exercise .typed-answer-row:is(.inline-choice-row,.type-choose-option){padding:8px 12px;row-gap:0;align-items:center}
.typed-exercise .typed-answer-row:is(.inline-choice-row,.type-choose-option) .typed-answer-main{gap:4px}
.typed-exercise .inline-choice-row .compiled-sentence{line-height:1.6}
.typed-exercise .inline-choice-row .compiled-option-set{margin:2px 4px;padding:2px;line-height:1.35}
.typed-exercise .inline-choice-row .compiled-option-set button{min-height:34px;padding:6px 10px}
.typed-exercise .typed-answer-row:is(.inline-choice-row,.type-choose-option)>.bank-field-feedback:empty{display:none}
/* Source classification tables reuse the shared single-choice controls. */
.typed-exercise .option-table{min-width:620px;border-collapse:collapse;border-spacing:0}
.typed-exercise .option-table :is(th,td){border:2px solid var(--line);border-radius:0;padding:10px;vertical-align:middle}
.typed-exercise .option-table thead th{font-size:12px;line-height:1.4;text-align:center;overflow-wrap:anywhere}
.typed-exercise .option-table thead th:first-child{width:44%}
.typed-exercise .option-table thead th:not(:first-child){width:14%}
.typed-exercise .option-table tbody th{font-size:14px;font-weight:400;line-height:1.5}
.typed-exercise .option-table td{text-align:center}
.choice-table-prompt{display:flex;align-items:flex-start;gap:8px}
.choice-table-prompt .bank-work-number{flex:none}
.typed-exercise .choice-table-checkbox{display:inline-grid;place-items:center;box-sizing:border-box;width:32px;height:32px;min-height:32px;padding:0;border:2px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-size:21px;line-height:1}
.choice-table-checkbox .choice-table-tick{visibility:hidden}
.choice-table-checkbox[aria-pressed="true"] .choice-table-tick{visibility:visible}
.typed-exercise .choice-table-checkbox[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.typed-exercise .choice-table-row.correct .choice-table-checkbox[aria-pressed="true"],.typed-exercise .choice-table-row[data-teacher-row-result="correct"] .choice-table-checkbox[aria-pressed="true"]{background:var(--correct-surface);border-color:var(--correct-line);color:var(--correct-ink)}
.typed-exercise .choice-table-row.wrong .choice-table-checkbox[aria-pressed="true"],.typed-exercise .choice-table-row[data-teacher-row-result="wrong"] .choice-table-checkbox[aria-pressed="true"]{background:var(--wrong-surface);border-color:var(--wrong-line);color:var(--wrong-ink)}
.typed-exercise .choice-table-row[data-teacher-row-result="pending"] .choice-table-checkbox[aria-pressed="true"]{background:var(--review-surface);border-color:var(--review-line);color:var(--review-ink)}
.choice-table-row .bank-field-feedback:empty{display:none}
.choice-table-row .teacher-check-field{display:flex;align-items:flex-start;flex-wrap:wrap}

/* The source reference includes its verified key without mounting answer controls. */
.bank-original-answers{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.bank-original-answers h3{margin:0 0 10px;font-size:17px;line-height:1.4}
.bank-original-answers dl{display:grid;gap:8px;margin:0}
.bank-original-answer{display:grid;grid-template-columns:minmax(28px,max-content) minmax(0,1fr);gap:8px 14px;line-height:1.6;font-size:14px}
.bank-original-answer dt{font-weight:600;overflow-wrap:anywhere}
.bank-original-answer dd{margin:0;white-space:pre-line;overflow-wrap:anywhere}
.bank-original-answers p{font-size:14px;line-height:1.6;margin:0}

/* Approved Imaginary Mauve preview: color-filter decorative art only. */
.brand-mark,.design-hero-art{filter:url("assets/brand-art-filter.svg?v=1#brand-art")}
.match-fragment-word { white-space: nowrap; }
.match-choice .match-fragment-word input { margin-inline: 0; padding-inline: 2px; vertical-align: middle; }
/* Local audio/video share the exercise container and never use answer controls. */
.exercise-resources{box-sizing:border-box;max-width:100%;margin:0 0 20px;padding:12px;border:2px solid var(--line);border-radius:12px;background:var(--card-surface);color:var(--ink)}
.exercise-resource-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;max-width:100%}
.exercise-resource{min-width:0;max-width:100%;margin:0}
.exercise-resource figcaption{margin:0 0 8px;font:600 15px/1.4 var(--font-text);color:var(--ink);overflow-wrap:anywhere}
.exercise-resource audio{display:block;width:100%;max-width:520px;min-width:0;height:42px}
.exercise-resource video{display:block;width:100%;max-width:560px;min-width:0;height:auto;border-radius:8px;background:var(--paper)}
.exercise-resources-group>summary{cursor:pointer;font:600 15px/1.5 var(--font-text)}
.exercise-resources-group[open]>summary{margin-bottom:16px}
