/* Foundation for every page (templates/base.html): tokens, Raleway with old-style figures,
   links, buttons, the sign-in card. A school's own colours are injected inline after this. */

/* Design tokens: docs/design/rejoicing-hifi/README.md, except the typeface: Raleway
   replaces Plus Jakarta Sans (founder, 2026-11-06). --brand and --cream are
   per-school branding (step 20); until then, the platform's neutral defaults. */
:root {
  --brand: #2A1A12;
  --cream: #E0C5B2;
  --brand-dark: color-mix(in srgb, var(--brand) 76%, #000);
  --brand-soft: color-mix(in srgb, var(--cream) 30%, #fff);
  --on-brand: #fff; /* text on the primary: dark when the primary is too light (§2) */
  --ink: #2A1A12; --muted: #6B584C; --text-3: #4A3A30;
  --border: #EEE2D6; --page: #FFFAF5; --surface: #FFFFFF;
  --link: #9E1F2D; --link-hover: #7A1622;
  --danger-bg: #FDECEA; --danger-fg: #9A1F18;
  --info-bg: #E7EEF9; --info-fg: #1E4A8A;
}
/* Raleway's old-style figures everywhere (founder, 2026-11-12; replaces lining figures
   from 2026-11-06): forms, badges, tables, footnotes, all of it. Set on every element,
   and also as the "onum" feature, which a later `font:` shorthand doesn't reset and
   form controls don't drop. */
*, *::before, *::after { box-sizing: border-box;
  font-variant-numeric: oldstyle-nums; font-feature-settings: "onum" 1; }
body { margin: 0; background: var(--page); color: var(--ink);
  font: 400 13.5px/1.5 "Raleway", system-ui, sans-serif; }
/* Raleway everywhere (founder, 2026-11-06/07). Browsers don't pass the page font on
   to form controls, and they show code in a monospace font: both follow the page. */
button, input, select, textarea, optgroup, option, code, kbd, samp, pre { font-family: inherit; }
code, kbd, samp { font-size: inherit; font-weight: 700; }
/* Anything given the hidden attribute stays hidden, whatever display a class sets. */
[hidden] { display: none !important; }
/* Links are never underlined (founder, 2026-11-12): the link colour and weight mark them. */
/* :where() keeps these at zero specificity, so buttons made of links (.btn) keep
   their own colours. */
:where(a) { color: var(--link); text-decoration: none; }
:where(a):hover { color: var(--link-hover); }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 22px; }
.wordmark { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted);
  text-transform: uppercase; margin: 0 0 6px; }
h1 { font-size: 26px; font-weight: 800; margin: 0 0 4px; line-height: 1.2; }
.lede { color: var(--muted); margin: 0 0 20px; }
label { display: block; font-weight: 600; margin: 0 0 6px; }
.field { margin: 0 0 16px; }
input[type=text], input[type=password] { width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid #D9C8B8; border-radius: 12px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; }
input:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 12px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; text-decoration: none;
  border: 1px solid var(--border); background: #fff; color: var(--ink); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); width: 100%; }
.btn-primary:hover { background: var(--brand-dark); color: var(--on-brand); }
.alert { border-radius: 12px; padding: 10px 12px; margin: 0 0 16px; }
.alert-danger { background: var(--danger-bg); color: var(--danger-fg); }
.alert-info { background: var(--info-bg); color: var(--info-fg); }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger-fg); font-size: 12.5px; }
.alt { margin: 18px 0 0; text-align: center; color: var(--muted); }
.alt a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.badge { display: inline-block; border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 4px 10px;
  background: var(--ink); color: #fff; }
.footer { margin: 20px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
/* Support session bar (Super-Admin hi-fi, SchoolDetail). */
.support-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 10px 24px; background: #2A1A12; color: #fff; font-weight: 700; }
.support-banner a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 12px;
  background: #fff; color: #2A1A12; text-decoration: none; font-weight: 700; }

/* "Show All 18 Teachers" under a folded list (data-fold; founder, 2026-11-19). */
.fold-btn { align-self: flex-start; min-height: 38px; margin-top: 8px; font-size: 13px; }

/* Sign-in codes on screen for demo schools only (apps/accounts/demo.py). */
.demo-code { margin: 0 0 12px; line-height: 1.5; }
.demo-code .demo-code-digits { display: block; font-size: 26px; font-weight: 800; letter-spacing: .12em; margin-top: 4px; }
