:root{
  --bg:#f6f8fb;
  --panel:#ffffff;
  --panel-soft:#f9fafb;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
  --primary:#493C96;          /* ELA brand purple, sampled from the logo */
  --primary-ink:#ffffff;
  --primary-soft:#eeecfa;
  --brand-gold:#E5AA25;
  --success:#16a34a;
  --warning:#d97706;
  --danger:#dc2626;
  --sidebar:#111827;
  --sidebar-soft:#1f2937;
  --sidebar-text:#d1d5db;
  --shadow:0 14px 34px rgba(17,24,39,.08);
  --radius:18px;
}
[data-theme="dark"]{
  --bg:#0f141c;
  --panel:#161d28;
  --panel-soft:#1c2533;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:#263142;
  --primary-soft:#241f45;
  --sidebar:#0b1017;
  --sidebar-soft:#1b2433;
  --shadow:0 14px 34px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--primary)}
.app{display:grid;grid-template-columns:248px 1fr;min-height:100vh}

/* ---------- sidebar ---------- */
.sidebar{background:var(--sidebar);color:#fff;padding:22px 16px;position:sticky;top:0;height:100vh;overflow:auto;z-index:40}
.brand{display:block;padding:2px 6px 18px;cursor:pointer}
.brand-logo{background:#fff;border-radius:14px;padding:10px;display:grid;place-items:center;box-shadow:0 8px 20px rgba(0,0,0,.22)}
.brand-logo img{display:block;width:60%;max-width:52px;height:auto}
/* NOTE: dashboard.css loads after this and overrides the rule above with
   height:58px - that is the one that decides the sidebar logo size. */
.brand-caption{margin-top:10px;text-align:center;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#9ca3af;line-height:1.7}
.nav-title{font-size:11px;color:#6b7280;text-transform:uppercase;letter-spacing:.12em;padding:18px 12px 8px}
.nav a{display:flex;align-items:center;gap:12px;color:var(--sidebar-text);text-decoration:none;padding:11px 13px;border-radius:12px;margin:3px 0;font-size:14px;cursor:pointer;user-select:none}
.nav a:hover{background:var(--sidebar-soft);color:#fff}
.nav a.active{background:var(--primary);color:#fff}
.nav a .ico{width:18px;text-align:center;flex:0 0 auto}
.nav a .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav a .count{margin-left:auto;font-size:11px;background:rgba(255,255,255,.14);padding:2px 7px;border-radius:999px}
.dot{width:9px;height:9px;border-radius:50%;background:#6d7cff;flex:0 0 auto}
.sidebar-foot{margin-top:22px;padding:14px 12px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:#6b7280}

/* ---------- topbar ---------- */
.main{min-width:0;display:flex;flex-direction:column}
.topbar{height:72px;background:var(--panel);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 24px;position:sticky;top:0;z-index:30}
.burger{display:none;width:38px;height:38px;border:1px solid var(--border);border-radius:11px;background:var(--panel);cursor:pointer}
.search{position:relative;flex:1;max-width:460px}
.search-box{display:flex;align-items:center;gap:10px;background:var(--panel-soft);border:1px solid var(--border);padding:9px 14px;border-radius:12px;color:var(--muted)}
.search-box input{border:0;background:transparent;outline:0;width:100%}
.search-box kbd{border:1px solid var(--border);border-radius:6px;padding:1px 6px;font-size:11px;color:var(--muted);background:var(--panel)}
.results{position:absolute;top:52px;left:0;right:0;background:var(--panel);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);max-height:420px;overflow:auto;display:none;z-index:50}
.results.open{display:block}
.results .group{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);padding:12px 14px 6px}
.results .row{display:flex;align-items:center;gap:12px;padding:10px 14px;cursor:pointer}
.results .row:hover{background:var(--primary-soft)}
.results .row small{color:var(--muted);display:block;margin-top:2px}
.results .empty{padding:18px 14px;color:var(--muted);font-size:13px}
.top-actions{display:flex;align-items:center;gap:12px}
.icon-btn{position:relative;width:38px;height:38px;border:1px solid var(--border);border-radius:11px;background:var(--panel);cursor:pointer;display:grid;place-items:center}
.icon-btn:hover{background:var(--panel-soft)}
.icon-btn .pip{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;border-radius:999px;background:var(--danger);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center;padding:0 4px}
.who{text-align:right;line-height:1.25}
.who b{font-size:13px;display:block}
.who span{font-size:11px;color:var(--muted)}
.avatar{width:40px;height:40px;border-radius:50%;background:#e6e2f7;color:#3f3382;font-weight:700;display:grid;place-items:center;cursor:pointer;flex:0 0 auto}
.avatar.sm{width:34px;height:34px;font-size:12px}
.avatar,.gc-avatar,.big-avatar{overflow:hidden}
.avatar>img,.gc-avatar>img,.big-avatar>img{width:100%;height:100%;object-fit:cover;display:block}
.menu{position:fixed;right:20px;top:66px;background:var(--panel);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);min-width:220px;padding:7px;display:none;z-index:95}
.menu.open{display:block}
.menu button{display:flex;width:100%;gap:10px;align-items:center;background:transparent;border:0;padding:10px 12px;border-radius:10px;cursor:pointer;text-align:left;font-size:14px}
.menu button:hover{background:var(--panel-soft)}
.menu .sep{height:1px;background:var(--border);margin:6px 4px}
.menu .cap{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);padding:8px 12px 4px}

/* ---------- layout bits ---------- */
.content{padding:26px;flex:1}
.hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:22px;flex-wrap:wrap}
.hero h1{margin:0 0 8px;font-size:29px;letter-spacing:-.02em}
.hero p{margin:0;color:var(--muted)}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.primary-btn,.secondary-btn,.ghost-btn,.danger-btn{border:0;border-radius:12px;padding:11px 16px;font-weight:700;cursor:pointer;white-space:nowrap}
.primary-btn{background:var(--primary);color:var(--primary-ink)}
.primary-btn:hover{filter:brightness(1.08)}
.secondary-btn{background:var(--panel);border:1px solid var(--border);color:var(--text)}
.secondary-btn:hover{background:var(--panel-soft)}
.ghost-btn{background:var(--primary-soft);color:var(--primary)}
.danger-btn{background:#fef2f2;color:var(--danger)}
[data-theme="dark"] .danger-btn{background:#3a1d1d;color:#fca5a5}
.btn-sm{padding:7px 11px;font-size:13px;border-radius:10px}
button[disabled]{opacity:.5;cursor:not-allowed}
.grid{display:grid;gap:18px}
.grid.cols-4{grid-template-columns:repeat(4,1fr)}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.grid.cols-2{grid-template-columns:repeat(2,1fr)}
.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.stat{padding:20px}
.stat .label{font-size:13px;color:var(--muted);margin-bottom:10px}
.stat .value{font-size:28px;font-weight:800}
.stat .hint{font-size:12px;color:var(--success);margin-top:7px}
.section{padding:22px}
.section h3{margin:0 0 16px;font-size:17px}
.split{display:grid;grid-template-columns:2fr 1fr;gap:18px;align-items:start}
.list{display:flex;flex-direction:column}
.item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--border)}
.item:last-child{border-bottom:0}
.item-title{font-weight:600}
.item-sub{font-size:12px;color:var(--muted);margin-top:4px}
.badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700;background:#eef2ff;color:#3949ab;white-space:nowrap}
.badge.green{background:#ecfdf5;color:#15803d}
.badge.orange{background:#fff7ed;color:#c2410c}
.badge.red{background:#fef2f2;color:#b91c1c}
.badge.grey{background:var(--panel-soft);color:var(--muted)}
[data-theme="dark"] .badge{background:#1e2740;color:#a5b4fc}
[data-theme="dark"] .badge.green{background:#14301f;color:#86efac}
[data-theme="dark"] .badge.orange{background:#3a2412;color:#fdba74}
[data-theme="dark"] .badge.red{background:#3a1717;color:#fca5a5}
.muted{color:var(--muted)}
.spacer{height:16px}
.empty-state{padding:40px 20px;text-align:center;color:var(--muted)}
.empty-state .big{font-size:34px;margin-bottom:10px}
table{width:100%;border-collapse:collapse}
th,td{padding:13px 12px;text-align:left;border-bottom:1px solid var(--border);font-size:13px;vertical-align:middle}
th{color:var(--muted);font-weight:700;background:var(--panel-soft)}
tr:last-child td{border-bottom:0}
.table-wrap{overflow:auto;border-radius:14px;border:1px solid var(--border)}
.progress-bar{height:9px;background:var(--panel-soft);border:1px solid var(--border);border-radius:999px;overflow:hidden}
.progress-bar span{display:block;height:100%;background:var(--primary);border-radius:999px;transition:width .4s ease}
input[type=text],input[type=date],input[type=number],input[type=email],input[type=time],select,textarea{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:11px;background:var(--panel);outline:0}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}
label.field{display:block;margin-bottom:14px}
label.field .lb{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;border:1px solid var(--border);background:var(--panel);cursor:pointer;font-size:13px;font-weight:600}
.chip.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
.toolbar .grow{flex:1;min-width:180px}
.swatches{display:flex;gap:8px;flex-wrap:wrap}
.swatch{width:34px;height:34px;border-radius:10px;border:2px solid transparent;cursor:pointer}
.swatch.active{border-color:var(--text)}
.th-pat{position:relative;height:66px;border-radius:8px;overflow:hidden;cursor:pointer;border:3px solid transparent}
.th-pat.active{border-color:var(--text)}
.th-pat span{position:absolute;left:8px;bottom:6px;color:#fff;font-size:12px;font-weight:600;z-index:2}

/* ---------- login ---------- */
.login{display:none;min-height:100vh;grid-template-columns:1.05fr .95fr}
.login.show{display:grid}
.login-brand{position:relative;background:linear-gradient(135deg,#372c78 0%,#493C96 55%,#6a5bc4 100%);color:#fff;padding:54px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}
.login-brand>*{position:relative;z-index:2}
.login-brand-top{display:flex;align-items:center;gap:16px}
.login-logo{background:#fff;border-radius:16px;padding:12px;display:grid;place-items:center;flex:0 0 auto;box-shadow:0 12px 30px rgba(0,0,0,.22)}
.login-logo img{display:block;width:62px;height:auto}   /* <- login logo size */
.login-brand-copy strong{display:block;font-size:17px}
.login-brand-copy span{font-size:12px;opacity:.85}
.login-hero{max-width:470px}
.login-hero h1{font-size:40px;margin:0 0 14px;line-height:1.15;letter-spacing:-.02em}
.login-hero p{font-size:16px;opacity:.92;line-height:1.6;margin:0}
.login-points{list-style:none;padding:0;margin:28px 0 0;display:grid;gap:12px}
.login-points li{display:flex;gap:10px;align-items:center;font-size:14px;opacity:.95}
.login-foot{font-size:12px;opacity:.75}
.login-panel{display:grid;place-items:center;padding:40px 28px;background:var(--bg)}
.login-card{width:min(420px,100%)}
.login-card h2{margin:0 0 6px;font-size:26px}
.login-card .sub{color:var(--muted);margin:0 0 24px;font-size:14px}
.login-error{display:none;background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;border-radius:11px;padding:11px 14px;font-size:13px;margin-bottom:16px}
.login-error.show{display:block}
[data-theme="dark"] .login-error{background:#3a1717;color:#fca5a5;border-color:#7f1d1d}
[data-theme="dark"] .login-panel{background:var(--bg)}
.pw-wrap{position:relative}
.pw-wrap input{padding-right:62px}
.pw-wrap button{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;cursor:pointer;color:var(--muted);font-size:12px;font-weight:700}
.login-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:2px 0 18px;font-size:13px;color:var(--muted)}
.login-row label{display:flex;align-items:center;gap:8px;cursor:pointer}
.login-row input[type=checkbox]{width:auto}
.demo-box{margin-top:26px;border-top:1px solid var(--border);padding-top:18px}
.demo-box .lb2{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin-bottom:10px}
.demo-chips{display:grid;gap:8px}
.demo-chip{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--border);background:var(--panel);border-radius:12px;padding:10px 13px;cursor:pointer;text-align:left;font-size:13px;width:100%}
.demo-chip:hover{border-color:var(--primary);background:var(--primary-soft)}
.demo-chip b{display:block;font-weight:700}
.demo-chip span{font-size:11px;color:var(--muted)}
.demo-chip .go{color:var(--primary);font-weight:700;white-space:nowrap}
@media(max-width:900px){
  .login{grid-template-columns:1fr}
  .login-brand{padding:26px;min-height:auto}
  .login-hero h1{font-size:27px}
  .login-hero p,.login-points,.login-foot{display:none}
}

/* ---------- announcement ---------- */
/* A solid band of the brand colour. It replaced a 135deg gradient that faded to
   white across the full width and read as a smudge rather than a surface.
   Everything inside is recoloured for a dark surface below - nothing in here may
   keep the light-surface colours the rest of the page uses.
   No bottom border: the colour already separates it from the page. */
.announcement-strip{margin:-26px -26px 26px;padding:16px 26px;background:var(--primary);color:var(--primary-ink);display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:70px}
.announcement-main{display:flex;align-items:center;gap:14px;min-width:0}
/* Translucent white rather than a tint mixed from the accent: on a coloured band
   a wash of white sits correctly whatever the accent happens to be. */
.announcement-icon{width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.18);color:var(--primary-ink);display:grid;place-items:center;font-size:20px;flex:0 0 auto}
/* Held back from full white so the label reads as a caption, not a second headline. */
.announcement-label{font-size:11px;font-weight:800;letter-spacing:.10em;text-transform:uppercase;color:rgba(255,255,255,.82);margin-bottom:4px}
.announcement-text{font-size:14px;color:var(--primary-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.announcement-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
/* The badge and the Edit link would otherwise keep their light-surface colours
   and disappear into the band. */
.announcement-actions .badge{background:rgba(255,255,255,.18);color:var(--primary-ink)}
.announcement-strip .link-btn{color:var(--primary-ink)}
.announcement-strip .link-btn:hover{text-decoration:underline}
.link-btn,.text-action{background:transparent;border:0;color:var(--primary);font-weight:700;cursor:pointer;padding:6px 0}

/* ---------- dashboard ---------- */
.dashboard-section{margin-top:28px}
.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}
.section-heading h2{margin:0;font-size:20px;letter-spacing:-.02em}
.section-heading p{margin:4px 0 0;font-size:13px;color:var(--muted)}
.learning-overview{display:grid;grid-template-columns:1.25fr .75fr;gap:18px;align-items:start}
.due-list,.highlight-list{padding:6px 20px}
.due-row{display:grid;grid-template-columns:44px 1fr auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border);cursor:pointer}
.due-row:last-child{border-bottom:0}
.due-row:hover .due-title{color:var(--primary)}
.due-icon{width:40px;height:40px;border-radius:12px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:18px}
.due-title{font-weight:700;font-size:14px}
.due-sub{margin-top:4px;font-size:12px;color:var(--muted)}
.highlight-row{display:flex;gap:12px;align-items:flex-start;padding:13px 0;border-bottom:1px solid var(--border)}
.highlight-row:last-child{border-bottom:0}
.highlight-mark{width:10px;height:10px;border-radius:50%;margin-top:5px;background:#f59e0b;flex:0 0 auto}
.highlight-mark.green{background:#22c55e}
.highlight-mark.blue{background:#6366f1}
.highlight-title{font-size:14px;font-weight:700}
.highlight-sub{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}

/* ---------- class cards ---------- */
.class-card{overflow:hidden;display:flex;flex-direction:column}
.class-cover{padding:20px;color:#fff;position:relative;min-height:116px;cursor:pointer}
.class-cover h3{margin:0 0 6px;font-size:20px}
.class-cover p{margin:0;opacity:.9;font-size:13px}
.class-teacher{margin-top:6px;font-size:12px;opacity:.88}
.cover-indigo{background:linear-gradient(135deg,#372c78,#6a5bc4)}
.cover-gold{background:linear-gradient(135deg,#b8801a,#E5AA25)}
.cover-green{background:linear-gradient(135deg,#0f766e,#34d399)}
.cover-orange{background:linear-gradient(135deg,#c2410c,#fb923c)}
.cover-purple{background:linear-gradient(135deg,#6d28d9,#c084fc)}
.cover-red{background:linear-gradient(135deg,#b91c1c,#f87171)}
.cover-slate{background:linear-gradient(135deg,#334155,#94a3b8)}
.class-menu{position:absolute;top:12px;right:12px;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-weight:800;border:0;cursor:pointer}
.class-menu:hover{background:rgba(255,255,255,.32)}
.class-body{padding:16px 18px 18px;flex:1;display:flex;flex-direction:column}
.meta{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;color:var(--muted)}
.class-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:14px;margin-top:auto;border-top:1px solid var(--border)}

.lesson-ico{width:36px;height:36px;border-radius:10px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;flex:0 0 auto}
.mini-btn{border:1px solid var(--border);background:var(--panel);border-radius:9px;padding:5px 9px;font-size:12px;font-weight:600;cursor:pointer}
.mini-btn:hover{background:var(--panel-soft)}

/* =========================================================
   Class interior - Google Classroom styling (scoped to .gc)
   Flat surfaces, 8px radius, hairline borders, Roboto,
   theme-coloured section headings and a photo-style banner.
   ========================================================= */
.gc{--gc-border:#dadce0;--gc-text:#3c4043;--gc-muted:#5f6368;--gc-hover:rgba(60,64,67,.04);
  font-family:Roboto,Inter,system-ui,sans-serif;max-width:1060px;margin:0 auto;color:var(--gc-text)}
[data-theme="dark"] .gc{--gc-border:#3c4043;--gc-text:#e8eaed;--gc-muted:#9aa0a6;--gc-hover:rgba(255,255,255,.05)}
.gc-card{background:var(--panel);border:1px solid var(--gc-border);border-radius:8px;padding:16px 24px}
.gc-card.hoverable{cursor:pointer}
.gc-card.hoverable:hover{box-shadow:0 1px 3px rgba(60,64,67,.28)}
.gc-icon{width:32px;height:32px;border-radius:50%;border:0;background:transparent;color:var(--gc-muted);cursor:pointer;font-weight:800;flex:0 0 auto}
.gc-icon:hover{background:var(--gc-hover)}
.gc-link{background:transparent;border:0;color:var(--gc-accent);font-weight:500;font-size:14px;cursor:pointer;font-family:inherit;padding:8px 10px;border-radius:4px}
.gc-link:hover{background:var(--gc-hover)}
.gc-none{color:var(--gc-muted);font-size:14px;margin:10px 0}
.gc-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:14px;font-weight:500;flex:0 0 auto}

/* class topbar (non-stream tabs) + tabs */
.gc-topbar{display:flex;align-items:baseline;gap:12px;padding:4px 2px 14px}
.gc-topbar h1{margin:0;font-size:22px;font-weight:500;font-family:inherit}
.gc-topbar span{font-size:13px;color:var(--gc-muted)}
.gc-tabs{display:flex;align-items:center;gap:2px;border-bottom:1px solid var(--gc-border);margin-bottom:24px;overflow:auto}
.gc-tabs button{background:transparent;border:0;padding:16px 18px;font-size:14px;font-weight:500;color:var(--gc-muted);cursor:pointer;border-bottom:3px solid transparent;white-space:nowrap;font-family:inherit}
.gc-tabs button:hover{color:var(--gc-text)}
.gc-tabs button.active{color:var(--gc-accent);border-bottom-color:var(--gc-accent)}
.gc-tabs .gc-icon{margin-left:auto}

/* banner */
.gc-banner{position:relative;height:240px;border-radius:8px;overflow:hidden;margin-bottom:26px}
.gc-pattern{position:absolute;inset:0;z-index:1}
.gc-banner-copy{position:absolute;left:28px;bottom:22px;color:#fff;z-index:2;max-width:70%}
.gc-banner-copy h1{margin:0 0 6px;font-size:33px;font-weight:500;line-height:1.15;font-family:inherit}
.gc-section{font-size:15px;opacity:.92}
.gc-room{position:absolute;right:28px;bottom:22px;color:#fff;font-size:13px;opacity:.94;z-index:2;text-align:right;line-height:1.6}
.gc-theme-btn{position:absolute;right:20px;top:20px;z-index:3;background:rgba(255,255,255,.92);color:#3c4043;border:0;border-radius:4px;padding:8px 14px;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit}
.gc-theme-btn:hover{background:#fff}
.pat-geo{background-image:linear-gradient(135deg,rgba(255,255,255,.14) 25%,transparent 25%),linear-gradient(225deg,rgba(255,255,255,.10) 25%,transparent 25%);background-size:78px 78px}
.pat-bubbles{background-image:radial-gradient(circle at 16% 76%,rgba(255,255,255,.16) 0 58px,transparent 59px),radial-gradient(circle at 66% 22%,rgba(255,255,255,.12) 0 88px,transparent 89px),radial-gradient(circle at 92% 78%,rgba(255,255,255,.14) 0 46px,transparent 47px)}
.pat-waves{background-image:repeating-radial-gradient(circle at 105% -5%,transparent 0 36px,rgba(255,255,255,.13) 37px 39px)}
.pat-honey{background-image:repeating-linear-gradient(60deg,rgba(255,255,255,.10) 0 2px,transparent 2px 30px),repeating-linear-gradient(-60deg,rgba(255,255,255,.10) 0 2px,transparent 2px 30px)}
.pat-confetti{background-image:radial-gradient(rgba(255,255,255,.24) 2px,transparent 3px),radial-gradient(rgba(255,255,255,.14) 2px,transparent 3px);background-size:48px 48px,48px 48px;background-position:0 0,24px 24px}

/* stream */
.gc-stream{display:grid;grid-template-columns:270px 1fr;gap:24px;align-items:start}
.gc-mini-title{font-size:14px;font-weight:500;margin-bottom:10px}
.gc-code b{display:block;font-size:22px;font-weight:500;color:var(--gc-accent);letter-spacing:.03em;margin-top:6px}
.gc-up{padding:8px 0;cursor:pointer}
.gc-up:hover .gc-up-title{color:var(--gc-accent)}
.gc-up-title{font-size:13px;font-weight:500}
.gc-up-sub{font-size:12px;color:var(--gc-muted);margin-top:2px}
.gc-up-foot{display:flex;justify-content:flex-end;margin-top:6px}
.gc-glance{display:flex;justify-content:space-between;padding:7px 0;font-size:13px;color:var(--gc-muted)}
.gc-glance b{color:var(--gc-text)}
.gc-composer{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.gc-composer-text{font-size:14px;color:var(--gc-muted)}
.gc-post-card{margin-bottom:16px}
.gc-post-head{display:flex;gap:14px;align-items:center}
.gc-post-title{font-size:14px;font-weight:500}
.gc-post-date{font-size:12px;color:var(--gc-muted);margin-top:2px}
.gc-post-body{margin:14px 0 0;font-size:14px;line-height:22px;white-space:pre-wrap}
.gc-post-foot{border-top:1px solid var(--gc-border);margin-top:16px;padding-top:12px;font-size:13px;color:var(--gc-muted)}
.gc-work-post{display:flex;align-items:center;gap:14px;margin-bottom:16px}

/* classwork */
.gc-work-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.gc-work-links{display:flex;gap:4px;flex-wrap:wrap}
.gc-create{display:inline-flex;align-items:center;gap:8px;background:var(--gc-accent);color:#fff;border:0;border-radius:24px;padding:11px 22px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit}
.gc-create:hover{filter:brightness(1.08)}
/* Reorder topics: Google Forms' "Reorder sections" cards, with a paper stack behind a topic that holds work. */
.gc-reorder{display:flex;flex-direction:column;gap:18px;padding:4px 10px 10px 0}
.gc-reorder-card{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:6px 8px 6px 24px;border-radius:8px;background:var(--gc-accent,var(--primary));color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.gc-reorder-card.stack-1{box-shadow:0 1px 3px rgba(0,0,0,.25),5px 5px 0 -1px #fff,5px 5px 2px 0 rgba(0,0,0,.25)}
.gc-reorder-card.stack-2{box-shadow:0 1px 3px rgba(0,0,0,.25),5px 5px 0 -1px #fff,5px 5px 2px 0 rgba(0,0,0,.25),10px 10px 0 -2px #fff,10px 10px 2px -1px rgba(0,0,0,.25)}
.gc-reorder-title{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gc-reorder-arrows{display:flex;flex:0 0 auto}
.gc-reorder-arrows button{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;background:none;color:#fff;cursor:pointer}
.gc-reorder-arrows button:hover,.gc-reorder-arrows button:focus-visible{background:rgba(255,255,255,.18)}
.gc-reorder-card:first-child .gc-reorder-up,.gc-reorder-card:last-child .gc-reorder-down{visibility:hidden}

.gc-topic{margin-top:26px}
/* Drag a topic by its header (mouse). While dragging every topic folds to its header, as in Google Forms. */
.gc-topics[data-reorder-url] .gc-topic-head{cursor:grab}
.gc-topics.reordering{user-select:none}
.gc-topics.reordering,.gc-topics.reordering *{cursor:grabbing!important}
.gc-topics.reordering .gc-topic-body{display:none}
.gc-topic.dragging{position:relative;z-index:5;background:var(--panel);border-radius:8px;box-shadow:0 6px 18px rgba(0,0,0,.18);padding:0 12px}
.gc-topic.dragging .gc-topic-head{border-bottom-color:transparent}
.gc-topic-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:12px;border-bottom:1px solid var(--gc-border)}
.gc-topic-head h3{margin:0;font-size:22px;font-weight:400;color:var(--gc-accent);font-family:inherit}
.gc-topic-toggle{display:flex;align-items:center;gap:8px;min-width:0;background:none;border:0;padding:0;cursor:pointer;font-family:inherit;text-align:left}
.gc-topic-toggle h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gc-topic-chevron{display:flex;color:var(--gc-accent);transition:transform .15s}
.gc-topic-count{display:none;font-size:12px;font-weight:500;color:var(--gc-muted);background:var(--gc-border);border-radius:10px;padding:1px 8px}
.gc-topic.collapsed .gc-topic-chevron{transform:rotate(-90deg)}
.gc-topic.collapsed .gc-topic-count{display:inline-block}
.gc-topic.collapsed .gc-topic-body{display:none}
.gc-topic-toggle .badge{padding:2px 8px}
.gc-item.gc-item-new{border-left:4px solid #15803d}
.gc-legend{display:flex;align-items:center;gap:6px;margin:14px 0 0;font-size:12px;color:var(--gc-muted)}
.gc-legend-swatch{width:4px;height:14px;border-radius:2px;background:#15803d}
[data-theme="dark"] .gc-item.gc-item-new{border-left-color:#86efac}
[data-theme="dark"] .gc-legend-swatch{background:#86efac}
.gc-item{border:1px solid var(--gc-border);border-radius:8px;background:var(--panel);margin:12px 0;overflow:hidden}
.gc-item:hover{box-shadow:0 1px 3px rgba(60,64,67,.24)}
.gc-item-row{display:flex;align-items:center;gap:16px;padding:14px 22px;cursor:pointer}
.gc-item-ico{width:36px;height:36px;border-radius:50%;background:var(--gc-accent);color:#fff;display:grid;place-items:center;font-size:15px;flex:0 0 auto}
.gc-item-title{font-size:14px;font-weight:500}
.gc-item-sub{font-size:12px;color:var(--gc-muted);margin-top:3px}
.gc-item-date{font-size:12px;color:var(--gc-muted);white-space:nowrap}
.gc-item-detail{display:none;padding:16px 22px 18px 74px;border-top:1px solid var(--gc-border)}
.gc-item.open .gc-item-detail{display:block}
.gc-detail-text{margin:0;font-size:14px;line-height:22px;color:var(--gc-muted)}
.gc-counts{display:flex;gap:44px;margin:18px 0}

/* attachments -------------------------------------------------------
   Classroom shows these as bordered chips under the instructions. Kept
   inside .gc styling so they read as part of the class interior rather
   than the ELA admin shell. */
.gc-attach-add{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.gc-attach-add input[name="links[]"]{flex:1 1 200px;min-width:0}
.gc-attach-pick{cursor:pointer;white-space:nowrap}
.gc-attach-list,.gc-attach-chosen{margin:0 0 10px;display:flex;flex-direction:column;gap:6px}
.gc-attach-chosen{margin:10px 0 0}
.gc-attach{display:flex;align-items:center;gap:10px;border:1px solid var(--gc-border);
  border-radius:8px;padding:8px 10px;background:#fff;text-decoration:none;color:inherit}
.gc-attach-ico{font-size:16px;line-height:1;flex:0 0 auto}
.gc-attach-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:13px;color:var(--gc-text)}
.gc-attach-sub{font-size:12px;color:var(--gc-muted);flex:0 0 auto}
/* Not yet uploaded: dashed, so it is visibly a promise rather than a fact. */
.gc-attach-new{border-style:dashed;background:#fbfbfb}
.gc-attach-remove{width:26px;height:26px;font-size:18px;line-height:1}
.gc-attach-error{color:#c5221f;font-size:12px;margin-top:6px}
/* Posted work usually has one or two, so they sit side by side rather
   than stacked down the row. */
.gc-attach-strip{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0}
.gc-attach-strip .gc-attach{max-width:280px}
.gc-attach-btn:hover{background:#f8f9fa;border-color:#c6c6c6}

/* reuse picker */
.gc-reuse-list{max-height:320px;overflow:auto;border:1px solid var(--gc-border);border-radius:8px}
.gc-reuse{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;cursor:pointer;
  border-bottom:1px solid var(--gc-border)}
.gc-reuse:last-child{border-bottom:0}
.gc-reuse:hover{background:#f8f9fa}
.gc-reuse input{margin-top:3px;width:auto;flex:0 0 auto}
.gc-reuse-ico{flex:0 0 auto}
.gc-reuse-main{display:flex;flex-direction:column;min-width:0}
.gc-reuse-title{font-size:14px;color:var(--gc-text)}
.gc-reuse-sub{font-size:12px;color:var(--gc-muted)}
.gc-reuse-note{font-size:12px;color:var(--gc-muted);line-height:1.5;margin:12px 0 0}


.gc-count b{display:block;font-size:26px;font-weight:400}
.gc-count span{font-size:12px;color:var(--gc-muted)}
.gc-actions{display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid var(--gc-border);padding-top:12px}

/* people */
.gc-people-head{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:2px solid var(--gc-accent);padding-bottom:12px;margin:30px 0 0}
.gc-people-head h3{margin:0;font-size:22px;font-weight:400;color:var(--gc-accent);font-family:inherit}
.gc-people-head .gc-count-label{font-size:14px;color:var(--gc-muted)}
.gc-person{display:flex;align-items:center;gap:16px;padding:14px 8px;border-bottom:1px solid var(--gc-border)}
.gc-person .nm{font-size:14px;font-weight:500;cursor:pointer}
.gc-person .nm:hover{color:var(--gc-accent)}
.gc-person .rt{margin-left:auto;display:flex;gap:26px;align-items:center;font-size:12px;color:var(--gc-muted)}
.gc-person .rt b{display:block;font-size:13px;color:var(--gc-text);font-weight:500}

/* grades + attendance */
.gc-panel{border:1px solid var(--gc-border);border-radius:8px;background:var(--panel);overflow:hidden}
.gc-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 22px;border-bottom:1px solid var(--gc-border);flex-wrap:wrap}
.gc-panel-head h3{margin:0;font-size:18px;font-weight:500;font-family:inherit}
.gc-panel-head .sub{font-size:13px;color:var(--gc-muted);margin-top:3px}
.gc-table{width:100%;border-collapse:collapse;font-family:inherit}
.gc-table th{background:var(--panel);color:var(--gc-muted);font-weight:500;font-size:12px;text-align:left;padding:12px;border-bottom:1px solid var(--gc-border);border-right:1px solid var(--gc-border)}
.gc-table td{padding:12px;font-size:13px;border-bottom:1px solid var(--gc-border);border-right:1px solid var(--gc-border)}
.gc-table th:last-child,.gc-table td:last-child{border-right:0}
.gc-table tbody tr:hover{background:var(--gc-hover)}
.gc-table th:first-child,.gc-table td:first-child{position:sticky;left:0;background:var(--panel);z-index:2;min-width:170px}
.gc-table input[type=number]{width:74px;padding:6px 8px;border-radius:4px;font-family:inherit}
.gc-table select{border-radius:4px;padding:8px 10px;font-family:inherit}
.gc-scroll{overflow:auto;max-height:70vh}
.gc-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--gc-border);border-bottom:1px solid var(--gc-border)}
.gc-summary div{background:var(--panel);padding:14px 22px}
.gc-summary b{display:block;font-size:22px;font-weight:400;margin-bottom:2px}
.gc-summary span{font-size:12px;color:var(--gc-muted)}

/* ---------- calendar ---------- */
.cal-head{display:flex;align-items:center;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--border);border:1px solid var(--border);border-radius:16px;overflow:hidden}
.cal-dow{background:var(--panel-soft);padding:10px;text-align:center;font-size:12px;font-weight:700;color:var(--muted)}
.cal-day{background:var(--panel);min-height:112px;padding:8px;cursor:pointer;position:relative}
.cal-day:hover{background:var(--panel-soft)}
.cal-day.dim{opacity:.45}
.cal-day.today .cal-num{background:var(--primary);color:#fff}
/* Every day an announcement is running, so a run reads as one band across
   the week. After the hover rule above, with its own hover, or the tint
   would swallow the hover state. */
.cal-day.announced{background:#faf5ff}
.cal-day.announced:hover{background:#f3e8ff}
[data-theme="dark"] .cal-day.announced{background:#241a33}
[data-theme="dark"] .cal-day.announced:hover{background:#2e2142}
.cal-num{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;margin-bottom:6px}
.cal-ev{font-size:11px;padding:3px 6px;border-radius:6px;background:var(--primary-soft);color:var(--primary);margin-bottom:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.cal-ev.quiz{background:#fff7ed;color:#c2410c}
.cal-ev.event{background:#ecfdf5;color:#15803d}
[data-theme="dark"] .cal-ev.quiz{background:#3a2412;color:#fdba74}
[data-theme="dark"] .cal-ev.event{background:#14301f;color:#86efac}
/* School announcements on the calendar: the day one starts and the day it
   stops. A link, not a delete prompt like events - it is managed on its
   own page. */
.cal-ev.announcement{display:flex;align-items:center;gap:4px;background:#f3e8ff;color:#6b21a8;
  text-decoration:none}
.cal-ev.announcement svg{flex:0 0 auto}
.cal-ev.announcement.is-end{background:transparent;color:#7e5bb5;
  border:1px dashed #d8b4fe;font-weight:500}
[data-theme="dark"] .cal-ev.announcement{background:#2e1f45;color:#e9d5ff}
[data-theme="dark"] .cal-ev.announcement.is-end{background:transparent;color:#c4b5fd;border-color:#4a3570}

/* ---------- sync ---------- */
.sync-flow{display:grid;grid-template-columns:1fr 90px 1fr;align-items:center;gap:12px}
.system-box{padding:24px;text-align:center}
.system-box h3{margin:8px 0}
.system-icon{width:64px;height:64px;border-radius:18px;background:var(--primary-soft);display:grid;place-items:center;margin:0 auto;font-size:30px}
.arrow{font-size:34px;color:var(--primary);text-align:center}
.map-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}
.mapping{padding:16px}
.mapping h4{margin:0 0 10px}
.mapping ul{margin:0;padding-left:18px;color:var(--muted);line-height:1.9}

/* ---------- profile ---------- */
.profile-header{display:flex;align-items:center;gap:18px;padding:22px;flex-wrap:wrap}
.big-avatar{width:72px;height:72px;border-radius:18px;background:#e6e2f7;display:grid;place-items:center;color:#3f3382;font-size:22px;font-weight:800}
.metric{padding:18px}
.metric .number{font-size:26px;font-weight:800;margin:6px 0}
.metric .caption{font-size:12px;color:var(--muted)}

/* ---------- modal / drawer / toast ---------- */
.overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;z-index:80}
.overlay.open{display:block}
.modal{position:fixed;z-index:90;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,calc(100% - 32px));max-height:86vh;overflow:auto;background:var(--panel);border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow);display:none}
.modal.open{display:block}
.modal.wide{width:min(880px,calc(100% - 32px))}
.modal-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:20px 22px;border-bottom:1px solid var(--border)}
.modal-head h3{margin:0;font-size:18px}
.modal-body{padding:20px 22px}
.modal-foot{display:flex;justify-content:flex-end;gap:10px;padding:16px 22px;border-top:1px solid var(--border);background:var(--panel-soft);border-radius:0 0 20px 20px;flex-wrap:wrap}
.drawer{position:fixed;top:0;right:0;height:100vh;width:min(380px,100%);background:var(--panel);border-left:1px solid var(--border);box-shadow:var(--shadow);transform:translateX(102%);transition:transform .25s ease;z-index:90;display:flex;flex-direction:column}
.drawer.open{transform:none}
.drawer-head{padding:20px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
.drawer-body{overflow:auto;flex:1;padding:8px 20px 20px}
.notif{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--border);cursor:pointer}
.notif:last-child{border-bottom:0}
.notif.unread .notif-title{font-weight:800}
.notif::before{content:"";width:8px;height:8px;border-radius:50%;margin-top:6px;flex:0 0 auto;background:transparent}
.notif.unread::before{background:var(--primary)}
.notif-title{font-size:14px}
.notif-sub{font-size:12px;color:var(--muted);margin-top:3px}
.toast-wrap{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:10px;z-index:120}
.toast{background:#111827;color:#fff;padding:13px 16px;border-radius:12px;box-shadow:var(--shadow);font-size:14px;animation:pop .2s ease;max-width:340px}
.toast.ok{background:#14532d}
.toast.warn{background:#7c2d12}
.toast.err{background:#7f1d1d}
@keyframes pop{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

@media(max-width:1100px){
  .grid.cols-4{grid-template-columns:repeat(2,1fr)}
  .grid.cols-3{grid-template-columns:repeat(2,1fr)}
  .split,.learning-overview{grid-template-columns:1fr}
}
@media(max-width:860px){
  .app{display:block}
  .sidebar{position:fixed;left:0;top:0;width:260px;transform:translateX(-102%);transition:transform .25s ease}
  .sidebar.open{transform:none}
  .burger{display:grid;place-items:center}
  .who{display:none}
  .content{padding:16px}
  .announcement-strip{margin:-16px -16px 20px;padding:14px 16px;flex-direction:column;align-items:flex-start}
  .announcement-text{white-space:normal}
  .grid.cols-4,.grid.cols-3,.grid.cols-2,.map-row,.sync-flow,.row2{grid-template-columns:1fr}
  .arrow{transform:rotate(90deg)}
  .cal-day{min-height:78px}
  .gc-stream{grid-template-columns:1fr}
  .gc-banner{height:180px}
  .gc-banner-copy h1{font-size:24px}
  .gc-room{display:none}
  .gc-item-detail{padding-left:22px}
  .gc-summary{grid-template-columns:repeat(2,1fr)}
  .gc-person .rt{gap:14px}
}
@media(max-width:1000px){.gc-stream{grid-template-columns:1fr}}

/* ==========================================================================
   Laravel port additions
   The mockup drove everything through JS buttons. Server-rendered pages use
   real links and forms, so anchors need to look like their button twins.
   ========================================================================== */
a{color:inherit}
.brand{text-decoration:none;color:inherit}

.menu a.menu-link{display:flex;width:100%;gap:10px;align-items:center;background:transparent;border:0;
  padding:10px 12px;border-radius:10px;cursor:pointer;text-align:left;font-size:14px;text-decoration:none;color:inherit}
.menu a.menu-link:hover{background:var(--panel-soft)}

a.primary-btn,a.secondary-btn,a.ghost-btn,a.danger-btn{display:inline-block;text-decoration:none;text-align:center}
a.mini-btn,a.gc-link,a.gc-create,a.text-action,a.link-btn{display:inline-block;text-decoration:none}
a.gc-create{text-align:center}
a.text-action,a.link-btn{padding:6px 0}

/* Inline forms that sit in a row of buttons should not break the layout. */
form.inline{display:inline}
.btn-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* Sign-in page errors and the toast for a failed form post. */
.login-error.show{display:block}

/* The gradebook and submissions table save through fetch; show the state. */
input.saving{outline:2px solid var(--warning);outline-offset:-2px}
input.saved{outline:2px solid var(--success);outline-offset:-2px}

/* Class tabs are real links in the port, so they need the button styling. */
.gc-tabs a{background:transparent;border:0;padding:16px 18px;font-size:14px;font-weight:500;
  color:var(--gc-muted);cursor:pointer;border-bottom:3px solid transparent;white-space:nowrap;
  font-family:inherit;text-decoration:none}
.gc-tabs a:hover{color:var(--gc-text)}
.gc-tabs a.active{color:var(--gc-accent);border-bottom-color:var(--gc-accent)}

/* Work handed in by a student. The row is a link plus a remove button, so the
   link fills the row and the button sits outside it - an anchor wrapping a
   button would make "remove" a navigation. */
.gc-attach-open{display:flex;align-items:center;gap:10px;flex:1;min-width:0;
  text-decoration:none;color:inherit}
.gc-attach-open:hover .gc-attach-name{text-decoration:underline}

/* A typed answer to a question, shown to the teacher beside the score box. */
.gc-answer{border-left:3px solid var(--gc-border);padding:4px 0 4px 10px;margin-top:2px;
  font-size:13px;line-height:1.5;white-space:pre-wrap;color:var(--gc-text)}

/* Full-screen Classwork composer. */
.modal.cw-modal{inset:0;transform:none;width:100%;height:100dvh;max-height:none;border:0;border-radius:0;background:#f8f9fa;color:#202124;box-shadow:none}
body:has(.cw-modal.open){overflow:hidden}
.cw-editor{min-height:100%;font-family:Arial,sans-serif}
.cw-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:16px;min-height:68px;padding:10px 24px 10px 16px;background:#fff;border-bottom:1px solid #dadce0}
.cw-header h2{font-size:26px;font-weight:400;margin:0}
.cw-close{background:none;border:0;color:#5f6368;font-size:32px;width:32px;height:40px;cursor:pointer}
.cw-type-icon{display:grid;place-items:center;background:#c4eed0;color:#137333;border-radius:50%;width:44px;height:44px;font-size:23px}
.cw-actions{display:flex;align-items:center;gap:14px;margin-left:auto}
.cw-assign,.cw-draft{font:500 14px Arial,sans-serif;padding:14px 25px;cursor:pointer;border-radius:24px;border:1px solid #dadce0}
.cw-assign{background:#0b57d0;color:white;border-color:#0b57d0;min-width:108px}
.cw-assign:hover{background:#0842a0}
.cw-draft{background:white;color:#0b57d0}
.cw-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:calc(100dvh - 69px)}
.cw-main{width:100%;max-width:1260px;margin:0 auto;padding:32px clamp(24px,6vw,100px)}
.cw-card{background:#fff;border:1px solid #c4c7c5;border-radius:9px;padding:30px;margin-bottom:28px}
.cw-title-field,.cw-instructions{display:block;background:#f8f9fa;border-bottom:1px solid #80868b;border-radius:4px 4px 0 0;padding:12px 16px}
.cw-title-field{background:#e9edf3}
.cw-title-field>span{display:block;color:#5f6368;font-size:12px;margin-bottom:3px}
.cw-editor .cw-title-field input{background:transparent;color:#202124;padding:0;border:0;border-radius:0;box-shadow:none;width:100%;font-size:20px}
.cw-required{font-size:12px;color:#5f6368;margin:6px 16px 22px}
.cw-instructions>span{display:block;font-size:16px;margin:8px 0 14px}
.cw-editor .cw-instructions textarea{display:block;background:transparent;border:0;box-shadow:none;color:#202124;resize:vertical;width:100%;min-height:150px;padding:0;font:16px/1.6 Arial,sans-serif}
.cw-title-field:focus-within,.cw-instructions:focus-within{border-bottom:2px solid #0b57d0}
.cw-attachments h3{font-size:18px;font-weight:500;margin:0 0 24px}
.cw-attach-tools{display:flex;justify-content:center;gap:26px;flex-wrap:wrap}
.cw-attach-tools button,.cw-attach-tools a{display:flex;flex-direction:column;align-items:center;gap:10px;border:0;background:none;text-decoration:none;color:#202124;font:14px Arial,sans-serif;cursor:pointer;padding:0}
.cw-tool-icon{display:grid;place-items:center;width:54px;height:54px;border:1px solid #c4c7c5;border-radius:50%;font-size:25px;color:#444746}
.cw-attach-tools button:hover .cw-tool-icon,.cw-attach-tools a:hover .cw-tool-icon{background:#e8f0fe;border-color:#0b57d0}
.cw-tool-icon.cw-drive{color:#188038;font-size:36px}.cw-tool-icon.cw-youtube{color:#ea4335}.cw-tool-icon.cw-create{color:#4285f4;font-size:38px}
.cw-hint{color:#5f6368;font-size:13px;text-align:center;margin:22px 0 0}
.cw-settings{background:#fff;border-left:1px solid #dadce0;padding:30px 24px}
.cw-field{display:block;margin-bottom:24px}
.cw-field>span{display:block;font-size:14px;font-weight:500;color:#444746;margin-bottom:12px}
.cw-editor .cw-field input,.cw-editor .cw-field select{width:100%;border:0;border-bottom:1px solid #80868b;border-radius:4px 4px 0 0;background:#f1f3f4;color:#202124;padding:18px 14px;font:16px Arial,sans-serif;min-height:56px}
.cw-field small{display:block;color:#5f6368;font-size:12px;margin-top:7px}
.cw-field small[hidden]{display:none}
.cw-rich>span{display:block;color:#5f6368;font-size:12px;margin-bottom:3px}
.cw-rich-text{min-height:120px;outline:0;color:#202124;font:15px/1.6 Arial,sans-serif;word-break:break-word}
.cw-rich-text:empty::before,.cw-rich-text.is-empty::before{content:attr(data-placeholder);color:#80868b;pointer-events:none}
.cw-rich-text ul{margin:4px 0;padding-left:22px}
.cw-rich-tools{display:flex;gap:4px;margin-top:10px}
.cw-rich-tools button{width:34px;height:34px;border:0;border-radius:50%;background:none;color:#444746;font-size:15px;cursor:pointer}
.cw-rich-tools button:hover{background:#e2e5e9}
.cw-due-btn{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:56px;padding:0 14px;border:0;border-bottom:1px solid #80868b;border-radius:4px 4px 0 0;background:#f1f3f4;color:#202124;font:16px Arial,sans-serif;cursor:pointer;text-align:left}
.cw-due-btn[aria-expanded="true"]{border-bottom:2px solid #0b57d0}
.cw-due-panel{margin-top:8px;padding:12px;border:1px solid #dadce0;border-radius:8px;background:#fff;box-shadow:0 2px 6px rgba(60,64,67,.15)}
.cw-due-panel .cw-due{display:flex;flex-direction:column;gap:8px}
.cw-due-clear{margin-top:8px;background:none;border:0;padding:6px 0;color:#0b57d0;font:500 14px Arial,sans-serif;cursor:pointer}
.gc-rich ul,.cwv-desc ul,.gcx-desc ul{margin:4px 0;padding-left:22px}
/* Instructions now arrive as HTML with their own <br>s, so pre-line would double every break. */
div.gcx-desc,div.cwv-desc{white-space:normal}
.cw-question-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,200px);gap:12px;align-items:start}
.cw-options{margin-top:20px;display:flex;flex-direction:column;gap:8px}
.cw-options[hidden],.cw-check[hidden],.cw-due-panel[hidden]{display:none}
.cw-option{display:flex;align-items:center;gap:10px}
.cw-option.dragging{opacity:.5}
.cw-option-grip{flex:none;width:14px;color:#5f6368;font-size:16px;font-weight:700;letter-spacing:-5px;cursor:grab;user-select:none}
.cw-option-dot{flex:none;width:18px;height:18px;border:2px solid #5f6368;border-radius:50%}
.cw-editor .cw-option input{flex:1;min-width:0;border:0;border-bottom:1px solid #80868b;border-radius:4px 4px 0 0;background:#e9edf3;padding:14px 12px;font:15px Arial,sans-serif;color:#202124;box-shadow:none}
.cw-editor .cw-option input:focus{outline:0;border-bottom:2px solid #0b57d0}
.cw-option-x{flex:none;width:36px;height:36px;border:0;border-radius:50%;background:none;color:#444746;font-size:24px;line-height:1;cursor:pointer}
.cw-option-x:hover{background:#f1f3f4}
.cw-option-add{align-self:flex-start;margin-left:44px;background:none;border:0;padding:8px 0;color:#0b57d0;font:500 14px Arial,sans-serif;cursor:pointer}
.cw-option-add:hover{text-decoration:underline}
.cw-check{display:flex;align-items:center;gap:12px;margin:0 0 18px;font-size:14px;color:#202124;cursor:pointer}
.cw-editor .cw-check input{width:18px;height:18px;min-height:0;margin:0;accent-color:#0b57d0}
@media(max-width:640px){.cw-question-top{grid-template-columns:1fr}}
.qa-choices{border:0;padding:0;margin:0 0 12px}
.qa-choice{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:15px;cursor:pointer}
.qa-choice input{width:18px;height:18px;margin:0;accent-color:var(--gc-accent,#0b57d0)}
.qp-row{margin:10px 0}
.qp-label{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin-bottom:4px}
.qp-row.is-mine .qp-label span::after{content:" (your answer)";color:var(--muted);font-size:12px}
.qp-bar{height:8px;border-radius:4px;background:var(--panel-soft);overflow:hidden}
.qp-bar i{display:block;height:100%;background:var(--gc-accent,#0b57d0);border-radius:4px}
.cw-points input{max-width:150px}
.cw-students{border:1px solid #80868b;border-radius:28px;padding:15px;text-align:center;color:#0b57d0;font-size:15px}
.cw-links:empty{display:none}.cw-links{margin-top:20px;display:grid;gap:10px}
.cw-link-row{display:flex;gap:10px;align-items:center}.cw-link-row label{flex:1;color:#5f6368;font-size:12px}.cw-editor .cw-link-row input{display:block;width:100%;margin-top:5px;background:#f8f9fa;color:#202124;border:1px solid #dadce0;border-radius:5px;padding:12px}
.cw-link-row .cw-link-copy{align-self:flex-end;white-space:nowrap}
.cw-editor button:focus-visible,.cw-editor a:focus-visible{outline:2px solid #0b57d0;outline-offset:3px}
@media(max-width:850px){.cw-layout{grid-template-columns:minmax(0,1fr) 260px}.cw-main{padding:24px}.cw-card{padding:20px}.cw-attach-tools{gap:18px}.cw-settings{padding:24px 18px}}
@media(max-width:640px){.cw-layout{grid-template-columns:1fr}.cw-settings{border-left:0;border-top:1px solid #dadce0}.cw-header{padding:10px;gap:8px}.cw-header h2{font-size:18px}.cw-type-icon{display:none}.cw-actions{gap:6px}.cw-assign,.cw-draft{padding:11px 12px;min-width:0}.cw-main{padding:16px}.cw-card{padding:18px;margin-bottom:16px}.cw-attach-tools{gap:18px}.cw-tool-icon{width:44px;height:44px}}

/* Native forms, builder and student response cards. */
.lf-builder{border-top:8px solid #673ab7;scroll-margin-top:90px}
.lf-builder[hidden],.lf-preview[hidden],.lf-options[hidden]{display:none}
.lf-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}
.lf-heading h3{font-size:22px;margin:5px 0 0;font-weight:400}
.lf-eyebrow{font-size:10px;letter-spacing:1.5px;color:#673ab7;font-weight:700}
.lf-builder .lf-intro{text-align:left;line-height:1.6;margin:16px 0 24px}
.lf-builder>fieldset{border:0;padding:0;margin:0;min-width:0}
.lf-question{border:1px solid #dadce0;border-left:4px solid #673ab7;border-radius:8px;padding:20px;margin:16px 0;background:white}
.lf-question .lf-heading{margin-bottom:20px}.lf-question .cw-field{margin-bottom:16px}
.lf-question-actions{display:flex;gap:8px}.lf-question-actions button{background:#f1f3f4;border:0;border-radius:50%;width:32px;height:32px;font-size:18px;cursor:pointer;color:#5f6368}
.lf-question-actions button:disabled{opacity:.3;cursor:default}
.cw-editor .lf-options textarea{width:100%;border:1px solid #dadce0;border-radius:5px;padding:12px;font:15px/1.7 var(--lf-font);color:#202124;background:#f8f9fa;resize:vertical}
.lf-required,.lf-choice{display:flex;gap:10px;align-items:center;font-size:14px}
.lf-required input,.lf-choice input{width:18px;height:18px;flex-shrink:0;accent-color:#673ab7}
.lf-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:22px}
.lf-remove{background:none;border:0;color:#b3261e;cursor:pointer;padding:10px}
.lf-notice{background:#f3edff;border-radius:6px;padding:14px;color:#55318a;line-height:1.5;font-size:13px}
.lf-preview{margin-top:24px;background:#f0ebf8;padding:20px;border-radius:8px;color:#202124}
.lf-preview>p,.lf-response-title p{font-size:12px;color:#5f6368}
.lf-response{background:#f0ebf8;padding:16px;border-radius:8px;color:#202124}
.lf-response-title{background:white;padding:18px;border-radius:8px;border-top:6px solid #673ab7;margin-bottom:20px}.lf-response-title h3{margin:8px 0}
.lf-answer{min-width:0;background:white;border:1px solid #dadce0;border-radius:8px;margin:16px 0;padding:18px}
.lf-answer legend{font-size:15px;font-weight:600;background:white;border-radius:4px;padding:6px;max-width:100%;overflow-wrap:anywhere}
.lf-answer textarea,.lf-answer select,.lf-answer input:not([type=radio]):not([type=checkbox]){display:block;width:100%;border:1px solid #dadce0;border-radius:4px;padding:12px;color:#202124;background:white}
.lf-choice{padding:8px 0;line-height:1.5;overflow-wrap:anywhere}.lf-answer small{font-size:12px;color:#5f6368}
.lf-builder fieldset:disabled{opacity:.75}
@media(max-width:640px){.lf-question{padding:12px}.lf-heading{flex-wrap:wrap}.lf-preview{padding:10px}}
.lf-preview{scroll-margin-top:90px}.lf-saved-answers{margin-top:12px;max-width:480px}.lf-saved-answers summary{cursor:pointer;color:var(--primary);font-weight:600}.lf-saved-answers .gc-answer{white-space:pre-wrap;overflow-wrap:anywhere}

/* Expanded Forms workspace. */
.lf-builder{--form-color:#673ab7;border-top-color:var(--form-color)}
.lf-builder .lf-eyebrow,.lf-response .lf-eyebrow{color:var(--form-color,#673ab7)}
.lf-tabs{display:flex;justify-content:center;gap:24px;border-bottom:1px solid #dadce0;margin:22px -12px 28px}
.lf-tabs button{padding:14px 8px;border:0;border-bottom:3px solid transparent;background:none;font-size:14px;font-weight:600;color:#5f6368;cursor:pointer}.lf-tabs button.active{color:var(--form-color);border-bottom-color:var(--form-color)}
.lf-builder [hidden]{display:none!important}
.lf-builder .cw-field textarea{display:block;width:100%;padding:12px;border:1px solid #dadce0;border-radius:5px;background:#f8f9fa;color:#202124;font:14px/1.6 var(--lf-font);resize:vertical}
.lf-toolbox{display:flex;gap:6px;flex-wrap:wrap;border:1px solid #dadce0;border-radius:10px;background:#fff;padding:8px;margin:22px 0}
.lf-toolbox button,.lf-small-button{background:#f8f9fa;color:#444746;border:0;padding:10px 12px;border-radius:6px;cursor:pointer;font-size:13px}.lf-toolbox button:hover,.lf-small-button:hover{background:#f0ebf8;color:var(--form-color)}
.lf-question{border-left-color:var(--form-color,#673ab7)}.lf-question-top{display:grid;grid-template-columns:1.2fr 1fr;gap:16px}.lf-question-top .cw-field{min-width:0}
.lf-config-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.lf-config-row .cw-field{min-width:0}
.lf-question-bottom{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #eee;padding-top:16px;margin-top:18px}.lf-type-hint{color:#5f6368;font-size:12px}
.lf-answer-key{border-top:1px solid #dadce0;margin-top:18px;padding-top:15px}.lf-answer-key summary{cursor:pointer;color:var(--form-color);font-size:14px;font-weight:600;margin-bottom:16px}.lf-key-help{font-size:12px;color:#5f6368;line-height:1.5}
.lf-settings h3{font-size:18px;margin:24px 0 16px}.lf-settings .lf-required{margin:12px 0}.lf-settings>h3:first-child{margin-top:0}
.lf-empty{text-align:center;padding:45px 12px;font-size:22px}.lf-empty p{font-size:14px;color:#5f6368}
.lf-response-title{border-top-color:var(--form-color,#673ab7)}
.lf-layout-block{background:white;border:1px solid #dadce0;border-radius:8px;padding:20px;margin:20px 0;overflow-wrap:anywhere}.lf-layout-block h3{margin:0 0 12px;font-size:20px}.lf-layout-block p{white-space:pre-wrap;font-size:14px;line-height:1.6}.lf-layout-section{border-top:6px solid var(--form-color,#673ab7)}.lf-layout-block img{max-width:100%;max-height:480px;object-fit:contain}.lf-layout-block iframe{width:100%;aspect-ratio:16/9;border:0}
.lf-scale{display:flex;justify-content:space-around;gap:12px;margin:20px 0;flex-wrap:wrap}.lf-scale label{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--form-color,#673ab7)}.lf-scale input,.lf-grid input{width:18px;height:18px;accent-color:var(--form-color,#673ab7)}.lf-scale label>span{font-size:22px}.lf-scale-labels{display:flex;justify-content:space-between;gap:20px;font-size:12px;color:#5f6368}
.lf-grid-scroll{overflow:auto;margin:14px 0}.lf-grid{border-collapse:collapse;min-width:100%;font-size:13px}.lf-grid th,.lf-grid td{padding:12px!important;text-align:center!important;border-bottom:1px solid #dadce0}.lf-grid th{color:#444746;background:#f8f9fa;white-space:normal}.lf-grid .lf-choice{font-size:0}.lf-grid .lf-choice input{font-size:14px}.lf-grid th:first-child{text-align:left!important;min-width:110px}
.lf-question-description{font-size:14px;color:#5f6368;white-space:pre-wrap;line-height:1.5}
.lf-stats{padding:20px 0;margin-bottom:20px}.lf-stats h3{font-size:24px;font-weight:400}.lf-stats details{border:1px solid var(--border,#dadce0);border-radius:8px;padding:14px;margin:12px 0}.lf-stats summary{cursor:pointer;font-weight:600}.lf-stat-row{display:flex;align-items:center;gap:12px;margin-top:14px;font-size:13px}.lf-stat-row>span{flex:1;overflow-wrap:anywhere}.lf-stat-row meter{width:40%;accent-color:#673ab7}.lf-stat-row strong{width:30px;text-align:right}
@media(max-width:760px){.lf-question-top{grid-template-columns:1fr;gap:0}.lf-tabs{gap:12px}.lf-toolbox{gap:4px}.lf-toolbox button{padding:9px;font-size:12px}.lf-config-row{grid-template-columns:1fr}.lf-question-bottom{flex-wrap:wrap}}
.lf-import{border:1px solid #dadce0;border-radius:8px;padding:20px;background:#faf8ff;margin:16px 0}.lf-import h4{margin:0 0 18px}.lf-import .cw-draft{margin:12px 12px 12px 0}
.lf-import-google{padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid #dadce0}

/* Form sheets: the builder and the student form open full screen, styled after Google Forms. */
.modal.lf-full{inset:0;transform:none;width:100%;height:100dvh;max-height:none;border:0;border-radius:0}
body:has(.modal.lf-full.open){overflow:hidden}
.lf-sheet{--form-color:#673ab7;--form-tint:color-mix(in srgb,var(--form-color) 12%,#fff);position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background:var(--form-tint);color:#202124;font-family:var(--lf-font);border:0;margin:0;animation:lf-sheet-in .18s ease-out}
.lf-sheet[hidden]{display:none!important}
@keyframes lf-sheet-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.lf-sheet{animation:none}}
.lf-sheet-bar{flex-shrink:0;background:#fff;border-bottom:1px solid #dadce0;box-shadow:0 1px 3px rgba(60,64,67,.12)}
.lf-sheet-top{display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 16px}
.lf-sheet-top>strong{flex:1;min-width:0;font-size:18px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lf-sheet-close,.lf-icon-button{width:40px;height:40px;border:0;border-radius:50%;background:none;color:#5f6368;font-size:20px;cursor:pointer;flex-shrink:0}
.lf-sheet-close:hover,.lf-icon-button:hover{background:#f1f3f4}
.lf-sheet-actions{display:flex;align-items:center;gap:8px}
.lf-previewing .lf-icon-button{background:var(--form-tint);color:var(--form-color)}
.lf-done,.lf-submit{background:var(--form-color);color:#fff;border:0;border-radius:4px;padding:10px 24px;font-size:14px;font-weight:600;cursor:pointer}
.lf-done:hover,.lf-submit:hover{filter:brightness(1.08);box-shadow:0 1px 3px rgba(60,64,67,.3)}
.lf-sheet .lf-tabs{margin:0;border-bottom:0;gap:28px}
.lf-sheet .lf-tabs button{padding:10px 6px 11px}
.lf-previewing .lf-tabs{visibility:hidden;height:0;overflow:hidden}
.lf-sheet-body{flex:1;overflow:auto;overscroll-behavior:contain}
.lf-sheet-page{max-width:770px;margin:0 auto;padding:12px 16px 96px}
.lf-sheet button:focus-visible,.lf-sheet a:focus-visible{outline:2px solid var(--form-color);outline-offset:2px}
.lf-sheet .lf-notice{margin:12px 0}
.lf-sheet .lf-notice[hidden]{display:none}
.lf-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Header card with the coloured band, then one white card per question. */
.lf-title-card,.lf-sheet .lf-response-title{position:relative;background:#fff;border:1px solid #dadce0;border-top:10px solid var(--form-color);border-radius:8px;padding:22px 24px 24px;margin:12px 0}
.lf-title-card input,.lf-title-card textarea{display:block;width:100%;border:0;border-bottom:1px solid transparent;border-radius:0;background:none;color:#202124;box-shadow:none;padding:6px 0;font-family:var(--lf-font);resize:none}
.lf-title-card input{font-size:32px;line-height:1.3;margin-bottom:10px}
.lf-title-card textarea{font-size:14px;line-height:1.5}
.lf-title-card input:hover,.lf-title-card textarea:hover{border-bottom-color:#dadce0}
.lf-title-card input:focus,.lf-title-card textarea:focus{border-bottom:2px solid var(--form-color);box-shadow:none}
.lf-sheet .lf-response-title h3{font-size:32px;font-weight:400;margin:0 0 12px}
.lf-sheet .lf-response-title .lf-eyebrow{display:none}
.lf-sheet .lf-question{position:relative;border:1px solid #dadce0;border-left:6px solid transparent;border-radius:8px;padding:22px 24px;margin:12px 0;background:#fff;transition:box-shadow .15s}
.lf-sheet .lf-question:focus-within{border-left-color:#4285f4;box-shadow:0 2px 6px rgba(60,64,67,.18)}
.lf-sheet .lf-question .lf-number{font-size:12px;color:#5f6368;font-weight:400}
.lf-sheet .lf-question-top .cw-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.lf-sheet .lf-question-top{grid-template-columns:minmax(0,1fr) 240px;align-items:start}
.lf-sheet .lf-question-top select{background:#fff!important;border:1px solid #dadce0!important;border-radius:4px!important}
.lf-sheet .cw-field textarea{box-shadow:none}
.lf-sheet .lf-footer{background:#fff;border:1px solid #dadce0;border-radius:8px;padding:12px 16px}
.lf-panel-card,.lf-sheet .lf-preview .lf-answer,.lf-sheet .lf-response .lf-answer,.lf-sheet .lf-layout-block{background:#fff;border:1px solid #dadce0;border-radius:8px;padding:24px;margin:12px 0}
.lf-sheet .lf-preview,.lf-sheet .lf-response{background:none;padding:0;margin:0;border-radius:0}
.lf-sheet .lf-answer legend{float:left;width:100%;padding:0 0 16px;font-size:16px;font-weight:400}
.lf-sheet .lf-answer legend+*{clear:both}
.lf-sheet .lf-answer textarea,.lf-sheet .lf-answer input:not([type=radio]):not([type=checkbox]):not([type=file]){border:0;border-bottom:1px solid #dadce0;border-radius:0;padding:8px 0;max-width:420px;box-shadow:none;background:none}
.lf-sheet .lf-answer textarea{max-width:none}
.lf-sheet .lf-answer textarea:focus,.lf-sheet .lf-answer input:not([type=radio]):not([type=checkbox]):focus{border-bottom:2px solid var(--form-color)}
.lf-sheet .lf-answer select{max-width:260px}
.lf-sheet .lf-choice input{accent-color:var(--form-color)}
.lf-sheet .lf-layout-section{border-top:10px solid var(--form-color)}
.lf-preview-note{font-size:12px;color:#d93025!important;margin:12px 0 0}
.lf-sheet .lf-preview>.lf-submit{margin-top:8px}
.lf-fill-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px 0 8px}
.lf-clear{background:none;border:0;color:var(--form-color);font-size:14px;font-weight:600;padding:10px;cursor:pointer;border-radius:4px}
.lf-clear:hover{background:#fff}
.lf-fill-note{font-size:12px;color:#5f6368;text-align:center;margin:24px 0 0}

/* Floating tool rail beside the questions on wide screens, a bottom bar on narrow ones. */
.lf-sheet .lf-toolbox{position:sticky;bottom:12px;z-index:3;justify-content:center;box-shadow:0 1px 4px rgba(60,64,67,.25);margin:12px 0}
.lf-sheet .lf-toolbox button{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:52px;background:none}
.lf-sheet .lf-toolbox b{font-size:18px;font-weight:400;line-height:1}
.lf-sheet .lf-toolbox span{font-size:11px}
@media(min-width:1000px){
  .lf-sheet .lf-toolbox{position:fixed;bottom:auto;top:50%;right:max(16px,calc(50% - 385px - 76px));transform:translateY(-50%);flex-direction:column;padding:6px;margin:0}
  .lf-sheet .lf-toolbox button{width:48px;height:48px;min-width:0;padding:0;justify-content:center;border-radius:50%}
  .lf-sheet .lf-toolbox span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}
@media(max-width:640px){
  .lf-sheet-top{padding:6px 8px;gap:6px}.lf-sheet-top>strong{font-size:16px}.lf-sheet-top>.lf-chip-icon{display:none}
  .lf-done{padding:9px 14px}.lf-sheet .lf-tabs{gap:14px}
  .lf-sheet-page{padding:8px 8px 96px}
  .lf-title-card,.lf-sheet .lf-response-title,.lf-sheet .lf-question,.lf-panel-card,.lf-sheet .lf-preview .lf-answer,.lf-sheet .lf-response .lf-answer,.lf-sheet .lf-layout-block{padding:16px}
  .lf-title-card input,.lf-sheet .lf-response-title h3{font-size:24px}
  .lf-sheet .lf-question-top{grid-template-columns:1fr}
  .lf-sheet .lf-toolbox button{min-width:0;flex:1;padding:8px 4px}
}

/* The form as an attachment card, like a Google Form attached in Classroom. */
.cw-card.lf-chip-card{padding:0;border:0;background:none}
.lf-chip-card[hidden]{display:none}
.lf-chip{--form-color:#673ab7;display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:#fff;color:#202124;border:1px solid #dadce0;border-radius:8px;padding:0 16px 0 0;cursor:pointer;overflow:hidden;font-family:var(--lf-font);margin:4px 0 12px}
.lf-chip:hover{box-shadow:0 1px 4px rgba(60,64,67,.25)}
.lf-chip>.lf-chip-icon{width:72px;height:64px;border-radius:0}
.lf-chip-icon{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:28px;height:34px;border-radius:4px;background:var(--form-color);flex-shrink:0}
.lf-chip-icon i{display:block;width:45%;height:3px;border-radius:2px;background:#fff}
.lf-chip>.lf-chip-icon i{width:22px}
.lf-chip-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.lf-chip-text strong{font-size:15px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lf-chip-text small{font-size:12px;color:#5f6368}
.lf-chip-action{color:var(--form-color);font-size:14px;font-weight:600;white-space:nowrap}
.lf-builder.lf-sheet{border-top:0;scroll-margin:0}

/* Question cards, cloned from the Google Forms editor. */
.lf-sheet fieldset{border:0;padding:0;margin:0;min-width:0}
.lf-sheet .lf-title-card{border-left:6px solid transparent;transition:box-shadow .15s}
.lf-sheet .lf-title-card.active{border-left-color:#4285f4;box-shadow:0 2px 6px rgba(60,64,67,.18)}
.lf-sheet .lf-question{padding:0 24px 0;border-left:6px solid transparent;cursor:default}
.lf-sheet .lf-question.active{border-left-color:#4285f4;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px rgba(0,0,0,.14),0 1px 3px rgba(0,0,0,.12)}
.lf-sheet .lf-question:focus-within{box-shadow:none}
.lf-sheet .lf-question.active:focus-within{box-shadow:0 2px 6px rgba(60,64,67,.18)}
.lf-sheet .lf-question.dragging{opacity:.5}
.lf-drag{display:grid;grid-template-columns:repeat(3,4px);gap:3px 3px;justify-content:center;align-content:center;height:24px;cursor:move;visibility:hidden}
.lf-drag i{width:4px;height:4px;border-radius:50%;background:#bdc1c6}
.lf-question:hover .lf-drag,.lf-question.active .lf-drag{visibility:visible}
.lf-sheet .lf-question-top{display:flex;gap:24px;align-items:flex-start;padding-bottom:8px}
.lf-title-field{flex:1;min-width:0}
.lf-sheet .lf-title-field input{display:block;width:100%;border:0;border-bottom:1px solid transparent;border-radius:4px 4px 0 0;background:none;color:#202124;padding:16px 0 8px;font:16px/1.4 var(--lf-font);box-shadow:none;outline:0}
.lf-sheet .lf-question.active .lf-title-field input{background:#f8f9fa;padding:16px;border-bottom-color:#80868b}
.lf-sheet .lf-question.active .lf-title-field input:focus{border-bottom:2px solid var(--form-color);padding-bottom:7px}
.lf-type-field{position:relative;width:240px;flex-shrink:0;margin-top:4px}
.lf-type-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:18px;color:#5f6368;pointer-events:none;width:20px;text-align:center}
.lf-sheet .lf-type-field select{width:100%;height:48px;padding:0 12px 0 44px;border:1px solid #dadce0;border-radius:4px;background:#fff;color:#202124;font:14px var(--lf-font);box-shadow:none;cursor:pointer}
.lf-sheet .lf-type-field select:focus{border-color:var(--form-color);box-shadow:none}
.lf-question:not(.active) .lf-type-field{display:none}
.lf-desc-field{display:block;margin:-4px 0 8px}
.lf-sheet .lf-desc-field textarea{display:block;width:100%;min-height:0;border:0;border-bottom:1px solid transparent;border-radius:0;background:none;color:#5f6368;padding:6px 0;font:14px/1.5 var(--lf-font);resize:none;overflow:hidden;box-shadow:none}
.lf-sheet .lf-question.active .lf-desc-field textarea{border-bottom-color:#dadce0}
.lf-sheet .lf-desc-field textarea:focus{border-bottom:2px solid var(--form-color)}
.lf-type-preview{display:inline-block;min-width:min(300px,60%);border-bottom:1px dotted #bdc1c6;color:#70757a;font-size:14px;padding:12px 0 8px;margin:8px 0 16px}
.lf-question[data-kind=paragraph] .lf-type-preview{min-width:min(560px,90%)}

/* Choice lists: a marker, the option text and a remove button, then "Add option". */
.lf-lists{display:flex;gap:32px}
.lf-lists>.lf-list{flex:1;min-width:0}
.lf-lists>.lf-list[hidden]{display:none}
.lf-list h4{margin:8px 0 4px;font-size:14px;font-weight:500;color:#202124}
.lf-list h4[hidden]{display:none}
.lf-items{list-style:none;margin:0;padding:0;counter-reset:lf-item}
.lf-item,.lf-list-add{display:flex;align-items:center;gap:12px;min-height:48px;counter-increment:lf-item}
.lf-mark{width:20px;height:20px;flex-shrink:0;border:2px solid #bdc1c6;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;color:#5f6368}
.lf-question[data-kind=checkbox] .lf-mark,.lf-question[data-kind=checkbox_grid] [data-config=choices] .lf-mark{border-radius:3px}
.lf-question[data-kind=dropdown] .lf-mark,.lf-list[data-config=grid] .lf-mark{border:0}
.lf-question[data-kind=dropdown] .lf-item .lf-mark::before,.lf-list[data-config=grid] .lf-item .lf-mark::before{content:counter(lf-item) "."}
.lf-sheet .lf-item input{flex:1;min-width:0;border:0;border-bottom:1px solid transparent;border-radius:0;background:none;padding:8px 0;font:14px var(--lf-font);color:#202124;box-shadow:none;outline:0}
.lf-sheet .lf-question.active .lf-item input:hover{border-bottom-color:#dadce0}
.lf-sheet .lf-item input:focus{border-bottom:2px solid var(--form-color)!important}
.lf-item-remove{width:40px;height:40px;border:0;border-radius:50%;background:none;color:#5f6368;font-size:24px;line-height:1;cursor:pointer;flex-shrink:0}
.lf-item-remove:hover{background:#f1f3f4}
.lf-items li:only-child .lf-item-remove{visibility:hidden}
.lf-list-add{width:100%;border:0;background:none;padding:0;cursor:text;text-align:left;font:14px var(--lf-font);color:#70757a}
.lf-list-add span:last-child{border-bottom:1px solid transparent;padding:8px 0}
.lf-list-add:hover span:last-child{border-bottom-color:#dadce0}
.lf-question[data-kind=dropdown] .lf-list-add .lf-mark{visibility:hidden}
.lf-question:not(.active) .lf-item-remove,.lf-question:not(.active) .lf-list-add{display:none}
.lf-question:not(.active) .lf-item input{pointer-events:none}

/* Type-specific settings. */
.lf-scale-editor{padding:8px 0 16px}
.lf-scale-range{display:flex;align-items:center;gap:16px;margin-bottom:12px;font-size:14px;color:#202124}
.lf-sheet .lf-scale-range select,.lf-sheet .lf-inline-field select{width:auto;min-width:72px;padding:8px 10px;border:1px solid #dadce0;border-radius:4px;background:#fff;color:#202124;box-shadow:none}
.lf-scale-label{display:flex;align-items:center;gap:16px;font-size:14px;color:#5f6368;margin:4px 0}
.lf-scale-label span{width:20px;text-align:right}
.lf-sheet .lf-scale-label input{width:240px;max-width:70%;border:0;border-bottom:1px solid #dadce0;border-radius:0;background:none;padding:8px 0;color:#202124;box-shadow:none}
.lf-sheet .lf-scale-label input:focus{border-bottom:2px solid var(--form-color)}
.lf-inline-field{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:14px;color:#202124;padding:8px 0;max-width:520px}
.lf-inline-field[hidden],.lf-file-editor[hidden],.lf-scale-editor[hidden]{display:none}
.lf-file-editor{padding:4px 0 12px}
.lf-sheet .lf-inline-field input,.lf-sheet .lf-inline-field textarea{width:auto;flex:1;max-width:300px;border:0;border-bottom:1px solid #dadce0;border-radius:0;background:none;padding:8px 0;color:#202124;box-shadow:none}
.lf-sheet .lf-media-field{max-width:none}.lf-sheet .lf-media-field input{max-width:none}
.lf-question:not(.active) [data-config=file],.lf-question:not(.active) [data-config=validation],.lf-question:not(.active) [data-config=rating],.lf-question:not(.active) .lf-scale-range{display:none}

/* Answer key and the bottom bar: duplicate, delete, Required switch, more. */
.lf-sheet .lf-answer-key{border-top:0;margin:0;padding:4px 0 8px}
.lf-sheet .lf-answer-key summary{display:inline-flex;align-items:center;gap:8px;color:#1a73e8;font-size:14px;font-weight:500;margin:0;padding:8px 0;list-style:none}
.lf-sheet .lf-answer-key summary::-webkit-details-marker{display:none}
.lf-sheet .lf-answer-key summary span{color:#5f6368;font-weight:400}
.lf-sheet .lf-answer-key[open]{background:#f8f9fa;margin:0 -24px;padding:4px 24px 12px}
.lf-sheet .lf-question-bottom{display:flex;justify-content:flex-end;align-items:center;gap:4px;flex-wrap:nowrap;border-top:1px solid #dadce0;margin:8px 0 0;padding:8px 0}
.lf-sheet .lf-question-bottom .lf-type-hint{margin-right:auto;font-size:12px;color:#5f6368}
.lf-question:not(.active) .lf-question-bottom,.lf-question:not(.active) .lf-answer-key{display:none}
.lf-question:not(.active){padding-bottom:16px}
.lf-divider{width:1px;height:32px;background:#dadce0;margin:0 12px}
.lf-switch{display:inline-flex;align-items:center;gap:12px;font-size:14px;color:#202124;cursor:pointer;user-select:none}
.lf-switch[hidden]{display:none}
.lf-switch input{position:absolute;opacity:0;width:1px;height:1px}
.lf-switch i{position:relative;width:36px;height:14px;border-radius:7px;background:#bdc1c6;transition:background .15s}
.lf-switch i::after{content:"";position:absolute;left:-2px;top:-3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4);transition:transform .15s,background .15s}
.lf-switch input:checked+i{background:color-mix(in srgb,var(--form-color) 45%,#fff)}
.lf-switch input:checked+i::after{transform:translateX(20px);background:var(--form-color)}
.lf-switch input:focus-visible+i{outline:2px solid var(--form-color);outline-offset:4px}
.lf-more{position:relative}
.lf-more-menu{position:absolute;right:0;bottom:44px;z-index:5;min-width:220px;background:#fff;border-radius:4px;box-shadow:0 2px 10px rgba(0,0,0,.2);padding:8px 0}
.lf-more-menu[hidden]{display:none}
.lf-more-label{display:block;padding:6px 16px;font-size:12px;color:#5f6368}
.lf-more-menu button{display:flex;align-items:center;gap:12px;width:100%;border:0;background:none;text-align:left;padding:10px 16px;font:14px var(--lf-font);color:#202124;cursor:pointer}
.lf-more-menu button[hidden]{display:none}
.lf-more-menu button:hover{background:#f1f3f4}
.lf-more-menu button:disabled{color:#bdc1c6;cursor:default;background:none}
.lf-check{width:16px;visibility:hidden;color:var(--form-color)}
.lf-more-menu .on .lf-check{visibility:visible}
.lf-more-menu [data-move]{padding-left:44px}
.lf-sheet .lf-icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px}
.lf-sheet .lf-icon-button:disabled{opacity:.35;cursor:default;background:none}
.lf-sheet .lf-toolbox svg{display:block}

/* Theme palette in the top bar. */

@media(max-width:640px){
  .lf-sheet .lf-question{padding:0 16px}
  .lf-sheet .lf-question-top{flex-direction:column;align-items:stretch;gap:8px}
  .lf-type-field{width:100%}
  .lf-lists{flex-direction:column;gap:0}
  .lf-sheet .lf-answer-key[open]{margin:0 -16px;padding:4px 16px 12px}
  .lf-divider{margin:0 6px}
  .lf-inline-field{flex-wrap:wrap}
}

/* Answer key: a link in the bottom bar opens a key mode on the card, as in Google Forms quizzes. */
.lf-sheet .lf-answer-key[hidden]{display:none}
.lf-sheet .lf-answer-key,.lf-sheet .lf-answer-key[open]{background:none;margin:0;padding:8px 0 4px;border:0}
.lf-key-link{display:inline-flex;align-items:center;gap:8px;margin-right:auto;border:0;background:none;padding:8px 8px 8px 0;border-radius:4px;color:#1a73e8;font:500 14px var(--lf-font);cursor:pointer}
.lf-key-link[hidden]{display:none}
.lf-key-link span{color:#5f6368;font-weight:400;margin-left:8px}
.lf-key-link:hover{background:#f8f9fa}
.lf-key-link svg{color:#1a73e8}
.lf-key-link~.lf-type-hint:empty{display:none}
.lf-key-done{display:none;border:1px solid #dadce0;background:#fff;color:#1a73e8;border-radius:4px;padding:8px 24px;font:500 14px var(--lf-font);cursor:pointer}
.lf-key-done:hover{background:#f6fafe}
.lf-key-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:8px 0 4px}
.lf-key-head strong{display:inline-flex;align-items:center;gap:10px;font-size:16px;font-weight:400;color:#202124}
.lf-key-head svg{color:#1a73e8}
.lf-key-points{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:#5f6368}
.lf-sheet .lf-key-points input{width:64px;border:0;border-bottom:1px solid #80868b;border-radius:0;background:#f8f9fa;padding:8px;text-align:center;box-shadow:none;color:#202124}
.lf-sheet .lf-key-points input:focus{border-bottom:2px solid var(--form-color)}
.lf-key-question{font-size:16px;color:#202124;margin:16px 0 8px}
.lf-key-choices[hidden]{display:none}
.lf-key-choice{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 12px;margin:0 -12px;border-radius:4px;font-size:14px;cursor:pointer}
.lf-key-choice:hover{background:#f8f9fa}
.lf-key-choice input{width:20px;height:20px;accent-color:#188038;flex-shrink:0}
.lf-key-choice span{flex:1}
.lf-key-tick{visibility:hidden;color:#188038;font-size:18px}
.lf-key-choice.correct{background:#e6f4ea}
.lf-key-choice.correct span{font-weight:600}
.lf-key-choice.correct .lf-key-tick{visibility:visible}
.lf-key-input{display:block;margin:8px 0;font-size:13px;color:#5f6368}
.lf-key-input[hidden]{display:none}
.lf-sheet .lf-key-input textarea{display:block;width:100%;margin-top:6px;border:0;border-bottom:1px solid #80868b;border-radius:4px 4px 0 0;background:#f8f9fa;padding:10px 12px;color:#202124;box-shadow:none;resize:vertical}
.lf-sheet .lf-key-input textarea:focus{border-bottom:2px solid var(--form-color)}
.lf-sheet .lf-key-help{font-size:12px;color:#5f6368;margin:8px 0}
.lf-key-feedback{display:block;margin-top:12px}
.lf-key-feedback>span{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:500;color:#1a73e8}
.lf-key-feedback svg{width:20px;height:20px}
.lf-sheet .lf-key-feedback textarea{display:block;width:100%;margin-top:6px;border:0;border-bottom:1px solid #dadce0;border-radius:0;background:none;padding:8px 0;color:#202124;box-shadow:none;resize:vertical}
.lf-sheet .lf-key-feedback textarea:focus{border-bottom:2px solid var(--form-color)}
.lf-question.keying .lf-question-top,.lf-question.keying .lf-desc-field,.lf-question.keying .lf-type-preview,.lf-question.keying .lf-lists,.lf-question.keying [data-config],.lf-question.keying .lf-drag,
.lf-question.keying .lf-question-bottom>:not(.lf-key-done){display:none!important}
.lf-question.keying .lf-key-done{display:inline-flex}
.lf-question.keying{padding-top:12px}
.lf-key-link{flex-shrink:0;white-space:nowrap}
@media(max-width:640px){.lf-sheet .lf-question-bottom{flex-wrap:wrap}.lf-key-link{flex-basis:100%}.lf-key-head{flex-wrap:wrap}}

/* Correct-answer ticks, "Other", total points and the header note, as in Google Forms quizzes. */
.lf-item-correct{visibility:hidden;color:#188038;font-size:20px;width:40px;text-align:center;flex-shrink:0}
.lf-item.correct .lf-item-correct{visibility:visible}
.lf-question:not(.active) .lf-item-correct{width:auto}
.lf-other-text{flex:1;font-size:14px;color:#70757a;border-bottom:1px dotted #bdc1c6;padding:8px 0}
.lf-other-item[hidden],[data-other-add][hidden]{display:none!important}
.lf-other-item .lf-mark{border-radius:50%}
.lf-question[data-kind=checkbox] .lf-other-item .lf-mark{border-radius:3px}
.lf-other-item .lf-item-remove{margin-left:40px}
.lf-list-add-row{display:flex;align-items:center;gap:6px;font-size:14px;color:#202124}
.lf-list-add-row .lf-list-add{width:auto}
.lf-add-other{border:0;background:none;padding:8px 4px;color:#1a73e8;font:500 14px var(--lf-font);cursor:pointer;border-radius:4px}
.lf-add-other:hover{background:#f6fafe}
.lf-question:not(.active) .lf-list-add-row,.lf-question:not(.active) .lf-other-item .lf-item-remove{display:none}
.lf-sheet .lf-tabs{position:relative}
.lf-total{position:absolute;right:max(16px,calc(50% - 385px));top:50%;transform:translateY(-50%);font-size:13px;color:#5f6368}
.lf-total[hidden]{display:none}
.lf-title-note{font-size:14px;color:#5f6368;margin:16px 0 0;line-height:1.5}
.lf-title-note button{border:0;background:none;padding:0;color:#1a73e8;text-decoration:underline;font:inherit;cursor:pointer}
.lf-other{flex-wrap:wrap}
.lf-sheet .lf-answer .lf-other input[type=text],.lf-answer .lf-other input[type=text]{display:inline-block;flex:1;min-width:140px;width:auto;max-width:360px;border:0;border-bottom:1px solid #dadce0;border-radius:0;background:none;padding:4px 0}
@media(max-width:640px){.lf-total{position:static;transform:none;align-self:center}.lf-sheet .lf-tabs{flex-wrap:wrap}}

/* announcement comments: a tinted strip across the bottom of the post, so the
   conversation reads as separate from the announcement itself */
.cwv-comments.gc-post-comments{margin:18px -24px -16px;padding:14px 24px 16px;background:var(--panel-soft);
  border-top:1px solid var(--gc-border);border-radius:0 0 15px 15px}
.gc-post-comments .cwv-comments-head{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  color:var(--muted);gap:8px;margin-bottom:12px}
.gc-post-comments .cwv-comments-head[hidden]{display:none}
.gc-post-comments .avatar.sm{width:30px;height:30px;font-size:11px;flex:0 0 auto}
.gc-post-comments .cwv-comment{gap:10px;margin-bottom:10px;align-items:flex-start}
.gc-post-comments .cwv-comment > div{background:var(--panel);border:1px solid var(--gc-border);
  border-radius:4px 14px 14px 14px;padding:8px 14px;max-width:min(560px,100%)}
.gc-post-comments .cwv-comment-meta{font-size:12px}
.gc-post-comments .cwv-comment-meta b{font-size:13px}
.gc-post-comments .cwv-comment-body{margin-top:2px;line-height:1.45;color:var(--ink-strong)}
.gc-post-comments .cwv-comment-new > div{border-color:#c7c3f5}
.gc-post-comments .cwv-comment-form{gap:10px;margin-top:12px}
.gc-post-comments .cwv-comment-form input{padding:9px 16px;font-size:14px;background:var(--panel)}
.gc-post-comments .cwv-comment-form input:focus{outline:none;border-color:#4338ca;box-shadow:0 0 0 3px rgba(67,56,202,.12)}
.gc-post-comments .cwv-send{width:36px;height:36px}

/* ---------- messages (teacher <-> student chat, Admin DB monitor) ---------- */
.chat{display:grid;grid-template-columns:320px minmax(0,1fr);height:calc(100vh - 230px);min-height:460px;overflow:hidden;padding:0}
.chat-list{border-right:1px solid var(--border);display:flex;flex-direction:column;min-height:0}
.chat-search{display:flex;align-items:center;gap:8px;margin:14px;padding:0 12px;border:1px solid var(--border);border-radius:999px;background:var(--panel-soft);color:var(--muted)}
.chat-search input{flex:1;border:0;background:transparent;padding:10px 0;outline:none;font-size:14px;color:inherit}
.chat-list-body{overflow-y:auto;padding:0 8px 12px;flex:1}
.chat-list-cap{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:12px 10px 6px}
.chat-person{display:flex;align-items:center;gap:12px;padding:10px;border-radius:12px;text-decoration:none;color:inherit}
.chat-person:hover{background:var(--panel-soft)}
.chat-person.active{background:#eeedfb}
.chat-person[hidden]{display:none}
.chat-person-text{display:flex;flex-direction:column;min-width:0;flex:1}
.chat-person-text b{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-person-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.chat-person-top small{font-size:11px;color:var(--muted);white-space:nowrap}
.chat-person-last{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-person-last.unread{color:var(--ink-strong,#111);font-weight:600}
.chat-unread{background:#4338ca;color:#fff;font-size:11px;font-weight:700;border-radius:999px;min-width:20px;height:20px;padding:0 6px;display:grid;place-items:center}
.chat-pair{display:flex;flex:0 0 auto}
.chat-pair .avatar.s{margin-left:-10px;background:#fde2e4;color:#9f1239;border:2px solid var(--panel)}
.chat-none{color:var(--muted);font-size:13px;padding:14px 10px;margin:0}

.chat-main{display:flex;flex-direction:column;min-height:0;min-width:0}
.chat-head{display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--border)}
.chat-head div{display:flex;flex-direction:column;min-width:0}
.chat-head b{font-size:15px}
.chat-head small{font-size:12px;color:var(--muted)}
.chat-back{display:none;color:inherit;transform:rotate(180deg)}
.chat-thread{flex:1;overflow-y:auto;padding:18px 22px;display:flex;flex-direction:column;gap:4px;background:var(--panel-soft)}
.chat-day{align-self:center;font-size:11px;font-weight:600;color:var(--muted);background:var(--panel);border:1px solid var(--border);border-radius:999px;padding:3px 12px;margin:12px 0 8px}
.chat-msg{display:flex;flex-direction:column;max-width:min(560px,78%);margin-bottom:6px}
.chat-msg.theirs{align-self:flex-start;align-items:flex-start}
.chat-msg.mine{align-self:flex-end;align-items:flex-end}
.chat-bubble{padding:9px 14px;border-radius:16px;font-size:14px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-msg.theirs .chat-bubble{background:var(--panel);border:1px solid var(--border);border-bottom-left-radius:4px}
.chat-msg.mine .chat-bubble{background:#4338ca;color:#fff;border-bottom-right-radius:4px}
.chat-msg small{font-size:11px;color:var(--muted);margin-top:3px;padding:0 4px}
.chat-msg.removed .chat-bubble{background:transparent;color:var(--muted);border:1px dashed var(--border)}
.chat-bubble a{color:inherit;text-decoration:underline}
.chat-msg.theirs .chat-bubble a{color:#4338ca}
.chat-sender{font-size:11px;font-weight:600;color:var(--muted);margin:0 4px 2px}
.chat-remove{border:0;background:none;color:var(--danger,#dc2626);font-size:11px;font-weight:600;cursor:pointer;padding:0}
.chat-remove:hover{text-decoration:underline}
.chat-empty{margin:auto;text-align:center;color:var(--muted);padding:24px}
.chat-empty p{margin:6px 0 0}
.chat-pick{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1}
.chat-compose{display:flex;align-items:flex-end;gap:10px;padding:12px 16px 6px;border-top:1px solid var(--border)}
.chat-compose textarea{flex:1;resize:none;border:1px solid var(--border);border-radius:20px;padding:10px 16px;font:inherit;font-size:14px;line-height:1.4;max-height:160px;background:var(--panel);color:inherit}
.chat-compose textarea:focus{outline:none;border-color:#4338ca;box-shadow:0 0 0 3px rgba(67,56,202,.12)}
.chat-send{border:0;background:#4338ca;color:#fff;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;cursor:pointer;flex:0 0 auto}
.chat-send:disabled{opacity:.6;cursor:default}
.chat-note{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin:0;padding:2px 20px 10px}
.chat-closed{padding:14px 20px;border-top:1px solid var(--border)}
.chat-nav-count{background:#4338ca !important;color:#fff !important}
[data-theme="dark"] .chat-person.active{background:#262b4a}

@media(max-width:760px){
  .chat{grid-template-columns:1fr;height:calc(100vh - 200px)}
  .chat.chat-has-open .chat-list{display:none}
  .chat:not(.chat-has-open) .chat-main{display:none}
  .chat-list{border-right:0}
  .chat-back{display:inline-flex}
  .chat-msg{max-width:88%}
  .chat-thread{padding:14px}
}
.icon-btn .pip.chat-pip{background:#4338ca}
a.icon-btn{text-decoration:none}
@keyframes pipBump{0%{transform:scale(1)}30%{transform:scale(1.45)}60%{transform:scale(.9)}100%{transform:scale(1)}}
.pip-bump{animation:pipBump .6s ease}
.chat-msg small{display:inline-flex;align-items:center;gap:6px}
.chat-status{display:inline-flex;align-items:center;gap:3px;color:var(--muted);font-weight:600}
.chat-status .i + .i{margin-left:-8px}
.chat-status.seen{color:#4338ca}

/* chat search: one clean pill - the input inside carries no box of its own */
.chat-search{height:42px;padding:0 14px;gap:10px;background:var(--panel-soft);transition:border-color .15s,box-shadow .15s,background .15s}
.chat-search:focus-within{background:var(--panel);border-color:#4338ca;box-shadow:0 0 0 3px rgba(67,56,202,.12)}
.chat-search input[type=search]{border:0 !important;background:transparent !important;box-shadow:none !important;outline:none !important;
  border-radius:0;padding:0;margin:0;height:100%;min-width:0;width:100%}
.chat-search input[type=search]::placeholder{color:var(--muted)}
.chat-search input[type=search]::-webkit-search-cancel-button{cursor:pointer}

/* ---------- notifications drawer ---------- */
.drawer{width:min(420px,100%)}
.nf-head{flex-direction:column;align-items:stretch;gap:14px;padding:20px 20px 12px}
.nf-head-top{display:flex;justify-content:space-between;align-items:flex-start}
.nf-head strong{font-size:19px;letter-spacing:-.01em}
.nf-count{font-size:13px;color:var(--muted);margin-top:2px}
.nf-close{border:0;background:var(--panel-soft);color:var(--muted);width:34px;height:34px;border-radius:10px;display:grid;place-items:center;cursor:pointer}
.nf-close:hover{background:var(--border);color:inherit}
.nf-bar{display:flex;justify-content:space-between;align-items:center;gap:10px}
.nf-tabs{display:inline-flex;background:var(--panel-soft);border:1px solid var(--border);border-radius:999px;padding:3px}
.nf-tabs button{border:0;background:transparent;border-radius:999px;padding:6px 14px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}
.nf-tabs button.active{background:var(--panel);color:#4338ca;box-shadow:0 1px 3px rgba(20,26,51,.12)}
.nf-readall{border:0;background:none;color:#4338ca;font-size:13px;font-weight:600;display:inline-flex;align-items:center;gap:5px;cursor:pointer;padding:6px 4px;border-radius:8px}
.nf-readall:hover:not(:disabled){background:#eeedfb}
.nf-readall:disabled{color:var(--muted);opacity:.6;cursor:default}
#notifBody.drawer-body{padding:4px 10px 20px}
.nf-day{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:14px 10px 6px}
.nf-group[hidden],.nf-item-form[hidden]{display:none}
.nf-item{display:flex;align-items:flex-start;gap:12px;width:100%;text-align:left;border:0;background:transparent;border-radius:12px;padding:11px 10px;cursor:pointer;color:inherit;font:inherit;margin-bottom:2px}
.nf-item:hover{background:var(--panel-soft)}
.nf-item.unread{background:#f5f4fe}
.nf-item.unread:hover{background:#eeedfb}
.nf-ico{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;flex:0 0 auto}
.tone-violet{background:#ede9fe;color:#6d28d9}
.tone-blue{background:#dbeafe;color:#1d4ed8}
.tone-amber{background:#fef3c7;color:#b45309}
.tone-teal{background:#ccfbf1;color:#0f766e}
.tone-green{background:#dcfce7;color:#15803d}
.tone-rose{background:#ffe4e6;color:#be123c}
.tone-slate{background:#e2e8f0;color:#475569}
.nf-text{display:flex;flex-direction:column;min-width:0;flex:1;gap:2px}
.nf-title{font-size:14px;font-weight:500;line-height:1.35}
.nf-item.unread .nf-title{font-weight:700}
.nf-sub{font-size:13px;color:var(--muted);line-height:1.35;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.nf-meta{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:0 0 auto;padding-top:2px}
.nf-when{font-size:11px;color:var(--muted);white-space:nowrap}
.nf-dot{width:9px;height:9px;border-radius:50%;background:#4338ca}
.nf-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:56px 24px;color:var(--muted)}
.nf-empty[hidden]{display:none}
.nf-empty b{color:inherit;font-size:15px;margin-top:12px;color:var(--ink-strong,#111)}
.nf-empty p{margin:4px 0 0;font-size:13px}
.nf-empty-ico{width:60px;height:60px;border-radius:18px;background:var(--panel-soft);display:grid;place-items:center}
[data-theme="dark"] .nf-item.unread{background:#1f2440}
[data-theme="dark"] .nf-item.unread:hover,[data-theme="dark"] .nf-readall:hover:not(:disabled){background:#262b4a}
[data-theme="dark"] .nf-tabs button.active{color:#a5b4fc}

/* staff view of an attached form */
.lf-view-badge{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:#6d28d9;background:#ede9fe;border-radius:999px;padding:4px 10px;white-space:nowrap}
.lf-view-actions{display:flex;gap:8px}
.lf-view-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid #dadce0;background:#fff;color:#3c4043;border-radius:999px;padding:7px 14px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.lf-view-btn:hover{background:#f6f7fb}
.lf-view-btn.primary{background:var(--form-color,#673ab7);border-color:transparent;color:#fff}
.lf-view-btn.primary:hover{filter:brightness(1.08)}
.lf-view-note{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #dadce0;border-left:4px solid var(--form-color,#673ab7);border-radius:8px;padding:12px 16px;font-size:13px;color:#5f6368;margin:0 0 12px}
.lf-staff-view .lf-submit:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:640px){
  .lf-view-badge{display:none}
  .lf-view-btn{padding:7px 10px}
  .lf-view-btn:not(.primary) .i + *{display:none}
}

/* student: a form that can no longer be opened (submitted, marked, closed, past deadline) */
.gcx-card.gcx-card-locked{cursor:not-allowed;background:var(--panel-soft)}
.gcx-card.gcx-card-locked:hover{box-shadow:none;transform:none}
.gcx-card-locked .gcx-card-text b{text-decoration:none;color:var(--muted)}
.gcx-card-locked .gcx-thumb{filter:grayscale(1);opacity:.55}
.gcx-lock{display:inline-flex;align-items:center;gap:5px;align-self:flex-start;margin-top:2px;font-size:12px;font-weight:600;
  border-radius:999px;padding:3px 10px;background:#fee2e2;color:#b91c1c}
.gcx-lock.done{background:#dcfce7;color:#15803d}

/* ---- the school announcement: who posted it, and what came before ---- */
.field-error{margin:0 0 12px;padding:9px 12px;border-radius:8px;font-size:13px;
  background:rgba(220,38,38,.1);color:var(--danger);font-weight:600}

.ann-history{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}
.ann-history>.lb{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:10px}
.ann-past{padding:9px 0;border-bottom:1px solid var(--border)}
.ann-past:last-child{border-bottom:0}
.ann-past-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  font-size:12px;font-weight:600;color:var(--muted)}
.ann-past-body{margin-top:3px;font-size:13px;color:var(--text);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ann-past.is-current .ann-past-body{color:var(--text);font-weight:500}
.ann-row-body{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;max-width:46ch}

/*
 Marks an overview card as a notice rather than posted work.

 The class accent carries it in light mode. In dark mode a class with a
 dark accent - red reads 2.6:1 on the dark card - would be unreadable, and
 the accent is set per class inline so there is nothing to lighten here;
 the card's own text colour is used instead, with the weight and the icon
 still setting it apart.
*/
.gc-post-kind{display:inline-flex;align-items:center;gap:4px;font-weight:600;
  color:var(--gc-accent, var(--primary))}
.gc-post-kind svg{width:13px;height:13px;flex:0 0 auto}
[data-theme="dark"] .gc-post-kind{color:var(--gc-text, var(--text))}

/* Fix or Rotating, on the card cover so the list can be scanned for it.
   A white pill because covers come in every class colour; the type is told
   apart by its text colour, not by tinting the pill against the cover. */
.class-tags{position:absolute;top:14px;right:16px;z-index:3;display:flex;gap:6px;align-items:center}
/* Both chips share one row with the class name on a ~300px card, so they are
   a size smaller than a lone chip needed to be: at 11px with wide tracking
   the pair came to 159px and the name ran under them. */
.class-type,.class-session{
  background:rgba(255,255,255,.95);border-radius:999px;padding:3px 9px;
  font-size:10px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;
  line-height:1.4;box-shadow:0 2px 6px rgba(0,0,0,.16);white-space:nowrap}
.class-type.is-fix{color:#3b2f8f}
.class-type.is-rotating{color:#b45309}
/* When the class runs. A rotating class names both of its sittings, so that
   label falls through to the slate default rather than one session's colour.
   All four clear 4.5:1 on the white pill. */
.class-session{color:#334155}
.class-session.is-morning{color:#0369a1}
.class-session.is-afternoon{color:#15803d}
.class-session.is-evening{color:#6d28d9}
/* Keep the title clear of the chips. On a narrow card a long class name
   ran right under them - only the cards that carry one give up the space.
   One figure covers both counts now that the chips are stacked. */
/* 148px, not a guess: the widest pair on real data (AFTERNOON + ROTATING)
   measures 138px, plus a gap. Set from the chips rather than from the names
   so a longer class name wraps - the cover is min-height and grows - rather
   than sliding under them. */
.class-cover.has-type h3{padding-right:148px;font-size:18px}
/* Question: class answers with replies, and the student's question page (Google Classroom layout). */
.qp{margin-top:22px;padding-top:16px;border-top:1px solid var(--border,#dadce0)}
.qp-head{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:15px;font-weight:500}
.qp-count{color:var(--muted);font-weight:400}
.qp-replies{margin:0;padding:0;border:0}
.qp-replies .cwv-comment{padding:6px 0}
.qp-replies .cwv-comment-form{margin-top:4px}
.qs{position:relative;padding:28px 32px 32px}
.qs-close{position:absolute;top:16px;right:16px}
.qs-title-row{display:flex;align-items:center;gap:16px;padding-right:40px}
.qs-title{margin:0;font-size:32px;font-weight:400;color:#202124}
.qs-meta{margin-top:10px;font-size:14px;color:#5f6368}
.qs-points{display:flex;justify-content:space-between;gap:10px;margin-top:10px;font-size:14px;font-weight:500;color:#202124}
.qs-desc{margin:4px 0 18px;font-size:14px;line-height:1.6}
.qs-box{margin:4px 0 24px;padding:20px;border-radius:12px;background:#f0f4f9}
.qs-box-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:16px}
.qs-box-head h3{display:flex;align-items:center;gap:12px;margin:0;font-size:18px;font-weight:400;color:#202124}
.qs-eye{display:inline-flex;color:#444746;cursor:help}
.qs-state{font-size:14px;color:#202124}
.qs-state.is-missing{color:#b3261e}
.qs-state.is-done{color:#146c2e}
.qs-textarea{display:block;width:100%;min-height:56px;padding:16px 20px;border:0;border-bottom:1px solid #444746;border-radius:4px 4px 0 0;background:#dde3ea;color:#202124;font:16px/1.5 inherit;resize:none;overflow:hidden}
.qs-textarea::placeholder{color:#444746}
.qs-textarea:focus{outline:0;border-bottom:2px solid #0b57d0}
.qs-actions{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:20px}
.qs-turnin{padding:10px 24px;border:0;border-radius:20px;background:#0b57d0;color:#fff;font:500 14px inherit;cursor:pointer}
.qs-turnin:hover:not(:disabled){box-shadow:0 1px 3px rgba(0,0,0,.3)}
.qs-turnin:disabled{background:#dcdfe3;color:#8e9196;cursor:default}
.qs-btn-outline{padding:9px 24px;border:1px solid #747775;border-radius:20px;background:none;color:#0b57d0;font:500 14px inherit;cursor:pointer}
.qs-note{margin-right:auto;font-size:12px}
.qs-answer p{margin:0;white-space:pre-wrap;font-size:16px;color:#202124}
.qs .qa-choices{margin:0}
.qs-tabs{display:flex;gap:8px;margin:-28px -32px 24px;padding:0 24px;border-bottom:1px solid #c4c7c5}
.qs-tabs button{padding:14px 28px;border:0;border-bottom:3px solid transparent;background:none;color:#444746;font:500 15px inherit;cursor:pointer}
.qs-tabs button.active{color:#0b57d0;border-bottom-color:#0b57d0}
.qs-tabs~.qs-close{top:10px}
.qs-answer-text{margin:0 0 14px !important;padding:16px 28px;border-radius:8px;background:#e1e3e1}
.qs-link{display:flex;align-items:center;gap:12px;margin:6px 0;padding:8px 0;border:0;background:none;color:#0b57d0;font:500 15px inherit;cursor:pointer}
.qs-link:hover{text-decoration:underline}
/* The teacher view indents these under its icon; the student question page does not. */
.qs .cwv-rule,.qs .cwv-comments{margin-left:0}
@media(max-width:640px){.qs{padding:20px 16px}.qs-title{font-size:24px}}
/* Classmate answers: student list on the left, answers on the right (Google Classroom). */
.qp-split{display:grid;grid-template-columns:minmax(180px,38%) minmax(0,1fr);border:1px solid #c4c7c5;border-radius:0;padding:0}
.qp-tab{margin:-24px -32px -32px;border-width:0}
.qp-people{border-right:1px solid #c4c7c5}
.qp-people button{display:flex;align-items:center;gap:20px;width:100%;padding:18px 28px;border:0;border-bottom:1px solid #c4c7c5;background:none;color:#202124;font:15px inherit;text-align:left;cursor:pointer}
.qp-people button:first-child{font-weight:600}
.qp-people button.active{background:#e8f0fe}
.qp-people-ico{display:inline-flex;width:40px;justify-content:center;color:#444746}
.qp-answers{padding:24px 30px;min-width:0}
.qp-title{margin:0 0 22px;font-size:24px;font-weight:400;color:#202124}
.qp-answer{display:flex;gap:16px;align-items:flex-start;margin-bottom:22px}
.qp-answer[hidden]{display:none}
.qp-answer-main{flex:1;min-width:0}
.qp-answer-meta{font-size:15px;color:#202124}.qp-answer-meta span{margin-left:8px;color:#5f6368}
.qp-answer-text{margin:6px 0 10px;white-space:pre-wrap;font-size:15px}
.qp-pill{padding:9px 16px;border:0;border-radius:18px;background:#e8f0fe;color:#0b57d0;font:500 15px inherit;cursor:pointer}
.qp-pill:hover{background:#d3e3fd}
.qp-reply-count{margin:4px 0 10px;color:#0b57d0;font-size:15px}
.qp-reply-count[hidden],.qp-replies .cwv-comment-form[hidden],.qp-replies .qs-link[hidden]{display:none}
@media(max-width:700px){.qp-split{grid-template-columns:1fr}.qp-people{border-right:0}}
/* "Class comments" popup from a question card. */
.cc-pop{padding:24px 30px 28px;background:#eef2f9;border-radius:inherit}
.cc-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.cc-head h2{margin:0;font-size:26px;font-weight:400;color:#202124}
.cc-close{border:0;background:none;font-size:30px;line-height:1;color:#444746;cursor:pointer}
.cc-pop .cwv-comments{margin:0;padding:0;border:0}
.cc-pop .cwv-comments-head{display:none}
.qp-staff-answers{margin-top:20px}
/* Google Classroom title field: floating label, blue underline on focus, red when left empty. */
.cw-editor .cw-title-field.cw-float{position:relative;display:block;min-height:68px;padding:28px 16px 8px;border:0;border-bottom:1px solid #444746;border-radius:4px 4px 0 0;background:#dde3ea;box-shadow:none}
.cw-editor .cw-title-field.cw-float:focus-within{border:0;border-bottom:2px solid #0b57d0;box-shadow:none}
.cw-editor .cw-float input{display:block;width:100%;padding:0;border:0;background:transparent;color:#1f1f1f;font:16px/1.5 Arial,sans-serif;box-shadow:none;outline:0}
.cw-editor .cw-float input:focus{box-shadow:none;outline:0}
.cw-editor .cw-title-field.cw-float>span{position:absolute;left:16px;top:22px;margin:0;color:#444746;font-size:16px;pointer-events:none;transition:top .15s,font-size .15s,color .15s}
.cw-float>span i{font-style:normal}
.cw-editor .cw-float input:focus+span,.cw-editor .cw-float input:not(:placeholder-shown)+span{top:9px;font-size:12px}
.cw-editor .cw-title-field.cw-float input:focus+span{color:#0b57d0}
.cw-editor .cw-title-field.cw-float:has(input:user-invalid){border-bottom:2px solid #b3261e}
.cw-editor .cw-title-field.cw-float:has(input:user-invalid)>span{color:#b3261e}
.cw-card:has(.cw-float input:user-invalid) .cw-required{color:#b3261e}
/* Question type: grey box + menu with icons. */
.cw-qtype{position:relative}
.cw-qtype-btn{position:relative;display:block;width:100%;min-height:68px;padding:12px 44px 8px 16px;border:0;border-bottom:1px solid #444746;border-radius:4px 4px 0 0;background:#e3e3e3;color:#1f1f1f;text-align:left;cursor:pointer;font:inherit}
.cw-qtype-btn:hover{background:#d6d6d6}
.cw-qtype-btn[aria-expanded="true"]{border-bottom:2px solid #0b57d0}
.cw-qtype-label{display:block;font-size:12px;color:#444746}
.cw-qtype-btn[aria-expanded="true"] .cw-qtype-label{color:#0b57d0}
.cw-qtype-value{display:block;margin-top:2px;font-size:16px}
.cw-qtype-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#444746;transition:transform .15s}
.cw-qtype-btn[aria-expanded="true"] .cw-qtype-caret{transform:translateY(-50%) rotate(180deg)}
.cw-qtype-menu{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 2px);padding:8px 0;border-radius:4px;background:#f0f4f9;box-shadow:0 2px 6px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.3)}
.cw-qtype-menu[hidden]{display:none}
.cw-qtype-menu button{display:flex;align-items:center;gap:16px;width:100%;padding:12px 16px;border:0;background:none;color:#1f1f1f;font:16px Arial,sans-serif;text-align:left;cursor:pointer}
.cw-qtype-menu button svg{flex:none;color:#444746}
.cw-qtype-menu button:hover,.cw-qtype-menu button:focus{background:#dde3ea;outline:0}
.cw-qtype-menu button[aria-selected="true"]{background:#d3e3fd}
/* Type label beside a classwork title: Assignment / Quiz assignment / Question / Material. */
.gc-type-chip{display:inline-flex;align-items:center;margin-left:8px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:500;line-height:1.5;vertical-align:middle;white-space:nowrap;background:#eef2ff;color:#3949ab}
.gc-type-chip.t-quiz{background:#f3e8ff;color:#7e22ce}
.gc-type-chip.t-question{background:#fff7ed;color:#c2410c}
.gc-type-chip.t-material{background:#ecfdf5;color:#15803d}
[data-theme="dark"] .gc-type-chip{background:#1e2440;color:#a5b4fc}
[data-theme="dark"] .gc-type-chip.t-quiz{background:#2e1a40;color:#d8b4fe}
[data-theme="dark"] .gc-type-chip.t-question{background:#3a2412;color:#fdba74}
[data-theme="dark"] .gc-type-chip.t-material{background:#14301f;color:#86efac}
/* Student "View instructions" (Google Classroom): work on the left, Your work + Private comments on the right. */
.modal.wd-modal{width:min(1200px,calc(100% - 48px));min-height:min(640px,92vh);max-height:92vh}
.wd{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:40px;align-items:start;padding:36px 40px 40px}
.wd.wd-single{grid-template-columns:minmax(0,1fr)}
.wd-close{position:absolute;top:14px;right:14px;z-index:2}
.wd-main{min-width:0;padding-right:8px}
.wd .cwv-rule,.wd .cwv-comments{margin-left:0}
.wd-side{display:flex;flex-direction:column;gap:20px;padding-top:28px}
.yw{padding:22px;border-radius:12px;background:#e9eef6}
.yw-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:18px}
.yw-head h3{margin:0;font-size:24px;font-weight:400;color:#1f1f1f}
.yw-note{margin:0 0 12px;font-size:13px;color:#444746}
.yw-files{margin-bottom:12px}
.yw .gc-attach-chosen:empty,.yw-links:empty{display:none}
.yw .gc-attach-chosen,.yw-links{margin-bottom:12px}
.yw-link{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.yw-link input{flex:1;min-width:0;padding:10px 12px;border:1px solid #c4c7c5;border-radius:8px;background:#fff;font:14px inherit}
.yw-add{position:relative}
.yw-add-btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:10px 16px;border:1px solid #747775;border-radius:20px;background:none;color:#0b57d0;font:500 15px inherit;cursor:pointer}
.yw-add-btn:hover{background:rgba(11,87,208,.06)}
.yw-menu{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 4px);padding:8px 0;border-radius:6px;background:#f0f4f9;box-shadow:0 2px 6px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.3)}
.yw-menu[hidden]{display:none}
.yw-menu button{display:flex;align-items:center;gap:18px;width:100%;padding:12px 20px;border:0;background:none;color:#1f1f1f;font:15px inherit;text-align:left;cursor:pointer}
.yw-menu button:hover{background:#dde3ea}
.yw-menu-sep{margin-top:6px;padding:14px 20px 6px;border-top:1px solid #c4c7c5;font-size:13px;color:#444746}
.yw-app{flex:none;width:20px;height:22px;border-radius:3px}
.yw-docs{background:#4285f4}.yw-slides{background:#f4b400}.yw-sheets{background:#0f9d58}.yw-drawings{background:#db4437}
.yw-submit{display:block;width:100%;margin-top:14px;padding:10px 16px;border:0;border-radius:20px;background:#0b57d0;color:#fff;font:500 15px inherit;cursor:pointer}
.yw-submit:hover{box-shadow:0 1px 3px rgba(0,0,0,.3)}
.yw .lf-chip{margin-bottom:12px;width:100%}
.pc{margin:0;padding:0;border:0}
.pc-head{display:flex;align-items:center;gap:14px;margin-bottom:14px;font-size:15px;color:#1f1f1f}
.pc-add{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:8px;border:0;background:none;color:#0b57d0;font:500 15px inherit;cursor:pointer}
.pc .cwv-comment-form[hidden]{display:none}
@media(max-width:820px){.wd{grid-template-columns:1fr;padding:20px 16px}.wd-side{padding-top:0}}
.cwv-private{margin-top:22px;padding:18px;border-radius:12px;background:#f0f4f9}
/* Google Forms header photo: a 4:1 banner above the title card. */
.lf-header-image{position:relative;margin:12px 0 0;border:1px solid #dadce0;border-radius:8px;overflow:hidden;aspect-ratio:4/1;background:#fff}
.lf-header-image img{display:block;width:100%;height:100%;object-fit:cover}
.lf-header-image+.lf-title-card,.lf-header-image+.lf-response-title{margin-top:12px}
.lf-header-remove{position:absolute;top:8px;right:8px;width:32px;height:32px;border:0;border-radius:50%;background:rgba(32,33,36,.6);color:#fff;font-size:20px;line-height:1;cursor:pointer}
/* "Connect Google" prompt for copying a Google Form with its answer key. */
.lf-connect{position:fixed;z-index:200;left:50%;top:50%;transform:translate(-50%,-50%);width:min(400px,calc(100% - 32px));background:#fff;color:#202124;border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.3);padding:24px;font-family:var(--lf-font)}
.lf-connect strong{display:block;font-size:18px;margin-bottom:8px}.lf-connect p{margin:0 0 20px;font-size:14px;line-height:1.5;color:#5f6368}
.lf-connect-actions{display:flex;justify-content:flex-end;gap:10px}.lf-connect .lf-done{background:var(--form-color,#1a73e8)}

/* LMS Forms typography and text boxes, matched to the Google Forms editor:
   Google Sans (or Roboto) for the form title, Roboto everywhere else. */
:root{--lf-font:Roboto,"Kantumruy Pro",Arial,sans-serif;--lf-display:"Google Sans","Product Sans",Roboto,"Kantumruy Pro",Arial,sans-serif}
/* Theme > Text style sets --lf-{header,question,text}-{font,size} on the form; these are the defaults. */
.lf-sheet,.lf-response{font-family:var(--lf-font);letter-spacing:.1px}
.lf-sheet .lf-title-card{padding:22px 24px 24px}
.lf-sheet .lf-title-note{font:400 14px/20px var(--lf-font);color:#5f6368;margin:16px 0 0}

/* Every title and description is a rich box (see richField in lms.js); its plain field stays hidden. */
.lf-sheet [data-rich][hidden]{display:none!important}
.lf-rich{position:relative;min-height:20px;padding:0 0 6px;border-bottom:1px solid transparent;outline:0;color:#202124;font:400 var(--lf-text-size,11pt)/1.45 var(--lf-text-font,var(--lf-font));word-break:break-word;cursor:text}
.lf-rich.is-empty::before{content:attr(data-placeholder);position:absolute;color:#70757a;pointer-events:none}
.lf-rich:focus{border-bottom:2px solid var(--form-color);padding-bottom:5px}
.lf-rich-line br{display:none}
.lf-rich a,.lf-description a,.lf-answer legend a,.lf-question-description a,.lf-layout-block a{color:#1a73e8;text-decoration:underline}
.lf-rich ul,.lf-rich ol,.lf-description ul,.lf-description ol{margin:4px 0;padding-left:24px}
/* Form title and description. */
.lf-title-card .lf-rich-line{font:400 var(--lf-header-size,24pt)/1.25 var(--lf-header-font,var(--lf-display));letter-spacing:0;padding-bottom:4px}
.lf-title-card .lf-rich-line:focus{padding-bottom:3px}
.lf-title-card .lf-rich:not(.lf-rich-line){margin-top:16px}
.lf-sheet .lf-title-card.active .lf-rich:not(:focus){border-bottom-color:#dadce0}
/* Question title: grey filled box while the card is open, as in Google Forms. */
.lf-title-field .lf-rich{padding:16px 0 8px;font:400 var(--lf-question-size,12pt)/1.5 var(--lf-question-font,var(--lf-font))}
.lf-question.active .lf-title-field .lf-rich{background:#f8f9fa;padding:16px;border-radius:4px 4px 0 0;border-bottom-color:#80868b}
.lf-question.active .lf-title-field .lf-rich:focus{padding-bottom:15px;border-bottom:2px solid var(--form-color)}
/* Question description. */
.lf-desc-field .lf-rich{color:#202124;padding:6px 0}
.lf-question.active .lf-desc-field .lf-rich:not(:focus){border-bottom-color:#dadce0}
.lf-desc-field .lf-rich:focus{padding-bottom:5px}

/* B / I / U / link / remove formatting: shown under a box while it is being edited. */
.lf-rich-tools{display:none;align-items:center;gap:8px;margin:8px 0 0 -8px}
.lf-rich:focus+.lf-rich-tools{display:flex}
.lf-rich-tools button{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:none;color:#5f6368;font-size:15px;cursor:pointer}
.lf-rich-tools button:hover{background:#f1f3f4;color:#202124}
.lf-rich-tools button.on{background:#e8eaed;color:#202124}

/* The answering side: the same title and description type. */
.lf-sheet .lf-response-title h3,.lf-response-title h3{font:400 var(--lf-header-size,24pt)/1.25 var(--lf-header-font,var(--lf-display));color:#202124;letter-spacing:0}
.lf-response-title .lf-description{font:400 var(--lf-text-size,11pt)/1.45 var(--lf-text-font,var(--lf-font));color:#202124;white-space:pre-wrap;margin:12px 0 0;word-break:break-word}
.lf-response-title .lf-description:empty{display:none}
.lf-sheet .lf-answer legend,.lf-sheet .lf-layout-block h3{font:400 var(--lf-question-size,12pt)/1.5 var(--lf-question-font,var(--lf-font));letter-spacing:.1px;color:#202124}
.lf-question-description,.lf-sheet .lf-layout-block p{font:400 var(--lf-text-size,11pt)/1.45 var(--lf-text-font,var(--lf-font))}
.lf-type-preview,.lf-list-add,.lf-sheet .lf-item input,.lf-sheet .lf-choice,.lf-sheet .lf-answer :is(input,textarea,select){font-family:var(--lf-text-font,var(--lf-font));font-size:var(--lf-text-size,11pt)}
@media(max-width:640px){.lf-title-card .lf-rich-line,.lf-sheet .lf-response-title h3,.lf-response-title h3{font-size:min(var(--lf-header-size,24pt),24px)}}

/* Theme panel, docked on the right under the bar, as in Google Forms. */
.lf-theme{position:fixed;right:0;bottom:0;top:110px;z-index:6;width:min(340px,100vw);overflow:auto;background:#fff;border-left:1px solid #dadce0;box-shadow:-2px 0 6px rgba(60,64,67,.12);color:#202124;font-family:var(--lf-font);letter-spacing:.1px}
.lf-theme[hidden]{display:none}
.lf-theme-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:16px;padding:10px 12px 10px 24px;background:#fff;border-bottom:1px solid #dadce0;box-shadow:0 1px 2px rgba(60,64,67,.12);color:#5f6368}
.lf-theme-head strong{flex:1;font:400 22px/28px var(--lf-display);color:#202124}
.lf-theme-head .lf-icon-button{font-size:28px;line-height:1}
.lf-theme section{padding:24px;border-bottom:1px solid #dadce0}
.lf-theme section:last-child{border-bottom:0}
.lf-theme h4{margin:0 0 16px;font:500 16px/24px var(--lf-font)}
.lf-theme-label{display:block;margin:0 0 8px;font-size:16px}
.lf-theme-row{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:12px;margin-bottom:24px}
.lf-theme-row:last-child{margin-bottom:0}
.lf-theme select{width:100%;height:52px;padding:0 10px;border:1px solid #dadce0;border-radius:4px;background:#fff;color:#202124;font:16px var(--lf-font);cursor:pointer}
.lf-theme select:focus{outline:2px solid var(--form-color);outline-offset:-1px}
.lf-theme-choose,.lf-theme-file{display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:0 16px;border:1px solid #dadce0;border-radius:4px;background:#fff;color:#202124;font:16px var(--lf-font)}
.lf-theme-choose{cursor:pointer}
.lf-theme-choose:hover{background:#f8f9fa}
.lf-theme-choose[hidden],.lf-theme-file[hidden]{display:none}
.lf-theme-file{padding:0 8px 0 0;gap:4px;overflow:hidden}
.lf-theme-file i{color:#d93025}
.lf-theme-file-open{display:inline-flex;align-items:center;gap:12px;align-self:stretch;padding:0 8px 0 16px;border:0;background:none;color:inherit;font:inherit;cursor:pointer}
.lf-theme-file-open:hover span{text-decoration:underline}
.lf-theme-file:has(.lf-theme-file-open:hover){background:#f8f9fa}
.lf-theme-file-remove{width:32px;height:32px;border:0;border-radius:50%;background:none;color:#5f6368;font-size:24px;line-height:1;cursor:pointer}
.lf-theme-file-remove:hover{background:#e8eaed}
.lf-swatches{display:flex;flex-wrap:wrap;gap:10px;max-width:276px}
.lf-swatches>button,.lf-swatch-add{position:relative;width:36px;height:36px;flex-shrink:0;border:0;border-radius:50%;background:var(--swatch);cursor:pointer}
.lf-swatches>button[hidden]{display:none}
.lf-swatches>button:hover{box-shadow:0 1px 3px rgba(60,64,67,.4)}
.lf-swatches>button.on::after{content:"";position:absolute;left:13px;top:9px;width:8px;height:14px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg)}
[data-background]{box-shadow:inset 0 0 0 1px #dadce0}
[data-background].on::after{border-color:#202124!important}
.lf-swatch-add{display:grid;place-items:center;width:28px;height:28px;margin:4px;background:#e8eaed;color:#5f6368;font-size:22px;line-height:1}
.lf-swatch-add:hover{background:#dadce0}
.lf-swatch-add input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.lf-link{border:0;background:none;padding:0;color:#1a73e8;text-decoration:underline;font:inherit;cursor:pointer}
@media(min-width:1000px){
  .lf-sheet.lf-theming .lf-sheet-body{margin-right:340px}
  .lf-sheet.lf-theming .lf-toolbox{right:calc(340px + max(16px, (100vw - 340px) / 2 - 461px))}
}

/* Dialogs over the form builder (Select header, Insert link), in place of the browser's prompt(). */
.lf-dialog{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:24px;border:0;border-radius:8px;background:#fff;color:#202124;box-shadow:0 12px 40px rgba(0,0,0,.3);font-family:var(--lf-font);letter-spacing:.1px}
.lf-dialog-wide{width:min(640px,calc(100vw - 32px))}
.lf-dialog::backdrop{background:rgba(32,33,36,.6)}
.lf-dialog h2{margin:0 0 20px;font:400 22px/28px var(--lf-display)}
.lf-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}
.lf-dialog .lf-done{background:var(--form-color,#673ab7)}
.lf-dialog .lf-done:disabled{background:#e8eaed;color:#9aa0a6;cursor:default;filter:none;box-shadow:none}
.lf-dialog-cancel{border:0;border-radius:4px;background:none;color:var(--form-color,#673ab7);padding:10px 16px;font:600 14px var(--lf-font);cursor:pointer}
.lf-dialog-cancel:hover{background:#f1f3f4}
.lf-dialog-field{display:block;margin:0 0 16px}
.lf-dialog-field span{display:block;margin-bottom:6px;font-size:12px;color:#5f6368}
.lf-dialog-field input{width:100%;height:44px;padding:0 12px;border:1px solid #dadce0;border-radius:4px;background:#fff;color:#202124;font:15px var(--lf-font);box-shadow:none}
.lf-dialog-field input:focus{outline:0;border:2px solid var(--form-color,#673ab7);padding:0 11px}
.lf-dialog-note{margin:12px 0 0;font-size:13px;color:#d93025}
.lf-dialog-note[hidden]{display:none}
.lf-dialog-tabs{display:flex;gap:24px;margin:-8px 0 20px;border-bottom:1px solid #dadce0}
.lf-dialog-tabs button{position:relative;border:0;background:none;padding:10px 4px 12px;color:#5f6368;font:500 14px var(--lf-font);cursor:pointer}
.lf-dialog-tabs button.active{color:var(--form-color,#673ab7)}
.lf-dialog-tabs button.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--form-color,#673ab7)}
.lf-header-preview{margin-top:16px;border:1px solid #dadce0;border-radius:8px;overflow:hidden;aspect-ratio:4/1;background:#f1f3f4}
.lf-header-preview[hidden]{display:none}
.lf-header-preview img{display:block;width:100%;height:100%;object-fit:cover}
.lf-dialog-field[hidden]{display:none}

/* Select header > Themes: a strip of categories over a scrolling column of pictures, as in Google Forms. */
.lf-gallery[hidden]{display:none}
.lf-gallery-strip{position:relative;display:flex;align-items:center;margin:-12px 0 12px;border-bottom:1px solid #dadce0}
.lf-gallery-cats{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;scroll-behavior:smooth}
.lf-gallery-cats::-webkit-scrollbar{display:none}
.lf-gallery-cats button{position:relative;flex-shrink:0;border:0;background:none;padding:12px 14px;color:#3c4043;font:400 15px var(--lf-font);white-space:nowrap;cursor:pointer;border-radius:4px 4px 0 0}
.lf-gallery-cats button:hover{background:#f1f3f4}
.lf-gallery-cats button.active{color:#1a73e8}
.lf-gallery-cats button.active::after{content:"";position:absolute;left:8px;right:8px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:#1a73e8}
.lf-gallery-arrow{position:absolute;top:50%;z-index:1;width:32px;height:32px;margin-top:-16px;border:0;border-radius:50%;background:#fff;color:#5f6368;box-shadow:0 1px 3px rgba(60,64,67,.35);cursor:pointer}
.lf-gallery-arrow.prev{left:-6px}
.lf-gallery-arrow.next{right:-6px}
.lf-gallery-arrow[hidden]{display:none}
.lf-gallery-list{display:flex;flex-direction:column;gap:14px;max-height:min(52vh,460px);overflow-y:auto;padding:4px 6px 4px 2px;margin-right:-6px}
.lf-gallery-item{position:relative;flex-shrink:0;display:block;width:100%;aspect-ratio:10/3;padding:0;border:0;border-radius:12px;overflow:hidden;background:#f1f3f4;cursor:pointer;box-shadow:0 1px 3px rgba(60,64,67,.3)}
.lf-gallery-item img{display:block;width:100%;height:100%;object-fit:cover}
.lf-gallery-item:hover{box-shadow:0 2px 8px rgba(60,64,67,.4)}
.lf-gallery-item:focus-visible{outline:3px solid #1a73e8;outline-offset:2px}
.lf-gallery-item.on{outline:4px solid var(--form-color,#673ab7);outline-offset:-4px}
.lf-gallery-item.on::after{content:"\2713";position:absolute;top:10px;right:10px;width:30px;height:30px;border-radius:50%;background:var(--form-color,#673ab7);color:#fff;font:700 18px/30px var(--lf-font);text-align:center;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.lf-dialog-text{margin:0;font-size:14px;line-height:20px;color:#5f6368}
.badge.yellow{background:#fef9c3;color:#854d0e}
[data-theme="dark"] .badge.yellow{background:#3f3410;color:#fde68a}
