/*
 * Tokens and reset. Component styling lives in components/, one file per
 * component, each scoped to its own root class. Nothing here may position a
 * component; nothing in components/ may restyle another component.
 *
 * Propshaft adaptation: a bare `@import "components/_site_header.css";` is
 * never resolved by Propshaft — its only CSS compiler (CssAssetUrls) rewrites
 * `url()` references, not `@import` path strings, so the request would hit
 * the literal (non-fingerprinted) filename and 404. Wrapping each import in
 * `url()` puts it inside that same regex, so Propshaft rewrites it to the
 * real digested path, e.g. `/assets/components/_site_header-<digest>.css`.
 * Each import still becomes its own HTTP request (native CSS @import) but now
 * resolves. See the Task 7 report for the curl proof.
 */
@import url("/assets/components/_site_header-4c4cd40b.css");
@import url("/assets/components/_site_footer-8aad5922.css");
@import url("/assets/components/_stale_banner-48a08253.css");
@import url("/assets/components/_region_error-ed6b2ed1.css");
@import url("/assets/components/_dialog-a9ee7766.css");
@import url("/assets/components/_scene-73ddf822.css");
@import url("/assets/components/_transition_layer-f8fc288b.css");
@import url("/assets/components/_entity_search-4fd96118.css");
@import url("/assets/components/_room_occupancy-bc841373.css");
/* Shared before the pages that place it: the placement modifiers in
   _teacher_record.css and _schedule.css have the same specificity as the base
   rules here, so source order is what decides. */
@import url("/assets/components/_schedule_selector-29aebfb3.css");
@import url("/assets/components/_teacher_record-6f49e66a.css");
@import url("/assets/components/_faculty_picker-3d44eefe.css");
@import url("/assets/components/_schedule-76c96c0b.css");
/* Self-contained: nothing above it styles .book-guide and it styles nothing
   above it, so its position in this list is not load-bearing. */
@import url("/assets/components/_guide_page-e55f8010.css");
@import url("/assets/components/_password_page-31d18355.css");
@import url("/assets/components/_admin_tokens-a2f58e62.css");
@import url("/assets/components/_admin_components-c4ea08c8.css");
@import url("/assets/components/_admin_workspace-13979e7c.css");
@import url("/assets/components/_teacher_workspace-8af7ed87.css");
@import url("/assets/components/_admin_teachers-b7c3a914.css");
@import url("/assets/components/_admin_workload-813c10b2.css");
@import url("/assets/components/_admin_resources-aa947925.css");
@import url("/assets/components/_admin_calendar-9e40a5bc.css");
@import url("/assets/components/_admin_accounts-97a82dba.css");
@import url("/assets/components/_admin_excel_imports-5f3e34fb.css");
@import url("/assets/components/_admin_notice-9c3c7e6f.css");
@import url("/assets/components/_admin_studio-89283278.css");
@import url("/assets/components/_admin_day_planner-d2fa3efd.css");

/*
 * Tokens ported from schedule_home/styles.css :root (source of truth for the
 * visual redesign). `--velvet` and `--almond` are the reference's accent
 * colours (hover/active fills and the wipe transition); `--line` is the
 * reference's near-opaque hairline, not the pale grey this file used to
 * declare.
 *
 * Everything below `--font-ui` is derived, not present verbatim in the
 * reference `:root` -- the reference hardcodes these as one-off rgba() values
 * scattered across dialog/guide/contact rules. Consolidating them into tokens
 * here is what constraint 4 (all colour values come from custom properties)
 * requires; each one reuses a value the reference already uses somewhere so
 * it stays visually faithful:
 *   --line-soft  reference's lighter divider tone (cookie/guide/contact rows,
 *                rgba(21,19,17,.24) or .28 depending on the rule -- one value
 *                covers both closely enough to be indistinguishable)
 *   --ink-faint  reference's muted caption/meta text, rgba(21,19,17,.52)
 *   --ink-placeholder  reference's form placeholder colour, rgba(21,19,17,.48)
 *   --backdrop   reference's dialog backdrop tint, rgba(255,255,255,.82)
 *   --paper-veil reference's idle guide-mark fill, rgba(255,255,255,.72)
 *   --danger     invented -- the reference mockup has no error state for the
 *                auth form, so there is nothing to port. Kept as a dark red
 *                that does not collide with ink/velvet/almond.
 */
:root {
  --ink: #151311;
  --velvet: #4B262F;
  --almond: #EED3BA;
  --paper: #FFFFFF;
  --line: rgba(21, 19, 17, .9);
  --line-soft: rgba(21, 19, 17, .28);
  --ink-faint: rgba(21, 19, 17, .52);
  --ink-placeholder: rgba(21, 19, 17, .48);
  --backdrop: rgba(255, 255, 255, .82);
  --paper-veil: rgba(255, 255, 255, .72);
  --danger: #B4392F;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-ui: "Manrope", Arial, Helvetica, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

button, a, input { font: inherit; }
button { color: inherit; }

/* The single most important rule in this file. `main` grows to absorb slack,
   so the footer sits at the bottom of a short page and below the content of a
   long one — with no scroll listener, no fixed positioning, and no per-page
   override. The React version reproduced this per page with position:fixed
   plus a scroll-gated class and got it wrong on every page that did not
   happen to scroll. */
main { flex: 1 0 auto; }

/* `.floor-scope` exists only to give the floor Stimulus controller a subtree
   that contains both the floor links and the transition layer (targets resolve
   only inside the controller element). It must have no layout effect: as a
   plain block it became body's flex child instead of <main>, so the rule above
   stopped applying to anything and the footer rose to sit under the content
   with dead space beneath it. display:contents removes the box from the layout
   tree entirely, so <main> and the fixed transition layer behave exactly as if
   the wrapper were not there. */
.floor-scope { display: contents; }

/* Belt-and-braces: even if some future page wraps <main> again, the footer
   stays on the bottom edge rather than floating under short content. */
.site-footer { margin-top: auto; }

/*
 * Two body-level states, deliberately separate.
 *
 * `modal-open` is set by dialog_controller for a dialog: transient, on top of
 * everything, owns the scroll lock while it lasts.
 *
 * `overlay-open` is the contract for a *page* overlay -- a full-viewport panel
 * that is part of the page rather than a modal (the faculty picker's detail
 * panel is the first). A page that introduces one adds this class and nothing
 * else: the shell components react to it in their own stylesheets, so no page
 * component ever reaches into `.site-header` or `.site-footer` by selector.
 * See components/_site_header.css, _site_footer.css and _dialog.css.
 *
 * The fixed layers this implies, documented here because no single
 * component can see all of them:
 *     180  a page overlay          (.faculty-detail)
 *     200  the floor wipe          (.transition-layer)
 *     260  the site header, but only while a page overlay is open, so its
 *          controls stay reachable above the overlay (and so it does NOT
 *          rise above the wipe on pages that have no overlay)
 *     330  the schedule/transfers dialog backdrops -- see components/_schedule.css;
 *          deliberately below 340 so the shared dialog layer stays on top of them
 *     340  any dialog while a page overlay is open -- a modal must outrank
 *          the page overlay it was opened from
 */
body.modal-open,
body.overlay-open { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
