/* School portal demo — design copied from Google's Material 3 (the design system of
   Google's own apps, incl. Classroom and Gmail), using its published tokens
   (github.com/material-components/material-web, tokens/versions/latest):
   navigation rail 80px / active pill 56×32 · navigation bar 80px / pill 64×32 ·
   top app bar 64px · buttons 40px, full pill · chips 32px, 8px corners ·
   cards 12px corners · list rows 56/72px, 40px avatar · type scale and elevation levels.
   Colors: generated with Google's official material-color-utilities from the school's
   own green (seed #0B6E4F, SchemeTonalSpot). Subject colors are "harmonized" to it.
   Shell layout (tinted frame + white rounded sheet) copies Gmail. Icons: Material Symbols. */
:root {
  --md-primary: #1e6a4f; --md-on-primary: #fff;
  --md-primary-container: #a8f2cf; --md-on-primary-container: #005139;
  --md-secondary: #4d6358; --md-secondary-container: #cfe9d9; --md-on-secondary-container: #354b40;
  --md-tertiary: #3e6374; --md-tertiary-container: #c1e8fc; --md-on-tertiary-container: #254b5b;
  --md-error: #ba1a1a; --md-error-container: #ffdad6; --md-on-error-container: #93000a;
  --md-surface: #f5fbf5; --md-sc-lowest: #ffffff; --md-sc-low: #eff5ef; --md-sc: #eaefea; --md-sc-high: #e4eae4; --md-sc-highest: #dee4de;
  --md-on-surface: #171d1a; --md-on-surface-variant: #404944;
  --md-outline: #707973; --md-outline-variant: #bfc9c2;
  --md-inverse-surface: #2c322e; --md-inverse-on-surface: #edf2ec; --md-inverse-primary: #8cd5b3;
  --warn: #8c5000; --warn-container: #ffdcbf; --on-warn-container: #6a3b00;
  --ok: #006d41;
  --bad-bg: var(--md-error-container); --bad-fg: var(--md-on-error-container);
  --warn-bg: var(--warn-container); --warn-fg: var(--on-warn-container);
  --elev1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15);
  --elev2: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 6px 2px rgba(0, 0, 0, .15);
  --elev3: 0 1px 3px rgba(0, 0, 0, .3), 0 4px 8px 3px rgba(0, 0, 0, .15);
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 28px; --r-full: 9999px;
  --rail-w: 80px;
  --font: 'Google Sans', 'Google Sans Text', Roboto, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5; letter-spacing: .01em;
  color: var(--md-on-surface); background: var(--md-sc); -webkit-font-smoothing: antialiased;
}
a { color: var(--md-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 400; }
.msi {
  font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; flex: none; width: 1em; overflow: hidden; user-select: none;
}
.msi.fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.msi.s { font-size: 20px; } .msi.xs { font-size: 18px; }
.muted { color: var(--md-on-surface-variant); }
.small { font-size: 14px; line-height: 20px; }
.tiny { font-size: 12px; line-height: 16px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- navigation rail (M3: 80px, pill 56×32) ---------- */
.gnav {
  position: fixed; inset: 0 auto 0 0; width: var(--rail-w); background: var(--md-sc);
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 16px; z-index: 30; overflow-y: auto;
}
.gnav-logo { height: 56px; display: grid; place-items: center; margin-bottom: 4px; }
.gnav-logo:hover { text-decoration: none; }
.crest {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--md-primary); color: var(--md-on-primary); font-weight: 700; font-size: 15px; letter-spacing: .5px;
}
.gnav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; color: var(--md-on-surface-variant); position: relative; }
.gnav-item:hover { text-decoration: none; }
.gnav-item .ind { width: 56px; height: 32px; border-radius: var(--r-full); display: grid; place-items: center; position: relative; transition: background-color .2s; }
.gnav-item:hover .ind { background: rgba(23, 29, 26, .08); }
.gnav-item .lbl { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px; }
.gnav-item.active .ind { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.gnav-item.active .msi { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.gnav-item.active .lbl { font-weight: 700; color: var(--md-on-surface); }
.gnav-item .nb {
  position: absolute; top: -4px; left: 30px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--md-error); color: #fff; font-size: 11px; font-weight: 500; line-height: 16px; text-align: center;
}
.only-sm { display: none !important; }

/* ---------- shell: tinted frame + white rounded sheet (Gmail) ---------- */
.main { margin-left: var(--rail-w); min-height: 100vh; display: flex; flex-direction: column; padding-right: 16px; }
.topbar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 4px; flex: none; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--md-on-surface-variant); white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--md-on-surface-variant); padding: 6px 8px; border-radius: var(--r-full); }
.crumbs a:hover { background: rgba(23, 29, 26, .08); text-decoration: none; }
.crumbs .sep { color: var(--md-outline); font-size: 18px; }
.crumbs .pre { padding: 6px 8px; }
.crumbs b { color: var(--md-on-surface); font-weight: 500; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.who { display: flex; align-items: center; gap: 8px; flex: none; }
.who-name { font-size: 14px; color: var(--md-on-surface-variant); }
.sample-tag { font-size: 12px; font-weight: 500; color: var(--on-warn-container); background: var(--warn-container); border-radius: var(--r-sm); padding: 4px 10px; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--r-full); border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--md-on-surface-variant); }
.iconbtn:hover { background: rgba(23, 29, 26, .08); }
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; font-size: 13px; font-weight: 500; }
.av.lg { width: 48px; height: 48px; font-size: 18px; }
.av.sm { width: 32px; height: 32px; font-size: 12px; }
.content { flex: 1; background: var(--md-sc-lowest); border-radius: var(--r-lg); padding: 28px 32px 48px; margin-bottom: 16px; min-width: 0; }
.cols { display: flex; gap: 32px; align-items: flex-start; }
.page { flex: 1; min-width: 0; }
.aside { width: 320px; flex: none; }
.ph { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.ph h1 { font-size: 28px; line-height: 36px; flex: 1; min-width: 200px; }
.ph .sub { width: 100%; color: var(--md-on-surface-variant); font-size: 14px; margin-top: -8px; }
.section-h { font-size: 16px; line-height: 24px; font-weight: 500; margin: 32px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-h:first-child { margin-top: 0; }
.section-h .cnt { font-size: 12px; font-weight: 500; background: var(--md-sc-high); color: var(--md-on-surface-variant); border-radius: var(--r-full); padding: 0 8px; line-height: 20px; }

/* ---------- buttons (M3: 40px, full pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px;
  border-radius: var(--r-full); cursor: pointer; border: 1px solid var(--md-outline); background: transparent;
  color: var(--md-primary); font-size: 14px; font-weight: 500; letter-spacing: .1px; white-space: nowrap; text-decoration: none; transition: background-color .15s, box-shadow .15s;
}
.btn:hover { background: rgba(30, 106, 79, .08); text-decoration: none; }
.btn .msi { font-size: 18px; margin-left: -8px; }
.btn.primary { background: var(--md-primary); border-color: transparent; color: var(--md-on-primary); }
.btn.primary:hover { box-shadow: var(--elev1); background: #2a7558; }
.btn.tonal { background: var(--md-secondary-container); border-color: transparent; color: var(--md-on-secondary-container); }
.btn.tonal:hover { box-shadow: var(--elev1); }
.btn.danger { background: var(--md-error); border-color: transparent; color: #fff; }
.btn.ghost { border-color: transparent; padding: 0 12px; }
.btn.ghost .msi { margin-left: 0; }
.btn.small { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .38; cursor: not-allowed; box-shadow: none; }
.fab { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px 0 16px; border-radius: var(--r-lg); border: 0; background: var(--md-primary-container); color: var(--md-on-primary-container); font-size: 16px; font-weight: 500; box-shadow: var(--elev3); cursor: pointer; }
.fab:hover { box-shadow: 0 2px 3px rgba(0, 0, 0, .3), 0 6px 10px 4px rgba(0, 0, 0, .15); }

/* ---------- status chips (text + icon, never color alone) ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px 0 8px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; white-space: nowrap; letter-spacing: .3px; }
.pill .msi { font-size: 16px; }
.pill.assigned, .pill.open, .pill.draft { background: var(--md-sc-high); color: var(--md-on-surface-variant); }
.pill.soon, .pill.late, .pill.submitted, .pill.L, .pill.partial { background: var(--warn-container); color: var(--on-warn-container); }
.pill.turned, .pill.done, .pill.approved, .pill.paid, .pill.P { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.pill.missing, .pill.returned, .pill.A, .pill.owing { background: var(--md-error-container); color: var(--md-on-error-container); }
.pill.graded { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }

/* ---------- home hero ---------- */
.hero { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hero h1 { font-size: 32px; line-height: 40px; }
.hero .date { color: var(--md-on-surface-variant); font-size: 16px; margin-top: 4px; }
.hero .grow { flex: 1; }
.sumrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 28px; }
.sum { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--md-sc-low); color: var(--md-on-surface); border: 1px solid transparent; }
a.sum:hover { text-decoration: none; background: var(--md-sc); }
.sum .ic { width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.sum .n { font-size: 28px; line-height: 32px; }
.sum .t { font-size: 14px; color: var(--md-on-surface-variant); line-height: 20px; }
.sum.bad .ic { background: var(--md-error-container); color: var(--md-on-error-container); }
.sum.bad .n { color: var(--md-error); }
.sum.warn .ic { background: var(--warn-container); color: var(--on-warn-container); }
.sum.good .ic { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.callout { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-radius: var(--r-lg); background: var(--md-primary); color: var(--md-on-primary); margin-bottom: 28px; flex-wrap: wrap; }
.callout .msi { font-size: 32px; }
.callout b { display: block; font-size: 18px; font-weight: 500; }
.callout span { opacity: .9; font-size: 14px; }
.callout .grow { flex: 1; min-width: 200px; }
.callout .btn { background: var(--md-sc-lowest); color: var(--md-primary); border-color: transparent; }

/* ---------- today timeline ---------- */
.today { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; scrollbar-width: thin; }
.slot { flex: none; width: 150px; border-radius: var(--r-md); padding: 10px 12px; font-size: 12px; line-height: 16px; background: var(--md-sc-low); color: var(--md-on-surface); border-top: 4px solid var(--c, var(--md-outline-variant)); }
.slot:hover { text-decoration: none; background: var(--md-sc); }
.slot b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.now { background: var(--md-primary-container); color: var(--md-on-primary-container); box-shadow: inset 0 0 0 2px var(--md-primary); }
.slot.now .muted { color: var(--md-on-primary-container); }
.slot .nowtag { display: inline-block; background: var(--md-primary); color: #fff; border-radius: var(--r-xs); padding: 0 6px; font-weight: 500; margin-left: 4px; }
.slot.free { background: transparent; border: 1px dashed var(--md-outline-variant); border-top: 4px solid var(--md-outline-variant); color: var(--md-on-surface-variant); }
.slot.past { opacity: .55; }

/* ---------- subject cards (Classroom class card) ---------- */
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dcard { border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; background: var(--md-sc-lowest); color: var(--md-on-surface); transition: box-shadow .2s; min-height: 236px; }
.dcard:hover { box-shadow: var(--elev2); text-decoration: none; }
.dcard-hero { height: 100px; padding: 16px; color: #fff; position: relative; overflow: hidden; background: var(--c); }
.dcard-hero::before { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -50px; top: -70px; background: rgba(255, 255, 255, .12); }
.dcard-hero::after { content: ''; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: 50px; top: 46px; background: rgba(255, 255, 255, .08); }
.dcard-hero .glyph { display: none; }
.dcard-title { font-size: 22px; line-height: 28px; position: relative; z-index: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard-sub { font-size: 14px; line-height: 20px; position: relative; z-index: 1; opacity: .92; }
.dcard-body { padding: 12px 16px; flex: 1; font-size: 14px; line-height: 20px; }
.dcard-body .due { display: block; color: var(--md-on-surface-variant); font-size: 12px; margin-top: 4px; }
.dcard-body .due:first-child { margin-top: 0; }
.dcard-body .dt { display: block; color: var(--md-on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard-body .none { color: var(--md-on-surface-variant); }
.dcard-actions { border-top: 1px solid var(--md-outline-variant); display: flex; justify-content: flex-end; gap: 4px; padding: 4px 8px; color: var(--md-on-surface-variant); min-height: 48px; align-items: center; }
.dcard-actions span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.dcard-actions .nb { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--md-error); color: #fff; font-size: 11px; line-height: 16px; text-align: center; font-weight: 500; }

/* ---------- lists (M3 list: 56/72px rows, 40px leading) ---------- */
.aside section { margin-bottom: 28px; }
.aside h2 { font-size: 16px; line-height: 24px; font-weight: 500; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; gap: 16px; align-items: center; min-height: 72px; padding: 8px 0; border-bottom: 1px solid var(--md-sc-high); }
.todo li:last-child { border-bottom: 0; }
.todo .tico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--cc, var(--md-secondary-container)); color: var(--c, var(--md-on-secondary-container)); }
.todo .tico .av { width: 40px; height: 40px; }
.todo .tb { flex: 1; min-width: 0; }
.todo .tt { font-size: 16px; line-height: 24px; display: block; color: var(--md-on-surface); overflow: hidden; text-overflow: ellipsis; }
a.tt:hover { color: var(--md-primary); }
.todo .tm { font-size: 14px; line-height: 20px; color: var(--md-on-surface-variant); display: block; }
.todo .tm.red { color: var(--md-error); font-weight: 500; }
.todo .tr { flex: none; text-align: right; }
.todo.tight li { min-height: 56px; }
.todo.tight .tt { font-size: 14px; line-height: 20px; }
.empty { color: var(--md-on-surface-variant); font-size: 14px; padding: 16px 0; }
.empty-big { text-align: center; padding: 28px 16px; border-radius: var(--r-lg); background: var(--md-sc-low); color: var(--md-on-surface-variant); }
.empty-big .msi { font-size: 40px; color: var(--md-primary); display: block; margin: 0 auto 6px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .4px; color: var(--md-on-surface-variant); padding: 12px 16px; border-bottom: 1px solid var(--md-outline-variant); white-space: nowrap; background: var(--md-sc-low); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--md-sc-high); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--md-sc-low); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 500; border-top: 1px solid var(--md-outline-variant); background: var(--md-sc-low); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 10px; vertical-align: 0; }

/* ---------- boxes, notes, KPIs ---------- */
.box { border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); background: var(--md-sc-lowest); padding: 16px 20px; }
.box + .box { margin-top: 16px; }
.box h3 { font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.note { position: relative; background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); padding: 14px 16px 14px 48px; border-radius: var(--r-md); font-size: 14px; line-height: 20px; margin-bottom: 20px; }
.note::before { position: absolute; left: 16px; top: 14px; font-family: 'Material Symbols Rounded'; content: 'info'; font-size: 20px; line-height: 20px; font-variation-settings: 'FILL' 1; }
.note a { color: inherit; text-decoration: underline; font-weight: 500; }
.note .btn { margin-left: 8px; }
.note.warn { background: var(--warn-container); color: var(--on-warn-container); }
.note.warn::before { content: 'schedule'; }
.note.ok { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.note.ok::before { content: 'check_circle'; }
.note.bad { background: var(--md-error-container); color: var(--md-on-error-container); }
.note.bad::before { content: 'error'; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 28px; }
.kpi { border-radius: var(--r-lg); padding: 16px; background: var(--md-sc-low); color: var(--md-on-surface); display: block; min-width: 0; }
a.kpi:hover { text-decoration: none; background: var(--md-sc); }
.kpi .k { font-size: 14px; color: var(--md-on-surface-variant); font-weight: 500; }
.kpi .v { font-size: 32px; line-height: 40px; margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .d { font-size: 12px; color: var(--md-on-surface-variant); }
.kpi.red .v { color: var(--md-error); }
.kpi.green .v { color: var(--md-primary); }
.bar { height: 8px; background: var(--md-sc-high); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--md-primary); border-radius: 4px; }
.bar.warn i { background: var(--warn); }
.bar.red i { background: var(--md-error); }

/* ---------- subject page (Classroom banner + tabs) ---------- */
.course-banner { border-radius: var(--r-lg); color: #fff; padding: 24px; min-height: 160px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 20px; background: var(--c); }
.course-banner::before { content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%; right: -80px; top: -150px; background: rgba(255, 255, 255, .12); }
.course-banner::after { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: 140px; top: 70px; background: rgba(255, 255, 255, .08); }
.course-banner .glyph { position: absolute; right: 28px; bottom: 14px; font-size: 64px; font-weight: 700; color: rgba(255, 255, 255, .22); line-height: 1; }
.course-banner h1 { font-size: 36px; line-height: 44px; position: relative; z-index: 1; }
.course-banner p { margin: 4px 0 0; position: relative; z-index: 1; font-size: 16px; opacity: .92; }
.course { display: block; }
.cnav { display: flex; gap: 4px; border-bottom: 1px solid var(--md-outline-variant); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.cnav a { padding: 14px 16px 12px; color: var(--md-on-surface-variant); font-size: 14px; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; border-radius: 3px 3px 0 0; }
.cnav a:hover { background: rgba(23, 29, 26, .06); text-decoration: none; }
.cnav a.active { color: var(--c, var(--md-primary)); border-bottom-color: var(--c, var(--md-primary)); }
.cbody { min-width: 0; }

/* stream */
.stream { display: flex; gap: 24px; align-items: flex-start; }
.upcoming { width: 220px; flex: none; border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); padding: 16px; font-size: 14px; }
.upcoming h3 { font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.upcoming a { display: block; margin-bottom: 10px; line-height: 20px; }
.posts { flex: 1; min-width: 0; }
.post { border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); padding: 16px 20px; margin-bottom: 12px; background: var(--md-sc-lowest); }
.post-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-h b { display: block; font-size: 14px; font-weight: 500; }
.post-h span { font-size: 12px; color: var(--md-on-surface-variant); }
.post p { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 20px; }
.post.notice { border-left: 4px solid var(--md-primary); }
.post.mini { padding: 12px 16px; display: flex; gap: 16px; align-items: center; color: var(--md-on-surface); }
.post.mini:hover { box-shadow: var(--elev1); text-decoration: none; }
.post textarea { margin-top: 4px; }

/* classwork */
.topic { margin-bottom: 28px; }
.topic h3 { font-size: 22px; line-height: 28px; color: var(--c, var(--md-primary)); padding-bottom: 8px; border-bottom: 1px solid var(--c, var(--md-primary)); margin-bottom: 4px; }
.cw { display: flex; align-items: center; gap: 16px; padding: 10px 12px; border-radius: var(--r-md); color: var(--md-on-surface); min-height: 64px; }
.cw:hover { background: var(--md-sc-low); text-decoration: none; }
.circ { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--md-primary)); color: #fff; flex: none; }
.circ.grey { background: var(--md-sc-high); color: var(--md-on-surface-variant); }
.cw .cw-t { flex: 1; min-width: 0; }
.cw .cw-t b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.cw .cw-d { font-size: 12px; color: var(--md-on-surface-variant); white-space: nowrap; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* assignment page (Classroom) */
.item { display: flex; gap: 32px; align-items: flex-start; }
.item-main { flex: 1; min-width: 0; }
.item-head { display: flex; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--c, var(--md-primary)); margin-bottom: 20px; }
.item-head h1 { font-size: 32px; line-height: 40px; color: var(--c, var(--md-on-surface)); }
.item-meta { font-size: 14px; color: var(--md-on-surface-variant); margin-top: 4px; }
.item-meta2 { display: flex; justify-content: space-between; font-size: 14px; margin-top: 12px; font-weight: 500; flex-wrap: wrap; gap: 8px; }
.item-desc { white-space: pre-wrap; margin: 0 0 20px; }
.attach { display: flex; border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); overflow: hidden; max-width: 380px; color: var(--md-on-surface); cursor: pointer; background: var(--md-sc-lowest); transition: box-shadow .15s; }
.attach:hover { box-shadow: var(--elev1); text-decoration: none; }
.attach .th { width: 100px; flex: none; background: var(--md-sc-low); border-right: 1px solid var(--md-outline-variant); display: grid; place-items: center; padding: 10px; }
.attach .th i { display: block; width: 58px; height: 76px; background: #fff; border-radius: 2px; box-shadow: var(--elev1); background-image: repeating-linear-gradient(#fff 0 9px, #E1E6E2 9px 10px); background-position: 0 14px; }
.attach .ai { padding: 14px 16px; min-width: 0; align-self: center; }
.attach .ai b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .ai span { font-size: 12px; color: var(--md-on-surface-variant); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.comments { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--md-outline-variant); }
.comments h3 { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--md-on-surface-variant); }
.cmt { display: flex; gap: 12px; margin-bottom: 14px; font-size: 14px; }
.cmt b { font-size: 14px; font-weight: 500; }
.cmt .muted { font-size: 12px; margin-left: 6px; }
.cbox { display: flex; gap: 8px; align-items: flex-end; }
.cbox textarea { flex: 1; min-height: 44px; border-radius: 22px; padding: 10px 16px; }
.yourwork { width: 320px; flex: none; }
.yw { border-radius: var(--r-md); padding: 20px; box-shadow: var(--elev2); background: var(--md-sc-lowest); }
.yw-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.yw-h h2 { font-size: 22px; line-height: 28px; }
.yw .btn { margin-top: 8px; }
.yw textarea { width: 100%; margin-top: 8px; min-height: 76px; }
.file-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--md-outline-variant); border-radius: var(--r-sm); padding: 8px 8px 8px 12px; font-size: 14px; margin-bottom: 8px; }
.file-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { border: 0; background: none; cursor: pointer; color: var(--md-on-surface-variant); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.file-chip button:hover { background: rgba(23, 29, 26, .08); }
.score-big { font-size: 45px; line-height: 52px; color: var(--md-on-surface); }
.score-big small { font-size: 22px; color: var(--md-on-surface-variant); }

/* paper (printable handout) */
.paper { background: #fff; width: 100%; max-width: 760px; margin: 0 auto; padding: 44px 52px; box-shadow: var(--elev1); color: #111; font-family: 'Google Sans', Arial, sans-serif; font-size: 15px; line-height: 1.6; border-radius: 2px; }
.paper-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 18px; }
.paper-head .crest { width: 44px; height: 44px; font-size: 14px; border-radius: 50%; border: 2px solid #111; background: #fff; color: #111; }
.paper-head .ps { flex: 1; font-size: 13px; }
.paper-head .ps b { font-size: 16px; display: block; }
.paper-head .pm { font-size: 13px; text-align: right; line-height: 2; }
.paper h2 { font-size: 20px; margin: 0 0 6px; font-weight: 700; }
.paper .intro { font-style: italic; margin: 0 0 14px; }
.paper ol, .paper ul { padding-left: 22px; margin: 0; }
.paper li { margin-bottom: 18px; }
.paper.q li { padding-bottom: 36px; border-bottom: 1px dashed #bbb; }
.paper .tbl-wrap { border-radius: 0; }
.paper-foot { margin-top: 26px; font-size: 11px; color: #666; text-align: center; }
.paper-wrap { background: var(--md-sc); padding: 24px; border-radius: var(--r-md); }

/* ---------- registration (Banner 9 flow, M3 look) ---------- */
.steps { display: flex; margin-bottom: 20px; gap: 8px; }
.step { flex: 1; display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; color: var(--md-on-surface-variant); }
.step i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--md-outline-variant); font-size: 13px; flex: none; }
.step::after { content: ''; flex: 1; height: 2px; background: var(--md-outline-variant); border-radius: 1px; min-width: 12px; }
.step:last-child::after { display: none; }
.step.done { color: var(--md-primary); }
.step.done i { background: var(--md-primary); border-color: var(--md-primary); color: #fff; }
.step.done::after { background: var(--md-primary); }
.step.cur { color: var(--md-on-surface); }
.step.cur i { border-color: var(--md-primary); color: var(--md-primary); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--md-outline-variant); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 14px 16px 12px; color: var(--md-on-surface-variant); border-bottom: 3px solid transparent; white-space: nowrap; font-size: 14px; font-weight: 500; }
.tabs a:hover { text-decoration: none; background: rgba(23, 29, 26, .06); }
.tabs a.active { border-bottom-color: var(--md-primary); color: var(--md-primary); }
.dow { display: inline-flex; gap: 3px; }
.dow i { font-style: normal; width: 20px; height: 20px; display: grid; place-items: center; font-size: 10px; font-weight: 500; color: var(--md-on-surface-variant); border-radius: 50%; background: var(--md-sc-high); }
.dow i.on { background: var(--md-primary); color: #fff; }
.seats { font-size: 13px; }
.seats.full { color: var(--md-error); font-weight: 500; }
.reg-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); background: var(--md-sc-lowest); display: flex; flex-direction: column; overflow: hidden; }
.panel-h { padding: 14px 16px; font-weight: 500; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel-b { padding: 0 16px 16px; flex: 1; }
.panel-b .tbl-wrap { border-radius: var(--r-sm); }
.panel-f { border-top: 1px solid var(--md-outline-variant); padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--md-on-surface-variant); background: var(--md-sc-low); }
.panel-f .sp { flex: 1; }
.tt { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; font-size: 11px; }
.tt th { font-size: 11px; color: var(--md-on-surface-variant); font-weight: 500; padding: 3px; text-align: center; line-height: 1.2; }
.tt th:first-child { width: 42px; }
.tt td { background: var(--md-sc-low); height: 32px; padding: 0; vertical-align: top; border-radius: 4px; }
.tt .blk { background: var(--c); color: #fff; border-radius: 4px; padding: 3px 5px; height: 100%; overflow: hidden; line-height: 1.15; font-weight: 500; }
.tt .blk.clash { background: var(--md-error) !important; }
.tt .blk + .blk { margin-top: 1px; }
.tt .core { opacity: .7; }
.rules { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rule { height: 32px; border: 1px solid var(--md-outline-variant); border-radius: var(--r-sm); padding: 0 12px; font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; color: var(--md-on-surface-variant); }
.rule .msi { font-size: 18px; }
.rule.ok { border-color: transparent; background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.rule.bad { border-color: transparent; background: var(--md-error-container); color: var(--md-on-error-container); }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); min-height: 520px; overflow: hidden; }
.threads { border-right: 1px solid var(--md-outline-variant); overflow-y: auto; padding: 8px; }
.thr { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-md); color: var(--md-on-surface); margin-bottom: 2px; }
.thr:hover { background: var(--md-sc-low); text-decoration: none; }
.thr.active { background: var(--md-secondary-container); }
.thr .tw { flex: 1; min-width: 0; }
.thr b { display: block; font-size: 14px; font-weight: 500; }
.thr .ts { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr .tp { font-size: 14px; color: var(--md-on-surface-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr .td { font-size: 12px; color: var(--md-on-surface-variant); white-space: nowrap; }
.thr.unread b, .thr.unread .ts { font-weight: 700; }
.thr.unread .td { color: var(--md-primary); font-weight: 700; }
.thread { display: flex; flex-direction: column; }
.thread-h { padding: 16px 20px; border-bottom: 1px solid var(--md-outline-variant); }
.thread-h h2 { font-size: 22px; line-height: 28px; }
.msgs { flex: 1; padding: 20px; overflow-y: auto; }
.msg { display: flex; gap: 12px; margin-bottom: 20px; }
.msg .mb { flex: 1; min-width: 0; }
.msg .mb b { font-weight: 500; font-size: 14px; }
.msg .mb p { margin: 4px 0 0; white-space: pre-wrap; font-size: 14px; line-height: 20px; }
.msg .mt { font-size: 12px; color: var(--md-on-surface-variant); margin-left: 6px; }
.reply { border-top: 1px solid var(--md-outline-variant); padding: 12px 16px; display: flex; gap: 10px; align-items: flex-end; }
.reply textarea { flex: 1; min-height: 44px; border-radius: 22px; padding: 10px 16px; }

/* ---------- forms (M3 outlined fields) ---------- */
.f { display: block; margin-bottom: 16px; }
.f > span { display: block; font-size: 12px; font-weight: 500; margin-bottom: 4px; color: var(--md-on-surface-variant); letter-spacing: .4px; }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  border: 1px solid var(--md-outline); border-radius: var(--r-xs); padding: 0 14px; height: 48px; background: transparent; font-size: 16px; width: 100%; color: var(--md-on-surface);
}
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.45; }
select { cursor: pointer; }
input:hover, select:hover, textarea:hover { border-color: var(--md-on-surface); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: inline-flex; border: 1px solid var(--md-outline); border-radius: var(--r-full); overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 0 14px; height: 40px; cursor: pointer; font-size: 14px; font-weight: 500; border-right: 1px solid var(--md-outline); color: var(--md-on-surface); display: inline-flex; align-items: center; gap: 6px; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.seg button.on::before { font-family: 'Material Symbols Rounded'; content: 'check'; font-size: 18px; }
.seg.att button.on.P { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.seg.att button.on.L { background: var(--warn-container); color: var(--on-warn-container); }
.seg.att button.on.A { background: var(--md-error-container); color: var(--md-on-error-container); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.search { position: relative; }
.search .msi { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--md-on-surface-variant); font-size: 22px; }
.search input { padding-left: 50px; border-radius: var(--r-full); border-color: transparent; background: var(--md-sc-high); height: 48px; }
.search input:focus { background: var(--md-sc-lowest); }
.toolbar select { width: auto; height: 48px; border-radius: var(--r-sm); }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; font-size: 14px; color: var(--md-on-surface-variant); }

/* ---------- parent: child switch (M3 segmented-like cards) ---------- */
.kids { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.kid { display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; border: 1px solid var(--md-outline-variant); border-radius: var(--r-full); color: var(--md-on-surface); background: var(--md-sc-lowest); }
.kid:hover { text-decoration: none; background: var(--md-sc-low); }
.kid.active { border-color: transparent; background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.kid b { display: block; font-size: 16px; line-height: 20px; font-weight: 500; }
.kid span { font-size: 12px; color: inherit; opacity: .8; }

/* attendance calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 420px; }
.cal .h { font-size: 12px; color: var(--md-on-surface-variant); text-align: center; font-weight: 500; padding: 4px 0; }
.cal .d { aspect-ratio: 1 / 1; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: var(--md-on-surface-variant); }
.cal .d.P { background: var(--md-primary-container); color: var(--md-on-primary-container); font-weight: 500; }
.cal .d.L { background: var(--warn-container); color: var(--on-warn-container); font-weight: 700; }
.cal .d.A { background: var(--md-error); color: #fff; font-weight: 700; }
.cal .d.t { box-shadow: 0 0 0 2px var(--md-on-surface); }
.cal .d.x { background: transparent; }
.legend { display: flex; gap: 16px; font-size: 13px; margin-top: 12px; color: var(--md-on-surface-variant); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* gradebook */
.gb { border-collapse: separate; border-spacing: 0; font-size: 14px; }
.gb th, .gb td { border-bottom: 1px solid var(--md-sc-high); padding: 8px 12px; white-space: nowrap; }
.gb th { background: var(--md-sc-low); font-size: 12px; font-weight: 500; max-width: 130px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; text-align: left; position: sticky; top: 0; z-index: 2; }
.gb td.c { text-align: center; cursor: pointer; }
.gb td.c:hover { background: var(--md-secondary-container); }
.gb .first { position: sticky; left: 0; background: var(--md-sc-lowest); z-index: 1; min-width: 170px; }
.gb th.first { background: var(--md-sc-low); z-index: 3; }
.gb .m { color: var(--md-error); font-weight: 500; }
.gb .w { color: var(--warn); font-weight: 500; }

/* grading */
.grader { display: grid; grid-template-columns: 280px minmax(0, 1fr) 320px; border: 1px solid var(--md-outline-variant); border-radius: var(--r-md); min-height: 540px; overflow: hidden; }
.glist { border-right: 1px solid var(--md-outline-variant); overflow-y: auto; max-height: 660px; padding: 8px; }
.glist a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); color: var(--md-on-surface); font-size: 14px; }
.glist a:hover { background: var(--md-sc-low); text-decoration: none; }
.glist a.active { background: var(--md-secondary-container); font-weight: 500; }
.glist a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gview { padding: 24px; background: var(--md-sc); overflow: auto; }
.gside { border-left: 1px solid var(--md-outline-variant); padding: 20px; }
.photo { background: #fff; border-radius: 4px; box-shadow: var(--elev2); padding: 26px 30px; font-family: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; font-size: 17px; color: #1a2a6c; line-height: 1.9; background-image: repeating-linear-gradient(#fff 0 31px, #cfe0f2 31px 32px); max-width: 560px; }

/* ---------- dialogs + snackbar (M3) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--md-sc-high); border-radius: var(--r-xl); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--elev3); animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal.wide { max-width: 880px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 24px 24px 12px; }
.modal-h h2 { flex: 1; font-size: 24px; line-height: 32px; }
.modal-h .x { border: 0; background: none; cursor: pointer; color: var(--md-on-surface-variant); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.modal-h .x:hover { background: rgba(23, 29, 26, .08); }
.modal-b { padding: 4px 24px 16px; overflow-y: auto; font-size: 14px; line-height: 20px; color: var(--md-on-surface-variant); }
.modal-b b { color: var(--md-on-surface); }
.modal-b .f > span { color: var(--md-on-surface-variant); }
.modal-b input, .modal-b select, .modal-b textarea { color: var(--md-on-surface); }
.modal-f { padding: 8px 24px 24px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-f .btn:not(.primary):not(.danger) { border-color: transparent; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); padding: 14px 16px; border-radius: var(--r-xs); font-size: 14px; line-height: 20px; z-index: 200; box-shadow: var(--elev3); max-width: min(560px, calc(100vw - 32px)); animation: up .2s ease-out; }
@keyframes up { from { transform: translate(-50%, 12px); opacity: 0; } }
.spin { width: 48px; height: 48px; border: 4px solid var(--md-secondary-container); border-top-color: var(--md-primary); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.receipt { border-radius: var(--r-md); background: var(--md-sc-lowest); padding: 14px 16px; font-size: 14px; }
.receipt div { display: flex; justify-content: space-between; padding: 4px 0; }

/* ---------- sign-in ---------- */
.signin { min-height: 100vh; background: var(--md-sc); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.signin-card { background: var(--md-sc-lowest); border-radius: var(--r-xl); width: 100%; max-width: 820px; overflow: hidden; padding: 36px; }
.signin-top { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.signin-top .crest { width: 64px; height: 64px; font-size: 22px; border-radius: 20px; }
.signin-top h1 { font-size: 32px; line-height: 40px; }
.signin-top p { margin: 2px 0 0; color: var(--md-on-surface-variant); font-size: 16px; }
.signin-b h2 { font-size: 16px; font-weight: 500; margin: 0 0 12px; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.role { display: flex; gap: 16px; align-items: center; border-radius: var(--r-lg); padding: 18px; color: var(--md-on-surface); background: var(--md-sc-low); transition: background-color .15s, box-shadow .15s; }
.role:hover { background: var(--md-secondary-container); text-decoration: none; }
.role .ric { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--md-primary); color: #fff; }
.role .ric .msi { font-size: 30px; }
.role b { display: block; font-size: 18px; font-weight: 500; }
.role div span { font-size: 14px; color: var(--md-on-surface-variant); line-height: 20px; display: block; }
.role .chev { margin-left: auto; color: var(--md-on-surface-variant); font-size: 24px; }
.signin-foot { margin-top: 18px; font-size: 12px; color: var(--md-on-surface-variant); text-align: center; }

/* ---------- More page (phone) ---------- */
.menu-list { border: 1px solid var(--md-outline-variant); border-radius: var(--r-lg); overflow: hidden; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 64px; width: 100%; color: var(--md-on-surface); border: 0; background: none; border-bottom: 1px solid var(--md-sc-high); font-size: 16px; text-align: left; cursor: pointer; }
.menu-list > :last-child { border-bottom: 0; }
.menu-list a:hover, .menu-list button:hover { background: var(--md-sc-low); text-decoration: none; }
.menu-list .msi { color: var(--md-on-surface-variant); }
.menu-list .grow { flex: 1; }

#print-root { display: none; }
/* inside the shared claude.ai page the browser cannot print: hide print buttons (sheets and reports open on screen) */
.noprint [data-act="print"] { display: none !important; }
.hide-sm { }

/* ---------- tablet ---------- */
@media (max-width: 1180px) {
  .grader { grid-template-columns: 240px minmax(0, 1fr); }
  .gside { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--md-outline-variant); }
}
@media (max-width: 1000px) {
  .cols { flex-direction: column; align-items: stretch; }
  .aside { width: 100%; margin-top: 8px; }
  .item { flex-direction: column; align-items: stretch; }
  .yourwork { width: 100%; }
  .reg-split { grid-template-columns: 1fr; }
}

/* ---------- phone: navigation bar (M3: 80px, pill 64×32) ---------- */
@media (max-width: 768px) {
  body { background: var(--md-sc-lowest); }
  .gnav { inset: auto 0 0 0; width: 100%; height: auto; min-height: 80px; flex-direction: row; justify-content: space-around; gap: 0; padding: 12px env(safe-area-inset-right, 0px) calc(16px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px); background: var(--md-sc); }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 25; background: var(--md-sc-lowest); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .gnav-logo { display: none; }
  .gnav-item { flex: 1; gap: 4px; }
  .gnav-item .ind { width: 64px; height: 32px; }
  .gnav-item .nb { left: calc(50% + 4px); }
  .gnav-item.opt { display: none; }
  .only-sm { display: flex !important; }
  .gnav-item.active-sm .ind { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
  .gnav-item.active-sm .lbl { font-weight: 700; color: var(--md-on-surface); }
  .main { margin-left: 0; padding: 0 0 calc(80px + env(safe-area-inset-bottom, 0px)); }
  .topbar { height: 64px; padding: 0 max(8px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); position: sticky; top: env(safe-area-inset-top, 0px); background: var(--md-sc-lowest); z-index: 20; }
  .crumbs a, .crumbs .sep, .crumbs .pre { display: none; }
  .todo.acts li { flex-wrap: wrap; }
  .todo.acts .tr { width: 100%; padding-left: 56px; text-align: left; margin-top: -4px; }
  .crumbs b { font-size: 22px; line-height: 28px; font-weight: 400; padding: 0 4px; }
  .who-name, .sample-tag { display: none; }
  .content { border-radius: 0; padding: 8px 16px 32px; margin: 0; }
  .ph h1 { font-size: 24px; line-height: 32px; }
  .hero h1 { font-size: 28px; line-height: 36px; }
  .stream { flex-direction: column; }
  .upcoming { width: 100%; }
  .course-banner { min-height: 120px; padding: 18px; }
  .course-banner h1 { font-size: 26px; line-height: 32px; }
  .course-banner .glyph { font-size: 44px; }
  .item-head h1 { font-size: 24px; line-height: 32px; }
  .inbox { grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .inbox.has-thread .threads { display: none; }
  .inbox:not(.has-thread) .thread { display: none; }
  .threads { border-right: 0; padding: 0; }
  .grader { grid-template-columns: 1fr; }
  .glist { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--md-outline-variant); }
  .roles { grid-template-columns: 1fr; }
  .signin-card { padding: 24px 18px; border-radius: var(--r-xl); }
  .paper { padding: 24px 20px; }
  .paper-wrap { padding: 8px; }
  .row2 { grid-template-columns: 1fr; }
  .step span { display: none; }
  .step.cur span { display: inline; }
  .tbl { font-size: 14px; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .hide-sm { display: none; }
  .kpis, .sumrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sum { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .sum .ic { width: 40px; height: 40px; }
  .kpi { padding: 12px; }
  .kpi .v { font-size: 24px !important; line-height: 32px; padding: 0 !important; }
  .dcards { grid-template-columns: 1fr; }
  .callout { flex-direction: column; align-items: flex-start; }
  .callout .btn { width: 100%; }
  .modal { border-radius: var(--r-xl); }
  .stream, .course, .cbody, .page, .item-main { min-width: 0; max-width: 100%; }
}

/* ---------- print: only the sheet ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  #app, #modal-root, .toast { display: none !important; }
  #print-root { display: block !important; }
  #print-root .paper { box-shadow: none; padding: 0; max-width: none; }
}
