:root{--ink:#173831;--deep:#075b49;--muted:#495e59;--line:#d9e5df;--paper:white;--rail:200px;background:#f7fbfa}
body{background:linear-gradient(125deg,#edfbf6,white 50%,#fff9ef);color:var(--ink)}
header{background:white}
.brand img{display:block;width:166px;height:auto;border-radius:12px}
nav a.active{background:#c7f7df;color:#064d38}
main{min-width:0}
.hero{background:linear-gradient(115deg,#baf6cf,#a2f1e2 65%,#b6edf5);border:1px solid #99ddca}
.heroCopy>span{background:#ffffffb8}
.course-picker{background:#fff;border:1px solid var(--line);box-shadow:inset 0 5px #ffce61}
.mode{border-radius:18px}
.mode strong{font-size:1.1rem}
.topline span,#classes h1,#admin h1,#sets h1{font-size:clamp(2rem,3.5vw,3rem);font-weight:740}
#classroom{max-width:none}
.settings-box{margin:12px 0;border:1px solid var(--line);background:white;border-radius:16px;padding:12px 16px}
summary{cursor:pointer;font-weight:650}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,.85fr);gap:14px;align-items:start}
.overview,.dashboard-grid>.pupil{margin:0;padding:18px;border:1px solid var(--line);background:white;border-radius:18px;min-width:0}
.dashboard-grid>.pupil{background:#f0fcf6;border-top:4px solid #66cbaa}
.overview h3,.dashboard-grid h3{margin:0;font-size:1.18rem;letter-spacing:-.03em}
.overview p{font-size:.9rem;color:var(--muted)}
.table-scroll{overflow-x:auto}
.overview table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;text-align:left}
.overview td,.overview th{padding:12px 8px;border-bottom:1px solid var(--line);font-size:.92rem}
.overview thead th{background:#f1f8f5;line-height:1.2}
.overview td b{white-space:nowrap;font-weight:650}
.overview th button{color:var(--deep);background:transparent;border:0;text-align:left;padding:4px;min-height:32px;text-decoration:underline;text-underline-offset:3px}
.overview tr:has([aria-current=true]){background:#e8faf0}
.overview progress,.goal progress{display:block;appearance:none;width:100%;min-width:46px;height:7px;margin-top:6px;border:0;border-radius:10px;overflow:hidden;background:#e1e9e5;accent-color:#108860}
progress::-webkit-progress-bar{background:#e1e9e5;border-radius:10px}
progress::-webkit-progress-value{background:#108860;border-radius:10px}
progress::-moz-progress-bar{background:#108860;border-radius:10px}
#speakingPanel{background:#fff6ee;border-top:4px solid #ff9782}
@media(min-width:901px){
 body{padding-left:var(--rail)}
 header{position:fixed;inset:0 auto 0 0;width:var(--rail);height:100vh;display:flex;flex-direction:column;align-items:stretch;padding:26px 13px 16px;gap:28px;border-right:1px solid var(--line);z-index:3}
 header nav{display:grid;height:auto;gap:7px}
 nav a{min-height:43px;padding:10px 15px}
 nav a::before{content:"";width:8px;height:8px;border-radius:3px;background:#a8cfbd}
 nav a{display:flex;align-items:center;gap:12px}
 nav a.active::before{background:#118459}
 header>button{margin:auto 0 0;white-space:normal}
 main{padding-inline:clamp(20px,3vw,46px);max-width:1490px}
}
@media(max-width:1100px){.dashboard-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){header{display:flex;flex-wrap:wrap;gap:10px;padding:10px 16px;height:auto}.brand img{width:132px}header nav{height:auto}}
@media(max-width:620px){.overview,.dashboard-grid>.pupil{padding:12px}.heroCopy{padding-bottom:85px}}

#classroom button,#speechEditor button,#goalEditor button{
  background:#ceefdf;color:#104e39;border:1px solid #79af98;
  border-radius:10px;font-weight:650;padding:8px 13px;min-height:40px
}
#classroom button.dark,#classroom button[type=submit],#classroom form button:not([type]),
#classroom [data-speech=set],#speechEditor .dark,#goalEditor .dark{background:#09604a;color:white;border-color:#064935}
#classroom .danger-action,#classroom [data-course=delete],#classroom [data-remove-staff]{background:#ffe2d8;color:#802b20;border-color:#cd8276}
#classroom summary{background:#f4edcd;color:#493e15;padding:8px 12px;border-radius:8px}
#classroom button:hover,#speechEditor button:hover,#goalEditor button:hover{filter:brightness(.93)}
:is(#classroom,#goalEditor,#speechEditor) :focus-visible{outline:3px solid #235eaf;outline-offset:3px}
#classroom .progress-heading{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
#classroom #showGoals{color:#08533d;text-decoration:underline;text-underline-offset:3px}
#classroom #topicForm{display:grid;justify-items:start;align-items:start}
#topicForm fieldset{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;min-width:0}
#topicForm [data-topic-level]:not([hidden]){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:6px}
#topicForm [data-topic-level] label{display:flex;align-items:center;gap:8px;padding:6px;cursor:pointer}
#topicForm input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:#09604a;flex:none}
.feedback-panel{background:#edf9f3;border-radius:12px;padding:14px;margin:12px 0}
.feedback-panel h4{margin:0 0 8px}.feedback-panel button{margin:8px 0}.feedback-panel article+article{border-top:1px solid var(--line);padding-top:8px}

#goalEditor {
  box-sizing: border-box;
  width: min(29rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(16px, 4vw, 28px);
}
#goalEditor h2 { margin: 0; }
#goalEditor h2 + p { margin: 4px 0 18px; color: var(--muted); }
#goalsForm > p:first-child { margin: 0 0 12px; }
#goalEditor .targetgrid {
  display: block;
  margin: 0;
  border-top: 1px solid var(--line);
}
#goalEditor .targetgrid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5rem;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
#goalEditor .targetgrid input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
#goalEditor .dialogactions { justify-content: flex-end; margin-top: 18px; }
#goalsForm [role="alert"]:empty { display: none; }

.brand{display:flex;align-items:center;gap:9px;color:#123c2e;text-decoration:none}
.brand img{width:42px;height:42px;object-fit:contain}
.brand span{font-size:1.65rem;line-height:1;font-weight:850;letter-spacing:-.06em}
.brand small{display:block;margin-top:5px;font-size:.65rem;font-weight:650;letter-spacing:0}
.hero{background:linear-gradient(115deg,#e2f3db,#b6e6cd 72%,#b4e1dd)}
.course-picker{box-shadow:inset 0 5px #ad2634}
.course-picker select{max-width:100%}
.vg-accents{display:flex;flex-wrap:wrap;gap:6px}
.vg-accents .vg-btn{padding:6px 9px;min-width:34px}
.brand span{display:block;padding-left:0}
