:root{font-family:'Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--surface);font-size:15px;font-synthesis:none;--green:var(--teal);--muted:var(--muted);--line:var(--frost)}*{box-sizing:border-box}body{margin:0}header{height:77px;padding:0 32px;display:flex;align-items:center;gap:32px;border-bottom:1px solid var(--line);background:var(--surface)}header span{flex:1;color:var(--muted);font-size:13px}.brand{font-size:24px;font-weight:750;letter-spacing:-.8px;color:var(--green);text-decoration:none}main{max-width:1520px;margin:auto;padding:0 32px}.workspace{display:grid;grid-template-columns:218px minmax(0,1fr);gap:48px;min-height:80vh}.sidebar{border-right:1px solid var(--line);padding:32px 24px 32px 0;position:sticky;top:0;align-self:start;min-height:80vh}.eyebrow{text-transform:uppercase;letter-spacing:1.7px;font-size:10px;font-weight:750;color:var(--muted)}.identity{display:flex;gap:16px;align-items:center;margin:24px 0 32px}.avatar{display:grid;place-items:center;background:var(--frost);color:var(--green);width:37px;height:37px;border-radius:12px;font-weight:700}nav{display:grid;gap:8px}.nav-item{margin:0;text-align:left;background:transparent;color:var(--muted);font-size:14px;padding:16px 16px;border-radius:9px}.nav-item:hover{background:var(--frost);color:var(--teal)}.nav-item.active{background:var(--frost);color:var(--green);font-weight:700}.sidebar-note{margin-top:56px;padding:16px;border:1px solid var(--frost);border-radius:13px;color:var(--muted);font-family:Georgia,serif;font-size:21px;line-height:1.4}.page{padding:32px 0;max-width:1130px}.page-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}.page-title{margin-bottom:32px}.page-title h1{font-size:32px;letter-spacing:-1.1px;font-weight:650;line-height:1.2;margin:0 0 16px}.page-title p{max-width:760px;margin:0}h2{font-size:19px;font-weight:650;margin:0 0 16px;letter-spacing:-.3px}h3{font-size:16px;line-height:1.5}p{line-height:1.7}a{color:var(--green);text-underline-offset:3px}.muted{color:var(--muted)}.small,small{font-size:12px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:24px 24px;display:flex;flex-direction:column;gap:16px}.stat-card span{color:var(--muted);font-size:13px}.stat-card strong{font-size:34px;font-weight:600;letter-spacing:-1px}.hero-card{display:grid;grid-template-columns:1.5fr 1fr;gap:32px;background:var(--frost);border:1px solid var(--line-strong);border-radius:17px;padding:32px;margin:24px 0}.hero-card h2{font-family:Georgia,serif;font-size:29px;font-weight:400;line-height:1.25;margin:16px 0}.hero-card p{font-size:13px;color:var(--muted);max-width:430px}.hero-art{align-self:center;display:flex;flex-direction:column;align-items:center;transform:rotate(-5deg);border-radius:16px;background:var(--surface);padding:16px;box-shadow:8px 9px 0 var(--line-strong);max-width:215px;margin:auto;width:100%;gap:8px}.hero-art span:first-child{font-size:45px;font-family:Georgia,serif;color:var(--muted);align-self:start}.hero-art span:not(:first-child){padding:8px 16px;background:var(--frost);border-radius:20px;width:100%;text-align:center;color:var(--muted)}.split,.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid{align-items:start;gap:0 16px}.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:24px;margin:0 0 24px}.split>.card{height:fit-content}.row{display:flex;align-items:center;justify-content:space-between;gap:16px}.row h2{margin-bottom:8px}.row p{margin:8px 0}.badge{display:inline-block;font-size:11px;color:var(--teal);background:var(--frost);border-radius:20px;padding:8px 8px;white-space:nowrap}.studio-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:32px}.studio-context{padding:24px 8px}.step{display:flex;gap:16px;margin:16px 0}.step b{background:var(--frost);border-radius:50%;font-size:12px;display:grid;place-items:center;min-width:28px;height:28px;color:var(--muted)}.step p{font-size:13px;color:var(--muted);margin:0}.notice{background:var(--frost);border:1px solid var(--line-strong);color:var(--teal);padding:16px;border-radius:10px;font-size:13px;line-height:1.7;margin:16px 0 24px}.curriculum-note{background:var(--surface);border-left:3px solid var(--faint);padding:16px 16px;margin:16px 0;font-size:13px}.curriculum-note p{margin:8px 0}.lesson>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:16px}.lesson>summary small{color:var(--muted);font-weight:400}.lesson ol{line-height:1.9;color:var(--muted)}.lesson details{margin:16px 0}summary{font-weight:600;cursor:pointer;line-height:1.6}details>summary{list-style-position:inside}details[open]>summary{margin-bottom:16px}label{display:block;font-size:12px;font-weight:650;margin:16px 0 8px;color:var(--teal)}input,select,textarea{display:block;width:100%;font:inherit;font-size:14px;color:var(--ink);padding:16px;border:1px solid var(--line-strong);border-radius:8px;background:white;margin-top:8px}input:focus,select:focus,textarea:focus{outline:2px solid var(--faint);outline-offset:2px}input[type=checkbox],input[type=radio]{width:auto;display:inline;margin:0;flex-shrink:0;accent-color:var(--teal)}.check,.choice{display:flex;align-items:flex-start;gap:8px;font-weight:400;line-height:1.7}.check input{margin-top:8px}.choice{padding:8px;border:1px solid var(--line);border-radius:8px;align-items:center}.choice span{font-size:14px}textarea{min-height:105px}fieldset{border:1px solid var(--line);border-radius:10px;margin:24px 0;padding:16px}legend{font-weight:600;line-height:1.6;padding:0 8px}button{font:inherit;font-size:13px;border:0;background:var(--green);color:var(--surface);padding:16px 16px;border-radius:8px;cursor:pointer;margin-top:16px;font-weight:600}button:hover{background:var(--ink)}button:disabled{opacity:.45;cursor:not-allowed}.quiet{background:transparent;color:var(--muted);border:1px solid var(--line-strong)}.quiet:hover{background:var(--frost)}.danger{background:var(--brick)}.download{display:inline-block;margin:16px 0;border:1px solid var(--line-strong);padding:8px 16px;border-radius:8px;font-size:13px;text-decoration:none}.feedback{background:var(--frost);padding:16px;border-radius:10px;margin:16px 0}.empty{padding:32px 24px;border:1px dashed var(--line-strong);border-radius:12px;color:var(--muted);font-size:14px;margin:16px 0}.shelf-note{padding:32px;background:var(--frost);border-radius:13px;margin-bottom:24px;color:var(--muted)}.shelf-note h2{font:30px/1.3 Georgia,serif;margin:16px 0;color:var(--teal)}.shelf-note p{font-size:13px}.book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.book-cover{height:175px;padding:24px 16px;display:flex;flex-direction:column;justify-content:space-between;background:var(--frost);color:var(--teal);border-left:6px solid var(--line-strong);border-radius:3px 9px 9px 3px;font:22px/1.3 Georgia,serif}.book-cover small{font:11px 'Segoe UI',sans-serif}.color-1{background:var(--frost);color:var(--muted);border-color:var(--line-strong)}.color-2{background:var(--frost);color:var(--teal);border-color:var(--line-strong)}.book-card h3{margin-bottom:8px}.book-card p{margin-top:0}.book-card a{font-size:12px}.book-card details{font-size:12px;margin-top:24px}.big-number{font-size:43px;font-weight:600;margin:16px 0}progress{width:100%;accent-color:var(--muted)}blockquote{border-left:2px solid var(--line-strong);padding:8px 16px;margin:16px 0;font-size:13px;color:var(--muted)}.auth{max-width:480px;margin:64px auto}.auth h1{font:44px/1.12 Georgia,serif;letter-spacing:-1.5px;margin:16px 0}.auth .card{margin-top:32px}.auth form>button{width:100%}.auth details{margin-top:24px}.demo-switch{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:16px;background:var(--frost);border:1px solid var(--line-strong);border-radius:10px;margin:16px 0}.demo-switch>span{font-size:12px;color:var(--muted);flex:1}.demo-switch button{font-size:12px;margin:0;padding:8px 16px}#status{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--ink);color:var(--surface);border-radius:9px;box-shadow:0 4px 16px var(--ink)22;padding:16px 24px;max-width:85%;font-size:13px;z-index:10}#status:empty{display:none}footer{color:var(--muted);text-align:center;font-size:11px;padding:32px}@media(min-width:1500px){.page{padding-right:32px}}@media(max-width:1050px){.workspace{grid-template-columns:180px minmax(0,1fr);gap:24px}.sidebar{padding-right:16px}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-card{grid-template-columns:1fr}.hero-art{display:none}}@media(max-width:760px){header{padding:0 16px;height:66px}header span{display:none}header .brand{flex:1}main{padding:0 16px}.workspace{display:block}.sidebar{position:static;min-height:0;border:0;padding:16px 0 0}.sidebar>.eyebrow,.identity,.sidebar-note{display:none}nav{display:flex;overflow-x:auto;gap:8px;padding-bottom:8px}.nav-item{white-space:nowrap;padding:8px 16px}.page{padding-top:16px}.page-title h1{font-size:28px}.stats{gap:8px}.stat-card{padding:16px 16px}.stat-card span{font-size:11px}.stat-card strong{font-size:28px}.split,.studio-layout,.form-grid{grid-template-columns:1fr}.card{padding:16px}.studio-context{display:none}.hero-card{padding:24px}.hero-card h2{font-size:27px}.row{flex-wrap:wrap}.book-grid{grid-template-columns:1fr 1fr}.book-cover{font-size:18px}.auth{margin:40px auto}.auth h1{font-size:37px}.lesson>summary{flex-wrap:wrap}.curriculum-note .small{display:block}.book-card{padding:16px}}@media(max-width:430px){.book-grid{grid-template-columns:1fr}}
.learning-controls{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:16px}.learning-controls label{margin-top:0}.learning-controls button{margin-bottom:0}.map-legend{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0;font-size:12px;color:var(--muted)}.map-legend>span{display:flex;align-items:center;gap:8px}.level-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--faint)}.level-dot.struggling{background:var(--brick)}.level-dot.developing{background:var(--muted)}.level-dot.secure{background:var(--muted)}.map-card{padding:24px 16px 8px}.map-scroll{overflow-x:auto}.knowledge-svg{width:100%;min-width:650px;display:block}.map-edges path{fill:none;stroke:var(--line-strong);stroke-width:2;stroke-dasharray:5 5}.map-node{cursor:pointer;outline:none}.map-node rect{fill:var(--surface);stroke:var(--line-strong);stroke-width:1.5}.map-node circle{fill:var(--faint)}.map-node.struggling rect{fill:var(--surface);stroke:var(--line-strong)}.map-node.struggling circle{fill:var(--brick)}.map-node.developing rect{fill:var(--frost);stroke:var(--line-strong)}.map-node.developing circle{fill:var(--muted)}.map-node.secure rect{fill:var(--frost);stroke:var(--faint)}.map-node.secure circle{fill:var(--muted)}.map-node.selected rect,.map-node:focus rect{stroke:var(--teal);stroke-width:3}.node-label{font-size:12px;font-weight:650;fill:var(--teal)}.node-status{font-size:11px;fill:var(--muted)}.node-kind{font-size:9px;fill:var(--muted)}.pathway-suggestion{display:flex;flex-direction:column;gap:8px;background:var(--surface);color:var(--teal);border:1px solid var(--frost);text-align:left;width:100%;margin:16px 0;padding:16px}.pathway-suggestion:hover{background:var(--frost)}.pathway-suggestion span{font-weight:400;font-size:12px;line-height:1.6}.copilot-mode{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);padding:8px 0 24px;flex-wrap:wrap}.copilot-mode strong{color:var(--teal)}.copilot-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.copilot-actions button{background:var(--surface);border:1px solid var(--frost);color:var(--teal);display:flex;flex-direction:column;gap:8px;text-align:left;padding:16px 16px;margin:0;min-height:105px}.copilot-actions button:hover{background:var(--frost)}.copilot-actions button span{font-weight:400;color:var(--muted);font-size:11px;line-height:1.5}.live-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(240px,1fr);gap:24px}.analogy{padding:16px 24px;background:var(--frost);border-left:3px solid var(--faint);border-radius:8px;margin:24px 0}.analogy h3{margin:0 0 8px}.analogy p{margin:0;font-size:14px}.copilot-draft>h3{margin:24px 0 8px}.copilot-draft>p{font-size:14px}.level-badge.struggling{background:var(--surface);color:var(--muted)}.level-badge.developing{background:var(--frost);color:var(--muted)}@media(max-width:1080px){.copilot-actions{grid-template-columns:repeat(2,1fr)}.live-grid{grid-template-columns:1fr}}@media(max-width:760px){.learning-controls{grid-template-columns:1fr}.map-legend{gap:16px}.copilot-actions button{padding:16px 16px}.learning-controls button{margin-top:0}.map-card{padding:16px 8px}}
.detective-panel{padding-top:16px;margin-top:24px;border-top:1px solid var(--frost)}.analysis-result{padding:24px;background:var(--frost);border:1px solid var(--line-strong);border-radius:12px;margin:16px 0}.analysis-result ol{line-height:1.8;padding-left:24px}.analysis-result ol details{font-size:12px;margin:8px 0}.parent-message{min-height:440px;line-height:1.7;font-size:14px}.review-share{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.review-share button{margin-top:0}.review-share a{margin:16px 0}.analysis-result>strong{display:block;line-height:1.6}
[hidden]{display:none!important}

.table-scroll{overflow-x:auto;margin:16px 0}.table-scroll table{border-collapse:collapse;width:100%;min-width:580px}.table-scroll th,.table-scroll td{text-align:left;vertical-align:top;padding:16px 16px;border-bottom:1px solid var(--line)}.table-scroll th{font-size:12px;color:var(--muted)}
/* Owner console: accounts waiting for approval */
.account-row{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;align-items:flex-start;padding:16px 0;border-top:1px solid var(--line-strong)}.account-who{min-width:0;flex:1 1 240px}.account-who .small{overflow-wrap:anywhere}.account-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start}
.key-list{margin:0 0 16px}.key-row{display:flex;flex-wrap:wrap;gap:8px 16px;justify-content:space-between;align-items:flex-start;padding:16px 0;border-top:1px solid var(--line-strong)}.key-who{min-width:0;flex:1 1 240px;overflow-wrap:anywhere}.key-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start}.key-status{font-size:.9em;font-weight:600}.key-status.ok{color:var(--green)}.key-status.warn{color:var(--warn)}.key-add{display:grid;gap:8px;margin:8px 0}
.engine-status{color:var(--muted);margin:0 0 8px}.engine-ready{color:var(--teal)}.engine-failed,.engine-too_big{color:var(--brick)}.study-library{margin:0;display:flex;align-items:center;gap:8px}.study-library select{margin:0;padding:8px;width:auto}
.engine-question{padding:16px 0;border-top:1px solid var(--line)}.engine-question:first-of-type{border-top:0}.engine-question .study-prose{margin:8px 0}.engine-question-skip{opacity:.6}.engine-choices{margin:8px 0;padding-left:24px;line-height:1.7}
.engine-question textarea{min-height:56px;height:72px;resize:vertical}
.study-lesson-items{border:1px solid var(--line-strong);border-radius:16px;padding:8px 16px;margin:8px 0;max-height:360px;overflow:auto}.study-lesson-items legend{padding:0 8px}
.pack-pickers{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 8px}
.button-like,.verify-card a.button{position:relative;display:inline-flex;align-items:center;cursor:pointer;background:var(--green);color:var(--surface);padding:8px 16px;border-radius:8px;font-size:12px;font-weight:600;text-decoration:none}
.button-like.quiet{background:transparent;color:var(--muted);border:1px solid var(--line-strong)}
.button-like:focus-within{outline:2px solid var(--green);outline-offset:2px}
.file-hidden{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.pack-table th,.pack-table td{white-space:nowrap}
.pack-status{font-weight:600}.pack-status.new{color:var(--green)}.pack-status.changed{color:var(--warn,#a15c00)}.pack-status.too,.pack-status.failed{color:var(--rose,#b3261e)}
.pack-assign{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin:16px 0}.pack-assign p{flex-basis:100%;margin:0}.pack-assign button{width:auto}
[data-custom="pack-import"] button{width:auto;margin-right:8px}
.verify-switch{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}.verify-switch button{width:auto}
.verify-card{max-width:560px;margin:48px auto}
.shared-group{margin:0 0 12px}.shared-group>summary{cursor:pointer;min-height:40px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}.shared-files{list-style:none;margin:12px 0;padding:0}.shared-files li{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;padding:8px 0;border-top:1px solid var(--line-strong)}.shared-files li>label{flex:1 1 200px;min-width:0;overflow-wrap:anywhere;margin:0}.shared-tag,.shared-pack{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:flex-end;margin:12px 0}.shared-tag label,.shared-pack label{flex:1 1 140px}.shared-pack p{flex:1 1 100%;margin:0}
.conn-health{border-top:1px solid var(--line);margin-top:24px;padding-top:16px}.conn-health p{margin:8px 0;font-size:13px}.conn-health h3{margin:0 0 8px}.conn-problem{border-left:3px solid var(--brick);background:var(--frost);border-radius:8px;padding:8px 16px;margin:16px 0}.conn-problem p{margin:8px 0}.check-list{list-style:none;padding:0;margin:8px 0}.check-list li{padding:4px 0}.check-list li.fail{font-weight:600}

:root{--green:var(--muted);--muted:var(--muted);--line:var(--frost);color:var(--teal);background:var(--surface);font-family:'Segoe UI',Arial,sans-serif}
header{height:74px;background:var(--surface)de;border-color:var(--frost);padding:0 40px;gap:24px}.brand{color:var(--muted);font-size:24px;letter-spacing:-1px}header span{color:var(--muted)}.workspace{grid-template-columns:205px minmax(0,1fr);gap:40px}.sidebar{border:0;padding:32px 0 24px;min-height:0}.identity{margin:16px 0 32px}.avatar{background:var(--surface);color:var(--muted);border-radius:13px;width:39px;height:39px}.sidebar>.eyebrow{color:var(--muted);font-size:9px}nav{gap:8px}.nav-item{display:flex;align-items:center;gap:16px;padding:16px 16px;color:var(--muted);font-weight:550;border-radius:12px}.nav-item:hover{background:var(--surface);color:var(--muted)}.nav-item.active{color:var(--muted);background:var(--surface);box-shadow:inset 3px 0 var(--faint)}.nav-icon{font-size:19px;width:23px;text-align:center;font-weight:400}.sidebar-note{font:13px/1.8 'Segoe UI',sans-serif;color:var(--muted);background:var(--surface);border:0;margin-top:40px;border-radius:16px;padding:16px}.sidebar-note>span{display:block;color:var(--faint);font-size:30px}.page{padding-top:32px;max-width:none;min-width:0}.page-top{margin-bottom:24px}.page-top>.eyebrow{font-size:9px;color:var(--muted)}.page-title{margin:0 0 24px}.page-title h1{font-size:31px;color:var(--teal);letter-spacing:-1px}.page-title p{font-size:14px;color:var(--muted);max-width:660px}.eyebrow{color:var(--muted)}.badge{background:var(--surface);color:var(--muted);border:1px solid var(--frost);font-size:11px}.card{border:1px solid var(--frost);box-shadow:0 3px 12px var(--teal)03;border-radius:17px;padding:24px;margin-bottom:16px}h2{color:var(--teal);font-weight:650}h3{color:var(--teal)}.section-tabs{display:flex;gap:8px;padding:8px;margin:0 0 32px;background:var(--surface);width:fit-content;border:1px solid var(--frost);border-radius:13px;overflow-x:auto;max-width:100%}.section-tab{background:transparent;color:var(--muted);padding:8px 16px;margin:0;white-space:nowrap;border-radius:9px;font-size:12px}.section-tab:hover{background:var(--frost);color:var(--muted)}.section-tab.active{background:var(--surface);color:var(--muted);box-shadow:0 2px 5px var(--teal)0d}.dashboard-heading{display:flex;justify-content:space-between;align-items:start;gap:16px}.day-chip{font-size:11px;color:var(--muted);white-space:nowrap;padding-top:16px}.welcome-banner{display:grid;grid-template-columns:1.5fr 1fr;background:var(--frost);border:1px solid var(--frost);border-radius:23px;padding:32px 32px;margin:0 0 24px;overflow:hidden;position:relative}.welcome-banner .eyebrow{font-size:9px;letter-spacing:1.8px;color:var(--muted)}.welcome-banner h2{font-size:34px;font-weight:650;letter-spacing:-1.2px;line-height:1.2;margin:16px 0;color:var(--teal)}.welcome-banner p{color:var(--muted);font-size:13px;max-width:390px;margin:0 0 8px}.welcome-banner button{padding:16px 16px;border-radius:11px;background:var(--muted);box-shadow:0 4px 9px var(--muted)22}.welcome-banner button:hover{background:var(--muted)}.welcome-banner button span{margin-left:16px}.dashboard-stats{gap:16px;margin-bottom:32px}.stat-card{gap:8px;border-radius:16px;padding:16px 24px;border-color:var(--frost);background:var(--surface)}.dashboard-stats .stat-card:first-child{background:var(--surface);border-color:var(--frost)}.dashboard-stats .stat-card:nth-child(2){background:var(--surface);border-color:var(--frost)}.dashboard-stats .stat-card:nth-child(3){background:var(--surface);border-color:var(--frost)}.stat-card strong{font-size:32px;font-weight:650;color:var(--teal)}.stat-card span{font-size:12px;color:var(--muted)}.stat-card small{font-size:10px;color:var(--muted)}.section-heading h2{font-size:17px;margin-bottom:16px}.quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:32px}.quick-action{position:relative;background:var(--surface);border:1px solid var(--frost);border-radius:17px;padding:24px 16px;margin:0;text-align:left;color:var(--teal);display:flex;flex-direction:column;gap:8px;box-shadow:0 2px 8px var(--teal)03}.quick-action:hover{background:var(--surface);border-color:var(--line-strong);transform:translateY(-2px)}.quick-action strong{font-size:14px;font-weight:650}.quick-action>span:not(.action-icon){font-size:11px;line-height:1.7;color:var(--muted);font-weight:400}.quick-action>b{position:absolute;right:20px;top:25px;font-size:18px;color:var(--faint);font-weight:400}.action-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;font-size:20px;margin-bottom:8px;background:var(--surface);color:var(--faint)}.peach .action-icon{background:var(--surface);color:var(--faint)}.blue .action-icon{background:var(--surface);color:var(--faint)}.compact-students .row button{margin-top:0;font-size:11px}.compact-students h2{font-size:16px;margin:0}.student-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px}.student-chip{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--surface);color:var(--muted);margin:0;padding:16px;text-align:left;border-radius:12px;font-size:12px}.student-chip:hover{background:var(--surface)}.student-chip .avatar{width:32px;height:32px;flex-shrink:0;border-radius:10px}.student-chip small{display:block;font-size:10px;color:var(--muted);margin-top:8px;font-weight:400}.student-chip b{margin-left:auto;color:var(--faint)}.studio-layout{display:block;max-width:790px}.studio-context{background:var(--surface);padding:16px 16px;border-radius:12px;margin:0 0 32px;color:var(--muted);font-size:12px}.studio-context .step{margin:16px 0}.studio-context .step p{color:var(--muted)}.curriculum-note{border-left:3px solid var(--line-strong);background:var(--surface);color:var(--muted);border-radius:8px}.curriculum-note summary{font-size:12px}.curriculum-note[open] summary{margin-bottom:16px}.feedback{background:var(--surface);color:var(--muted)}.notice{background:var(--surface);border-color:var(--frost);color:var(--muted)}.empty{background:var(--surface);border-color:var(--frost);color:var(--muted);font-size:13px}.check,.choice{color:var(--muted)}.choice:hover{background:var(--surface);border-color:var(--line-strong)}.choice:has(input:checked){background:var(--surface);border-color:var(--faint)}input,select,textarea{color:var(--teal);border-color:var(--frost);background:var(--surface);border-radius:10px;padding:8px 16px}input:focus,select:focus,textarea:focus{outline:2px solid var(--line-strong);border-color:var(--faint);outline-offset:2px}label{color:var(--muted);font-weight:600}input[type=checkbox],input[type=radio],progress{accent-color:var(--muted)}button{border-radius:10px;transition:background .15s ease,transform .15s ease}button:hover{background:var(--muted)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--faint);outline-offset:4px}.quiet{color:var(--muted);border-color:var(--frost)}.quiet:hover{background:var(--surface);color:var(--muted)}.danger{background:var(--muted)}.danger:hover{background:var(--muted)}.download{color:var(--muted);border-color:var(--line-strong);background:var(--surface)}.book-cover{background:var(--frost);border-color:var(--line-strong);color:var(--muted)}.color-1{background:var(--frost);color:var(--muted);border-color:var(--line-strong)}.color-2{background:var(--surface);color:var(--muted);border-color:var(--line-strong)}.shelf-note{background:var(--surface);color:var(--muted)}.shelf-note h2{font:28px/1.3 'Segoe UI',sans-serif;color:var(--muted)}.auth{max-width:440px}.auth h1{font:650 43px/1.12 'Segoe UI',sans-serif;color:var(--muted);letter-spacing:-1.7px}.auth .card{border-top:4px solid var(--line-strong);box-shadow:0 12px 36px var(--teal)0b}.demo-switch{background:var(--surface);border-color:var(--frost)}.demo-switch>span{color:var(--muted)}#status{background:var(--teal);box-shadow:0 7px 24px var(--teal)30;border-radius:12px;z-index:30}footer{color:var(--faint)}.business-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:start;margin-bottom:24px}.business-toolbar .section-tabs{margin:0}.business-toolbar>button{margin:0}.task-list{margin-top:16px}.task-row{display:flex;align-items:center;gap:16px;padding:16px 0;border-top:1px solid var(--frost)}.task-icon{display:grid;place-items:center;background:var(--surface);color:var(--faint);width:36px;height:36px;border-radius:11px;flex-shrink:0}.task-row>div{flex:1}.task-row strong{font-size:13px}.task-row p{font-size:12px;color:var(--muted);margin:8px 0 0}.task-row button{margin:0;font-size:11px}.calm-empty{text-align:center;padding:32px 16px}.calm-empty>span{display:inline-block;font-size:38px;color:var(--faint);background:var(--surface);border-radius:20px;width:72px;height:72px;line-height:72px}.calm-empty h3{margin-bottom:8px}.calm-empty p{font-size:13px;color:var(--muted)}.session-row>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:14px}.session-row>summary small{display:block;font-size:11px;font-weight:400;color:var(--muted);margin-top:8px}.table-scroll th{color:var(--muted)}.table-scroll td{font-size:13px}.map-node.selected rect,.map-node:focus rect{stroke:var(--muted)}.map-node.secure rect{fill:var(--frost);stroke:var(--faint)}.map-node.secure circle{fill:var(--muted)}.map-node.struggling rect{fill:var(--surface);stroke:var(--line-strong)}.map-node.developing rect{fill:var(--surface);stroke:var(--line-strong)}.node-label{fill:var(--teal)}.copilot-actions button{border-color:var(--frost);border-radius:15px;color:var(--muted);background:var(--surface)}.copilot-actions button:nth-child(2){background:var(--surface)}.copilot-actions button:nth-child(3){background:var(--surface)}.copilot-actions button:nth-child(4){background:var(--frost)}.copilot-actions button:hover{background:var(--surface)}.analysis-result{background:var(--surface);border-color:var(--frost)}.analogy{background:var(--surface);border-color:var(--line-strong)}.pathway-suggestion{background:var(--surface);border-color:var(--frost);color:var(--muted)}.pathway-suggestion:hover{background:var(--frost)}
@media(min-width:1500px){main{max-width:1450px}.page{padding-right:16px}}
@media(max-width:1100px){.workspace{grid-template-columns:180px minmax(0,1fr);gap:24px}.welcome-banner{padding:24px}.welcome-banner h2{font-size:29px}.student-chips{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){header{height:65px;padding:0 16px}.workspace{display:block}.sidebar{padding:16px 0 0}.sidebar nav{display:flex;overflow-x:auto;padding-bottom:8px;gap:8px}.nav-item{font-size:12px;padding:8px 16px;gap:8px}.nav-icon{font-size:16px;width:17px}.nav-item.active{box-shadow:inset 0 -2px var(--faint)}.page{padding-top:16px}.page-top{display:none}.page-title h1{font-size:27px}.page-title p{font-size:13px}.section-tabs{width:100%;margin-bottom:24px}.section-tab{font-size:11px;padding:8px 16px}.welcome-banner{grid-template-columns:1fr;padding:24px;border-radius:19px}.welcome-banner h2{font-size:31px}.day-chip{display:none}.dashboard-stats{gap:8px}.stat-card{padding:16px 16px}.stat-card strong{font-size:27px}.stat-card small{font-size:9px;line-height:1.5}.stat-card span{font-size:10px}.quick-actions{grid-template-columns:1fr;gap:8px}.quick-action{display:grid;grid-template-columns:42px 1fr;gap:8px 16px;padding:16px 16px}.quick-action .action-icon{grid-row:span 2;margin:0}.quick-action strong{align-self:end}.quick-action>span:not(.action-icon){grid-column:2}.quick-action>b{top:20px;right:16px}.compact-students{padding:16px}.student-chips{grid-template-columns:repeat(2,minmax(0,1fr))}.business-toolbar{flex-wrap:wrap}.business-toolbar .section-tabs{width:auto;max-width:100%;flex:1}.task-row{flex-wrap:wrap}.task-row>form{margin-left:48px}.studio-context{display:block}.auth h1{font-size:37px}}
@media(max-width:430px){.student-chips{grid-template-columns:1fr}.dashboard-stats .stat-card small{display:none}.dashboard-stats .stat-card{padding:16px 8px}.business-toolbar .section-tabs{flex:auto;width:100%}.task-row>div{min-width:calc(100% - 60px)}.section-tab{padding:8px 8px}}
@media(prefers-reduced-motion:reduce){button{transition:none}.quick-action:hover{transform:none}}
.quick-action>span:not(.action-icon),.stat-card span,.stat-card small,.student-chip small,.session-row>summary small,.task-row p,.calm-empty p,.day-chip{color:var(--muted)}.welcome-banner .eyebrow{color:var(--muted)}.welcome-banner p{color:var(--muted)}.page-title p{color:var(--muted)}.studio-context{color:var(--muted)}.page-top>.eyebrow{color:var(--muted)}
.help-box{display:flex;gap:16px;padding:16px 16px;background:var(--surface);border:1px solid var(--frost);border-radius:14px;margin:0 0 24px;color:var(--muted);font-size:12px}.help-symbol{display:grid;place-items:center;flex-shrink:0;width:24px;height:24px;border-radius:50%;background:var(--frost);color:var(--muted);font-weight:700;font-family:Georgia,serif}.help-box strong{font-size:12px}.help-box p{margin:8px 0 8px;font-size:12px;line-height:1.6}.help-box summary{font-size:11px;color:var(--muted)}.help-box ol{padding-left:16px;margin:8px 0 0;max-width:790px}.help-box li{line-height:1.8;margin:8px 0}.help-box details[open]>summary{margin-bottom:8px}.dashboard-heading>div{flex:1;min-width:0}.dashboard-heading .help-box{margin-right:16px}.refresher-intro{background:var(--frost);border:1px solid var(--frost);padding:32px;border-radius:18px;margin:0 0 24px}.refresher-intro h2{font-size:22px;line-height:1.5;max-width:780px;margin:16px 0;color:var(--muted)}.refresher-intro p{font-size:13px;color:var(--muted)}.refresher-intro a{font-size:12px}.lesson-step{display:block;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:var(--muted);margin-bottom:16px}.worked-example .example-equation{padding:16px;background:var(--surface);color:var(--muted);font-size:28px;border-radius:12px;margin:16px 0;letter-spacing:-.5px}.worked-example ol{padding-left:24px}.worked-example li,.page .split .card li{font-size:13px;line-height:1.9;margin-bottom:8px}.refresher-intro+.split>.card{height:auto}.help-box .help-symbol{margin-top:8px}@media(max-width:760px){.help-box{padding:16px;gap:8px}.dashboard-heading .help-box{margin-right:0}.refresher-intro{padding:24px}.refresher-intro h2{font-size:20px}.worked-example .example-equation{font-size:25px}}

details.card:not([open]){padding-top:16px;padding-bottom:16px}summary::marker{color:var(--faint)}details.card>summary{color:var(--muted)}details.card[open]>summary{padding-bottom:16px;border-bottom:1px solid var(--frost)}.section-tabs button:disabled{opacity:1}button:disabled:hover{transform:none}

.english-model{background:var(--surface);padding:24px;border-radius:13px;margin:16px 0;font-size:14px;white-space:pre-line}.english-model h3{margin:0}.english-model details{white-space:normal}.learning-controls{grid-template-columns:1fr 1fr 1fr auto}.page>label:has([data-subject]){max-width:340px;margin-bottom:24px}@media(max-width:900px){.learning-controls{grid-template-columns:1fr 1fr}}@media(max-width:760px){.learning-controls{grid-template-columns:1fr}}

/* Readability and interaction rules shared across every teaching tool. */
body{font-size:15px;line-height:1.65}h1,h2,h3{line-height:1.3}p{max-width:76ch}.page-title h1{font-size:clamp(28px,2.5vw,38px);line-height:1.2}.page-title{margin-bottom:32px}.page-title p{font-size:15px}.card{padding:32px;margin-bottom:24px}.eyebrow,.page-top>.eyebrow,.sidebar>.eyebrow,.welcome-banner .eyebrow,.lesson-step{font-size:12px;line-height:1.6;letter-spacing:1px}.small,small,.badge,.day-chip,label,.section-tab,.help-box summary,.help-box strong,.help-box p,.help-box li,.stat-card span,.stat-card small,.quick-action>span:not(.action-icon),.student-chip small,.session-row>summary small,.task-row p,footer{font-size:12px;line-height:1.65}.quick-action strong{font-size:16px}.quick-action{padding:24px;gap:16px}.stat-card{padding:24px}.card p{line-height:1.8}.welcome-banner{padding:32px 40px}.welcome-banner button{min-height:46px}.help-box{margin-bottom:32px}.help-box ol{padding-top:8px}.help-box li{margin:8px 0}.card>form{max-width:780px}button{min-height:42px;transition:background-color .15s ease,box-shadow .15s ease,transform .15s ease}button:not(:disabled):active{transform:translateY(1px) scale(.985)}button[aria-busy=true]{cursor:progress;opacity:.8}button[aria-busy=true]::before{content:'';display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;margin-right:8px;vertical-align:-2px;animation:ll-spin .7s linear infinite}a{transition:color .15s ease}a:hover{text-decoration-thickness:2px}.section-tabs{scrollbar-width:thin}.nav-item{min-height:46px}.quick-action:hover{box-shadow:0 6px 16px var(--teal)0c}.choice:has(input:checked){box-shadow:inset 0 0 0 1px var(--faint)}summary{min-height:30px}input,select,textarea{line-height:1.5}textarea{resize:vertical}.page,[data-question],.card{overflow-wrap:anywhere}.skip-link{position:fixed;top:-100px;left:16px;padding:16px 16px;background:var(--teal);color:var(--on-accent);border-radius:8px;z-index:100}.skip-link:focus{top:12px}.mobile-menu{display:none}#network-progress{position:fixed;left:0;top:0;right:0;height:3px;z-index:80;overflow:hidden;background:var(--frost)}#network-progress::after{content:'';position:absolute;left:0;top:0;width:40%;height:100%;background:var(--faint);animation:ll-progress 1.1s ease-in-out infinite}.loading-screen{max-width:520px;text-align:center;margin:96px auto;padding:32px 16px}.loading-screen h1{font-size:26px;color:var(--muted)}.loading-screen p{color:var(--muted)}.loading-spinner{display:inline-block;width:33px;height:33px;border:3px solid var(--frost);border-top-color:var(--muted);border-radius:50%;animation:ll-spin .7s linear infinite}.initial-error{max-width:520px;margin:72px auto}.initial-error button{min-width:140px}.page:focus{outline:none}.page:focus-visible{outline:2px solid var(--teal);outline-offset:5px}.dashboard-heading .help-box{max-width:780px}.stats:empty{display:none}.row{gap:16px}
@keyframes ll-spin{to{transform:rotate(360deg)}}@keyframes ll-progress{0%{transform:translateX(-100%)}100%{transform:translateX(350%)}}
@media(max-width:760px){header{padding:0 16px;gap:16px}.mobile-menu{display:inline-flex;align-items:center;justify-content:center;margin:0;min-width:46px;min-height:44px;padding:8px 16px;font-size:14px}header .brand{font-size:22px}header #logout{font-size:12px;padding:8px 16px;margin:0;min-height:44px}main{padding:0 16px}.workspace .sidebar{display:none}.workspace[data-menu-open=true] .sidebar{display:block;background:var(--surface);padding:16px;margin:16px 0 16px;border:1px solid var(--frost);border-radius:15px}.workspace .sidebar nav{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0;overflow:visible}.sidebar nav .nav-item{white-space:normal;min-height:48px}.nav-item[data-nav=settings]{margin-top:0}.page{padding:24px 0}.page-title{margin-bottom:24px}.page-title p{font-size:14px}.card{padding:24px;margin-bottom:16px}.welcome-banner{padding:24px 24px}.welcome-banner .eyebrow{font-size:12px}.welcome-banner p{font-size:14px}.dashboard-stats .stat-card{padding:16px 16px}.dashboard-stats .stat-card span{font-size:12px}.dashboard-stats .stat-card small{display:none}.dashboard-stats .stat-card strong{font-size:28px}.quick-action{padding:16px}.quick-action>span:not(.action-icon){font-size:12px}.section-tabs{padding:8px;gap:8px}.section-tab{font-size:12px;min-height:44px;padding:8px 16px}input,select,textarea{font-size:16px;min-height:46px}input[type=checkbox],input[type=radio]{min-height:0;width:19px;height:19px}.check,.choice{font-size:14px;line-height:1.7;padding-top:8px;padding-bottom:8px}.choice{min-height:48px}button,.download{min-height:44px}.task-row button{font-size:12px}.row{gap:16px}.loading-screen{margin:64px auto}.page>label:has([data-subject]){max-width:100%}.table-scroll{max-width:100%;overscroll-behavior-x:contain}.help-box{padding:16px}.help-box summary{min-height:38px;display:list-item}.business-toolbar{gap:16px}.book-grid{gap:16px}}
@media(max-width:390px){.workspace .sidebar nav{grid-template-columns:1fr}.dashboard-stats{grid-template-columns:1fr}.dashboard-stats .stat-card{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:8px}.dashboard-stats .stat-card strong{font-size:25px}.dashboard-stats .stat-card span{font-size:13px}.brand{white-space:nowrap}.welcome-banner h2{font-size:28px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}button:not(:disabled):active,.quick-action:hover{transform:none}#network-progress::after{width:100%;opacity:.6}}
/* Equal sidebar rows keep every menu item, including Settings, aligned. */
.sidebar nav{display:grid;gap:8px;grid-auto-rows:minmax(48px,auto);align-content:start}
.sidebar nav .nav-item{margin:0;width:100%;min-height:48px;line-height:1.4;padding:16px 16px}
.sidebar .nav-icon{flex:0 0 23px;line-height:1;text-align:center}
.ll-cal-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.ll-cal-heading h2{margin:8px 0}.ll-cal-heading p{margin:0;color:var(--muted);font-size:13px}
.ll-cal-controls{display:flex;gap:8px}.ll-cal-controls button{margin:0;min-height:44px}
.ll-cal-filter{max-width:300px}.ll-cal-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;margin:16px 0;color:var(--muted)}
.ll-cal-legend span:nth-child(2){color:var(--teal)}.ll-cal-legend span:nth-child(3){color:var(--muted)}
.ll-cal-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:16px 0}
.ll-cal-day{min-width:0;background:var(--surface);border:1px solid var(--frost);border-radius:12px;padding:8px;min-height:200px}
.ll-cal-day h3{font-size:12px;color:var(--muted);margin:0 0 16px;display:flex;flex-direction:column;gap:8px}
.ll-cal-day h3 strong{font-size:24px;color:var(--teal)}.ll-cal-today{background:var(--surface);border-color:var(--faint)}
.ll-cal-day h3 small{color:var(--muted)}.ll-cal-event{display:flex;flex-direction:column;gap:8px;border-left:3px solid var(--faint);background:var(--surface);padding:8px 8px;border-radius:7px;margin-bottom:8px;font-size:12px;overflow-wrap:anywhere}
.ll-cal-event strong{font-size:12px}.ll-cal-event small{font-size:11px;line-height:1.5}.ll-cal-event.completed{background:var(--frost);border-color:var(--muted);color:var(--teal)}
.ll-cal-event.cancelled{background:var(--frost);border-color:var(--faint);color:var(--muted)}.ll-cal-clear{font-size:12px;color:var(--muted);line-height:1.6}
@media(max-width:1150px){.ll-cal-week{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.ll-cal-week{grid-template-columns:repeat(2,minmax(0,1fr))}.ll-cal-day{min-height:140px}.ll-cal-controls{width:100%;justify-content:space-between}.sidebar nav .nav-item{padding:16px}.ll-cal-heading h2{font-size:20px}}
@media(max-width:390px){.ll-cal-week{grid-template-columns:1fr}.ll-cal-day{min-height:100px}}
.study-connection{display:flex;gap:16px;flex-wrap:wrap}.study-connection span{padding:8px 16px;border-radius:10px;background:var(--surface);color:var(--muted);font-size:12px}.study-result{display:flex;flex-direction:column;align-items:start;gap:8px;width:100%;text-align:left;margin:16px 0;padding:16px;background:var(--surface);white-space:normal;overflow-wrap:anywhere}.study-result span{font-weight:400;line-height:1.7}.study-result small{font-weight:400}.study-prose{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.8;max-width:100%}.study-figure{display:block;max-width:100%;max-height:500px;object-fit:contain;margin:16px 0}.study-sheet{background:var(--surface);padding:32px;border:2px solid var(--edge);border-radius:16px;margin:24px 0;box-shadow:0 4px 0 0 var(--shadow)}.study-sheet h1{font-size:28px}.study-question{padding:24px 0;border-top:1px solid var(--frost);break-inside:avoid}.study-question h3{white-space:pre-wrap}.study-answer-space{min-height:100px;background:transparent;margin:16px 0}.study-tutor-answer{background:var(--frost);padding:16px;border-radius:16px}.study-item{border-top:4px solid var(--frost)}
@media(max-width:760px){.study-sheet{padding:16px}.study-connection{gap:8px}}
@media print{body.study-printing{background:white!important;color:black!important}body.study-printing header,body.study-printing footer,body.study-printing .sidebar,body.study-printing #status,body.study-printing #network-progress,body.study-printing .page>*:not(#study-sheet-print){display:none!important}body.study-printing main,body.study-printing .workspace,body.study-printing .page{display:block!important;max-width:none!important;margin:0!important;padding:0!important}body.study-printing #study-sheet-print{display:block!important;border:0;padding:0;margin:0}body.study-printing .study-tutor-answer{display:none!important}body.study-printing .study-figure{max-height:300px}body.study-printing .study-question{break-inside:avoid}body.study-printing .study-sheet h1{font-size:23px}}
.plan-stats{display:flex;gap:16px;flex-wrap:wrap;margin:24px 0}.plan-stats>span{background:var(--surface);color:var(--muted);padding:16px 16px;border-radius:12px;flex:1;min-width:140px}.plan-stats strong{font-size:25px;margin-right:8px}.plan-checkin{background:transparent;border-color:var(--line)}.plan-goal{border-left:4px solid var(--frost)}.plan-goal h3{margin:0}.plan-achieved{border-left-color:var(--teal);background:var(--frost)}.plan-goal form{display:flex;gap:16px;align-items:end;flex-wrap:wrap}.plan-goal form label{flex:1;max-width:300px}.plan-goal form button{margin-bottom:8px}.plan-review{display:flex;align-items:center;gap:16px;justify-content:space-between;border-top:1px solid var(--frost);padding:16px 0}.plan-review h3{margin:0}.plan-review p{margin:8px 0}.plan-review form{flex-shrink:0}.plan-checkin-row{padding:16px 0;border-top:1px solid var(--frost);display:flex;flex-direction:column;gap:8px}.plan-checkin-row small{color:var(--muted)}@media(max-width:760px){.plan-review{align-items:start;flex-direction:column}.plan-stats>span{padding:16px}.plan-review form button{margin-top:0}}

/* LessonLoop: warm minimalist system. Layout spacing follows an 8px rhythm;
   1px borders and 3px focus outlines are optical exceptions. Rounded corners
   use shared tokens so controls and surfaces feel consistent. */
:root {
  /* Creative Classroom Paper-Cut — electric iris owns every filled action,
     candy colours are decorative only, ink draws every border and shadow. */
  --paper: #eef4fd;
  --brick: #ba1a1a;
  --teal: #2727e6;
  --ink: #111118;
  --muted: #454556;
  --faint: #767588;
  --canvas: #f0f6ff;
  --surface: #ffffff;
  --line: #e1edff;
  --frost: #e1edff;
  --teal-deep: #0c00bf;
  --pill: 9999px;
  --pop-red: #ff4141;
  --pop-yellow: #ffda00;
  --pop-pink: #ffbac4;
  --pop-sky: #91d8ec;
  --pop-green: #16ab59;
  --mono: 'Space Mono','SFMono-Regular',ui-monospace,Menlo,Consolas,monospace;
  --display: 'Space Grotesk','Segoe UI',system-ui,-apple-system,Arial,sans-serif;
  --sticker: 0 4px 0 0 var(--shadow);
  --sticker-sm: 0 2px 0 0 var(--shadow);
  /* Theme tokens: --edge draws borders, --shadow the hard sticker shadows,
     --on-accent is text on iris fills; dark values are at the end of this file. */
  --edge: #111118;
  --shadow: #111118;
  --on-accent: #ffffff;
  --banner: #2727e6;
  --brand-iris: #2727e6;
  --ring: rgba(39,39,230,.35);
  --rose: #ffdad6;
  --danger-hover: #8c0007;
  --warn: #b3541e;
  color-scheme: light;
  --line-strong: #c6c4d9;
  --night: #111118;
  --green: var(--teal);
  --radius-control: 16px;
  --radius-card: 24px;
  --radius-hero: 28px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  font-family: 'Work Sans','Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
}
body { background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.6; }
h1,h2,h3,.auth h1,.shelf-note h2 { color: var(--ink); }
h1,.page-title h1,.auth h1,.welcome-banner h2,.team-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
header { height: 72px; padding: 0 40px; gap: 24px; background: var(--surface); backdrop-filter: none; border-bottom: 1px solid var(--line); }
header .brand { font: 400 24px/1.2 'Space Grotesk','Segoe UI',system-ui,Arial,sans-serif; letter-spacing: -.03em; color: var(--ink); }
header span { color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
header button { margin: 0; }
main { max-width: 1440px; padding: 0 40px; }
.workspace { grid-template-columns: 208px minmax(0,1fr); gap: 48px; }
.sidebar { padding: 40px 24px 32px 0; border-color: var(--line); }
.sidebar>.eyebrow { font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.identity { margin: 24px 0 32px; gap: 16px; }
.avatar { background: var(--surface); color: var(--teal); border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; font-weight: 600; }
.sidebar nav { gap: 8px; grid-auto-rows: minmax(48px,auto); }
.sidebar nav .nav-item { padding: 8px 16px; min-height: 48px; border: 1px solid transparent; border-radius: var(--pill); font-size: 14px; font-weight: 600; color: var(--muted); box-shadow: none; }
.sidebar nav .nav-item:hover { background: var(--frost); color: var(--ink); border-color: transparent; }
.sidebar nav .nav-item.active { background: var(--teal); color: var(--on-accent); border-color: transparent; box-shadow: 0 2px 0 0 var(--shadow); }
.nav-icon { color: currentColor; }
.sidebar-note { margin-top: 32px; padding: 16px; border: 0; border-radius: var(--radius-control); background: var(--frost); font: 400 13px/1.75 var(--mono); letter-spacing: -.01em; color: var(--ink); }
.page { padding: 40px 0 64px; min-width: 0; }
.page-top { margin-bottom: 32px; }
.page-title { margin-bottom: 32px; }
.page-title h1 { font-size: clamp(32px,3.3vw,48px); margin: 0 0 16px; }
.page-title p { font-size: 16px; color: var(--muted); max-width: 64ch; }
.eyebrow,.lesson-step { color: var(--teal); font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
p { margin: 16px 0; }
h2 { font-family: var(--display); font-size: 22px; margin: 0 0 16px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-family: var(--display); font-size: 18px; margin: 24px 0 8px; font-weight: 600; letter-spacing: 0; }
strong,b { font-weight: 600; }
h3 { font-size: 18px; margin: 24px 0 8px; }
.small,small,label,.badge,footer { font-size: 13px; }
.muted,.day-chip { color: var(--muted); }
.section-tabs,.org-tabs { background: var(--frost); padding: 6px; gap: 4px; border: 0; border-bottom: 0; border-radius: var(--pill); margin: 0 0 32px; width: fit-content; max-width: 100%; overflow-x: auto; }
.section-tab { padding: 8px 16px; min-height: 44px; border-radius: var(--pill); color: var(--muted); background: transparent; box-shadow: none; font-size: 13px; font-weight: 600; }
.section-tab:hover { background: var(--surface); color: var(--ink); }
.section-tab.active { background: var(--teal); color: var(--on-accent); font-weight: 600; box-shadow: none; }
.card { padding: 32px; margin: 0 0 24px; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-card); box-shadow: 0 4px 0 0 var(--shadow); }
.card p { line-height: 1.7; }
.split,.form-grid,.live-grid,.studio-layout { gap: 24px; }
.row { gap: 24px; }
.dashboard-heading { gap: 24px; align-items: start; }
.day-chip { padding-top: 16px; font-size: 13px; }
.welcome-banner { grid-template-columns: minmax(0,1.6fr) minmax(200px,1fr); gap: 48px; background: var(--banner); border: 2px solid var(--edge); border-radius: var(--radius-hero); padding: 40px; margin-bottom: 32px; box-shadow: 0 4px 0 0 var(--shadow); }
.welcome-banner::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: rgba(255,255,255,.07); top: -120px; right: -90px; pointer-events: none; }
.welcome-banner::after { content: ""; position: absolute; width: 0; height: 0; border-left: 110px solid transparent; border-right: 110px solid transparent; border-bottom: 170px solid rgba(255,255,255,.06); left: -30px; bottom: -95px; transform: rotate(-12deg); pointer-events: none; }
.welcome-banner .eyebrow { display: inline-block; color: rgba(255,255,255,.85); font-size: 11.5px; background: rgba(255,255,255,.14); padding: 8px 16px; border-radius: var(--pill); }
.welcome-banner h2 { font-size: clamp(36px,4vw,56px); margin: 24px 0; color: #fff; font-weight: 700; letter-spacing: -.02em; }
.welcome-banner p { font-size: 16px; color: rgba(255,255,255,.78); max-width: 44ch; margin: 0 0 24px; }
.welcome-banner button { background: #fff; color: #111118; box-shadow: 0 4px 0 0 var(--shadow); border-radius: var(--pill); padding: 16px 32px; font-weight: 600; font-size: 15px; }
.welcome-banner button:hover { background: #eef4fd; transform: translateY(-2px); box-shadow: 0 6px 0 0 var(--shadow); }
.teaching-rhythm { align-self: center; border-left: 1px solid rgba(255,255,255,.22); padding-left: 32px; color: rgba(255,255,255,.85); }
.teaching-rhythm ol { list-style: none; padding: 0; margin: 16px 0 0; }
.teaching-rhythm li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 14px; }
.teaching-rhythm li:last-child { border-bottom: 0; }
.teaching-rhythm li span { font-variant-numeric: tabular-nums; color: var(--pop-sky); }
.stats,.dashboard-stats { display: flex; flex-wrap: wrap; gap: 16px; border-block: 0; margin: 0 0 40px; }
.stat-card,.dashboard-stats .stat-card:nth-child(n) { flex: 1 1 160px; padding: 24px; border: 2px solid var(--edge); border-radius: var(--radius-card); background: var(--surface); gap: 8px; box-shadow: 0 4px 0 0 var(--shadow); }
.stat-card:last-child { border-right: 0; }
.stat-card strong { color: var(--teal); font: 700 40px/1.05 'Space Grotesk','Segoe UI',system-ui,Arial,sans-serif; letter-spacing: -.02em; }
.stat-card span,.stat-card small { color: var(--muted); font-size: 13px; }
.section-heading h2 { font-size: 22px; margin-bottom: 16px; }
.quick-actions { display: flex; flex-direction: column; gap: 0; margin-bottom: 40px; border-top: 0; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-card); padding: 8px 24px; box-shadow: 0 4px 0 0 var(--shadow); }
.quick-action { display: grid; grid-template-columns: 40px minmax(160px,.8fr) minmax(0,1fr) 24px; align-items: center; gap: 24px; width: 100%; margin: 0; padding: 24px 16px; min-height: 88px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.quick-action:hover { background: var(--frost); color: var(--teal); box-shadow: inset 3px 0 var(--brick); transform: none; }
.quick-action strong { font-size: 16px; }
.quick-action>span:not(.action-icon) { color: var(--muted); font-size: 14px; }
.quick-action>b { position: static; color: var(--brick); font-size: 24px; }
.action-icon,.peach .action-icon,.blue .action-icon { width: 40px; height: 40px; background: transparent; color: var(--teal); border: 1px solid var(--line); border-radius: var(--radius-control); margin: 0; }
.student-chips { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.student-chip { padding: 16px; gap: 16px; background: var(--frost); color: var(--ink); border-color: transparent; border-radius: var(--radius-control); }
.student-chip:hover { background: var(--paper); }
.student-chip small,.student-chip b { color: var(--muted); font-size: 13px; }
.compact-students h2 { font-size: 22px; }
.help-box { background: var(--frost); border: 0; border-left: 3px solid var(--teal); border-radius: var(--radius-control); padding: 24px; margin-bottom: 32px; gap: 16px; color: var(--muted); }
.help-symbol { background: var(--surface); color: var(--teal); border-radius: 50%; }
.help-box strong,.help-box summary { color: var(--teal); font-size: 14px; }
.help-box p,.help-box li { font-size: 14px; }
.help-box ol { padding-left: 24px; margin-top: 16px; }
.help-box li { margin: 8px 0; }
button,.download,.team-primary { min-height: 48px; border-radius: var(--pill); padding: 8px 24px; background: var(--teal); color: var(--on-accent); font-weight: 600; font-size: 15px; letter-spacing: -.01em; margin-top: 16px; box-shadow: 0 4px 0 0 var(--shadow); transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease; }
button:where(:not(:disabled)):hover { background: var(--teal-deep); }
.danger { color: var(--on-accent); }
.danger:not(:disabled):hover { background: var(--danger-hover); }
button:not(:disabled):active { transform: translateY(1px); }
button:disabled { opacity: .55; box-shadow: none; }
button[aria-busy=true] { opacity: 1; background: var(--night); }
.quiet { color: var(--teal); background: transparent; border: 1px solid var(--faint); box-shadow: none; font-weight: 600; }
.quiet:not(:disabled):hover { background: var(--paper); border-color: var(--teal); color: var(--teal); }
.danger { background: var(--brick); }
a { color: var(--teal); text-underline-offset: 4px; }
a:hover { color: var(--teal-deep); }
:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
label { color: var(--ink); margin: 24px 0 8px; font-weight: 400; }
input,select,textarea { color: var(--ink); background: var(--frost); border: 1px solid transparent; border-radius: var(--pill); padding: 8px 24px; min-height: 48px; margin-top: 8px; font: inherit; letter-spacing: -.01em; transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
input:focus,select:focus,textarea:focus { background: var(--surface); border-color: var(--teal); box-shadow: 0 0 0 2px var(--ring); }
input[type=checkbox],input[type=radio],progress { accent-color: var(--teal); }
input[type=checkbox],input[type=radio] { min-height: 0; width: 20px; height: 20px; }
textarea { min-height: 128px; border-radius: 20px; }
fieldset { padding: 24px; margin: 24px 0; border-radius: var(--radius-control); border-color: var(--line); }
.choice { padding: 16px; border-radius: var(--radius-control); border-color: var(--line); }
.choice:hover,.choice:has(input:checked) { background: var(--frost); border-color: var(--teal); color: var(--ink); box-shadow: none; }
.badge { background: var(--frost); color: var(--ink); border: 0; border-radius: var(--pill); padding: 0 8px; line-height: 1.9; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.notice,.analogy { background: var(--frost); border: 0; border-left: 3px solid var(--brick); border-radius: var(--radius-control); color: var(--ink); padding: 24px; margin: 24px 0; font-size: 14px; }
.feedback,.analysis-result,.english-model { background: var(--frost); color: var(--ink); border: 0; border-radius: var(--radius-control); padding: 24px; margin: 24px 0; }
.curriculum-note,.studio-context { background: var(--frost); color: var(--ink); border: 0; border-left: 3px solid var(--teal); border-radius: var(--radius-control); padding: 24px; margin: 24px 0; }
.empty { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); border-radius: var(--radius-control); padding: 32px; margin: 24px 0; }
.refresher-intro,.shelf-note { background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius-card); padding: 32px; color: var(--ink); margin-bottom: 32px; box-shadow: 0 4px 0 0 var(--shadow); }
.refresher-intro p { color: var(--muted); }
.refresher-intro h2,.shelf-note h2 { color: var(--ink); }
.worked-example .example-equation { background: var(--frost); color: var(--ink); padding: 24px; border-radius: var(--radius-control); margin: 24px 0; }
.book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.book-cover { background: var(--paper); color: var(--teal); border-color: var(--brick); border-radius: 4px var(--radius-control) var(--radius-control) 4px; padding: 24px; }
.color-1 { background: var(--rose); color: var(--brick); border-color: var(--brick); }
.color-2 { background: var(--frost); color: var(--teal); border-color: var(--teal); }
.download { display: inline-flex; align-items: center; color: var(--teal); background: transparent; border-color: var(--teal); box-shadow: none; }
.download:hover { background: var(--paper); }
blockquote { color: var(--teal); border-color: var(--teal); padding: 8px 24px; margin: 24px 0; font-size: 14px; }
details.card:not([open]) { padding-block: 24px; }
details.card>summary { color: var(--teal); }
details.card[open]>summary { border-color: var(--line); padding-bottom: 16px; margin-bottom: 24px; }
summary::marker { color: var(--brick); }
.auth { max-width: 480px; margin: 64px auto; }
.auth h1 { font-size: 48px; color: var(--teal); }
.auth .card { border: 1px solid var(--line); border-top: 4px solid var(--brick); box-shadow: none; }
.demo-switch { background: var(--frost); border-color: var(--line); border-radius: var(--radius-control); padding: 16px; gap: 8px; }
.demo-switch>span { color: var(--teal); }
.demo-switch button { padding: 8px 16px; }
#status,#team-status:not(:empty) { background: var(--teal); color: var(--on-accent); cursor: pointer; padding: 16px 24px; border-radius: var(--pill); box-shadow: 0 4px 0 0 var(--shadow); bottom: 24px; }
footer { color: var(--muted); padding: 32px; }
.skip-link { background: var(--teal); border-radius: var(--radius-control); padding: 16px 24px; }
#network-progress { background: var(--line); height: 4px; }
#network-progress::after { background: var(--brick); }
.loading-spinner { border-color: var(--line); border-top-color: var(--teal); }
.loading-screen h1,.loading-screen p { color: var(--teal); }
.plan-stats { gap: 24px; padding: 16px 0; }
.plan-stats span { background: var(--frost); border-color: transparent; color: var(--teal); border-radius: var(--radius-control); }
.plan-review,.task-row { border-color: var(--line); padding: 24px 0; gap: 24px; }
.task-icon { background: var(--frost); color: var(--teal); border-radius: var(--radius-control); }
.task-row p,.session-row>summary small { color: var(--muted); }
.calm-empty>span { background: var(--frost); color: var(--teal); border-radius: 50%; }
.calm-empty p { color: var(--muted); }
.copilot-actions { gap: 16px; }
.copilot-actions button:nth-child(n) { background: var(--surface); color: var(--teal); border-color: var(--line); border-radius: var(--radius-control); padding: 24px; }
.copilot-actions button:not(:disabled):hover { background: var(--paper); border-color: var(--teal); }
.copilot-actions button span { color: var(--muted); font-size: 13px; }
.pathway-suggestion { background: var(--frost); color: var(--ink); border-color: var(--line); border-radius: var(--radius-control); padding: 24px; }
.pathway-suggestion:not(:disabled):hover { background: var(--paper); }
.map-node.selected rect,.map-node:focus rect { stroke: var(--teal); }
.node-label { fill: var(--ink); }.node-status,.node-kind { fill: var(--muted); }
.map-node.secure rect { fill: var(--frost); stroke: var(--teal); }.map-node.secure circle { fill: var(--teal); }
.map-node.struggling rect { fill: var(--rose); stroke: var(--brick); }.map-node.struggling circle { fill: var(--brick); }
.map-node.developing rect { fill: var(--frost); stroke: var(--muted); }
.ll-cal-heading p,.ll-cal-clear,.ll-cal-legend,.ll-cal-day h3 { color: var(--muted); }
.ll-cal-day { background: var(--surface); border-color: var(--line); border-radius: var(--radius-control); padding: 16px; }
.ll-cal-day h3 strong,.ll-cal-day h3 small { color: var(--teal); }
.ll-cal-today { background: var(--frost); border-color: var(--teal); }
.ll-cal-event { background: var(--frost); color: var(--teal); border-color: var(--teal); border-radius: var(--radius-control); padding: 8px; box-shadow: none; }
.ll-cal-event.completed { background: var(--paper); color: var(--teal); border-color: var(--muted); }
.ll-cal-event.cancelled { background: var(--frost); color: var(--muted);border-color:var(--line-strong); }
.study-connection span { background: var(--frost); color: var(--ink); border-radius: var(--pill); }
.study-result { background: var(--surface); color: var(--teal); border-color: var(--line); border-radius: var(--radius-control); box-shadow: none; }
.study-result:hover { background: var(--paper); }
@keyframes ll-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width:1100px) {
  main { padding-inline: 24px; }.workspace { gap: 32px; grid-template-columns: 184px minmax(0,1fr); }
  .welcome-banner { gap: 24px; padding: 32px; }.teaching-rhythm { padding-left: 24px; }
  .quick-action { grid-template-columns: 40px 1fr 24px; gap: 16px; }.quick-action>span:not(.action-icon) { grid-column: 2; }.quick-action>b { grid-column: 3; grid-row: 1 / 3; }
}
@media(max-width:760px) {
  header { height: 72px; padding: 0 16px; gap: 8px; }header .brand { font-size: 20px; }
  main { padding: 0 16px; }.workspace { display: block; }.page { padding: 24px 0 48px; }
  .page-top,.page-title { margin-bottom: 24px; }.page-title h1 { font-size: 36px; }.page-title p { font-size: 16px; }
  .mobile-menu { min-width: 48px; padding: 8px; }header #logout { padding: 8px; font-size: 12px; }
  .workspace[data-menu-open=true] .sidebar { margin: 16px 0 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control); animation: ll-menu-in 140ms ease-out; }
  .workspace .sidebar nav { gap: 8px; }.sidebar nav .nav-item { padding: 8px; }
  .welcome-banner { grid-template-columns: 1fr; padding: 24px; gap: 24px; }.welcome-banner h2 { font-size: 40px; margin: 16px 0; }
  .teaching-rhythm { display: none; }.dashboard-heading { display: block; }.day-chip { display: block; padding: 0; margin: -8px 0 24px; }
  .card { padding: 24px; }.help-box { padding: 16px; }.help-box p,.help-box li { font-size: 14px; }
  .dashboard-stats .stat-card { padding: 16px 8px; flex: 1 1 88px; }.dashboard-stats .stat-card strong { font-size: 32px; }.dashboard-stats .stat-card span { font-size: 12px; }
  .quick-action { padding: 24px 8px; grid-template-columns: 32px 1fr 24px; gap: 8px 16px; }.quick-action .action-icon { width: 32px; height: 32px; grid-row: 1 / 3; }.quick-action>span:not(.action-icon) { font-size: 14px; }
  .student-chips,.book-grid,.split,.form-grid { grid-template-columns: 1fr; }.section-tabs { margin-bottom: 24px; }
  input,select,textarea { font-size: 16px; }.auth { margin: 40px auto; }.auth h1 { font-size: 40px; }
  .notice,.feedback,.curriculum-note,.analysis-result { padding: 24px; }.ll-cal-day { padding: 16px; }.row { gap: 16px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}

/* Shared control alignment: containers own spacing; controls own their shape. */
button,.download,.team-primary {
  box-sizing: border-box;
  vertical-align: middle;
  line-height: 1.4;
  max-width: 100%;
  overflow-wrap: anywhere;
}
button { text-align: center; }
button:not(.mobile-menu):not(.quick-action):not(.nav-item):not(.student-chip):not(.pathway-suggestion):not(.study-result):not(.ll-cal-event),.download,.team-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.button-group {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
}
.button-group:empty { display: none; }
.button-group>button,.button-group>a,.button-group>form { margin: 0; }
.button-group>form>button { margin: 0; }
.lesson-actions { gap: 8px 16px; }
.row { flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.row>button,.row>.download,.row>form,.row>.button-group { margin: 0; }
.row>div:first-child { min-width: 0; }
.row>form { flex-shrink: 0; }
.row>.form-grid { flex: 1 1 320px; margin: 0; }
.row>.form-grid+button { align-self: end; }
.form-grid { gap: 24px; margin: 24px 0; align-items: end; }
.form-grid>label { min-width: 0; margin: 0; }
.form-grid>label>input,.form-grid>label>select,.form-grid>label>textarea { margin-top: 8px; }
.form-grid>button { margin: 0; align-self: end; }
.studio-profile { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr); }
.form-grid+.form-grid { margin-top: 0; }
form>.form-grid:first-child,.card>.form-grid:first-child { margin-top: 0; }
form>.form-grid+button { margin-top: 0; }
.learning-controls { align-items: end; gap: 24px; }
.learning-controls>label,.learning-controls>button { margin: 0; }
.section-tabs,.org-tabs,.ll-cal-controls,.study-connection { align-items: center; gap: 8px; }
.section-tabs>button,.org-tabs>button,.ll-cal-controls>button,.study-connection>button { margin: 0; }
.section-tabs>button,.org-tabs>button { flex-shrink: 0; }
.business-toolbar { align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.business-toolbar>.section-tabs { margin: 0; }
.business-toolbar>button { margin: 0; flex-shrink: 0; }
.plan-review { align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.plan-review>form { margin: 0; }
.plan-review>form>button { margin: 0; }
.review-share { align-items: center; gap: 8px; margin-top: 24px; }
.review-share>button,.review-share>a { margin: 0; }
.copilot-actions { align-items: stretch; }
.copilot-actions>button { height: 100%; margin: 0; }
.quick-action { text-align: left; }
.welcome-banner button span { margin-left: 8px; }
@media(max-width:1000px) { .studio-profile { grid-template-columns: 1fr; } }
@media(max-width:760px) {
 .form-grid { grid-template-columns: 1fr; gap: 16px; margin-block: 24px; }
 .button-group { align-items: stretch; }
 .lesson-actions>button,.lesson-actions>a { flex: 1 1 200px; }
 .business-toolbar>.section-tabs { width: 100%; }
 .row>.form-grid { flex-basis: 100%; }
 .row>.form-grid+button { align-self: auto; }
 .plan-review>form { width: 100%; }.plan-review>form>button { width: 100%; }
}

/* Logo lockup: trim only transparent breathing room through object-fit,
   keeping the original artwork, palette and proportions untouched. */
header .brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 232px;
  min-width: 0;
  max-width: 232px;
  min-height: 48px;
  border-radius: var(--radius-control);
  line-height: 1;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 232px;
  height: 48px;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
}
@media(max-width:760px) {
  header .brand:has(.brand-logo) { flex: 0 1 176px; max-width: 176px; }
  header .brand-logo { width: 176px; height: 40px; }
  header>span:not(.brand) { display: none; }
  header>#logout,header>#admin-logout { margin-left: auto; flex-shrink: 0; }
  header>#admin-logout { max-width: 112px; font-size: 12px; padding: 8px 16px; }
  header>a:not(.brand) { margin-left: auto; max-width: 112px; text-align: right; font-size: 12px; }
}
@media(max-width:380px) {
  header .brand:has(.brand-logo) { flex-basis: 152px; max-width: 152px; }
  header .brand-logo { width: 152px; height: 36px; }
}

/* LessonLoop lockup — the same construction as the BoostMyMarks homepage mark
   (rounded iris disc, white chevron, yellow base line) followed by the product
   name in Space Grotesk 700, replacing the old PNG logo in the app header. */
header .brand:has(.brand-mark) { flex: 0 0 auto; max-width: none; gap: 8px; }
.brand-mark { width: 34px; height: 34px; flex: none; display: block; color: var(--brand-iris); }
.brand-mark .mark-base { stroke: var(--pop-yellow); }
.brand-word {
  display: inline-block; flex: none;
  font-family: var(--display); font-size: 23px; font-weight: 700;
  letter-spacing: -.025em; line-height: 1; white-space: nowrap; color: var(--ink);
}
.brand-word b { color: var(--teal); font-weight: 700; }
@media(max-width:760px) { .brand-word { font-size: 20px; } .brand-mark { width: 30px; height: 30px; } }
@media(max-width:380px) { .brand-word { font-size: 17px; } .brand-mark { width: 26px; height: 26px; } }

/* ==========================================================================
   Sign-in screen — entry point from the BoostMyMarks homepage (/app).
   Loop system: white card on the tinted canvas, tinted inputs, teal pill
   button, brick accent dot — the same language as the marketing homepage.
   Loaded last in the workspace bundle so it wins over shared card/input rules.
   ========================================================================== */
body:has(.auth) header{
  background:var(--surface);
  border-bottom-color:var(--line);
  backdrop-filter:none;
}
.auth{max-width:520px;position:relative}
body:has(.auth){position:relative}
body:has(.auth) main{position:relative;z-index:1}
body:has(.auth)::before,body:has(.auth)::after{content:"";position:fixed;pointer-events:none;z-index:0}
body:has(.auth)::before{width:360px;height:360px;border-radius:50%;background:var(--pop-sky);opacity:.5;top:40px;right:-150px}
body:has(.auth)::after{width:250px;height:250px;background:var(--pop-yellow);left:-130px;top:45%;clip-path:polygon(50% 0,100% 38%,82% 100%,18% 100%,0 38%);transform:rotate(-14deg);opacity:.55}
.auth::before,.auth::after{content:"";position:absolute;pointer-events:none;z-index:-1}
.auth::before{width:150px;height:150px;background:var(--pop-pink);left:-240px;top:70px;transform:rotate(10deg);clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.auth::after{width:170px;height:150px;background:var(--pop-green);right:-270px;bottom:8%;transform:rotate(-8deg);clip-path:polygon(50% 0,100% 100%,0 100%);opacity:.6}
.auth-home{
  display:inline-block;margin:0 0 24px;
  font-family:var(--mono);font-size:12px;font-weight:400;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);text-decoration:none;
  transition:color .15s ease,transform .15s ease;
}
.auth-home::before{content:'\2190';margin-right:8px}
.auth-home:hover{color:var(--teal);transform:translateX(-2px)}
.auth .eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--frost);color:var(--ink);
  font-family:var(--mono);font-size:11.5px;font-weight:400;letter-spacing:.07em;text-transform:uppercase;
  padding:8px 16px;border-radius:var(--pill);margin:0 0 24px;
  border:1px solid var(--line);box-shadow:none;
}
.auth .eyebrow::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--brick)}
.auth h1{
  font-family:'Space Grotesk','Segoe UI',system-ui,-apple-system,Arial,sans-serif;
  font-size:clamp(36px,5vw,54px);font-weight:700;line-height:1.06;
  letter-spacing:-.02em;margin:0 0 16px;color:var(--ink);
}
.auth>p.muted{font-size:18px;line-height:1.5;color:var(--muted);max-width:44ch}
.auth .card{
  margin-top:32px;padding:32px;
  background:var(--surface);
  border:2px solid var(--edge);border-radius:var(--radius-card);
  box-shadow:0 4px 0 0 var(--shadow);
}
.auth .card h2{
  font-family:'Space Grotesk','Segoe UI',system-ui,-apple-system,Arial,sans-serif;
  font-size:20px;font-weight:600;letter-spacing:-.01em;color:var(--ink);margin:0 0 6px;
}
.auth label{
  font-family:var(--mono);font-size:12px;font-weight:400;letter-spacing:.05em;color:var(--muted);text-transform:uppercase;
  margin:24px 0 8px;
}
.auth input{
  background:var(--frost);border:1px solid transparent;border-radius:var(--pill);color:var(--ink);
  font-size:15px;font-weight:400;letter-spacing:normal;line-height:1.4;
  padding:8px 24px;min-height:48px;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.auth input:hover{border-color:var(--ring)}
.auth input:focus{outline:none;background:var(--surface);border-color:var(--teal);box-shadow:0 0 0 2px var(--ring)}
.auth input:focus-visible{outline:none}
.auth form>button{
  margin-top:32px;width:100%;min-height:48px;
  font-size:16px;font-weight:600;letter-spacing:-.01em;
  background:var(--teal);color:var(--on-accent);border:0;border-radius:var(--pill);box-shadow:0 4px 0 0 var(--shadow);
}
.auth form>button:hover{background:var(--teal-deep);box-shadow:0 6px 0 0 var(--shadow)}
.auth form>button:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
.auth form>button::after{content:"\2192"}
.auth form>button:disabled{opacity:.4}
.auth details{border-top:0;border-radius:16px;margin-top:32px;padding-top:24px;box-shadow:inset 0 1px 0 var(--line-strong)}
.auth details>summary{font-size:14px;font-weight:600;color:var(--muted);min-height:32px}
.auth details[open]>summary{color:var(--ink);margin-bottom:16px}
.auth details h3{
  font-family:'Space Grotesk','Segoe UI',system-ui,-apple-system,Arial,sans-serif;
  font-size:15px;font-weight:600;color:var(--ink);margin:4px 0 2px;
}
.auth .notice{background:var(--frost);border:0;border-left:3px solid var(--brick);border-radius:16px;color:var(--ink)}
.auth .demo-switch{
  background:var(--frost);border:0;border-radius:var(--radius-control);margin-top:16px;
}
.auth .demo-switch>span{color:var(--muted)}
.auth .demo-switch button{background:var(--surface);color:var(--teal);border:0;border-radius:var(--pill);box-shadow:0 3px 0 0 var(--shadow);font-weight:600}
.auth .demo-switch button:hover{background:var(--teal);color:var(--on-accent)}
.auth>p:not(.muted){font-size:14.5px;color:var(--muted);margin-top:24px}
.auth>p:not(.muted) a{color:var(--teal);font-weight:600;text-decoration:none}
.auth>p:not(.muted) a:hover{text-decoration:underline}
@media(max-width:760px){
  .auth{max-width:none}
  .auth .card{padding:24px 16px}
  .auth-home{margin-bottom:16px}
}

/* Surface unification with the BoostMyMarks homepage: white cards on the
   tinted canvas; the last quick-action row keeps its card edge clean. */
.quick-action:last-child{border-bottom:0}
@media(max-width:1180px){.auth::before,.auth::after{display:none}}

/* ==========================================================================
   Creative Classroom unification pass.
   Every display line runs on Space Grotesk, every elevated surface keeps its
   2px ink edge and hard sticker shadow, and candy colour stays decorative.
   ========================================================================== */
.shelf-note h2,.hero-card h2,.book-cover{font-family:var(--display)}
.shelf-note h2{font-weight:600;letter-spacing:-.01em}
.hero-card h2{font-weight:600;letter-spacing:-.01em}
.book-cover{font-weight:600;border-color:var(--edge)}
.hero-art{box-shadow:8px 9px 0 var(--shadow)}
.color-1{background:var(--rose);color:var(--ink);border-color:var(--edge)}
.color-2{background:var(--frost);color:var(--ink);border-color:var(--edge)}
.empty{border-color:var(--line-strong)}

/* Label and control typography: Space Grotesk 600 on every button, tab and
   field label; long-form tile copy stays on Work Sans for readability. */
button,.download,.team-primary,label{font-family:var(--display);font-weight:600;letter-spacing:-.005em}
.check,.choice,.quick-action,.student-chip,.pathway-suggestion,.study-result,.ll-cal-event{font-family:'Work Sans','Segoe UI',system-ui,-apple-system,Arial,sans-serif;font-weight:400}
.quick-action strong{font-family:var(--display);font-weight:600;letter-spacing:-.01em}
.page-title h1{color:var(--ink)}
.welcome-banner{color:#fff}

/* Header theme switch (added by theme.js). */
.theme-toggle{flex:none;width:44px;height:44px;min-width:44px;min-height:44px;margin:0 0 0 auto;padding:0;border-radius:50%;font-size:18px;line-height:1;font-family:inherit}
header>.theme-toggle~#logout,header>.theme-toggle~#admin-logout,header>.theme-toggle~#org-logout,header>.theme-toggle~a:not(.brand){margin-left:0}
@media(max-width:760px){.theme-toggle{width:40px;height:40px;min-width:40px;min-height:40px;font-size:16px}}

/* ==========================================================================
   Dark mode. Follows the device setting unless the header switch (theme.js)
   saved a choice in data-theme. Screen only, so printed sheets stay light.
   ========================================================================== */
@media screen and (prefers-color-scheme:dark){:root:not([data-theme=light]){--canvas:#0f1017;--surface:#191a24;--frost:#242636;--paper:#2d2f43;--line:#2a2c3d;--line-strong:#454860;--ink:#eceef8;--muted:#b3b5ca;--faint:#8c8ea6;--teal:#a3a3ff;--teal-deep:#c2c2ff;--night:#3a3c55;--brick:#ff8f85;--edge:#3a3d55;--shadow:#05050a;--on-accent:#0e0e1c;--banner:#2b2bb5;--ring:rgba(163,163,255,.4);--rose:#4a2228;--danger-hover:#ffb4ab;--warn:#f0a070;color-scheme:dark}:root:not([data-theme=light]) body:has(.auth)::before,:root:not([data-theme=light]) body:has(.auth)::after,:root:not([data-theme=light]) .auth::before,:root:not([data-theme=light]) .auth::after{opacity:.22}:root:not([data-theme=light]) .welcome-banner .eyebrow{color:rgba(255,255,255,.85)}:root:not([data-theme=light]) .study-figure{background:#fff;border-radius:8px}}
@media screen{:root[data-theme=dark]{--canvas:#0f1017;--surface:#191a24;--frost:#242636;--paper:#2d2f43;--line:#2a2c3d;--line-strong:#454860;--ink:#eceef8;--muted:#b3b5ca;--faint:#8c8ea6;--teal:#a3a3ff;--teal-deep:#c2c2ff;--night:#3a3c55;--brick:#ff8f85;--edge:#3a3d55;--shadow:#05050a;--on-accent:#0e0e1c;--banner:#2b2bb5;--ring:rgba(163,163,255,.4);--rose:#4a2228;--danger-hover:#ffb4ab;--warn:#f0a070;color-scheme:dark}:root[data-theme=dark] body:has(.auth)::before,:root[data-theme=dark] body:has(.auth)::after,:root[data-theme=dark] .auth::before,:root[data-theme=dark] .auth::after{opacity:.22}:root[data-theme=dark] .welcome-banner .eyebrow{color:rgba(255,255,255,.85)}:root[data-theme=dark] .study-figure{background:#fff;border-radius:8px}}
/* Status pills fade out (theme.js adds the class 5 s after the last message). */
#status,#team-status{transition:opacity .4s ease}
#status.status-fading,#team-status.status-fading{opacity:0}
@media (max-width:760px){.section-tabs,.org-tabs{width:100%;flex-wrap:wrap;overflow-x:visible;border-radius:24px}.section-tabs>button,.org-tabs>button{flex:1 1 calc(50% - 4px);min-width:0;white-space:normal;text-align:center;padding-inline:12px}}
.study-picker-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}.study-picker-grid label{margin:0;min-width:0}.study-picker-grid select{width:100%;min-width:0}

/* Lesson studio refresh: hub, builders, marking queue, term plan, students. Colours come from theme tokens. */
:root{--katc-k:#1f4fd1;--katc-k-bg:#e3ebff;--katc-a:#137a46;--katc-a-bg:#e1f5e9;--katc-t:#b0225a;--katc-t-bg:#ffe1ec;--katc-c:#8a5a00;--katc-c-bg:#fff1cf;--ok:#137a46;--ok-bg:#e1f5e9;--warn-bg:#fff1cf}
@media screen and (prefers-color-scheme:dark){:root:not([data-theme=light]){--katc-k:#a9c1ff;--katc-k-bg:#1d2747;--katc-a:#7fd8a5;--katc-a-bg:#17301f;--katc-t:#ff9ec2;--katc-t-bg:#3a1a28;--katc-c:#f2c46b;--katc-c-bg:#33280f;--ok:#7fd8a5;--ok-bg:#17301f;--warn-bg:#33280f}}
@media screen{:root[data-theme=dark]{--katc-k:#a9c1ff;--katc-k-bg:#1d2747;--katc-a:#7fd8a5;--katc-a-bg:#17301f;--katc-t:#ff9ec2;--katc-t-bg:#3a1a28;--katc-c:#f2c46b;--katc-c-bg:#33280f;--ok:#7fd8a5;--ok-bg:#17301f;--warn-bg:#33280f}}
.hub-pickers{display:flex;flex-direction:column;gap:16px;margin:0 0 24px}
.hub-students{display:flex;flex-wrap:wrap;gap:8px}
.hub-person{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:6px 16px 6px 6px;border-radius:var(--pill);background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);box-shadow:none;font-weight:600;text-align:left;margin:0}
.hub-person small{display:block;font-size:12px;font-weight:500;color:var(--muted);line-height:1.3}
.hub-person .avatar{width:34px;height:34px;flex:none}
.hub-person.on{background:var(--teal);color:var(--on-accent);border-color:var(--teal)}
.hub-person.on small{color:var(--on-accent);opacity:.85}
.hub-subjects{display:inline-flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:14px;background:var(--frost);width:fit-content;max-width:100%}
.seg{min-height:38px;padding:6px 14px;border-radius:10px;border:0;background:transparent;color:var(--muted);box-shadow:none;font-weight:600;font-size:14px;margin:0}
.seg.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.18)}
.seg small{font-weight:500;opacity:.75}
.hub-tabs{display:flex;gap:4px;border-bottom:2px solid var(--line);margin:0 0 24px;overflow-x:auto}
.hub-tab{min-height:46px;padding:8px 16px;border:0;border-bottom:3px solid transparent;margin:0 0 -2px;border-radius:0;background:transparent;color:var(--muted);box-shadow:none;font-weight:600;white-space:nowrap;display:inline-flex;align-items:center;gap:8px}
.hub-tab[aria-selected=true]{color:var(--ink);border-bottom-color:var(--teal)}
.hub-count{min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--frost);color:var(--muted);font-size:12px;display:inline-grid;place-items:center}
.hub-count.alert{background:var(--brick);color:var(--on-accent)}
.hub-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.hub-actions button{margin:0}
.hub-next{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:16px 20px;border-radius:var(--radius-control);background:var(--frost);margin:0 0 24px}
.hub-next strong{font-size:17px}.hub-next button{margin:0 0 0 auto}
.hub-group{font-size:17px;margin:24px 0 8px;display:flex;align-items:center;gap:8px}.hub-group small{color:var(--muted);font-weight:500}
.hub-list{display:flex;flex-direction:column;gap:8px}
.hub-row{background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius-control);padding:0}
.hub-row>summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:14px 16px;cursor:pointer;list-style:none;min-height:56px}
.hub-row>summary::-webkit-details-marker{display:none}
.hub-row>summary:focus-visible{outline:2px solid var(--teal);outline-offset:2px;border-radius:var(--radius-control)}
.hub-row[open]>summary{border-bottom:1px solid var(--line)}
.hub-date{flex:none;min-width:92px;font-size:13px;font-weight:600;color:var(--muted)}
.hub-title{flex:1 1 220px;font-weight:600;min-width:0}
.hub-title small{display:block;font-weight:500;color:var(--muted);font-size:13px}
.hub-body{padding:16px 20px 20px;display:flex;flex-direction:column;gap:12px}
.hub-body h3{font-size:15px;margin:8px 0 0}
.hub-body>button{align-self:flex-start;margin:0}
.plan-steps,.hub-questions{margin:0;padding-left:22px}
.hub-questions li{margin:0 0 14px}.hub-questions li p{margin:4px 0}
.hub-questions select{max-width:220px;min-height:36px;padding:4px 8px}
.hub-inline{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 16px}
.hub-inline label{margin:0}.hub-inline button{margin:0}
.hub-handins{margin:0;padding-left:20px}
.chip{display:inline-flex;align-items:center;min-height:26px;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--frost);color:var(--muted);white-space:nowrap}
.status-draft,.status-planned{background:var(--frost);color:var(--muted)}
.status-assigned{background:var(--katc-k-bg);color:var(--katc-k)}
.status-review,.status-warn{background:var(--warn-bg);color:var(--katc-c)}
.status-returned,.status-taught{background:var(--ok-bg);color:var(--ok)}
.hub-filters,.topic-chips,.quick-notes,.mark-people{display:flex;flex-wrap:wrap;gap:8px}
.hub-filters{margin:0 0 16px}
.filter-chip{min-height:38px;padding:6px 14px;border-radius:999px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);box-shadow:none;font-size:14px;font-weight:600;margin:0}
.filter-chip b{margin-left:4px;color:var(--muted)}
.filter-chip.on{background:var(--teal);border-color:var(--teal);color:var(--on-accent)}.filter-chip.on b,.filter-chip.on small{color:var(--on-accent)}
.katc-bar{display:inline-flex;width:180px;max-width:100%;height:24px;border-radius:8px;overflow:hidden;gap:2px;flex:none}
.katc-bar>span{display:grid;place-items:center;font-size:11px;font-weight:700;min-width:28px}
.katc-bar .g1{flex-grow:1}.katc-bar .g2{flex-grow:2}.katc-bar .g3{flex-grow:3}.katc-bar .g4{flex-grow:4}.katc-bar .g5{flex-grow:5}.katc-bar .g6{flex-grow:6}.katc-bar .g7{flex-grow:7}.katc-bar .g8{flex-grow:8}.katc-bar .g9{flex-grow:9}.katc-bar .g10{flex-grow:10}.katc-bar .g11{flex-grow:11}.katc-bar .g12{flex-grow:12}.katc-bar .g13{flex-grow:13}.katc-bar .g14{flex-grow:14}.katc-bar .g15{flex-grow:15}.katc-bar .g16{flex-grow:16}.katc-bar .g17{flex-grow:17}.katc-bar .g18{flex-grow:18}.katc-bar .g19{flex-grow:19}.katc-bar .g20{flex-grow:20}
.katc-K{background:var(--katc-k-bg);color:var(--katc-k)}.katc-A{background:var(--katc-a-bg);color:var(--katc-a)}.katc-T{background:var(--katc-t-bg);color:var(--katc-t)}.katc-C{background:var(--katc-c-bg);color:var(--katc-c)}
.katc-badge{display:inline-flex;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:700}
.katc-section{margin:24px 0 8px;padding:8px 14px;border-radius:10px;font-size:15px}
.mark-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.mark-card{display:flex;flex-direction:column;justify-content:space-between;gap:16px;padding:20px;border-radius:var(--radius-card);border:1px solid var(--line-strong);background:var(--surface)}
.mark-card.has-work{border:2px solid var(--katc-c)}
.mark-card h3{margin:4px 0}.mark-card button{margin:0;align-self:flex-start}
.back{margin:0 0 16px}
.mark-progress{width:100%;height:10px;margin:0 0 24px}
.mark-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;align-items:start}
.mark-list{display:flex;flex-direction:column;gap:6px;position:sticky;top:16px}
.mark-person{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:52px;padding:8px 14px;border-radius:12px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);box-shadow:none;text-align:left;margin:0}
.mark-person small{color:var(--muted);font-size:12px}
.mark-person.on{border:2px solid var(--teal);background:var(--frost)}
.mark-person:disabled{opacity:.6}
.mark-panel{background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius-card);padding:24px}
.mark-panel h2{margin:0}
.mark-q{border-top:1px solid var(--line);padding:16px 0}
.mark-q h3{margin:8px 0 4px;font-size:15px}
.answer-box{padding:10px 14px;border-radius:10px;background:var(--frost)}
.score-pick{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin:8px 0}
.score-btn{min-height:42px;padding:6px 14px;border-radius:10px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);box-shadow:none;font-weight:600;margin:0}
.score-btn small{color:var(--muted);font-weight:500}
.score-btn.on{background:var(--teal);border-color:var(--teal);color:var(--on-accent)}.score-btn.on small{color:var(--on-accent)}
.score-input{display:flex;align-items:center;gap:8px;margin:0}.score-input input{width:90px}
.mark-total{display:flex;align-items:baseline;gap:12px;padding:16px 0}.mark-total strong{font-size:22px;font-family:var(--display)}
.plan-bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px 24px;padding:16px 20px;border-radius:var(--radius-card);background:var(--surface);border:1px solid var(--line-strong);margin:0 0 16px}
.field-label{display:block;font-size:13px;font-weight:600;color:var(--muted);margin:0 0 6px}
.day-toggles{display:flex;flex-wrap:wrap;gap:6px}
.day{min-width:52px;min-height:40px;padding:4px 8px;border-radius:10px;border:1px solid var(--line-strong);background:var(--surface);color:var(--muted);box-shadow:none;font-weight:600;margin:0}
.day.on{background:var(--teal);border-color:var(--teal);color:var(--on-accent)}
.plan-small{max-width:220px;margin:0}
.stepper{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line-strong);border-radius:10px;padding:2px}
.stepper button{min-width:36px;min-height:36px;padding:0;border-radius:8px;border:0;background:var(--frost);color:var(--ink);box-shadow:none;font-size:18px;margin:0}
.stepper output{min-width:28px;text-align:center;font-weight:700}
.switch{display:inline-flex;align-items:center;gap:10px;min-height:40px;border:0;background:transparent;color:var(--ink);box-shadow:none;padding:0;font-weight:500;margin:0}
.switch-track{width:44px;height:26px;border-radius:999px;background:var(--line-strong);position:relative;flex:none}
.switch-track span{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:left .15s ease}
.switch[aria-checked=true] .switch-track{background:var(--teal)}.switch[aria-checked=true] .switch-track span{left:21px}
.plan-source{margin:0 0 16px}.plan-source label{max-width:480px}
.plan-topics{padding-left:22px}.plan-topics li{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tiny{min-height:32px;padding:2px 10px;font-size:12px;margin:0}
.warn-text{color:var(--katc-c);font-weight:600}
.plan-weeks{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin:0 0 16px}
.plan-week{background:var(--surface);border:1px solid var(--line-strong);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:8px}
.plan-week.off{opacity:.6;background:var(--frost)}
.plan-week .row{align-items:center}
.plan-slot{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 12px;border-radius:12px;background:var(--katc-k-bg);color:var(--ink)}
.plan-slot small{font-weight:600;color:var(--muted)}.plan-slot span{font-weight:600}.plan-slot em{font-style:normal;font-size:12px;color:var(--ok);font-weight:600}
.plan-slot.review{background:var(--warn-bg)}.plan-slot.open{background:transparent;border:1px dashed var(--line-strong);color:var(--muted)}
.school-flag{margin:0;font-size:13px;font-weight:600;color:var(--katc-t)}
.sticky-actions{position:sticky;bottom:0;display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;padding:12px 0;background:var(--surface);z-index:2}
.hub-actions.sticky-actions{background:var(--canvas)}
.sticky-actions button{margin:0}
.builder fieldset{border:0;padding:0;margin:0 0 24px;min-width:0}
.builder legend{font-weight:700;font-size:15px;margin:0 0 10px}
.topic-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px}
.topic-option{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 14px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);margin:0;font-size:14px;cursor:pointer}
.topic-option:has(input:checked){border:2px solid var(--teal);background:var(--frost)}
.radio-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.radio-card{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;padding:14px;border:1px solid var(--line-strong);border-radius:14px;background:var(--surface);margin:0;cursor:pointer;font-size:14px}
.radio-card input{grid-row:span 2;margin-top:4px}.radio-card span{color:var(--muted);font-size:13px}
.radio-card:has(input:checked){border:2px solid var(--teal);background:var(--frost)}
.starter-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
.starter{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:64px;padding:10px 14px;border-radius:14px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);box-shadow:none;text-align:left;margin:0}
.starter small{color:var(--muted);font-weight:500}
.starter.on{border:2px solid var(--teal);background:var(--frost)}
.more-options{border:1px solid var(--line-strong);border-radius:14px;padding:12px 16px;margin:0 0 24px}
.more-options>summary{font-weight:700;cursor:pointer}.more-options>summary small{font-weight:500;color:var(--muted)}
.katc-steppers{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;margin:12px 0}
.katc-step{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-radius:12px;font-weight:600;font-size:14px}
.katc-step .stepper{background:var(--surface)}
.people-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;align-items:start}
.people-list{display:flex;flex-direction:column;gap:6px}
.person-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-height:60px;padding:10px 14px;border-radius:14px;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);box-shadow:none;text-align:left;margin:0}
.person-row>span:nth-child(2){flex:1;min-width:0}.person-row small{display:block;color:var(--muted);font-size:12px}
.person-flags{flex-basis:100%;display:flex;flex-wrap:wrap;gap:6px;padding-left:46px}
.stat-card strong.stat-date{font-size:22px;line-height:1.3}
.person-row.on{border:2px solid var(--teal);background:var(--frost)}
.person-head{align-items:center;margin:0 0 16px}.person-head h2{margin:0}.person-head button{margin:0}
.person-head .identity{display:flex;align-items:center;gap:12px}
.avatar.big{width:48px;height:48px;font-size:20px}
.next-step{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:16px 20px;border-radius:var(--radius-card);background:var(--frost);margin:0 0 16px}
.next-step p{margin:0;flex:1 1 260px;font-weight:600}.next-step .eyebrow{flex-basis:100%}.next-step button{margin:0}
.katc-meter{display:grid;grid-template-columns:170px minmax(0,1fr) 140px;align-items:center;gap:12px;margin:8px 0}
.katc-meter meter{width:100%;height:14px}
.result-row{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:8px 0;margin:0;max-width:none}
.date-form fieldset{border:0;padding:0;margin:0 0 12px}.date-form legend{font-weight:600;font-size:14px;margin:0 0 8px}
.chip-radios{display:flex;flex-wrap:wrap;gap:8px}
.chip-radios label{margin:0;cursor:pointer;position:relative}
.chip-radios input{position:absolute;opacity:0;width:1px;height:1px}
.chip-radios span{display:inline-flex;align-items:center;min-height:38px;padding:6px 14px;border-radius:999px;border:1px solid var(--line-strong);background:var(--surface);font-weight:600;font-size:14px}
.chip-radios input:checked+span{background:var(--teal);border-color:var(--teal);color:var(--on-accent)}
.chip-radios input:focus-visible+span{outline:2px solid var(--teal);outline-offset:2px}
.date-list{list-style:none;margin:0;padding:0}
.date-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 0;border-bottom:1px solid var(--line)}
.date-row>span:nth-child(2){flex:1 1 220px;min-width:0}.date-row small{display:block;color:var(--muted)}
.date-row.past{opacity:.65}.date-row form{margin:0}
@media(max-width:860px){.mark-layout,.people-layout{grid-template-columns:minmax(0,1fr)}.people-list,.mark-list,.person-detail,.mark-panel{min-width:0}.person-head{flex-wrap:wrap}.mark-list{position:static;flex-direction:row;overflow-x:auto}.mark-person{min-width:150px}.people-list{flex-direction:row;overflow-x:auto;padding-bottom:4px}.person-row{min-width:220px}.katc-meter{grid-template-columns:1fr;gap:4px}.hub-date{min-width:0}.katc-bar{width:100%}.hub-next button{margin:0}.mark-panel{padding:16px}}
@media print{.hub-pickers,.hub-tabs,.hub-actions,.sticky-actions{display:none}}
.mark-tools{display:grid;gap:8px;margin-top:16px}
/* lesson builder: steps on the left, live lesson plan preview on the right */
.lb-head{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;margin:8px 0 24px}
.lb-head h1{margin:0;font-size:28px;letter-spacing:-.02em}.lb-head p{margin:0}
.lb-who{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px 0 4px;border-radius:999px;background:var(--frost);font-size:14px;font-weight:600}
.lb-who .avatar{width:32px;height:32px;border-radius:50%;font-size:13px}
.lb-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:32px;align-items:start}
.lb-steps{display:flex;flex-direction:column;gap:16px;min-width:0}
.lb-step{display:flex;flex-direction:column;gap:12px;margin:0}
.lb-step h2{font-size:16px;margin:0}.lb-step p{margin:2px 0 0}.lb-step label{margin:0}
.lb-step fieldset{border:0;padding:0;margin:0;min-width:0}
.lb-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.lb-seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;width:100%}
.lb-seg .seg{min-height:40px;padding:6px 8px;white-space:nowrap}
.lb-topics{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.lb-topic{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 16px;margin:0;border-bottom:1px solid var(--line);background:var(--surface);cursor:pointer;font-weight:400;color:var(--ink)}
.lb-topic:last-child{border-bottom:0}
.lb-topic input{width:20px;height:20px;margin:0}
.lb-topic strong{display:block;font-size:15px}.lb-topic small{display:block;color:var(--muted);font-size:13px}
.lb-topic:has(input:checked){background:var(--frost)}
.lb-topic:has(input:focus-visible){outline:3px solid var(--faint);outline-offset:-3px}
.lb-parts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.lb-part{display:flex;gap:10px;align-items:flex-start;text-align:left;margin:0;padding:12px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-weight:400}
.lb-part:hover{background:var(--frost);color:var(--ink)}
.lb-part.on{border-color:var(--teal);background:var(--frost)}
.lb-part strong{display:block;font-size:14px}.lb-part small{display:block;color:var(--muted)}
.lb-box{flex:none;width:20px;height:20px;margin-top:2px;border-radius:6px;display:grid;place-items:center;border:2px solid var(--line-strong);font-size:13px;font-weight:700;color:var(--surface)}
.lb-part.on .lb-box{background:var(--teal);border-color:var(--teal)}
.lb-preview{position:sticky;top:16px;display:flex;flex-direction:column;gap:12px;min-width:0}
.lb-label{margin:0;font-size:14px;font-weight:600;color:var(--muted)}
.lb-plan{display:flex;flex-direction:column;gap:20px;margin:0;padding:28px}
.lb-plan h2{font-size:26px;margin:4px 0 0;letter-spacing:-.02em}.lb-plan p{margin:0}
.lb-source{font-size:13px;font-weight:600;color:var(--teal);text-transform:uppercase;letter-spacing:.06em}
.lb-timeline{display:flex;height:36px;border-radius:10px;overflow:hidden;gap:2px}
.lb-timeline>span{display:grid;place-items:center;font-size:12px;font-weight:600;color:#12131a;overflow:hidden;white-space:nowrap;min-width:24px}
.lb-timeline .g1{flex-grow:1}.lb-timeline .g2{flex-grow:2}.lb-timeline .g3{flex-grow:3}.lb-timeline .g4{flex-grow:4}.lb-timeline .g5{flex-grow:5}.lb-timeline .g6{flex-grow:6}.lb-timeline .g7{flex-grow:7}.lb-timeline .g8{flex-grow:8}.lb-timeline .g9{flex-grow:9}.lb-timeline .g10{flex-grow:10}.lb-timeline .g11{flex-grow:11}.lb-timeline .g12{flex-grow:12}.lb-timeline .g13{flex-grow:13}.lb-timeline .g14{flex-grow:14}.lb-timeline .g15{flex-grow:15}.lb-timeline .g16{flex-grow:16}.lb-timeline .g17{flex-grow:17}.lb-timeline .g18{flex-grow:18}.lb-timeline .g19{flex-grow:19}.lb-timeline .g20{flex-grow:20}
.lp-warm{background:#c9d8ff}.lp-teach{background:#d7ccff}.lp-examples{background:#c4ead7}.lp-guided{background:#ffe2b8}.lp-exit{background:#ffd0de}
.lb-run{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.lb-run li{display:grid;grid-template-columns:56px 10px minmax(0,1fr);gap:14px;padding:10px 0;border-bottom:1px solid var(--line)}
.lb-run li:last-child{border-bottom:0}
.lb-run strong{display:block}.lb-run small{display:block;font-size:14px;color:var(--muted)}
.lb-time{font-weight:700;font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}
.lb-swatch{border-radius:4px}
.lb-note{margin:0;padding:12px 14px;border-radius:12px;background:var(--frost);font-size:14px;color:var(--muted)}
.lb-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.lb-actions button{margin:0;min-height:44px}
.link-button{background:none;border:0;padding:0;margin:0;color:var(--teal);text-decoration:underline;font-weight:600;font-size:inherit}
.link-button:hover{background:none;color:var(--ink)}
@media(max-width:1100px){.lb-layout{grid-template-columns:minmax(0,1fr)}.lb-preview{position:static}}
@media(max-width:480px){.lb-parts{grid-template-columns:1fr}.lb-plan{padding:20px}.lb-seg{grid-auto-flow:row;grid-template-columns:1fr 1fr}}
@media print{.lb-steps,.lb-actions{display:none}}
/* quick make: form on the left, the sheet as it prints on the right */
.qm-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;align-items:start}
.qm-layout>.builder{margin:0;min-width:0}
.qm-preview{position:sticky;top:16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.qm-preview p{margin:0}
article.paper{background:#fff;color:#1d1e26;border:1px solid var(--line);border-radius:6px;box-shadow:0 1px 2px rgba(18,19,26,.08),0 10px 28px rgba(18,19,26,.10);padding:36px 40px;aspect-ratio:8.5/11;overflow:auto;font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.5}
.paper-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;padding-bottom:12px;margin-bottom:8px;border-bottom:2px solid #1d1e26}
.paper-head h2{margin:2px 0 0;font-size:22px;color:#1d1e26;letter-spacing:-.01em}
.paper-kicker{margin:0;font:600 11px/1.4 'Segoe UI',sans-serif;text-transform:uppercase;letter-spacing:.08em;color:#55576a}
.paper-lines{display:flex;flex-direction:column;gap:6px;min-width:180px;font:12px 'Segoe UI',sans-serif;color:#55576a}
.paper-lines span{display:flex;gap:6px;align-items:flex-end;border-bottom:1px solid #9a9cab;padding-bottom:2px;flex:none;color:#55576a}
.paper-lines i{font-style:normal;color:#1d1e26}
.paper-part{margin:18px 0 6px;font:700 12px/1.4 'Segoe UI',sans-serif;color:#1d1e26;letter-spacing:.04em}
.paper-part span{font-weight:400;color:#6b6d7e}
.paper-q{display:grid;grid-template-columns:24px minmax(0,1fr);gap:4px;margin:10px 0 14px;break-inside:avoid}
.paper-q p{margin:0}.paper-n{font-weight:700}
.paper-options{margin:6px 0 0;padding-left:22px;display:grid;grid-template-columns:1fr 1fr;gap:2px 16px}
.paper-write{display:flex;flex-direction:column;gap:22px;margin-top:20px}
.paper-write span{display:block;border-bottom:1px solid #c4c6d2}
.paper-empty{margin:48px 0;text-align:center;color:#55576a;font-family:'Segoe UI',sans-serif}
/* quieter K/A/T/C labels on sheets and in marking */
.katc-badge{background:none;color:var(--muted);border:1px solid var(--line);font-weight:500;font-size:11px;padding:0 8px}
.katc-section{background:none;color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;padding:4px 0;border-radius:0;border-bottom:1px solid var(--line)}
@media(max-width:1100px){.qm-layout{grid-template-columns:minmax(0,1fr)}.qm-preview{position:static}}
@media(max-width:480px){article.paper{padding:20px;aspect-ratio:auto}.paper-options{grid-template-columns:1fr}}
/* compact sidebar: slides to an icon rail so builders get the full width */
.sidebar-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;margin:0 0 16px;padding:8px 16px;border:1px solid var(--line);border-radius:var(--pill,999px);background:transparent;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden}
.sidebar-toggle:hover{background:var(--frost);color:var(--ink)}
.sidebar-toggle>span:first-child{flex:0 0 23px;text-align:center;font-size:16px;line-height:1}
.nav-label{display:inline-block;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;transition:opacity .25s ease,max-width .4s cubic-bezier(.22,.8,.24,1),transform .4s cubic-bezier(.22,.8,.24,1)}
.sidebar nav .nav-item,.sidebar-toggle{transition:width .4s cubic-bezier(.22,.8,.24,1),border-radius .4s ease,padding .4s cubic-bezier(.22,.8,.24,1),gap .4s cubic-bezier(.22,.8,.24,1),background .15s ease,color .15s ease}
.sidebar>.eyebrow,.sidebar-note{transition:opacity .25s ease}
@media(min-width:761px){
 .workspace{transition:grid-template-columns .4s cubic-bezier(.22,.8,.24,1),gap .4s cubic-bezier(.22,.8,.24,1)}
 .sidebar{overflow:hidden}
 .workspace[data-compact=true]{grid-template-columns:64px minmax(0,1fr);gap:32px}
 .workspace[data-compact=true] .sidebar{padding-right:8px}
 .workspace[data-compact=true] .nav-label{opacity:0;max-width:0;transform:translateX(-6px)}
 .workspace[data-compact=true] .sidebar nav .nav-item,.workspace[data-compact=true] .sidebar-toggle{gap:0;padding:0;width:48px;height:48px;min-height:48px;justify-content:center;border-radius:50%;margin-inline:auto}
 .workspace[data-compact=true] .sidebar-toggle{width:40px;height:40px;min-height:40px}
 .workspace[data-compact=true] .sidebar nav .nav-item .nav-icon,.workspace[data-compact=true] .sidebar-toggle>span:first-child{flex:none}
 .workspace[data-compact=true] .sidebar>.eyebrow,.workspace[data-compact=true] .sidebar-note{opacity:0;visibility:hidden}
 .workspace[data-compact=true] .identity{gap:0}
 main:has(.workspace[data-compact=true]){max-width:none}
}
@media(max-width:760px){.workspace .sidebar .sidebar-toggle{display:none!important}}
/* Asked for by the owner: the rail still slides when the system asks for less motion, but shorter and without the label drift. */
@media(prefers-reduced-motion:reduce) and (min-width:761px){.workspace{transition:grid-template-columns .3s ease!important}.nav-label{transition:opacity .2s ease!important;transform:none!important}}
/* hover and selected states: never a dark fill under dark text */
.hub-tabs .hub-tab:hover,.hub-tabs .hub-tab:focus-visible{background:var(--frost);color:var(--ink);border-bottom-color:var(--line-strong)}
.hub-tabs .hub-tab[aria-selected=true]{background:var(--frost);color:var(--teal);border-bottom-color:var(--teal);border-radius:10px 10px 0 0}
.hub-tabs .hub-tab[aria-selected=true]:hover{color:var(--teal);border-bottom-color:var(--teal)}
.hub-subjects .seg:hover,.lb-seg .seg:hover,.qm-seg .seg:hover,div .seg:hover{background:var(--frost);color:var(--ink)}
div .seg.on,div .seg.on:hover{background:var(--teal);color:var(--on-accent);box-shadow:none}
div .seg.on small{color:var(--on-accent)}
.hub-students .hub-person:hover,div .hub-person:hover{background:var(--frost);color:var(--ink);border-color:var(--teal)}
div .hub-person.on:hover{background:var(--teal);color:var(--on-accent)}
div .filter-chip:hover{background:var(--frost);color:var(--ink);border-color:var(--teal)}
div .filter-chip.on:hover{background:var(--teal);color:var(--on-accent)}
div .person-card:hover,nav .person-row:hover{background:var(--frost);color:var(--ink);border-color:var(--teal)}
div .lb-part:hover{background:var(--frost);color:var(--ink);border-color:var(--teal)}
/* students: collapsible grid per grade, detail underneath */
.people-layout{grid-template-columns:minmax(0,1fr)}
.people-groups{display:flex;flex-direction:column;gap:12px}
.grade-group{border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:0}
.grade-group>summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 16px;cursor:pointer;font-weight:700;list-style:none}
.grade-group>summary::-webkit-details-marker{display:none}
.grade-group>summary::before{content:'›';display:inline-block;width:14px;color:var(--muted);transition:transform .2s ease}
.grade-group[open]>summary::before{transform:rotate(90deg)}
.grade-group>summary small{color:var(--muted);font-weight:500}
.grade-group>summary:hover{background:var(--frost);border-radius:16px}
.people-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;padding:4px 12px 12px}
.people-grid .person-card{width:100%}
.grade-note{margin:0 0 16px}
/* question mix step */
.qm-mix .katc-step{align-items:center}
.qm-mix .katc-step span strong{display:block}
.qm-mix .katc-step span small{display:block;font-weight:500;color:var(--muted);font-size:12px}
.qm-total{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* tab row: keep the underline without a stray vertical scrollbar */
.hub-tabs{border-bottom:0;box-shadow:inset 0 -2px 0 var(--line);overflow-y:hidden}
.hub-tabs .hub-tab{margin:0}
.qm-mix .katc-steppers{grid-template-columns:minmax(0,1fr)}
.qm-mix .katc-step{background:var(--frost);border:1px solid var(--line);padding:8px 8px 8px 14px}
.qm-mix .katc-step span{min-width:0}
/* text links that are buttons: no pill, no drop shadow, no lift */
button.link-button,button.link-button:hover,button.link-button:active,button.link-button:focus-visible{min-height:0!important;padding:0!important;margin:0!important;border:0!important;border-radius:4px!important;background:none!important;box-shadow:none!important;transform:none!important;color:var(--teal);text-decoration:underline;text-underline-offset:3px;font-weight:600;font-size:inherit;line-height:inherit;vertical-align:baseline}
button.link-button:hover{color:var(--ink)}
button.link-button:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
/* worksheet generator */
.qm-step{display:flex;flex-direction:column;gap:10px}
.qm-presets{display:flex;flex-wrap:wrap;gap:6px}
.qm-presets .filter-chip{min-height:34px;font-size:13px}
.qm-presets small{font-weight:500;opacity:.8;margin-left:4px}
.qm-count{margin:0}
.qm-fill .seg[disabled]{opacity:.45;cursor:not-allowed}
.qm-switches{display:flex;flex-direction:column;gap:6px;margin-top:4px}
button.qm-switch{display:flex!important;justify-content:flex-start;align-items:flex-start;gap:12px;width:100%;min-height:52px;padding:8px 10px!important;margin:0!important;border-radius:12px;text-align:left;background:transparent;box-shadow:none!important;color:var(--ink)}
button.qm-switch:hover{background:var(--frost)!important;color:var(--ink)!important}
.qm-switch .switch-track{margin-top:2px}
.qm-switch strong{display:block;font-size:14px}.qm-switch small{display:block;color:var(--muted);font-weight:400;font-size:12px}
.paper-note{margin:10px 0 0;font:italic 13px/1.5 Georgia,serif;color:#33343f}
.paper-marks{font:12px 'Segoe UI',sans-serif;color:#6b6d7e;white-space:nowrap}
.paper-topic{margin:2px 0 0!important;font:11px 'Segoe UI',sans-serif;color:#6b6d7e;text-transform:uppercase;letter-spacing:.05em}
.paper-key{margin-top:12px;border:1px solid var(--line);border-radius:12px;padding:10px 14px;background:var(--surface)}
.paper-key summary{cursor:pointer;font-weight:600}
.paper-key ol{margin:8px 0 0;padding-left:22px;font-size:14px}
.lb-goals{margin:8px 0 0;padding-left:18px;color:var(--muted);font-size:14px}
.lb-goals strong{color:var(--ink)}
.lb-topic input[type=checkbox]{width:18px;height:18px;accent-color:var(--teal);flex:none;margin-top:3px}
/* Student homework: passage once, hand-in, results */
.passage{background:var(--surface);border:1.5px solid var(--line-strong);border-radius:var(--radius-control);padding:14px 16px;margin:12px 0}
.passage h3{margin:0 0 6px;font-size:1rem}
.passage p{margin:0;line-height:1.55}
.auto-check{margin:10px 0;font-weight:500}
.submit-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:12px}
.q-results{list-style:none;padding:0;display:grid;gap:10px;margin:12px 0}
.q-results li{display:flex;gap:12px;align-items:flex-start;background:var(--surface);border:1.5px solid var(--line-strong);border-radius:var(--radius-control);padding:12px 14px}
.q-results li p{margin:0 0 4px}
.q-results li.notyet{border-color:var(--warn)}
.q-mark{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:700;background:var(--frost);color:var(--ink)}
.q-results li.full .q-mark{background:var(--pop-green);color:#fff}
.q-results li.part .q-mark{background:var(--pop-yellow);color:#111118}
.q-results li.notyet .q-mark{background:var(--rose);color:var(--ink)}
/* Phones: tabs wrap into rows instead of scrolling off screen, so every tab stays visible. */
@media (max-width:600px){.hub-tabs{flex-wrap:wrap;overflow:visible;row-gap:4px}.hub-tabs .hub-tab{flex:1 1 auto;text-align:center;white-space:nowrap}}

/* Flat layout (audit stage 2): sidebar items with icons and counts, Today home, student homework flow, week board.
   Loaded last so it wins over older layers. Colours come from the theme tokens, so dark mode follows. */

/* ---------- sidebar ---------- */
.sidebar .account-button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;margin:4px 0 14px;border:1px solid transparent;border-radius:var(--pill);background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;box-shadow:none;min-height:48px}
.sidebar .account-button:hover{background:var(--frost)}
.sidebar .account-button .nav-label{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.sidebar .account-button small{font-size:12px;color:var(--muted);font-weight:500}
.nav-item{display:flex;align-items:center;gap:12px;white-space:nowrap}
.nav-item .nav-icon{flex-shrink:0}
.nav-item .nav-label{overflow:hidden;text-overflow:ellipsis}
.nav-badge{margin-left:auto;min-width:22px;height:22px;padding:0 7px;box-sizing:border-box;border-radius:var(--pill);background:var(--teal);color:var(--on-accent);font:700 12px/22px var(--display);text-align:center}
.nav-item.active .nav-badge{background:var(--on-accent);color:var(--teal)}
.workspace[data-compact="true"] .nav-badge{position:absolute;top:2px;right:2px;min-width:18px;height:18px;padding:0 5px;font-size:11px;line-height:18px}
.workspace[data-compact="true"] .nav-item{position:relative}
.back-row{margin:0 0 8px}
.back.quiet{padding-left:8px}

/* ---------- "How to use this" ---------- */
.how-box{margin:0 0 20px;padding:6px 16px;border:1.5px dashed var(--line-strong);border-radius:16px;background:var(--surface);max-width:960px}
.how-box summary{cursor:pointer;font-weight:600;font-size:14px;color:var(--muted);padding:6px 0}
.how-box ol{margin:6px 0 8px;padding-left:22px;display:grid;gap:4px;font-size:15px}
.how-box[open] ol{animation:flat-in .3s cubic-bezier(.2,.8,.2,1) both}

/* ---------- Today (tutor home) ---------- */
.today-title{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.today-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:0 0 20px}
.today-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;padding:18px 20px;border-radius:20px;border:1.5px solid var(--line-strong);background:var(--surface);color:var(--ink);box-shadow:none;min-height:0;cursor:pointer;transition:border-color .2s,transform .2s,box-shadow .2s}
.today-card:hover{border-color:var(--teal);transform:translateY(-1px);box-shadow:0 4px 14px var(--ring);background:var(--surface);color:var(--ink)}
.today-card.needs{border:2px solid var(--teal)}
.today-num{font:700 32px/1 var(--display)}
.today-label{font-weight:700;font-size:16px}
.today-students .today-row{display:grid;grid-template-columns:40px minmax(120px,1fr) minmax(150px,1.3fr) minmax(150px,1.3fr) auto;align-items:center;gap:14px;padding:12px 0;border-top:1px solid var(--line)}
.today-who,.today-cell{display:flex;flex-direction:column;min-width:0}
.today-who small,.today-cell small{color:var(--muted);font-size:12px}
.today-cell{font-size:14px}
.today-step button{white-space:nowrap}
@media (max-width:1100px){.today-students .today-row{grid-template-columns:40px 1fr;row-gap:6px}.today-cell,.today-step{grid-column:2}}   /* the menu takes ~240px, so the 5-column row only fits on wide screens */

/* ---------- student home and homework ---------- */
.todo-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line);flex-wrap:wrap}
.todo-row:first-of-type{border-top:0}
.todo-text{flex:1 1 200px;display:flex;flex-direction:column;min-width:0}
.todo-text small{color:var(--muted);font-size:13px}
.due-chip{font-weight:700;font-size:12px;padding:4px 10px;border-radius:var(--pill);background:var(--frost);color:var(--ink);white-space:nowrap}
.due-chip.soon{background:var(--rose);color:color-mix(in srgb,var(--warn) 75%,var(--ink))}
.due-chip.new{background:var(--teal);color:var(--on-accent)}
.paper-row{opacity:.85}
.home-checkin{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.home-checkin h2{margin:0}
.home-checkin p{margin:2px 0 0}
.hw-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.seg-tabs{display:inline-grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);background:var(--frost);border-radius:var(--pill);padding:4px;gap:2px;max-width:100%}
.seg-tab{border:0;background:none;color:var(--muted);box-shadow:none;border-radius:var(--pill);min-height:40px;padding:0 14px;font-weight:600;font-size:14px;white-space:nowrap;transition:background-color .25s,color .25s}
.seg-tab:hover{background:var(--surface);color:var(--ink)}
.seg-tab.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(17,17,24,.15)}
@media (max-width:480px){.seg-tabs{display:grid;width:100%}.seg-tab{padding:0 6px;font-size:13px}}
.hw-focus{max-width:720px;animation:flat-in .35s cubic-bezier(.2,.8,.2,1) both}
.hw-head{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.hw-head-text{display:flex;flex-direction:column;min-width:0}
.hw-head-text strong{font:600 18px var(--display);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.icon-btn{width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-size:20px;line-height:1}
.hw-progress{width:100%;height:8px;margin:0 0 18px;appearance:none;-webkit-appearance:none;border:0;border-radius:var(--pill);background:var(--frost);overflow:hidden}
.hw-progress::-webkit-progress-bar{background:var(--frost);border-radius:var(--pill)}
.hw-progress::-webkit-progress-value{background:var(--teal);border-radius:var(--pill);transition:width .4s cubic-bezier(.2,.8,.2,1)}
.hw-progress::-moz-progress-bar{background:var(--teal);border-radius:var(--pill)}
.hw-step{animation:flat-in .3s cubic-bezier(.2,.8,.2,1) both}
.hw-step .hw-part{display:inline-block;margin-bottom:8px}
.hw-step [data-question] legend,.hw-step [data-question] h3{font:500 20px/1.35 var(--display)}
.hw-nav{position:sticky;bottom:0;display:flex;align-items:center;gap:10px;padding:12px 0;margin-top:12px;background:var(--canvas);border-top:1px solid var(--line)}
.hw-nav [data-saved]{flex-grow:1;text-align:center}
.hw-review{list-style:none;padding:0;margin:8px 0}
.hw-review-row{display:flex;width:100%;align-items:center;gap:12px;padding:12px 4px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--ink);box-shadow:none;text-align:left;min-height:48px}
.hw-review-row span:not([aria-hidden]){flex-grow:1}
.hw-review-row:hover{background:var(--frost);color:var(--ink)}
.hw-done{text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 20px}
.done-mark{width:64px;height:64px;border-radius:50%;background:var(--pop-green);color:#fff;display:flex;align-items:center;justify-content:center;font-size:32px;animation:flat-pop .45s cubic-bezier(.2,.8,.2,1) both}

/* ---------- week board ---------- */
.board-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.board-range{font:600 18px var(--display);white-space:nowrap}
.board-filters{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
.board-filters .pick{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 14px;border-radius:var(--pill);border:1.5px solid var(--line-strong);background:var(--surface);color:var(--ink);box-shadow:none;font-weight:600;font-size:13px}
.board-filters .pick.on{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.board-wrap{position:relative}
.board-scroll{background:var(--surface);border:1.5px solid var(--line-strong);border-radius:20px;overflow-x:auto}
.board-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));min-width:880px}
.board-grid.starts-today{grid-template-columns:minmax(180px,1.6fr) repeat(6,minmax(120px,1fr))}
.board-col{display:flex;flex-direction:column;gap:8px;padding:12px 10px;border-left:1px solid var(--line);min-height:440px}
.board-col:first-child{border-left:0}
.board-col.today{background:var(--frost)}
.board-col h3{display:flex;align-items:baseline;gap:6px;margin:0 2px 4px;font:600 15px var(--display);white-space:nowrap}
.board-col h3 small{color:var(--muted);font:500 13px var(--body,inherit)}
.today-pill{margin-left:auto;font:700 11px var(--display);background:var(--teal);color:var(--on-accent);border-radius:var(--pill);padding:2px 8px}
.board-card{display:flex;flex-direction:column;align-items:stretch;gap:5px;width:100%;padding:10px;border:0;border-radius:14px;text-align:left;box-shadow:none;min-height:0;font:inherit;cursor:pointer;transition:opacity .25s,transform .2s,box-shadow .2s}
.board-card:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(17,17,24,.14)}
.board-card.sel{box-shadow:0 0 0 2px var(--ink)}
.board-card.dim,.board-due.dim{opacity:.28}
.board-card.cancelled{text-decoration:line-through;opacity:.6}
.board-time{font-weight:700;font-size:12px}
.board-who{display:flex;align-items:center;gap:6px;font-weight:700;font-size:13px}
.board-who .avatar{width:24px;height:24px;font-size:12px;flex-shrink:0}
.board-lesson{font-size:13px;line-height:1.3;color:var(--ink)}
.board-tag{align-self:flex-start;font:700 11px var(--display);background:var(--surface);color:var(--muted);border-radius:var(--pill);padding:2px 8px}
.board-due-label{font:700 11px var(--display);text-transform:uppercase;letter-spacing:.05em;color:var(--muted);border-top:1px solid var(--line);padding-top:8px;margin-top:2px}
.board-due{display:flex;align-items:center;gap:6px;width:100%;min-height:0;padding:6px 8px;border:0;border-radius:10px;background:var(--canvas);color:var(--ink);box-shadow:none;font-weight:600;font-size:12px;text-align:left}
.board-due svg{flex-shrink:0}
.board-due.soon{background:var(--rose);color:color-mix(in srgb,var(--warn) 75%,var(--ink))}
.board-due:hover{box-shadow:0 0 0 1.5px var(--teal);background:var(--canvas);color:var(--ink)}
.board-due.soon:hover{background:var(--rose);color:color-mix(in srgb,var(--warn) 75%,var(--ink))}
.board-free{color:var(--muted);font-size:13px;padding:2px}
.board-add{margin-top:auto;min-height:34px;padding:0;border:1.5px dashed var(--line-strong);border-radius:10px;background:none;color:var(--teal);box-shadow:none;font-weight:600;font-size:13px;opacity:.75}
.board-add:hover{opacity:1;border-color:var(--teal);background:none;color:var(--teal)}
.board-panel{position:absolute;top:12px;right:12px;bottom:12px;width:300px;max-width:calc(100% - 24px);box-sizing:border-box;display:flex;flex-direction:column;gap:12px;padding:18px;background:var(--surface);border:1.5px solid var(--line-strong);border-radius:18px;box-shadow:0 12px 32px rgba(17,17,24,.2);z-index:3;overflow:auto;animation:flat-slide .35s cubic-bezier(.2,.8,.2,1) both}
.board-panel-head{display:flex;align-items:flex-start;gap:10px}
.board-panel-head>div{flex-grow:1;display:flex;flex-direction:column;min-width:0}
.board-panel-head strong{font:600 18px var(--display)}
.board-panel .icon-btn{width:34px;height:34px;min-height:34px;font-size:18px}
.board-facts{margin:0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:grid;gap:6px}
.board-facts div{display:flex;gap:8px;font-size:14px}
.board-facts dt{color:var(--muted);min-width:64px}
.board-facts dd{margin:0}
.board-panel-actions{margin-top:auto;display:flex;flex-direction:column;gap:8px}
.board-panel-actions button{width:100%}
/* Student colours: light background, dark text; darker pairs in dark mode. */
.stu-0{--sb:#e4e8ff;--sf:#1c1cc4;--sd:#2727e6}.stu-1{--sb:#d8f3ee;--sf:#08574c;--sd:#0b7a6a}.stu-2{--sb:#efe4ff;--sf:#5b2a9e;--sd:#7a3ac8}
.stu-3{--sb:#fff0d6;--sf:#7a4a00;--sd:#b36b00}.stu-4{--sb:#ffe3ec;--sf:#8a1d45;--sd:#c2336a}.stu-5{--sb:#e3f1ff;--sf:#0d4f8a;--sd:#1f74c2}
.board-card[class*=stu-]{background:var(--sb);color:var(--sf)}
.avatar[class*=stu-],.dot[class*=stu-]{background:var(--sd);color:#fff}
.signin-card{border:2px solid var(--teal)}
@media screen and (prefers-color-scheme:dark){:root:not([data-theme=light]) .board-card[class*=stu-]{background:color-mix(in srgb,var(--sd) 28%,var(--surface));color:var(--ink)}}
@media screen{:root[data-theme=dark] .board-card[class*=stu-]{background:color-mix(in srgb,var(--sd) 28%,var(--surface));color:var(--ink)}}
/* Phones: the week becomes a day-by-day list and the details panel a sheet from the bottom. */
@media (max-width:700px){
 .board-scroll{overflow:visible}
 .board-grid,.board-grid.starts-today{grid-template-columns:1fr;min-width:0}
 .board-col{border-left:0;border-top:1px solid var(--line);min-height:0}
 .board-col:first-child{border-top:0}
 .board-add{margin-top:4px}
 .board-panel{position:fixed;top:auto;left:0;right:0;bottom:0;width:auto;max-width:none;max-height:80vh;border-radius:20px 20px 0 0;animation:flat-up .35s cubic-bezier(.2,.8,.2,1) both}
 .board-filters{margin-left:0}
}

@keyframes flat-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes flat-slide{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}
@keyframes flat-up{from{transform:translateY(100%)}to{transform:none}}
@keyframes flat-pop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.how-box[open] ol,.hw-focus,.hw-step,.done-mark,.board-panel{animation:none}.board-card,.today-card{transition:none}}

/* Sign-in: on a phone the form comes first, without a screen of slogan above it. */
@media (max-width:600px){.auth>.eyebrow,.auth>p.muted:not(.small){display:none}.auth>h1{font-size:30px;margin:4px 0 12px}}
.home-todo .calm-empty,.hw-list .calm-empty{padding:12px 0;min-height:0}
.page .today-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1000px){.page .today-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
#app .today-card,#app .board-card,#app .board-due,#app .hw-review-row,#app .account-button{align-items:flex-start;justify-content:flex-start;text-align:left}
#app .board-due,#app .hw-review-row,#app .account-button{align-items:center}
.page .today-card .small{text-align:left}

/* ---------- question types (static/qtypes.js): one look for every type, student, tutor and paper ---------- */
.qt-body{display:grid;gap:12px;margin:8px 0 12px}
.qt-row{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.qt-row>label{flex:0 1 auto}.qt-row .qt-grow,.qt-grow{flex:1 1 160px;min-width:0}
.qt-unit{align-self:center;font-weight:600;color:var(--muted)}
.qt-setup{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 16px;margin:8px 0}
.qt-sentence mark{background:var(--frost);color:var(--ink);font-weight:700;padding:0 4px;border-radius:4px;border-bottom:2px solid var(--teal)}
.qt-formula{font-family:'Space Mono',ui-monospace,monospace;font-size:13px;color:var(--muted);margin:0}
.qt-sub{font-weight:600;margin:4px 0 0;font-size:14px}
.qt-live{min-height:1.4em;margin:0;font-size:13px}
.qt-live .ok-text,.qt-checks .ok{color:var(--teal)}
.qt-opts{display:grid;gap:8px}
#app .qt-opt{display:flex;align-items:center;gap:12px;justify-content:flex-start;text-align:left;width:100%;min-height:46px;padding:10px 14px;background:var(--canvas);color:var(--ink);border:1px solid var(--line);border-radius:12px;font-weight:400;box-shadow:none}
#app .qt-opt:hover{border-color:var(--teal)}
#app .qt-opt[aria-checked=true]{background:var(--frost);border-color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal)}
.qt-letter{flex:none;display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;border:1px solid var(--line-strong);font-size:12px;font-weight:700}
.qt-letter.sq{border-radius:6px}
#app .qt-opt[aria-checked=true] .qt-letter{background:var(--teal);color:var(--on-accent);border-color:var(--teal)}
.qt-match{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.qt-match>div{display:grid;gap:8px;align-content:start}
#app .qt-item{position:relative;display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;width:100%;min-height:46px;padding:10px 12px;background:var(--canvas);color:var(--ink);border:1px solid var(--line);border-radius:12px;font-weight:400;box-shadow:none}
#app .qt-item.sel{border-color:var(--teal);box-shadow:inset 0 0 0 2px var(--teal)}
.qt-tag{flex:none;display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:11px;font-size:11px;font-weight:700;color:var(--on-accent);background:var(--teal)}
.qt-tag.t1{background:var(--rose)}.qt-tag.t2{background:var(--warn)}.qt-tag.t3{background:var(--ink)}
.qt-match.paper span{display:block;padding:4px 0}
.qt-match.paper>div:first-child{text-align:right}
#app .qt-small{min-height:36px;padding:6px 12px;font-size:13px;justify-self:start}
.qt-order{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.qt-order li{display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px solid var(--line);border-radius:12px;background:var(--canvas)}
.qt-pos{flex:none;width:24px;text-align:center;font-weight:700;color:var(--muted)}
.qt-txt{flex:1;min-width:0}
#app .qt-mini{min-height:40px;min-width:40px;padding:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:none}
#app .qt-mini:disabled{opacity:.35}
.qt-mono,.qt-code,textarea.qt-mono{font-family:'Space Mono',ui-monospace,monospace;font-size:13px}
.qt-code{white-space:pre;overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:8px 0;max-width:100%}
.qt-code ins,.qt-shown-part ins{background:var(--frost);color:var(--ink);text-decoration:none;border-bottom:2px solid var(--teal)}
.qt-shown-part del{color:var(--bad)}
.qt-diagram,.qt-fbd{display:block;width:100%;max-width:340px;height:auto;margin:4px 0}
.qt-fbd .arr{stroke:var(--teal);stroke-width:4}.qt-fbd .head{fill:var(--teal)}.qt-fbd .ball{fill:var(--frost);stroke:var(--ink);stroke-width:2}
.qt-fbd text{fill:var(--ink);font-size:12px}.qt-fbd .hint{fill:var(--muted)}
.qt-bank{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.qt-bank span{border:1px dashed var(--line-strong);border-radius:8px;padding:2px 8px;font-size:13px}
.qt-labels{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.qt-labels label{display:flex;align-items:center;gap:8px}
.qt-num{flex:none;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--ink);color:var(--canvas);font-size:12px;font-weight:700}
.qt-table{max-width:100%;overflow-x:auto}
.qt-table table{border-collapse:collapse;min-width:220px;margin:4px 0}
.qt-table th,.qt-table td{border:1px solid var(--line);padding:6px 10px;text-align:left;font-size:14px}
.qt-table thead th{background:var(--surface)}
.qt-table caption{text-align:left;font-size:12px;color:var(--muted);padding-bottom:4px}
.qt-table td input,.qt-table td select{min-height:38px;width:100%;min-width:64px}
.qt-blank{min-width:80px}
.qt-eq{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:18px}
.qt-step{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:12px;padding:2px}
#app .qt-step button{min-height:36px;min-width:36px;padding:0;background:var(--surface);color:var(--ink);border:0;border-radius:9px;box-shadow:none}
.qt-step output{min-width:20px;text-align:center;font-weight:700}
.qt-atoms{display:grid;grid-template-columns:repeat(3,auto);justify-content:start;gap:2px 16px;font-size:13px}
.qt-atoms span:nth-child(-n+3){font-weight:700;color:var(--muted)}
.qt-source{border-left:4px solid var(--teal);background:var(--surface);border-radius:0 12px 12px 0;padding:12px 16px;margin:8px 0}
.qt-source dl{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;margin:0 0 8px;font-size:13px}
.qt-source dt{color:var(--muted)}.qt-source dd{margin:0}
.qt-source p{font-style:italic;margin:0}
.qt-shown-part{margin:6px 0}
.qt-lab{display:block;font-size:12px;color:var(--muted);font-weight:600}
.qt-plain{margin:4px 0;padding-left:20px}
.qt-checks{list-style:none;padding:0;margin:8px 0 0;font-size:13px;display:grid;gap:2px}
.qt-checks .bad{color:var(--bad)}.qt-checks .note{color:var(--muted)}
.qt-ticks{display:grid;gap:4px;margin:4px 0 8px}
.qt-ticks i{display:inline-block;width:14px;height:14px;border:1.5px solid var(--ink);border-radius:3px;margin-right:8px;vertical-align:-2px}
.qt-line{display:block;border-bottom:1px solid var(--line-strong);height:28px}
.qt-box{display:inline-block;min-width:120px;height:28px;border:1.5px solid var(--ink);border-radius:6px}
.qt-box.small{min-width:64px}.qt-box.tiny{min-width:32px;width:32px}
.qt-paper{margin-top:6px}
@media (max-width:560px){.qt-match{gap:8px}#app .qt-item{padding:8px 10px;font-size:14px}.qt-eq{font-size:16px}}
.today-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
#app .today-acts button{min-height:36px;padding:4px 12px;font-size:13px}
.today-lessons .todo-row .today-acts{margin-top:0}
/* Very narrow phones: one Today card per row so labels like "Lessons today" never break mid-word. */
.today-card,.today-card *{word-break:normal;overflow-wrap:normal}
#app button.tiny{min-width:40px;min-height:40px}
@media (max-width:360px){.page .today-cards{grid-template-columns:1fr}.today-title{flex-wrap:wrap}[data-hub-tab]{white-space:normal}}

/* Where a worksheet question came from (home library, Gemini) */
.source-line{color:var(--muted);margin-top:2px}
.sources-line{color:var(--muted);margin:4px 0 8px}

/* Study Library: answer badge on question rows */
.study-result .study-tag{display:inline-block;margin-left:8px;padding:2px 8px;border-radius:999px;background:var(--frost);color:var(--ink);font-size:12px;font-weight:500;vertical-align:middle}

/* Sign-in, create account, verify and reset: one step per screen. */
#signin-card{overflow:hidden}
#signin-card input::placeholder{color:var(--faint);opacity:.5}
#signin-card h2:focus{outline:none}
#signin-card form button{width:100%}
#signin-card form button.sf-link,#signin-card button.sf-link{margin:0;width:auto;min-height:44px;padding:0;background:none;border:0;box-shadow:none;color:var(--teal);text-decoration:underline;text-align:left}
#signin-card button.sf-link:hover{background:none;transform:none}
#signin-card button.sf-link::after{content:none}
#signin-card button:disabled,#signin-card input:disabled{opacity:.5;cursor:not-allowed}
.sf-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:16px}
.sf-dots{display:flex;gap:6px}.sf-dots span{width:22px;height:6px;border-radius:9px;background:var(--frost)}.sf-dots span.on{background:var(--teal)}
.sf-links{display:flex;justify-content:space-between;flex-wrap:wrap;gap:0 16px;margin-top:8px}
.sf-warning{border:2px solid var(--brick);border-radius:16px;padding:12px 16px;margin:0 0 16px}
.sf-slide{animation:sf-in .35s cubic-bezier(.2,.8,.2,1)}.sf-slide.back{animation-name:sf-back}
@keyframes sf-in{from{transform:translateX(32px);opacity:0}to{transform:none;opacity:1}}
@keyframes sf-back{from{transform:translateX(-32px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.sf-slide{animation:none}}

/* Lesson studio, Materials tab */
.materials-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
#app .materials-grid button.material-card{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;white-space:normal;gap:8px;text-align:left;margin:0;padding:20px;height:100%;border-radius:var(--radius-card);background:var(--surface);color:var(--ink)}
.materials-grid button.material-card strong{font-size:17px}
.materials-grid .material-card span{white-space:normal;line-height:1.5}
.materials-grid button.material-card::after{content:none}

/* Progress charts and the parent report */
:root{--viz-series:#2727e6;--viz-good:#0ca30c;--viz-warn:#fab219;--viz-crit:#d03b3b}
@media screen{:root[data-theme=dark]{--viz-series:#7b7bf0}}
@media screen and (prefers-color-scheme:dark){:root:not([data-theme=light]){--viz-series:#7b7bf0}}
.progress-range{margin:0 0 16px}
.progress-panel{margin:0 0 32px}
.viz-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(400px,100%),1fr));gap:16px;align-items:start}
.viz-grid .card{margin:0;min-width:0;padding:20px}
.viz-wide{grid-column:1/-1}
.chart{display:block;width:100%;max-width:420px;height:auto;overflow:visible}
.chart text{font-size:12px;fill:var(--ink)}
.chart .chart-axis,.chart .chart-note{fill:var(--muted)}
.chart .chart-value{font-weight:700}
.chart .chart-note{font-weight:400}
.chart-grid{stroke:var(--line-strong);stroke-opacity:.35;stroke-width:1}
.chart-line{fill:none;stroke:var(--viz-series);stroke-width:2}
.chart-dot{fill:var(--viz-series);stroke:var(--surface);stroke-width:2}
.chart-fill{fill:var(--viz-series)}
.chart-track{fill:var(--line);opacity:.5}
.chart-good{fill:var(--viz-good);background:var(--viz-good)}
.chart-warn{fill:var(--viz-warn);background:var(--viz-warn)}
.chart-crit{fill:var(--viz-crit);background:var(--viz-crit)}
.viz-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin:8px 0 0;font-size:13px}
.viz-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.viz-table{width:100%;border-collapse:collapse;font-size:14px}
.viz-table th,.viz-table td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--line)}
.viz-none{margin:0}
#chart-tip{position:fixed;z-index:60;max-width:240px;padding:6px 10px;border-radius:8px;background:var(--ink);color:var(--surface);font-size:13px;pointer-events:none}
#chart-tip[hidden]{display:none}
.report-parts{display:flex;flex-wrap:wrap;gap:4px 20px;border:0;padding:0;margin:0 0 16px}
.report-parts legend{font-weight:700;margin-bottom:4px}
.report-parts .check{display:flex;align-items:center;gap:6px;margin:0}
.report-paper{border:1px solid var(--line-strong);border-radius:12px;padding:20px;margin:16px 0;background:var(--surface);overflow-wrap:anywhere}
.report-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding-bottom:8px;border-bottom:2px solid var(--line)}
.report-paper h4{margin:16px 0 6px;font-size:15px}
.report-paper ul{margin:0;padding-left:20px}
.report-paper .chart{max-width:400px}
.report-comment p{white-space:pre-wrap}
.after-lesson{margin:16px 0;padding:16px;border:1px solid var(--line);border-radius:12px}
.after-lesson h3{margin-top:0}
.after-lesson fieldset{border:0;padding:0;margin:0 0 12px}
.after-chips{display:flex;flex-wrap:wrap;gap:8px;margin:-4px 0 12px}
.feel{margin:16px 0}
.feel .button-group{justify-content:center;flex-wrap:wrap}
#print-root{display:none}
@media print{
 body.print-report,html:has(body.print-report){background:#fff!important}
 body.print-report>*:not(#print-root){display:none!important}
 body.print-report #print-root{display:block}
 body.print-report #print-root .report-paper{border:0;padding:0;margin:0;box-shadow:none;background:#fff}
 #print-root .chart{max-width:420px;break-inside:avoid}
 #print-root *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
/* --bad is a red meant for text; --rose is a background tint and was unreadable as text. */
:root{--bad:#b3261e;--making-1:#0c00bf;--making-2:#2727e6;--making-3:#5b7cff;--making-4:#a9c1ff}
@media screen and (prefers-color-scheme:dark){:root:not([data-theme=light]){--bad:#ffb4ab;--making-1:#3b3bf0;--making-2:#6a6aff;--making-3:#a3a3ff;--making-4:#d3dcff}}
@media screen{:root[data-theme=dark]{--bad:#ffb4ab;--making-1:#3b3bf0;--making-2:#6a6aff;--making-3:#a3a3ff;--making-4:#d3dcff}}
.starter .starter-changed{color:var(--teal);font-weight:700}
.qm-limit{border:1.5px solid var(--warn);border-radius:14px;padding:10px 14px;margin:10px 0 0;font-size:13px}
.qm-preview{position:relative}
.qm-preview.busy .paper{opacity:.45}
.qm-updating{position:absolute;z-index:3;left:50%;top:40px;transform:translateX(-50%);white-space:nowrap;overflow:hidden;margin:0;padding:6px 16px;border-radius:999px;border:1px solid var(--line-strong);background:var(--surface);font-size:13px;font-weight:600}
.qm-updating::after{content:'';position:absolute;left:0;bottom:0;height:3px;width:60%;background:linear-gradient(90deg,var(--making-1),var(--making-2),var(--making-3),var(--making-4))}
.making-scrim{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:24px;background:rgba(10,10,24,.55)}
.making-wrap{position:relative;width:min(400px,100%)}
.making-halo{position:absolute;inset:-14px;border-radius:36px;filter:blur(22px);opacity:.6;background:linear-gradient(120deg,var(--making-1),var(--making-2),var(--making-3))}
.making-halo.two{background:linear-gradient(300deg,var(--making-4),var(--making-1),var(--making-2))}
.making-card{position:relative;z-index:1;border-radius:24px;background:var(--surface);color:var(--ink);padding:32px 24px;text-align:center}
.making-card h2{margin:18px 0 6px;font-size:22px}
.making-card p{margin:4px auto;font-size:14px;color:var(--muted)}
.making-sheet{display:grid;gap:11px;align-content:start;width:104px;height:128px;margin:0 auto;padding:16px 14px;border:2px solid var(--line-strong);border-radius:12px;overflow:hidden}
.making-sheet i{height:8px;border-radius:4px;transform-origin:left;background:linear-gradient(90deg,var(--making-1),var(--making-2),var(--making-3),var(--making-4))}
/* These keep moving even when the device has animation effects off (the app stops all other animation then):
   a frozen picture would look like the sheet had stopped being made. */
.making-halo{animation:ll-making-pulse 1.8s ease-in-out infinite!important}
.making-halo.two{animation:ll-making-pulse 1.8s ease-in-out -.9s infinite!important}
.making-sheet i{animation:ll-making-write 2.2s ease-in-out infinite!important}
.making-sheet i:nth-child(2){animation-delay:.18s!important}
.making-sheet i:nth-child(3){animation-delay:.36s!important}
.making-sheet i:nth-child(4){animation-delay:.54s!important}
.making-sheet i:nth-child(5){animation-delay:.72s!important}
.qm-updating::after{animation:ll-making-slide 1s ease-in-out infinite!important}
@keyframes ll-making-pulse{0%,100%{opacity:.25;transform:scale(.97)}50%{opacity:.9;transform:scale(1.03)}}
@keyframes ll-making-write{0%{transform:scaleX(0);opacity:1}45%,80%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:0}}
@keyframes ll-making-slide{from{transform:translateX(-100%)}to{transform:translateX(170%)}}
.exam-add{display:flex;gap:16px;flex-wrap:wrap;align-items:end;margin-bottom:12px}
.exam-add label{margin:0;min-width:min(260px,100%)}
.exam-row{display:grid;grid-template-columns:36px minmax(160px,2fr) minmax(130px,1fr) 84px 84px auto;gap:8px 12px;align-items:end;padding:12px 0;border-top:1px solid var(--line)}
.exam-row>strong{align-self:center}
.exam-row label{margin:0;min-width:0}
.exam-row input,.exam-row select{width:100%;margin-top:4px}
.exam-row.sheet{grid-template-columns:36px minmax(0,1fr) auto;align-items:center}
.exam-row.sheet small{display:block;color:var(--muted)}
.exam-why{grid-column:2/-1;display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.exam-why[hidden]{display:none}
.exam-why .filter-chip{min-height:34px;margin:0;padding:4px 12px;font-size:12px}
.exam-editor .button-group{margin-top:16px}
.exam-score{font-size:28px;margin-right:8px;font-variant-numeric:tabular-nums}
.exam-next{border-top:1px solid var(--line);padding:8px 0 12px}
@media(max-width:760px){
 .exam-row{grid-template-columns:36px 1fr 1fr}
 .exam-row label:nth-of-type(1),.exam-row label:nth-of-type(2){grid-column:2/-1}
 .exam-row label:nth-of-type(3){grid-column:2}
 .exam-row label:nth-of-type(4){grid-column:3}
 .exam-why{grid-column:1/-1}
}
/* Fresh retries: practice under a returned question; the tutor's one-line count */
.retry-box{margin:10px 0 4px;padding:12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);animation:retry-in .35s ease}
.retry-box p{margin:0 0 8px}
.retry-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.retry-row input{flex:1 1 140px;min-width:0;margin:0}
.retry-row button,.retry-box>button{margin:0}
.retry-right,.retry-wrong{font-weight:600}
.retry-wrong{color:var(--bad)}
.practice-line{margin:4px 0 0}
@keyframes retry-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
