/* The console: no external fonts, scripts or images. */
:root {
  color-scheme: light dark;
  --ink: #1E1B4B;
  --muted: #475569;
  --page: #F1F5FB;
  --card: #FFFFFF;
  --line: #E2E8F0;
  --chip: #EEF2FF;
  --accent: #4F46E5;
  --danger: #B91C1C;
  --ok: #047857;
  --z: #0EA5E9;
  --admin: #FEF3C7;
  --admin-line: #D97706;
}

/* Dark when the device is, unless the person chose light; or when they
   chose dark (My account). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F8FAFC;
    --muted: #CBD5E1;
    --page: #0B1026;
    --card: #161A35;
    --line: #2E3466;
    --chip: #232A5C;
    --accent: #6366F1;
    --danger: #F87171;
    --ok: #34D399;
    --admin: #3A2A06;
    --admin-line: #F59E0B;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F8FAFC;
  --muted: #CBD5E1;
  --page: #0B1026;
  --card: #161A35;
  --line: #2E3466;
  --chip: #232A5C;
  --accent: #6366F1;
  --danger: #F87171;
  --ok: #34D399;
  --admin: #3A2A06;
  --admin-line: #F59E0B;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--page);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.icon { width: 30px; height: 30px; }
.wordmark { height: 20px; width: auto; color: var(--ink); }
.wordmark .z { fill: var(--z); }
#who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }

/* Administrator mode: changes affect the whole school, and it shows. */
body.admin-mode header { background: var(--admin); border-bottom: 3px solid var(--admin-line); }
.admin-banner {
  width: calc(100% - 48px);
  max-width: 1392px;
  margin: 16px auto 0;
  padding: 10px 16px;
  border-left: 4px solid var(--admin-line);
  border-radius: 10px;
  background: var(--admin);
  font-weight: 600;
}
body.admin-mode .layout { margin-top: 16px; }
/* The example school is loaded: on every screen (demo.js). */
.demo-banner {
  width: calc(100% - 48px);
  max-width: 1392px;
  margin: 16px auto 0;
  padding: 8px 16px;
  border: 1px dashed var(--accent, #4F46E5);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.demo-banner.view-as {
  border-style: solid;
  border-width: 2px;
}
.demo-banner select {
  width: auto;
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  max-width: 1440px;
  margin: 24px auto;
  padding: 0 24px;
}

nav { display: flex; flex-direction: column; gap: 4px; }
.console-footer { max-width: 1440px; margin: 0 auto 24px; padding: 0 24px; text-align: center; font-size: 0.8rem; color: var(--muted); }

nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

nav button[aria-current="page"] { background: var(--chip); font-weight: 600; }
nav button:disabled { color: var(--muted); cursor: default; }
/* A group's heading in administrator mode's menu: a line above, the
   accent colour, and its screens indented under it. */
nav .nav-group { margin: 16px 0 4px; padding: 12px 12px 0; border-top: 1px solid var(--line); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
nav button.in-group { padding-left: 24px; }

.soon {
  font-size: 0.72rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
}

main, .card {
  padding: 28px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.narrow { max-width: 420px; margin: 48px auto; }

h1 { margin: 0 0 8px; font-size: 1.4rem; }
h2 { margin: 0 0 8px; font-size: 1.1rem; }
h3 { margin: 16px 0 6px; font-size: 1rem; }
section { padding: 20px 0; border-top: 1px solid var(--line); }
[role="tabpanel"] > section:first-child { border-top: 0; padding-top: 4px; }
/* A card is its own box: no section padding on top of its own. */
section.role-card { padding: 0; }
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  margin: 14px 0 12px;
  padding: 4px;
  background: var(--page);
  border: 1px solid var(--line);
  /* Every tab in sight: they wrap instead of hiding behind a scroll. */
  border-radius: 18px;
}
.tabs button {
  flex: none;
  padding: 8px 18px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; background: var(--card); box-shadow: 0 1px 3px rgb(30 27 75 / 0.14); }
section form { max-width: 520px; }
form > button { justify-self: start; }
.hint { font-size: 0.85rem; margin: 8px 0 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }

form { display: grid; gap: 12px; margin: 16px 0; }
.inline { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.layout > main { min-width: 0; }
.scroll { overflow-x: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions .secondary { margin: 0; }
input, select { width: 100%; min-width: 0; }
.inline .buttons { display: flex; gap: 6px; }
label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
.account-ids { margin-top: 12px; }
.account-ids strong { color: var(--ink); }

input, select {
  padding: 9px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 10px;
}

button.primary, button.secondary, a.button, label.button {
  padding: 9px 18px;
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
}

button.primary { color: #fff; background: var(--accent); border: 0; }
button.secondary, a.button.secondary, label.button.secondary { color: var(--ink); background: none; border: 1px solid var(--line); }
a.button { display: inline-block; text-decoration: none; }
button.danger { color: var(--danger); }
.enrol { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 8px 0; }
.qr { width: 200px; height: 200px; border-radius: 8px; }
.secret { font-size: 1.05rem; letter-spacing: 0.04em; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; padding: 0; list-style: none; }
.codes code { display: block; padding: 6px 10px; border-radius: 8px; background: var(--chip); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--z); outline-offset: 2px; }

.provider { width: 100%; }
.or { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 16px 0 0; }

.message { padding: 10px 14px; border-radius: 12px; background: var(--chip); }
.message.error { color: var(--danger); }
.message.ok { color: var(--ok); }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
td .secondary { padding: 5px 12px; font-size: 0.85rem; margin-right: 6px; }
.tag { font-size: 0.8rem; padding: 1px 8px; border-radius: 999px; background: var(--chip); }
code { overflow-wrap: anywhere; }
/* An email in a table cell breaks between words, never letter by letter. */
td code { overflow-wrap: break-word; word-break: normal; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; gap: 16px; margin: 16px auto; padding: 0 12px; }
  .inline { grid-template-columns: 1fr; }
  /* On a phone the menu is a few rows of buttons above the page, not a
     column the page waits under. */
  nav { flex-direction: row; flex-wrap: wrap; }
  nav button { flex: none; padding: 7px 10px; }
  nav button.in-group { padding-left: 10px; }
  nav .nav-group { flex-basis: 100%; margin: 6px 0 0; padding: 6px 4px 0; }
  header { flex-wrap: wrap; padding: 10px 16px; }
  main, .card { padding: 18px 16px; border-radius: 16px; }
  .filter-toolbar select { flex: 1 1 100%; }
  .admin-banner { width: calc(100% - 24px); }
}

/* The logos, drawn once in index.html and reused. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* The school beside our brand in the header. */
#school-badge { display: flex; align-items: center; gap: 10px; margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); font-weight: 700; font-size: 1.05rem; }
/* With the school in the header, ours is just the icon: one name, theirs. */
header .brand:has(#school-badge:not(:empty)) .wordmark { display: none; }
#school-badge:empty { display: none; }

.school-logo { object-fit: contain; border-radius: 8px; }
.school-logo.large { max-width: 160px; height: 56px; }
.school-logo.small { max-width: 80px; height: 28px; }
.school-initials {
  display: inline-grid;
  place-items: center;
  flex: none;
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(135deg, hsl(var(--hue, 230) 65% 50%), hsl(calc(var(--hue, 230) + 30) 60% 38%));
}
.school-initials.large { width: 56px; height: 56px; font-size: 1.3rem; }
.school-initials.small { width: 28px; height: 28px; font-size: 0.75rem; border-radius: 8px; }

/* Sign-in pages: our panel on one side, the school and the form on the other. */
body.auth header { display: none; }
.auth-layout { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; min-height: 100vh; }
.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  color: #fff;
  background: linear-gradient(150deg, #38BDF8 0%, #4F46E5 60%, #3730A3 100%);
  --z-mark: #FDE68A;
}
.brand-big { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.brand-big .icon { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); }
.brand-big .wordmark { height: 34px; width: auto; color: #fff; }
.brand-panel .art { position: relative; align-self: center; width: min(100%, 440px); margin: auto 0; filter: drop-shadow(0 18px 30px rgb(30 27 75 / 0.25)); }


.auth-card {
  align-self: center;
  justify-self: center;
  width: min(440px, calc(100% - 32px));
  margin: 40px 16px;
  padding: 36px 36px 20px;
}
.auth-card h1 { margin-top: 8px; }
.school { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.school p { margin: 0; }
.school-title { font-weight: 700; font-size: 1.1rem; }
.provider { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 8px; }
.provider .g { width: 18px; height: 18px; }
.wide { width: 100%; justify-self: stretch; }
.password { position: relative; display: block; }
.password input { padding-right: 44px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px;
  color: var(--muted); background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.eye svg { width: 20px; height: 20px; }
.eye[aria-pressed="true"] { color: var(--accent); }
button.link { justify-self: start; padding: 0; font: inherit; font-size: 0.9rem; color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.auth-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.85rem; }
.auth-footer select { width: auto; padding: 5px 10px; font-size: 0.85rem; }

/* School settings. */
.logo-row { display: flex; align-items: center; gap: 16px; margin: 8px 0 14px; }
.logo-row p { margin: 0; }
label.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
label.file { position: relative; color: var(--ink); cursor: pointer; }
label.file:focus-within { outline: 3px solid var(--z); outline-offset: 2px; }

@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .brand-panel { padding: 20px 16px; min-height: 0; }
  .brand-panel .art { display: none; }
  .brand-big .icon { width: 36px; height: 36px; }
  .brand-big .wordmark { height: 24px; }
  .auth-card { margin: 16px auto 32px; padding: 24px 20px 16px; }
  #school-badge .school-name { display: none; }
}

/* Home: a greeting and cards for what is at hand. */
.greeting { font-size: 1.6rem; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.home-card {
  display: grid; gap: 6px; align-content: start; padding: 18px; text-align: left; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.home-card:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 6px 18px rgb(79 70 229 / 0.12); }
.home-card:disabled { cursor: default; opacity: 0.75; }
.home-card.highlight { border-color: var(--accent); background: var(--chip); }
.card-icon { width: 28px; height: 28px; color: var(--accent); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.card-text { font-size: 0.9rem; color: var(--muted); }

/* Notices that go by themselves, at the bottom, above everything. */
.toaster { position: fixed; left: 50%; bottom: 24px; z-index: 10; display: grid; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 20px;
  color: #fff; font-weight: 600; background: #1E1B4B; border-radius: 999px;
  box-shadow: 0 10px 30px rgb(30 27 75 / 0.3);
  animation: toast-in 0.2s ease-out;
  transition: opacity 0.4s, transform 0.4s;
}
.toast svg { width: 20px; height: 20px; color: #34D399; flex: none; }
.toast.leaving { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }
button[type="submit"]:disabled { cursor: progress; opacity: 0.75; }

/* The school's web filter. */
.filter-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 6px; }
.filter-toolbar input { flex: 1 1 260px; width: auto; }
.legend { display: flex; align-items: center; gap: 6px; }
.lock-icon { width: 16px; height: 16px; flex: none; }
.families { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
.family { border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: border-color 0.15s, box-shadow 0.15s; }
.family:hover { border-color: var(--accent); }
.family[open] { grid-column: 1 / -1; box-shadow: 0 6px 18px rgb(79 70 229 / 0.1); }
.family summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.family summary::-webkit-details-marker { display: none; }
.family[open] summary { border-bottom: 1px solid var(--line); }
.family-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: #fff; background: #10B981; }
.family.mixed .family-icon { background: #F59E0B; }
.family.all-blocked .family-icon { background: var(--danger); }
.family-icon svg { width: 24px; height: 24px; }
.family-text { flex: 1; display: grid; gap: 5px; min-width: 0; }
.family-name { font-weight: 700; }
.family-bar { display: block; height: 6px; border-radius: 999px; background: #10B981; overflow: hidden; }
.family-bar span { display: block; height: 100%; background: var(--danger); }
.family-count { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 0.82rem; }
.chevron { font-size: 1.4rem; color: var(--muted); transition: transform 0.15s; }
.family[open] .chevron { transform: rotate(90deg); }
.family-actions { display: flex; gap: 8px; padding: 10px 18px 0; }
.family-actions .secondary { padding: 5px 12px; font-size: 0.85rem; }
.family ul { margin: 0; padding: 6px 10px 10px; list-style: none; }
.category { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.category:hover { background: var(--page); }
.category-name { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.category-name .hint { font-size: 0.8rem; color: var(--muted); }
.tag.law { color: var(--danger); }
.lock { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; font: inherit; font-size: 0.8rem; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 999px; cursor: pointer; }
.lock[aria-pressed="true"] { color: var(--accent); border-color: var(--line); background: var(--chip); }
.lock:disabled { cursor: default; }
.switch { display: inline-flex; align-items: center; gap: 10px; min-width: 150px; justify-content: flex-end; padding: 0; font: inherit; font-size: 0.85rem; color: var(--muted); background: none; border: 0; cursor: pointer; }
.switch .knob { position: relative; width: 44px; height: 24px; border-radius: 999px; background: #10B981; transition: background 0.15s; flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: transform 0.15s; }
.switch[aria-checked="true"] .knob { background: var(--danger); }
.switch[aria-checked="true"] .knob::after { transform: translateX(20px); }
.switch[aria-checked="true"] .switch-label { color: var(--danger); font-weight: 600; }
.switch:disabled { cursor: default; opacity: 0.8; }
@media (max-width: 760px) {
  .category { flex-wrap: wrap; }
  .lock span { display: none; }
  .switch { min-width: 0; }
}

/* Lists and the checker. */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mode { position: relative; display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--ink); }
/* The hidden radio takes no room (it used to stretch the page sideways). */
.mode input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mode.chosen { border-color: var(--accent); background: var(--chip); box-shadow: inset 0 0 0 1px var(--accent); }
.mode:focus-within { outline: 3px solid var(--z); outline-offset: 2px; }
.mode-title { font-weight: 700; }
.mode-text { font-size: 0.88rem; color: var(--muted); }
.add-domain.terms { grid-template-columns: 1fr auto; }
.add-domain { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; max-width: 640px; }
.add-domain select { width: auto; }
.filter-toolbar select { width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.chip { padding: 5px 12px; font: inherit; font-size: 0.85rem; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.entries { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.entry { display: flex; align-items: center; gap: 10px; padding: 5px 14px; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry code { flex: 1; }
.entry .secondary { padding: 4px 12px; font-size: 0.82rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.allow { background: #10B981; }
.dot.block { background: var(--danger); }
.tag.allow { color: #047857; }
.tag.block { color: var(--danger); }
.empty { padding: 12px 0; }
.verdict { margin-top: 14px; padding: 16px 18px; border-radius: 14px; border-left: 5px solid #10B981; background: var(--chip); }
.verdict.blocked { border-left-color: var(--danger); }
.verdict p { margin: 4px 0; }
.verdict-title { font-size: 1.1rem; font-weight: 700; }
.verdict.blocked .verdict-title { color: var(--danger); }
.verdict.allowed .verdict-title { color: var(--ok); }
@media (max-width: 760px) { .add-domain { grid-template-columns: 1fr; } }

/* The kinds of list: a smaller segmented control with counts. */
.kinds { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 10px; padding: 4px; background: var(--page); border: 1px solid var(--line); border-radius: 12px; }
.kinds button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; font: inherit; font-size: 0.9rem; color: var(--muted); background: none; border: 0; border-radius: 9px; cursor: pointer; }
.kinds button[aria-selected="true"] { color: var(--ink); font-weight: 600; background: var(--card); box-shadow: 0 1px 3px rgb(30 27 75 / 0.14); }
.kinds .count { min-width: 22px; padding: 0 7px; font-size: 0.78rem; line-height: 20px; text-align: center; color: var(--accent); background: var(--chip); border-radius: 999px; }
.dot.term { background: var(--danger); }

/* Roles and permissions. */
.role-card { margin: 12px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: border-color 0.15s, box-shadow 0.15s; }
.role-card:hover { border-color: var(--accent); }
.role-card[open] { box-shadow: 0 6px 18px rgb(79 70 229 / 0.1); }
.role-card summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.role-card summary::-webkit-details-marker { display: none; }
.role-card[open] summary { border-bottom: 1px solid var(--line); }
.role-card[open] .chevron { transform: rotate(90deg); }
.role-head { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.role-name { font-weight: 700; font-size: 1.05rem; }
.role-body { padding: 12px 18px 16px; }
.role-body > .muted:first-child { margin-top: 0; }
.role-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.role-actions .rename { display: flex; gap: 8px; align-items: center; }
.role-actions .rename input { width: auto; }
.permission-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 24px; margin-top: 8px; }
.permission-area h3 { margin: 10px 0 2px; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.permission-area ul { margin: 0; padding: 0; list-style: none; }
.permission { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.permission-name { flex: 1; }
.switch.grant { min-width: 0; }
.switch.grant .knob { background: var(--line); }
.switch.grant[aria-checked="true"] .knob { background: var(--accent); }
.switch.grant[aria-checked="true"] .switch-label { color: var(--accent); }
.switch.grant:disabled { opacity: 0.7; }
.switch.grant:disabled .switch-label { color: var(--muted); }
.read-only { padding: 8px 12px; border-radius: 10px; background: var(--chip); }

/* Classes and students. */
.add-class { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: center; margin: 12px 0; }
.add-class select { width: auto; }
.course-section h2 { margin: 22px 0 4px; font-size: 1rem; color: var(--muted); }
.people { margin: 0 0 10px; padding: 0; list-style: none; }
.people li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.people .actions { display: flex; gap: 6px; }
.people .secondary { padding: 4px 10px; font-size: 0.82rem; }
.people code { font-size: 0.82rem; }
.role-body h3 { margin: 14px 0 4px; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tag.tutor { color: var(--accent); font-weight: 600; }
.tag.kind-subject { background: var(--page); }
.demo-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 16px; border: 1px dashed var(--accent); border-radius: 14px; background: var(--chip); }
.demo-box p { margin: 0; flex: 1 1 320px; }
.import-block h2 { margin-top: 0; }
.import-preview { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--page); }
.import-errors { margin: 0 0 10px; font-size: 0.88rem; }
label.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
/* The box keeps its size beside a long text, and a title's help goes on
   its own line under it. */
label.check input { width: auto; flex: none; }
label.check > span > .muted { display: block; }
.class-cards { margin-bottom: 18px; }
.class-card .tag { margin-left: 8px; }
@media (max-width: 760px) { .add-class { grid-template-columns: 1fr; } }
.entry.course { padding: 8px 14px; }
.entry .rename { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entry .rename input { width: auto; flex: 0 1 320px; }

/* Choosing several people, and reviewing an import. */
.picker { margin: 8px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); }
.picker-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.picker-tools input[type="search"] { flex: 1 1 240px; width: auto; }
.picker-tools select { width: auto; }
.picker-list { max-height: 320px; overflow-y: auto; margin: 10px 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.picker-list li { border-top: 1px solid var(--line); }
.picker-list li:first-child { border-top: 0; }
.picker-list li.muted { padding: 10px 12px; }
.picker-list label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; }
.picker-list label:hover { background: var(--chip); }
.picker-list input { width: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.status-new.badge, .chip.status-new[aria-pressed="true"] { color: #fff; background: #059669; }
.status-update.badge, .chip.status-update[aria-pressed="true"] { color: #fff; background: var(--accent); }
.status-same.badge, .chip.status-same[aria-pressed="true"] { color: var(--ink); background: var(--line); }
.status-error.badge, .chip.status-error[aria-pressed="true"] { color: #fff; background: var(--danger); }
table.review td { vertical-align: top; font-size: 0.9rem; }
table.review tr.status-error td { background: rgb(185 28 28 / 0.06); }
table.review .message { margin: 0; }
.changes { margin: 0; padding-left: 16px; }
fieldset.subjects { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
fieldset.subjects legend { padding: 0 6px; color: var(--muted); font-size: 0.85rem; }
fieldset.subjects label.check { margin: 0; }
.chip .count { margin-left: 6px; font-weight: 700; }
.chip.status-new[aria-pressed="true"] { border-color: #059669; }
.chip.status-same[aria-pressed="true"] { border-color: var(--line); }
.chip.status-error[aria-pressed="true"] { border-color: var(--danger); }
.inline fieldset.subjects { grid-column: 1 / -1; }
fieldset.subjects label.check { white-space: nowrap; }
table.review code { white-space: nowrap; }
.import-preview h3 { margin-top: 0; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--ink); }
table.review .tick { width: 28px; }
table.review .tick input { width: auto; }
table.review tr.unticked td:not(.tick) { opacity: 0.45; }

/* Long lists: filters and pages. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters select { width: auto; max-width: 260px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 4px; }
.pager span { color: var(--muted); font-size: 0.9rem; }
.people .actions select { width: auto; padding: 4px 8px; font-size: 0.85rem; }

/* Classroom and at home: personal filters. */
.hours-note { padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; }
.hours-note.in { color: #065f46; background: rgb(16 185 129 / 0.12); }
.hours-note.out { color: var(--muted); background: var(--chip); }
.orders { margin: 0 0 12px; padding: 0; list-style: none; }
.order { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order:last-child { border-bottom: 0; }
.order-text { flex: 1; display: grid; gap: 2px; min-width: 200px; }
.order .secondary { padding: 4px 10px; font-size: 0.82rem; }
.order .badge, .picker-list .badge { color: var(--muted); background: var(--chip); }
.order .badge.mine, .picker-list .badge.mine { color: #fff; background: var(--accent); }
.order.other .badge { font-weight: 500; }
.last-wins { margin-bottom: 18px; }
.order .badge.mode-block { color: #fff; background: var(--danger); }
.order .badge.mode-allow { color: #fff; background: #059669; }
.order .badge.mode-only { color: #fff; background: var(--accent); }
.personal-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 10px; }
.personal-actions label { display: grid; gap: 4px; }
.personal-actions select { width: auto; }
.personal-actions input[type="text"] { width: min(320px, 100%); }
.recommendations { margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 12px; background: var(--chip); }
.recommendations h2 { margin-top: 0; }
.recommendations .order .primary, .recommendations .order .secondary { padding: 4px 10px; font-size: 0.82rem; }
section textarea { width: 100%; font: inherit; }
.personal-owner { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

/* School calendars: stages, timetable, holidays and months. */
.stage-bar { display: grid; gap: 10px; margin-bottom: 12px; }
.chip.add { border-style: dashed; }
.stage-detail { margin-bottom: 12px; }
.calendar-columns { display: grid; grid-template-columns: minmax(400px, 1fr) 1.5fr; gap: 24px; align-items: start; }
.calendar-parts h3 { margin: 14px 0 4px; font-size: 0.95rem; }
.periods { display: grid; gap: 6px; justify-items: start; }
.period { display: flex; align-items: center; gap: 8px; }
.period input[type="time"] { width: 132px; }
.period .muted { min-width: 60px; white-space: nowrap; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.month h4 { margin: 0 0 6px; font-size: 0.92rem; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.weekday { font-size: 0.72rem; color: var(--muted); text-align: center; text-transform: uppercase; }
.day { display: inline-flex; align-items: center; justify-content: center; min-width: 0; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 7px; font: inherit; font-size: 0.8rem; line-height: 1; background: transparent; color: var(--ink); }
.day.school { background: rgb(16 185 129 / 0.16); color: var(--ok); cursor: pointer; }
.day.holiday { background: rgb(239 68 68 / 0.18); color: var(--danger); font-weight: 600; }
.day.holiday:not(:disabled) { cursor: pointer; }
.day.off { color: var(--muted); }
.day.outside { color: var(--muted); opacity: 0.45; }
.day.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.day:disabled { cursor: default; }
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 4px; }
.calendar-legend .day { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.calendar-legend .day.off, .calendar-legend .day.outside { border: 1px solid var(--line); opacity: 1; }
.calendar-section form.calendar-form { max-width: none; }
.calendar-form > .primary { margin-top: 16px; }
.week.days { grid-auto-rows: 26px; }
@media (max-width: 1100px) { .calendar-columns { grid-template-columns: 1fr; } }

/* Classroom: screens (a card with the screen above) or a list. */
.classroom-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.classroom-layout { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.size-control { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.size-control input { width: 110px; padding: 0; accent-color: var(--accent); }
.student-grid { display: grid; gap: 10px; margin-bottom: 18px; }
.student-grid.size-small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.student-grid.size-medium { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.student-grid.size-large { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.student-card, .student-row { position: relative; font: inherit; text-align: left; color: var(--ink); background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.student-card { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding: 8px; border-radius: 14px; }
.student-card:hover, .student-row:hover { border-color: var(--accent); }
.student-card.picked, .student-row.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.student-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 16 / 10; border-radius: 9px; font-size: 0.75rem; color: var(--muted); background: var(--chip); }
.student-screen svg { width: 30%; max-width: 44px; opacity: 0.6; }
.student-screen.off { background: var(--page); border: 1px dashed var(--line); }
.size-small .student-screen span { display: none; }
.student-meta { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; min-width: 0; }
.student-card .badge { justify-self: start; }
.student-card .badge, .student-row .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--muted); background: var(--chip); }
.student-card .badge.mine, .student-row .badge.mine { color: #fff; background: var(--accent); }
.student-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: 0.8rem; color: var(--muted); background: var(--chip); flex: none; }
.online .student-avatar { color: #fff; background: var(--ok); }
.student-text { display: grid; gap: 2px; min-width: 0; }
.student-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-seen { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--muted); }
.size-small .student-seen { display: none; }
.dot.on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dot.off { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.student-check { position: absolute; top: 8px; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 0.75rem; color: #fff; background: var(--accent); }
.student-list { display: grid; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.student-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 40px 8px 12px; border-width: 0 0 1px; border-radius: 0; }
.student-row:last-child { border-bottom: 0; }
.student-row .student-check { top: 50%; transform: translateY(-50%); }
.student-list.projector .student-row { padding: 14px 18px; }
.student-list.projector .student-avatar { width: 48px; height: 48px; font-size: 1rem; }
.student-list.projector .student-name { font-size: 1.25rem; }
.student-list.projector { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
/* On a phone, the screens are small. */
@media (max-width: 600px) { .student-grid.size-medium, .student-grid.size-large { grid-template-columns: repeat(2, 1fr); } }
/* The example school's made-up screens. */
.student-screen.example { position: relative; display: block; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.student-screen.example .mock-bar { position: absolute; left: 0; right: 0; top: 0; height: 12%; background: #e5e7eb; }
.student-screen.example .mock { position: absolute; border-radius: 3px; }
.s-learn .mock-bar { background: #f59e0b; } .s-learn .b1 { left: 6%; top: 20%; width: 55%; height: 10%; background: #fde68a; } .s-learn .b2 { left: 6%; top: 36%; width: 88%; height: 40%; background: #fef3c7; } .s-learn .b3 { left: 66%; top: 20%; width: 28%; height: 10%; background: #fcd34d; }
.s-doc .mock-bar { background: #3b82f6; } .s-doc .b1 { left: 20%; top: 20%; width: 60%; height: 74%; background: #f8fafc; border: 1px solid #e2e8f0; } .s-doc .b2 { left: 26%; top: 28%; width: 48%; height: 4%; background: #cbd5e1; } .s-doc .b3 { left: 26%; top: 38%; width: 40%; height: 4%; background: #e2e8f0; }
.s-video .mock-bar { background: #ef4444; } .s-video .b1 { left: 6%; top: 20%; width: 62%; height: 60%; background: #111827; } .s-video .b2 { left: 72%; top: 20%; width: 22%; height: 16%; background: #fecaca; } .s-video .b3 { left: 72%; top: 42%; width: 22%; height: 16%; background: #fecaca; }
.s-search .b1 { left: 25%; top: 30%; width: 50%; height: 10%; background: #fff; border: 1px solid #cbd5e1; border-radius: 20px; } .s-search .b2 { left: 8%; top: 52%; width: 70%; height: 5%; background: #c7d2fe; } .s-search .b3 { left: 8%; top: 64%; width: 60%; height: 5%; background: #c7d2fe; }
.s-slides .mock-bar { background: #10b981; } .s-slides .b1 { left: 4%; top: 18%; width: 18%; height: 76%; background: #d1fae5; } .s-slides .b2 { left: 26%; top: 18%; width: 70%; height: 60%; background: #ecfdf5; border: 1px solid #a7f3d0; } .s-slides .b3 { left: 34%; top: 30%; width: 40%; height: 8%; background: #6ee7b7; }
.screen-tag { position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 999px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; color: #fff; background: rgb(15 23 42 / 0.6); }
.screen-blocked { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; color: #fff; background: var(--danger); }
/* Live screens. */
.student-screen { position: relative; }
.student-screen.live { display: block; overflow: hidden; background: #0f172a; border: 1px solid var(--line); }
.student-screen.live img { display: block; width: 100%; height: 100%; object-fit: contain; }
.screen-tag.live { background: var(--ok); }
.screen-zoom { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; padding: 0; font-size: 0.9rem; line-height: 1; color: #fff; background: rgb(15 23 42 / 0.65); border: 0; border-radius: 8px; cursor: pointer; }
.screen-zoom:hover { background: var(--accent); }
.student-screen .screen-blocked { max-width: calc(100% - 50px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-blocked { margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--danger); }
.zoom-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgb(15 23 42 / 0.7); }
.zoom-box { display: grid; gap: 10px; width: min(1100px, 100%, (100vh - 120px) * 1.6); padding: 14px; border-radius: 16px; background: var(--card); }
.zoom-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.zoom-head .secondary { margin-left: auto; }
.student-screen.zoomed { width: 100%; }
.student-screen.zoomed .screen-zoom { display: none; }
/* Stages. */
.stage-card .stage-now { font-size: 0.8rem; }
.stage-card .stage-now.in { color: var(--ok); }
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mode-card { display: grid; gap: 4px; padding: 14px 16px; font: inherit; text-align: left; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.mode-card[aria-checked="true"] { border-color: var(--accent); background: var(--chip); box-shadow: inset 0 0 0 1px var(--accent); }
.stage-students .tag { white-space: nowrap; }
.holiday-range summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; margin: 8px 0; }
.stage-filters { max-width: 640px; }
.stage-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.stage-table th, .stage-table td { padding: 6px 8px; text-align: left; vertical-align: middle; }
.stage-table thead th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.stage-table tbody th { font-weight: 600; white-space: nowrap; }
.stage-table select { width: 100%; }
@media (max-width: 560px) { .stage-table th, .stage-table td { padding: 4px; } .stage-table tbody th { white-space: normal; } }
/* Classroom actions. */
.classroom-actions { margin: 0 0 12px; }
.action-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.action-button { font-size: 0.95rem; padding: 7px 14px; }
.action-button.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.action-form { padding: 10px 0; }
.action-form .wide { flex-basis: 100%; margin: 0; }
.student-card.asking-help, .student-row.asking-help { border-color: #F59E0B; box-shadow: 0 0 0 3px rgb(245 158 11 / 0.35); animation: help-glow 1.6s ease-in-out infinite alternate; }
@keyframes help-glow { from { box-shadow: 0 0 0 2px rgb(245 158 11 / 0.25); } to { box-shadow: 0 0 0 5px rgb(245 158 11 / 0.45); } }
@media (prefers-reduced-motion: reduce) { .student-card.asking-help, .student-row.asking-help { animation: none; } }
.help-mark { font-size: 1rem; }
.help-bar { border-color: #F59E0B; }
.help-bar h2 { margin: 0 0 8px; font-size: 1.05rem; }
.answer-mark { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; }
.answer-mark.green { background: #16A34A; }
.answer-mark.amber { background: #F59E0B; }
.answer-mark.red { background: #DC2626; }
.check-summary { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.answer-count { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.action-group { min-width: 92px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.action-form .grow { flex: 1; min-width: 220px; }
.action-form .grow input, .action-form .grow textarea { width: 100%; }
.action-form textarea { font: inherit; resize: vertical; }
.action-mark { font-size: 0.9rem; }
.student-row .action-mark { margin-left: 4px; }

/* Home: the two-step verification reminder. */
.secure-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 18px; padding: 10px 14px; font-size: 0.9rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--chip); }
.secure-note-text { flex: 1; min-width: 220px; }
.secure-note .icon-button { padding: 2px 8px; font-size: 1.1rem; line-height: 1; color: var(--muted); background: none; border: 0; cursor: pointer; }

/* The student record: a side panel over Classroom, or the whole page. */
.record-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-direction: column; gap: 12px; width: min(560px, 100vw); padding: 18px 20px; overflow-y: auto; background: var(--card); border-left: 1px solid var(--line); box-shadow: -12px 0 30px rgb(15 23 42 / 0.12); }
.record-panel.full { position: static; width: auto; padding: 0; overflow: visible; border: 0; box-shadow: none; }
.record-head { display: flex; align-items: center; gap: 12px; }
.record-head .student-avatar { width: 48px; height: 48px; font-size: 1rem; }
.record-who { flex: 1; min-width: 0; }
.record-who h2 { margin: 0; font-size: 1.2rem; }
.record-who p { margin: 2px 0 0; overflow-wrap: anywhere; }
.record-tools { display: flex; gap: 6px; align-items: center; }
.record-tools .icon-button { padding: 2px 8px; font-size: 1.4rem; line-height: 1; color: var(--muted); background: none; border: 0; cursor: pointer; }
.record-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 3px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--accent); background: var(--chip); }
.pill.ok { color: #166534; background: #dcfce7; }
.pill.warn { color: #92400e; background: #fef3c7; }
.sign-in-methods { display: grid; gap: 12px; }
.sign-in-method h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; }
.sign-in-method h3 svg { width: 20px; height: 20px; }
/* The record's tabs look like every other tab bar (one style everywhere). */
.record-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; margin: 14px 0 12px; padding: 4px; background: var(--page); border: 1px solid var(--line); border-radius: 18px; }
.record-tab { flex: none; padding: 8px 18px; font: inherit; font-size: 0.92rem; color: var(--muted); background: none; border: 0; border-radius: 999px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.record-tab:hover { color: var(--ink); }
.record-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; background: var(--card); box-shadow: 0 1px 3px rgb(30 27 75 / 0.14); }
.record-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.record-body h3 { margin: 6px 0 0; font-size: 1rem; }
.record-body .student-screen.zoomed { aspect-ratio: 16 / 10; }
.record-actions { margin: 0; }
.record-events { margin: 0; padding-left: 18px; }
.name-link { padding: 0; font: inherit; font-weight: 600; text-align: left; color: inherit; background: none; border: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.name-link:hover { color: var(--accent); }
.record-days { align-items: center; }
.timeline { display: grid; gap: 4px; }
.timeline-bar { position: relative; height: 34px; border-radius: 8px; background: var(--chip); overflow: hidden; }
.timeline-part { position: absolute; top: 4px; bottom: 4px; padding: 0; border: 0; border-radius: 3px; background: #818cf8; }
button.timeline-part { cursor: pointer; }
.timeline-part.video { background: #a855f7; }
.timeline-part.on { background: var(--accent); outline: 2px solid var(--ink); }
.timeline-part.locked, .timeline-part.idle { background: #cbd5e1; }
.timeline-part.teacher-lock { background: #64748b; }
.timeline-part.exam { top: 0; bottom: 0; border-radius: 0; background: rgba(109, 40, 217, 0.14); border-top: 3px solid #6d28d9; pointer-events: none; }
.timeline-part.event { top: 0; bottom: 0; width: 2px !important; border-radius: 0; background: #dc2626; pointer-events: none; }
.record-exams { display: grid; gap: 6px; }
.record-exams h3 { margin: 8px 0 0; font-size: 0.95rem; }
.record-event.left, .record-event.blocked { color: #b91c1c; font-weight: 600; }
.exam-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.exam-done { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.exam-review { display: grid; gap: 8px; }
.exam-totals { margin: 0; font-size: 0.9rem; }
.exam-shown figcaption { flex-wrap: wrap; }
.exam-shown figcaption select { width: auto; }
.exam-review { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, transparent); }
.exam-scrub { position: relative; padding-top: 10px; }
.exam-scrub input[type="range"] { width: 100%; margin: 0; }
.exam-marks { position: absolute; inset: 0 8px auto 8px; height: 10px; }
.exam-mark { position: absolute; top: 0; width: 3px; height: 10px; margin-left: -1px; border-radius: 2px; background: #f59e0b; }
.exam-mark.left, .exam-mark.attempt, .exam-mark.blocked { background: #dc2626; }
.timeline-scale { display: flex; justify-content: space-between; font-size: 0.78rem; }
.record-blocks { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.record-block-head { margin: 0 0 6px; font-size: 0.9rem; }
.record-block.stretch { padding: 6px 10px; font-size: 0.88rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
.record-strip { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; min-width: 0; }
.record-thumb { display: grid; gap: 2px; flex: none; width: 128px; padding: 0; font: inherit; font-size: 0.72rem; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; }
.record-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--chip); }
.record-thumb.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.record-shown { margin: 0; display: grid; gap: 8px; }
.record-shown img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.record-shown figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.88rem; }
.record-shown .grow { flex: 1; min-width: 140px; }

/* Reports. */
.report-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
.report-range { display: grid; gap: 8px; }
.report-custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.report-custom label { display: grid; gap: 2px; font-size: 0.82rem; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 6px 0; }
.kpi { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.kpi strong { font-size: 1.3rem; }
.report-bars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.report-bars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; align-items: center; gap: 8px; font-size: 0.88rem; }
.report-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-track { height: 10px; border-radius: 5px; background: var(--chip); overflow: hidden; }
.report-fill { display: block; height: 100%; border-radius: 5px; background: #818cf8; }
.report-fill.blocked { background: #f87171; }
.report-value { min-width: 64px; text-align: right; }
.report-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fef3c7; color: #92400e; font-size: 0.9rem; }
.report-checks, .report-look { margin: 0; padding-left: 18px; font-size: 0.9rem; }
.report-visits { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 0.86rem; }
.report-visits li { display: grid; grid-template-columns: 48px minmax(120px, 1fr) minmax(80px, 1fr) auto; gap: 8px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.report-visits li.blocked { color: var(--danger); }
.report-searches { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 0.86rem; }
.report-searches li { display: grid; grid-template-columns: minmax(70px, auto) minmax(120px, 1fr) auto; gap: 8px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.report-searches li.blocked { color: var(--danger); }
.search-term { overflow-wrap: anywhere; }
.report-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.report-table th, .report-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
@media print {
  #who, nav, .console-footer, .admin-banner, .no-print, .report-range, .record-tools, .record-tabs, .toast { display: none !important; }
  .record-panel { position: static; width: auto; box-shadow: none; border: 0; padding: 0; overflow: visible; }
  .layout { display: block; }
  body { background: #fff; }
}

.report-videos { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.report-videos li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.report-videos li.blocked { border-color: #fecaca; background: #fff1f2; }
.video-icon { color: #dc2626; }
.video-text { display: grid; min-width: 0; }
.video-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-where { display: grid; min-width: 0; }
.visit-page { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; color: var(--muted); }
.privacy-form { display: grid; gap: 14px; max-width: 640px; }
.privacy-form .check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.privacy-form .check > span { display: grid; gap: 2px; }

.home-record { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.home-record > span { display: grid; gap: 2px; }

/* YouTube settings of a filter */
.youtube section { margin-top: 18px; }
.youtube h3 { margin: 0 0 6px; font-size: 1rem; }
.youtube-options, .youtube-categories { margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 14px; }
.youtube-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 12px; }
.youtube-options select { width: auto; }
.chip .chip-remove { margin-left: 6px; padding: 0 4px; font: inherit; color: var(--muted); background: none; border: 0; cursor: pointer; }
.chip .chip-remove:hover { color: var(--danger); }
.youtube-modes { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.youtube-card { padding: 4px 16px 16px; }
.youtube-card h4 { margin: 14px 0 2px; font-size: 0.95rem; }
.hide-group { padding: 2px 0; border-bottom: 1px solid var(--line); }
.hide-group:last-child { border-bottom: 0; }
.hide-parts { margin: 0 8px 8px; }
.hide-parts summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.hide-parts ul { margin: 4px 0 0; padding: 0; list-style: none; }
.switch.small { transform: scale(0.85); transform-origin: right center; }

/* Alerts and wellbeing */
.alert-list { display: grid; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.alert-item { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; background: var(--card, transparent); }
.alert-item.level-urgent { border-left-color: var(--danger); }
.alert-item.level-important { border-left-color: #D97706; }
.alert-item.level-info { border-left-color: #2563EB; }
.alert-item.unread .alert-what strong::after { content: ' •'; color: var(--danger); }
.alert-head { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 10px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.alert-what { display: grid; gap: 2px; }
.alert-level { font-weight: 600; }
.alert-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: end; }
.pill.state-closed { color: var(--muted, #64748b); }
.alert-detail { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.alert-events, .alert-history { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 0.86rem; }
.alert-events li { display: grid; grid-template-columns: minmax(80px, auto) minmax(90px, auto) 1fr auto; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.alert-events li.blocked { color: var(--danger); }
.alert-form { display: grid; gap: 8px; max-width: 520px; margin-top: 12px; }
nav .badge { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: #fff; background: var(--danger); }
@media (max-width: 640px) {
  .alert-head { grid-template-columns: 1fr; }
  .alert-tags { justify-content: start; }
  .alert-events li { grid-template-columns: 1fr; }
}

/* Teacher notes */
.note-form { display: grid; gap: 8px; max-width: 560px; margin-bottom: 16px; }
.note-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.note-form .note-tag { display: inline-flex; width: auto; white-space: nowrap; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.note-tag:has(input:checked) { border-color: var(--accent); background: var(--chip); }
.note-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.note-list li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.note-list li p { margin: 0 0 6px; }
.note-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* Alerts: word lists */
.term-test { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; max-width: 640px; }
.term-test label { flex: 1 1 280px; }
.term-result { display: flex; flex-wrap: wrap; gap: 6px; }
.term-theme { margin: 8px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.term-theme summary { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.term-row { margin: 4px 0; font-size: 0.88rem; overflow-wrap: anywhere; }
.term-list { display: grid; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; }
.term-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.term-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; align-items: end; margin-top: 8px; }
.term-form [hidden] { display: none; }
.term-language, .term-level { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.term-language select, .term-level select { width: auto; }

/* Licence */
.licence-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 0 24px 12px; padding: 10px 16px; border-radius: 12px; border-left: 4px solid #D97706; background: #fef3c7; color: #92400e; font-weight: 600; }
.licence-banner.danger { border-left-color: var(--danger); background: #fee2e2; color: #991b1b; }
.address-notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; border-left: 4px solid #D97706; background: #fef3c7; color: #92400e; }
.address-notice p, .address-notice ul { margin: 6px 0; }
.message.warn { color: #92400e; background: #fef3c7; }
.licence-lines { margin: 0; padding-left: 16px; }

/* Devices */
.device-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pill.danger { color: #991b1b; background: #fee2e2; }
.devices-table tr.on td { background: var(--chip); }

/* Google Workspace (Centro) */
button .g { width: 18px; height: 18px; vertical-align: -3px; }
.tag.google { color: #1a73e8; }
.tag.danger { color: var(--danger); }
.google-preview { margin-top: 16px; }
.google-preview details { margin: 4px 0; }

/* School dashboard */
.light { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; box-shadow: 0 0 0 3px rgb(0 0 0 / 0.04); }
.light.green { background: #10B981; }
.light.amber { background: #F59E0B; }
.light.red { background: #EF4444; }
.dashboard-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; margin: 8px 0; }
.dashboard-top .crumbs { padding-top: 6px; }
.dashboard-top .report-custom { justify-content: flex-end; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 1.05rem; }
.crumbs button.link { font-size: 1.05rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.card-section { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); min-width: 0; }
.card-section.wide { grid-column: 1 / -1; }
.mdm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 12px 0; }
.platform-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.platform-part { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; }
.platform-heading { margin-top: 24px; }
.mdm-card { display: grid; gap: 8px; align-content: start; }
.mdm-card h3 { margin: 0; }
/* Each platform's icon on an MDM's card: in colour where enabled, light
   grey where not (coming or unsupported, told apart by its title). */
.mdm-platforms { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.mdm-platform { display: inline-flex; padding: 3px; border-radius: 6px; }
.mdm-platform img { display: block; width: 28px; height: 28px; }
.mdm-platform.coming img, .mdm-platform.unsupported img { filter: grayscale(1); opacity: 0.3; }
.card-section h2 { margin: 0 0 10px; font-size: 1rem; }
/* The school's ready-made tasks: IT's examples, a family's proposals. */
.task-offers { margin: 18px 0; }
.task-tools { align-items: center; margin: 12px 0; }
/* The week's calendar of tasks: a column per day, an hour every 44px. */
.task-week { margin: 12px 0; }
.task-week > .personal-actions { align-items: center; }
.week-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(84px, 1fr)); overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.week-day, .week-hours { display: grid; grid-template-rows: 32px calc(var(--hours) * 44px); min-width: 0; }
.week-day { border-left: 1px solid var(--line); }
.week-day.today .week-day-name { color: var(--accent); font-weight: 700; }
.week-day-name { padding: 6px; font-size: 0.85rem; text-align: center; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.week-day-body { position: relative; background: repeating-linear-gradient(to bottom, transparent 0 43px, var(--line) 43px 44px); }
.week-hour { height: 44px; padding: 0 6px; font-size: 0.75rem; color: var(--muted); text-align: right; }
.week-block { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; gap: 1px; min-height: 18px; overflow: hidden; padding: 2px 5px; border: 1px solid var(--card); border-radius: 6px; background: var(--chip); border-left: 3px solid var(--accent); color: var(--ink); font: inherit; font-size: 0.75rem; text-align: left; cursor: pointer; }
.week-block strong, .week-block span { flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-block.action { border-left-color: var(--z); }
.week-block.paused { opacity: 0.55; border-left-style: dashed; }
.week-block:hover, .week-block:focus-visible { outline: 2px solid var(--accent); z-index: 1; }
.dashboard-table { width: 100%; }
.dashboard-table tr.clickable { cursor: pointer; }
.dashboard-table tr.clickable:hover td { background: var(--chip); }
.danger-text { color: var(--danger); }
ul.plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.share-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); }
.share.learning { background: #10B981; }
.share.leisure { background: #F59E0B; }
.share-bar + p { margin-top: 8px; }
.table-scroll { overflow-x: auto; max-width: 100%; }

/* Dashboard tiles */
.dashboard-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-title h1 { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 12px 0 16px; }
.tile { display: grid; align-content: start; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; min-width: 0; }
.tile:hover, .tile:focus-visible { box-shadow: 0 6px 18px rgb(15 23 42 / 0.08); transform: translateY(-1px); outline: none; }
.tile:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
.tile-head { display: flex; align-items: center; gap: 8px; }
.tile-head h2 { flex: 1; margin: 0; font-size: 0.95rem; }
.tile-icon { font-size: 1.2rem; }
.tile-value { margin: 6px 0 0; font-size: 2rem; font-weight: 700; line-height: 1.1; }
.tile-value.small { font-size: 1.15rem; }
.tile-label, .tile-note { margin: 0; font-size: 0.85rem; }
.tile-chart { color: var(--accent); }
.tile.arranging { cursor: grab; border-style: dashed; }
.tile.arranging:hover { transform: none; }
.tile-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tile-tools button { padding: 4px 10px; }
.trend { display: inline-block; margin-left: 4px; font-weight: 600; font-size: 0.8rem; }
.trend.good { color: var(--ok); }
.trend.bad { color: var(--danger); }
.sparkline { width: 100%; height: 36px; display: block; }
.day-bars { margin: 0; color: var(--accent); }
.day-bars svg { width: 100%; height: auto; display: block; }
.day-bars .fill { fill: currentColor; }
.day-bars .hit { fill: transparent; }
.day-bar:hover .fill { opacity: 0.75; }
.day-bars .baseline { stroke: var(--line); stroke-width: 1; }
.day-bars .axis { font-size: 11px; fill: var(--muted); }
.back { margin-bottom: 6px; }
.add-tiles { margin-bottom: 16px; }
.overview-table { margin-top: 4px; }

/* Device inventory */
.inventory-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.inventory-tools input[type=search] { flex: 1 1 220px; width: auto; }
.inventory-tools select { flex: 0 1 auto; width: auto; }
.inline-label select { width: auto; }
.inline-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.device-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0; font-size: 0.9rem; }
.device-facts dt { color: var(--muted); }
.device-facts dd { margin: 0; overflow-wrap: anywhere; }
.device-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; margin: 10px 0; }
.device-form label { display: grid; gap: 4px; font-size: 0.85rem; }
.device-form .wide { grid-column: 1 / -1; }
@media print {
  .inventory-tools, .device-card, nav, .console-footer { display: none !important; }
}
.recent-students { margin: 0; padding: 0; list-style: none; font-size: 0.86rem; min-width: 190px; }
.recent-students li { white-space: nowrap; }
.recent-students li + li { color: var(--muted); }

/* Battery (classroom and inventory) */
.battery-mark { display: inline-flex; align-items: center; gap: 2px; font-size: 0.72rem; color: var(--muted); }
.battery-mark svg { width: 18px; height: 18px; }
.battery-mark .battery-fill { fill: #10B981; }
.battery-mark.low { color: var(--danger); font-weight: 700; }
.battery-mark.low .battery-fill { fill: var(--danger); }
.battery-mark.charging .battery-fill { fill: #0EA5E9; }
.battery-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }

/* An image alert's thumbnail: 8 × 8 pixels blown up, and what to do. */
.alert-thumb { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 8px; vertical-align: middle; }
.what-to-do { margin: 0 0 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--chip); }
.what-to-do p { margin: 6px 0 0; }

/* Communication › Notifications: the rule editor shows only the fields of its type. */
.rule-editor [hidden] { display: none; }

/* Time per application: a badge (the school's logo, or an initial in the
   application's colour), and the school's applications. */
.app-badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; font-size: 0.7rem; font-weight: 800; color: #fff; background: #94a3b8; vertical-align: middle; object-fit: contain; flex: none; }
img.app-badge { background: #fff; }
.app-label { display: inline-flex; align-items: center; gap: 6px; }
.app-label .tag { margin-left: 4px; }
.report-ai { margin: 8px 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--chip); }
.report-ai h4 { margin: 4px 0 8px; }
.app-students summary { cursor: pointer; margin: 6px 0; }
.app-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.app-list.compact { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.app-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-form textarea { width: 100%; }

/* "Wrong category": a choice in place of its button. */
.correction { display: inline-flex; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* A video call's parts: an icon and allow or block. */
.videoconf-row { align-items: center; }
.videoconf-icon { font-size: 1.4rem; width: 2rem; text-align: center; }

/* Case files for counselling: the timeline, and only the case when printed. */
.case-timeline { display: grid; gap: 10px; padding-left: 1.2rem; }
.case-timeline li p { margin: 2px 0; }
.case-link { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 12px; }
.case-link h4 { width: 100%; margin: 0; }
@media print {
  body.print-case main > :not(.case-card) { display: none !important; }
}

/* "How are you today?" */
.checkin-notice-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.checkin-notice-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: #fef3c7; border-radius: 10px; }
.checkin-notice-list li.seen { background: #f1f5f9; }
.checkin-notice-list .case-link { flex-basis: 100%; }
.checkin-series { display: grid; gap: 6px; padding: 0; list-style: none; }
.checkin-series li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.checkin-table td { text-align: center; font-size: 1.15rem; }
.checkin-table td.checkin-low { background: #fef3c7; }
.checkin-results { display: grid; gap: 12px; justify-items: start; }
.checkin-results .table-wrap { justify-self: stretch; }
.checkin-table thead th:not(:first-child) { text-align: center; }

/* At night (docs/api/night.md) */
.night-card { margin-bottom: 16px; }
.night-list { display: grid; gap: 4px; margin: 0; padding-left: 18px; }
.night-settings { display: grid; gap: 10px; justify-items: start; margin-top: 8px; }

/* The family digital agreement (docs/api/agreements.md) */
.agreement-form .role-body { display: grid; gap: 12px; }
.agreement-part { display: grid; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; }
.agreement-part legend { padding: 0 4px; font-weight: 600; }
.agreement-lines { display: grid; gap: 6px; padding-left: 18px; }

/* The right to disconnect (docs/api/disconnect.md) */
.disconnect-form { display: grid; gap: 10px; justify-items: start; }
.disconnect-hours { display: grid; gap: 10px; }
.disconnect-hours[hidden] { display: none; }
.my-week-stages { display: grid; gap: 6px; margin: -2px 0 8px 28px; }

/* The web filter's parts under its tabs (filterView). */
.filter-parts { margin: -4px 0 14px; }
.filter-waiting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* "Ask for help" and "My tickets": the conversation, ours told apart. */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.message.info { color: var(--ink); background: var(--chip); border-radius: 12px; padding: 10px 14px; }
.ticket-thread { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.ticket-message { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); }
.ticket-message.from-vendor { border-left: 3px solid var(--accent); }
.ticket-message.from-partner { border-left: 3px solid var(--ok, #047857); }
.ticket-message.from-system { background: var(--chip); }
.ticket-message p { margin: 0; }
.ticket-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px !important; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--chip); }
/* The self-check of "Ask for help": what the School found, by level. */
.self-check { margin: 4px 0 12px; }
.self-check h3 { margin: 8px 0 4px; font-size: 1rem; }
.self-check ul.reasons { padding-left: 0; list-style: none; margin: 0 0 8px; }
.self-check ul.reasons li { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
.self-check ul.reasons li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.self-check ul.reasons li.light-red::before { background: #DC2626; }
.self-check ul.reasons li.light-amber::before { background: #F59E0B; }
.self-check ul.reasons li.light-green::before { background: #16A34A; }
.teacher-usage { margin-top: 20px; }
.teacher-usage summary { cursor: pointer; }
.teacher-usage .tag { margin-left: 6px; }
/* The exam's report: a student's incidents and observations under their row. */
.exam-table td.number { text-align: right; font-variant-numeric: tabular-nums; }
.exam-table .exam-detail td { background: var(--soft, rgb(0 0 0 / 0.03)); }
.exam-incidents { margin: 4px 0 8px; padding-left: 18px; }
.exam-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.exam-note textarea { font: inherit; width: 100%; min-width: min(320px, 100%); }
.exam-note-line { margin: 2px 0 0; }
.exam-header { color: var(--muted); }
@media print { .exam-table .exam-detail { display: none; } }
.report-exams .exam-note-line { display: block; }
.user-site-words { width: 100%; max-width: 520px; font: inherit; }

/* Legal texts before using the console (legalView). */
.legal-text { max-height: 50vh; overflow-y: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.92rem; }
.legal-text p { margin: 0 0 10px; white-space: pre-line; }
/* The header's compact buttons: My account as initials, signing out as an icon. */
#who .avatar { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
#who .icon-button { width: 38px; height: 38px; padding: 8px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
#who .icon-button svg { width: 20px; height: 20px; display: block; }
#who .who-language { width: auto; padding: 6px 8px; margin-right: 4px; }

/* Home: what awaits the administrator, then the school, then their classes. */
.home-section { margin: 26px 0 0; font-size: 1.1rem; }
.home-waiting .home-cards { margin-top: 12px; }
.waiting-card { border-left: 4px solid var(--admin-line); }
.waiting-card.danger { border-left-color: var(--danger); }
details.overview-table { margin-top: 26px; }
details.overview-table > summary { cursor: pointer; font-weight: 600; }

/* A teacher's own import from Classroom or Teams. */
.import-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.import-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.import-list label { display: flex; align-items: center; gap: 8px; }
.import-list input { width: auto; }

/* The profile tree: courses and their groups, and each node's parts. */
.profile-tree, .profile-tree ul { list-style: none; padding-left: 0; display: grid; gap: 8px; }
.profile-tree ul { padding-left: 22px; margin-top: 6px; border-left: 2px solid var(--line); }
.profile-tree li { display: block; }
.node-origin { margin: 4px 0 10px; }
.node-part { margin-top: 18px; }
.stage-table tr.changed th { color: var(--accent); }

/* The Windows agent's log on its device card. */
.agent-log { max-height: 320px; overflow: auto; font-size: 12px; background: var(--page); border: 1px solid var(--line); padding: 8px; white-space: pre-wrap; word-break: break-all; }

/* Devices › Scripts: a script and each PC's output, never wider than the page. */
.script-body, .script-output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 24rem;
  overflow: auto;
  margin: 0.5rem 0;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--surface-2, rgba(127, 127, 127, 0.08));
  font-size: 0.85rem;
}
.script-output { max-height: 12rem; margin: 0; }
.script-editor { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }

/* Each screen's explanation, folded (foldHelp). */
details.screen-help { margin: 4px 0 14px; }
details.screen-help > summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; font-weight: 600; width: fit-content; list-style: none; }
details.screen-help > summary::-webkit-details-marker { display: none; }
details.screen-help > summary::before { content: 'ⓘ '; }
details.screen-help[open] > summary { margin-bottom: 6px; }
details.screen-help > p { margin: 0; }

/* "⋯": a row's other actions (moreMenu). */
details.more-menu { position: relative; display: inline-block; }
details.more-menu > summary { list-style: none; cursor: pointer; border: 1px solid var(--line, #d9dbe8); border-radius: 999px; padding: 4px 12px; font-weight: 700; line-height: 1.2; }
details.more-menu > summary::-webkit-details-marker { display: none; }
details.more-menu .more-list { position: absolute; right: 0; z-index: 20; min-width: 200px; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--card, #fff); border: 1px solid var(--line, #d9dbe8); border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); }
details.more-menu .more-list button { text-align: left; width: 100%; }
/* "Add": the form opens on demand (addToggle). */
.add-toggle { margin: 10px 0 16px; }
.add-panel { border: 1px solid var(--line, #d9dbe8); border-radius: 14px; padding: 14px 16px; }
/* Technical detail, hidden until asked for (techToggle). */
table.tech-hidden .tech { display: none; }
.tech-toggle { margin: 6px 0; }

/* What needs doing first (fixSummary, problemsFirst). */
.message.fix-summary { border-radius: 12px; padding: 10px 14px; margin: 10px 0 14px; }
.message.fix-summary.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.message.fix-summary.error { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.message.fix-summary ul { margin: 6px 0 0; padding-left: 20px; }
table .fine-row { display: none; }
table.fine-open .fine-row { display: table-row; }
table .fold-row td { padding-top: 10px; padding-bottom: 10px; }

/* Integrations in steps: the platforms' cards, and each one's steps. */
.integration-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 14px 0 18px; }
.integration-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.integration-card .card-title { display: flex; gap: 10px; align-items: center; justify-content: flex-start; flex-wrap: wrap; margin: 0; }
details.integration-step { border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; background: var(--card); }
details.integration-step > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 600; }
details.integration-step > summary::-webkit-details-marker { display: none; }
details.integration-step .step-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--chip); color: var(--accent); font-weight: 800; flex: none; }
details.integration-step.done .step-mark { background: var(--ok); color: #fff; }
details.integration-step .step-title { flex: 1; }
details.integration-step .step-body { padding: 0 16px 16px; }

/* An import's preview, class by class (classesPreview). */
.classes-preview { margin-top: 14px; }
details.class-preview { border: 1px solid var(--line); border-radius: 12px; margin: 6px 0; padding: 8px 12px; }
details.class-preview > summary { cursor: pointer; }
.class-preview-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.class-preview-body ul { margin: 4px 0 0; padding-left: 18px; }

/* A card folded until opened (set once, looked at rarely). */
details.fold-card > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 6px; padding: 14px 18px; }
details.fold-card > summary::-webkit-details-marker { display: none; }
details.fold-card > summary h2 { margin: 0; font-size: 1.05rem; }
details.fold-card > summary::after { content: '▸'; margin-left: auto; color: var(--muted); }
details.fold-card[open] > summary::after { content: '▾'; }
/* Tabs with the rare ones under "⋯". */
.tabs-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.more-list label.inline-label { display: flex; flex-direction: column; gap: 4px; }

/* A rule's recipients and who gets it, on one line. */
.rule-recipients { align-items: center; }
.rule-recipients > p { margin: 0 0 0 6px; }

/* Getting Skyclaz going (setupCard). */
.setup-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 14px 0 22px; background: var(--card); }
.setup-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.setup-head h2 { margin: 0; font-size: 1.15rem; }
.setup-head .link { margin-left: auto; }
.setup-steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.setup-steps li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.setup-steps li.next { background: var(--chip); }
.setup-steps li.done .setup-text strong, .setup-steps li.skipped .setup-text strong { color: var(--muted); font-weight: 500; }
.setup-steps .step-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--chip); color: var(--accent); font-weight: 800; flex: none; }
.setup-steps li.done .step-mark { background: var(--ok); color: #fff; }
.setup-steps li.next .step-mark { background: var(--accent); color: #fff; }
.setup-text { display: flex; flex-direction: column; flex: 1; }
.setup-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.setup-parts { list-style: none; margin: 4px 0 0; padding: 0; font-size: 0.92rem; }
.setup-parts li { display: flex; gap: 6px; align-items: baseline; }
.setup-parts li.done { color: var(--muted); }

/* "Need help?": the floating chat over the school's help, and the guide's
   numbered dots and bubble on a screen. */
.assist-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; padding: 11px 18px; font: inherit; font-weight: 700; color: #fff; background: var(--accent); border: 0; border-radius: 999px; box-shadow: 0 8px 24px rgb(15 23 42 / 0.25); cursor: pointer; }
.assist-fab[aria-expanded="true"] { opacity: 0.85; }
.assist-panel { position: fixed; right: 20px; bottom: 78px; z-index: 41; display: flex; flex-direction: column; width: min(390px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 110px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgb(15 23 42 / 0.3); overflow: hidden; }
.assist-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: #fff; font-weight: 700; background: var(--accent); }
.assist-head span { flex: 1; }
.assist-head .link { color: #fff; font-size: 0.85rem; }
.assist-x { width: 28px; height: 28px; padding: 0; font: inherit; color: #fff; background: rgb(255 255 255 / 0.18); border: 0; border-radius: 50%; cursor: pointer; }
.assist-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 12px; overflow-y: auto; }
.assist-bot, .assist-me { max-width: 88%; padding: 8px 12px; line-height: 1.45; border-radius: 14px; }
.assist-bot { align-self: flex-start; background: var(--chip); border-bottom-left-radius: 4px; }
.assist-me { align-self: flex-end; color: #fff; background: var(--accent); border-bottom-right-radius: 4px; }
.assist-read { max-width: 100%; }
.assist-read p, .assist-read ul, .assist-read ol { margin: 6px 0; }
.assist-read ul, .assist-read ol, .assist-text ul, .assist-text ol { padding-left: 20px; }
.assist-card { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; }
.assist-card small { color: var(--muted); }
.assist-card .actions, .assist-bubble .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.assist-card button, .assist-bubble button { padding: 5px 11px; font-size: 0.88rem; }
.assist-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.assist-form input { flex: 1; min-width: 0; }
.assist-ticket { margin: 0 12px 10px; font-size: 0.85rem; }
.assist-table { border-collapse: collapse; font-size: 0.85rem; }
.assist-table th, .assist-table td { padding: 3px 6px; border: 1px solid var(--line); text-align: left; }
.assist-dot { position: absolute; z-index: 38; width: 26px; height: 26px; padding: 0; font: inherit; font-size: 0.8rem; font-weight: 800; color: #fff; background: var(--accent); border: 0; border-radius: 50%; box-shadow: 0 0 0 6px rgb(79 70 229 / 0.22); cursor: pointer; }
.assist-dot.current { box-shadow: 0 0 0 8px rgb(79 70 229 / 0.35); transform: scale(1.12); }
.assist-bubble { position: fixed; z-index: 39; display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 120px); padding: 14px 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 14px; box-shadow: 0 14px 40px rgb(15 23 42 / 0.28); }
.assist-bubble h3 { margin: 0 0 6px; font-size: 1rem; }
.assist-text { flex: 0 1 auto; min-height: 60px; max-height: 260px; overflow-y: auto; line-height: 1.45; }
.assist-text p { margin: 0 0 8px; }
.assist-guide { position: fixed; right: 20px; bottom: 20px; z-index: 42; display: flex; align-items: center; gap: 6px; padding: 9px 12px; color: #fff; background: var(--accent); border-radius: 14px; box-shadow: 0 8px 24px rgb(15 23 42 / 0.3); }
.assist-guide .assist-step { width: 26px; height: 26px; padding: 0; font: inherit; font-size: 0.8rem; color: #fff; background: rgb(255 255 255 / 0.2); border: 0; border-radius: 50%; cursor: pointer; }
.assist-guide .assist-step.current { color: var(--accent); font-weight: 800; background: #fff; }
body:has(.assist-guide) .assist-fab { display: none; }
.assist-target { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.screen-help .assist-show { display: block; margin-top: 6px; }
@media print { .assist-fab, .assist-panel, .assist-dot, .assist-bubble, .assist-guide { display: none; } }

/* Projecting the teacher's screen: a bar that stays while it lasts. */
.projecting-bar { position: fixed; top: 12px; left: 50%; z-index: 45; display: flex; align-items: center; gap: 14px; padding: 10px 16px; font-weight: 700; color: #fff; background: #B91C1C; border-radius: 999px; box-shadow: 0 8px 24px rgb(15 23 42 / 0.3); transform: translateX(-50%); }
.projecting-bar button { background: #fff; color: #B91C1C; }
@media print { .projecting-bar { display: none; } }
/* A student who wants to show their screen: one press opens it large; and
   that large view as big as the screen (the classroom's projector). */
.show-mark { padding: 0; font: inherit; background: none; border: 0; cursor: pointer; }
.zoom-box:fullscreen { display: flex; flex-direction: column; padding: 12px; background: var(--card); }
.zoom-box:fullscreen .student-screen { flex: 1; max-height: none; }

/* A page made to print on its own (the students by group): hidden on
   screen; when printing, the only thing on paper. */
.print-sheet { display: none; }
.print-sheet th::first-letter { text-transform: uppercase; }
.print-group { break-inside: avoid-page; margin-top: 18px; }
@media print {
  body.printing-sheet > :not(.print-sheet) { display: none !important; }
  body.printing-sheet .print-sheet { display: block; color: #000; }
  .print-sheet table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .print-sheet th, .print-sheet td { border-bottom: 1px solid #ccc; padding: 3px 6px; text-align: left; }
}

/* The school's Wi-Fi: a network changed in place, under its row. */
details.inline-edit { display: inline-block; }
details.inline-edit > summary { list-style: none; cursor: pointer; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); }
details.inline-edit > summary::-webkit-details-marker { display: none; }
details.inline-edit[open] { display: block; width: 100%; margin-top: 8px; }
fieldset.wifi-where { border: 0; padding: 0; margin: 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
fieldset.wifi-where legend { float: left; margin-right: 8px; }

/* Dropped off in class: was connected in it, two minutes without now. Amber
   and still (asking for help is amber and glowing). */
.dot.dropped { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; }
.student-card.dropped, .student-row.dropped { border-color: #F59E0B; box-shadow: 0 0 0 2px rgb(245 158 11 / 0.35); }
.student-screen.dropped { background: #FFFBEB; border: 1.5px dashed #F59E0B; color: #92400E; }
.student-screen.dropped svg { opacity: 0.9; }
.dropped .student-seen { color: #B45309; font-weight: 600; }
.dropped-alert { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 6px 14px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 0.9rem; color: #92400E; background: #FEF3C7; border: 1px solid #F59E0B; cursor: pointer; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .student-screen.dropped { background: rgb(245 158 11 / 0.12); color: #FCD34D; }
  :root:not([data-theme="light"]) .dropped .student-seen { color: #FCD34D; }
  :root:not([data-theme="light"]) .dropped-alert { color: #FCD34D; background: rgb(245 158 11 / 0.15); }
}
:root[data-theme="dark"] .student-screen.dropped { background: rgb(245 158 11 / 0.12); color: #FCD34D; }
:root[data-theme="dark"] .dropped .student-seen { color: #FCD34D; }
:root[data-theme="dark"] .dropped-alert { color: #FCD34D; background: rgb(245 158 11 / 0.15); }

/* Log › Activity: the search's fields in a grid. */
.activity-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; margin: 12px 0 16px; }
.activity-form .activity-kinds { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; border: 0; padding: 0; margin: 0; }
.activity-form .buttons { grid-column: 1 / -1; }
.activity-more { margin-top: 10px; }
/* Classes › Timetables: a week, a lesson per cell. */
.timetable td { vertical-align: top; min-width: 110px; }
.timetable .lesson { padding: 4px 6px; margin-bottom: 4px; border-radius: 8px; background: var(--chip); font-size: 0.85rem; }
.timetable .lesson .link { margin-left: 4px; }
.lesson-now { margin: 0 0 8px; font-weight: 600; }
.timetable .lesson { position: relative; padding-right: 22px; }
.timetable .lesson-remove { position: absolute; top: 2px; right: 4px; margin: 0; }
.timetable .lesson-add { width: 100%; min-height: 34px; border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 1.1rem; cursor: pointer; }
.timetable .lesson-add:hover { border-color: var(--accent); color: var(--accent); }
.timetable .lesson-fill { display: grid; gap: 6px; }
.timetable .lesson-fill input, .timetable .lesson-fill select { font-size: 0.85rem; padding: 6px 8px; }
.slots-card { margin: 10px 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.slot-list { display: grid; gap: 6px; margin: 8px 0; }
.slot { display: flex; align-items: center; gap: 6px; }
.slot input { width: auto; }
.report-table tr.warn-row td { background: rgb(245 158 11 / 0.10); }

/* The guide (REQ-095): its index, then the page; printed without the console. */
.guide-index { margin: 12px 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); }
.guide-index ol { margin: 6px 0 0; padding-left: 20px; columns: 2 260px; }
.guide-index li.level-1 { font-weight: 700; }
.guide section { margin-bottom: 18px; }
.guide h2, .guide h3 { margin-top: 22px; }

/* The class's video library (docs/api/video-library.md) */
.library-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.library-video { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; }
.library-video .grow { flex: 1 1 260px; min-width: 0; }
.library-video .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.library-topic h2 { font-size: 1.05rem; margin: 16px 0 8px; }
.gicar-setup { margin-top: 8px; }
.gicar-setup code { word-break: break-all; }
/* The school's data source (Integrations › Data source). */
.source-counts, .source-list { margin: 8px 0 0; padding-left: 20px; }
.source-list li { margin: 6px 0; }
.source-roles { display: grid; gap: 8px; margin: 8px 0; }
.source-role { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.source-role input, .source-role select { flex: 1 1 12rem; width: auto; margin: 0; }
.source-stages { margin: 8px 0; }
.source-stage { margin: 6px 0; }
.source-stage summary { cursor: pointer; }
.source-groups { margin: 6px 0 0; padding-left: 24px; columns: 2 240px; }
.source-groups li { list-style: none; margin: 2px 0; break-inside: avoid; }
.moodle-icon { vertical-align: middle; }
.update-notice { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 8px; background: var(--card); box-shadow: 0 4px 16px rgba(0, 0, 0, .18); border: 1px solid var(--accent); }
.erp-card.soon { opacity: .75; }
.erp-head { display: flex; align-items: center; gap: 10px; }
.erp-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; font-weight: 700; color: #fff; background: var(--accent); }
.erp-mark.erp-alexia { background: #0E7C86; }
.erp-mark.erp-educamos { background: #D7263D; }
.erp-mark.erp-clickedu { background: #F08A24; }
.erp-mark.erp-esfera { background: #3B5BA9; }
.erp-mark.erp-ieduca { background: #6A4C93; }
.erp-logo { height: 32px; max-width: 170px; object-fit: contain; box-sizing: content-box; padding: 4px 8px; border-radius: 8px; background: #fff; }
.mdm-logo { height: 24px; width: auto; vertical-align: middle; }
/* The teacher's instructions to the AI, 1 to N. */
.guide-items { display: grid; gap: 8px; padding-left: 24px; margin: 0; list-style: decimal; }
.guide-item { display: grid; gap: 6px; }
.guide-item textarea { width: 100%; box-sizing: border-box; }
.warn-text { color: #b45309; font-weight: 600; }
/* A card with its other actions behind ⋯ (My filters). */
.card-wrap { position: relative; display: flex; }
.card-wrap > .home-card { flex: 1; padding-right: 56px; }
.card-wrap > details.more-menu { position: absolute; top: 12px; right: 12px; }
button.decision { white-space: nowrap; }
/* The browsing report: one part at a time on screen, every part in print. */
.report-tabs { margin: 12px 0; }
.report-panel.print-only { display: none; }
@media print { .report-panel.print-only { display: block; } }
/* The report's links and little pictures. */
.site-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.site-icon { width: 16px; height: 16px; flex: none; font-size: 14px; line-height: 16px; }
.report-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); overflow-wrap: anywhere; }
.report-link:hover { text-decoration-color: currentColor; }
.video-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; background: var(--chip); }
.video-thumb.blurred { filter: blur(10px); cursor: pointer; }
.report-visits li.visit-day { display: block; padding-top: 10px; border: 0; }
.report-visits .visit-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.report-blocked-category > summary { list-style: none; cursor: pointer; }
.report-blocked-category > summary::-webkit-details-marker { display: none; }
.report-blocked-sites { margin: 4px 0 8px 16px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 0.9rem; }
.report-visits li:not(.visit-day) { grid-template-columns: 48px auto minmax(140px, 2fr) minmax(80px, 1fr) auto 24px; align-items: center; }
.report-visits .visit-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.report-videos li { grid-template-columns: 96px 1fr auto; }
@media (max-width: 700px) { .report-visits li:not(.visit-day) { grid-template-columns: 48px 1fr; } }
