@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600;650;700;750;800&family=Varela+Round&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');
:root{--navy:#102331;--deep:#0b1a27;--blue:#0067b9;--gold:#e4bc7c;--ivory:#f7f5f0;--paper:#fffefa;--ink:#172936;--muted:#52616b;--line:#e3ded4;--green:#245e51;--serif:Georgia,'Times New Roman',serif;--sans:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}*{box-sizing:border-box}body{margin:0;font:15px/1.55 var(--sans);color:var(--ink);background:var(--ivory)}a{color:inherit;text-decoration:none}button,select,input,textarea{font:inherit}button,select{cursor:pointer}button{color:inherit}button:disabled{cursor:default;opacity:.5}img{max-width:100%;display:block}h1,h2,h3,p{margin:0}h1,h2,h3{line-height:1.1}h1,h2{font:400 clamp(36px,5vw,64px)/1.03 var(--serif);letter-spacing:-.045em}h3{font:400 27px/1.15 var(--serif);letter-spacing:-.025em}p{color:var(--muted)}:focus-visible{outline:3px solid #188edf;outline-offset:4px}.wrap{width:min(1296px,calc(100% - 112px));margin:auto}.skip{position:fixed;top:-80px;left:20px;z-index:100;background:white;padding:10px}.skip:focus{top:12px}.ico{width:22px;height:22px;flex:none;vertical-align:middle}.eyebrow{display:flex;gap:9px;align-items:center;letter-spacing:.15em;text-transform:uppercase;font-weight:750;font-size:11px;color:#78603d}.eyebrow .ico{width:17px;height:17px}.btn{display:inline-flex;justify-content:center;align-items:center;gap:10px;padding:12px 17px;border:1px solid transparent;border-radius:7px;font-weight:700;font-size:13px;min-height:44px;text-align:center}.btn .ico{width:17px;height:17px}.gold{background:var(--gold);color:#17232c}.gold:hover{background:#f0cc91}.primary{background:var(--navy);color:white}.primary:hover{background:#224455}.ghost{border-color:var(--line);background:transparent}.ghost:hover{background:#ece9e0}.darkghost{border-color:#766b56;background:transparent;color:#fff7e8}.darkghost:hover{background:#253746}.textlink{display:inline-flex;gap:7px;align-items:center;font-size:13px;font-weight:700;color:#255e82}.textlink:hover{text-decoration:underline}.header{background:var(--deep);color:#f5f0e7;border-bottom:1px solid #6e614c}.head{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:25px}.brand{display:inline-flex;align-items:center;gap:13px;line-height:1.05;flex:none}.brand img{width:48px;height:48px;object-fit:cover;border-radius:8px;background:white}.brand strong{font:400 19px/1.06 var(--serif);color:#fff6e5}.brand small{display:block;margin-top:6px;font-size:8px;letter-spacing:.18em;text-transform:uppercase;color:#d7b780;font-weight:700}.main-nav,.head-actions{display:flex;align-items:center;gap:26px}.main-nav a{font-size:13px;color:#e2e1dd}.main-nav a:hover{color:var(--gold)}.head-actions{gap:14px}.language{border:1px solid var(--line);border-radius:7px;padding:8px;background:var(--paper);color:var(--ink);font-size:12px;font-weight:750}.header .language{color:#f7f3e9;background:var(--deep);border-color:#4b5963}.hero{position:relative;overflow:hidden;color:#fff8e9;background:var(--deep);isolation:isolate}.hero:before{content:'';position:absolute;inset:0 0 0 35%;z-index:-2;background:url('./assets/delegates.webp') 63% 52%/cover}.hero:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0b1a27 0%,#0b1a27 29%,#0b1a27f5 36%,#0b1a27a8 48%,#0b1a2710 72%),linear-gradient(0deg,#0b1a2780,transparent 40%)}.hero-inner{display:flex;align-items:center;min-height:575px;padding:62px 0 70px}.hero-copy{max-width:670px}.hero .eyebrow,.dark .eyebrow{color:var(--gold)}.hero h1{font-size:clamp(46px,5.5vw,85px);margin:22px 0 20px}.hero h1 em,.dark em{color:var(--gold);font-weight:400}.hero p{max-width:425px;color:#dbdedb;font-size:16px;line-height:1.65}.actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:27px}.meta{font-weight:700;color:#d0ba95;font-size:10px;letter-spacing:.14em;text-transform:uppercase;margin-top:29px}.hero-caption{position:absolute;right:24px;bottom:16px;color:#fff6df;font-size:10px;text-shadow:0 1px 2px black}.section{padding:59px 0}.section h2{margin:10px 0 10px}.intro{max-width:610px}.path-grid,.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:27px}.path-card{display:block;padding:22px 24px 24px;border:1px solid var(--line);background:var(--paper);border-radius:12px;transition:border-color .15s,transform .15s}.path-card:hover{border-color:#baa278;transform:translateY(-3px)}.step{display:flex;align-items:center;justify-content:space-between;color:#7d643d;margin-bottom:19px;font-size:11px;font-weight:800;letter-spacing:.1em}.step .ico{width:25px;height:25px}.path-card p,.card p{margin:9px 0 15px}.section-alt{background:#eeeae1;border-block:1px solid var(--line)}.feature{display:grid;grid-template-columns:1.18fr 1fr;gap:24px;align-items:stretch}.feature .card{padding:25px}.footer{padding:35px 0;background:var(--deep);color:#f5e8ce}.foot{display:flex;gap:24px;flex-wrap:wrap;justify-content:space-between;align-items:center}.footer p{color:#b8c1c6;font-size:12px;max-width:380px}.footer a:not(.brand){font-size:13px;font-weight:700}.shell{display:grid;grid-template-columns:242px minmax(0,1fr);min-height:100vh}.side{background:var(--deep);color:#dae0e4;padding:22px 15px;display:flex;flex-direction:column;gap:22px;position:sticky;top:0;height:100dvh;overflow:auto}.side .brand{margin:0 7px}.side .brand img{width:43px;height:43px}.side .brand strong{font-size:16px}.nav-group{display:grid;gap:4px}.nav-label{color:#a6b4bd;font-size:9px;font-weight:800;letter-spacing:.16em;padding:6px 10px;text-transform:uppercase}.navitem{display:flex;align-items:center;gap:10px;font-size:13px;line-height:1.25;padding:11px 10px;border-radius:7px;min-height:40px}.navitem .ico{width:17px;height:17px}.navitem:hover{background:#213748}.navitem.active{background:#233c4f;color:#ffe1a9;box-shadow:inset 2px 0 var(--gold)}.side-note{margin-top:auto;border-top:1px solid #314450;padding-top:13px}.topbar{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px clamp(18px,3vw,36px);border-bottom:1px solid var(--line);background:#fffefa;min-height:66px}.crumb{font-size:13px;color:var(--muted);display:flex;gap:8px;align-items:center}.top-actions{display:flex;align-items:center;gap:10px}.avatar{background:#e6eef3;color:#164f7b;display:grid;place-items:center;width:36px;height:36px;font-size:12px;font-weight:800;border-radius:50%;flex:none}.menu-toggle{display:none}.workspace{padding:27px clamp(18px,3vw,36px) 46px;max-width:1450px;margin:auto}.dashboard-banner{background:radial-gradient(ellipse at 82% 25%,#26485b,transparent 60%),var(--navy);color:#fff8eb;border-radius:13px;padding:33px;position:relative;overflow:hidden;isolation:isolate}.dashboard-banner h1{font-size:clamp(37px,4vw,59px);margin:12px 0}.dashboard-banner p{color:#d3dce0;max-width:495px}.mapart{position:absolute;z-index:-1;width:310px;right:9px;top:-41px;opacity:.48;pointer-events:none}.dashboard-cols{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(245px,1fr);gap:18px;margin-top:20px;align-items:start}.stack{display:grid;gap:15px}.card{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:21px}.card.alt{background:#f0ece2}.card h3{font-size:25px}.card h3 + p{margin-top:7px}.card .actions{margin-top:15px}.card-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:13px}.tile-icon{display:grid;place-items:center;width:37px;height:37px;border-radius:9px;background:#eee7d8;color:#785a30;flex:none}.tile-icon.blue{background:#e6f1fa;color:#12619a}.tile-icon.green{background:#e5eee9;color:#276753}.tag{display:inline-flex;border-radius:30px;padding:4px 9px;font-size:10px;font-weight:800;line-height:1.4;background:#ede8dc;color:#6a522f}.tag.blue{background:#e7f1f9;color:#1e5d87}.tag.green{background:#e5efe8;color:#285e50}.tag + .tag{margin-left:4px}.stat-row{display:grid;gap:12px;grid-template-columns:repeat(3,1fr);margin:16px 0}.stat{padding:13px;background:var(--paper);border:1px solid var(--line);border-radius:10px;display:flex;flex-wrap:wrap;align-items:center;gap:11px}.stat strong{display:block;font-size:19px;line-height:1.1}.stat small{color:var(--muted);font-size:11px}.wide-title{margin:0 0 21px}.wide-title h1{margin:8px 0;font-size:clamp(36px,4vw,56px)}.wide-title p{max-width:700px}.bar{height:7px;border-radius:12px;background:#e9e5dc;overflow:hidden;margin:12px 0}.bar span{display:block;height:100%;background:#217364}.subhead{margin:14px 0 9px;font-size:26px}.listline{padding:11px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:13px}.listline:last-child{border-bottom:0}.listline p{font-size:13px;margin:0}.reading-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:17px;align-items:start}.article{padding:clamp(18px,4vw,43px)}.article h2{font-size:clamp(28px,4vw,44px);margin:15px 0}.article p{font-size:16px;line-height:1.75;margin:15px 0;max-width:70ch}.article aside{border-left:3px solid #d3ae71;padding:13px 15px;background:#f4f0e6;color:#363d42;margin-top:22px}.pagebtn{width:100%;text-align:left;background:none;border:0;border-radius:5px;padding:7px;color:var(--muted);font-size:12px;display:flex;align-items:center;gap:6px}.pagebtn:hover,.pagebtn[aria-current=true]{background:#eee7d6;color:var(--ink)}.pagebtn span{font-weight:750;min-width:22px}.chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.chip{color:var(--ink);border:1px solid var(--line);background:var(--paper);border-radius:30px;font-weight:650;padding:8px 13px;font-size:13px}.chip[aria-pressed=true]{background:var(--navy);color:white;border-color:var(--navy)}.board-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.choice{width:100%;text-align:left;border:1px solid var(--line);background:#faf8f3;border-radius:8px;padding:12px;margin-top:8px}.choice:hover{border-color:#b39256}.choice.good{background:#e3f1e9;border-color:#50937b}.choice.bad{background:#f9eae6;border-color:#c78a7b}.feedback{margin-top:12px;padding:11px;background:#eee8d8;border-radius:7px}.phrase{font-size:20px;font-family:var(--serif)}.form{display:grid;gap:14px}.form label{display:grid;gap:4px;font-weight:680;font-size:13px}.form input,.form textarea,.form select{width:100%;border:1px solid var(--line);padding:9px;border-radius:6px;color:var(--ink);background:white}.form textarea{min-height:88px;resize:vertical}.toast{position:fixed;z-index:20;right:20px;bottom:20px;background:var(--deep);color:white;box-shadow:0 8px 30px #0003;border-radius:8px;padding:0;max-width:calc(100% - 40px)}.toast:not(:empty){padding:13px 16px}dialog{border:1px solid var(--line);border-radius:13px;padding:24px;width:min(525px,calc(100% - 35px));color:var(--ink);background:var(--paper)}dialog::backdrop{background:#0b1928ad}.modalhead{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-bottom:16px}.close,.icon-button{background:transparent;border:1px solid var(--line);border-radius:7px;width:37px;height:37px;display:inline-grid;place-items:center}.dim{color:var(--muted);font-size:13px}.emphasis{font-weight:750}.blank{padding:30px;text-align:center}
@media(max-width:1050px){.wrap{width:calc(100% - 56px)}.main-nav{gap:14px}.shell{grid-template-columns:205px minmax(0,1fr)}.side{padding-inline:11px}.dashboard-cols{grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr)}.hero-inner{min-height:530px}}
@media(max-width:800px){.main-nav{display:none}.dashboard-cols,.reading-layout,.feature{grid-template-columns:1fr}.mapart{opacity:.28}.hero:before{left:19%}.hero:after{background:linear-gradient(90deg,#0b1a27 0%,#0b1a27eb 32%,#0b1a275e 81%),linear-gradient(0deg,#0b1a2766,transparent 40%)}.path-grid{gap:10px}.path-card{padding:15px}}
@media(max-width:640px){.wrap{width:calc(100% - 32px)}.head{min-height:68px;gap:7px}.brand{gap:7px}.brand img{width:39px;height:39px}.brand strong{font-size:14px}.brand small{display:none}.head-actions{gap:5px}.header .btn{font-size:11px;padding:7px;min-height:36px}.header .btn .ico{display:none}.language{padding:6px 3px}.hero-inner{min-height:550px;align-items:flex-end;padding:56px 0 64px}.hero:before{inset:0 0 0 0;background-position:65% 25%}.hero:after{background:linear-gradient(0deg,#0b1a27 4%,#0b1a27f4 30%,#0b1a27aa 69%,#0b1a2733)}.hero h1{font-size:clamp(41px,11vw,63px)}.hero p{font-size:14px}.section{padding:40px 0}.path-grid,.grid,.board-grid{grid-template-columns:1fr}.shell{display:block}.side{position:fixed;z-index:10;width:242px;transform:translateX(-105%);transition:transform .18s}.side.open{transform:none;box-shadow:0 0 0 100vmax #0f202a7d}.menu-toggle{display:inline-grid}.crumb{font-size:11px;gap:6px}.topbar{padding:10px 14px}.workspace{padding:17px 14px 37px}.dashboard-banner{padding:22px}.stat-row{gap:6px}.stat{padding:8px;gap:4px}.stat .tile-icon{width:29px;height:29px}.stat .ico{width:16px;height:16px}.stat small{font-size:10px}.hero-caption{right:15px}.workspace .card{padding:16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.roadmap{padding:4px 0 0;margin:10px 0 0;list-style:none}.roadmap li{position:relative}.roadmap li:not(:last-child):before{content:'';position:absolute;top:46px;bottom:-19px;width:2px;left:23px;background:#ded8c9}.roadmap li.done:before{background:#609a8c}.road-node{display:grid;grid-template-columns:47px minmax(0,1fr) auto;gap:12px;align-items:center;min-height:72px;position:relative;border-radius:10px;padding:6px 8px 6px 0}.road-circle{display:grid;place-items:center;width:47px;height:47px;background:#edeae2;color:#626b71;border-radius:50%;box-shadow:0 3px #d8d4cb;border:1px solid #d8d4cb}.roadmap .next .road-circle{background:#176fac;border-color:#176fac;color:white;box-shadow:0 4px #124e7b,0 0 0 4px #c7e3f4}.roadmap .done .road-circle{background:#387767;color:white;border-color:#387767;box-shadow:0 3px #27574c}.road-copy{display:grid;gap:3px;min-width:0}.road-copy strong{line-height:1.24}.road-copy small{font-size:12px;color:var(--muted)}a.road-node:hover .road-copy strong{text-decoration:underline}.nav-dot{margin-left:auto;color:#70b9ed}.roadmap .tag{max-width:110px;white-space:normal;text-align:center}.route-card .subhead{font-size:31px;margin:9px 0}.board-grid .actions{margin-top:8px}.board-grid h3,.grid h3{overflow-wrap:anywhere}@media(max-width:420px){.road-node{grid-template-columns:43px minmax(0,1fr);gap:7px;min-height:84px}.road-node .tag{grid-column:2;justify-self:start;margin-top:-5px}.road-circle{width:40px;height:40px;grid-row:span 2}.roadmap li:not(:last-child):before{left:19px}.topbar .avatar{display:none}.brand img{width:35px;height:35px}}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.book-toolbar,.learning-toolbar,.learning-banner{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.book-toolbar{margin:14px 0 20px}
.book-scan{display:block;padding:10px;background:#eeeae1;border:1px solid var(--line);border-radius:9px}
.book-scan img{margin:auto;width:min(100%,560px);border:1px solid #cfc4ad}
.book-contents .pagebtn{margin-top:4px}
.transcript{padding:14px 0;color:var(--ink)}
.transcript summary{cursor:pointer;font-weight:700}
.word-card blockquote{font:italic 17px/1.45 var(--serif);margin:15px 0;color:var(--ink);border-left:2px solid #d2b47b;padding-left:12px}
.word-card .card-top{flex-wrap:wrap;align-items:start}
.word-translation{color:#276753;font-size:13px;font-weight:650}
.word-translation span{margin:0 4px}
.learning-toolbar input,.role-select select{border:1px solid var(--line);background:var(--paper);border-radius:7px;padding:10px;max-width:100%;color:var(--ink)}
.learning-toolbar input{width:min(100%,360px)}
.learning-banner{justify-content:space-between}
.drill,.exercise-room{max-width:860px}
.exercise-room .form,.conversation,.scorecard{margin-top:17px}
.conversation{display:grid;gap:9px}
.exchange{padding:13px;background:#edf2f6;border:1px solid #dce5eb;border-radius:8px;max-width:100%;overflow-wrap:anywhere}
.exchange.student{background:#f3efe4;border-color:#e6ddc8}
.exchange p{white-space:pre-wrap;margin:4px 0 8px}
.exchange .btn{font-size:11px;padding:5px 10px;min-height:32px}
.exercise-room .role-select{display:grid;gap:7px}
.scorecard{background:#edf3ed;padding:15px;border-radius:8px}
.scorecard ul{padding:0;list-style:none}
.scorecard li{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid #d7e1d8}
.activity-wait,.countdown{padding:12px 0}
.countdown strong{font:35px var(--serif)}
.answer-form .actions{margin-top:0}

.voice-stage{position:relative;display:flex;flex-direction:column;min-height:min(820px,calc(100dvh - 120px));color:#f1f8ff;background:radial-gradient(ellipse at 50% 35%,#183a61 0%,#142b49 33%,#101e33 78%);border-radius:24px;overflow:hidden;isolation:isolate;box-shadow:0 20px 50px #10233126}
.voice-head{display:flex;justify-content:space-between;gap:15px;padding:22px 26px;font-size:11px;letter-spacing:.12em;font-weight:700;color:#a8bbd2}
.voice-center{min-height:300px;display:grid;place-content:center;justify-items:center;gap:18px;flex:1;padding:30px}
.voice-avatar{display:grid;place-items:center;width:clamp(145px,23vw,270px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 38% 29%,#afd5ff,#599ce8 32%,#3360bc 58%,#172b66 83%);box-shadow:0 0 0 10px #759dff18,0 0 100px #518bfb65,inset 0 -8px 26px #16316088}
.voice-avatar-face{position:relative;display:flex;gap:.7em;align-items:center;justify-content:center;width:53%;aspect-ratio:1.6;border-radius:38%;background:#162e62c9;box-shadow:inset 0 1px 12px #041d5c66;font-size:clamp(11px,1.8vw,25px)}
.voice-avatar-face i{height:.55em;width:.55em;border-radius:50%;background:#c3e7ff;box-shadow:0 0 13px #7aceff}
.voice-avatar-face b{position:absolute;bottom:18%;height:.1em;width:.48em;border-radius:40%;background:#a8dbff}
.voice-stage[data-voice-state=speaking] .voice-avatar{animation:voice-pulse 1.2s infinite alternate ease-in-out}
.voice-stage[data-voice-state=speaking] .voice-avatar-face b{animation:voice-mouth .24s infinite alternate ease-in-out}
@keyframes voice-pulse{to{box-shadow:0 0 0 18px #759dff1f,0 0 125px #70a7ff9c,inset 0 -8px 26px #16316088}}
@keyframes voice-mouth{to{height:.22em}}
.voice-caption{color:#bfd7f2;font-size:13px;font-weight:700}.voice-dock{width:min(700px,100%);margin:auto auto 0;padding:12px 24px 22px;font-size:12px}
.voice-question{color:#edf5ff;text-align:center;font-size:clamp(14px,2vw,17px);line-height:1.55;margin:0 0 12px}
.voice-controls{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
.voice-stage .btn{min-height:36px;padding:7px 11px;font-size:12px}
.voice-stage .ghost{color:#e2ebff;border-color:#5b7192;background:#1b3658}
.voice-stage .ghost:hover{background:#294e7a}.voice-stage .primary{background:#8dc0ff;color:#10233e}
.voice-stage .answer-form{gap:7px;margin:11px 0 0}.voice-stage .answer-form label{color:#c5d4e6;font-size:12px}
.voice-stage .answer-form textarea{min-height:46px;max-height:90px;color:white;background:#142943;border-color:#566b88}.voice-stage .answer-form .actions{justify-content:center}
.voice-stage .dim,.voice-note,.voice-stage [data-voice-status]{text-align:center;color:#abc1db;font-size:11px;margin:0}
.voice-transcript{margin-top:8px;color:#c7d4e9}.voice-transcript summary{cursor:pointer}.voice-transcript>div{max-height:160px;overflow:auto}
.voice-transcript p{color:#e2edf9;margin:6px 0}.voice-stage audio{max-width:100%;height:30px}
@media(max-width:640px){.voice-stage{border-radius:16px;min-height:calc(100dvh - 108px)}.voice-center{min-height:235px;padding:24px}.voice-dock{padding:10px 12px 16px}.voice-head{padding:15px 12px}}
@media(prefers-reduced-motion:reduce){.voice-avatar,.voice-avatar-face b{animation:none!important}}
.page-languages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0;padding:14px 17px;border:1px solid #dbe3eb;border-radius:12px;background:#f6f9fc;font-size:12px}
.page-languages strong{display:block;color:#294767;margin-bottom:4px}.page-languages p{margin:0;color:#3e5367;line-height:1.5}
#main>.page-languages:last-child{margin-bottom:0}#main>.page-languages:first-child{margin-top:0}
.hero~.page-languages,.section-alt~.page-languages{width:min(90%,1100px);margin-inline:auto}
.mic-feedback{display:grid;justify-items:center;gap:4px}.mic-feedback meter{width:min(160px,100%);height:9px}
.mic-review{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.mic-review:empty{display:none}
@media(max-width:590px){.page-languages{grid-template-columns:1fr;gap:9px}.page-languages div+div{padding-top:7px;border-top:1px solid #dbe3eb}}

.lab-hero {
  display: grid;
  align-items: end;
  min-height: 350px;
  overflow: hidden;
  border-radius: 15px;
  padding: clamp(26px, 5vw, 64px);
  background: linear-gradient(90deg, #0b1a27 9%, #0b1a27ed 42%, #0b1a27ac 72%, #0b1a2738),
    var(--deep) url("./assets/delegates.webp") center 44% / cover no-repeat;
  color: #fff7e9;
}
.lab-hero > div { max-width: 640px; }
.lab-hero .eyebrow { color: #e8c58a; }
.lab-hero h1 { margin-block: 13px; font-size: clamp(45px, 6vw, 82px); }
.lab-hero p { max-width: 500px; color: #e1e7ea; font-size: clamp(15px, 2vw, 17px); }
.lab-directory { margin-top: 30px; }
.lab-directory h2 { margin-bottom: 12px; font-size: clamp(27px, 3vw, 36px); }
.lab-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.lab-tool {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: start;
  gap: 11px;
  min-height: 108px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.lab-tool:hover { border-color: #b49563; background: #fbf7ed; }
.lab-tool > .ico { width: 16px; height: 16px; margin-top: 6px; color: #815f30; }
.lab-tool-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: #eee7d8; color: #75552b; }
.lab-tool-icon .ico { width: 19px; height: 19px; }
.lab-tool h3 { font-size: 21px; overflow-wrap: anywhere; }
.lab-tool p { margin-top: 6px; font-size: 13px; line-height: 1.42; }
.lab-heading .textlink { font-size: 13px; }
.lab-heading h1 { margin-block: 10px; }
.lab-columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.lab-card .subhead { margin: 0 0 13px; font-size: clamp(24px, 3vw, 31px); line-height: 1.16; }
.lab-card .lab-card { margin-top: 14px; }
.lab-card .form { margin-top: 14px; }
.lab-card .form button[type="submit"] { justify-self: start; }
.lab-columns .lab-controls { margin-bottom: 12px; }
.lab-card .lab-feedback { margin-block: 12px; }
.lab-card .actions { margin-block: 14px; }
.lab-card .lab-reading { margin-block: 20px; max-width: 70ch; }
.lab-card .lab-reading p { font-size: 16px; line-height: 1.72; }
.lab-card .lab-score { font: 48px/1 var(--serif); color: var(--green); }
.lab-card .chip[aria-current="page"] { background: var(--navy); color: white; }
.lab-answers { margin-top: 8px; }
.lab-list { padding-inline-start: 23px; }
.lab-list li + li { margin-top: 8px; }
.lab-glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 0; }
.lab-glossary > div, .lab-report > div { padding: 12px; background: #f6f2e8; border-radius: 8px; }
.lab-glossary dt, .lab-report dt { font-weight: 750; }
.lab-glossary dd, .lab-report dd { margin: 4px 0 0; color: var(--muted); }
.lab-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.lab-report .bar { margin-bottom: 0; }
.lab-flashcard { display: grid; place-items: center; min-height: 155px; padding: 22px; background: #f4ecda; border-radius: 9px; text-align: center; font: 24px/1.35 var(--serif); }
.lab-entries { list-style: none; padding: 0; margin: 0; }
.lab-entries li { display: flex; justify-content: space-between; align-items: start; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.lab-entries li p { margin: 5px 0; white-space: pre-wrap; }
.lab-task, .form .lab-task { display: flex; align-items: flex-start; gap: 8px; }
.lab-task input[type="checkbox"] { width: auto; flex: none; margin-top: 4px; accent-color: var(--green); }
.lab-task input:checked + span { color: var(--green); }
.lab-phrase strong { font-size: 17px; }
.lab-phrase .btn { flex: none; }
.lab-speaking { grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); }
.lab-speaking .stack { width: 100%; min-width: 0; }
.lab-video { aspect-ratio: 16 / 9; position: relative; overflow: hidden; border-radius: 8px; background: #122733; }
.lab-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.lab-video video[hidden] { display: none; }
.lab-video-idle { display: grid; height: 100%; place-items: center; color: #a5b4bd; }
.lab-video-idle .ico { width: 42px; height: 42px; }
.lab-timer { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 4px; background: #071219d9; color: #fff; font-variant-numeric: tabular-nums; pointer-events: none; }
.lab-date { color: var(--muted); font-size: 13px; }
.lab-ai-output { white-space: pre-wrap; overflow-wrap: anywhere; }
#speech-results:empty { display: none; }
#speech-results .card + .card { margin-top: 12px; }
.writing-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.writing-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.writing-example { padding: 10px 14px; border-left: 3px solid #cfaa70; background: #f6f2e8; border-radius: 4px; }
.writing-example summary { cursor: pointer; font-weight: 700; }
.writing-example p { margin: 8px 0 1px; }
.writing-steps .chip[aria-current="step"] { background: var(--navy); color: #fff; }
.writing-cv { padding: 16px 0; overflow-wrap: anywhere; }
.writing-cv h3 { font-size: 34px; color: var(--navy); }
.writing-cv h4 { margin: 15px 0 0; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.writing-cv p { margin: 4px 0; color: var(--ink); }
.writing-cv .writing-contact { color: var(--muted); }
.writing-references li > div { min-width: 0; }
.career-lesson { border-top: 1px solid var(--line); padding: 12px 0; }
.career-lesson summary { cursor: pointer; font-weight: 750; }
.career-lesson p { margin: 7px 0 10px; }
.career-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.career-rubric { padding: 0; list-style: none; }
.career-rubric li { padding: 8px 0; border-top: 1px solid var(--line); }
.career-rubric li p { margin: 4px 0 0; }
.career-score strong { font: 34px/1 var(--serif); color: var(--green); }
.career-status-label select { margin-top: 4px; }
#career-ai-result { border-left: 3px solid #cfaa70; background: #f6f2e8; padding: 14px; border-radius: 4px; }
.diplomacy-score { margin: 9px 0; font-weight: 750; color: var(--green); }
.diplomacy-questions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.diplomacy-questions .subhead { font-size: 23px; }
.diplomacy-timer { font-size: clamp(38px, 7vw, 64px); font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; }
.diplomacy-table { margin-top: 14px; overflow-x: auto; }
.diplomacy-table table { width: 100%; border-collapse: collapse; }
.diplomacy-table th, .diplomacy-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.diplomacy-table .priority { background: #f4ecd8; }
@media (max-width: 1060px) { .diplomacy-questions { grid-template-columns: 1fr; } }
@media print {
  body:has(.writing-cv) { background: #fff; }
  body:has(.writing-cv) .shell { display: block; min-height: 0; }
  body:has(.writing-cv) :is(.side, .topbar, .lab-heading, .writing-grid > :first-child, .writing-grid > :last-child > h2, .writing-actions, #toast, #skip) { display: none; }
  body:has(.writing-cv) :is(.workspace, .writing-grid, .writing-grid > .card) { display: block; margin: 0; padding: 0; border: 0; box-shadow: none; background: #fff; }
  .writing-cv { padding: 0; }
  .writing-cv h4 { break-after: avoid; }
}
@media (max-width: 1100px) {
  .lab-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lab-columns { grid-template-columns: 1fr; }
}
@media (max-width: 570px) {
  .lab-hero { min-height: 320px; background-position: 64% center; }
  .lab-directory-grid, .lab-glossary { grid-template-columns: 1fr; }
  .lab-tool { min-height: 0; }
}

.professional-shell, .account-shell {
  --navy: #142a3b;
  --deep: #122332;
  --blue: #21587f;
  --ivory: #f3f5f7;
  --paper: #fff;
  --ink: #192b3a;
  --muted: #4d6070;
  --line: #dbe2e9;
  --green: #226454;
  --serif: var(--sans);
  background: var(--ivory);
  color: var(--ink);
}
.professional-shell {
  --navy: #152b43;
  --blue: #245882;
  --ivory: #f5f6f8;
  --ink: #172a40;
  --muted: #506276;
  --line: #dbe2ea;
  min-height: 100vh;
}
.workspace-masthead { background: #fff; border-bottom: 1px solid var(--line); }
.workspace-masthead-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 28px; width: min(1200px, calc(100% - 64px)); margin: auto; min-height: 75px; }
.workspace-masthead .brand { grid-area: 1 / 1; color: var(--ink); }
.workspace-masthead .brand strong { color: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 750; }
.workspace-masthead .brand small { color: var(--muted); }
.workspace-masthead .top-actions { grid-area: 1 / 3; }
.workspace-top-nav { grid-area: 1 / 2; display: flex; justify-content: center; align-items: center; gap: clamp(10px, 2.1vw, 30px); }
.workspace-nav-link { display: block; padding: 10px 0; font-size: 13px; white-space: nowrap; color: #445b70; }
.workspace-nav-link:hover, .workspace-nav-link[aria-current="page"], .workspace-nav-link.is-current { color: #204d73; }
.workspace-top-nav > .workspace-nav-link[aria-current="page"], .workspace-top-nav > .workspace-nav-link.is-current { box-shadow: inset 0 -2px #3e6b91; font-weight: 750; }
.workspace-resource-menu { position: relative; }
.workspace-resource-menu summary { cursor: pointer; }
.workspace-resource-popover { position: absolute; z-index: 3; top: calc(100% + 5px); right: 0; min-width: 185px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 25px #162f4620; }
.workspace-resource-popover .workspace-nav-link { padding: 8px 10px; border-radius: 4px; white-space: normal; }
.workspace-resource-popover .workspace-nav-link:hover { background: #eef3f8; }
.professional-shell .workspace { max-width: 1264px; padding: 30px 32px 56px; }
.professional-shell .workspace-detail { max-width: 1150px; }
.workspace-account-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  min-height: 36px;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}
.workspace-account-link:hover { background: #edf3f8; }
.workspace-account-link .ico { width: 16px; height: 16px; }
.workspace-account-link.signed > span:last-child { overflow: hidden; max-width: 135px; text-overflow: ellipsis; white-space: nowrap; }
.account-initials {
  display: grid;
  place-items: center;
  height: 23px;
  min-width: 23px;
  padding-inline: 2px;
  border-radius: 5px;
  background: #e4edf6;
  font-size: 11px;
}
.professional-shell :is(h1, h2, h3), .account-shell :is(h1, h2) {
  font-family: var(--sans);
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.professional-shell h1, .account-shell h1 { font-size: clamp(29px, 4vw, 44px); }
.professional-shell :is(h2, h2.subhead) { font-size: clamp(20px, 2.6vw, 27px); }
.professional-shell h3 { font-size: 18px; }
.professional-shell .wide-title { margin-bottom: 24px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.professional-shell .wide-title p { max-width: 60ch; }
.professional-shell .wide-title .eyebrow { color: var(--blue); letter-spacing: .07em; }
.professional-shell .card { border-radius: 10px; box-shadow: 0 2px 5px #172a4009; }
.professional-shell .lab-columns { gap: 18px; }
.professional-shell .lab-card { padding: clamp(17px, 3vw, 27px); }
.professional-shell .lab-card > h2 { margin-bottom: 14px; }
.professional-shell .lab-card .card { margin-top: 16px; }
.professional-shell .btn, .account-shell .btn { border-radius: 6px; }
.professional-shell .chip { border-radius: 6px; }
.professional-shell .tile-icon { background: #eaf1f7; color: var(--blue); border-radius: 6px; }
.professional-shell .road-circle { box-shadow: none; }
.professional-shell .roadmap .next .road-circle, .professional-shell .roadmap .done .road-circle { box-shadow: none; }
.professional-shell .dashboard-banner { background: var(--navy); border-radius: 9px; }
.professional-shell .mapart { opacity: .2; }
.professional-shell .feedback { background: #edf3f8; border-left: 3px solid #7391ab; }
.professional-shell :is(.writing-example, .lab-glossary > div, .lab-report > div, .lab-flashcard) { background: #eef3f7; }
.professional-shell .choice { background: #f7f9fb; }
.professional-shell .choice.good { background: #e6f2ec; }
.professional-shell .choice.bad { background: #faeee9; }
.professional-shell .form :is(input, select, textarea), .account-shell .form :is(input, select) { border-color: #c7d2dc; }
.professional-shell .form :is(input:not([type="checkbox"]), select, textarea) { min-height: 42px; }
.workspace-directory-head {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .85fr);
  gap: 14px;
}
.workspace-intro {
  padding: clamp(25px, 4vw, 43px);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(120deg, #14283e, #254b67);
}
.workspace-intro p { max-width: 43ch; margin-top: 12px; color: #e0e9f0; }
.workspace-intro .actions { margin-top: 22px; }
.workspace-progress-overview {
  padding: clamp(20px, 3vw, 28px);
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
}
.professional-shell .workspace-progress-overview h2 { font-size: 17px; }
.workspace-progress-overview dl { margin: 10px 0 13px; }
.workspace-progress-overview dl div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.workspace-progress-overview dt { font-size: 13px; color: var(--muted); }
.workspace-progress-overview dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.workspace-progress-overview dd span { color: var(--muted); font-weight: 500; }
.workspace-progress-overview .textlink { font-size: 13px; }
.workspace-catalog { margin-top: 32px; }
.workspace-catalog-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.workspace-directory-filter { width: min(100%, 320px); }
.professional-shell .workspace-directory-filter input { min-height: 40px; padding-inline: 12px; border-radius: 6px; font-weight: 500; }
.workspace-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.workspace-filters { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 15px; }
.workspace-filter { padding: 7px 12px; background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; font-weight: 650; }
.workspace-filter:hover { background: #eef3f8; }
.workspace-filter[aria-pressed="true"] { background: #e7eef6; border-color: #9cb3c9; color: #204b70; }
.workspace-results-count { margin-top: 10px; min-height: 20px; font-size: 12px; }
.workspace-group { margin: 20px 0 29px; }
.workspace-group > header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.professional-shell .workspace-group h2 { font-size: 18px; }
.workspace-group > header span { color: var(--muted); font-size: 13px; }
.workspace-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.workspace-tool-grid > li { min-width: 0; }
.professional-shell .workspace-tool {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 131px;
  height: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.professional-shell .workspace-tool:hover { background: #f9fcff; border-color: #8ba8c2; }
.workspace-tool-top { display: flex; justify-content: space-between; align-items: center; }
.workspace-tool-top > .ico { color: #55718b; width: 17px; height: 17px; }
.professional-shell .workspace-tool h3 { font-size: 15px; line-height: 1.3; letter-spacing: -.015em; overflow-wrap: anywhere; }
.workspace-tool p { margin-top: 3px; font-size: 12px; line-height: 1.45; }
.workspace-tool-icon {
  display: grid;
  place-items: center;
  height: 33px;
  width: 33px;
  border-radius: 6px;
  background: #eaf1f7;
  color: var(--blue);
}
.workspace-tool-icon .ico { width: 18px; height: 18px; }
.professional-shell [hidden] { display: none !important; }
.account-shell { min-height: 100vh; }
.account-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px;
  padding: 10px clamp(16px, 4vw, 56px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.account-top .brand, .account-top .brand strong { color: var(--ink); }
.account-top .brand small { color: var(--muted); }
.account-layout { min-height: calc(100vh - 66px); display: grid; place-items: start center; padding: clamp(28px, 8vw, 90px) 16px 32px; }
.account-card { width: min(100%, 490px); padding: clamp(20px, 4vw, 38px); background: white; border: 1px solid var(--line); border-radius: 11px; }
.account-card > p { margin: 9px 0 23px; }
.account-form .btn { width: 100%; }
.account-form #account-form-status:empty { display: none; }
.account-alternate { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); }
.account-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 16px; }
.account-info dd { margin: 0; overflow-wrap: anywhere; }
.course-chat { display: grid; gap: 12px; max-height: 410px; overflow: auto; }
.course-chat:empty { display: none; }
.course-message { max-width: 94%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fa; }
.course-message.user { justify-self: end; background: #e9f1f8; }
.course-message strong { display: block; font-size: 12px; color: var(--blue); }
.course-message p { margin: 4px 0 0; }
.course-chat + .form .actions { margin-block: 0; }
@media (max-width: 900px) {
  .workspace-directory-head { grid-template-columns: minmax(0, 1fr); }
  .workspace-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .workspace-masthead-inner { grid-template-columns: 1fr auto; width: calc(100% - 32px); padding-top: 12px; gap: 7px 10px; }
  .workspace-masthead .top-actions { grid-area: 1 / 2; }
  .workspace-top-nav { grid-area: 2 / 1 / 3 / 3; justify-content: space-between; flex-wrap: wrap; gap: 0 10px; }
  .workspace-nav-link { font-size: 12px; }
  .professional-shell .workspace { padding: 20px 16px 35px; }
}
@media (max-width: 510px) {
  .workspace-tool-grid { grid-template-columns: 1fr; }
  .professional-shell .workspace-tool { min-height: 0; }
  .workspace-account-link.signed > span:last-child { max-width: 66px; }
}
@media print {
  body:has(.writing-cv) .workspace-masthead { display: none; }
}

.theme-select { max-width: 115px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: 14px; margin: 14px 0 24px; }
.library-resource { display: flex; flex-direction: column; gap: 10px; }
.library-resource p { margin: 0; }
.library-resource .actions { margin-top: auto; }
.chip[aria-current="page"] { border-color: currentColor; font-weight: 800; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .top-actions { flex-wrap: wrap; }
}
@media screen {
  @scope (html[data-theme="dark"]) {
    :scope {
      color-scheme: dark;
      --deep: #0a1420;
      --navy: #224563;
      --ivory: #101d2a;
      --paper: #172838;
      --ink: #eef5fb;
      --muted: #b6c8d7;
      --line: #435970;
      --blue: #9aceff;
      --green: #9ee4ca;
      --gold: #e8c58e;
    }
    :is(.topbar, .section-alt, .card.alt, .page-languages, .workspace-masthead,
      .workspace-resource-popover, .form input, .form textarea, .form select, .skip) {
      background: var(--paper);
      border-color: var(--line);
    }
    :is(.page-languages strong, .page-languages p, .workspace-nav-link, .word-translation) {
      color: var(--muted);
    }
    :is(.eyebrow, .step, .textlink, .lab-tool > .ico, .workspace-tool-top > .ico) { color: var(--gold); }
    :is(.feedback, .choice, .article aside, .exchange, .scorecard, .course-message, .lab-flashcard,
      .lab-glossary > div, .lab-report > div, .writing-example, #career-ai-result, .diplomacy-table .priority,
      .workspace-filter, .book-scan, .bar) {
      background: #22384c;
      color: var(--ink);
      border-color: var(--line);
    }
    :is(.choice.good, .exchange.student, .course-message.user, .scorecard) { background: #24483f; }
    .choice.bad { background: #543439; }
    :is(.ghost, .pagebtn, .lab-tool, .workspace-tool, .workspace-filter, .workspace-account-link):hover,
    :is(.pagebtn[aria-current="true"], .workspace-filter[aria-pressed="true"]) { background: #29445e; color: var(--ink); }
    .workspace-nav-link:is(:hover, [aria-current="page"], .is-current) { color: var(--blue); }
  }
}
.library-resource[hidden] { display: none; }



:root {
  --sans: 'Source Sans 3', system-ui, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
}
html[data-theme="light"] {
  --ivory: #f6f8fb;
  --paper: #fff;
  --line: #dce4ed;
  --muted: #465a6e;
}
body { font-size: 16px; }
h1, h2, .brand strong { font-family: var(--serif); }
h1, h2 { letter-spacing: -.032em; }
h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.015em; }
.hero h1 { max-width: 11ch; line-height: 1.06; }
.header { border-color: #334a60; }
.main-nav a, .navitem { font-size: 14px; }
.topbar { background: var(--paper); }
.crumb, .language { font-size: 13px; }
.side { background: #102236; }
.navitem.active { background: #234465; color: #ffe4ad; }
.navitem:hover { background: #213e59; }
.btn { font-size: 14px; border-radius: 9px; }
.card, .path-card { border-radius: 16px; }
.card h3 { font-size: clamp(20px, 2vw, 25px); }
.workspace-directory-head {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(242px, 1fr);
  gap: 16px;
}
.workspace-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 4vw, 50px);
  border-radius: 17px;
  background: linear-gradient(115deg, #102741 12%, #1e486d 100%);
  color: #fff;
}
.workspace-intro::after {
  content: '';
  position: absolute;
  inset: 0 0 0 36%;
  z-index: -1;
  background: linear-gradient(90deg,#15314e 0%,transparent 100%), url('./assets/delegates.webp') 63% center/cover;
  opacity: .38;
}
.workspace-intro h1 { font-size: clamp(36px, 5.5vw, 66px); }
.workspace-intro p { max-width: 54ch; color: #e0ecf7; font-size: 17px; }
.workspace-intro .actions { margin-top: 22px; }
.workspace-progress-overview { border: 1px solid var(--line); border-radius: 17px; background: var(--paper); padding: 24px; }
.workspace-progress-overview h2 { font-size: 25px; }
.workspace-catalog-head h2, .workspace-group h2 { font-size: clamp(24px, 3vw, 34px); }
.workspace-catalog-head { margin-bottom: 12px; }
.workspace-directory-filter input { min-height: 44px; }
.workspace-filters { gap: 8px; }
.workspace-filter { min-height: 40px; padding: 7px 13px; border-radius: 30px; background: var(--paper); color: var(--ink); }
.workspace-group { margin-top: 30px; }
.workspace-group > header { margin-bottom: 13px; }
.workspace-tool-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 14px; }
.workspace-tool {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 138px;
  padding: 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.workspace-tool:hover { border-color: #638cae; }
.workspace-tool h3 { font-size: 19px; }
.workspace-tool p { font-size: 14px; line-height: 1.5; }
.workspace-tool-icon { background: #e6eef8; color: #184575; }
.library-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; }
.library-toolbar label { display: grid; gap: 5px; font-weight: 650; font-size: 14px; }
.library-toolbar input { min-width: min(260px, 70vw); padding: 8px 12px; }
.library-toolbar :is(select,input) { border: 1px solid var(--line); border-radius: 8px; min-height: 42px; color: var(--ink); background: var(--paper); }
.library-resource h3 { font-size: 21px; }
#firebase-login { margin-top: 18px; max-width: 420px; }
#firebase-login input { min-height: 44px; }
[data-firebase-status]:not(:empty) { margin-top: 13px; }
html[data-theme="dark"] .workspace-tool-icon { background: #223e5c; color: #b6dcff; }
html[data-theme="dark"] .workspace-filter[aria-pressed="true"] { background: #29445e; color: #eef5fb; }
@media (max-width: 900px) {
  .workspace-directory-head { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .workspace-tool { min-height: 0; }
}

.front-page {
  --front-ground: #f4f1e9;
  --front-ink: #1b2525;
  --front-muted: #465451;
  --front-line: #d0d0c4;
  --front-accent: #205344;
  --front-button-text: #fff;
  background: var(--front-ground);
  color: var(--front-ink);
}
html[data-theme="dark"] .front-page {
  --front-ground: #19201e;
  --front-ink: #f0ede2;
  --front-muted: #c1cbc4;
  --front-line: #46514a;
  --front-accent: #c3dfcb;
  --front-button-text: #17241e;
}
.front-page p { color: var(--front-muted); }
.front-wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.front-header { border-bottom: 1px solid var(--front-line); }
.front-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.front-page .brand strong { color: var(--front-ink); font-size: 19px; }
.front-page .brand small { display: none; }
.front-page .brand img { width: 40px; height: 40px; border-radius: 4px; }
.front-header nav, .front-controls { display: flex; align-items: center; gap: 20px; }
.front-header nav a, .front-account { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.front-controls { gap: 12px; }
.front-controls select { min-height: 44px; padding: 4px; border: 0; color: var(--front-ink); background: var(--front-ground); }
.front-account { padding-inline: 12px; border: 1px solid var(--front-line); border-radius: 4px; }
.front-opening { display: grid; grid-template-columns: 1.12fr 1fr; gap: 48px; align-items: center; padding-block: 64px 56px; }
.front-opening h1 { font-size: clamp(52px, 6.4vw, 94px); letter-spacing: -.055em; line-height: .99; }
.front-opening p { max-width: 40ch; margin-top: 24px; font-size: 20px; line-height: 1.5; }
.front-actions { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-top: 24px; }
.front-actions > a { min-height: 44px; }
.front-actions > a:not(.btn) { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; }
.front-primary { background: var(--front-accent); color: var(--front-button-text); border-radius: 4px; }
.front-primary:hover { filter: brightness(.92); }
.front-reading { margin: 0; min-width: 0; }
.front-reading > a { display: block; height: clamp(220px, 30vw, 360px); background: #e2d7bd; overflow: hidden; }
.front-reading img { width: 100%; height: 100%; object-fit: cover; object-position: center 23%; }
.front-reading figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; color: var(--front-muted); font-size: 14px; }
.front-reading figcaption span:last-child { font-variant-numeric: tabular-nums; }
.front-section { border-top: 1px solid var(--front-line); display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; padding-block: 32px; }
.front-section h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 8px; }
.front-list { list-style: none; margin: 0; padding: 0; }
.front-list li + li { border-top: 1px solid var(--front-line); }
.front-list a { display: grid; align-items: center; column-gap: 16px; grid-template-columns: 1fr auto; padding: 12px 0; }
.front-list a strong { font-size: 20px; font-weight: 650; }
.front-list a span { grid-column: 1; color: var(--front-muted); }
.front-list a svg { grid-area: 1 / 2 / span 2; width: 16px; color: var(--front-accent); }
.front-list a:hover strong, .front-header nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.front-footer { border-top: 1px solid var(--front-line); padding-block: 24px; }
.front-footer .front-wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.front-footer .textlink { color: var(--front-accent); }
@media (max-width: 880px) {
  .front-wrap { width: calc(100% - 48px); }
  .front-header nav { display: none; }
  .front-opening { gap: 24px; padding-block: 48px 40px; }
}
@media (max-width: 640px) {
  .front-wrap { width: calc(100% - 32px); }
  .front-header-inner { flex-wrap: wrap; gap: 8px; padding-block: 12px; }
  .front-opening, .front-section { grid-template-columns: 1fr; }
  .front-opening h1 { font-size: clamp(44px, 10vw, 64px); }
  .front-opening p { font-size: 18px; margin-top: 16px; }
  .front-section { gap: 12px; padding-block: 24px; }
  .front-reading > a { height: 240px; }
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.theme-toggle:hover { border-color: currentColor; }
.front-controls .theme-toggle { border-color: var(--front-line); }
.board-front, .shell {
  --front-ground: #faf8ec;
  --front-ink: #182620;
  --front-muted: #405149;
  --front-line: #d6d7c9;
  --front-accent: #24523e;
}
.board-front .front-wrap { width: min(1328px, calc(100% - 48px)); }
.board-hero { display: grid; grid-template-columns: .92fr 1.08fr; margin-top: 24px; min-height: 460px; }
.board-hero-copy { display: grid; align-content: center; padding: clamp(28px, 5vw, 76px); background: #24523e; color: #fffbea; }
.board-hero h1, .board-section-title h2 { font-family: var(--sans); font-weight: 800; line-height: .99; letter-spacing: -.055em; }
.board-hero h1 { font-size: clamp(48px, 7.3vw, 108px); overflow-wrap: anywhere; }
.board-hero p { margin-top: 24px; max-width: 36ch; font-size: 19px; color: #f0f4e4; }
.board-hero .front-primary { background: #fff8dc; color: #173a2a; }
.board-hero-media { position: relative; margin: 0; min-width: 0; min-height: 260px; }
.board-hero-media img, .board-resource-band > img { width: 100%; height: 100%; object-fit: cover; }
.board-hero-media img { position: absolute; inset: 0; }
.board-hero-media figcaption { position: absolute; right: 12px; bottom: 12px; padding: 4px 8px; background: #171b17; color: white; font-size: 13px; }
.board-program, .board-resource-band { margin-block: clamp(36px, 7vw, 88px); }
.board-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.board-section-title h2 { font-size: clamp(36px, 5.5vw, 68px); }
.board-section-title .textlink, .board-front .front-links svg { color: var(--front-accent); }
.board-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.board-card { display: flex; flex-direction: column; height: 100%; background: var(--card-paper); color: #1d2923; }
.board-card-reading { --card-paper: #e9ded0; }
.board-card-language { --card-paper: #dce8d0; }
.board-card-debate { --card-paper: #f0dfab; }
.board-card-community { --card-paper: #dbe4ea; }
.board-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.board-card-reading img { object-position: center 23%; }
.board-card > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 16px; }
.board-card h3 { font-size: 22px; line-height: 1.12; }
.board-card p { grid-column: 1 / -1; color: #35483e; }
.board-card svg { grid-area: 1 / 2; width: 18px; }
.board-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.board-resource-band { display: grid; grid-template-columns: 1.2fr 1fr; border: 1px solid var(--front-line); }
.board-resource-band > div { padding: clamp(20px, 4vw, 48px); }
.board-resource-band h2 { font-size: clamp(32px, 4vw, 54px); margin-bottom: 20px; }

html[data-theme="dark"] :is(.board-front,.shell) { --front-ground: #141a1e; --front-ink: #f5efe0; --front-muted: #c3c9c7; --front-line: #41494b; --front-accent: #d9deae; }
html[data-theme="dark"] .board-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(450px, 49vw, 660px); overflow: hidden; }
html[data-theme="dark"] .board-hero-media { position: absolute; inset: 0; z-index: -2; }
html[data-theme="dark"] .board-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #111717cf, #11171724 88%); }
html[data-theme="dark"] .board-hero-media figcaption { z-index: 1; }
html[data-theme="dark"] .board-hero-copy { background: transparent; max-width: 760px; }
html[data-theme="dark"] .board-hero h1, html[data-theme="dark"] .board-section-title h2 { font-family: var(--serif); font-weight: 500; }
html[data-theme="dark"] .board-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-theme="dark"] .board-card { display: grid; grid-template-columns: minmax(100px, 36%) 1fr; background: #20292c; color: var(--front-ink); }
html[data-theme="dark"] .board-card img { height: 100%; min-height: 128px; }
html[data-theme="dark"] .board-card p { color: var(--front-muted); }
html[data-theme="dark"] .board-card svg { color: var(--front-accent); }
@media (max-width: 900px) { .board-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .board-front .front-wrap { width: calc(100% - 32px); }
  .board-hero, .board-resource-band { grid-template-columns: 1fr; }
  .board-hero { min-height: 0; margin-top: 12px; }
  .board-hero-media { min-height: 220px; }
  .board-hero h1 { font-size: clamp(44px, 11vw, 62px); }
  html[data-theme="dark"] .board-hero { min-height: 460px; align-items: flex-end; }
  html[data-theme="dark"] .board-hero-copy { padding-bottom: 56px; }
  html[data-theme="dark"] .board-hero-media::after { background: linear-gradient(0deg, #111717f5, #11171718); }
  html[data-theme="dark"] .board-cards { grid-template-columns: 1fr; }
  .board-front .front-footer .front-wrap { flex-wrap: wrap; }
}
@media (max-width: 360px) { .board-cards { grid-template-columns: 1fr; } }

.board-hero-copy { min-width: 0; container-type: inline-size; }
.board-hero h1 { font-size: clamp(38px, 16cqw, 92px); overflow-wrap: normal; }
html[data-theme="dark"] .board-hero-copy { width: min(760px, 100%); }
html[data-theme="dark"] .board-hero h1 { font-size: clamp(38px, 14cqw, 94px); }
@media (max-width: 640px) {
  .board-hero h1, html[data-theme="dark"] .board-hero h1 { font-size: clamp(28px, 14cqw, 64px); }
}

.auth-page {
  --auth-bg: #f8f6eb;
  --auth-ink: #182620;
  --auth-muted: #4b5a51;
  --auth-line: #a6afa1;
  --auth-paper: #fffdf6;
  --auth-action: #24523e;
  --auth-on-action: #fffdf6;
  min-height: 100dvh;
  background: var(--auth-bg);
  color: var(--auth-ink);
}
html[data-theme="dark"] .auth-page {
  --auth-bg: #141a1e;
  --auth-ink: #f5efe0;
  --auth-muted: #c0c9c0;
  --auth-line: #67766b;
  --auth-paper: #202a27;
  --auth-action: #c3dfcb;
  --auth-on-action: #172a20;
}
.auth-page p { color: var(--auth-muted); }
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 12px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--auth-line);
}
.auth-header .brand strong { color: var(--auth-ink); }
.auth-header .brand small { color: var(--auth-muted); }
.auth-controls { display: flex; align-items: center; gap: 8px; }
.auth-controls .language { min-height: 44px; }
.auth-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100dvh - 76px); }
.auth-content { display: grid; align-items: center; justify-items: center; padding: clamp(24px, 5vw, 64px); }
.auth-panel { width: min(100%, 416px); }
.auth-panel h1 { font-size: clamp(38px, 4.4vw, 58px); color: var(--auth-ink); }
.auth-description { margin: 12px 0 24px; font-size: 17px; }
.auth-google, .auth-submit {
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
}
.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--auth-line);
  color: var(--auth-ink);
  background: var(--auth-paper);
}
.auth-google span { font-weight: 800; color: var(--auth-action); font-size: 19px; }
.auth-submit { border: 1px solid transparent; color: var(--auth-on-action); background: var(--auth-action); }
.auth-google:hover, .auth-submit:hover { filter: brightness(.93); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 14px; color: var(--auth-muted); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-line); }
.auth-panel #firebase-login { max-width: none; margin-top: 16px; gap: 12px; }
.auth-panel #firebase-login label { font-size: 15px; }
.auth-panel #firebase-login input { height: 48px; color: var(--auth-ink); background: var(--auth-paper); border-color: var(--auth-line); }
.auth-password { position: relative; }
.auth-panel #firebase-login .auth-password input { padding-inline-end: 92px; }
.auth-link { color: var(--auth-action); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
button.auth-link { border: 0; background: transparent; min-height: 44px; justify-self: end; padding: 0; }
.auth-show { position: absolute; bottom: 2px; right: 12px; }
.auth-alternate { margin-top: 20px; }
.auth-photo { position: relative; margin: 0; min-height: 520px; }
.auth-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-photo figcaption { position: absolute; bottom: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 12px; background: #162920; color: white; font-size: 14px; }
.auth-photo figcaption a { text-decoration: underline; }
@media (max-width: 740px) {
  .auth-main { grid-template-columns: 1fr; }
  .auth-photo { min-height: 220px; }
  .auth-content { padding-block: 40px; }
}

/* The learning interface uses the rounded face. The public site keeps its display typography. */
.shell, .professional-shell {
  --sans: 'Varela Round', 'Nunito', system-ui, sans-serif;
  --serif: var(--sans);
  font-family: var(--sans);
}
.shell :is(h1,h2,h3), .professional-shell :is(h1,h2,h3) {
  font-family: var(--sans);
  letter-spacing: -.025em;
}
.shell :is(button,input,select,textarea) { font-family: var(--sans); }
.shell .brand strong { font-family: 'Playfair Display', Georgia, serif; }
.front-roadmap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: start;
  gap: clamp(24px, 5vw, 64px);
  margin-block: clamp(36px, 7vw, 88px);
}
.front-roadmap h2 { font: 800 clamp(32px, 5vw, 58px)/1 var(--sans); }
html[data-theme="dark"] .front-roadmap h2 { font-family: var(--serif); font-weight: 500; }
.front-roadmap ol { margin: 20px 0 0; padding-inline-start: 30px; }
.front-roadmap li { border-bottom: 1px solid var(--front-line); }
.front-roadmap li::marker { color: var(--front-accent); font-weight: 700; }
.front-roadmap li a { display: grid; grid-template-columns: 20px minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: 52px; padding-block: 8px; }
.front-roadmap li a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.front-roadmap .ico { width: 18px; color: var(--front-accent); }
.front-sample { padding: clamp(20px, 4vw, 36px); border: 1px solid var(--front-line); background: #eeeace; }
html[data-theme="dark"] .front-sample { background: #20292c; }
.front-sample h3 { margin-bottom: 12px; font-size: 23px; }
.front-sample p { margin-bottom: 20px; font-size: 20px; }
.front-sample .textlink { color: var(--front-accent); }
@media (max-width: 720px) { .front-roadmap { grid-template-columns: 1fr; } }

/* Shared homepage and workspace palette */
.shell {
  --ivory: var(--front-ground);
  --ink: var(--front-ink);
  --muted: var(--front-muted);
  --line: var(--front-line);
  --blue: var(--front-accent);
  --green: var(--front-accent);
  --navy: #24523e;
  --deep: #182620;
  --paper: #fffdf5;
  --app-tint: #e7ebd8;
  --app-on-accent: #fffdf5;
  --app-edge: #193c2d;
  --series-reading: #317253;
  --series-lessons: #9d6a31;
  --series-puzzles: #536780;
  background: var(--ivory);
  color: var(--ink);
}
html[data-theme="dark"] .shell {
  --paper: #20292c;
  --deep: #141a1e;
  --navy: #d9deae;
  --gold: #d9deae;
  --app-tint: #2d3936;
  --app-on-accent: #182620;
  --app-edge: #8b966f;
  --series-reading: #8abd9d;
  --series-lessons: #d9b77f;
  --series-puzzles: #9bb3d0;
}
.shell .side { background: var(--paper); color: var(--ink); border-right: 1px solid var(--line); }
.shell .side :is(.brand strong,.nav-label,.brand small) { color: var(--ink); }
.shell .side-note { border-color: var(--line); }
.shell .navitem { padding: 4px 8px; gap: 8px; border-radius: 10px; min-height: 36px; }
.shell .navitem:is(.active,:hover) { background: var(--app-tint); color: var(--front-accent); box-shadow: none; }
.nav-emblem { display: grid; flex: 0 0 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--ivory); color: var(--front-accent); }
.shell :is(.topbar,.page-languages,.workspace-masthead,.card.alt) { background: var(--paper); border-color: var(--line); }
.shell :is(.workspace-intro,.dashboard-banner) { color: var(--ink); background: var(--app-tint); border: 1px solid var(--line); }
.shell :is(.workspace-intro,.dashboard-banner) :is(h1,p,.eyebrow) { color: var(--ink); }
.shell .workspace-intro::after { opacity: .12; }
.shell .mapart { opacity: .5; }
.shell :is(.choice,.bar,.workspace-filter,.form input,.form select,.form textarea,.lab-flashcard,.lab-glossary > div) { color: var(--ink); background: var(--ivory); border-color: var(--line); }
.shell :is(.choice.good,.workspace-filter[aria-pressed="true"],.workspace-account-link:hover) { color: var(--ink); background: var(--app-tint); }
.shell .choice.bad { background: #753731; color: white; border-color: #753731; }
.shell .bar span { background: var(--front-accent); }
.shell .btn.primary, .shell .btn.gold {
  background: var(--front-accent); color: var(--app-on-accent);
  box-shadow: 0 3px 0 var(--app-edge); border: 1px solid transparent;
}
.shell :is(.btn.primary,.btn.gold):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--app-edge); }
.shell :is(.btn,.chip,.navitem,.streak-link):focus-visible { outline: 2px solid var(--front-accent); outline-offset: 3px; }
.shell :is(.eyebrow,.textlink,.step,.streak-link) { color: var(--front-accent); }
.shell .road-circle { background: var(--app-tint); color: var(--front-accent); border-color: var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--line); }
.shell .roadmap li.next .road-circle { color: var(--app-on-accent); background: var(--front-accent); box-shadow: 0 3px 0 var(--app-edge); }
.shell .roadmap li.locked .road-circle { background: var(--ivory); color: var(--muted); }
.shell .roadmap li::before { background: var(--line); }
.streak-link { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; min-height: 34px; }
.streak-link .ico { width: 18px; height: 18px; }
.account-title { margin-bottom: 20px; }
.account-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); gap: 20px; align-items: start; }
.account-stack { display: grid; gap: 20px; }
.account-stack .card { min-width: 0; }
.shell .account-initials { background: var(--app-tint); color: var(--front-accent); overflow: hidden; }
.account-initials img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-photo { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.profile-photo .account-initials { width: 72px; height: 72px; font-size: 24px; }
.profile-upload { display: grid; gap: 6px; }
.profile-upload input { max-width: min(100%, 250px); }
.profile-photo small, .profile-photo button { display: block; margin-top: 4px; color: var(--front-accent); }
.profile-photo button[hidden] { display: none; }
.account-info dd { overflow-wrap: anywhere; }
:is([data-profile-status],[data-security-status]):empty { display: none; }
.account-stack .form { margin-top: 12px; }
.activity-card { margin: 20px 0; }
.activity-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.activity-head h2 { margin: 0 0 4px; font-size: clamp(22px,3vw,30px); }
.activity-head p { margin: 0; }
.activity-head .chips { margin: 0; align-self: start; }
.activity-head .chip[aria-pressed="true"] { background: var(--app-tint); color: var(--front-accent); border-color: var(--front-accent); }
.activity-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0; padding: 0; font-size: 13px; }
.activity-legend li { display: flex; align-items: center; gap: 6px; }
.activity-legend i { width: 10px; height: 10px; border-radius: 2px; }
.activity-card .series-0 { background: var(--series-reading); }
.activity-card .series-1 { background: var(--series-lessons); }
.activity-card .series-2 { background: var(--series-assignment, #746385); }
.activity-card .series-3 { background: var(--series-puzzles); }
.activity-graph { display: grid; grid-template-columns: 28px minmax(0,1fr); height: 124px; }
.activity-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted); }
.activity-bars { display: flex; gap: clamp(2px,.55vw,8px); padding-inline: 4px; border-block: 1px solid var(--line); background: linear-gradient(var(--line),var(--line)) center / 100% 1px no-repeat; }
.activity-bar { display: flex; flex: 1; flex-direction: column-reverse; min-width: 0; }
.activity-bar i { display: block; }
.activity-bar i:last-child { border-radius: 4px 4px 0 0; }
.activity-dates { display: flex; justify-content: space-between; margin: 6px 0 12px 28px; font-size: 12px; color: var(--muted); }
.activity-data summary { cursor: pointer; color: var(--front-accent); }
.activity-data > div { overflow-x: auto; }
.activity-data table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.activity-data :is(th,td) { padding: 8px; text-align: start; border-bottom: 1px solid var(--line); }
@media (max-width: 840px) { .account-layout { grid-template-columns: 1fr; } }

.account-milestones { grid-column: 1 / -1; }
.account-report .activity-card { margin: 0; min-width: 0; }
.report-card { min-width: 0; }
.report-heading { display: flex; align-items: center; gap: 12px; }
.report-heading .tile-icon { background: var(--app-tint); color: var(--front-accent); flex: none; }
.report-heading h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 4px; }
.report-heading p { margin: 0; }
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
  margin: 20px 0 0;
}
.report-grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  padding: 12px 16px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.report-grid dt { min-width: 0; overflow-wrap: anywhere; }
.report-grid dd { margin: 0; color: var(--front-accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-grid .report-meter { grid-column: 1 / -1; }
.report-meter .bar { height: 6px; margin: 0; background: var(--app-tint); }

html[data-theme="light"] .shell {
  --action: #91472e;
  --action-hover: #793a25;
  --action-shadow: #632f20;
}
.shell .btn.primary {
  background: var(--action, var(--front-accent));
  box-shadow: 0 3px 0 var(--action-shadow, var(--app-edge));
}
.shell .btn.primary:hover { background: var(--action-hover, var(--front-accent)); }
.shell .btn.primary:active { box-shadow: 0 1px 0 var(--action-shadow, var(--app-edge)); }
html[data-theme="dark"] .shell { --series-assignment: #c1acd5; }
.reading-track { margin-block: 20px; }
.reading-track h2 { margin: 0 0 8px; }
.reading-series { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 16px; }
.reading-series article { padding: 16px; background: var(--ivory); border: 1px solid var(--line); border-radius: 12px; }
.reading-series h3 { margin: 0 0 8px; }
.reading-series ol { list-style: none; padding: 0; margin: 12px 0 0; }
.reading-series li { border-top: 1px solid var(--line); padding: 12px 0; }
.reading-series li p { margin: 0 0 8px; }
.voice-head h1 { margin: 0; font: inherit; letter-spacing: inherit; text-transform: uppercase; }
.activity-empty { color: var(--muted); font-size: 14px; margin: 0 0 12px; }

.speech-assessment { margin-top: 24px; }
.speech-assessment h2 { margin-top: 0; }
.speech-assessment time {
  display: inline-block;
  color: var(--front-accent);
  font-size: clamp(32px, 5vw, 52px);
  font-variant-numeric: tabular-nums;
}
.speech-assessment audio { display: block; width: min(100%, 480px); margin-block: 12px; }

.language-overview { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.language-overview h2, .language-resources h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 28px); }
.language-resume { background: var(--app-tint); }
.language-path { display: grid; gap: 8px; list-style: none; padding: 0; margin: 20px 0; }
.language-step { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; }
.language-step.is-next { border-color: var(--front-accent); }
.language-step h3, .language-step p { margin: 0; }
.language-step h3 { font-size: 19px; }
.language-step p { color: var(--muted); font-size: 14px; }
.language-number { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--app-tint); color: var(--front-accent); }
.language-number svg { width: 20px; }
@media (max-width: 640px) {
  .language-overview { grid-template-columns: 1fr; }
  .language-step { padding-inline: 12px; gap: 8px; }
}

.brand strong {
  display: block;
  max-inline-size: 15ch;
}
.brand .brand-mark {
  position: relative;
  flex: none;
  width: 48px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: white;
}
.front-page .brand .brand-mark { width: 40px; border-radius: 4px; }
.side .brand .brand-mark { width: 43px; }
.brand .brand-mark img {
  position: absolute;
  width: 154%;
  height: auto;
  max-width: none;
  left: -27%;
  top: -2%;
  clip-path: inset(13% 0 49%);
}
@media (max-width: 640px) {
  .brand .brand-mark { width: 39px; }
  .front-page .brand strong { font-size: 15px; }
}

.auth-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  border: 1px solid var(--auth-line, #bdcfc7);
  border-radius: 10px;
}
.auth-modes a {
  text-align: center;
  padding: 7px 4px;
  border-radius: 6px;
  font-size: 14px;
  color: inherit;
}
.auth-modes a[aria-current="page"] {
  background: var(--auth-action, #235b4e);
  color: var(--auth-on-action, #fff);
}
.auth-panel #academy-admin-login { margin-top: 18px; gap: 12px; }
.auth-panel #academy-admin-login input {
  height: 48px;
  color: var(--auth-ink);
  background: var(--auth-paper);
  border-color: var(--auth-line);
}
.auth-panel [data-admin-status]:empty { display: none; }



:root {
  --editorial-serif: 'Playfair Display', Georgia, serif;
  --editorial-sans: Inter, system-ui, sans-serif;
  --editorial-forest: #123524;
  --editorial-teal: #1e7e85;
  --editorial-copper: #9d562c;
  --editorial-navy: #07172d;
}
.workspace { font-family: var(--editorial-sans); }

.credits-button {
  background: none; color: inherit; border: 0; padding: 0; cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 4px;
}
.credits-content li { margin-block: .55rem; overflow-wrap: anywhere; }
.credits-content a { display: inline; }

.workspace-dashboard .dashboard-banner {
  background: linear-gradient(105deg,#214d3b 4%,#10382d 64%,#092d25);
  border-radius: 12px;
}
.workspace-dashboard .dashboard-banner h1, .workspace-academy .workspace-intro h1,
.workspace-network .wide-title h1, .workspace-read .wide-title h1 {
  font-family: var(--editorial-serif); font-weight: 600;
}
.workspace-dashboard .stat-row { margin-block: 16px; }
.workspace-dashboard .stat { justify-content: space-between; gap: 12px; }
.workspace-dashboard .stat strong > small { display: inline; font-size: .58em; }
.stat-ring {
  position: relative; width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center;
  border-radius: 50%; background: conic-gradient(var(--editorial-teal) var(--completion),var(--line) 0);
}
.stat-ring::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--paper); }
.stat-ring .ico { z-index: 0; width: 19px; height: 19px; color: var(--ink); }
.stat-streak { display: flex; align-items: flex-end; gap: 3px; height: 35px; }
.stat-streak i { width: 5px; height: 27%; background: var(--line); border-radius: 3px; }
.stat-streak i[data-active="true"] { height: 90%; background: var(--editorial-teal); }
.workspace-dashboard .dashboard-cols { align-items: start; margin-bottom: 18px; }
.workspace-dashboard .card h2 { font-size: 20px; }
.workspace-dashboard .daily-brief { background: var(--editorial-forest); color: #f8f7f2; border-color: transparent; }
.workspace-dashboard .daily-brief p { color: #e3eee7; }
.daily-brief .btn { margin-top: .7rem; }
.recommended ul { margin: 10px 0 0; padding: 0; list-style: none; }
.recommended li + li { border-top: 1px solid var(--line); }
.recommended li a { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 0; }
.recommended li a:hover { text-decoration: underline; }
.recommended .tile-icon { width: 32px; height: 32px; }
.heat-grid { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 4px; margin: 12px 0; }
.heat-cell { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 4px; background: var(--ivory); padding: 0; cursor: pointer; }
.heat-cell[data-level="1"] { background: #a0c5ad; }
.heat-cell[data-level="2"] { background: #6ea783; }
.heat-cell[data-level="3"] { background: #367759; }
.heat-cell[data-level="4"] { background: #174631; }
.heat-cell:hover { outline: 2px solid var(--editorial-teal); outline-offset: 1px; }
.heat-detail { min-height: 2.5em; }
.workspace-dashboard .roadmap .next .road-circle { box-shadow: 0 0 0 5px #48876842; }

.workspace-academy .workspace-tool-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.workspace-academy .workspace-tool {
  height: 100%; display: flex; flex-direction: column; gap: 12px;
  background: var(--paper); color: var(--ink); border-color: var(--line);
}
.workspace-academy .workspace-tool p { color: var(--muted); }
.module-level { font-size: .72rem; font-weight: 700; border-radius: 14px; padding: 3px 8px; background: #e4eee4; color: #244431; }
.module-level[data-level="intermediate"] { background: #f4e4c7; color: #65421f; }
.module-level[data-level="advanced"] { background: #f1ddcf; color: #793c20; }
.catalog-progress { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; color: var(--muted); font-size: 12px; }
.catalog-progress .bar { margin: 0; height: 5px; }
.catalog-progress .bar span { background: var(--editorial-teal); }
.catalog-action { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; }
.catalog-action .ico { width: 17px; }
.workspace-tool:hover .catalog-action { text-decoration: underline; }

.workspace-read .reading-layout { grid-template-columns: minmax(0,1fr) minmax(165px,218px); }
.reader-spread { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: 14px; margin-block: 18px; }
.reader-spread > section { min-width: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.reader-controls { min-height: 48px; display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 5px; padding: 7px 8px; background: var(--ivory); }
.reader-controls span { flex: 1 1 auto; }
.reader-controls .chip { min-height: 28px; padding: 3px 8px; font-size: 12px; }
.reader-controls .chip:disabled { opacity: .44; }
.reader-controls output { font-size: 12px; }
.reader-scan,.reader-copy { overflow: auto; max-height: 630px; }
.reader-scan { background: #e7ddc9; }
.reader-scan a { display: block; }
.reader-scan img { display: block; width: var(--book-zoom,100%); max-width: none; height: auto; }
.reader-copy { padding: 15px; }
.reader-copy article + article { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.reader-spread[data-reader-view="original"] [data-book-notes],
.reader-spread[data-reader-view="notes"] [data-book-original] { display: none; }
.reader-spread[data-reader-view="original"] [data-book-original],
.reader-spread[data-reader-view="notes"] [data-book-notes] { border: 0; margin: 0; padding: 0; }
.reader-copy h3 { font: 600 17px var(--editorial-serif); }
.reader-copy p { color: var(--ink); line-height: 1.65; }
.reader-term { display: inline; padding: 0; background: transparent; border: 0; font: inherit; color: inherit; text-decoration: underline 2px #bf865a; text-underline-offset: 3px; cursor: pointer; }
.reader-lookup { border: 1px solid var(--line); padding: 12px; border-radius: 9px; }
.reader-lookup summary { cursor: pointer; font-weight: 700; }
.reader-lookup input { width: 100%; margin-block: 10px; }
.reader-glossary { display: grid; gap: 8px; }
.reader-glossary .card { padding: 12px; }

.training-workspace {
  --paper: #102840; --ivory: #091c33; --ink: #edf5fc; --muted: #aec6dc;
  --line: #37516d; --navy: #eaf4ff; --green: #90d5c8;
  color: var(--ink); background: var(--editorial-navy);
}
.training-workspace .training-navigation {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px;
}
.training-navigation a {
  display: inline-flex; gap: 8px; align-items: center; border: 1px solid #37516d;
  border-radius: 8px; padding: 8px 10px; color: #d9ebff; font-size: 14px;
}
.training-navigation a[aria-current="page"], .training-navigation a:hover { background: #25495f; border-color: #6ab7ab; }
.training-workspace :is(.wide-title h1,.wide-title p,.wide-title .eyebrow,.textlink,.form label,.conversation p,.scorecard li) { color: var(--ink); }
.training-workspace :is(.exercise-room,.scorecard,.exchange,.speech-assessment,.page-languages > div) {
  background: #102840; border-color: #37516d; color: #edf5fc;
}
.training-workspace .voice-stage { border-color: #37516d; }
.training-workspace .exchange.student { background: #183f4d; }
.training-workspace :is(textarea,select,.ghost) { background: #112c49; color: #eef5fc; border-color: #56728e; }
.training-workspace :is(.btn.primary,.btn.gold) { background: #9dd9cf; color: #102a32; }
.training-workspace .btn:disabled { opacity: .55; }
.training-workspace :is(.feedback,.countdown,.activity-wait) { background: #173751; color: #f2f7ff; }
.practice-auto-voice, .form .practice-auto-voice {
  display: inline-flex; flex-direction: row; align-items: center; justify-content: flex-start;
  width: fit-content; margin-block: 8px; gap: 10px; cursor: pointer;
}
.practice-auto-voice input[type="checkbox"] {
  appearance: none; width: 36px; height: 21px; position: relative; flex: 0 0 36px;
  background: #345575; border: 1px solid #83a5c5; border-radius: 16px; padding: 0; margin: 0;
}
.practice-auto-voice input::before { position: absolute; content: ''; width: 13px; height: 13px; left: 3px; top: 3px; border-radius: 50%; background: #fff; }
.practice-auto-voice input:checked { background: #207c75; border-color: #8ed3c0; }
.practice-auto-voice input:checked::before { left: 18px; }
.live-caption { color: #c9e0ff; }
.live-caption:empty { display: none; }
.scorecard li:has(progress) { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 10px 0; }
.scorecard progress { width: 100%; grid-column: 1/-1; height: 7px; accent-color: #77c9b6; }
.debate-draft { padding: 8px 12px; border: 1px solid #37516d; border-radius: 8px; }
.debate-draft summary { cursor: pointer; }
.debate-draft ul { list-style: none; padding: 0; }
.form .debate-draft label { display: flex; align-items: center; gap: 8px; }
.form .debate-draft input { width: auto; }

.network-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.network-columns > section { min-width: 0; }
.network-columns h2 { font: 600 22px var(--editorial-serif); margin-bottom: 12px; }
.network-columns .card { margin-bottom: 10px; }
.source-entry { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 15px; }
.source-entry .tile-icon { width: 34px; height: 34px; }
.source-entry h3 { font-size: 16px; }
.source-entry p { font-size: 14px; }
.official-source { display: flex; align-items: center; gap: 4px; color: var(--green); margin-block: 7px; font-size: 11px; font-weight: 700; }
.official-source .ico { width: 13px; height: 13px; }
.network-feature { background: var(--editorial-forest); color: #fff; }
.network-feature p { color: #dce9e1; }
.network-feature .textlink { color: #d0e9e5; }
.network-feature figure,.network-legal { position: relative; margin: 0 0 12px; }
.network-feature img,.network-legal img { display: block; width: 100%; aspect-ratio: 2; object-fit: cover; border-radius: 8px; }
.network-feature figcaption,.network-legal figcaption {
  font-size: 11px; position: absolute; bottom: 6px; right: 6px; padding: 3px 5px; background: #0b261c; color: #fff;
}
.credits-button:focus-visible,.heat-cell:focus-visible,.reader-term:focus-visible,.practice-auto-voice input:focus-visible {
  outline: 2px solid #b98550; outline-offset: 3px;
}
@media(max-width: 1180px) {
  .workspace-read .reading-layout { grid-template-columns: minmax(0,1fr); }
  .workspace-read .book-contents { position: static; }
}
@media(max-width: 1020px) {
  .workspace-academy .workspace-tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .network-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width: 520px) {
  .reader-spread,.network-columns,.workspace-academy .workspace-tool-grid { grid-template-columns: minmax(0,1fr); }
  .reader-scan,.reader-copy { max-height: 490px; }
  .heat-grid { max-width: 320px; }
}
.book-sidebar { display: grid; align-content: start; gap: 12px; min-width: 0; }
.book-sidebar .reader-lookup { background: var(--paper); }
.book-sidebar .reader-lookup .word-translation { overflow-wrap: anywhere; }
.book-sidebar .reader-glossary { max-height: 520px; overflow: auto; }
.book-sidebar .book-contents { position: static; }

.book-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.book-picker .book-option { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.book-option h2 { font: 600 clamp(22px,3vw,31px)/1.14 var(--editorial-serif); }
.book-option p { margin: 0 0 auto; }
.book-option small { color: var(--muted); }
.book-option .bar { width: 100%; margin: 0 0 4px; }
.book-option-icon { display: flex; align-items: center; gap: 9px; color: var(--green); font-size: .8rem; }
.book-option-icon .ico { flex-shrink: 0; width: 18px; height: 18px; }
.reading-transcription { border: 1px solid var(--line); border-radius: 9px; margin-block: 18px; max-width: 75ch; }
.reading-transcription p:first-child { margin-top: 0; }
@media(max-width: 620px) {
  .book-picker { grid-template-columns: minmax(0,1fr); }
}

#academy-help {
  position: fixed;
  z-index: 30;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  justify-items: end;
  font: 500 14px/1.45 system-ui, sans-serif;
  --help-bg: #fffcf4;
  --help-ink: #173835;
  --help-line: #d6e1d9;
  --help-soft: #e9f1eb;
}
html[data-theme="dark"] #academy-help {
  --help-bg: #142832;
  --help-ink: #e5f1ea;
  --help-line: #375059;
  --help-soft: #203b43;
}
body.menu-open #academy-help, #academy-help [hidden] { display: none; }
#academy-help button { cursor: pointer; font: inherit; }
.help-launcher {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px 9px 10px;
  border: 1px solid #719b87;
  border-radius: 26px;
  color: #fff;
  background: #164c43;
  box-shadow: 0 5px 20px #10283145;
}
.help-symbol {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #bad7c8;
  border-radius: 50%;
  font-weight: 750;
}
.help-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: grid;
  grid-template-rows: auto minmax(44px,1fr) auto auto;
  width: min(354px, calc(100vw - 32px));
  height: min(464px, calc(100dvh - 86px));
  overflow: hidden;
  background: var(--help-bg);
  color: var(--help-ink);
  border: 1px solid var(--help-line);
  border-radius: 18px;
  box-shadow: 0 15px 44px #10283150;
}
.help-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 7px 9px 7px 15px;
  color: #fff;
  background: #164c43;
}
.help-panel h2 { margin: 0; font: 650 16px/1.25 system-ui, sans-serif; }
.help-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
}
.help-close:hover { background: #ffffff24; }
.help-close svg { width: 19px; height: 19px; }
.help-log { overflow: auto; overscroll-behavior: contain; padding: 14px 13px 4px; }
.help-log p {
  max-width: 91%;
  width: fit-content;
  padding: 8px 11px;
  margin: 0 0 10px;
  border-radius: 13px;
  overflow-wrap: anywhere;
}
.help-reply { background: var(--help-soft); }
.help-reply a { display: block; margin-top: 5px; color: inherit; text-decoration: underline; font-weight: 700; }
.help-user { margin-left: auto !important; background: #164c43; color: #fff; white-space: pre-wrap; }
.help-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px 13px;
}
.help-shortcuts button {
  max-width: 100%;
  min-height: 28px;
  padding: 3px 8px;
  color: var(--help-ink);
  background: transparent;
  border: 1px solid var(--help-line);
  border-radius: 20px;
  font-size: 11px !important;
}
.help-shortcuts button:hover { background: var(--help-soft); }
.help-form {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 9px 12px 12px;
  border-top: 1px solid var(--help-line);
}
.help-form input, .help-form button {
  min-height: 38px;
  border-radius: 8px;
  padding: 6px 8px;
}
.help-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--help-line);
  font: inherit;
  font-size: 16px;
  color: var(--help-ink);
  background: var(--help-bg);
}
.help-form button { background: #164c43; color: #fff; border: 1px solid #719b87; }
.help-form button:disabled { opacity: .55; }
#academy-help :focus-visible { outline: 2px solid #c39147; outline-offset: 2px; }
@media (max-height: 470px) {
  .help-shortcuts { flex-wrap: nowrap; overflow: auto; }
  .help-shortcuts button { flex: 0 0 auto; }
}
@media (max-height: 320px) {
  .help-shortcuts { display: none; }
}

/* Speaking studio: a focused conversation workspace, with readable guidance. */
.workspace-speaking.training-workspace{background:#f5f3ee;color:#172d3c;--ink:#172d3c;--muted:#5c6b76;--line:#dedfdc;--paper:#fff;--green:#256d64;padding:28px clamp(18px,3vw,48px) 48px}
.workspace-speaking .training-navigation{margin-bottom:28px}
.workspace-speaking .training-navigation a{color:#49616f;border-color:#d8deda;background:#fff;font-size:12px;border-radius:30px;padding:8px 14px}
.workspace-speaking .training-navigation a[aria-current=page]{background:#173b43;color:#fff;border-color:#173b43}
.studio-heading{display:flex;justify-content:space-between;align-items:center;gap:22px;margin:0 0 26px}
.studio-heading .eyebrow,.studio-card .eyebrow{font-size:10px;font-weight:750;letter-spacing:.15em;color:#477067;display:flex;align-items:center;gap:9px}
.studio-heading h1{font:500 clamp(28px,3vw,42px)/1.16 Georgia,serif;letter-spacing:-.035em;margin:9px 0 10px;color:#152f3e}
.studio-heading p{color:#61717a;font-size:14px;margin:0;line-height:1.65}
.studio-language{display:flex;align-items:center;gap:8px;white-space:nowrap;border:1px solid #d9dfd9;background:#fff;border-radius:30px;font-size:12px;padding:10px 14px;color:#395f58}
.studio-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
.studio-grid>*{min-width:0}
.workspace-speaking .voice-stage{min-height:600px;display:flex;border:1px solid #244b5a;border-radius:22px;background:radial-gradient(ellipse at 48% 24%,#204b59 0%,#133342 40%,#0d2534 80%);box-shadow:0 14px 32px #17304014;color:#f0f6f8}
.voice-stage .voice-head{padding:23px 25px;align-items:center;letter-spacing:.04em;font-size:10px;color:#b4c8d0;flex-wrap:wrap}
.studio-badge{display:inline-flex;align-items:center;gap:8px;border:1px solid #50737a;border-radius:30px;padding:7px 11px;color:#dceee8}
.studio-badge>i{height:6px;width:6px;border-radius:50%;background:#9bddc4;box-shadow:0 0 10px #9bddc470}
.voice-stage .voice-center{min-height:220px;flex:0;padding:10px 20px 22px;gap:12px}
.coach-robot {
  --robot-light: #a8e8d7;
  --eye-height: 20px;
  --eye-tilt: 0deg;
  --eye-offset: 0px;
  --mouth-width: 23px;
  --mouth-height: 10px;
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(148px, 19vw, 183px);
  aspect-ratio: 1.13;
  filter: drop-shadow(0 11px 15px #07192085);
}
.coach-robot::before,
.coach-robot::after {
  content: '';
  position: absolute;
  top: 35%;
  width: 11%;
  height: 32%;
  background: linear-gradient(#6d938e, #38636a);
  border: 1px solid #9ac2b66b;
  border-radius: 8px;
}
.coach-robot::before { left: 0; }
.coach-robot::after { right: 0; }
.coach-robot-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  width: 88%;
  height: 86%;
  padding: 10px 10px 7px;
  border: 1px solid #daeee1a0;
  border-radius: 26px;
  background: linear-gradient(145deg, #cee1d8 8%, #89aaa3 54%, #577d7c);
  box-shadow: inset 0 1px 0 #ebfff1c0, inset 0 -2px 5px #2e5758;
}
.coach-robot-screen {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  min-height: 0;
  border: 1px solid #597c7a;
  border-radius: 18px;
  background: linear-gradient(160deg, #17373e, #0d242d 68%);
  box-shadow: inset 0 3px 9px #081c24bf;
}
.coach-robot-eyes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  height: 26px;
  transform: translateX(var(--eye-offset));
  transition: transform .22s ease;
}
.coach-robot-eyes i {
  width: 13px;
  height: var(--eye-height);
  border: 2px solid var(--robot-light);
  border-radius: 8px;
  background: var(--robot-light);
  box-shadow: 0 0 10px #8edaca50;
  transform: rotate(var(--eye-tilt));
  transition: height .22s ease, transform .22s ease, border-radius .22s ease;
}
.coach-robot-eyes i + i { rotate: calc(var(--eye-tilt) * -2); }
.coach-robot-mouth {
  width: var(--mouth-width);
  height: var(--mouth-height);
  border: solid var(--robot-light);
  border-width: 0 2px 2px;
  border-radius: 0 0 14px 14px;
  transition: width .2s ease, height .2s ease, border-radius .2s ease;
}
.coach-robot-detail {
  width: 15px;
  height: 3px;
  justify-self: center;
  border-radius: 3px;
  background: #234a50a0;
}
.voice-stage[data-coach-expression="curious"] .coach-robot {
  --eye-tilt: 8deg;
  --mouth-width: 13px;
  --mouth-height: 7px;
}
.voice-stage[data-coach-expression="curious"] .coach-robot-eyes i + i { height: 15px; }
.voice-stage[data-coach-expression="pleased"] .coach-robot { --mouth-width: 28px; --mouth-height: 12px; }
.voice-stage[data-coach-expression="pleased"] .coach-robot-eyes i {
  height: 11px;
  border-width: 3px 2px 0;
  border-radius: 10px 10px 0 0;
  background: transparent;
  box-shadow: none;
}
.voice-stage[data-coach-expression="supportive"] .coach-robot {
  --robot-light: #daead3;
  --eye-height: 16px;
  --eye-tilt: -9deg;
  --mouth-width: 16px;
  --mouth-height: 7px;
}
.voice-stage:is([data-coach-expression="thinking"],[data-mic-state="transcribing"],[data-voice-state="loading"]) .coach-robot {
  --eye-height: 12px;
  --eye-offset: 7px;
  --mouth-width: 13px;
  --mouth-height: 2px;
}
.voice-stage[data-mic-state="listening"] .coach-robot {
  --robot-light: #c3f6e7;
  --eye-height: 24px;
  --mouth-width: 9px;
  --mouth-height: 2px;
}
.voice-stage:is([data-mic-state],[data-voice-state]) .coach-robot-eyes i {
  height: var(--eye-height);
  border-width: 2px;
  border-radius: 8px;
  background: var(--robot-light);
}
.voice-stage[data-voice-state="speaking"] .coach-robot-mouth {
  width: 16px;
  height: 10px;
  border-width: 2px;
  border-radius: 50%;
  animation: coach-robot-talk .38s ease-in-out infinite alternate;
}
@keyframes coach-robot-talk { to { transform: scale(.85,.48); } }
.voice-stage .voice-caption{margin:0;font-size:12px;font-weight:500;color:#c1dedc}
.studio-wave{height:20px;display:flex;align-items:center;gap:4px;opacity:.65}
.studio-wave i{display:block;width:3px;height:calc(var(--h)*.38);border-radius:3px;background:#83cfc1}
.voice-stage[data-voice-state=speaking] .studio-wave i{animation:studio-wave .65s infinite alternate ease-in-out}
@keyframes studio-wave{to{height:var(--h)}}
.voice-stage .voice-dock{width:100%;padding:0 28px 26px;margin:0 auto;font-size:13px;text-align:center}
.voice-dock h2{font:500 27px/1.25 Georgia,serif;letter-spacing:-.015em;margin:0 0 13px;color:#f3f7f4}
.voice-stage .voice-question{max-width:620px;margin:0 auto 20px;font-size:15px;line-height:1.7;color:#c8dbe2;overflow-wrap:anywhere}
.voice-stage .voice-controls{gap:9px}
.voice-stage .btn{min-height:42px;font-size:12px;padding:10px 16px;border-radius:9px;gap:8px}
.workspace-speaking .voice-stage .gold{background:#e6c38a;color:#1e302e;border:1px solid #e6c38a;font-weight:700}
.voice-stage .gold:hover{background:#f1d9b0}
.workspace-speaking .voice-stage .ghost{color:#dfedea;background:#ffffff06;border:1px solid #52707a}
.voice-stage .ghost:hover{background:#ffffff15}
.voice-stage .btn:disabled{opacity:.45;cursor:not-allowed}
.voice-stage .btn .ico{width:15px;height:15px}
.voice-stage .studio-alert{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;text-align:center;background:#ebc6860c;border:1px solid #ebc68635;color:#f0d8b3;border-radius:9px;padding:10px 12px;font-size:12px;line-height:1.5;margin:12px 0 18px}
.voice-stage .studio-alert .btn{min-height:30px;padding:4px 8px;font-size:11px}
.voice-stage .voice-note{font-size:12px;color:#bdd4d7;line-height:1.6;margin:10px 0 16px}
.voice-stage .practice-auto-voice{color:#b6cdd4;font-size:12px;margin:16px auto 4px}
.voice-stage .answer-form{text-align:left;border-top:1px solid #ffffff1a;padding-top:20px;margin-top:18px;gap:10px}
.voice-stage .answer-form label{font-size:12px;color:#cadfdf}
.voice-stage .answer-form textarea{min-height:115px;max-height:320px;resize:vertical;background:#081f2c80;border:1px solid #567482;border-radius:10px;color:#f3f8f9;font-size:15px;line-height:1.6;padding:13px}
.voice-stage textarea::placeholder{color:#8da8b5}
.voice-stage .primary{background:#a6dccb;color:#123b37;border-color:#a6dccb}
.voice-stage .voice-transcript{text-align:left;border-top:1px solid #ffffff1a;padding-top:15px;margin-top:20px;font-size:13px;color:#bedbd6}
.voice-transcript summary{padding:5px 0}
.voice-transcript>div{max-height:300px}
.voice-transcript p{padding:8px 0;line-height:1.7;overflow-wrap:anywhere}
.studio-sidebar{display:grid;gap:16px}
.studio-card{background:#fff;border:1px solid #dfe4df;border-radius:15px;padding:22px}
.studio-card h2{font:500 23px/1.3 Georgia,serif;color:#223d46;margin:15px 0 10px}
.studio-card p{font-size:13px;line-height:1.65;color:#63747a;margin:8px 0 14px}
.workspace-speaking .studio-card .textlink{font-size:12px;color:#23685f;line-height:1.5}
.studio-book .bar{height:5px;background:#e5eee8;margin:20px 0 10px}
.studio-book .bar span{background:#5a9a87}
.studio-book-count{font-size:11px;color:#6a7d7b;margin-bottom:20px}
.studio-steps{list-style:none;padding:0;margin:20px 0 0;display:grid;gap:18px}
.studio-steps li{display:flex;gap:13px}
.studio-steps li>span{font-size:11px;font-weight:700;color:#668d7e;padding-top:2px}
.studio-card h3{font-size:13px;font-weight:650;line-height:1.4;color:#24444b;margin:0}
.studio-steps p{margin:5px 0 0;font-size:12px}
.studio-starters{background:#eaf0e8;border-color:#dce5d9}
.studio-starters p{line-height:2.15;color:#426856;font-family:Georgia,serif;font-size:15px}
.studio-resources{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:22px 0}
.studio-resources>a{display:flex;align-items:center;gap:15px;padding:18px 22px;border:1px solid #dce2dc;background:#fff;border-radius:13px;color:#315b54;text-decoration:none}
.studio-resources>a:hover{border-color:#8dad9e;background:#f9fcf8}
.studio-resources strong{display:block;font-size:13px;color:#24454a}
.studio-resources span{display:block;font-size:12px;color:#728078;margin-top:5px}
.studio-resources>a>.ico:last-child{margin-left:auto;flex-shrink:0}
.workspace-speaking .speech-assessment{background:#fff;color:#253f47;border:1px solid #dfe4df;border-radius:16px;padding:25px;margin-top:24px}
.workspace-speaking .speech-assessment h2,.studio-help h2{font:500 25px/1.3 Georgia,serif;color:#213f47;margin:0 0 12px}
.workspace-speaking .speech-assessment p{color:#61737a;font-size:14px;line-height:1.7}
.workspace-speaking .speech-assessment .emphasis{color:#244f55;background:#f0f5f0;border-radius:8px;padding:14px 18px}
.workspace-speaking .speech-assessment .primary{background:#245e54;color:#fff;border-color:#245e54}
.workspace-speaking .speech-assessment .ghost{background:#fff;color:#245e54;border-color:#b5c7be}
.workspace-speaking .speech-assessment .scorecard{background:#eff5f0;color:#23463e;border-color:#cdded3}
.workspace-speaking .speech-assessment .scorecard li{color:#23463e}
.studio-help{margin:32px 0 24px;max-width:950px}
.studio-help details{border-bottom:1px solid #dce1da;padding:15px 0}
.studio-help summary{cursor:pointer;font-size:14px;font-weight:600;color:#31525a;line-height:1.5}
.studio-help p{font-size:14px;line-height:1.75;color:#64757b;padding-right:30px}
.shell .workspace-speaking .eyebrow{color:#477067}
.shell .workspace-speaking .studio-book .bar{background:#e5eee8}
.shell .workspace-speaking .studio-book .bar span{background:#5a9a87}
.shell .workspace-speaking .page-languages :is(strong,p){color:#365a51}
.shell .workspace-speaking .page-languages{background:#eaf0e8;border-color:#dce4d9}
.workspace-speaking .page-languages>div{background:#eaf0e8;color:#25464a;border-color:#dce4d9}
.workspace-speaking :is(button,a,summary,textarea):focus-visible{outline:3px solid #b9914e;outline-offset:4px}
@media(min-width:1600px){.studio-grid{grid-template-columns:minmax(0,1fr) 340px}.voice-stage .voice-center{min-height:265px}.studio-card{padding:25px}}
@media(max-width:1150px){.studio-grid{grid-template-columns:minmax(0,1fr) 265px;gap:16px}.studio-language{display:none}.studio-card{padding:18px}.voice-stage .voice-dock{padding:0 20px 24px}}
@media(max-width:900px){.studio-grid{grid-template-columns:1fr}.studio-sidebar{grid-template-columns:1fr 1fr}.studio-starters{grid-column:1/-1}.workspace-speaking .voice-stage{min-height:0}.studio-heading h1{font-size:32px}.voice-stage .voice-center{min-height:200px}}
@media(max-width:560px){.workspace-speaking.training-workspace{padding:18px 14px 30px}.studio-heading{margin-bottom:20px}.studio-heading h1{font-size:29px}.studio-heading p{font-size:13px}.studio-sidebar,.studio-resources{grid-template-columns:1fr}.studio-starters{grid-column:auto}.voice-stage .voice-head{padding:18px 16px;font-size:9px}.voice-stage .voice-dock{padding:0 16px 22px}.voice-dock h2{font-size:24px}.voice-stage .voice-question{font-size:14px}.voice-stage .voice-controls>.btn{flex:1 1 140px}.studio-resources{gap:12px}.workspace-speaking .speech-assessment{padding:20px 16px}.studio-help p{padding-right:0}}
@media(prefers-reduced-motion:reduce){.voice-stage .studio-wave i,.voice-stage .coach-robot-mouth{animation:none!important}}

/* Shared academy design. Keep this last so every module uses the same palette. */
:root{
  --ui-bg:#f5f4ef;--ui-paper:#fff;--ui-tint:#edf3ef;--ui-ink:#193640;
  --ui-muted:#63757b;--ui-line:#dce5df;--ui-accent:#286b60;--ui-on-accent:#fff;
  --ui-gold:#dfbc80;--ui-shadow:0 5px 22px #15373e06;
  --ui-sans:Inter,'Segoe UI',system-ui,sans-serif;--ui-serif:'Playfair Display',Georgia,serif;
}
html[data-theme="dark"]{
  --ui-bg:#101e29;--ui-paper:#172a36;--ui-tint:#203b43;--ui-ink:#e8f0ee;
  --ui-muted:#aec1c6;--ui-line:#304853;--ui-accent:#a4d7c7;--ui-on-accent:#113a32;
  --ui-gold:#e5c48c;--ui-shadow:0 5px 22px #00000012;
}
html :is(.shell,.professional-shell,.account-shell),
html[data-theme="dark"] :is(.shell,.professional-shell,.account-shell),
.shell .workspace{
  --sans:var(--ui-sans);--serif:var(--ui-serif);--ivory:var(--ui-bg);--paper:var(--ui-paper);
  --ink:var(--ui-ink);--muted:var(--ui-muted);--line:var(--ui-line);--navy:var(--ui-ink);
  --blue:var(--ui-accent);--green:var(--ui-accent);--gold:var(--ui-gold);
  --front-ground:var(--ui-bg);--front-ink:var(--ui-ink);--front-muted:var(--ui-muted);
  --front-line:var(--ui-line);--front-accent:var(--ui-accent);--front-button-text:var(--ui-on-accent);
  --app-tint:var(--ui-tint);--app-on-accent:var(--ui-on-accent);--app-edge:transparent;
  font-family:var(--ui-sans);background:var(--ui-bg);color:var(--ui-ink);
}
.shell :is(button,input,textarea,select),.professional-shell :is(button,input,textarea,select){font-family:var(--ui-sans)}
.shell .side{
  background:linear-gradient(165deg,#122f3d,#0e2431 75%);border:0;color:#c4d5dc;
  padding:24px 15px 16px;gap:18px;scrollbar-width:thin;scrollbar-color:#36525e transparent;
}
.shell .side .brand{flex:1 1 auto;min-width:0;gap:11px;margin:0 7px 2px}
.shell .side .brand>span:last-child{min-width:0}
.shell .side .brand strong{color:#f4f6ee;font:500 16px/1.14 var(--ui-serif)}
.shell .side .brand small{color:#c8b083;font-size:7px;letter-spacing:.15em}
.shell .side .brand-mark{border-radius:10px;box-shadow:0 3px 12px #0002}
.shell .side .nav-group .nav-label{color:#a2bbc5;font-size:9px;letter-spacing:.15em;padding:11px 11px 6px}
.shell .side .nav-group{gap:2px}
.shell .side-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.shell :is(.menu-toggle,.side-close),.shell .menu-backdrop[hidden]{display:none}
.shell .shell-content{min-width:0}
.shell .side .navitem{padding:6px 10px;min-height:37px;gap:10px;font-size:12px;color:#c4d5dc;border-radius:9px;transition:background .16s,color .16s}
.shell .side .navitem:hover{background:#ffffff0c;color:#fff}
.shell .side .navitem.active{background:#2c565d;color:#e3f2e7;box-shadow:inset 3px 0 #dfbc80}
.shell .side .nav-emblem{background:transparent;color:inherit;width:25px;height:25px;flex-basis:25px;border-radius:0}
.shell .side .navitem .ico{width:17px;height:17px}
.shell .side .side-note{border-color:#ffffff18}
.shell .topbar{min-height:76px;background:var(--ui-paper);border-color:var(--ui-line);padding:14px clamp(18px,3vw,40px)}
.shell .crumb{font-size:12px;gap:11px;color:var(--ui-muted);min-width:0}
.shell .crumb strong{color:var(--ui-ink);font-weight:600}
.shell .top-actions{gap:9px;flex-shrink:0}
.shell :is(.theme-toggle,.language,.streak-link,.workspace-account-link){background:var(--ui-paper);color:var(--ui-muted);border:1px solid var(--ui-line);border-radius:10px;min-height:38px}
.shell .theme-toggle{width:38px;height:38px;flex-basis:38px}
.shell .workspace-account-link{font-size:12px;color:var(--ui-ink);padding:7px 10px}
.shell .account-initials{background:var(--ui-tint);color:var(--ui-accent);border-radius:6px}
.shell .streak-link{padding:7px 10px;font-size:12px}
.shell .workspace{width:100%;max-width:1450px;padding:30px clamp(18px,3vw,42px) 56px}
.shell .workspace :is(.wide-title,.lab-heading){margin-bottom:28px}
.shell .workspace .wide-title h1,.shell .workspace .lab-heading h1{
  font:500 clamp(30px,3.5vw,45px)/1.2 var(--ui-serif);letter-spacing:-.035em;color:var(--ui-ink);margin:9px 0 12px;
}
.shell .workspace .wide-title p{max-width:68ch;font-size:14px;line-height:1.75;color:var(--ui-muted)}
.shell .workspace .eyebrow{color:var(--ui-accent);font-size:10px;letter-spacing:.14em;font-weight:700}
.shell .workspace :is(.card,.lab-card,.workspace-tool,.workspace-progress-overview,.stat,.lab-tool,.library-resource,.source-entry){
  background:var(--ui-paper);border:1px solid var(--ui-line);border-radius:15px;box-shadow:var(--ui-shadow);
}
.shell .workspace .card{padding:24px}
.shell .workspace :is(.card h2,.lab-card>h2,.subhead,.workspace-group>header h2){font:500 clamp(22px,2.1vw,29px)/1.28 var(--ui-serif);letter-spacing:-.025em;color:var(--ui-ink)}
.shell .workspace :is(.card h3,.workspace-tool h3,.lab-tool h3,.library-resource h3){font:600 17px/1.4 var(--ui-sans);letter-spacing:-.02em;color:var(--ui-ink)}
.shell .workspace .card p{font-size:14px;line-height:1.75;color:var(--ui-muted)}
.shell .workspace :is(.stack,.board-grid,.lab-columns,.workspace-tool-grid,.dashboard-cols){gap:20px}
.shell .workspace .lab-columns>*{min-width:0}
.shell .workspace .card-top{margin-bottom:17px}
.shell .workspace :is(.tile-icon,.workspace-tool-icon){width:40px;height:40px;border-radius:11px;background:var(--ui-tint);color:var(--ui-accent)}
.shell .workspace .textlink{color:var(--ui-accent);font-weight:600;font-size:13px;line-height:1.5}
.shell .workspace :is(.btn,.chip){box-shadow:none;border-radius:9px;font-weight:600;transition:background .16s,border-color .16s,transform .16s}
.shell .workspace .btn{min-height:43px;padding:11px 16px;font-size:12px}
.shell .workspace .btn.primary{background:var(--ui-accent);color:var(--ui-on-accent);border-color:var(--ui-accent)}
.shell .workspace .btn.gold{background:var(--ui-gold);color:#21373d;border-color:var(--ui-gold)}
.shell .workspace .btn.ghost{background:var(--ui-paper);color:var(--ui-ink);border-color:var(--ui-line)}
.shell .workspace .btn:hover:not(:disabled){filter:brightness(.96);transform:translateY(-1px)}
.shell .workspace .btn:active{transform:none;box-shadow:none}
.shell .workspace :is(.chip,.workspace-filter){padding:8px 13px;border-radius:24px;background:var(--ui-paper);color:var(--ui-muted);border:1px solid var(--ui-line);font-size:12px}
.shell .workspace :is(.chip[aria-pressed="true"],.workspace-filter[aria-pressed="true"],.chip[aria-current="page"]){background:var(--ui-accent);color:var(--ui-on-accent);border-color:var(--ui-accent)}
.shell .workspace .bar{height:6px;background:var(--ui-tint);border-radius:20px}
.shell .workspace .bar span{background:var(--ui-accent);border-radius:20px}
.shell .workspace .tag{font-size:10px;font-weight:600;padding:5px 9px;background:var(--ui-tint);color:var(--ui-accent)}
.shell .workspace :is(.form input,.form textarea,.form select,.learning-toolbar input,.library-toolbar input,.library-toolbar select,.workspace-directory-filter input){
  border:1px solid var(--ui-line);background:var(--ui-paper);color:var(--ui-ink);border-radius:9px;padding:11px 13px;font-size:14px;
}
.shell .workspace .form label{color:var(--ui-ink);font-size:12px;font-weight:600;gap:7px}
.shell .workspace .form textarea{line-height:1.75;min-height:110px}
.shell .workspace :is(input,textarea)::placeholder{color:var(--ui-muted);opacity:.8}
.shell .workspace :is(.feedback,.writing-example,.lab-glossary>div,.lab-report>div,.debate-draft,.activity-wait){background:var(--ui-tint);color:var(--ui-ink);border-radius:10px;border-color:var(--ui-line);line-height:1.7}
.shell .workspace .choice{background:var(--ui-paper);color:var(--ui-ink);border-color:var(--ui-line);border-radius:10px;padding:15px;line-height:1.6}
.shell .workspace .choice.good{background:#e5f3e9;color:#245a42;border-color:#8ab49b}
.shell .workspace .choice.bad{background:#faeeea;color:#8b3e34;border-color:#d9a89d}
.shell .workspace .page-languages{background:transparent;border-color:var(--ui-line);margin-top:32px}
.shell .workspace .page-languages>div{background:var(--ui-tint);border-color:var(--ui-line);border-radius:10px;padding:16px}
.shell .workspace .page-languages :is(strong,p){color:var(--ui-muted);font-size:12px;line-height:1.7}
.shell .workspace .page-languages strong{color:var(--ui-accent);font-weight:600}
/* Overview and course catalogue */
.shell .workspace :is(.dashboard-banner,.workspace-intro){
  background:radial-gradient(ellipse at 100% 0,#326872 0,transparent 62%),#153b48;
  color:#f4f7f1;border:1px solid #2e5361;border-radius:20px;padding:clamp(26px,3.5vw,48px);
}
.shell .workspace :is(.dashboard-banner,.workspace-intro) h1{font:500 clamp(32px,3.6vw,49px)/1.16 var(--ui-serif);letter-spacing:-.035em;color:#f7f8ee;max-width:20ch}
.shell .workspace :is(.dashboard-banner,.workspace-intro) p{font-size:14px;line-height:1.8;color:#c4d8de;max-width:58ch}
.shell .workspace :is(.dashboard-banner,.workspace-intro) .eyebrow{color:#e3c58e}
.shell .workspace :is(.workspace-progress-overview h2,.workspace-catalog-head h2){font:500 28px/1.25 var(--ui-serif);color:var(--ui-ink)}
.shell .workspace .workspace-intro::after{opacity:.15}
.shell .workspace .mapart{opacity:.18}
.shell .workspace .stat-row{gap:16px;margin:22px 0}
.shell .workspace .stat{padding:20px;min-height:98px}
.shell .workspace .stat strong{font:600 26px/1.1 var(--ui-sans);letter-spacing:-.04em;color:var(--ui-ink)}
.shell .workspace .stat small{font-size:11px;color:var(--ui-muted)}
.shell .workspace .stat-ring:before{background:var(--ui-paper)}
.shell .workspace .road-node{padding:12px 7px 12px 0;min-height:86px;gap:16px}
.shell .workspace .road-circle{background:var(--ui-tint);border:1px solid var(--ui-line);box-shadow:none;color:var(--ui-accent);border-radius:14px}
.shell .workspace .roadmap .next .road-circle{background:var(--ui-accent);color:var(--ui-on-accent);border-color:var(--ui-accent);box-shadow:0 0 0 5px var(--ui-tint)}
.shell .workspace .roadmap .done .road-circle{background:var(--ui-tint);color:var(--ui-accent);box-shadow:none}
.shell .workspace .road-copy strong{font-size:14px;font-weight:600}
.shell .workspace .road-copy small{line-height:1.6;font-size:12px}
.shell .workspace .daily-brief{background:#173e49;border-color:#315763;color:#f3f7ef}
.shell .workspace .card.daily-brief :is(h2,h3){color:#f3f7ef}
.shell .workspace .daily-brief p{color:#c3d9dd}
.shell .workspace :is(.workspace-tool,.lab-tool,.library-resource){transition:border-color .18s,box-shadow .18s;min-width:0}
.shell .workspace :is(.workspace-tool,.lab-tool,.library-resource):hover{border-color:#7dafa0;box-shadow:0 7px 25px #244c4710}
.shell .workspace .workspace-tool{padding:22px;gap:15px}
.shell .workspace .catalog-action{font-size:12px;font-weight:600;color:var(--ui-accent);padding-top:14px}
.shell .workspace .workspace-directory-filter{margin-top:22px}
.shell .workspace .workspace-directory-filter{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px}
.shell .workspace :is([data-directory-group],[data-directory-tool],[data-workspace-reset])[hidden]{display:none}
.shell .workspace .workspace-group{margin-top:32px}
.shell .workspace .module-level{font-size:10px;padding:4px 8px}
/* Reading, languages, community, reports and practice tools */
.shell .workspace .article{padding:clamp(20px,3vw,38px)}
.shell .workspace .article h2{font-family:var(--ui-serif);font-size:clamp(27px,3vw,39px);line-height:1.25}
.shell .workspace :is(.reader-copy,.reading-transcription){background:var(--ui-paper)}
.shell .workspace .reader-copy p{color:var(--ui-ink);font-size:15px;line-height:1.95}
.shell .workspace .reader-controls{background:var(--ui-tint);border-color:var(--ui-line)}
.shell .workspace .reader-lookup{background:var(--ui-paper);border-color:var(--ui-line);border-radius:12px}
.shell .workspace .pagebtn{padding:9px 10px;border-radius:8px;min-height:37px}
.shell .workspace .pagebtn[aria-current="true"]{background:var(--ui-tint);color:var(--ui-accent);font-weight:600}
.shell .workspace .word-card blockquote{margin:15px 0 0;padding:14px 16px;background:var(--ui-tint);border-left:2px solid var(--ui-accent);border-radius:0 9px 9px 0;font:italic 15px/1.8 var(--ui-serif);color:var(--ui-ink)}
.shell .workspace .word-translation{font-size:13px;color:var(--ui-accent)}
.shell .workspace :is(.language-step,.language-resume,.language-review){border-radius:15px}
.shell .workspace .language-number{background:var(--ui-tint);color:var(--ui-accent);border-color:var(--ui-line);border-radius:13px}
.shell .workspace .language-step.is-next{border-color:#8eb8a6}
.shell .workspace .activity-bars{border-color:var(--ui-line);background-color:var(--ui-paper)}
.shell .workspace :is(.lab-table,.diplomacy-table){font-size:13px;line-height:1.65}
.shell .workspace .diplomacy-table{max-width:100%;overflow-x:auto;border:1px solid var(--ui-line);border-radius:10px}
.shell .workspace .diplomacy-table table{min-width:420px}
.shell .workspace :is(.lab-table th,.diplomacy-table th){background:var(--ui-tint);color:var(--ui-ink)}
.shell .workspace .diplomacy-table .priority{background:color-mix(in srgb,var(--ui-accent) 16%,var(--ui-paper));color:var(--ui-ink)}
.shell .workspace .community-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:20px;margin-bottom:28px}
.shell .workspace .community-feature{display:flex;flex-direction:column;justify-content:center;min-height:250px;background:radial-gradient(ellipse at 100% 0,#31666e,transparent 65%),#153b48;border-color:#315963}
.shell .workspace .card.community-feature h2{color:#f4f7ee}
.shell .workspace .community-feature :is(p,.textlink){color:#cee0e2}
.shell .workspace .community-feature .tile-icon{background:#ffffff12;color:#afddce}
.shell .workspace .community-empty{padding:16px;background:var(--ui-tint);border:1px dashed var(--ui-line);border-radius:12px}
.shell .workspace .community-empty p{margin:0 0 8px}
.shell .workspace .community-empty p:last-child{margin-bottom:0}
.shell .workspace .community-draft p{overflow-wrap:anywhere;white-space:pre-wrap}
.shell .workspace .community-board .library-grid{grid-template-columns:minmax(0,1fr);margin-bottom:0}
.shell .workspace .training-navigation{gap:8px;margin-bottom:26px}
.shell .workspace .training-navigation a{background:var(--ui-paper);border-color:var(--ui-line);color:var(--ui-muted);font-size:12px;border-radius:30px;padding:9px 14px}
.shell .workspace .training-navigation a[aria-current="page"]{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-on-accent)}
.shell .workspace :is(.exchange,.scorecard){background:var(--ui-tint);border-color:var(--ui-line);color:var(--ui-ink);border-radius:12px}
.shell .workspace .exchange.student{background:var(--ui-paper);border-left:3px solid var(--ui-accent)}
.shell .workspace :is(.exchange p,.scorecard li,.conversation p){color:var(--ui-ink)}
.shell .workspace .practice-auto-voice{color:var(--ui-muted);font-size:12px}
/* The voice stage remains a dark, focused canvas in both themes. */
.shell .workspace .voice-stage :is(h2,.voice-question){color:#edf6f4}
.shell .workspace .voice-stage .btn.ghost{background:#ffffff06;color:#dcece7;border-color:#557984}
.shell .workspace .voice-stage .btn.primary{background:#a6dccb;color:#123b37;border-color:#a6dccb}
.shell .workspace .voice-stage .form label{color:#ccdfdf}
.shell .workspace .voice-stage .form textarea{background:#0b2332;color:#f0f6f6;border-color:#52717c}
.shell .workspace .voice-stage .practice-auto-voice{color:#b8d1d4}
.shell .workspace .voice-stage .dim{color:#abc6cf}
.shell .workspace .studio-heading h1{color:var(--ui-ink)}
.shell .workspace .studio-heading p{color:var(--ui-muted)}
.shell .workspace :is(.studio-card,.studio-language,.studio-resources>a){background:var(--ui-paper);border-color:var(--ui-line);color:var(--ui-ink)}
.shell .workspace .studio-starters{background:var(--ui-tint)}
.shell .workspace :is(.studio-card h2,.studio-card h3,.studio-resources strong,.studio-help h2,.studio-help summary){color:var(--ui-ink)}
.shell .workspace :is(.studio-card p,.studio-book-count,.studio-resources span,.studio-help p){color:var(--ui-muted)}
.shell .workspace .studio-card .textlink{color:var(--ui-accent)}
.shell .workspace .studio-help details{border-color:var(--ui-line)}
.shell .workspace .speech-assessment .emphasis{background:var(--ui-tint);color:var(--ui-ink)}
.studio-topic {
  margin: 20px auto 0;
  padding: 14px;
  text-align: start;
  max-width: 500px;
  border: 1px solid #486b74;
  border-radius: 11px;
}
.studio-topic label {
  display: block;
  margin-bottom: 7px;
  color: #c8dbe1;
  font-size: 12px;
}
.studio-topic > div { display:flex; gap:8px; flex-wrap:wrap; }
.studio-topic select {
  flex: 1 1 160px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #557984;
  border-radius: 9px;
  color: #edf7f5;
  background: #133442;
}
.practice-progress { margin-block: 16px; }
.practice-progress p { margin:0; }
.voice-stage .practice-progress p { color:#c9e2e2; }
.voice-stage .practice-progress { max-width:410px; margin-inline:auto; }
.shell .workspace .voice-stage .practice-progress .bar { background:#325563; }
.shell .workspace .voice-stage .practice-progress .bar span { background:#9ed9c4; }
.practice-feedback {
  margin-top: 18px;
  padding: 15px 18px;
  background: var(--ui-tint);
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  border-radius: 11px;
  text-align: start;
}
.practice-feedback h3 { font:600 14px/1.45 var(--ui-sans); }
.practice-feedback p { margin:6px 0; }
.practice-feedback ul { margin:8px 0; padding-inline-start:20px; }
.practice-feedback li { margin-block:5px; }
.practice-feedback small { color:var(--ui-muted); }
.voice-stage .practice-feedback { background:#143844; color:#e3f1f0; border-color:#416671; }
.voice-stage .practice-feedback :is(p,small) { color:#bad4db; }
.language-best { color:var(--ui-accent); font-weight:600; }
.drill-review { padding:14px; border:1px solid var(--ui-line); border-radius:10px; background:var(--ui-tint); }
.drill-review summary { cursor:pointer; font-weight:600; }
.drill-review li { margin-block:10px; }
.shell .workspace .drill-review p { margin:4px 0; }
/* Account and sign-in */
html .auth-page,html[data-theme="dark"] .auth-page{
  --auth-bg:var(--ui-bg);--auth-ink:var(--ui-ink);--auth-muted:var(--ui-muted);
  --auth-line:var(--ui-line);--auth-paper:var(--ui-paper);--auth-action:var(--ui-accent);--auth-on-action:var(--ui-on-accent);font-family:var(--ui-sans);
}
.auth-header{background:var(--ui-paper)}
.auth-content{background:radial-gradient(ellipse at 0 0,var(--ui-tint),transparent 70%)}
.auth-panel{width:min(100%,450px);background:var(--ui-paper);border:1px solid var(--ui-line);border-radius:20px;padding:30px;box-shadow:var(--ui-shadow)}
.auth-panel h1{font:500 clamp(32px,3vw,42px)/1.2 var(--ui-serif)}
.auth-description{font-size:14px;line-height:1.8}
.auth-panel :is(.auth-google,.auth-submit,#firebase-login input){border-radius:9px;font-size:14px}
.auth-panel #firebase-login label{font-size:12px;gap:7px}
.auth-alternate,.auth-divider,.auth-link{font-size:12px}
.auth-photo figcaption{border-radius:9px;background:#102e3bd9;font-size:11px}
#dialog{color:var(--ui-ink);background:var(--ui-paper);border:1px solid var(--ui-line);border-radius:16px}
#dialog h3{font:500 25px/1.2 var(--ui-serif)}
#dialog .form :is(input,textarea){background:var(--ui-bg);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:9px}
#dialog .form .primary{background:var(--ui-accent);color:var(--ui-on-accent)}
:is(.shell,.auth-page) :is(a,button,input,textarea,select,summary):focus-visible{outline:3px solid #bc9553;outline-offset:3px}
:is(.shell) :is(.btn,.chip,a,summary){-webkit-tap-highlight-color:transparent}
/* Compact layouts preserve readable cards and accessible controls. */
@media(max-width:1100px){
  .shell .side{padding-inline:11px}.shell .side .navitem{font-size:11px;gap:6px}
  .shell .workspace{padding-inline:24px}.shell .workspace .card{padding:20px}
  .shell .workspace-academy .workspace-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .shell .workspace .stat{padding:15px}.shell .workspace .stat strong{font-size:23px}
}
@media(max-width:800px){
  .shell .workspace :is(.dashboard-cols,.reading-layout,.workspace-directory-head,.community-layout){grid-template-columns:minmax(0,1fr)}
  .shell .workspace .network-columns{grid-template-columns:1fr}
  .shell .workspace .reader-spread{grid-template-columns:1fr}
  .shell .workspace .reader-sidebar{position:static}
}
@media(max-width:640px){
  .shell .side{padding:22px 15px;width:260px}.shell .side .navitem{font-size:12px;min-height:44px}
  body.menu-open{overflow:hidden}
  .shell .side.open{box-shadow:12px 0 36px #0005}
  .shell .menu-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:9;background:#071925a8}
  .shell :is(.menu-toggle,.side-close){display:inline-grid;flex:none}
  .shell .side-close{width:32px;height:32px;color:#d8e9eb;border-color:#54737b}
  .shell .side-close .ico{width:17px;height:17px}
  .shell .topbar{min-height:70px;padding:12px 15px;gap:10px;flex-wrap:wrap}
  .shell .crumb{gap:8px;line-height:1.4;font-size:11px}.shell .crumb>span{display:none}
  .shell .top-actions{gap:7px}.shell .workspace-account-link.signed>span:last-child{max-width:85px}
  .shell .workspace{padding:23px 15px 38px}.shell .workspace .wide-title{margin-bottom:23px}
  .shell .workspace .wide-title h1{font-size:32px}.shell .workspace .wide-title p{font-size:13px}
  .shell .workspace .card{padding:19px}.shell .workspace .card p{font-size:13px}
  .shell .workspace :is(.stack,.board-grid,.lab-columns,.workspace-tool-grid,.dashboard-cols){gap:15px}
  .shell .workspace :is(.dashboard-banner,.workspace-intro){padding:25px 22px;border-radius:17px}
  .shell .workspace :is(.dashboard-banner,.workspace-intro) h1{font-size:32px;line-height:1.2}
  .shell .workspace .stat-row{grid-template-columns:1fr;gap:10px;margin:16px 0}
  .shell .workspace .stat{padding:15px 18px;min-height:75px;flex-wrap:nowrap}
  .shell .workspace .stat strong{font-size:24px}.shell .workspace .stat small{font-size:12px}
  .shell .workspace .stat-ring{width:40px;height:40px;flex-basis:40px}
  .shell .workspace-academy .workspace-tool-grid{grid-template-columns:1fr}
  .shell .workspace .workspace-tool{padding:20px}
  .shell .workspace .studio-sidebar{grid-template-columns:1fr}
  .shell .workspace .form :is(input,select,textarea){font-size:16px}
  .shell .workspace .btn{min-height:44px}
  .auth-content{padding:28px 16px}.auth-panel{padding:24px 20px}
}
@media(prefers-reduced-motion:reduce){.shell * *{animation:none!important;transition:none!important}}

/* Academy navigation and dashboard */
.portal-search {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 0 11px;
  color: var(--ui-muted);
  background: var(--ui-bg);
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  white-space: nowrap;
  font: 500 12px var(--ui-sans);
}
.portal-search:hover { border-color: var(--ui-accent); color: var(--ui-accent); }
.portal-search .ico { width: 17px; height: 17px; }
.portal-search kbd {
  font: 500 10px var(--ui-sans);
  padding: 3px 5px;
  border: 1px solid var(--ui-line);
  border-radius: 5px;
  background: var(--ui-paper);
}
.shell .workspace .dashboard-welcome {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(260px,.85fr);
  gap: clamp(24px,4.5vw,72px);
  align-items: center;
  background:
    linear-gradient(100deg,#102e3df7 20%,#183c4be6 66%,#183c4bbd),
    url('./assets/photos/palais.webp') center 54% / cover no-repeat;
}
.dashboard-welcome-copy .actions { margin-top:23px; }
.shell .workspace .dashboard-welcome-copy h1 { margin:0 0 12px; }
.dashboard-next {
  min-width: 0;
  padding: clamp(17px,2.4vw,26px);
  border: 1px solid #cadfd743;
  border-radius: 14px;
  background: #0b2637b8;
}
.dashboard-next h2 {
  margin: 10px 0 8px;
  color: #f7f4eb;
  font: 500 clamp(22px,2vw,30px)/1.24 var(--ui-serif);
}
.shell .workspace .dashboard-next p { font-size:13px; margin-bottom:15px; }
.shell .workspace-dashboard .stat-row { grid-template-columns:repeat(4,minmax(0,1fr)); }
.shell .workspace-dashboard .stat {
  min-height: 95px;
  gap: 8px;
  padding: 16px;
  flex-wrap: nowrap;
}
.shell .workspace-dashboard .stat:hover { border-color:var(--ui-accent); }
.shell .workspace-dashboard .stat strong { font-size:23px; }
.shell .workspace-dashboard .stat-ring { width:37px; height:37px; flex-basis:37px; }
.dashboard-modules { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-block:22px; }
.shell .workspace .dashboard-module-card h2 { display:flex; align-items:center; gap:10px; font-size:23px; }
.dashboard-module-card h2 .ico { color:var(--ui-accent); width:18px; height:18px; }
.dashboard-module-card .textlink { margin-top:8px; }
.module-rows { list-style:none; margin:10px 0 0; padding:0; }
.module-rows li + li { border-top:1px solid var(--ui-line); }
.module-rows a {
  display: grid;
  grid-template-columns: 33px minmax(0,1fr) 17px;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--ui-ink);
}
.module-rows a:hover { background:var(--ui-tint); border-radius:7px; }
.module-rows a > .ico { width:15px; height:15px; color:var(--ui-accent); }
.module-row-icon {
  display:grid;
  place-items:center;
  width:33px;
  height:33px;
  border-radius:8px;
  color:var(--ui-accent);
  background:var(--ui-tint);
}
.module-row-icon .ico { width:16px; height:16px; }
.module-bookmark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 35px;
  height: 35px;
  background: var(--ui-paper);
  color: var(--ui-muted);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
}
.module-bookmark .ico { width:17px; height:17px; }
.module-bookmark[aria-pressed="true"], .module-bookmark:hover { color:var(--ui-accent); background:var(--ui-tint); }
.module-bookmark[aria-pressed="true"] .ico { fill:currentColor; }
[data-directory-tool] { position:relative; }
.catalog-bookmark { position:absolute; top:19px; right:18px; }
.workspace-tool:has(+ .catalog-bookmark) .workspace-tool-top { padding-inline-end:43px; }
.shell .workspace [data-workspace-saved] { display:inline-flex; align-items:center; gap:6px; }
[data-workspace-saved] .ico { width:14px; height:14px; }
#quick-find {
  width: min(560px, calc(100% - 28px));
  max-height: min(680px, calc(100dvh - 28px));
  padding: clamp(15px,3vw,24px);
  border-radius: 17px;
  border: 1px solid var(--ui-line);
  background: var(--ui-paper);
  color: var(--ui-ink);
  box-shadow: 0 20px 65px #061b2e55;
}
#quick-find h2 { font:500 25px/1.25 var(--ui-serif); }
#quick-find .close { color:var(--ui-ink); border-color:var(--ui-line); }
.quick-find-input {
  display:flex;
  align-items:center;
  gap: 10px;
  padding-inline: 12px;
  color:var(--ui-accent);
  background:var(--ui-bg);
  border:1px solid var(--ui-line);
  border-radius:10px;
}
.quick-find-input:focus-within { outline:2px solid var(--ui-accent); outline-offset:2px; }
.quick-find-input input {
  width:100%;
  min-width:0;
  min-height:45px;
  font-size:16px;
  background:transparent;
  color:var(--ui-ink);
  border:0;
  outline:none;
}
.quick-find-input input::placeholder { color:var(--ui-muted); }
#quick-find-count { min-height:1em; margin:12px 0 6px; color:var(--ui-muted); font-size:12px; }
#quick-find-results h3 { font:600 13px var(--ui-sans); margin:8px 0; }
.quick-find-empty { color:var(--ui-muted); font-size:13px; }
@media (min-width:1150px) {
  .shell .topbar { position:sticky; top:0; z-index:6; }
  .shell .workspace { scroll-margin-top:86px; }
}
@media (max-width:1120px) {
  .shell .portal-search span, .shell .portal-search kbd { display:none; }
}
@media (max-width:900px) {
  .shell .workspace-dashboard .stat-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .shell .workspace .dashboard-welcome { grid-template-columns:minmax(0,1fr); gap:22px; }
  .dashboard-next { padding:16px; }
}
@media (max-width:640px) {
  .shell .workspace-dashboard .stat { min-height:79px; padding:11px; }
  .shell .workspace-dashboard .stat strong { font-size:20px; }
  .shell .workspace-dashboard .stat-ring { width:31px; height:31px; flex-basis:31px; }
  .shell .workspace-dashboard .stat-ring .ico { width:15px; height:15px; }
  .dashboard-modules { grid-template-columns:1fr; gap:14px; }
  .dashboard-welcome-copy .actions { margin-top:15px; }
}

.task-hero {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(235px,.65fr);
  gap:clamp(20px,4vw,52px);
  align-items:center;
  padding:clamp(23px,3.5vw,46px);
  border-radius:22px;
  border:1px solid #2f5262;
  background:
    linear-gradient(105deg,#112d3cf7 28%,#11394ae6 62%,#1a404fbd 100%),
    url('./assets/photos/registan-court.webp') right 52% / cover #142f3f;
}
.task-hero-copy { min-width:0; }
.shell .workspace .task-hero h1 {
  margin:14px 0 11px;
  color:#fff8e9;
  font:500 clamp(34px,4.2vw,56px)/1.08 var(--ui-serif);
  letter-spacing:-.045em;
}
.task-hero-copy > p { color:#c9dce2; line-height:1.72; font-size:14px; max-width:47ch; }
.task-clock {
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  min-height:31px;
  padding:5px 9px;
  color:#b9d7dc;
  background:#092534b3;
  border:1px solid #65808a;
  border-radius:7px;
  font-size:11px;
  font-weight:600;
}
.task-clock .ico { width:14px; height:14px; }
.task-clock time { color:#f7dcac; font-variant-numeric:tabular-nums; }
.task-date { display:block; margin-top:14px; color:#bcced6; font-size:11px; }
.task-scorecard {
  min-width:0;
  padding:18px 20px;
  border:1px solid #78969e;
  border-radius:15px;
  background:#0d2939e8;
  color:#f8f0e0;
}
.task-scorecard > p { color:#bfd5dd; font-size:12px; font-weight:600; }
.task-score { display:flex; align-items:baseline; gap:8px; line-height:1.12; margin-top:4px; }
.task-score strong { font:500 clamp(34px,4vw,48px)/1.15 var(--ui-serif); color:#f7d9a3; }
.task-score span { color:#b7cdd6; font-size:13px; }
.task-score-meter { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin-top:12px; }
.task-score-meter span { height:5px; border-radius:5px; background:#48616e; }
.task-score-meter span[data-filled="true"] { background:#e4b970; }
.task-score-footer {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  border-top:1px solid #ffffff25;
  margin-top:16px;
  padding-top:10px;
}
.task-score-footer strong, .task-score-footer span { display:block; }
.task-score-footer strong { font-size:15px; }
.task-score-footer span { color:#aec6d0; margin-top:2px; font-size:11px; }
.task-section-head {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  margin:28px 0 14px;
}
.shell .workspace .task-section-head h2, .shell .workspace .task-history-head h2 {
  font:500 clamp(24px,3vw,31px)/1.16 var(--ui-serif);
}
.task-section-head p { font-size:12px; line-height:1.5; }
.task-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.shell .workspace .task-card {
  --task-color:var(--ui-accent);
  --task-tint:var(--ui-tint);
  min-width:0;
  border-top:3px solid #649e8f;
  padding:clamp(17px,2.2vw,24px);
}
.shell .workspace .task-card-book {
  --task-color:#865d2b;
  --task-tint:#f7eee0;
  border-top-color:#c89c64;
}
html[data-theme="dark"] .shell .workspace .task-card-book { --task-color:#efc78f; --task-tint:#352f2b; }
.task-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px; }
.task-kind-icon, .task-history-head > span, .task-confirmed-icon, .task-receipt-icon {
  display:grid;
  place-items:center;
  flex:none;
  width:38px;
  height:38px;
  border-radius:10px;
  color:var(--task-color,var(--ui-accent));
  background:var(--task-tint,var(--ui-tint));
}
.task-kind-icon .ico { width:20px; height:20px; }
.task-state {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px 9px;
  border-radius:20px;
  background:var(--ui-tint);
  color:var(--ui-accent);
  font-size:11px;
  font-weight:650;
}
.task-state[data-points="0"] { background:var(--ui-bg); color:var(--ui-muted); border:1px solid var(--ui-line); }
.task-state[data-points="1"] { background:var(--task-tint); color:var(--task-color); border:1px solid var(--ui-line); }
.task-state svg { width:13px; height:13px; }
.shell .workspace .task-card .task-name {
  font:500 clamp(23px,2.5vw,29px)/1.16 var(--ui-serif);
  letter-spacing:-.025em;
}
.shell .workspace .task-card .task-description { font-size:13px; margin:8px 0 16px; }
.task-cutoffs {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin:0 0 17px;
  gap:7px;
}
.task-cutoffs div { background:var(--ui-bg); border:1px solid var(--ui-line); padding:10px 11px; border-radius:9px; }
.task-cutoffs div:first-child { background:var(--task-tint); }
.task-cutoffs dt { color:var(--ui-muted); font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
.task-cutoffs dd { margin:4px 0 0; color:var(--ui-ink); font-size:15px; font-weight:650; }
.task-cutoffs div:first-child dd { color:var(--task-color); }
.task-compose > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:43px;
  padding:9px 13px;
  border-radius:8px;
  color:var(--ui-on-accent);
  background:var(--ui-accent);
  font-size:13px;
  font-weight:650;
  cursor:pointer;
  list-style:none;
}
.task-compose > summary::-webkit-details-marker, .task-receipt summary::-webkit-details-marker { display:none; }
.task-compose > summary .ico { width:16px; height:16px; }
.task-compose[open] > summary { background:var(--ui-tint); color:var(--ui-accent); }
.task-compose[open] > summary .ico, .task-receipt[open] summary > .ico { rotate:90deg; }
.task-form { padding-top:17px; }
.task-submit { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.task-submit small,.task-confirmed div span,.task-receipt small { color:var(--ui-muted); font-size:11px; }
.task-loading,.task-history { margin-top:18px; }
.task-message:empty { display:none; }
.task-message { background:var(--ui-tint); color:var(--ui-ink); border-radius:9px; padding:10px 14px; margin-top:16px; }
.task-message[data-error="true"] { border-inline-start:3px solid #c98468; }
.task-confirmed {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  padding:10px 12px;
  border:1px solid var(--ui-line);
  border-radius:10px;
}
.task-confirmed div { display:grid; gap:2px; overflow-wrap:anywhere; }
.task-confirmed div strong,.task-confirmed b { font-size:13px; }
.task-confirmed b { color:var(--ui-accent); white-space:nowrap; }
.task-confirmed-icon,.task-receipt-icon,.task-history-head > span { width:31px; height:31px; border-radius:8px; }
.task-confirmed-icon .ico,.task-receipt-icon .ico,.task-history-head .ico { width:16px; height:16px; }
.task-history-head { display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.task-receipt { border-top:1px solid var(--ui-line); }
.task-receipt summary {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  padding-block:11px;
  gap:10px;
  cursor:pointer;
  list-style:none;
}
.task-receipt summary:hover { color:var(--ui-accent); }
.task-receipt-copy { display:grid; min-width:0; gap:2px; }
.task-receipt summary b { color:var(--ui-accent); white-space:nowrap; font-size:12px; }
.task-receipt summary > .ico { width:15px; height:15px; color:var(--ui-accent); }
.task-receipt :is(strong,p) { overflow-wrap:anywhere; }
.task-receipt p { white-space:pre-wrap; }
.task-receipt .textlink { margin-bottom:12px; }
.task-empty {
  margin-top:10px;
  padding:14px;
  border:1px dashed var(--ui-line);
  border-radius:9px;
  background:var(--ui-bg);
}
.shell .workspace .task-empty p { margin:0; font-size:13px; }
.shell .workspace .task-draft-status {
  margin:0;
  color:var(--ui-accent);
  font-size:12px;
}
.task-draft-status:empty { display:none; }
.task-card { scroll-margin-top:95px; }
.dashboard-daily-head {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  flex-wrap:wrap;
  gap:9px;
  margin-bottom:13px;
}
.shell .workspace .dashboard-daily h2 {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:22px;
}
.dashboard-daily h2 .ico { width:17px; height:17px; color:var(--ui-accent); }
.dashboard-task-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.dashboard-task {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  gap:9px;
  padding:10px;
  border:1px solid var(--ui-line);
  border-radius:10px;
  background:var(--ui-bg);
}
.dashboard-task:hover { border-color:var(--ui-accent); }
.dashboard-task .task-kind-icon { width:34px; height:34px; border-radius:8px; }
.dashboard-task .ico { width:15px; height:15px; color:var(--ui-accent); }
.dashboard-task-detail { min-width:0; }
.dashboard-task-detail strong,.dashboard-task-detail small { display:block; }
.dashboard-task-detail strong { font-size:13px; }
.dashboard-task-detail small,.dashboard-task-deadlines { color:var(--ui-muted); font-size:11px; }
.dashboard-task-deadlines { font-variant-numeric:tabular-nums; white-space:nowrap; }
.task-week { margin-top:18px; }
.task-week-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.task-week-head .task-history-head { margin-bottom:0; align-items:flex-start; }
.shell .workspace .task-week-head p { font-size:12px; margin:4px 0 0; }
.task-week-summary { display:flex; flex-wrap:wrap; gap:6px; }
.task-week-summary span {
  padding:6px 9px;
  border-radius:8px;
  background:var(--ui-tint);
  color:var(--ui-accent);
  font-size:11px;
}
.task-week-summary strong { font-size:12px; }
.task-week-controls,.task-week-nav {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
.task-week-controls { justify-content:space-between; margin:12px 0 10px; }
.shell .workspace .task-week-controls .chip {
  display:inline-flex;
  gap:6px;
  align-items:center;
  min-height:36px;
  padding:6px 10px;
}
.task-week-controls .chip:not(:disabled):hover { border-color:var(--ui-accent); color:var(--ui-accent); }
.task-week-controls .ico { display:block; width:14px; height:14px; }
.week-prev .ico { rotate:180deg; }
.task-week-notice:empty { display:none; }
.shell .workspace .task-week-notice { margin:6px 0; font-size:12px; }
#dialog .task-receipt .textlink { color:var(--ui-accent); }
.task-week-data table {
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-variant-numeric:tabular-nums;
}
.task-week-data th,.task-week-data td {
  padding:9px 8px;
  border-top:1px solid var(--ui-line);
  text-align:start;
  vertical-align:middle;
}
.task-week-data thead th { color:var(--ui-muted); font-size:11px; }
.task-week-data th:first-child { width:20%; }
.task-week-data th:last-child { width:14%; }
.task-week-data tbody th { font-size:12px; }
.task-week-data tbody th small { display:block; color:var(--ui-accent); font-size:10px; }
.task-week-data .week-today { background:var(--ui-bg); }
.week-total { font-size:12px; font-weight:700; }
.week-missing { color:var(--ui-muted); font-size:11px; overflow-wrap:anywhere; }
.week-result {
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  padding:5px 7px;
  min-height:32px;
  border:1px solid transparent;
  border-radius:7px;
  background:var(--ui-tint);
  color:var(--ui-accent);
  font-size:11px;
  font-weight:650;
  text-align:start;
}
.week-result:hover { border-color:currentColor; }
.week-result[data-late="true"] { background:var(--ui-bg); color:var(--ui-muted); border-color:var(--ui-line); }
.week-result small { font-size:10px; font-weight:500; }
.task-receipt { scroll-margin-block:90px 16px; }
@media(max-width:960px) {
  .task-hero { grid-template-columns:minmax(0,1.1fr) minmax(210px,.8fr); }
  .task-section-head { align-items:flex-start; flex-direction:column; gap:5px; }
}
@media(max-width:770px) {
  .task-hero { grid-template-columns:minmax(0,1fr); }
  .dashboard-task-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:560px) {
  .task-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .task-hero { gap:17px; }
  .task-scorecard { padding:13px 15px; }
  .task-score strong { font-size:32px; }
  .task-score-meter { margin-top:7px; }
  .task-score-footer { margin-top:10px; }
  .task-receipt summary { gap:7px; }
  .task-receipt-icon { display:none; }
  .task-receipt summary { grid-template-columns:minmax(0,1fr) auto auto; }
  .task-card { scroll-margin-top:14px; }
  .task-week-data th,.task-week-data td { padding:8px 3px; }
  .task-week-data th:first-child { width:19%; }
  .task-week-data th:last-child { width:12%; }
}

.shell .workspace-account-link.signed .account-initials,
.shell .profile-photo .account-initials {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  min-width: 0;
  border-radius: 50%;
}
.shell .workspace-account-link.signed .account-initials { width: 32px; height: 32px; flex: 0 0 32px; }
.shell .workspace-account-link.signed { min-height: 42px; padding-block: 4px; }
.shell .profile-photo .account-initials { width: 80px; height: 80px; }
.shell .account-initials img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }

.shell .workspace-account .profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: start;
}
.shell .workspace-account .account-stack { gap: 20px; }
.shell .workspace-account :is(.lab-card,.activity-card,.report-card) { margin: 0; min-width: 0; }
.shell .workspace-account .form { max-width: none; }
.shell .workspace-account .form label { min-width: 0; }
.shell .workspace-account .form input { width: 100%; min-width: 0; }
.shell .workspace-account .account-info { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.shell .workspace-account .account-info dd + dt { margin-top: 10px; }
.shell .workspace-account .account-info dt { color: var(--muted); font-size: .85rem; }
.shell .workspace-account .account-info dd { font-weight: 600; }
.shell .workspace-account .actions:empty { display: none; }
.shell .workspace-account .profile-photo { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.profile-upload { position: relative; justify-items: start; cursor: pointer; }
.profile-upload input[type=file] {
  position: absolute; width: 1px !important; height: 1px; min-height: 0 !important;
  padding: 0 !important; clip-path: inset(50%); overflow: hidden;
}
.profile-upload-control {
  display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; color: var(--front-accent); background: var(--paper);
}
.profile-upload:focus-within .profile-upload-control { outline: 2px solid var(--front-accent); outline-offset: 2px; }
.profile-upload input:disabled + .profile-upload-control { opacity: .55; }
.profile-upload-control .ico { width: 16px; height: 16px; }

.shell .side .nav-sections { display: grid; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #ffffff26; }
.shell .side .nav-sections summary { cursor: pointer; list-style: none; font-weight: 650; }
.shell .side .nav-sections summary::-webkit-details-marker { display: none; }
.shell .side .nav-sections summary > .ico:last-child { margin-inline-start: auto; flex-shrink: 0; }
.shell .side .nav-sections details[open] > summary > .ico:last-child { transform: rotate(90deg); }
.shell .side .nav-submenu { display: grid; border-inline-start: 1px solid #ffffff2e; margin: 3px 0 6px 13px; padding-inline-start: 7px; }

@media (max-width: 950px) {
  .shell .workspace-account .profile-grid { grid-template-columns: minmax(0, 1fr); }
}

.shell .workspace .library-toolbar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); max-width: 760px; }
.shell .library-toolbar input { min-width: 0; width: 100%; }
.shell .workspace .library-results { margin: 10px 0 16px; color: var(--muted); font-size: .9rem; }
.shell .workspace .library-books { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 245px),1fr)); gap: 14px; }
.shell .library-books .library-resource { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
.shell .library-books .library-resource[hidden] { display: none; }
.shell .library-books h2 { margin: 0; font-size: 1.25rem; }
.shell .library-books p { margin: 0 0 5px; color: var(--muted); }
.shell .library-books .actions { margin-top: auto; padding-top: 6px; }
.library-book-language { display: flex; align-items: center; gap: 8px; color: var(--front-accent); font-size: .85rem; }
.library-book-language .ico { width: 19px; height: 19px; }
.shell .workspace .external-book { max-width: 760px; }
.shell .workspace .external-book .form { margin-top: 18px; justify-items: start; }
.shell .workspace .external-book input { max-width: 120px; }
@media (max-width: 550px) {
  .shell .workspace .library-toolbar { grid-template-columns: minmax(0, 1fr); }
}
.shell .workspace-account .profile-photo [data-profile="remove"] { margin-inline: 0; justify-self: start; }

.collection-view {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-bottom: 12px;
}
.collection-view button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper);
  cursor: pointer;
}
.collection-view button[aria-pressed="true"] { color: var(--ink); background: var(--app-tint); border-color: var(--front-accent); }
.collection-view .ico { width: 15px; height: 15px; }
.shell .workspace[data-view="list"] :is(.board-grid,.grid,.workspace-tool-grid,.library-grid,.language-path,.network-columns,
  .task-grid,.dashboard-task-grid,.stat-row,.dashboard-modules,.profile-grid,.report-grid,.lab-glossary,.writing-grid) {
  grid-template-columns: minmax(0, 1fr);
}
.shell .workspace[data-view="list"] .library-books .library-resource { display: grid; grid-template-columns: 1fr auto; column-gap: 18px; }
.shell .workspace[data-view="list"] .library-books .library-resource[hidden] { display: none; }
.shell .workspace[data-view="list"] .library-books .actions { grid-column: 2; grid-row: 2 / 4; margin: 0; align-self: center; }
.shell .workspace[data-view="grid"] :is(.language-path,.lab-glossary,.lab-entries) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
}
.shell .workspace[data-view="grid"] .language-step { grid-template-columns: auto minmax(0, 1fr); }
.shell .workspace[data-view="grid"] .language-step .btn { grid-column: 1 / -1; justify-self: start; }
.task-review { padding: 14px; margin-block: 12px; border-radius: 10px; background: var(--app-tint); overflow-wrap: anywhere; }
.task-review p { margin: 6px 0 0; white-space: pre-wrap; }
.task-review details { margin-top: 10px; }
.task-review summary { cursor: pointer; }

.path-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .48fr); align-items: start; gap: 20px; }
.path-unit { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--app-tint); }
.path-unit-header {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  background: #22584e; color: #fff; padding: 16px clamp(16px, 4vw, 30px);
}
.shell .workspace .path-unit-header h2 { font-size: clamp(18px, 3vw, 25px); margin: 0; color: #fff; }
.path-unit-header span { flex-shrink: 0; font-size: .85rem; }
.path-track { list-style: none; padding: 34px 0 28px; margin: 0; display: grid; }
.path-track li { position: relative; display: grid; place-items: start center; min-height: 126px; }
.path-track li > :is(a,div) {
  width: min(100%, 165px); position: relative; display: grid; justify-items: center; gap: 4px;
  text-align: center; text-decoration: none; transform: translateX(var(--path-offset));
  color: var(--ink); z-index: 1;
}
.path-track li:nth-child(4n+1) { --path-offset: -56px; --path-dot: -28px; --path-tilt: -29deg; }
.path-track li:nth-child(4n+2) { --path-offset: 0px; --path-dot: 28px; --path-tilt: -29deg; }
.path-track li:nth-child(4n+3) { --path-offset: 56px; --path-dot: 28px; --path-tilt: 29deg; }
.path-track li:nth-child(4n+4) { --path-offset: 0px; --path-dot: -28px; --path-tilt: 29deg; }
.path-track li:not(:last-child)::after {
  content: ""; height: 74px; position: absolute; top: 62px; left: calc(50% + var(--path-dot));
  border-inline-start: 3px dotted var(--front-accent); opacity: .42; transform: rotate(var(--path-tilt));
}
.path-medal {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--paper); color: var(--muted); border: 2px solid var(--line);
}
.path-medal .ico { width: 23px; height: 23px; }
.path-track .is-done .path-medal { color: #fff; background: #34724e; border-color: #34724e; }
.path-track .is-current .path-medal { color: #2b210f; background: #e3ad50; border-color: #b97b23; box-shadow: 0 0 0 5px #bd852d35; }
.path-track li strong { background: var(--app-tint); line-height: 1.2; }
.path-track li small { color: var(--muted); background: var(--app-tint); font-size: .76rem; }
.path-track li a:hover .path-medal { filter: brightness(1.13); }
.path-aside { display: grid; gap: 14px; }
.path-aside .card { margin: 0; }
.path-aside p strong { display: inline-block; margin-inline-start: 6px; }
@media (max-width: 1000px) { .path-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .shell .workspace[data-view="list"] .library-books .library-resource { grid-template-columns: minmax(0, 1fr); }
  .shell .workspace[data-view="list"] .library-books .actions { grid-column: auto; grid-row: auto; }
}

.shell .workspace[data-view="grid"] :is(.lab-glossary,.lab-entries) { display: grid; gap: 10px; }
.shell .workspace[data-view="grid"] .lab-entries li {
  border: 1px solid var(--line); border-radius: 9px; padding: 12px; overflow-wrap: anywhere;
}

.front-menu-toggle { display: none; }
.board-front .board-hero h1 { font-family: 'Playfair Display', Georgia, serif; }
.missing-page { min-height: 70vh; padding-block: 72px; }
.deadline-overdue { color: var(--ink); text-decoration: underline; }
.course-lesson { max-width: 800px; }
.course-lesson .form { margin-top: 24px; }
.path-question { min-width: 0; margin: 0 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.path-question legend { padding-inline: 5px; font-weight: 700; }
.shell .workspace .form .path-option {
  display: flex; gap: 9px; align-items: start; padding: 7px; font-size: 1rem; cursor: pointer;
}
.shell .workspace .form .path-option input { width: auto; min-height: 0; margin: .32em 0 0; }
@media (max-width: 980px) {
  .board-front .front-menu-toggle {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px;
    background: transparent; color: var(--front-ink); border: 1px solid var(--front-line); cursor: pointer;
  }
  .board-front #front-menu { display: none; }
  .board-front #front-menu.is-open {
    display: flex; position: absolute; flex-wrap: wrap; top: calc(100% - 1px); right: 16px; z-index: 20;
    padding: 12px 16px; background: var(--front-ground); border: 1px solid var(--front-line); border-radius: 9px;
  }
  .board-front .front-header { position: relative; z-index: 21; }
}
@media (max-width: 640px) {
  .shell .topbar { flex-wrap: nowrap; min-height: 56px; justify-content: space-between; padding: 7px 10px; }
  .shell .crumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell .top-actions { gap: 4px; }
  .shell .workspace-account-link.signed > span:last-child { display: none; }
  .shell .workspace-account-link.signed { padding-inline: 4px; }
  .shell .top-actions .streak-link { display: none; }
  .shell .workspace { padding-bottom: 88px; }
  #academy-help { right: 10px; bottom: 10px; }
  #academy-help .help-launcher { min-height: 44px; min-width: 44px; padding: 7px; justify-content: center; }
  #academy-help .help-caption { display: none; }
  .board-front .front-controls { gap: 5px; }
}

/* Academy palette supplied by the centre. */
:root {
  --ui-bg: #f6f8f4;
  --ui-paper: #ffffff;
  --ui-tint: #eaf2e9;
  --ui-ink: #222e50;
  --ui-muted: #586576;
  --ui-line: #cedbd2;
  --ui-accent: #007991;
  --ui-on-accent: #ffffff;
  --ui-gold: #e9d985;
  --engagement-gold: #e9d985;
}
html[data-theme="dark"] {
  --ui-bg: #141e34;
  --ui-paper: #1d2a45;
  --ui-tint: #273c48;
  --ui-ink: #f0f3ed;
  --ui-muted: #bcd0cc;
  --ui-line: #40536a;
  --ui-accent: #bcd8c1;
  --ui-on-accent: #222e50;
  --ui-gold: #e9d985;
}
.shell .side { background: #222e50; }
.shell .side .navitem.active { background: #007991; color: #fff; box-shadow: inset 3px 0 #e9d985; }
.shell .side .nav-emblem {
  width: 28px; height: 28px; flex-basis: 28px; display: grid; place-items: center; border-radius: 8px;
  color: #bcd8c1; background: #bcd8c10d; transition: background .18s, color .18s;
}
.shell .side .navitem .ico { width: 18px; height: 18px; }
.shell .side .navitem.active .nav-emblem { color: #222e50; background: #e9d985; }
.shell .side .navitem:hover .nav-emblem { color: #e9d985; background: #e9d98517; }
.shell .side .navitem.active:hover .nav-emblem { color: #222e50; background: #e9d985; }
.shell .workspace .btn.primary, #dialog .form .primary {
  background: #e9d985; border-color: #e9d985; color: #222e50; box-shadow: 0 2px 0 #b6a84b;
}
.shell .workspace .btn.primary:hover { background: #f1e3a1; border-color: #f1e3a1; }
.shell .workspace .bar > span { background: #439a86; }
.shell .workspace .path-unit-header { background: #007991; }
.shell .path-track .is-current .path-medal { background: #e9d985; color: #222e50; border-color: #c6b865; box-shadow: 0 0 0 5px #e9d98530; }
.shell .path-track .is-done .path-medal { background: #439a86; border-color: #439a86; color: #fff; }
.shell .workspace .collection-view [aria-pressed="true"] { border-color: #007991; }
.shell .streak-link { color: var(--ui-accent); }
.shell .streak-link .ico { stroke-width: 1.8; color: var(--ui-muted); }
.shell .streak-link.streak-earned {
  background: #e9d985; color: #222e50; border-color: #c6b865; box-shadow: 0 0 14px #e9d98550;
}
.shell .streak-link.streak-earned .ico { color: #222e50; fill: #e9d985; filter: drop-shadow(0 0 3px #b58b28); }
.shell .stat-streak i[data-active="true"] { background: #e9d985; }
.feedback-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: start; }
.feedback-layout > .card { margin: 0; min-width: 0; }
.feedback-layout .form { margin-top: 12px; }
.feedback-layout textarea { resize: vertical; }
.feedback-layout [role="status"]:empty { display: none; }
.feedback-note { color: var(--muted); font-size: .9rem; }
.student-feedback-history { padding: 0; margin: 0; list-style: none; }
.student-feedback-history li { padding-block: 14px; border-bottom: 1px solid var(--line); }
.student-feedback-history li h3 { margin: 8px 0 4px; font-size: 1rem; }
.student-feedback-history li p { white-space: pre-wrap; overflow-wrap: anywhere; }
.student-feedback-history small { color: var(--muted); }
.reader-controls label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reader-controls select { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); padding: 7px 10px; }
.reader-page-summary { margin-top: 20px; padding: 15px 18px; border-radius: 10px; background: var(--app-tint); border-inline-start: 4px solid #e9d985; }
.reader-page-summary h3, .reader-page-summary h4 { margin-top: 0; }
.reader-translation-note { display: block; margin-top: 14px; color: var(--muted); font-size: .8rem; }
.reader-spread.reader-text-only { grid-template-columns: minmax(0,1fr); }
.translated-reader .reader-text { min-width: 0; }
.reader-text .reader-copy p { white-space: pre-wrap; overflow-wrap: anywhere; }
.passage-translation { margin-block: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.passage-translation .form { max-width: none; width: 100%; }
.passage-translation .form textarea { width: 100%; }
.passage-translation [data-passage-result] > p { white-space: pre-wrap; }
@media (max-width: 850px) { .feedback-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 640px) {
  .shell .top-actions .streak-link { display: inline-flex; min-height: 34px; padding: 4px 6px; gap: 3px; font-size: .75rem; }
  .shell .top-actions .streak-link .ico { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) { .shell .side .nav-emblem { transition: none; } }

/* Research & global knowledge hub */
.rh-hubnav{display:flex;gap:6px;overflow-x:auto;padding:4px 0 10px;margin:0 0 14px;scrollbar-width:thin}
.rh-hubnav a{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;padding:9px 13px;border-radius:30px;border:1px solid var(--ui-line,var(--line));background:var(--ui-paper,var(--paper));font-size:13px;font-weight:650;color:var(--ui-ink,var(--ink))}
.rh-hubnav a .ico{width:16px;height:16px}
.rh-hubnav a[aria-current=page]{background:var(--navy);border-color:var(--navy);color:#fff}
.rh-hubnav a:hover{border-color:#b39256}
.rh-search,.rh-form{display:grid;gap:10px;margin:0 0 16px}
.rh-search>label,.rh-form label{display:grid;gap:5px;font-weight:680;font-size:13px;color:var(--ui-ink,var(--ink))}
.rh-search>div,.rh-search-row{display:flex;gap:8px;flex-wrap:wrap}
.rh-search input,.rh-form input,.rh-form textarea,.rh-form select,.rh-toolbar input,.rh-toolbar select,.rh-compare select,.rh-video textarea{flex:1 1 220px;width:100%;min-width:0;border:1px solid var(--ui-line,var(--line));padding:10px 11px;border-radius:7px;background:var(--ui-paper,#fff);color:var(--ui-ink,var(--ink))}
.rh-form textarea{resize:vertical;min-height:90px;line-height:1.55}
.rh-form h2,.rh-compare h2,.rh-results-head h2,.card>h2{display:flex;align-items:center;gap:9px;font-size:clamp(22px,2.4vw,28px);margin:0 0 6px}
.rh-inline-form{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.rh-inline-form label{flex:1 1 200px}
.rh-inline-form .btn{flex:none}
.rh-check{display:flex!important;align-items:center;gap:8px;flex:0 1 auto!important}
.rh-check input{width:auto;flex:none}
.rh-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0}
.rh-toolbar select{flex:0 1 210px}
.rh-status{padding:14px 16px;border-radius:9px;background:var(--ui-tint,#f0ece2);margin:10px 0}
.rh-status.bad{background:#f9eae6;color:#7a2e1d}
.rh-note{font-size:13px;margin:18px 0 0}
.rh-note .textlink{margin-inline-end:10px}
.rh-muted{color:var(--ui-muted,var(--muted));font-size:13px}
.rh-tags{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.rh-tags .tag + .tag{margin-left:0}
.rh-tags small{opacity:.7;margin-inline-start:4px}
.rh-list{margin:8px 0;padding-inline-start:20px;display:grid;gap:6px}
.rh-list li{line-height:1.5;color:var(--ui-ink,var(--ink))}
.rh-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}
.rh-columns h3,.rh-results h3{display:flex;align-items:center;gap:8px;font-size:21px;margin:0 0 8px}
.rh-columns h3 .ico{width:19px;height:19px}
.rh-section-title{font-size:clamp(24px,2.6vw,32px);margin:26px 0 6px}
.rh-ai{white-space:normal;line-height:1.6}

/* people */
.rh-people{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-top:12px}
.rh-person{display:grid;grid-template-columns:86px minmax(0,1fr);gap:14px;align-items:start}
.rh-photo{width:86px;height:104px;border-radius:9px;overflow:hidden;background:var(--ui-tint,#eee7d8);display:grid;place-items:center;color:#785a30}
.rh-photo img{width:100%;height:100%;object-fit:cover}
.rh-person h3{font-size:22px;margin:8px 0 2px}
.rh-role{font-weight:700;color:var(--ui-ink,var(--ink));margin:2px 0 4px!important}
.rh-person details,.rh-paper details,.rh-video details{margin:6px 0}
.rh-person summary,.rh-paper summary,.rh-video summary{cursor:pointer;font-weight:700;font-size:13px;color:#255e82}
.rh-person details p{font-size:13.5px;line-height:1.6}
.rh-wiki-list{display:grid;gap:10px;margin:0 0 16px}
.rh-wiki-hit{display:flex;gap:14px;align-items:start}
.rh-wiki-hit img{width:72px;height:72px;object-fit:cover;border-radius:8px;flex:none}
.rh-wiki-hit h3{font-size:21px}

/* countries */
.rh-country-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px;margin:12px 0}
.rh-country{display:flex;align-items:center;gap:11px;text-align:start;padding:12px 14px;cursor:pointer;font:inherit;color:var(--ui-ink,var(--ink))}
.rh-country strong{display:block;font-size:14px}
.rh-country small{color:var(--ui-muted,var(--muted));font-size:11px}
.rh-country[aria-pressed=true]{border-color:var(--navy);box-shadow:inset 0 0 0 1px var(--navy)}
.rh-flag{font-size:28px;line-height:1}
.rh-flag.big{font-size:52px}
.rh-country-card{margin:14px 0}
.rh-country-card>header{display:flex;gap:16px;align-items:center;margin-bottom:12px}
.rh-country-card>header>div{flex:1}
.rh-country-card h2{font-size:clamp(30px,3.4vw,44px);margin:0 0 4px}
.rh-lead{font-size:15px;line-height:1.7;max-width:80ch}
.rh-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px;margin:14px 0}
.rh-facts div{background:var(--ui-tint,#f4f0e6);border-radius:9px;padding:10px 12px}
.rh-facts dt{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-muted,var(--muted));font-weight:750}
.rh-facts dd{margin:3px 0 0;font-weight:700;color:var(--ui-ink,var(--ink));overflow-wrap:anywhere}
.rh-compare{margin-top:20px}
.rh-compare-pick{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 12px}
.rh-compare-pick label{display:flex;align-items:center;gap:8px;font-weight:800;flex:1 1 240px}
.rh-table-wrap{overflow-x:auto}
.rh-table{width:100%;border-collapse:collapse;font-size:13.5px}
.rh-table th,.rh-table td{border-top:1px solid var(--ui-line,var(--line));padding:10px;text-align:start;vertical-align:top;color:var(--ui-ink,var(--ink))}
.rh-table thead th{font-size:15px;border-top:0}
.rh-table tbody th{width:20%;color:var(--ui-muted,var(--muted));font-weight:750}

/* analysis */
.rh-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:14px 0}
.rh-stats .card{padding:14px 16px}
.rh-stats strong{display:block;font:400 30px/1.1 var(--serif);color:var(--ui-ink,var(--ink))}
.rh-stats span{font-size:12px;color:var(--ui-muted,var(--muted))}
.rh-stats.compact{grid-template-columns:repeat(auto-fit,minmax(110px,170px))}
.rh-meter span{font-size:13px;color:var(--ui-ink,var(--ink))}
.rh-checks{list-style:none;padding:0;margin:6px 0;display:grid;gap:7px}
.rh-checks li{display:flex;gap:8px;align-items:flex-start;font-size:14px;color:var(--ui-ink,var(--ink))}
.rh-checks .ico{width:18px;height:18px;border-radius:50%;padding:2px;flex:none}
.rh-checks .ok .ico{background:#e3f1e9;color:#276753}
.rh-checks .no .ico{background:#f9eae6;color:#a04a35}
.rh-results h4{margin:14px 0 4px;font-size:15px}

/* videos */
.rh-video-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px;margin:12px 0 20px}
.rh-video{padding:0;overflow:hidden;display:flex;flex-direction:column}
.rh-player{aspect-ratio:16/9;background:#0b1a27;position:relative}
.rh-player button{all:unset;cursor:pointer;display:block;width:100%;height:100%;position:relative}
.rh-player button:focus-visible{outline:3px solid #188edf;outline-offset:-3px}
.rh-player img{width:100%;height:100%;object-fit:cover;opacity:.92}
.rh-player iframe{width:100%;height:100%;border:0;display:block}
.rh-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:58px;height:58px;border-radius:50%;background:#c4302bdd;color:#fff;display:grid;place-items:center;font-size:22px;box-shadow:0 6px 20px #0006}
.rh-player button:hover .rh-play{background:#c4302b}
.rh-video-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:2px;flex:1}
.rh-video-body h3{font-size:19px;margin-top:8px}
.rh-video-body .actions{margin-top:auto;padding-top:10px}
.rh-video textarea{margin-top:6px;font-size:13px}

/* courses, templates, papers */
.rh-course h3,.rh-template h3{font-size:22px}
.rh-recommend{margin:6px 0 10px}
.rh-template-open{margin:16px 0;border-color:#b39256}
.rh-template-open>header{display:flex;justify-content:space-between;gap:12px;align-items:start;margin-bottom:10px}
.rh-template-open h2{font-size:clamp(28px,3vw,38px);margin:8px 0 4px}
.rh-outline{padding-inline-start:22px;display:grid;gap:14px}
.rh-outline h3{font-size:20px}
.rh-outline p{margin:4px 0!important}
.rh-outline blockquote{margin:4px 0 0;padding:8px 12px;border-inline-start:3px solid #d3ae71;background:var(--ui-tint,#f4f0e6);border-radius:0 6px 6px 0;font-style:italic;color:var(--ui-ink,var(--ink))}
.rh-draft-section{display:grid;gap:4px;margin:12px 0}
.rh-draft-section span{display:flex;justify-content:space-between;gap:10px}
.rh-draft-section textarea{width:100%;border:1px solid var(--ui-line,var(--line));border-radius:7px;padding:10px;min-height:110px;resize:vertical;background:var(--ui-paper,#fff);color:var(--ui-ink,var(--ink))}
.rh-template-open form>label{display:grid;gap:4px;font-weight:700;font-size:13px}
.rh-template-open form>label input{border:1px solid var(--ui-line,var(--line));border-radius:7px;padding:10px;background:var(--ui-paper,#fff);color:var(--ui-ink,var(--ink))}
.rh-links{margin-top:16px;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;font-size:13px}
.rh-titles li{display:flex;justify-content:space-between;gap:10px;align-items:center}
.rh-titles .icon-button{width:32px;height:32px;flex:none}
.rh-titles .ico{width:16px;height:16px}
.rh-results-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin:22px 0 4px}
.rh-paper-list{display:grid;gap:10px;margin:12px 0}
.rh-paper h3{font-size:20px;line-height:1.25}
.rh-paper h3 a:hover{text-decoration:underline}
.rh-paper details p{font-size:13.5px;line-height:1.6}
.rh-paper .chip{padding:6px 11px;font-size:12px}
.rh-years{display:flex;align-items:flex-end;gap:5px;height:110px;padding-top:8px;overflow-x:auto}
.rh-years div{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;min-width:26px;gap:4px}
.rh-years span{display:block;width:16px;background:#217364;border-radius:4px 4px 0 0;min-height:4px}
.rh-years small{font-size:10px;color:var(--ui-muted,var(--muted))}

@media (max-width:800px){.rh-columns{grid-template-columns:1fr}}
@media (max-width:640px){.rh-person{grid-template-columns:64px minmax(0,1fr)}.rh-photo{width:64px;height:78px}.rh-country-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rh-flag.big{font-size:40px}}

/* Right-to-left (Arabic) */
[dir=rtl] .shell{direction:rtl}
[dir=rtl] .navitem.active{box-shadow:inset -2px 0 var(--gold)}
[dir=rtl] .choice,[dir=rtl] .pagebtn{text-align:right}
[dir=rtl] .ico[aria-hidden]{transform:none}
[dir=rtl] .textlink .ico,[dir=rtl] .btn .ico{transform:scaleX(-1)}
@media (max-width:640px){[dir=rtl] .side{right:0;left:auto;transform:translateX(105%)}[dir=rtl] .side.open{transform:none}}

/* ---- Professional pass: fewer boxes, clearer hierarchy, consistent rhythm ---- */
.rh-tabs{gap:0;padding:0;margin:0 0 22px;border-bottom:1px solid var(--ui-line,var(--line));scrollbar-width:none}
.rh-tabs::-webkit-scrollbar{display:none}
.rh-tabs a{border:0;border-radius:0;background:none;padding:12px 14px 11px;font-size:13px;font-weight:650;color:var(--ui-muted,var(--muted));border-bottom:2px solid transparent;margin-bottom:-1px}
.rh-tabs a .ico{opacity:.7}
.rh-tabs a:hover{color:var(--ui-ink,var(--ink));border-bottom-color:var(--ui-line,#d9d2c4)}
.rh-tabs a[aria-current=page]{background:none;color:var(--ui-ink,var(--navy));border-bottom-color:#b8862b}
.rh-tabs a[aria-current=page] .ico{opacity:1;color:#b8862b}

.wide-title h1,.rh-section-title,.rh-form h2,.card>h2,.rh-results-head h2{text-wrap:balance}
.rh-list li,.rh-lead,.rh-person details p{text-wrap:pretty}

/* stat strip instead of stat cards */
.rh-stats{display:flex;flex-wrap:wrap;gap:0;margin:6px 0 18px;border-top:1px solid var(--ui-line,var(--line));border-bottom:1px solid var(--ui-line,var(--line))}
.rh-stats .card{background:none;border:0;box-shadow:none;border-radius:0;padding:14px 22px 14px 0;margin-inline-end:22px;border-inline-end:1px solid var(--ui-line,var(--line))}
.rh-stats .card:last-child{border-inline-end:0}
.rh-stats strong{font-variant-numeric:tabular-nums;font-size:28px}
.rh-stats span{text-transform:uppercase;letter-spacing:.07em;font-size:11px;font-weight:700}

/* rows: courses, papers */
.rh-rows,.rh-paper-list{display:block;margin:10px 0 24px;border-top:1px solid var(--ui-line,var(--line))}
.rh-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:16px;align-items:start;padding:18px 4px;border-bottom:1px solid var(--ui-line,var(--line));background:none}
.rh-row:hover{background:var(--ui-tint,#f7f4ec)}
.rh-row h3{font-size:19px;line-height:1.3;margin:0 0 3px}
.rh-row p{margin:4px 0!important}
.rh-row-mark{width:44px;height:44px;border-radius:9px;display:grid;place-items:center;background:var(--navy,#102331);color:#e9cf98;font-weight:800;font-size:13px;letter-spacing:.04em}
.rh-row-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px;white-space:nowrap}
.rh-row .rh-tags{margin:8px 0 0}
.rh-paper{grid-template-columns:minmax(0,1fr)}
.rh-paper .actions{margin-top:8px}
@media (max-width:700px){.rh-row{grid-template-columns:36px minmax(0,1fr)}.rh-row-mark{width:36px;height:36px}.rh-row-actions{grid-column:2;flex-direction:row;flex-wrap:wrap;align-items:center}}

/* flags as images */
.rh-flag-img{display:block;border-radius:3px;box-shadow:0 0 0 1px rgba(16,35,49,.12);object-fit:cover}
.rh-flag-img.sm{width:36px;height:24px}
.rh-flag-img.lg{width:84px;height:56px;border-radius:5px}
.rh-flag{line-height:0}
.rh-country{box-shadow:none;border-radius:9px;padding:12px 14px!important;transition:border-color .15s,background .15s}
.rh-country:hover{border-color:#b8862b;background:var(--ui-tint,#fbf8f1)}
.rh-country[aria-pressed=true]{background:var(--ui-tint,#fbf8f1)}

/* chips with counts */
.rh-count{display:inline-block;min-width:20px;padding:1px 6px;margin-inline-start:4px;border-radius:10px;background:rgba(16,35,49,.08);font-size:11px;font-variant-numeric:tabular-nums}
.chip[aria-pressed=true] .rh-count{background:rgba(255,255,255,.22)}

/* calmer cards where cards stay (interactive containers only) */
.rh-person,.rh-template,.rh-video,.rh-wiki-hit,.pb-book{box-shadow:none}
.rh-template:hover,.rh-video:hover,.pb-book:hover{border-color:#cdb27c}
.pb-featured{border-inline-start:0!important;background:var(--navy,#102331)!important;color:#f3ead7;border:0}
.pb-featured h2{color:#fff}
.pb-featured p{color:#d8ccb4!important}
.shell .workspace .pb-featured .eyebrow{color:#e4bc7c}
.shell .workspace .rh-stats .card{background:none;border:0;box-shadow:none;border-radius:0;padding:14px 22px 14px 0;margin-inline-end:22px;border-inline-end:1px solid var(--ui-line,var(--line));min-height:0}
.shell .workspace .rh-stats .card:last-child{border-inline-end:0}
.shell .workspace .rh-country{min-height:72px;align-items:center}
.shell .workspace .rh-video{padding:0;overflow:hidden}
.rh-tabs + .rh-stats,.rh-stats{border-top:0}
@media (max-width:640px){.shell .workspace .rh-stats .card{flex:1 1 40%;margin-inline-end:0;padding-inline:0 12px;border-inline-end:0}}
.shell .workspace .rh-player{aspect-ratio:16/9!important;height:auto}
.shell .workspace .rh-player img{width:100%;height:100%!important;object-fit:cover;aspect-ratio:auto;display:block}
.rh-video-body .tag{align-self:flex-start}
.rh-video-body>span.tag{margin-inline-end:6px}

/* ===== Research hub identity: "diplomat's dossier" with Registan khatam tilework =====
   Tokens: ink #102331 (brand navy) · tile #0E7C86 (Registan turquoise, selection only)
           gilt #B8862B (rules and the tile band only) · slate #52616B (secondary text)
   One bold element: the khatam band beside the page title. Everything else stays quiet. */
body.research-page{--rh-ink:#102331;--rh-tile:#0e7c86;--rh-gilt:#b8862b;--rh-slate:#52616b;--rh-paper:#fbf9f4}
body.research-page .shell .workspace .wide-title{position:relative;padding:34px 0 26px;margin-bottom:6px;border-bottom:1px solid var(--ui-line,var(--line));isolation:isolate}
body.research-page .shell .workspace .wide-title::after{content:"";position:absolute;inset:0 0 0 auto;width:min(46%,520px);z-index:-1;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23b8862b' stroke-width='1.1'%3E%3Crect x='14' y='14' width='28' height='28'/%3E%3Crect x='14' y='14' width='28' height='28' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3Cpath d='M0 28h8M48 28h8M28 0v8M28 48v8'/%3E%3C/g%3E%3C/svg%3E");
  background-size:56px 56px;background-position:right center;opacity:.55;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 70%);mask-image:linear-gradient(90deg,transparent,#000 70%)}
[dir=rtl] body.research-page .shell .workspace .wide-title::after,body.research-page[dir=rtl] .shell .workspace .wide-title::after{inset:0 auto 0 0;-webkit-mask-image:linear-gradient(270deg,transparent,#000 70%);mask-image:linear-gradient(270deg,transparent,#000 70%)}
body.research-page .shell .workspace .wide-title .eyebrow{text-transform:none;letter-spacing:0;font-size:13px;font-weight:650;color:var(--rh-tile)}
body.research-page .shell .workspace .wide-title h1{max-width:16ch;letter-spacing:-.01em}
body.research-page .shell .workspace .wide-title p{max-width:62ch;color:var(--rh-slate)}
@media (max-width:760px){body.research-page .shell .workspace .wide-title::after{width:100%;opacity:.16}}

/* folder-index tabs */
body.research-page .rh-tabs a[aria-current=page]{color:var(--rh-ink);border-bottom-color:var(--rh-gilt)}
body.research-page .chip[aria-pressed=true]{background:var(--rh-tile);border-color:var(--rh-tile);color:#fff}

/* research path: a real sequence, so it is numbered */
.rh-path{list-style:none;margin:0 0 22px;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--ui-line,var(--line));border-radius:10px;overflow:hidden;background:var(--ui-paper,#fff)}
.rh-path li+li{border-inline-start:1px solid var(--ui-line,var(--line))}
.rh-path a{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;height:100%;color:var(--ui-ink,var(--ink))}
.rh-path a:hover{background:var(--ui-tint,#f6f3ec)}
.rh-path a:focus-visible{outline:2px solid var(--rh-tile,#0e7c86);outline-offset:-2px}
.rh-path-mark{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:13px;border:1.5px solid var(--ui-line,#cfc7b6);color:var(--rh-slate,#52616b);font-variant-numeric:tabular-nums}
.rh-path-mark .ico{width:15px;height:15px}
.rh-path strong{display:block;font-size:14px}
.rh-path small{display:block;font-size:12px;color:var(--rh-slate,#52616b);margin-top:2px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rh-path .done .rh-path-mark{background:var(--rh-tile,#0e7c86);border-color:var(--rh-tile,#0e7c86);color:#fff}
.rh-path .current{box-shadow:inset 0 -3px 0 var(--rh-gilt,#b8862b)}
.rh-path .current .rh-path-mark{border-color:var(--rh-ink,#102331);color:var(--rh-ink,#102331)}
@media (max-width:760px){.rh-path{grid-template-columns:1fr 1fr}.rh-path li:nth-child(3){border-inline-start:0}.rh-path li:nth-child(n+3){border-top:1px solid var(--ui-line,var(--line))}}

/* chosen topic */
.rh-titles li{padding:6px 0;border-bottom:1px solid var(--ui-line,var(--line))}
.rh-titles li:last-child{border-bottom:0}
.rh-titles li.chosen span{font-weight:700;color:var(--rh-ink,#102331)}
.rh-titles .chip{flex:none}

/* recently opened videos */
.rh-recent{margin:0 0 18px}
.rh-recent h2{font-size:18px;margin:0 0 10px}
.rh-recent>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.rh-recent a{display:flex;gap:10px;align-items:center;padding:6px;border-radius:9px;color:var(--ui-ink,var(--ink));border:1px solid var(--ui-line,var(--line))}
.rh-recent a:hover{border-color:var(--rh-gilt,#b8862b)}
.rh-recent img{width:88px;aspect-ratio:16/9;object-fit:cover;border-radius:5px;flex:none}
.rh-recent span{font-size:13px;font-weight:650;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* country brief print */
@media print{
  body.printing-country *{visibility:hidden!important}
  body.printing-country #rh-country-detail,body.printing-country #rh-country-detail *{visibility:visible!important}
  body.printing-country #rh-country-detail{position:absolute;inset:0;margin:0}
  body.printing-country #rh-country-detail .actions,body.printing-country #rh-country-detail .icon-button{display:none!important}
}

/* Certificates */
.cert-summary{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:14px;margin-bottom:10px}
.cert-level{display:flex;gap:16px;align-items:flex-start;border-top:4px solid var(--cert-level,#c9971f)}
.cert-level h2{font-size:clamp(26px,3vw,36px);margin:4px 0}
.cert-dash-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:#f6ecd7;color:#a0731f;flex:none}
.cert-dash-icon .ico{width:28px;height:28px}
.cert-name{align-content:start}
.cert-name label{margin-bottom:4px}
.cert-name .btn{justify-self:start}
.cert-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin:12px 0 22px}
.cert-card h3{font-size:22px;margin-bottom:6px}
.cert-card.earned{border-color:#7fb3a2;background:linear-gradient(180deg,#f3faf6,var(--ui-paper,var(--paper)) 40%)}
.cert-card.locked{opacity:.92}
.cert-reqs{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:6px}
.cert-reqs li{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:8px;align-items:center;font-size:13px;color:var(--ui-ink,var(--ink))}
.cert-reqs .ico{width:16px;height:16px;color:#8a949c}
.cert-reqs li.ok .ico{color:#276753}
.cert-reqs strong{font-variant-numeric:tabular-nums}
.cert-dash{display:flex;gap:16px;align-items:center;margin:16px 0;flex-wrap:wrap;border-left:4px solid #c9971f}
.cert-dash>div:nth-child(2){flex:1;min-width:220px}
.cert-dash h2{font-size:24px;margin:0 0 4px}
.cert-dash p{margin:0!important}
.cert-dash .actions{margin-top:0}
.cert-viewer{margin:10px 0 24px;display:grid;gap:14px}
.cert-sheet{aspect-ratio:1.414/1;width:100%;max-width:1000px;margin:auto;background:#fffdf6;border:10px solid #102331;padding:12px;box-shadow:0 18px 40px #0b1a2722;color:#172936}
.cert-inner{height:100%;border:2px solid #c9a15a;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:3% 6%;gap:.6%}
.cert-logo{width:7%;min-width:44px;border-radius:8px}
.cert-org{letter-spacing:.16em;text-transform:uppercase;font-weight:700;font-size:clamp(9px,1.4vw,14px);color:#78603d!important;margin:0!important}
.cert-title{font:400 clamp(30px,6vw,64px)/1 var(--serif);color:#102331;letter-spacing:.04em;text-transform:uppercase;margin:2% 0 1%}
.cert-title small{display:block;font:italic clamp(11px,1.6vw,18px) var(--serif);letter-spacing:0;text-transform:none;color:#52616b;margin-top:6px}
.cert-line{font-size:clamp(11px,1.6vw,17px);color:#52616b!important;margin:0!important}
.cert-name{font:400 clamp(24px,5vw,54px)/1.1 var(--serif);color:#102331!important;border-bottom:2px solid #c9a15a;padding:0 4% 1%;margin:1.5% 0!important}
.cert-course{font:600 clamp(16px,3vw,32px)/1.2 var(--serif);color:#172936!important;margin:0!important}
.cert-course small{display:block;font:italic clamp(10px,1.4vw,15px) var(--serif);color:#52616b;margin-top:4px}
.cert-foot{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;width:100%;margin-top:3%;gap:4%}
.cert-foot div:first-child{text-align:start}
.cert-foot div:last-child{text-align:end}
.cert-foot span{display:block;font-size:clamp(9px,1.2vw,12px);color:#52616b;text-transform:uppercase;letter-spacing:.08em}
.cert-foot strong{font-size:clamp(11px,1.6vw,17px);font-variant-numeric:tabular-nums}
.cert-seal{width:clamp(48px,9vw,96px);aspect-ratio:1;border-radius:50%;background:#c9a15a;display:grid;place-items:center;color:#fffdf6;box-shadow:inset 0 0 0 5px #fffdf6,0 0 0 2px #c9a15a}
.cert-seal .ico{width:45%;height:45%}
.cert-actions{justify-content:center}
.cert-next-card{display:grid;gap:6px;max-width:520px;margin:auto;width:100%}
.cert-next-card .btn{justify-self:start}
.cert-verify{margin-top:8px}
.cert-valid{display:flex;gap:10px;align-items:flex-start;background:#e3f1e9}
.cert-valid .ico{color:#276753}
.cert-celebrate{text-align:center;display:grid;gap:8px}
.cert-celebrate h3{font-size:34px}
.cert-burst{width:84px;height:84px;margin:4px auto;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,#f8e2b0,#e4bc7c);color:#6a4a12;animation:cert-pop .6s ease-out}
.cert-burst .ico{width:40px;height:40px}
.cert-celebrate-name{font:400 24px/1.2 var(--serif);color:var(--ui-ink,var(--ink))!important}
.cert-next{display:grid;gap:4px;text-align:start;background:var(--ui-tint,#f4f0e6);border-radius:9px;padding:12px}
.cert-next span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ui-muted,var(--muted))}
.cert-celebrate .actions{justify-content:center}
@keyframes cert-pop{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.1)}100%{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){.cert-burst{animation:none}}
@media (max-width:800px){.cert-summary{grid-template-columns:1fr}}
@media print{
  body.printing-cert *{visibility:hidden!important}
  body.printing-cert .cert-sheet,body.printing-cert .cert-sheet *{visibility:visible!important}
  body.printing-cert .cert-sheet{position:fixed;inset:0;margin:0;max-width:none;width:100vw;height:100vh;box-shadow:none;aspect-ratio:auto}
  @page{size:A4 landscape;margin:0}
}
.cert-sheet h2.cert-title{font-family:var(--serif)!important;font-weight:400!important}
.cert-pill{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 14px;margin:0 0 14px;border-radius:30px;background:#fbf3e2;border:1px solid #ecd3a3;color:#6a4a12;font-size:13px;font-weight:700;max-width:620px}
.cert-pill .ico{width:18px;height:18px}
.cert-pill .bar{flex:1 1 120px;margin:0;min-width:100px}
.cert-pill.done{background:#e3f1e9;border-color:#a9d0bf;color:#276753}
.cert-pill:hover{border-color:#c9971f}

.cl-wrap{margin:14px 0}
.cl-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:14px}
.cl-box{background:var(--ui-tint,#f4f0e6);border-radius:10px;padding:16px 18px}
.cl-box h3{display:flex;align-items:center;gap:8px;font-size:20px;margin:0 0 10px}
.cl-box h3 .ico{width:19px;height:19px}
.cl-dl{margin:0;display:grid;gap:4px}
.cl-dl dt{font-size:11px;text-transform:uppercase;letter-spacing:.07em;font-weight:750;color:var(--ui-muted,var(--muted));margin-top:6px}
.cl-dl dd{margin:0;color:var(--ui-ink,var(--ink));line-height:1.5}
.cl-laws ol{margin:0;padding-inline-start:20px;display:grid;gap:7px;color:var(--ui-ink,var(--ink));line-height:1.5}
.cl-meta{margin:12px 0 0!important;font-size:13px}
.cl-warn{margin:12px 0 0!important;padding:10px 14px;border-radius:9px;background:#f9eae6;color:#7a2e1d!important;font-size:13px;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
@media (max-width:800px){.cl-grid{grid-template-columns:1fr}}
.pb-book{display:grid;grid-template-columns:54px minmax(0,1fr);gap:14px}
.pb-book h3{font-size:21px;margin:6px 0 2px}
.pb-spine{width:54px;height:76px;border-radius:5px;display:grid;place-items:center;background:linear-gradient(135deg,#102331,#2a4a60);color:#e4bc7c;font:400 28px var(--serif);box-shadow:inset -5px 0 #0b1a27}
.pb-featured{margin-bottom:14px}
.pb-featured h2{font-size:clamp(24px,3vw,34px);margin:6px 0}
.pb-web{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;margin-top:10px}
.pb-hit{display:flex;gap:12px;align-items:flex-start;padding:12px}
.pb-hit img{width:54px;height:80px;object-fit:cover;border-radius:4px;flex:none}
.pb-hit h3{font-size:17px}

.public-info{margin:0;background:#f6f8f4;color:#222e50;font:16px/1.65 system-ui,sans-serif}
.public-info .info-wrap{max-width:68rem;margin:auto;padding:1.25rem clamp(1rem,4vw,2rem)}
.public-info header{background:#222e50;color:#fff}
.public-info header .info-wrap,.public-info footer,.info-actions,.info-brand{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.public-info header .info-wrap{justify-content:space-between}
.public-info header a{color:inherit}
.info-brand{font-weight:650;text-decoration:none}
.info-brand img{border-radius:6px}
.public-info nav a+a{margin-inline-start:1rem}
.public-info h1{font:500 clamp(2.1rem,6vw,3.5rem)/1.15 Georgia,serif;margin:1.2rem 0 .75rem}
.public-info h2{font-size:1.28rem;line-height:1.35}
.info-intro{font-size:1.12rem;max-width:64ch}
.info-crumb{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;font-size:.9rem}
.public-info section{margin-block:2rem}
.public-info details,.info-cases article{background:#fff;border:1px solid #cbd8d2;border-radius:12px}
.public-info details{padding:.7rem 1rem;margin:.55rem 0}
.public-info summary{cursor:pointer;font-weight:600}
.public-info a{color:#006d80;text-underline-offset:.17em}
.public-info .info-cta{display:inline-block;background:#007184;color:white;padding:.55rem 1rem;border-radius:8px;text-decoration:none;font-weight:600}
.public-info a:focus-visible,.public-info summary:focus-visible{outline:2px solid #007991;outline-offset:4px}
.public-info footer{border-top:1px solid #cbd8d2;font-size:.9rem}
.info-cases{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));gap:1rem;margin:1.5rem 0}
.info-cases img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:11px 11px 0 0;display:block}
.info-cases article>div{padding:0 1rem 1rem}
.front-page .release-links{display:flex;gap:.75rem 1.5rem;flex-wrap:wrap}
.app-breadcrumb{display:inline-flex;align-items:center;flex-wrap:wrap;gap:.4rem;min-width:0}
.app-breadcrumb a{text-decoration:underline;text-underline-offset:.2em}
.public-info input{padding:.55rem .7rem;border:1px solid #a5b8b4;border-radius:6px;font:inherit;max-width:100%}
.public-info button.info-cta{border:0;cursor:pointer;font:inherit}
.front-controls .language,.top-actions .language{max-inline-size:7.5rem}
.front-page .release-section{padding-block:1.5rem;margin-block:1rem}
.front-page .release-section h2{margin:0 0 .75rem}
.front-page .release-section details{max-width:48rem;border-block-start:1px solid currentColor;padding:.75rem 0}
.front-page .release-section summary{cursor:pointer;font-weight:600}

/* refine.css: last-loaded refinement layer.
   Keeps the centre's identity (navy chrome, teal action, pale-gold distinction, Playfair titles)
   and makes it consistent: one token set, one button system, one icon spec (Lucide, 1.75 stroke).
   Colour roles: navy = structure, teal = the only action colour, gold = distinction marks only
   (never text on white, never a button fill on a light surface). */

:root {
  --r-navy: #102331;
  --r-navy-2: #222e50;
  --r-teal: #007991;
  --r-teal-hover: #006577;
  --r-teal-press: #00525f;
  --r-teal-wash: #eef6f7;
  --r-gold: #e9d985;
  --r-gold-hover: #f1e3a1;
  --r-danger: #b42318;
  --r-danger-hover: #912018;
  --r-ink: #1c2a45;
  --r-muted: #55627a;
  --r-line: #d3dde3;
  --r-line-strong: #b9c6cf;
  --r-paper: #ffffff;
  --r-action: var(--r-teal);
  --r-action-hover: var(--r-teal-hover);
  --r-action-press: var(--r-teal-press);
  --r-on-action: #ffffff;
  --r-link: #006b80;
  --r-focus-inner: #ffffff;
  --r-focus-outer: #102331;
  --r-radius-sm: 8px;
  --r-radius-md: 12px;
  --r-radius-lg: 16px;
  --r-pill: 999px;
  --r-shadow-1: 0 1px 2px rgba(16, 35, 49, .05), 0 1px 1px rgba(16, 35, 49, .03);
  --r-shadow-2: 0 6px 24px rgba(16, 35, 49, .10);
  --r-btn-sm: 36px;
  --r-btn-md: 44px;
  --r-btn-lg: 52px;
  --r-sans: Inter, 'Segoe UI', system-ui, sans-serif;
  --r-serif: 'Playfair Display', Georgia, serif;
  /* Flag tints, muted ~15% so they sit beside the navy. */
  --r-flag-blue: #2a78c2;
  --r-flag-red: #c8402f;
  --r-flag-white: #f4f6f8;
  --r-flag-green: #3f9a39;
  /* Older layers point --serif at Georgia; titles are Playfair everywhere. */
  --serif: var(--r-serif);
  --ui-accent: #007991;
}
html[data-theme="dark"] {
  --r-ink: #eef2f6;
  --r-muted: #b8c4d2;
  --r-line: #3a4c66;
  --r-line-strong: #536682;
  --r-paper: #1d2a45;
  --r-teal-wash: #1f3a4a;
  --r-action: #74c4d3;
  --r-action-hover: #95d3de;
  --r-action-press: #5bb3c4;
  --r-on-action: #0b1d2a;
  --r-link: #8fd3e0;
  --r-focus-inner: #0b1d2a;
  --r-focus-outer: #e9d985;
  --r-shadow-1: 0 1px 2px rgba(0, 0, 0, .25);
  --ui-accent: #8fd3e0;
  --ui-on-accent: #0b1d2a;
  --ui-muted: #c2cdda;
}

/* ---------- Identity: hairline tricolour at the very top of the app ---------- */
.shell { position: relative; }
.shell::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg,
    var(--r-flag-blue) 0 33%, var(--r-flag-red) 33% calc(33% + 2px),
    var(--r-flag-white) calc(33% + 2px) calc(67% - 2px), var(--r-flag-red) calc(67% - 2px) 67%,
    var(--r-flag-green) 67% 100%);
}
[dir=rtl] .shell::before { transform: scaleX(-1); }

/* ---------- Icons: one size scale, one stroke ---------- */
.shell .ico { stroke-width: 1.75; flex: none; }
.shell .streak-link .ico { stroke-width: 1.75; }
/* Mirror direction-carrying glyphs only in RTL. */
[dir=rtl] .ico[aria-hidden],
[dir=rtl] .textlink .ico, [dir=rtl] .btn .ico { transform: none; }
[dir=rtl] :is(.ico-arrow, .ico-arrow-right, .ico-arrow-left, .ico-chevron, .ico-chevron-right, .ico-chevron-left, .ico-send) { scale: -1 1; }
[dir=rtl] .task-compose[open] > summary .ico, [dir=rtl] .task-receipt[open] summary > .ico { rotate: -90deg; }

/* ---------- Brand + sidebar type ---------- */
.shell .side .brand small {
  font-size: 11px; letter-spacing: .01em; text-transform: none; font-weight: 500; color: #d9cc8a; margin-top: 3px;
}
.shell .side .navitem { font-size: 12.5px; }
.shell .side .nav-group .nav-label { font-size: 11px; letter-spacing: .02em; text-transform: none; }
.shell .side .navitem .ico { width: 18px; height: 18px; }
html[data-theme="dark"] .shell .side { background: #0f1a2e; border-inline-end: 1px solid #2a3a55; }

/* ---------- Page titles: no templated eyebrow, calm lead ---------- */
.shell .workspace .eyebrow {
  text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--ui-accent);
}
.shell .workspace .wide-title .eyebrow:empty { display: none; }
.shell .workspace .wide-title p { color: var(--r-muted); font-size: 15px; line-height: 1.65; }
html[data-theme="dark"] .shell .workspace .wide-title p,
html[data-theme="dark"] body.research-page .shell .workspace .wide-title p { color: #c5d0dc; }
.shell .workspace :is(.wide-title h1, .lab-heading h1) { text-wrap: balance; }
.shell .workspace .studio-heading .eyebrow,
.shell .workspace .studio-card .eyebrow { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--ui-accent); }

/* ---------- Surfaces: radius + shadow tokens ---------- */
.shell .workspace :is(.card, .lab-card, .workspace-tool, .workspace-progress-overview, .stat, .lab-tool, .library-resource, .source-entry) {
  border-radius: var(--r-radius-md); box-shadow: var(--r-shadow-1);
}
.shell .workspace .stat :is(strong) { font-variant-numeric: lining-nums tabular-nums; }
.shell .workspace :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { border-radius: var(--r-radius-sm); }
.shell .workspace :is(input[type=checkbox], input[type=radio]) { width: 18px; height: 18px; accent-color: var(--r-teal); }
.shell .workspace :is(label:has(> input[type=checkbox]), .rh-check, .pb-free) { font-size: 14px; }

/* Tags: legible size and AA contrast. */
.shell .workspace .tag { font-size: 12px; font-weight: 600; letter-spacing: 0; color: #005f72; padding: 4px 9px; border-radius: var(--r-pill); }
html[data-theme="dark"] .shell .workspace .tag { color: #bfe6ee; background: #24405a; }

/* ======================================================================
   Button system
   primary   teal fill, one per view       ghost (secondary) outline
   tertiary  teal text, no frame           darkghost / inverse on navy
   danger    red fill, irreversible only   textlink inline link
   Sizes: sm 36 / md 44 (default) / lg 52. Radius 8. 14px/600.
   ====================================================================== */
.shell .workspace .btn, #dialog .btn, .shell .workspace .task-compose > summary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--r-btn-md); padding: 0 18px; border: 1.5px solid transparent; border-radius: var(--r-radius-sm);
  font: 600 14px/1.25 var(--r-sans); letter-spacing: 0; text-transform: none; text-decoration: none;
  box-shadow: none; filter: none; transform: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.shell .workspace .btn .ico, #dialog .btn .ico { width: 18px; height: 18px; }
/* Meaningful icons lead the label; direction icons trail it. */
.shell .workspace .btn .ico:not(.ico-arrow, .ico-arrow-right, .ico-chevron, .ico-chevron-right, .ico-out, .ico-external-link),
#dialog .btn .ico:not(.ico-arrow, .ico-arrow-right, .ico-chevron, .ico-out) { order: -1; }
.shell .workspace .btn:hover:not(:disabled) { filter: none; transform: none; }
.shell .workspace .btn:active:not(:disabled) { transform: translateY(1px); }

/* Primary (and the former gold primary) on light surfaces. */
.shell .workspace :is(.btn.primary, .btn.gold), #dialog :is(.btn.primary, .form .primary) {
  background: var(--r-action); border-color: var(--r-action); color: var(--r-on-action); box-shadow: none;
}
.shell .workspace :is(.btn.primary, .btn.gold):hover:not(:disabled), #dialog .btn.primary:hover { background: var(--r-action-hover); border-color: var(--r-action-hover); }
.shell .workspace :is(.btn.primary, .btn.gold):active:not(:disabled) { background: var(--r-action-press); border-color: var(--r-action-press); box-shadow: none; }
.shell .workspace.training-workspace :is(.btn.primary, .btn.gold) { background: var(--r-action); border-color: var(--r-action); color: var(--r-on-action); }

/* Secondary. */
.shell .workspace .btn.ghost, #dialog .btn.ghost {
  background: var(--r-paper); color: var(--r-ink); border-color: var(--r-line-strong);
}
.shell .workspace .btn.ghost:hover:not(:disabled), #dialog .btn.ghost:hover { border-color: var(--r-action); background: var(--r-teal-wash); color: var(--r-ink); }

/* Tertiary. */
.shell .workspace .btn.tertiary { background: transparent; border-color: transparent; color: var(--r-link); padding-inline: 12px; }
.shell .workspace .btn.tertiary:hover { background: rgba(0, 121, 145, .08); }

/* Destructive. */
.shell .workspace .btn.danger { background: var(--r-danger); border-color: var(--r-danger); color: #fff; }
.shell .workspace .btn.danger:hover { background: var(--r-danger-hover); border-color: var(--r-danger-hover); }

/* Sizes. */
.shell .workspace .btn.sm { min-height: var(--r-btn-sm); padding: 0 12px; font-size: 13px; }
.shell .workspace .btn.lg { min-height: var(--r-btn-lg); padding: 0 24px; font-size: 16px; }

/* Disabled: still readable, clearly unavailable. */
.shell .workspace .btn:disabled, .shell .workspace .btn[aria-disabled="true"] {
  opacity: 1; cursor: not-allowed; background: #eef1f4; border-color: #dde3e8; color: #6b7686;
}
html[data-theme="dark"] .shell .workspace .btn:disabled { background: #26344f; border-color: #33435f; color: #93a1b6; }

/* Dark (navy) surfaces: gold marks the one main action, outline for the rest. */
.shell .workspace :is(.dashboard-banner, .workspace-directory-head, .community-feature, .network-feature, .pb-featured, .daily-brief, .path-unit-header) :is(.btn.primary, .btn.gold) {
  background: var(--r-gold); border-color: var(--r-gold); color: var(--r-navy);
}
.shell .workspace :is(.dashboard-banner, .workspace-directory-head, .community-feature, .network-feature, .pb-featured, .daily-brief, .path-unit-header) :is(.btn.primary, .btn.gold):hover {
  background: var(--r-gold-hover); border-color: var(--r-gold-hover);
}
.shell .workspace .btn.darkghost,
.shell .workspace :is(.dashboard-banner, .workspace-directory-head, .community-feature, .network-feature, .pb-featured, .daily-brief, .path-unit-header) .btn.ghost {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, .38);
}
.shell .workspace .btn.darkghost:hover,
.shell .workspace :is(.dashboard-banner, .workspace-directory-head, .community-feature, .network-feature, .pb-featured, .daily-brief, .path-unit-header) .btn.ghost:hover {
  background: rgba(255, 255, 255, .08); border-color: var(--r-gold); color: #fff;
}
/* Speaking studio stage is a dark surface too. */
.shell .workspace .voice-stage .btn { min-height: var(--r-btn-md); padding: 0 18px; font-size: 14px; border-radius: var(--r-radius-sm); }
.shell .workspace .voice-stage :is(.btn.primary, .btn.gold) { background: var(--r-gold); border-color: var(--r-gold); color: var(--r-navy); }
.shell .workspace .voice-stage :is(.btn.primary, .btn.gold):hover { background: var(--r-gold-hover); border-color: var(--r-gold-hover); }
.shell .workspace .voice-stage .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .38); }
.shell .workspace .voice-stage .btn.ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--r-gold); }
.shell .workspace .voice-stage .studio-alert .btn { min-height: var(--r-btn-sm); padding: 0 12px; font-size: 13px; }

/* Daily work "Write your submission" is a primary disclosure button. */
.shell .workspace .task-compose > summary {
  width: 100%; justify-content: space-between; background: var(--r-action); border-color: var(--r-action); color: var(--r-on-action); list-style: none;
}
.shell .workspace .task-compose > summary:hover { background: var(--r-action-hover); border-color: var(--r-action-hover); }
.shell .workspace .task-compose[open] > summary { background: var(--r-paper); color: var(--r-ink); border-color: var(--r-line-strong); }

/* Text links: no decorative arrow; underline on hover; external icon kept (it means "new tab"). */
.shell .workspace .textlink {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--r-link);
  font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 4px; text-decoration-thickness: 1.5px; transition: text-decoration-color .15s;
}
.shell .workspace .textlink:hover { text-decoration-color: currentColor; }
.shell .workspace .textlink .ico { width: 16px; height: 16px; }
.shell .workspace .textlink .ico-arrow { display: none; }
.shell .workspace :is(.community-feature, .network-feature) .textlink { color: #cfe7ec; }

/* Filter chips (inside .chips) stay pills; chips used as actions become small secondary buttons. */
.shell .workspace .chips > .chip, .shell .workspace .chips > a.chip {
  min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--r-muted);
  background: var(--r-paper); border: 1px solid var(--r-line);
}
.shell .workspace .chips > .chip:hover:not(:disabled) { border-color: var(--r-action); color: var(--r-ink); }
.shell .workspace .chips > :is(.chip[aria-pressed="true"], .chip[aria-current="page"]),
body.research-page .shell .workspace .chips > .chip[aria-pressed=true] {
  background: var(--r-navy-2); border-color: var(--r-navy-2); color: #fff;
}
html[data-theme="dark"] .shell .workspace .chips > :is(.chip[aria-pressed="true"], .chip[aria-current="page"]),
html[data-theme="dark"] body.research-page .shell .workspace .chips > .chip[aria-pressed=true] {
  background: var(--r-gold); border-color: var(--r-gold); color: var(--r-navy);
}
.shell .workspace .chip:not(.chips > .chip) {
  min-height: var(--r-btn-sm); padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--r-radius-sm); font: 600 13px/1.2 var(--r-sans); background: var(--r-paper);
  color: var(--r-ink); border: 1.5px solid var(--r-line-strong);
}
.shell .workspace .chip:not(.chips > .chip):hover:not(:disabled) { border-color: var(--r-action); background: var(--r-teal-wash); }
.shell .workspace .chip:not(.chips > .chip)[aria-pressed="true"] { background: var(--r-teal-wash); border-color: var(--r-action); color: var(--r-link); }
.shell .workspace .chip:not(.chips > .chip):disabled { opacity: 1; color: #7b8696; background: #f1f3f5; border-color: #e1e6ea; cursor: not-allowed; }
html[data-theme="dark"] .shell .workspace .chip:not(.chips > .chip):disabled { color: #8d9ab0; background: #26344f; border-color: #33435f; }
.shell .workspace .chip .ico { width: 16px; height: 16px; }

/* Cards / list view toggle. */
.shell .workspace .collection-view { gap: 4px; padding: 3px; border: 1px solid var(--r-line); border-radius: 10px; background: var(--r-paper); width: max-content; margin-inline-start: auto; }
.shell .workspace .collection-view button {
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px; font: 600 13px/1 var(--r-sans);
  color: var(--r-muted); background: transparent; gap: 6px; display: inline-flex; align-items: center;
}
.shell .workspace .collection-view button[aria-pressed="true"] { background: var(--r-teal-wash); color: var(--r-ink); border: 0; }
.shell .workspace .collection-view .ico { width: 16px; height: 16px; }

/* ---------- Focus: keyboard only, dual ring that shows on light and dark ---------- */
.shell :is(a, button, summary, select, input, textarea, [tabindex]):focus-visible,
#dialog :is(a, button, select, input, textarea):focus-visible,
#academy-help button:focus-visible {
  outline: 3px solid var(--r-focus-outer); outline-offset: 2px; box-shadow: 0 0 0 2px var(--r-focus-inner);
}
.shell .side :is(a, button, summary, select):focus-visible,
.shell .workspace :is(.dashboard-banner, .workspace-directory-head, .community-feature, .network-feature, .pb-featured, .daily-brief, .path-unit-header, .voice-stage) :is(a, button):focus-visible {
  outline-color: var(--r-gold); box-shadow: 0 0 0 2px var(--r-navy);
}
.shell :is(.btn, .chip, a, button):focus:not(:focus-visible) { outline: none; }

/* ---------- Dark-mode contrast fixes ---------- */
html[data-theme="dark"] body.research-page { --rh-ink: #eef2f6; --rh-slate: #c0ccd8; --rh-paper: #141e34; --rh-tile: #8fd3e0; --rh-gilt: #e9d985; }
html[data-theme="dark"] body.research-page .rh-tabs a { color: #c0ccd8; }
html[data-theme="dark"] body.research-page .rh-tabs a[aria-current=page] { color: #fff; }
html[data-theme="dark"] .shell .workspace .eyebrow { color: #8fd3e0; }

/* Political books: "Book of the week" title on navy. */
.shell .workspace .card.pb-featured h2, .shell .workspace .card.pb-featured h2 a { color: #fff; }
.shell .workspace .pb-featured .eyebrow { color: var(--r-gold); }

/* ---------- Help launcher: compact, never covers the sidebar ---------- */
#academy-help { right: auto; inset-inline-end: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
#academy-help .help-launcher {
  min-width: 48px; min-height: 48px; padding: 0; justify-content: center; border-radius: 50%;
  background: var(--r-navy); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 6px 18px rgba(16, 35, 49, .28);
}
#academy-help .help-launcher:hover { background: #1b3346; }
#academy-help .help-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#academy-help .help-symbol { border: 0; width: 24px; height: 24px; font: 600 20px/1 var(--r-sans); color: #fff; }
[dir=rtl] #academy-help .help-panel { right: auto; left: 0; }
.shell .workspace { padding-bottom: 96px; }

/* ---------- Top bar ---------- */
.shell .topbar :is(.theme-toggle, .icon-button, .streak-link, .search-launch) { border-radius: var(--r-radius-sm); }

/* Sidebar tools (language + theme) appear only in the mobile drawer. */
.shell .side-tools { display: none; }

@media (max-width: 640px) {
  .shell .top-actions :is(.language, .theme-toggle) { display: none; }
  /* Keep these controls inside the drawer’s keyboard focus order. */
  body.menu-open .shell .side-tools {
    display: flex; gap: 8px; align-items: center; position: sticky; bottom: 0; z-index: 1;
    margin-inline: -15px; box-sizing: border-box; padding: 12px 15px calc(12px + env(safe-area-inset-bottom)); background: #222e50; border-top: 1px solid #ffffff18;
  }
  .shell .side-tools .language {
    flex: 1; min-height: 44px; border-radius: var(--r-radius-sm); background: #ffffff10; color: #fff;
    border: 1px solid #ffffff30; padding: 0 10px; font: 500 14px var(--r-sans);
  }
  .shell .side-tools .language option { color: #102331; }
  .shell .side-tools .theme-toggle {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-radius-sm);
    background: #ffffff10; color: #fff; border: 1px solid #ffffff30;
  }
  .shell .topbar .crumb { min-width: 0; flex: 1; gap: 8px; }
  .shell .topbar .app-breadcrumb > :is(a, span) { display: none; }
  .shell .topbar .crumb strong { display: block; min-width: 0; font-size: 15px; }
  .shell .topbar :is(.menu-toggle, .search-launch, .bookmark-toggle, .workspace-account-link) { min-width: 44px; min-height: 44px; }
  #academy-help { inset-inline-end: 12px; bottom: 12px; }
}

/* ---------- Footer: formal identity line ---------- */
.shell .app-footer {
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: space-between;
  margin: 40px 0 0; padding-top: 14px; border-top: 1px solid var(--r-line); position: relative;
  font: 500 13px/1.5 var(--r-sans); color: var(--r-muted);
}
.shell .app-footer::before {
  content: ""; position: absolute; inset-inline-start: 0; top: -1px; width: 72px; height: 2px;
  background: linear-gradient(90deg, var(--r-flag-blue) 0 33%, var(--r-flag-red) 33% 36%, var(--r-flag-white) 36% 64%, var(--r-flag-red) 64% 67%, var(--r-flag-green) 67%);
}
.shell .app-footer strong { font: 500 15px/1.3 var(--r-serif); color: var(--r-ink); }

/* Page guide (uz/ru/en notes): quiet reference block instead of three cards. */
.shell .workspace .page-languages { gap: 0 28px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--r-line); }
.shell .workspace .page-languages > div { background: none; border: 0; box-shadow: none; padding: 0; }
.shell .workspace .page-languages strong { font: 600 12px/1.4 var(--r-sans); color: var(--r-ink); }
.shell .workspace .page-languages p { font-size: 13px; color: var(--r-muted); margin-top: 2px; }

/* ---------- Registan star: completion mark ---------- */
.shell .path-track .is-done .path-medal, .shell .workspace .roadmap li.done .road-circle {
  /* 8-point khatam star (two squares at 45deg), the Registan motif, marks completion. */
  clip-path: polygon(50% 0, 64.64% 14.64%, 85.36% 14.64%, 85.36% 35.36%, 100% 50%, 85.36% 64.64%, 85.36% 85.36%, 64.64% 85.36%, 50% 100%, 35.36% 85.36%, 14.64% 85.36%, 14.64% 64.64%, 0 50%, 14.64% 35.36%, 14.64% 14.64%, 35.36% 14.64%);
  border-radius: 0; border-color: transparent; background: var(--r-teal); color: #fff; box-shadow: none;
}
.shell .workspace .roadmap li.done .road-circle .ico { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .shell .workspace :is(.btn, .chip, .textlink) { transition: none; }
}

/* Dashboard hero: three secondary routes fit one row. */
.shell .workspace .dashboard-banner .actions { gap: 10px; }
.shell .workspace .dashboard-banner .btn.darkghost { padding: 0 14px; }

/* Numbers: lining figures everywhere (Playfair's old-style 0 reads as "o"). */
.shell, #dialog { font-variant-numeric: lining-nums; }
.shell :is(.stat strong, .rh-stats strong, .task-score, .week-result, .stat-ring) { font-variant-numeric: lining-nums tabular-nums; }
.shell .workspace .rh-stats span { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--r-muted); }
.shell .workspace :is(.rh-facts dt, .cl-dl dt) { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }

[dir=rtl] .shell .side .navitem.active { box-shadow: inset -3px 0 var(--r-gold); }

/* Focus inside horizontally scrolling tab rows: draw the ring inside so it is not clipped. */
.shell .workspace :is(.rh-tabs a, .training-navigation a, .chips.writing-steps > a):focus-visible { outline-offset: -3px; box-shadow: none; }

/* Small text floor: nothing under 11px in the workspace. */
.shell .workspace .module-level { font-size: 12px; }
.shell .workspace :is(.task-week-data tbody th small, .week-result small, .rh-years small) { font-size: 12px; }

/* "Book of the week" stays a navy panel in both themes. */
.shell .workspace .card.pb-featured { background: var(--r-navy) !important; border: 1px solid #ffffff14; }
.shell .workspace .card.pb-featured p { color: #d9dfe6 !important; }

/* Top bar controls share one height and radius. */
.shell .top-actions :is(.portal-search, .streak-link, .theme-toggle, .language, .workspace-account-link) {
  height: 40px; min-height: 40px; border-radius: var(--r-radius-sm); box-sizing: border-box;
}
.shell .top-actions .theme-toggle { width: 40px; display: inline-grid; place-items: center; padding: 0; }
.shell .top-actions :is(.portal-search, .workspace-account-link, .language) { font-size: 13px; }

/* Speaking/interview/debate switcher: same anatomy as filter chips. */
.shell .workspace .training-navigation a {
  min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); font: 600 13px/1 var(--r-sans);
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--r-line); background: var(--r-paper); color: var(--r-muted);
}
.shell .workspace .training-navigation a .ico { width: 18px; height: 18px; }
.shell .workspace .training-navigation a:hover { border-color: var(--r-action); color: var(--r-ink); }
.shell .workspace .training-navigation a[aria-current="page"] { background: var(--r-navy-2); border-color: var(--r-navy-2); color: #fff; }
html[data-theme="dark"] .shell .workspace .training-navigation a[aria-current="page"] { background: var(--r-gold); border-color: var(--r-gold); color: var(--r-navy); }
@media (max-width: 640px) {
  .shell .top-actions :is(.portal-search, .streak-link, .workspace-account-link) { height: 44px; min-height: 44px; }
}

/* Catalogue filters (academy) share the chip anatomy. */
.shell .workspace .workspace-filter {
  min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); font: 600 13px/1 var(--r-sans);
  color: var(--r-muted); background: var(--r-paper); border: 1px solid var(--r-line);
}
.shell .workspace .workspace-filter[aria-pressed="true"] { background: var(--r-navy-2); border-color: var(--r-navy-2); color: #fff; }
html[data-theme="dark"] .shell .workspace .workspace-filter[aria-pressed="true"] { background: var(--r-gold); border-color: var(--r-gold); color: var(--r-navy); }

/* Section titles are Playfair like every other H2. */
.shell .workspace .rh-section-title { font: 500 clamp(24px, 2.6vw, 32px)/1.25 var(--r-serif); letter-spacing: -.02em; color: var(--r-ink); }

/* One primary per view: repeated card actions in a grid are secondary. */
.shell .workspace :is(.board-grid, .library-grid) > .card .btn.primary {
  background: var(--r-paper); color: var(--r-ink); border-color: var(--r-line-strong);
}
.shell .workspace :is(.board-grid, .library-grid) > .card .btn.primary:hover:not(:disabled) {
  background: var(--r-teal-wash); border-color: var(--r-action); color: var(--r-ink);
}
.shell .workspace :is(.board-grid, .library-grid) > .card .btn.primary .ico-arrow { color: var(--r-link); }

/* Respect the hidden attribute on restyled controls. */
.shell :is(.btn, .chip, .textlink, .workspace-filter, .collection-view, .task-compose)[hidden] { display: none !important; }

/* `font:` shorthands elsewhere reset font-variant-numeric; the feature setting survives them. */
.shell, #dialog { font-feature-settings: "lnum" 1; }
.shell :is(.task-score strong, .stat strong, .rh-stats strong) { font-feature-settings: "lnum" 1, "tnum" 1; }
html[data-theme="dark"] .shell .workspace .card.pb-featured .eyebrow { color: var(--r-gold); }
@media (max-width: 640px) {
  .shell .top-actions .theme-toggle { display: none; }
}

/* ===== Learning path as a course programme (agenda), not a game map =====
   Roman-numbered items like articles of a treaty; hairline rows on paper;
   the khatam star marks completed items; one primary action on the current item. */
.shell .workspace .agenda{background:var(--ui-paper,#fff);border:1px solid var(--ui-line,#dce5df);border-radius:12px;overflow:hidden}
.shell .workspace .agenda-head{display:grid;grid-template-columns:1fr auto;gap:6px 24px;align-items:end;padding:26px 30px 0}
.shell .workspace .agenda-kicker{display:block;font-size:13px;font-weight:600;color:var(--ui-muted,#586576);margin-bottom:4px}
.shell .workspace .agenda-head h2{font:500 clamp(22px,2.2vw,28px)/1.2 var(--ui-serif,'Playfair Display',Georgia,serif);letter-spacing:-.02em;margin:0;color:var(--ui-ink)}
.shell .workspace .agenda-count{text-align:end;color:var(--ui-muted,#586576);font-size:13px;white-space:nowrap}
.shell .workspace .agenda-count strong{font:500 30px/1 var(--ui-serif,'Playfair Display',Georgia,serif);color:var(--ui-ink);margin-inline-end:6px;font-variant-numeric:lining-nums}
.shell .workspace .agenda-bar{grid-column:1/-1;height:3px;background:var(--ui-line,#dce5df);margin:20px 0 22px;border-radius:2px;overflow:hidden}
.shell .workspace .agenda-bar span{display:block;height:100%;background:var(--ui-accent,#007991)}
.shell .workspace .agenda-list{list-style:none;margin:0;padding:0}
.shell .workspace .agenda-item{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:20px;align-items:center;padding:20px 30px;border-top:1px solid var(--ui-line,#dce5df)}
.shell .workspace .agenda-list .agenda-item:first-child{border-top:0}
.shell .workspace .agenda-num{font:500 26px/1 var(--ui-serif,'Playfair Display',Georgia,serif);color:var(--ui-muted,#586576);font-variant-numeric:lining-nums;letter-spacing:.02em}
.shell .workspace .agenda-item.is-final .agenda-num{font:600 13px/1.2 var(--ui-sans,Inter,sans-serif);letter-spacing:0;padding:6px 8px;border:1px solid currentColor;border-radius:6px;justify-self:start}
.shell .workspace .agenda-body h3{font:600 17px/1.35 var(--ui-sans,Inter,sans-serif);margin:0 0 4px;color:var(--ui-ink)}
.shell .workspace .agenda-body h3 a{color:inherit;text-decoration:none}
.shell .workspace .agenda-body h3 a:hover{text-decoration:underline;text-underline-offset:3px}
.shell .workspace .agenda-body p{margin:0;font-size:14px;line-height:1.55;color:var(--ui-muted,#586576);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:62ch}
.shell .workspace .agenda-side{display:flex;justify-content:flex-end}
.shell .workspace .agenda-status{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;white-space:nowrap}
.shell .workspace .agenda-status .ico{width:16px;height:16px}
.shell .workspace .agenda-status.locked{color:var(--ui-muted,#586576)}
.shell .workspace .agenda-status.done{color:#0a6b55}
.shell .workspace .agenda-star{width:18px;height:18px;fill:#e9d985;stroke:#8a6d12;stroke-width:1}
.shell .workspace .agenda-item.is-current{background:var(--ui-tint,#eaf2e9)}
.shell .workspace .agenda-item.is-current .agenda-num{color:var(--ui-accent,#007991)}
.shell .workspace .agenda-item.is-locked .agenda-body h3{color:var(--ui-muted,#586576)}
.shell .workspace .agenda-item.is-done .agenda-num{color:var(--ui-ink)}
.shell .workspace .agenda-go{white-space:nowrap}
html[data-theme="dark"] .shell .workspace .agenda-status.done{color:#9fe0c9}
html[data-theme="dark"] .shell .workspace .agenda-item.is-current{background:#ffffff0d}
@media (max-width:760px){
  .shell .workspace .agenda-head{padding:20px 18px 0;grid-template-columns:1fr}
  .shell .workspace .agenda-count{text-align:start}
  .shell .workspace .agenda-item{grid-template-columns:44px minmax(0,1fr);gap:6px 14px;padding:18px}
  .shell .workspace .agenda-num{font-size:20px}
  .shell .workspace .agenda-side{grid-column:2;justify-content:flex-start;margin-top:8px}
}
/* dashboard roadmap: numbered programme items, consistent with the learning path */
.shell .workspace .roadmap .road-circle.road-num{font:500 17px/1 var(--ui-serif,'Playfair Display',Georgia,serif);font-variant-numeric:lining-nums;background:var(--ui-paper,#fff);border:1px solid var(--ui-line,#dce5df);color:var(--ui-muted,#586576);box-shadow:none;position:relative;z-index:1}
.shell .workspace .roadmap li.next .road-circle.road-num{background:var(--ui-accent,#007991);border-color:var(--ui-accent,#007991);color:#fff}
.shell .workspace .roadmap li.locked .road-copy strong{color:var(--ui-muted,#586576);font-weight:600}
/* learning path: course facts, meta and aside */
.shell .workspace .agenda-lead{margin:8px 0 0;font-size:15px;line-height:1.6;color:var(--ui-muted,#586576);max-width:56ch}
.shell .workspace .agenda-facts{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:22px 0 0;border:1px solid var(--ui-line,#dce5df);border-radius:8px}
.shell .workspace .agenda-facts>div{padding:12px 16px}
.shell .workspace .agenda-facts>div+div{border-inline-start:1px solid var(--ui-line,#dce5df)}
.shell .workspace .agenda-facts dt{font-size:12px;font-weight:600;color:var(--ui-muted,#586576);margin:0 0 4px}
.shell .workspace .agenda-facts dd{margin:0;font-size:15px;font-weight:650;color:var(--ui-ink);font-variant-numeric:lining-nums tabular-nums}
.shell .workspace .agenda-meta{list-style:none;display:flex;flex-wrap:wrap;gap:6px 18px;margin:10px 0 0;padding:0}
.shell .workspace .agenda-meta li{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--ui-muted,#586576)}
.shell .workspace .agenda-meta .ico{width:14px;height:14px}
.shell .workspace .agenda-card h2{font:500 19px/1.25 var(--ui-serif,'Playfair Display',Georgia,serif);margin:0 0 14px}
.shell .workspace .agenda-outcomes{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.shell .workspace .agenda-outcomes li{display:grid;grid-template-columns:18px 1fr;gap:10px;font-size:14px;line-height:1.5;color:var(--ui-ink)}
.shell .workspace .agenda-outcomes .ico{width:18px;height:18px;color:var(--ui-accent,#007991);margin-top:1px}
.shell .workspace .agenda-steps{margin:0;padding:0;list-style:none;counter-reset:st;display:grid;gap:10px}
.shell .workspace .agenda-steps li{counter-increment:st;display:grid;grid-template-columns:26px 1fr;gap:10px;align-items:center;font-size:14px;color:var(--ui-ink)}
.shell .workspace .agenda-steps li::before{content:counter(st);width:26px;height:26px;border-radius:50%;border:1px solid var(--ui-line,#dce5df);display:grid;place-items:center;font-size:12px;font-weight:700;color:var(--ui-muted,#586576)}
.shell .workspace .agenda-cite{font-size:13.5px;line-height:1.6;color:var(--ui-muted,#586576);margin:0 0 8px}
.shell .workspace .agenda-cite em{color:var(--ui-ink);font-style:italic}
.shell .workspace .path-aside{display:grid;gap:16px;align-content:start}
@media (max-width:760px){.shell .workspace .agenda-facts{grid-template-columns:1fr 1fr}.shell .workspace .agenda-facts>div:nth-child(3){border-inline-start:0}.shell .workspace .agenda-facts>div:nth-child(n+3){border-top:1px solid var(--ui-line,#dce5df)}}
