/* Teacher surfaces retain their theme colors while using a tighter, calmer shape language. */
html[data-theme] .shell{--card-radius:10px;--control-radius:7px;--shadow:0 2px 8px #173e4010}
html[data-theme] .shell .sidebar-tip,html[data-theme] .shell .footer-note,html[data-theme] .shell .eyebrow,html[data-theme] .shell .page-heading p,html[data-theme] .shell .section-head p,html[data-theme] .shell .mode-card p,html[data-theme] .shell .mode-bottom{display:none}
html[data-theme] .shell .main{max-width:1600px;margin-inline:auto}
html[data-theme] .shell .page-heading{margin-bottom:22px}
html[data-theme] .shell .page-heading h1{font-size:clamp(26px,2.25vw,34px);letter-spacing:0;line-height:1.3}
.quick-heading-actions{display:flex;flex-wrap:wrap;gap:8px}
.quick-board-source{margin:0 0 18px;font-size:18px;font-weight:800;overflow-wrap:anywhere}
.quick-seat-select{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0;margin:0;border:0;padding:0}
.quick-seat-select legend{margin-bottom:8px;font-weight:700}
.quick-seat-select label{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:8px;border:1px solid var(--edge);border-radius:var(--control-radius);background:var(--surface);font-weight:750;cursor:pointer}
.quick-seat-select label:has(:checked){border-color:var(--green);background:var(--mint);color:var(--green)}
.quick-seat-select label:has(:focus-visible){outline:2px solid var(--green);outline-offset:2px}
.quick-seat-select input{width:18px;height:18px;min-height:0;margin:0;padding:0;flex:none;accent-color:var(--green)}
.quick-seat-select span{white-space:nowrap}
.quick-board-rules{margin:14px 0 0;color:var(--muted)}
html[data-theme] .shell .hero{min-height:235px;border-radius:10px;border-left:6px solid var(--primary);box-shadow:none}
html[data-theme] .shell .hero-copy{max-width:55%;padding:29px 35px}
html[data-theme] .shell .hero h2{font-size:clamp(24px,2vw,31px)}
html[data-theme] .shell .hero p{display:none}
html[data-theme] .shell .stat,html[data-theme] .shell .mode-card,html[data-theme] .shell .bank-card,html[data-theme] .shell .question-row,html[data-theme] .shell .panel,html[data-theme] .shell .table-wrap,html[data-theme] .shell .analytics-panel,html[data-theme] .shell .analytics-filters{border-radius:10px;box-shadow:0 2px 8px #173e4010}
html[data-theme] .shell .mode-card{min-height:130px;border-left:4px solid var(--primary);padding:19px}
html[data-theme] .shell .mode-card h3{font-size:18px}
html[data-theme] .shell .mode-symbol{margin-bottom:12px}
html[data-theme] .shell .bank-card .bank-cover{height:104px}
html[data-theme] .shell .bank-info p{min-height:0;margin:6px 0 12px;line-height:1.5}
html[data-theme] .shell .question-row{padding:16px 18px}
html[data-theme] .shell .question-content h3{font-size:16px;line-height:1.55}
html[data-theme] .shell .question-content p{font-size:13px}
html[data-theme] .shell .analytics-panel .section-head h2{font-size:18px}
html[data-theme] .shell .analytics-filters{padding:15px}
html[data-theme] .shell .analytics-summary{gap:12px}
html[data-theme] .shell .summary-tile{border-radius:9px}
html[data-theme] dialog:has(#question-form){width:min(1080px,calc(100% - 30px));border-radius:11px}
html[data-theme] #question-form{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:0 24px;align-items:start}
html[data-theme] #question-form>.form-grid,html[data-theme] #question-form>.field,html[data-theme] #question-form>.error{grid-column:1!important;min-width:0}
html[data-theme] #question-form>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html[data-theme] #question-form>.teacher-question-preview{grid-column:2;grid-row:1/span 7;align-self:start;position:sticky;top:0}
html[data-theme] #question-form>.form-actions{grid-column:1/-1}
html[data-theme] #question-form #q-prompt{min-height:84px}
html[data-theme] #question-form #q-options{min-height:93px}
html[data-theme] #question-form .field{margin-bottom:13px}
html[data-theme] #question-form .field small{line-height:1.45}
html[data-theme] .teacher-question-preview{overflow:hidden;border:1.5px solid var(--edge);border-radius:9px;background:var(--surface-soft);min-height:350px}
html[data-theme] .teacher-preview-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 15px;border-bottom:1px solid var(--edge);color:var(--muted);font-size:12px;font-weight:700}
html[data-theme] .teacher-preview-head span:first-child{color:var(--green);font-size:14px}
html[data-theme] .teacher-preview-stage{padding:20px 18px 16px}
html[data-theme] .teacher-preview-stage h3{font-size:clamp(19px,1.4vw,23px);line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 18px;color:var(--ink)}
html[data-theme] .teacher-preview-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html[data-theme] .teacher-preview-choices.as-tokens{grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-theme] .teacher-preview-choice,html[data-theme] .teacher-preview-token{display:flex;align-items:center;gap:8px;min-height:49px;padding:8px 10px;border:1px solid var(--edge);border-radius:7px;background:var(--surface);color:var(--ink);font-size:15px;font-weight:650;line-height:1.35;text-align:left;overflow-wrap:anywhere}
html[data-theme] .teacher-preview-choice>span{display:grid;place-items:center;flex:none;min-width:26px;height:26px;border-radius:5px;background:var(--mint);color:var(--green);font-weight:800;font-size:12px}
html[data-theme] .teacher-preview-choice:hover,html[data-theme] .teacher-preview-token:hover{border-color:var(--primary)}
html[data-theme] .teacher-preview-choice.is-picked,html[data-theme] .teacher-preview-token.is-picked{border-color:var(--primary);background:var(--mint);box-shadow:inset 3px 0 var(--primary)}
html[data-theme] .teacher-preview-fill{font-size:18px;min-height:55px}
html[data-theme] .teacher-preview-sequence{display:flex;gap:6px;flex-wrap:wrap;min-height:37px;margin-top:13px;color:var(--muted);font-size:13px}
html[data-theme] .teacher-preview-sequence span{padding:5px 7px;border-radius:4px;background:var(--mint);color:var(--ink)}
html[data-theme] .teacher-preview-sentence{padding:14px;margin-bottom:14px;background:var(--surface);border:1px solid var(--edge);font-size:18px;line-height:2;white-space:pre-wrap}
html[data-theme] .teacher-preview-slot{display:inline-block;min-height:38px;margin:2px 4px;padding:3px 9px;border:1px dashed var(--green);border-radius:4px;background:var(--mint);color:var(--ink);font-size:16px}
html[data-theme] .teacher-preview-slot.is-filled{border-style:solid;font-weight:700}
html[data-theme] .teacher-preview-match{display:grid;grid-template-columns:1fr 1fr;gap:10px}
html[data-theme] .teacher-preview-match>div{display:grid;gap:8px;align-content:start}
html[data-theme] .teacher-preview-token{width:100%;justify-content:center;text-align:center}
html[data-theme] .teacher-preview-foot{display:flex;align-items:center;gap:12px;padding:0 18px 17px}
html[data-theme] .teacher-preview-reset{background:none;color:var(--green);font-size:13px;font-weight:700}
html[data-theme] .teacher-preview-feedback{margin:0 18px 17px;padding:9px 11px;border-radius:5px;font-size:13px;line-height:1.5}
html[data-theme] .teacher-preview-feedback.correct{background:var(--mint);color:var(--green-dark)}
html[data-theme] .teacher-preview-feedback.wrong{background:var(--peach);color:var(--ink)}
html[data-theme] .teacher-preview-empty{grid-column:1/-1;color:var(--muted);font-size:13px}
html[data-theme] .teacher-preview-stale{margin:0;padding:16px;border-left:3px solid var(--primary);background:var(--peach);color:var(--ink);font-size:15px;font-weight:700;line-height:1.5}
html[data-theme] .teacher-preview-instruction{margin:0 0 9px;color:var(--muted);font-size:13px}
html[data-theme] .teacher-preview-card-tray,html[data-theme] .teacher-preview-category-zones{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:9px}
html[data-theme] .teacher-preview-category-card,html[data-theme] .teacher-preview-category-zone{min-width:0;min-height:56px;padding:9px 10px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;text-align:left}
html[data-theme] .teacher-preview-category-card strong,html[data-theme] .teacher-preview-category-zone strong{font-size:15px;line-height:1.35;overflow-wrap:anywhere}
html[data-theme] .teacher-preview-category-card small,html[data-theme] .teacher-preview-category-zone small{color:var(--muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere}
html[data-theme] .teacher-preview-category-zone{border:1px dashed var(--edge);background:var(--surface-soft);color:var(--ink)}
html[data-theme] .teacher-preview-category-card.is-assigned{border-color:var(--green);background:var(--mint)}
html[data-theme] .teacher-preview-evidence{display:grid;max-height:275px;overflow:auto;border-top:1px solid var(--edge)}
html[data-theme] .teacher-preview-evidence-row{width:100%;min-height:49px;padding:10px 11px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--edge);background:var(--surface);color:var(--ink);font-size:14px;line-height:1.5;text-align:left}
html[data-theme] .teacher-preview-evidence-row b{flex:none;color:var(--muted)}
html[data-theme] .teacher-preview-evidence-row.is-picked{background:var(--mint);color:var(--green-dark);box-shadow:inset 3px 0 var(--green)}
html[data-theme] .teacher-preview-evidence-row.is-picked b{color:var(--green)}
html[data-theme] .teacher-question-preview button:focus-visible{outline:3px solid var(--primary);outline-offset:2px}
/* The formal teacher workspace uses the same landscape and material as the accepted Demo. */
html[data-theme] .shell{grid-template-columns:220px minmax(0,1fr)}
html[data-theme] .shell .sidebar{padding:25px 16px 20px;background:var(--surface-soft)}
html[data-theme="cartoon"] .shell .sidebar{background:#fff9ed}
html[data-theme] .shell .sidebar .brand{padding:0 11px 27px}
html[data-theme] .shell .nav-label{display:none}
html[data-theme] .shell .nav{gap:4px}
html[data-theme] .shell .nav a{min-height:49px;padding:11px 14px;font-size:14px;font-weight:650}
html[data-theme] .shell .nav a.active{box-shadow:inset 3px 0 var(--primary);color:var(--green)}
html[data-theme] .shell .sidebar-bottom .user{padding:15px 7px 0}
html[data-theme] .shell .main{max-width:1500px;padding:0 clamp(22px,3vw,46px) 48px}
html[data-theme] .shell .topbar{height:76px;margin-bottom:26px}
html[data-theme] .shell:has(.nav a[href="#/teacher/dashboard"].active) .page-heading{display:none}
html[data-theme] .shell .hero{display:block;min-height:270px;margin-bottom:25px;overflow:hidden;border:1.5px solid var(--edge);border-left:5px solid var(--primary);border-radius:10px;background-color:var(--surface-soft);background-image:linear-gradient(90deg,var(--surface) 0%,color-mix(in srgb,var(--surface) 95%,transparent) 31%,color-mix(in srgb,var(--surface) 35%,transparent) 55%,transparent 75%),var(--hero);background-size:cover;background-position:center}
html[data-theme] .shell .hero-copy{max-width:53%;padding:38px 42px}
html[data-theme] .shell .hero h2{max-width:530px;font-size:clamp(26px,2.25vw,34px);line-height:1.42;letter-spacing:0}
html[data-theme] .shell .hero .btn{margin-top:22px}
html[data-theme] .shell .hero-art{display:none}
html[data-theme] .shell .stats{gap:14px;margin-bottom:27px}
html[data-theme] .shell .stat{min-height:94px;padding:16px 18px;border-top:3px solid var(--green)}
html[data-theme] .shell .stat:nth-child(2){border-top-color:var(--primary)}
html[data-theme] .shell .stat:nth-child(3){border-top-color:#8b79b3}
html[data-theme] .shell .stat:nth-child(4){border-top-color:#6d9dc4}
html[data-theme] .shell .stat-icon{border-radius:6px}
html[data-theme] .shell .mode-grid{gap:14px;margin-bottom:26px}
html[data-theme] .shell .mode-card{min-height:122px;padding:18px;border-left:4px solid var(--primary);background:var(--surface)}
html[data-theme] .shell .mode-symbol{margin-bottom:10px;border-radius:6px}
html[data-theme] .shell .panel{padding:22px;border-top:3px solid var(--green)}
html[data-theme] .shell .bank-cover{border-bottom:1px solid var(--edge)}
html[data-theme] .shell .bank-info{padding:17px 18px}
html[data-theme] .shell .question-list{gap:9px}
html[data-theme] .shell .question-row{padding:13px 16px;border-left:3px solid var(--edge);gap:13px}
html[data-theme] .shell .question-content h3{font-size:16px;line-height:1.45}
html[data-theme] .shell .question-tags{margin:6px 0 3px;gap:6px}
html[data-theme] .shell .question-tags .tag:nth-child(2){display:none}
html[data-theme] .shell .question-content p{line-height:1.4}
html[data-theme] .shell .analytics-panel{border-top:3px solid var(--green)}
html[data-theme] .shell .analytics-summary .summary-tile{border-top:3px solid var(--primary)}
html[data-theme] .shell .analytics-summary .summary-tile:nth-child(even){border-top-color:var(--green)}
/* Keep editing controls outside the scrolling form so low viewports never hide Save. */
html[data-theme] dialog[open]:has(#question-form){display:flex;flex-direction:column;max-height:calc(100dvh - 24px);height:min(850px,calc(100dvh - 24px));overflow:hidden}
html[data-theme] dialog:has(#question-form) .modal-head{flex:none;padding:16px 24px}
html[data-theme] dialog:has(#question-form) .modal-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 24px 22px}
html[data-theme] dialog:has(#question-form) .teacher-editor-actions{flex:none;display:flex;justify-content:flex-end;gap:10px;margin:0;padding:13px 24px calc(13px + env(safe-area-inset-bottom));border-top:1px solid var(--edge);background:var(--surface);box-shadow:0 -7px 18px #173e4010}
html[data-theme] dialog:has(#question-form) .teacher-editor-actions .btn{min-width:110px}
@media(max-width:860px){html[data-theme] #question-form{grid-template-columns:1fr}html[data-theme] #question-form>.form-grid,html[data-theme] #question-form>.field,html[data-theme] #question-form>.error,html[data-theme] #question-form>.teacher-question-preview,html[data-theme] #question-form>.form-actions{grid-column:1}html[data-theme] #question-form>.teacher-question-preview{grid-row:auto;position:static;margin:3px 0 18px}html[data-theme] .shell .hero-copy{max-width:68%}}
@media(max-width:600px){html[data-theme] .shell{display:block}html[data-theme] .shell .sidebar{position:relative;height:auto;padding:14px 17px;flex-direction:row;align-items:center}html[data-theme] .shell .sidebar .brand{padding:0}html[data-theme] .shell .nav{flex-direction:row;margin-left:auto}html[data-theme] .shell .nav a{padding:9px;min-height:42px}html[data-theme] .shell .main{padding:0 17px 28px}html[data-theme] .shell .hero{min-height:235px;background-position:63% center}html[data-theme] .shell .hero-copy{max-width:100%;padding:22px;background:linear-gradient(90deg,color-mix(in srgb,var(--surface) 92%,transparent),color-mix(in srgb,var(--surface) 65%,transparent));min-height:235px}html[data-theme] .shell .hero h2{font-size:24px;max-width:280px}html[data-theme] .shell .stats{gap:9px}html[data-theme] .shell .stat{min-height:82px;padding:12px}html[data-theme] .shell .question-row{padding:12px;gap:9px}html[data-theme] dialog:has(#question-form) .modal-head{padding:13px 16px}html[data-theme] dialog:has(#question-form) .modal-body{padding:14px 16px}html[data-theme] dialog:has(#question-form) .teacher-editor-actions{padding:11px 16px calc(11px + env(safe-area-inset-bottom))}html[data-theme] #question-form>.form-grid{grid-template-columns:1fr}html[data-theme] .teacher-preview-choices.as-tokens{grid-template-columns:repeat(2,minmax(0,1fr))}}

html[data-theme] .shell .main:has(.classroom-records){margin-block:0}
