:root {
  --sidebar: #2c3e50;
  --bg: #f5f6f8;
  --text: #222;
  --muted: #626e7e;
  --blue: #1a9be0;
  --blue-dark: #137cb5;
  /* solid fills that carry white text; --blue itself is too light for that in either theme */
  --blue-fill: #116fa3;
  --blue-fill-hover: #0f679a;
  --focus: #a8740a;
  --amber: #f0b429;
  --line: #e3e6ea;
  --card: #fff;
  --ok: #19a974;
  --warn: #e8a317;
  --danger: #d9382c;
  --ink: #2c3e50;
  --ink-hover: #34495e;
  --ink-quiet: #46596c;
  --sidebar-line: transparent;
  --surface: #eef1f4;
  --surface-2: #f5f6f8;
  --btn2: #e9edf1;
  --btn2-hover: #dde2e8;
  --input-bg: #fff;
  --input-border: #cfd5dc;
  --input-border-hover: #c5ccd3;
  --text-2: #444;
  --faint: #c0c6cc;
  --dashed: #d5d9de;
  --ok-bg: #e6f6ee;
  --ok-fg: #0f6b47;
  --ok-line: #bfe7d2;
  --danger-bg: #fdeeed;
  --danger-fg: #8d251d;
  --danger-line: #f5c9c5;
  --warn-bg: #fff6e5;
  --warn-fg: #7a4e00;
  --warn-line: #f3d9a4;
  --highlight-bg: #fff7e0;
  --blue-tint: #eef7fd;
  --info-bg: #e3f1fb;
  --info-fg: #0b5d8e;
  --local-bg: #efe8fb;
  --local-fg: #5a2ea6;
  --mix-ink: #000;
  --tint-pct: 9%;
  --ink-pct: 65%;
  --shadow-pop: 0 10px 30px rgba(0,0,0,.12);
  --shadow-tile: 0 6px 14px rgba(0,0,0,.15);
  --shadow-auth: 0 20px 60px rgba(0,0,0,.3);
  --auth-tint-1: rgba(44,62,80,.72);
  --auth-tint-2: rgba(44,62,80,.82);
  --sidebar-w: 220px;
  --radius: 6px;
  /* spacing: tight (inside a group) / block (between blocks in a zone) / zone (between zones) */
  --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 28px; --sp-8: 32px; --sp-10: 40px;
  --serif: "Roboto Slab", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Lato", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
a { color: var(--blue-dark); }
code { font-size: .85em; background: var(--surface); padding: 1px 5px; border-radius: 3px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline { display: inline; }
/* for screen readers only: what a colour or weight change says to sighted users */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.push-right { margin-left: auto; }
.hint { margin: 0 4px 10px; font-size: 13px; }
.lede { margin: -6px 4px 16px; color: var(--muted); }

/* sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: #fff;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 1px 0 0 var(--sidebar-line);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.32); }
.sidebar-backdrop { display: none; }
.crest { text-align: center; padding: 4px 0 28px; flex-shrink: 0; }
.crest img { width: 110px; height: auto; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; padding: 0 0 20px 26px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  color: #fff; text-decoration: none; font-size: 15px;
  border-radius: 6px 0 0 6px;
}
.nav-link i { flex: 0 0 28px; width: 28px; font-size: 19px; text-align: center; }
.nav-link:hover { background: rgba(255,255,255,.08); }
.nav-link.active { background: var(--bg); color: var(--text); }
.report {
  margin: auto 8px 0; flex-shrink: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--blue-fill); color: #fff; text-decoration: none;
  font-size: 13px; border-radius: var(--radius); line-height: 1.3;
}
.report-icon { width: 30px; height: 30px; flex-shrink: 0; }

/* signed-in user, bottom of the sidebar. the panel unfolds in place rather than floating, so it
   can't be clipped by the sidebar's scroll and stays on the dark surface. */
.side-user { margin: 10px 8px 0; border-radius: var(--radius); background: rgba(255,255,255,.06); overflow: hidden; flex-shrink: 0; }
.side-user-button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 0; cursor: pointer; font: inherit; text-align: left;
  background: none; color: #fff;
}
.side-user-button:hover, .side-user-button[aria-expanded="true"] { background: rgba(255,255,255,.07); }
.side-user-button .avatar { background: rgba(255,255,255,.14); outline: 1px solid rgba(255,255,255,.12); outline-offset: -1px; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side-user-text strong { font-size: 14px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text small { font-size: 10px; letter-spacing: .06em; opacity: .6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-button > i { color: rgba(255,255,255,.45); font-size: 12px; flex-shrink: 0; transition: transform .15s ease; }
.side-user-button[aria-expanded="true"] > i { transform: rotate(180deg); }
.side-user-panel { border-top: 1px solid rgba(255,255,255,.1); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.side-user-panel[hidden] { display: none; }
.side-user-meta { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; font-size: 12px; color: rgba(255,255,255,.6); min-width: 0; }
.side-user-meta .truncate { max-width: 100%; }
.side-user-meta .badge-admin { background: rgba(240,180,41,.2); color: #f6cf6a; }
.side-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 8px; border: 0; border-radius: 5px; background: none; font: inherit; font-size: 14px; color: #fff;
  text-decoration: none; cursor: pointer; text-align: left;
}
.side-item i { width: 18px; text-align: center; color: rgba(255,255,255,.6); }
.side-item:hover { background: rgba(255,255,255,.1); }
.side-heading { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 8px 8px 4px; border-top: 1px solid rgba(255,255,255,.1); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.side-pill { font-size: 10px; letter-spacing: 0; text-transform: none; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; }
.side-item-user { padding: 6px 8px; }
/* light / dark / system switch: three equal segments on the dark sidebar surface */
.theme-switch { display: flex; gap: 2px; margin: 4px 8px 6px; padding: 2px; border-radius: var(--radius); background: rgba(255,255,255,.08); }
.theme-switch button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 4px; border: 0; border-radius: 4px; background: none; color: rgba(255,255,255,.7); font: inherit; font-size: 12px; cursor: pointer; }
.theme-switch button i { font-size: 12px; }
.theme-switch button:hover { color: #fff; background: rgba(255,255,255,.08); }
.theme-switch button[aria-pressed="true"] { background: rgba(255,255,255,.18); color: #fff; }
.side-item-user .avatar-sm { width: 26px; height: 26px; font-size: 10px; background: rgba(255,255,255,.14); }
.side-item-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-item-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item-text small { font-size: 11px; color: rgba(255,255,255,.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* main */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: var(--card);
  display: flex; align-items: center; gap: 16px;
  position: relative; padding: 10px 16px 10px 24px; font-size: 13px; min-height: 48px;
  border-bottom: 1px solid var(--line);
}
.topbar p { margin: 0; }
/* the notice fills whatever is left after the user menu, so they never overlap */
.notice-bar { flex: 1; min-width: 0; text-align: center; }
.topbar a { color: var(--blue); }
.menu-toggle { display: none; background: none; border: 0; font-size: 20px; color: var(--text); cursor: pointer; position: absolute; left: 14px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.avatar-lg { width: 42px; height: 42px; font-size: 15px; vertical-align: middle; margin-right: 8px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); min-width: 230px; padding: 6px; z-index: 30;
}
.menu-meta { padding: 8px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.menu-form { margin: 0; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--text);
  text-decoration: none; border-radius: 4px; cursor: pointer; text-align: left;
}
.menu-item:hover { background: var(--surface); }

.content { padding: 18px 16px 0; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px 14px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: 28px; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-fill); color: #fff; text-decoration: none;
  padding: 8px 16px; border-radius: 4px; font-size: 13px; border: 0; cursor: pointer; font-family: inherit;
  line-height: 1.3;
}
.btn:hover { background: var(--blue-fill-hover); }
.btn-secondary { background: var(--btn2); color: var(--text); }
.btn-secondary:hover { background: var(--btn2-hover); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b52c22; }
.btn-small { padding: 6px 12px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn {
  background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 14px;
  padding: 6px 8px; border-radius: 4px; text-decoration: none; display: inline-flex;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn-danger:hover { color: var(--danger); }

/* announcement banners */
.banners { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; min-height: 96px;
  border-radius: var(--radius);
  background: var(--banner-bg); color: var(--banner-fg);
}
.banner.has-image { background: var(--banner-image) center / cover no-repeat, var(--banner-bg); }
.banner.has-overlay::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.25)); }
.banner > * { position: relative; }
.banner-text { flex: 1 1 320px; min-width: 0; }
.banner-text h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 4px; line-height: 1.15; text-wrap: balance; }
.banner-text p { margin: 0; font-size: 15px; opacity: .92; line-height: 1.4; text-wrap: pretty; }
.banner-cta {
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 4px; font-size: 14px; font-weight: 700;
  background: var(--banner-fg); color: var(--banner-bg); text-decoration: none; white-space: nowrap;
}
.banner.has-image .banner-cta { color: #222; }
.banner-cta:hover { filter: brightness(.92); }
.banner-cta.is-hidden { display: none; }
.banner.is-dismissible { padding-right: 54px; }
.banner > .banner-dismiss-form { position: absolute; top: 8px; right: 10px; margin: 0; }
.banner-dismiss {
  background: none; border: 0; cursor: pointer;
  color: var(--banner-fg); opacity: .7; font-size: 22px; line-height: 1; padding: 4px 8px;
}
.banner-dismiss:hover { opacity: 1; }
.form-preview-wide { margin-bottom: 20px; }
.form-preview-wide .banner { max-width: 900px; }
.form-grid-single { grid-template-columns: 1fr; }
.field textarea { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--input-border); border-radius: 4px; width: 100%; resize: vertical; background: var(--input-bg); color: var(--text); }
.field input[type=datetime-local], .field input[type=file] { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); }
.field textarea:focus, .field input[type=datetime-local]:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }

/* food */
.food-controls { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 64px; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); font-size: 14px; line-height: 1.2;
}
.chip-label { font-weight: 700; }
.chip-sub { font-size: 11px; color: var(--muted); }
.chip-quiet { color: var(--muted); background: transparent; }
.chip-quiet .chip-label { font-weight: 400; }
.chip.active { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.chip.active .chip-sub { color: rgba(255,255,255,.85); }
.chip:focus-visible, .seg:focus-visible, .btn:focus-visible, .tile-link:focus-visible, .star:focus-visible, .nav-link:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) { .chip:active { transform: scale(.97); } }
.meal-seg { flex-shrink: 0; }
.meal-seg .seg { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 14px; }
.meal-seg .seg.active { background: var(--blue-fill); color: #fff; }
.food-date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 4px 12px; font-size: 15px; }
.venue-chips { display: none; gap: 6px; margin-left: auto; }
.chip-venue { flex-direction: row; min-width: 0; padding: 5px 12px; font-size: 13px; border-color: var(--venue); color: var(--venue-ink); background: var(--card); --venue-ink: color-mix(in srgb, var(--venue) var(--ink-pct), var(--mix-ink)); }
.chip-venue.active { background: var(--venue); border-color: var(--venue); color: #fff; }

.venues { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 16px; align-items: start; }
.venue {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  --venue-ink: color-mix(in srgb, var(--venue) var(--ink-pct), var(--mix-ink)); --venue-tint: color-mix(in srgb, var(--venue) var(--tint-pct), var(--card));
}
/* the header is a tile: venue colour, icon top left, name bottom left */
.venue-head {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 112px; padding: 14px 16px 12px; background: var(--venue); color: #fff;
}
.venue-head-slim { min-height: 0; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; }
.venue-icon { font-size: 24px; }
.venue-badge { position: absolute; top: 12px; right: 12px; }
.badge-glass { background: var(--card); color: var(--venue-ink); margin: 0; }
.venue-title h2 { font-family: var(--serif); font-size: 22px; margin: 0; line-height: 1.15; }
.venue-title p { margin: 2px 0 0; font-size: 13px; color: rgba(255,255,255,.95); }
.venue-stub-body { padding: 14px 16px; font-size: 14px; color: var(--muted); }
.venue-stub-body p { margin: 0; }
.venue-stub-body strong { color: var(--text); }

.courses { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.course { border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.course h3 { font-family: var(--serif); font-size: 13px; margin: 0 0 6px; color: var(--muted); }
.course ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.course li { font-size: 14px; line-height: 1.35; overflow-wrap: break-word; }
/* one headline dish per venue, then any other starred sections as quieter highlights */
.course.headline { background: var(--venue-tint); border-left: 4px solid var(--venue); padding: 14px 16px; }
.course.headline h3 { color: var(--venue-ink); font-size: 14px; }
.course.headline li:first-child { font-size: 18px; font-weight: 700; line-height: 1.25; }
.course.highlight { background: var(--bg); border-left: 4px solid var(--venue); }
.course.highlight h3 { color: var(--venue-ink); }
.course.highlight li:first-child { font-weight: 700; }
.course.also { background: var(--bg); }
.course.also dl { margin: 0; display: flex; flex-direction: column; }
.also-row { display: grid; grid-template-columns: 140px 1fr; gap: 4px 14px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.also-row:first-child { border-top: 0; }
.also-row dt { color: var(--muted); font-size: 13px; }
.also-row dd { margin: 0; line-height: 1.4; }
.venue-foot { padding: 0 12px 12px; }
.admin-food-tools { margin-top: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-food-tools input[type=date] { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); }

@media (hover: hover) {
  .chip:hover { border-color: var(--input-border-hover); }
  .chip.active:hover { border-color: var(--blue-fill-hover); background: var(--blue-fill-hover); }
}

/* admin menu grid */
.menu-grid th { white-space: normal; }
.menu-slot { display: block; padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--text); font-size: 14px; min-width: 150px; }
.menu-slot small { display: block; font-size: 12px; }
.menu-slot.filled { background: var(--surface-2); }
.menu-slot.filled:hover { background: var(--surface); }
.menu-slot.empty { color: var(--faint); border: 1px dashed var(--dashed); text-align: center; }
.menu-slot.empty:hover { color: var(--blue-dark); border-color: var(--blue); }
.menu-slot.closed { color: var(--faint); text-align: center; font-size: 12px; cursor: default; }
.row-today td { background: var(--highlight-bg); }
.select { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); }
.field input[type=date] { font: inherit; font-size: 15px; padding: 8px 11px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); }
.field textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.format-example { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 12px; line-height: 1.5; margin: 0; white-space: pre-wrap; }

/* home page greeting */
.greeting { margin: var(--sp-2) 4px var(--sp-5); }
.greeting h1 { font-family: var(--serif); font-size: 30px; margin: 0; line-height: 1.1; }
.greeting p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.page-subhead { font-family: var(--serif); font-size: 22px; margin: 0; }

/* home page: "your day". the lesson strip spans the row; prep and rewards sit side by side as
   short lists; study invitations span too because each one carries accept / decline buttons */
.today { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-5); align-items: start; }
.today > .up-next, .today > .today-wide { grid-column: 1 / -1; }
/* a lone list (a pupil with rewards but no prep feed) takes the row rather than half of it */
.today:not(:has(.today-half ~ .today-half)) > .today-half { grid-column: 1 / -1; }
.up-next { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.up-next-main { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px 20px; background: var(--ink); color: #fff; text-decoration: none; min-width: 0; transition: background .15s ease-out; }
.up-next-main:hover { background: var(--ink-hover); }
.up-next-main:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 4px; }
.up-next-quiet { background: var(--ink-quiet); }
.up-next-subject { font-family: var(--serif); font-size: 22px; line-height: 1.15; text-wrap: balance; }
.up-next-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 13px; color: rgba(255,255,255,.78); font-variant-numeric: tabular-nums; }
.up-next-when { color: #fff; font-weight: 700; }
.up-next-when .fa-circle-dot { color: var(--amber); font-size: 10px; vertical-align: 1px; margin-right: 2px; }
.is-now .up-next-when .fa-circle-dot { animation: up-next-pulse 2.4s ease-out infinite; }
@keyframes up-next-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .is-now .up-next-when .fa-circle-dot { animation: none; } }
.up-next-rest { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px 20px; min-width: 0; }
.up-next-caption { margin: 0; font-size: 12px; color: var(--muted); }
.up-next-later { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.up-next-later li { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.up-next-later time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; flex-shrink: 0; min-width: 3.2em; }
.up-next-later-subject { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-next-room { margin-left: auto; padding-left: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.up-next-initials { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.up-next-meta .up-next-initials { color: rgba(255,255,255,.6); }
.up-next-note { margin: 0; padding: 18px 20px; align-self: center; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .today { grid-template-columns: 1fr; gap: var(--sp-4); } }
@media (max-width: 720px) {
  .up-next { grid-template-columns: 1fr; }
  .up-next-main { padding: 16px; }
  .up-next-rest { padding: 12px 16px; }
  .up-next-later { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
  .up-next-later li { gap: 6px; }
  .up-next-later time { min-width: 0; }
  .up-next-room { display: none; }
  .up-next-subject { font-size: 19px; }
}

/* rewards */
.recent-rewards { margin: 0; min-width: 0; }
.reward-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* the home page lists: one card, one row per item. title and detail stack on the left, the date
   holds the right edge, so three items line up as a column rather than three wide cards */
.reward-list-compact { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.reward-list-compact .reward { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cat date" "detail date"; column-gap: 12px; row-gap: 1px; align-items: baseline; padding: 10px 14px; border: 0; border-radius: 0; }
.reward-list-compact .reward + .reward { border-top: 1px solid var(--line); }
.reward-list-compact .reward-category { grid-area: cat; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; }
.reward-list-compact .reward-category::before { margin-top: 0; }
.reward-list-compact .reward-detail { grid-area: detail; padding-left: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reward-list-compact .reward-date { grid-area: date; margin: 0; align-self: start; }
.reward { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.reward-category { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.reward-category::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d4a017; flex-shrink: 0; }
.reward-detail { color: var(--muted); font-size: 13px; }
.reward-date { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.reward-month + .reward-month { margin-top: 20px; }
.reward-card { flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 16px; }
.reward-head { display: flex; align-items: baseline; gap: 10px; }
.reward-desc { margin: 2px 0; font-size: 15px; line-height: 1.4; }

/* find a free */
.free-picker { margin-bottom: 20px; }
.free-search { display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 0 14px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--radius); margin-bottom: 12px; }
.free-search i { color: var(--muted); }
.free-search input { flex: 1; border: 0; padding: 11px 0; font: inherit; font-size: 15px; background: none; outline: none; min-width: 0; color: var(--text); }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.person:hover { border-color: var(--blue); }
.person.is-selected { border-color: var(--blue); background: var(--blue-tint); }
.person input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }
.person .avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.free-note { margin: 0 4px 12px; font-size: 14px; color: var(--muted); }
.shared-title { font-family: var(--serif); font-size: 24px; margin: 0 4px 2px; }
.shared-frees .hint { margin-bottom: 14px; }
.free-week { display: grid; grid-template-columns: repeat(var(--tt-days, 5), minmax(0, 1fr)); gap: 16px; align-items: start; }
.free-day h3 { font-family: var(--serif); font-size: 15px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.free-day h3 small { font-size: 12px; color: var(--muted); font-family: "Lato", sans-serif; }
.free-day > .muted { font-size: 14px; }
.free-slot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: var(--radius); font-size: 14px; }
.free-slot > div { display: flex; flex-direction: column; }
.free-slot .muted { font-size: 12px; }
.free-slot.is-past { background: var(--surface-2); border-color: var(--line); opacity: .6; }
.propose { position: relative; }
.propose-toggle { list-style: none; font-size: 16px; color: var(--ok-fg); }
.propose-toggle::-webkit-details-marker { display: none; }
.propose[open] .propose-toggle { background: var(--card); }
.propose-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 260px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.propose-with { margin: 0; font-size: 13px; color: var(--muted); }
.propose-form input[type=text] { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); }
.plans-section { margin: 0 0 22px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.plan.is-pending { border-left: 4px solid var(--blue); }
.plan-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.plan-when { font-size: 15px; }
.plan-who, .plan-detail { color: var(--muted); font-size: 13px; }
.plan-replies { display: flex; gap: 4px; margin-top: 4px; }
.plan-reply { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; background: var(--surface); color: var(--muted); border: 2px solid transparent; }
.plan-reply-accepted { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok); }
.plan-reply-declined { background: var(--danger-bg); color: var(--danger-fg); text-decoration: line-through; }
.plan-actions { display: flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .free-week { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (max-width: 720px) { .free-week { grid-template-columns: 1fr 1fr; gap: 12px; } .propose-form { right: auto; left: 0; } }

/* prep */
.prep-section + .prep-section { margin-top: 22px; }
.prep-title-overdue i { color: var(--danger); }
.prep {
  display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; min-width: 0;
}
.prep:hover { border-color: var(--blue); }
.prep.is-overdue { border-left: 4px solid var(--danger); }
.prep.is-soon { border-left: 4px solid var(--warn); }
.prep-when { display: flex; flex-direction: column; width: 92px; flex-shrink: 0; font-size: 13px; line-height: 1.3; }
.prep-day { font-weight: 700; }
.prep-time { color: var(--muted); font-size: 12px; }
.prep-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.prep-class { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.prep-name { font-size: 15px; line-height: 1.25; }
.prep-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.prep-status-late { color: var(--danger); }
.prep-go { color: var(--faint); flex-shrink: 0; }
.prep-mini.is-overdue .reward-date { color: var(--danger); font-weight: 700; }
.prep-mini .reward-category::before { background: #5b5fc7; }
@media (max-width: 720px) {
  .prep { gap: 10px; padding: 10px 12px; }
  .prep-when { width: 72px; }
  .prep-go { display: none; }
}

/* tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: 10px;
}
.tiles-preview { grid-template-columns: repeat(auto-fill, minmax(150px, 180px)); }
.tile {
  position: relative;
  display: grid;
  min-width: 0;
  container-type: inline-size;
  background: var(--tile);
  border-radius: var(--radius);
  transition: transform .12s ease, box-shadow .12s ease;
}
@media (hover: hover) { .tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-tile); } }
/* a 16:10 spacer and the link share one grid cell, so the tile is at least 16:10 but grows when
   a long title needs it. percentage padding only resolves against width, so unlike aspect-ratio it
   can never push the column wider. */
.tile[hidden], .tile-section[hidden] { display: none; }
.tile::before { content: ""; grid-area: 1 / 1; padding-bottom: 62.5%; }
.tile-link {
  grid-area: 1 / 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  padding: 12px 14px 10px;
  color: #fff; text-decoration: none;
}
.tile-icon { font-size: 22px; flex-shrink: 0; margin-right: 28px; }
/* an uploaded logo fills the icon slot; the tile colour shows through transparent areas so it never floats.
   .logo-crop takes the shape of the logo's visible pixels (inline styles from TilesHelper#logo_crop) and the
   image is scaled and shifted inside it so the padding baked into the file is hidden. without those styles
   it's a plain contain fit. */
.tile-icon.has-image { width: 24px; height: 26px; display: flex; align-items: center; } /* the 22px icon's glyph and line box, so a logo reads at the same size */
.logo-crop { position: relative; display: block; width: 100%; height: 100%; flex-shrink: 0; overflow: hidden; }
.logo-crop img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; display: block; }
.tile-icon[hidden] { display: none; }
.tile-text { min-width: 0; }
.tile-text h2 {
  font-family: var(--serif); font-size: 17px; margin: 0 0 2px; line-height: 1.15;
  text-wrap: balance; overflow-wrap: break-word; hyphens: auto;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
/* narrow tiles get a slightly smaller title so single long words still fit on one line */
@container (max-width: 190px) {
  .tile-text h2 { font-size: 15px; }
  .tile-text p { font-size: 12px; }
}
.tile-text p {
  margin: 0; font-size: 13px; opacity: .85; line-height: 1.3; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.star {
  position: absolute; top: 8px; right: 8px;
  background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 14px; padding: 4px;
}
.star:hover { transform: scale(1.15); }

.footer { text-align: center; padding: 36px 0 20px; font-size: 13px; }
.brand { font-family: var(--serif); font-size: 22px; color: #f27d00; margin-left: 12px; }
.brand span { color: #a6d6c9; }
.brand .brand-sci { color: #f7d117; }
.footer .release { display: block; margin-top: 6px; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }

/* sections. the browser is the second zone of the home page, so it opens with a rule and a
   generous interval; inside it, sections pack by tile count (--n from the view) and wrap like words
   so that two small categories share a row. flex-grow is proportional to --n, so every tile on a
   shared row ends up the same width. */
.tile-browser { margin-top: var(--sp-10); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.tile-browser .page-head { padding-bottom: var(--sp-4); }
.tile-sections { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-7) var(--sp-8); }
.tile-section { flex: var(--n, 4) 1 calc(var(--n, 4) * 172px - 10px); max-width: calc(var(--n, 4) * 210px); min-width: min(100%, 160px); }
.tile-section-wide { flex-basis: 100%; max-width: none; }
.tile-section .tiles { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.tiles-none { margin: 4px 0 0; }
.tiles-none[hidden] { display: none; }
.tiles-none q { quotes: "\201C" "\201D"; color: var(--text); }
.section-title { font-family: var(--serif); font-size: 16px; margin: 0 0 10px 4px; color: var(--text-2); }
.section-title i { color: var(--amber); margin-right: 4px; }
.empty {
  margin: 0; padding: 22px; text-align: center; color: var(--muted); font-size: 14px;
  border: 2px dashed var(--dashed); border-radius: var(--radius);
}

/* flash */
.flashes { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius); font-size: 14px;
  background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line);
}
.flash-alert { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-line); }
.flash-close { margin-left: auto; background: none; border: 0; font-size: 18px; cursor: pointer; color: inherit; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* timetable: a column of cards per day, like the pupil portal */
.badge-week { font-size: 12px; background: var(--ink); color: #fff; padding: 3px 10px; }
.week-nav .btn.is-current { background: var(--ink); color: #fff; }
.tt-chips { display: none; margin-bottom: 12px; }
/* the week is one grid: day heads on row 1, then a row per period, so periods line up across days.
   each day's section and list are `display: contents` and place their own cells by inline grid-row/column */
.tt-week { display: grid; grid-template-columns: repeat(var(--tt-days, 5), minmax(0, 1fr)); grid-template-rows: auto repeat(var(--tt-rows, 1), auto); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tt-day, .tt-entries { display: contents; }
.tt-day-head { margin: 0; font-size: 15px; font-weight: 400; min-width: 0; }
.tt-day-head a { display: block; height: 100%; padding: 12px 10px; color: var(--text); text-decoration: none; background: var(--surface); }
.tt-day.is-today .tt-day-head a { background: var(--ink); color: #fff; }
.tt-day-today { font-weight: 700; margin-right: 4px; }
.tt-day .empty { margin: 0; padding: 28px 10px; background: var(--card); }
.tt-entries { list-style: none; margin: 0; padding: 0; }
.tt-slot { display: flex; flex-direction: column; min-width: 0; background: var(--card); }
.tt-slot .tt-entry + .tt-entry { border-top: 1px dashed var(--line); }
.tt-entry { display: flex; flex-direction: column; flex: 1; gap: 3px; padding: 12px 10px 14px; min-width: 0; font-size: 14px; }
.tt-slot.is-past { opacity: .55; }
.tt-slot.is-now, .tt-slot.is-now .tt-entry { background: var(--highlight-bg); }
.tt-slot.is-now { box-shadow: inset 3px 0 0 var(--amber); }
.tt-tag { align-self: flex-start; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: #5aa9dc; color: #fff; margin-bottom: 2px; }
.tt-kind-form .tt-tag, .tt-kind-tutorial .tt-tag, .tt-kind-year .tt-tag { background: #7bbf9a; color: #fff; }
/* a free period is a card like any other, just without a room; break and lunch are quieter still */
.tt-kind-free { background: var(--surface-2); }
.tt-kind-free .tt-subject { color: var(--muted); font-weight: 400; }
.tt-kind-break { background: var(--surface-2); color: var(--muted); }
.tt-entry.tt-kind-break { padding-top: 9px; padding-bottom: 10px; }
.tt-kind-break .tt-period { font-size: 13px; color: var(--muted); }
.tt-kind-break .tt-subject { font-size: 14px; color: var(--text-2); }
.tt-period { font-size: 14px; color: var(--text); }
.tt-subject { font-size: 17px; line-height: 1.2; overflow-wrap: break-word; }
.tt-room { color: var(--text-2); }
.tt-room-link { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; color: var(--blue-dark); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.tt-room-link:hover { color: var(--blue); }
.tt-room-link i { font-size: 12px; margin-right: 2px; }

/* college map: full page, and the room popup off the timetable */
.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.map-frame iframe { display: block; width: 100%; height: min(80vh, calc(100vh - 220px)); min-height: 420px; border: 0; }
.room-map { width: min(960px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; border-radius: var(--radius); background: var(--card); color: var(--text); box-shadow: var(--shadow-pop); }
.room-map::backdrop { background: rgba(20, 28, 36, .55); }
.room-map-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.room-map-head h2 { flex: 1; margin: 0; font-family: var(--serif); font-size: 18px; }
.room-map iframe { display: block; width: 100%; height: min(70vh, 640px); border: 0; }
@media (max-width: 720px) {
  .room-map { width: calc(100vw - 16px); }
  .room-map iframe { height: 75vh; }
}
.tt-meta { font-size: 12px; color: var(--muted); }
.tt-foot { margin-top: 14px; }
@media (max-width: 1100px) {
  /* keep one column per day (cells are placed by column number) and scroll sideways instead of wrapping */
  .tt-week { grid-template-columns: repeat(var(--tt-days, 5), minmax(200px, 1fr)); overflow-x: auto; }
}
@media (max-width: 720px) {
  .tt-chips { display: flex; }
  .tt-week { display: block; border: 0; background: none; }
  .tt-day { display: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .tt-day.is-selected { display: block; }
  .tt-entries { display: block; }
  .tt-filler { display: none; }
  .tt-slot { border-bottom: 1px solid var(--line); }
  .tt-slot:last-child { border-bottom: 0; }
  .tt-day-head { display: none; }
  .tt-entry { padding: 12px 14px 14px; }
}

/* auth */
/* an aerial of college behind the card, tinted towards the sidebar navy so the white card still reads */
.auth-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; color: #fff;
  background: linear-gradient(var(--auth-tint-1), var(--auth-tint-2)), var(--auth-bg) center / cover no-repeat, var(--sidebar);
}
.auth-body .footer { text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.auth-body .footer { color: rgba(255,255,255,.7); }
.auth-card {
  background: var(--card); color: var(--text); border-radius: 10px; padding: 36px 32px 28px;
  width: 100%; max-width: 420px; text-align: center; box-shadow: var(--shadow-auth);
}
.auth-card .flashes { padding: 0 0 12px; text-align: left; }
.auth-crest { width: 90px; }
.auth-title { font-family: var(--serif); font-size: 32px; margin: 8px 0 4px; color: #f27d00; }
.auth-title span { color: #a6d6c9; }
.auth-blurb { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.btn-microsoft {
  width: 100%; justify-content: center; background: #2f2f2f; padding: 12px; font-size: 15px;
}
.btn-microsoft:hover { background: #111; }
.auth-warning {
  text-align: left; font-size: 13px; background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-line);
  padding: 10px 12px; border-radius: var(--radius); line-height: 1.5;
}
.auth-dev { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.dev-users { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.dev-users form { margin: 0; }
.dev-user {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; cursor: pointer; font: inherit; text-align: left; color: var(--text);
}
.dev-user:hover { border-color: var(--blue); background: var(--blue-tint); }
.dev-user-text { display: flex; flex-direction: column; }
.dev-user-text small { color: var(--muted); font-size: 12px; }

/* admin chrome */
.admin-bar {
  display: flex; align-items: center; gap: 2px; padding: 0 16px; background: var(--card); border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.admin-bar-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 12px; white-space: nowrap; }
.admin-tab {
  padding: 12px 14px; font-size: 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--text); border-bottom-color: var(--blue); }
.admin-tab-exit { margin-left: auto; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .empty { border: 0; }
.card-title { font-family: var(--serif); font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card-link { margin-left: auto; font-size: 12px; font-family: "Lato", sans-serif; font-weight: 400; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col > .card { margin-bottom: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.stat:hover { border-color: var(--blue); }
.stat-value { font-family: var(--serif); font-size: 30px; line-height: 1; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 6px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 700; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table td small { display: block; font-size: 12px; }
.row-muted td { opacity: .55; }
.row-actions { text-align: right; }
.drag-handle { color: var(--faint); cursor: grab; width: 30px; }
tr.dragging { opacity: .4; }
tr.drag-over td { border-top: 2px solid var(--blue); }
.swatch { display: inline-flex; width: 26px; height: 26px; border-radius: 5px; background: var(--tile); color: #fff; align-items: center; justify-content: center; font-size: 12px; margin-right: 8px; vertical-align: middle; }

.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--text-2); text-decoration: none; margin-right: 4px; vertical-align: middle; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-off { background: var(--surface-2); color: var(--muted); }
.badge-admin { background: var(--warn-bg); color: var(--warn-fg); }
.badge-group, .badge-microsoft { background: var(--info-bg); color: var(--info-fg); }
.badge-local { background: var(--local-bg); color: var(--local-fg); }
a.badge:hover { filter: brightness(.95); }

.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

/* filters */
.filters { display: flex; gap: 8px; align-items: center; margin: 0; }
.filters-bar { margin: 0 0 14px; flex-wrap: wrap; }
.filters input[type=search], .filters select, .inline-form select {
  font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); min-width: 220px;
}
.segmented { display: flex; border: 1px solid var(--input-border); border-radius: 4px; overflow: hidden; background: var(--card); }
.seg { padding: 7px 12px; font-size: 13px; text-decoration: none; color: var(--muted); border-right: 1px solid var(--line); white-space: nowrap; }
.seg:last-child { border-right: 0; }
.seg.active { background: var(--ink); color: #fff; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }

/* forms */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; }
.form-fields { display: flex; flex-direction: column; gap: 16px; }
.form-fields.narrow { max-width: 520px; }
.form.compact { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field legend { margin-bottom: 6px; padding: 0; }
.field input[type=text], .field input[type=url], .field input[type=search] {
  font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--input-border); border-radius: 4px; width: 100%; background: var(--input-bg); color: var(--text);
}
.field input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 220px; }
.help { font-size: 12px; color: var(--muted); }
.colour-row { display: flex; gap: 10px; align-items: flex-start; }
.colour-row input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.logo-suggestion { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.logo-suggestion .swatch-pick { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.swatch-pick { width: 22px; height: 22px; border-radius: 4px; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--input-border); background: var(--tile); cursor: pointer; padding: 0; }
.swatch-pick:hover { transform: scale(1.1); }
.radio, .check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400 !important; cursor: pointer; }
.radio + .radio, .radio + .group-picker { margin-top: 6px; }
.group-picker { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface-2); }
.group-filter { width: 100%; font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--input-border); border-radius: 4px; margin-bottom: 8px; background: var(--input-bg); color: var(--text); }
.group-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.group-list .check { padding: 5px 6px; border-radius: 4px; }
.group-list .check:hover { background: var(--surface); }
.group-list .check small { margin-left: auto; font-size: 11px; }
.form-preview h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.form-preview .tiles-preview { grid-template-columns: 1fr; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-errors { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.form-errors ul { margin: 6px 0 0; padding-left: 18px; }

/* responsive */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-preview { order: -1; }
  .form-preview .tiles-preview { grid-template-columns: repeat(auto-fill, minmax(150px, 180px)); }
}
@media (max-width: 720px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 30px rgba(0,0,0,.3); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 15; }
  .sidebar-backdrop[hidden] { display: none; }
  body.drawer-open { overflow: hidden; }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .notice-bar { display: none; }
  .topbar { padding-left: 52px; }
  .content { padding: 14px 12px 0; }
  .greeting { margin-bottom: var(--sp-4); }
  .tile-browser { margin-top: var(--sp-8); padding-top: var(--sp-5); }
  .tile-sections { gap: var(--sp-6); }
  .tile-section { flex-basis: 100%; max-width: none; }
  .banner { padding: 18px 44px 18px 16px; }
  .food-controls { gap: 8px; }
  .day-chips, .tt-chips { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 12px 2px; margin: 0 -12px; }
  .day-chips::-webkit-scrollbar { display: none; }
  /* the scrollbar is hidden, so fade the right edge to say "more days this way"; the fade lifts as
     the row scrolls to its end. browsers without scroll-driven animations get no fade at all
     rather than a permanently dimmed sunday. */
  @supports (animation-timeline: scroll()) {
    .day-chips {
      mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-repeat: no-repeat;
      mask-size: calc(100% + 44px) 100%; animation: chips-unfade linear both; animation-timeline: scroll(self inline);
    }
  }
  /* thumbs, not pointers: everything you tap on this page is at least 44px tall */
  .chip { min-width: 60px; min-height: 44px; padding: 6px 12px; flex-shrink: 0; }
  .meal-seg { width: 100%; }
  .meal-seg .seg { flex: 1; justify-content: center; min-height: 44px; }
  .venue-chips { display: flex; width: 100%; margin-left: 0; }
  .venue-head { min-height: 0; flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; }
  .venue-icon { font-size: 20px; }
  .venue-title h2 { font-size: 18px; }
  .venue-title p { display: none; }
  .venue-badge { position: static; margin-left: auto; }
  .also-row { grid-template-columns: 1fr; gap: 2px; }
  .banner-text h2 { font-size: 20px; }
  .filters input[type=search] { min-width: 0; width: 100%; }
  .admin-tab-exit { margin-left: 0; }
}
@keyframes chips-unfade { from { mask-position: -44px 0; } to { mask-position: 0 0; } }

/* e-library: a dense directory of the library's online resources. one hairline grid per subject,
   like the timetable; the off-site login unfolds inside the row so a password is never more than
   one click away but never on screen by default. */
.lib-search, .tile-search { display: flex; align-items: center; gap: 8px; width: 280px; max-width: 100%; padding: 0 12px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 999px; color: var(--muted); }
.lib-search:focus-within, .tile-search:focus-within { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; color: var(--text); }
.lib-search input, .tile-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; padding: 8px 0; color: var(--text); outline: none; }
.lib-search input::placeholder, .tile-search input::placeholder { color: var(--muted); }
.lib-search input::-webkit-search-cancel-button, .tile-search input::-webkit-search-cancel-button { cursor: pointer; }
.lib-jump { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 4px 18px; }
.chip-jump { flex-direction: row; gap: 7px; min-width: 0; padding: 5px 12px; font-size: 13px; }
.chip-jump .chip-label { font-weight: 400; }
.chip-jump .chip-sub { font-size: 11px; font-variant-numeric: tabular-nums; }
.chip-jump:hover { border-color: var(--blue); color: var(--blue-dark); }
.chip-jump[hidden] { display: none; }
.lib-section + .lib-section { margin-top: 26px; }
.lib-section[hidden] { display: none; }
.lib-section .section-title { scroll-margin-top: 16px; }
/* no frame around the grid: each item draws its own hairline with a 1px shadow, and the 1px gap
   means neighbours share one line. a half-empty last row just ends, instead of leaving a boxed
   blank cell beside it at awkward widths. */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1px; padding: 1px; }
.lib-grid-preview { grid-template-columns: 1fr; }
.lib-item { display: flex; flex-direction: column; min-width: 0; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.lib-item[hidden] { display: none; }
.lib-link { flex: 1; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 0; }
@media (hover: hover) {
  .lib-link:hover { background: var(--surface-2); }
  .lib-link:hover .lib-title, .lib-link:hover .lib-ext { color: var(--blue-dark); }
}
.lib-link:focus-visible, .lib-login summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 4px; }
.lib-icon { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-size: 16px; color: #fff; background: var(--tile); }
.lib-icon.has-image, .swatch.has-image, .omnibox-icon.has-image { overflow: hidden; }
.lib-icon img, .swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.omnibox-icon img { width: 70%; height: 70%; object-fit: contain; display: block; }
.lib-text { display: flex; flex-direction: column; min-width: 0; padding-top: 1px; }
.lib-title { font-size: 15px; line-height: 1.25; overflow-wrap: break-word; }
.lib-ext { font-size: 10px; color: var(--faint); margin-left: 1px; vertical-align: 1px; }
.lib-blurb { font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; text-wrap: pretty; }
.lib-login { margin: 0 14px; border-top: 1px dashed var(--line); }
.lib-login summary { display: flex; align-items: center; gap: 7px; padding: 8px 0; font-size: 12px; color: var(--muted); cursor: pointer; list-style: none; user-select: none; }
.lib-login summary::-webkit-details-marker { display: none; }
.lib-login summary i { font-size: 11px; }
.lib-login summary::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.lib-login[open] summary { color: var(--text-2); }
.lib-login[open] summary::after { transform: rotate(-135deg) translateY(1px); }
.lib-login summary:hover { color: var(--text); }
.lib-creds { display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; animation: lib-reveal .18s ease-out; }
@keyframes lib-reveal { from { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .lib-creds { animation: none; } .lib-login summary::after { transition: none; } }
.lib-note { margin: 0 0 4px; font-size: 13px; color: var(--text-2); line-height: 1.4; text-wrap: pretty; }
.lib-cred { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.lib-cred-label { color: var(--muted); width: 68px; flex-shrink: 0; }
.lib-cred-value { font-size: 13px; user-select: all; overflow-wrap: anywhere; }
.lib-copy { margin-left: auto; padding: 3px 7px; display: inline-flex; align-items: center; gap: 5px; }
.is-copied .lib-copy { color: var(--ok-fg); }
.lib-none { margin: 4px 0 0; }
.lib-none[hidden] { display: none; }
.lib-none q { quotes: "\201C" "\201D"; color: var(--text); }
.lib-admin { margin-top: 24px; }
@media (max-width: 720px) {
  .lib-search, .tile-search { width: 100%; }
  .lib-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 12px 2px; margin: 0 -12px 16px; }
  .lib-jump::-webkit-scrollbar { display: none; }
  .chip-jump { flex-shrink: 0; }
}

/* dark mode. <html data-theme> is set before first paint by shared/_theme_head: an explicit choice
   from the switch in the sidebar, or the os setting when the preference is "system". same contrast
   relationships as light: page darkest, cards one step up, subtle fills one step above that. the
   sidebar sits a step *below* the page so the active nav tab still reads as bleeding into the content. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --sidebar: #0d1116;
  --sidebar-line: #262d35;
  --bg: #161b21;
  --card: #1e252c;
  --surface: #2a323b;
  --surface-2: #232a32;
  --btn2: #2e3741;
  --btn2-hover: #39434e;
  --input-bg: #171c22;
  --input-border: #3b4550;
  --input-border-hover: #4c5763;
  --line: #2c343d;
  --text: #e7eaee;
  --text-2: #c5ccd4;
  --muted: #949da8;
  --faint: #525d69;
  --dashed: #3b4550;
  --ink: #3b5068;
  --ink-hover: #48617d;
  --ink-quiet: #2e3f51;
  --blue: #3db1ec;
  --blue-dark: #7fcdf4;
  --blue-fill: #1479b3;
  --blue-fill-hover: #116fa3;
  --focus: #f0b429;
  --ok: #3fd095;
  --warn: #f2b94d;
  --danger: #f27168;
  --ok-bg: #143427;
  --ok-fg: #86e3b8;
  --ok-line: #215b45;
  --danger-bg: #3b1e1c;
  --danger-fg: #f7a89f;
  --danger-line: #6b2f2a;
  --warn-bg: #3a2e13;
  --warn-fg: #f4d07c;
  --warn-line: #6b5422;
  --highlight-bg: #342c15;
  --blue-tint: #17303f;
  --info-bg: #17303f;
  --info-fg: #92d2f6;
  --local-bg: #2b2242;
  --local-fg: #ccb6f6;
  --mix-ink: #fff;
  --tint-pct: 18%;
  --ink-pct: 50%;
  --shadow-pop: none;
  --shadow-tile: none;
  --shadow-auth: none;
  --auth-tint-1: rgba(13,17,22,.82);
  --auth-tint-2: rgba(13,17,22,.9);
  .menu, .propose-form { outline: 1px solid rgba(255,255,255,.05); outline-offset: -1px; }
  .card, .reward, .plan, .prep, .person, .chip, .stat, .up-next, .venue, .auth-card { box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); }
  .btn-microsoft { background: #fff; color: #222; }
  .btn-microsoft:hover { background: #e7eaee; }
  .banner.has-image .banner-cta { color: #222; }
  .sidebar.open { box-shadow: none; }
  .auth-crest-light { display: none; }
  .auth-crest-dark { display: inline; }
}
.auth-crest-dark { display: none; }

/* new tab page: a greeting and one box */
.newtab-body { min-height: 100vh; display: flex; flex-direction: column; }
.newtab-top { padding: 14px 16px; }
.newtab-home { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; color: #fff; text-decoration: none; font-size: 15px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.newtab-home:hover { background: rgba(255,255,255,.24); }
.newtab-home-crest { height: 22px; width: auto; }
.newtab-home strong { font-family: var(--serif); }
.newtab-main { flex: 1; padding: 0 16px; display: flex; flex-direction: column; }
.newtab-footer { color: rgba(255,255,255,.7); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.newtab { position: relative; width: 100%; max-width: 640px; margin: clamp(8px, 6vh, 56px) auto 0; }
/* nothing showing below the box: sit in the middle of the screen instead of near the top */
.newtab.is-centered { margin: auto; padding-bottom: 8vh; }
/* the college across the lake, blurred and tinted behind everything */
.newtab-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.newtab-bg::before { content: ""; position: absolute; inset: -40px; background: var(--newtab-bg) center / cover no-repeat; filter: blur(14px) saturate(1.1); transform: scale(1.04); }
.newtab-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(44,62,80,.35), rgba(44,62,80,.5)); }
.newtab-greeting { text-align: center; margin-bottom: 16px; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.newtab-greeting h1 { font-size: 34px; }
.newtab-greeting p { color: rgba(255,255,255,.85); }
.newtab-banners { margin: 20px 0 0; }
.newtab-banners .banner { box-shadow: var(--shadow-tile); }
.newtab-upnext { margin-top: 20px; }
.newtab-upnext .up-next { margin: 0; border: 0; box-shadow: var(--shadow-tile); }
.newtab-favs { margin-top: 20px; text-align: center; }
.newtab-favs-toggle { font: inherit; font-size: 14px; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 8px 16px; cursor: pointer; backdrop-filter: blur(6px); }
.newtab-favs-toggle:hover { background: rgba(255,255,255,.24); }
.newtab-favs .tiles { margin-top: 16px; text-align: left; }
.newtab-favs .tiles[hidden] { display: none; } /* .tiles sets display: grid, which would beat the hidden attribute */
.omnibox { position: relative; z-index: 5; }
.omnibox-box { display: flex; align-items: center; gap: 12px; padding: 0 18px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 999px; box-shadow: var(--shadow-tile); }
.omnibox-box:focus-within { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }
.omnibox-box > i { color: var(--muted); font-size: 17px; }
.omnibox-box input { flex: 1; min-width: 0; border: 0; padding: 15px 0; font: inherit; font-size: 18px; background: none; outline: none; color: var(--text); }
.omnibox-kind { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.omnibox-results { position: absolute; left: 0; right: 0; top: calc(100% + 10px); max-height: min(60vh, 440px); overflow-y: auto; list-style: none; margin: 0; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.omnibox-results:empty { display: none; }
.omnibox-result { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 4px; cursor: pointer; --tile: var(--ink); }
.omnibox-result.is-selected { background: var(--surface); }
.omnibox-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; flex-shrink: 0; font-size: 16px; color: #fff; background: var(--tile); }
.omnibox-result.is-search .omnibox-icon, .omnibox-result.is-url .omnibox-icon { background: var(--surface); color: var(--text); }
.omnibox-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.omnibox-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omnibox-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omnibox-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
@media (max-width: 720px) { .newtab-greeting h1 { font-size: 26px; } .omnibox-box input { font-size: 16px; } .omnibox-tag { display: none; } }

/* coming soon */
.coming-soon { text-align: center; padding: 60px 20px; color: var(--muted); }
.coming-soon i { font-size: 48px; color: var(--ink); opacity: .35; }
.coming-soon h2 { font-family: var(--serif); color: var(--text); margin: 16px 0 6px; }
.coming-soon p { max-width: 480px; margin: 0 auto 20px; }


/* roles: the permission matrix */
.badge-role { background: var(--info-bg); color: var(--info-fg); }
.badge-read { background: var(--surface-2); color: var(--text-2); }
.badge-write { background: var(--info-bg); color: var(--info-fg); }
.badge-admin { background: var(--warn-bg); color: var(--warn-fg); }
.matrix-field { margin-top: 20px; }
.matrix-wrap { margin-top: 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.matrix { font-size: 13px; }
.matrix th.matrix-feature { font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text); white-space: nowrap; width: 1%; padding-right: 24px; }
.matrix th.matrix-feature i { width: 18px; text-align: center; color: var(--muted); margin-right: 4px; }
.matrix-head { padding: 6px 12px !important; }
.matrix-all { font: inherit; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); background: none; border: 0; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.matrix-all:hover { background: var(--surface); color: var(--text); }
.matrix-cell { vertical-align: top; min-width: 160px; }
.matrix-cell .check { align-items: flex-start; }
.matrix-cell .check input { margin-top: 2px; flex: none; }
.matrix-cell .check small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.matrix-na { color: var(--faint); text-align: center; }
.matrix-static .matrix-cell { text-align: center; min-width: 0; }
.matrix-yes { color: var(--ok-fg); }
.matrix-no { color: var(--faint); }
.publish-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 10px; background: var(--surface-2); border-radius: 4px; max-width: 520px; }
.publish-note i { margin-top: 2px; }
@media (max-width: 720px) { .matrix-cell .check small { display: none; } .matrix-cell { min-width: 0; } }

/* --- access code sign in --- */
.auth-or { color: var(--muted); font-size: 13px; margin: 16px 0 10px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-form .field input[type=email], .auth-form .field input[type=text] { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); width: 100%; }
.auth-form .field input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.auth-form .btn-block { width: 100%; justify-content: center; margin-top: 4px; }
.access-code-reveal { background: var(--blue-tint); border: 1px solid var(--blue); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.access-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.access-code { font-size: 26px; letter-spacing: .14em; font-weight: 700; padding: 4px 8px; background: var(--card); border-radius: 4px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upload-details { margin-top: 12px; }
.upload-details summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.timetable-form { align-items: stretch; }
.timetable-form .field textarea { font-size: 13px; }
.details-form { align-items: stretch; }
.details-form .field input[type=email] { font: inherit; font-size: 15px; padding: 8px 11px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); color: var(--text); }
.check-list { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.check-list .check span { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
