@font-face{font-family:Poppins;font-style:normal;font-weight:400;font-display:swap;src:url('poppins-400.woff2?v=95') format('woff2')}
@font-face{font-family:Poppins;font-style:normal;font-weight:600;font-display:swap;src:url('poppins-600.woff2?v=95') format('woff2')}
@font-face{font-family:Poppins;font-style:normal;font-weight:700;font-display:swap;src:url('poppins-700.woff2?v=95') format('woff2')}
:root{color-scheme:dark;--bg:#101624;--panel:#1a2233;--line:#303b50;--muted:#aab7cb;--accent:#a9c9ff}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at top right,#22354a 0,transparent 55%),var(--bg);color:#f4f7fc;font:16px/1.6 system-ui,sans-serif;min-height:100vh}header,main,footer{max-width:1180px;margin:auto;padding:26px 32px}header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.brand{display:flex;gap:14px;align-items:center;text-decoration:none;color:inherit;font-size:30px;font-weight:800}.brand>span{font-size:20px}.brand small{display:block;font-size:10px;letter-spacing:2px;color:var(--muted)}h1{font-size:clamp(30px,4vw,52px);line-height:1.17;letter-spacing:-1px;margin:16px 0}h2{font-size:23px;margin:0 0 12px}p{color:var(--muted)}.eyebrow{color:var(--accent);font-size:12px;letter-spacing:2px;font-weight:700}.login{display:grid;grid-template-columns:1.2fr 1fr;gap:70px;align-items:center;padding:70px 0}.card{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:28px;box-shadow:0 16px 45px #0002}label{display:block;font-size:14px;color:var(--muted);margin:16px 0}input,select{display:block;width:100%;border:1px solid var(--line);background:var(--bg);padding:13px;border-radius:10px;color:inherit;font:inherit;margin-top:8px}button,.join{cursor:pointer;border:1px solid var(--line);background:var(--panel);color:#edf3ff;border-radius:10px;padding:11px 18px;font:inherit;text-decoration:none;display:inline-block}button:hover,.join:hover{background:#2b3950}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}button:disabled{opacity:.5;cursor:wait}.primary,.join{background:#b9d4ff;color:#152038;border:0;font-weight:650}.primary{width:100%;margin-top:18px}nav{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0 32px}nav [aria-current=page]{background:#b9d4ff;color:#152038}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.heading select{min-width:200px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:24px}.metric strong{display:block;font-size:30px}.metric small,.muted{color:var(--muted)}.row{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:20px 0;border-bottom:1px solid var(--line)}.row:last-child{border:0}.row h3{margin:0;font-size:18px}.row p{margin:4px 0;font-size:14px}.pill{font-size:12px;border-radius:20px;padding:4px 10px;background:#284538;color:#b7ebce;display:inline-block}.note{white-space:pre-wrap;overflow-wrap:anywhere}.empty{padding:36px;text-align:center;border:1px dashed var(--line);border-radius:16px;color:var(--muted)}footer{font-size:12px;color:var(--muted)}#status{min-height:26px;color:var(--accent)}[hidden]{display:none!important}@media(max-width:700px){header,main,footer{padding:20px}.login{grid-template-columns:1fr;gap:28px;padding:30px 0}.metrics{grid-template-columns:1fr}.heading,.row{align-items:flex-start;flex-direction:column}.heading label{width:100%}.card{padding:22px}nav button{font-size:14px;padding:10px 14px}}

.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.feed{display:grid;gap:20px}.post h2{margin-top:10px}.post a,.booking-host>a{color:var(--accent);overflow-wrap:anywhere}.payment,.latest{margin:22px 0}.booking-host{margin-top:24px}.booking-frame{width:100%;height:760px;border:0;border-radius:12px;background:var(--panel)}#pdfDialog{width:min(1100px,96vw);max-width:96vw;height:92vh;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:inherit;padding:20px}#pdfDialog::backdrop{background:#000a}.pdf-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:16px}.pdf-toolbar h2{flex:1;margin:0}#pdfFrame{width:100%;height:calc(100% - 125px);border:0;background:#fff}@media(max-width:700px){.booking-frame{height:850px}#pdfDialog{padding:12px}.pdf-toolbar{gap:8px}.pdf-toolbar h2{flex-basis:100%}.actions button,.actions a{font-size:14px}}

.cal-mount{width:100%;min-height:640px;margin-top:18px;overflow:auto}.booking-host>.join{margin-bottom:14px}@media(max-width:700px){.cal-mount{min-height:750px}}

.material-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:16px;margin-top:20px}.material-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--bg)}.material-card img{display:block;width:100%;height:250px;object-fit:contain;background:#111927;padding:8px}.material-caption{padding:14px}.material-caption strong{display:block;overflow-wrap:anywhere;font-size:15px}.material-caption small{color:var(--muted)}.file-icon{min-height:88px;display:grid;place-items:center;color:var(--accent);font-size:24px;font-weight:700}.material-card button{font-size:13px;padding:8px 12px}.row>div{min-width:0}.post .material-grid{max-width:100%}.image-unavailable{font-size:14px;color:var(--muted)}

/* GrammarGenius website identity: local logo, purple gradient and gold. */
:root{--bg:#202020;--panel:#292929;--line:#45404a;--muted:#c6c0ca;--accent:#ecb658}
body{background:radial-gradient(ellipse at top right,#3d244b 0,transparent 58%),var(--bg);font-family:Poppins,system-ui,sans-serif}
.brand{gap:24px}.brand img{display:block;width:168px;height:119px;object-fit:contain}.brand>span{font-size:11px;letter-spacing:2px;color:var(--accent);border-left:1px solid var(--line);padding-left:24px}
header{padding-top:10px;padding-bottom:10px}h1{font-weight:700}.login h1{max-width:580px}.card{box-shadow:0 14px 42px #0002;border-color:#46404a}
button,.join{color:#fff}.primary,.join,nav [aria-current=page]{background:linear-gradient(69deg,#8742b2,#8d21c0);color:#fff}
.primary:hover,.join:hover,nav [aria-current=page]:hover{background:linear-gradient(69deg,#9d4bcf,#a22ed7)}button:hover{background:#3b3241}input,select{color:#f6f3f7}.pill{background:#3b3043;color:#e8c2ff}
.metric strong{color:var(--accent)}.metric{border-top:3px solid #b840f9}.material-card img{background:#222}.section-count{display:inline-block;vertical-align:middle;margin-left:10px;background:#43334c;color:#ecd2fa;padding:3px 10px;border-radius:99px;font-size:14px}.lesson-sections{display:grid;gap:24px}.lesson-sections .row{align-items:flex-start}.row>div:first-child{flex:1}
@media(max-width:700px){.brand{gap:14px}.brand img{width:126px;height:89px}.brand>span{padding-left:14px;font-size:9px}.lesson-sections .row{gap:12px}}

.lesson-actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;max-width:220px}.lesson-actions .danger{color:#ffb8c4;border-color:#754653}.lesson-actions small{font-size:12px}.lesson-sections>p{margin:0}.lesson-sections .row{display:flex}.lesson-sections{gap:18px}#lessonActionDialog{width:min(550px,92vw);border:1px solid var(--line);border-radius:20px;padding:28px;background:var(--panel);color:#fff}#lessonActionDialog::backdrop{background:#0009}@media(max-width:700px){.lesson-actions{flex-direction:row;flex-wrap:wrap;max-width:none;width:100%}.lesson-actions>*{flex:1;min-width:130px;text-align:center}}

/* Allow flex and grid children to shrink to the viewport rather than their text. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
header,main,footer{width:100%;min-width:0}
.brand,.heading>*,.metrics>*,.card,.row>*,.feed>*{min-width:0}
img,iframe{max-width:100%}
input,select{min-width:0;max-width:100%}
h1,h2,h3,p,.empty,#status{overflow-wrap:anywhere}
.heading select{min-width:0;width:100%}.heading label{flex:0 1 240px}
.brand{flex:0 1 auto}.brand>span{white-space:normal}#logout{flex:0 0 auto;white-space:nowrap}
button,.join{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.cal-mount{min-width:0;max-width:100%}

@media(max-width:700px){
 header,main,footer{padding-left:16px;padding-right:16px}
 header{gap:12px;min-height:88px}
 .brand{gap:10px}.brand img{width:104px;height:74px;flex:0 0 104px}
 .brand>span{padding-left:10px;font-size:9px;letter-spacing:1px;max-width:90px}
 #logout{padding:10px 12px;font-size:13px;min-height:44px}
 main{padding-top:24px}
 h1{font-size:32px;line-height:1.2;letter-spacing:-.6px}h2{font-size:20px}
 .heading{gap:8px}.heading p{font-size:14px;margin:10px 0}
 .heading label{flex:none;width:100%;margin:12px 0 0}
 input,select{font-size:16px;min-height:48px}
 nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:22px 0 24px}
 nav button{min-width:0;min-height:48px;width:100%;font-size:13px;padding:10px 8px;line-height:1.4}
 .metrics{grid-template-columns:minmax(0,1fr);gap:12px;margin-bottom:20px}
 .card{padding:20px;border-radius:16px}.metric{display:flex;align-items:center;justify-content:space-between;gap:16px}
 .metric small{font-size:13px}.metric strong{font-size:28px;overflow-wrap:anywhere}
 .row{width:100%;gap:14px;padding:18px 0}.row>div{width:100%}.row h3{font-size:16px}
 .lesson-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .lesson-actions>*{min-width:0;min-height:44px;font-size:13px;padding:10px 8px}
 .lesson-actions .join,.lesson-actions small{grid-column:1/-1}
 .lesson-actions small{padding:0;text-align:left;min-height:0}
 .actions{gap:8px}.actions>*{min-width:0;min-height:44px}
 .material-grid{grid-template-columns:minmax(0,1fr)}.material-card img{height:220px}
 .empty{padding:24px 16px}.login{gap:24px;padding:12px 0}
 #lessonActionDialog{padding:20px;max-width:calc(100vw - 24px)}
 #pdfDialog{max-width:calc(100vw - 16px);height:90vh;height:90dvh}
 .pdf-toolbar>*{max-width:100%}.pdf-toolbar h2{overflow-wrap:anywhere}
 footer{padding-bottom:max(24px,env(safe-area-inset-bottom));font-size:11px}
}
@media(max-width:359px){
 .brand>span{display:none}.brand img{width:96px;flex-basis:96px;height:68px}
 .card{padding:16px}.lesson-actions{grid-template-columns:minmax(0,1fr)}
}

.invoice-state{display:inline-flex;align-items:center;gap:6px;line-height:1.5;white-space:nowrap}.invoice-state.paid{background:#173e2e;color:#b1f0ce;border:1px solid #347854}.invoice-state.paid>span{font-weight:700;font-size:16px}

.header-tools{display:flex;align-items:center;gap:16px;min-width:0}.language-choice{margin:0;font-size:12px}.language-choice select{width:140px;min-height:44px;padding:8px 12px;margin-top:4px;font-size:14px}.next-lesson-link{color:inherit;text-decoration:none;display:inline-block;border-radius:6px}.next-lesson-link:hover{color:var(--accent);text-decoration:underline}.next-lesson-link>span{color:var(--accent)}.invoice-state.awaiting{background:#46371d;color:#ffe0a0;border:1px solid #786032}.invoice-state.overdue{background:#4b2530;color:#ffd0d7;border:1px solid #955065}
@media(max-width:700px){header{flex-wrap:wrap;gap:8px}.header-tools{flex:1 1 100%;justify-content:space-between;gap:12px;padding-bottom:8px}.language-choice{display:flex;align-items:center;gap:10px}.language-choice select{margin:0;width:140px;font-size:16px}.brand>span{max-width:none}}

/* The account controls share label and input baselines. */
header{flex-wrap:wrap;gap:18px}.header-tools{align-items:flex-end;gap:14px;flex-wrap:wrap}.language-choice,.student-choice{margin:0;font-size:12px;flex:0 1 auto}.header-tools select{min-height:48px;margin-top:6px;padding:10px 12px;font-size:14px}.student-choice select{width:190px;max-width:240px}.header-tools #logout{height:48px;min-height:48px;padding:10px 18px}
@media(max-width:700px){.header-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) auto;width:100%;align-items:end;gap:8px}.language-choice{display:block}.header-tools select{width:100%;max-width:100%;font-size:16px;padding:10px 8px}.header-tools #logout{padding:10px;font-size:13px}.student-choice{min-width:0}.header-tools:has(.student-choice[hidden]){grid-template-columns:minmax(0,1fr) auto}}
@media(max-width:359px){.header-tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.header-tools #logout{grid-column:1/-1;width:100%}}

/* Modal chrome never overlaps the embedded content. Only the body scrolls. */
html{background:var(--bg);scrollbar-gutter:stable}
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden}
html,body,dialog,.lesson-action-body{scrollbar-color:#77707e var(--panel);scrollbar-width:thin}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:var(--panel)}
::-webkit-scrollbar-thumb{background:#77707e;border:2px solid var(--panel);border-radius:10px}
#lessonActionDialog{width:min(1100px,calc(100vw - 32px));max-width:calc(100vw - 32px);height:92vh;height:92dvh;max-height:92vh;max-height:92dvh;overflow:hidden;padding:0}
#lessonActionDialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.lesson-action-heading{padding:20px 24px 12px;border-bottom:1px solid var(--line);background:var(--panel);min-width:0}
.lesson-action-heading h2{margin-bottom:8px}.lesson-action-heading p{margin:6px 0}
.lesson-action-body{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:0 24px 16px;scrollbar-gutter:stable}
#lessonActionHost{min-height:420px;width:100%;margin-top:12px;overflow:visible}
.lesson-action-mount{width:100%;min-height:420px}
#lessonActionStatus{font-size:14px;color:var(--accent)}
#lessonActionDialog>.actions{position:static;background:var(--panel);padding:14px 24px;margin:0;border-top:1px solid var(--line);justify-content:flex-end}
#lessonActionDialog>.actions button{min-height:44px}
/* The PDF toolbar and help text also have separate rows, outside the preview. */
#pdfDialog{overflow:hidden;height:92vh;height:92dvh;padding:20px}
#pdfDialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px}
#pdfDialog .pdf-toolbar{margin:0}#pdfDialog>p{margin:0;font-size:13px}
#pdfFrame{display:block;width:100%;height:100%;min-height:0}
.booking-frame{display:block}.cal-mount{overflow:visible}
@media(max-width:700px){
 #lessonActionDialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:94vh;height:94dvh;max-height:94vh;max-height:94dvh}
 .lesson-action-heading{padding:14px 16px 10px}.lesson-action-heading h2{font-size:18px}.lesson-action-heading p{font-size:13px}
 .lesson-action-body{padding:0 12px 12px}
 #lessonActionDialog>.actions{padding:12px 16px}
 #lessonActionHost,.lesson-action-mount{min-height:560px}
 #pdfDialog{padding:12px;height:94vh;height:94dvh}
}

.auth-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.auth-actions button{font-size:13px;min-height:44px}
