/* =========================================================================
   SuperAAC Training — stylesheet
   =========================================================================

   Same design language as the Super website: Apple's marketing vocabulary.
   The tokens, type ramp, global bar, pill buttons and chevron links below are
   the site's, unchanged, so the course reads as part of the same product
   rather than a tool bolted onto it.

     - One idea per screen, centred, with a lot of air around it.
     - Display type large, semibold (600), negative tracking. Never heavier:
       emphasis comes from size, not weight.
     - Full-bleed bands alternating near-white, light grey and true black.
     - Chrome is thin and quiet. The content is the only loud thing.
     - One blue pill call to action, plus a blue chevron link. Not a wall of
       buttons.

   Two rules from the app's design language override the reference wherever
   they collide, exactly as they do on the website, because this is a course
   about a communication aid and its own audience includes the people it
   teaches about:

     1. Contrast is a floor. Body text clears 4.5:1, large text 3:1.
     2. Targets stay at 44px minimum even where Apple would go smaller, and
        motion is removed entirely under prefers-reduced-motion.

   Two themes, as on the rest of the mPower site (2026-10-19), with DARK the
   default. The switch is the site's own: <html data-theme="dark|light">, set
   in <head> by an inline copy of /assets/js/theme.js before this file
   paints, and the choice ('mpower-theme' in localStorage) is the one the
   marketing pages and the tools use, so a reader chooses once.

     - The bare :root below is DARK, and so is a page with no data-theme at
       all (scripts off): the default does not depend on the script running.
     - :root[data-theme="light"] restores the course exactly as it was: one
       white ground, every band white, cards on white with a hairline.
     - Print is always the light set, whatever the screen shows: a teacher
       printing the script from the dark theme must not get pale grey ink on
       white paper.

   Every colour a rule uses is a token, so a component is written once and
   both themes follow. The video keeps its own frame in both, so it is still
   the loudest thing on the page.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */

/* Dark: black ground, near-black cards, light ink, the bright blue. Ratios
   are against the ground the text actually sits on. */
:root {
  color-scheme: dark;

  --white: #ffffff;
  --paper: #000000;          /* the one ground */
  --paper-2: #1d1d1f;        /* panels on it */
  --card: #1d1d1f;           /* cards, quiz options, fields' fill */
  --card-quiet: #000000;     /* a course that is not published: outline only */
  --raised: #2c2c2e;         /* hovered fill on a card, poster placeholder */
  --line: #424245;           /* card edges */
  --hair: rgba(255, 255, 255, 0.16);   /* dividers inside a band */
  --hair-2: rgba(255, 255, 255, 0.16); /* the "or" rule on sign-in */
  --control: #86868b;        /* field and button outlines: 5.8:1 on black */
  --dot: #86868b;            /* quiz option ring: 4.7:1 on --card */
  --black: #000000;

  --ink: #f5f5f7;            /* 19.3:1 on black, 15.5:1 on --card */
  --ink-2: #a1a1a6;          /* 8.2:1 on black, 6.5:1 on --card */

  --ink-d: #f5f5f7;
  --ink-d2: #a1a1a6;         /* 9.0:1 on black */

  --blue: #2997ff;           /* 7.0:1 on black, 5.6:1 on --card */
  --blue-hover: #4aa7ff;
  --blue-dark: #2997ff;      /* 7.4:1 on black */
  --on-blue: #00224d;        /* text on a blue fill: 5.2:1 */
  --blue-wash: rgba(41, 151, 255, 0.14);

  --green: #30d158;          /* 7.1:1 on --green-bg, 8.3:1 on --card */
  --green-bg: #12301c;
  --green-ink: #b4f2c7;      /* a right answer's text: 11.2:1 */
  --on-green: #002b0e;       /* the tick on a green dot: 7.7:1 */
  --red: #ff6961;            /* 5.7:1 on --red-bg, 7.5:1 on black */
  --red-bg: #3a1614;
  --red-ink: #ffc2bd;        /* a wrong answer's text: 10.5:1 */

  --bar: rgba(0, 0, 0, 0.8);
  --bar-line: rgba(255, 255, 255, 0.16);
  --hover: rgba(255, 255, 255, 0.1);   /* the bar's buttons */
  --ring-track: rgba(255, 255, 255, 0.24);
  --track: rgba(255, 255, 255, 0.18);  /* progress bar */
  --stage: #000000;          /* the video's frame and letterbox */
  --stage-edge: rgba(255, 255, 255, 0.16);
  --toast: rgba(44, 44, 46, 0.94);     /* raised off the black ground */
  --toast-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 32px rgba(0, 0, 0, 0.6);

  --r-pill: 980px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --page: 1024px;
  --page-wide: 1240px;
  --gut: 22px;

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

/* Light: the course exactly as it was before the switch existed. Every value
   here is the literal the rules used, so nothing in this theme moved. */
:root[data-theme='light'] {
  color-scheme: light;

  --paper: #ffffff;          /* the one ground (was #fbfbfd) */
  --paper-2: #f5f5f7;        /* cards and panels on it */
  --card: #ffffff;
  --card-quiet: #f5f5f7;
  --raised: #f5f5f7;
  --line: #d2d2d7;           /* card edges on the white ground (the site's --rule) */
  --hair: rgba(0, 0, 0, 0.08);
  --hair-2: rgba(0, 0, 0, 0.1);
  --control: #d2d2d7;
  --dot: #b0b0b6;

  --ink: #1d1d1f;
  --ink-2: #6e6e73;          /* 4.7:1 on --paper */

  --blue: #0071e3;           /* 4.6:1 on --paper */
  --blue-hover: #0077ed;
  --on-blue: #ffffff;
  --blue-wash: rgba(0, 113, 227, 0.08);

  --green: #146c43;          /* 4.8:1 on --paper-2 */
  --green-bg: #e7f6ec;
  --green-ink: #0f4f31;
  --on-green: #ffffff;
  --red: #b3261e;            /* 5.1:1 on --paper */
  --red-bg: #fdeced;
  --red-ink: #8c1d18;

  --bar: rgba(255, 255, 255, 0.8); /* the white ground, translucent */
  --bar-line: rgba(0, 0, 0, 0.08);
  --hover: rgba(0, 0, 0, 0.045);
  --ring-track: rgba(0, 0, 0, 0.14);
  --track: rgba(0, 0, 0, 0.09);
  --stage: #f5f5f7;
  --stage-edge: rgba(0, 0, 0, 0.12);
  --toast: rgba(29, 29, 31, 0.94);
  --toast-shadow: none;
}

/* Paper is white: printing from the dark theme gets the light set too (the
   same values as above; a print rule cannot share a selector with them). */
@media print {
  :root,
  :root[data-theme] {
    color-scheme: light;
    --paper: #ffffff;
    --paper-2: #f5f5f7;
    --card: #ffffff;
    --card-quiet: #f5f5f7;
    --raised: #f5f5f7;
    --line: #d2d2d7;
    --hair: rgba(0, 0, 0, 0.08);
    --hair-2: rgba(0, 0, 0, 0.1);
    --control: #d2d2d7;
    --dot: #b0b0b6;
    --ink: #1d1d1f;
    --ink-2: #6e6e73;
    --blue: #0071e3;
    --blue-hover: #0077ed;
    --on-blue: #ffffff;
    --blue-wash: rgba(0, 113, 227, 0.08);
    --green: #146c43;
    --green-bg: #e7f6ec;
    --green-ink: #0f4f31;
    --on-green: #ffffff;
    --red: #b3261e;
    --red-bg: #fdeced;
    --red-ink: #8c1d18;
    --bar: rgba(255, 255, 255, 0.8);
    --bar-line: rgba(0, 0, 0, 0.08);
    --hover: rgba(0, 0, 0, 0.045);
    --ring-track: rgba(0, 0, 0, 0.14);
    --track: rgba(0, 0, 0, 0.09);
    --stage: #f5f5f7;
    --stage-edge: rgba(0, 0, 0, 0.12);
    --toast: rgba(29, 29, 31, 0.94);
    --toast-shadow: none;
  }
}

/* ----------------------------------------------------------------- reset */

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

/* `hidden` must actually hide. The UA rule is display:none at the lowest
   possible specificity, so any class that sets display beats it -- which once
   put the signed-in header on top of the sign-in screen. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  /* SF on Apple platforms, a close grotesque everywhere else. Atkinson
     Hyperlegible is listed because the app offers it and no layout here may
     break when a reader substitutes it. */
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Helvetica Neue', 'Atkinson Hyperlegible', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ------------------------------------------------------------------- type */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.display {
  font-size: clamp(40px, 7.4vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

.headline {
  font-size: clamp(32px, 5.2vw, 64px);
  line-height: 1.0625;
  letter-spacing: -0.012em;
}

.subhead {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.title-3 {
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.14;
}

.eyebrow {
  font-size: clamp(19px, 1.6vw, 21px);
  font-weight: 600;
  letter-spacing: 0.004em;
  color: var(--blue);
  margin: 0 0 10px;
}

.intro {
  font-size: clamp(19px, 1.9vw, 28px);
  line-height: 1.3;
  letter-spacing: 0.004em;
  font-weight: 400;
  color: var(--ink-2);
  margin: 22px auto 0;
  max-width: 46ch;
}

.body-copy {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 16px 0 0;
  max-width: 60ch;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

.footnote {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 76ch;
}

/* Bands invert the whole ink ramp. */
.band-light { background: var(--paper); }
.band-grey  { background: var(--paper); }

.band-dark {
  background: var(--black);
  color: var(--ink-d);
}

.band-dark .eyebrow { color: var(--blue-dark); }

.band-dark .intro,
.band-dark .body-copy,
.band-dark .footnote { color: var(--ink-d2); }

.band-dark a { color: var(--blue-dark); }

/* ------------------------------------------------------------------ links */

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* Links inside running prose are always underlined: a blue word alone is
   colour carrying meaning. */
.body-copy a,
.footnote a,
.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
  border-radius: 6px;
}

.band-dark :focus-visible { outline-color: var(--blue-dark); }

/* <main> takes focus on every view change (app.js show()) so a screen reader
   starts at the new content. It is a landing point, not a control: Chrome
   counts a focus made before any interaction as focus-visible, and the ring
   drew a stray line across the page under the sign-in screen. */
main[tabindex="-1"]:focus { outline: none; }

.skip {
  position: absolute;
  left: 20px;
  top: -120px;
  z-index: 9999;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--blue);
  border-radius: var(--r-sm);
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 600;
  transition: top 180ms var(--ease);
}

.skip:focus {
  top: 20px;
  text-decoration: none;
}

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

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.wrap-wide { max-width: var(--page-wide); }

.center { text-align: center; }

.center .intro,
.center .body-copy { margin-inline: auto; }

section { padding-block: clamp(70px, 9vw, 130px); }

.tight { padding-block: clamp(48px, 6vw, 88px); }

.tighter { padding-block: clamp(34px, 4vw, 56px); }

/* ------------------------------------------------------------------- nav
   Apple's global bar: 48px, translucent, small type. The links keep a 44px
   hit area through padding even though the label is small, which is the one
   place this design knowingly departs from the reference.
   ------------------------------------------------------------------------ */

.globalnav {
  position: sticky;
  top: 0;
  z-index: 9000;
  height: 48px;
  background: var(--bar);   /* the ground, translucent */
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--bar-line);
}

.globalnav-inner {
  max-width: var(--page-wide);
  margin-inline: auto;
  padding-inline: var(--gut);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.globalnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.globalnav-brand:hover {
  text-decoration: none;
  color: var(--ink);
}

/* Bare, in the ink colour -- the site draws the ring itself rather than
   reversing it out of a filled square, and the two sat side by side looking
   like two different companies. */
.globalnav-brand .mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--ink);
}

.globalnav-brand .mark svg {
  width: 22px;
  height: 22px;
}

.globalnav-brand .sub {
  font-weight: 400;
  color: var(--ink-2);
}

.globalnav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding-inline: 12px;
  font-size: 12px;
  font-family: inherit;
  letter-spacing: -0.01em;
  color: var(--ink);
  opacity: 0.82;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.nav-btn:hover {
  opacity: 1;
  text-decoration: none;
  background: var(--hover);
}

/* Pressed state is weight plus an underline, never colour alone. */
.nav-btn[aria-pressed='true'] {
  opacity: 1;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ink);
}

/* The theme switch: the site's own button, round, 44px, the icon in the
   bar's ink. Its state is the theme itself, so unlike Teacher mode it takes
   no pressed underline: the whole page is the indicator. */
.theme-toggle {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 2px;
  padding: 0;
  color: var(--ink);
  opacity: 0.82;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.theme-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
}

.theme-toggle:hover {
  opacity: 1;
  background: var(--hover);
}

/* The ring follows the circle (the generic 6px radius would square it) and
   sits just inside it: the button fills the bar's height, and a ring drawn
   outside would be cut off by the top of the window. */
.theme-toggle:focus-visible {
  opacity: 1;
  border-radius: 50%;
  outline-offset: -2px;
}

#whoName {
  font-size: 12px;
  color: var(--ink-2);
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-inline: 8px;
}

/* Progress, kept quiet: a thin ink ring, not a coloured badge. Chrome is not
   where this design shouts. */
.ring {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  margin-right: 4px;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 2.4;
}

.ring-bg { stroke: var(--ring-track); }

.ring-fg {
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  transition: stroke-dashoffset 520ms var(--ease);
}

.ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 23px;
  border-radius: var(--r-pill);
  background: var(--blue);
  color: var(--on-blue);
  font-family: inherit;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.022em;
  border: 1px solid var(--blue);
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease);
}

.btn:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  color: var(--on-blue);
  text-decoration: none;
}

.btn[disabled] {
  opacity: 0.42;
  cursor: default;
}

/* Dark: a faded bright-blue pill on black leaves its label ("Signing in...")
   at under 2:1, so a disabled button is a quiet grey pill instead, its label
   still readable (5.4:1). */
:root:not([data-theme='light']) .btn[disabled] {
  opacity: 1;
  background: var(--raised);
  border-color: var(--raised);
  color: var(--ink-2);
}

.btn-secondary {
  background: transparent;
  color: var(--blue);
}

.btn-secondary:hover {
  background: var(--blue-wash);
  color: var(--blue);
}

.band-dark .btn {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #00224d;
}

.band-dark .btn:hover {
  background: #4aa7ff;
  border-color: #4aa7ff;
  color: #00224d;
}

.btn-block { width: 100%; }

/* The chevron link. The arrow is a glyph in a span so it can slide on hover
   without moving the label. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 17px;
  letter-spacing: -0.022em;
  color: var(--blue);
}

.link-arrow:hover { text-decoration: underline; }

.link-arrow .chev {
  display: inline-block;
  margin-left: 4px;
  transition: transform 180ms var(--ease);
}

.link-arrow:hover .chev { transform: translateX(3px); }

.link-back .chev {
  margin: 0 4px 0 0;
  transition: transform 180ms var(--ease);
}

.link-back:hover .chev { transform: translateX(-3px); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  align-items: center;
  margin-top: 28px;
}

.center .cta-row { justify-content: center; }

/* --------------------------------------------------------------- sign in */

.signin {
  position: relative;
  min-height: calc(100dvh - 48px);
  display: grid;
  place-items: center;
  padding: clamp(40px, 7vw, 90px) var(--gut);
}

/* The bar is hidden on this screen; its switch stands where the bar's own
   sits, top right, in the bar's 48px line. */
.signin-theme {
  position: absolute;
  top: 2px;
  right: max(var(--gut), calc((100% - var(--page-wide)) / 2 + var(--gut)));
}

.signin-inner {
  width: min(420px, 100%);
  text-align: center;
}

.signin-inner .headline { font-size: clamp(30px, 4.6vw, 44px); }

.signin-inner .intro {
  font-size: 19px;
  margin-top: 14px;
}

.signin-form {
  margin-top: 40px;
  text-align: left;
}

.field + .field { margin-top: 14px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: -0.022em;
  padding: 14px 16px;
  min-height: 48px;
  border: 1px solid var(--control);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink);
}

.field input:focus {
  border-color: var(--blue);
  outline-offset: 2px;
}

.signin-form .btn { margin-top: 26px; }

.err {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--red-bg);
  color: var(--red);
  font-size: 15px;
  line-height: 1.4;
}

.or {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-2);
  font-size: 12px;
  margin: 26px 0 16px;
}

.or::before,
.or::after {
  content: '';
  height: 1px;
  background: var(--hair-2);
  flex: 1;
}

/* Google and Apple: each brand's own button, the same as the site's
   sign-in dialog draws them (super-website/assets/css/auth.css, "Google and
   Apple", where the guidelines are written down; keep the two in step).
   Google: the four-colour G, white with a #747775 edge in light, #131314
   with a #8e918f edge in dark. Apple: black on light, white on dark. Both
   44 px, full width, a pill, the same type size. */
.providers {
  display: grid;
  gap: 10px;
}

.providers [hidden] { display: none; }

.auth-provider {
  --gsi-fill: #ffffff;
  --gsi-edge: #747775;
  --gsi-ink: #1f1f1f;
  --gsi-layer: rgba(31, 31, 31, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}

.auth-provider[data-provider='google.com'] {
  border: 1px solid var(--gsi-edge);
  background: var(--gsi-fill);
  color: var(--gsi-ink);
  font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.25px;
}

/* Hover only where there is a pointer that hovers: on a touch screen the
   state stays on the last button touched. */
@media (hover: hover) {
  .auth-provider[data-provider='google.com']:hover {
    background-image: linear-gradient(var(--gsi-layer), var(--gsi-layer));
  }
}

:root:not([data-theme='light']) .auth-provider[data-provider='google.com'] {
  --gsi-fill: #131314;
  --gsi-edge: #8e918f;
  --gsi-ink: #e3e3e3;
  --gsi-layer: rgba(227, 227, 227, 0.08);
}

.auth-provider[data-provider='apple.com'] {
  border: 1px solid #000000;
  background: #000000;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
}

:root:not([data-theme='light']) .auth-provider[data-provider='apple.com'] {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

@media (hover: hover) {
  .auth-provider[data-provider='apple.com']:hover { opacity: 0.86; }
}

.auth-provider:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.auth-provider-logo { display: block; flex: none; }
.auth-provider[data-provider='apple.com'] .auth-provider-logo { margin-top: -3px; }

/* No narrow-phone size here, unlike the site's dialog (auth.css): the
   course's buttons are 276 px wide at a 320 px screen, and its longest
   title ("Jatka Google-tunnuksella") fits on one line at 16 px from a
   296 px screen up. */

.signin-inner .footnote {
  margin-top: 34px;
  margin-inline: auto;
}

/* ------------------------------------------------------------------ boot */

.boot {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  /* The message and the way out are one group. As two separate grid rows in a
     full-height box they were flung to opposite ends of the screen and stopped
     reading as related. */
  gap: 6px;
  padding: var(--gut);
}

.boot p {
  color: var(--ink-2);
  font-size: 19px;
}

/* ----------------------------------------------------------------- stats
   Apple's spec strip: big numerals, quiet labels, a hairline between. */

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(38px, 4vw, 58px);
}

.stat b {
  display: block;
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.stat span {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-2);
}

/* ----------------------------------------------------------------- cards */

.cards {
  list-style: none;
  margin: clamp(34px, 4vw, 52px) 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* The card clips its poster to the rounded corner, which also clips the
   focus ring of the link inside it: the ring goes on the card instead. */
.card:has(.card-hit:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.card-hit {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--ink);
}

.card-hit:hover { text-decoration: none; }

.poster {
  width: 100%;
  /* height:auto is load bearing: the img carries width/height attributes so
     cards do not jump while posters load, and those map to presentational
     hints that defeat aspect-ratio unless height is explicitly auto. Without
     it every poster rendered at its full 1080px. */
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--raised);
}

.card-body {
  padding: clamp(24px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.card-n {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.done-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--green);
  background: var(--green-bg);
  border-radius: var(--r-pill);
  padding: 3px 10px;
}

.card h3 {
  font-size: clamp(20px, 1.9vw, 24px);
  line-height: 1.12;
}

.card p {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
}

.card-meta {
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-hit:hover h3 { text-decoration: underline; }

/* ---------------------------------------------------------------- module */

.module-head { padding-block: clamp(44px, 5vw, 76px) clamp(30px, 3.4vw, 46px); }

.module-head .intro { margin-inline: 0; }

/* The video sits on the white ground like everything else (2026-10-19), in
   a frame with its own hairline (.stage-frame), so attention stays on the
   screen recording rather than on the page around it. */
.stage { padding-block: clamp(34px, 4vw, 64px); }

.stage-frame {
  max-width: var(--page-wide);
  margin-inline: auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  /* The recordings are near-white at their edges, so on the white ground the
     frame needs its own hairline; the light fill keeps the rounded corners
     from showing black arcs. */
  background: var(--stage);
  box-shadow: 0 0 0 1px var(--stage-edge);
}

.stage video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--stage);
}

.stage .footnote {
  margin: 18px auto 0;
  text-align: center;
}

/* ------------------------------------------------------------- outcomes */

.outcome-list {
  list-style: none;
  margin: clamp(26px, 3vw, 40px) 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-width: 74ch;
  margin-inline: auto;
  text-align: left;
}

.outcome-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
  font-size: 17px;
  line-height: 1.45;
}

.outcome-list li:last-child { border-bottom: 1px solid var(--hair); }

.outcome-list .tick {
  flex: none;
  width: 21px;
  height: 21px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
}

.outcome-list .tick svg {
  width: 11px;
  height: 11px;
  stroke: var(--on-blue);
  stroke-width: 3;
  fill: none;
}

/* ---------------------------------------------------------------- teach */

.teach-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.teach-body {
  max-width: 74ch;
  margin-inline: auto;
  margin-top: clamp(26px, 3vw, 40px);
  text-align: left;
}

.goal {
  font-size: 19px;
  line-height: 1.42;
  color: var(--ink);
  margin: 0 0 8px;
}

.needs {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.needs li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.needs li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-2);
}

.beat {
  border-top: 1px solid var(--hair);
  padding-top: 26px;
  margin-top: 26px;
}

.beat h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}

/* The words a teacher actually reads. Set at reading size, in full-strength
   ink, because someone is looking up from a tablet at a room. */
.beat .say {
  font-size: 21px;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 14px;
}

.beat .do {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
}

.beat .do b {
  color: var(--ink);
  font-weight: 600;
}

.sub-block { margin-top: 34px; }

.sub-block h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}

.sub-block ul {
  margin: 0;
  padding-left: 20px;
}

.sub-block li {
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.prob {
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.prob b {
  color: var(--ink);
  font-weight: 600;
}

/* ------------------------------------------------------------------ quiz */

.quiz-body {
  max-width: 68ch;
  margin-inline: auto;
  margin-top: clamp(26px, 3vw, 40px);
  text-align: left;
}

.q {
  border-top: 1px solid var(--hair);
  padding-top: 26px;
  margin-top: 26px;
}

.q > p {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 18px;
}

.opts {
  display: grid;
  gap: 8px;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  min-height: 48px;
  padding: 14px 18px;
  border: 1px solid var(--control);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.022em;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
}

.opt:hover:not(:disabled) { border-color: var(--ink); }

.opt:disabled { cursor: default; }

.opt .dot {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1.5px solid var(--dot);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.opt .dot svg {
  width: 11px;
  height: 11px;
  stroke: var(--on-green);
  stroke-width: 3.2;
  fill: none;
  opacity: 0;
}

/* Right and wrong are marked by a glyph AND a word in the explanation, never
   by the colour of the border alone. */
.opt.right {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green-ink);
}

.opt.right .dot {
  border-color: var(--green);
  background: var(--green);
}

.opt.right .dot svg { opacity: 1; }

.opt.wrong {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red-ink);
}

.opt.wrong .dot { border-color: var(--red); }

.quiz-note { margin-top: 26px; }

.why {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ foot */

.module-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--toast);
  box-shadow: var(--toast-shadow);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--ink-d);
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-size: 15px;
  letter-spacing: -0.01em;
  z-index: 9500;
  max-width: calc(100vw - 32px);
}

.signin-back {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
}

.signin-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 10px;
  color: var(--blue);
}

/* ------------------------------------------------------------ course foot
   The site's cookies page and Cookie settings (which shows the cookie banner
   again, /assets/js/consent.js), on every view: small print, centred, 44px
   targets, as the site's footer links are. The banner itself is styled by the
   site's /assets/css/consent.css. */

.lms-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 18px;
  padding: 8px var(--gut) 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12px;
}

.lms-foot a {
  color: var(--ink-2);
}

.lms-foot a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------- back link
   Sits before the brand, on the left, where a back control belongs -- putting
   it among the account buttons on the right would file "leave the course"
   beside "sign out", which are not the same act and should not look alike. */

.back-site {
  gap: 6px;
  margin-right: 4px;
  flex: none;
  text-decoration: none;
}

.back-site svg { flex: none; }

/* ------------------------------------------------------------ narrow bar
   At 320px the account controls were wider than the screen and the whole page
   scrolled sideways. A school phone is a real device for this course, so the
   bar sheds what it can afford to lose rather than pushing the page off the
   edge. */

.lbl-short { display: none; }

@media (max-width: 600px) {
  #whoName { display: none; }
  .globalnav-inner { gap: 2px; padding-inline: 14px; }
  .signin-theme { right: 14px; }
}

@media (max-width: 420px) {
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .nav-btn { padding-inline: 9px; }
  .globalnav-brand .sub { display: none; }
}

/* The theme switch costs the bar 46px, so on a phone it sheds two more
   words: the back link keeps its chevron and its spoken name ("Back to the
   Training page", the aria-label), and below 350px the brand keeps its mark
   and its spoken name. Both stay 44px targets. */
@media (max-width: 400px) {
  .back-site { width: 44px; padding-inline: 0; justify-content: center; }
  .back-site .lbl-long,
  .back-site .lbl-short { display: none; }
  .theme-toggle { margin-left: 0; }
}

@media (max-width: 350px) {
  .globalnav-inner { padding-inline: 10px; }
  .signin-theme { right: 10px; }
  .globalnav-brand { min-width: 44px; justify-content: center; }
  .globalnav-brand .brand-word {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ----------------------------------------------------------------- print
   A teacher printing the script gets the script, not the chrome. */

@media print {
  .globalnav,
  .stage,
  .quiz,
  .module-foot,
  .link-back,
  .toast,
  .lms-foot,
  .theme-toggle,
  #printScript,
  .outcomes { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; }
  section { padding-block: 0; }
  .band-grey, .band-light { background: #fff; }
  .teach-body { max-width: none; }
  .beat { page-break-inside: avoid; }
  .beat .say { font-size: 13pt; color: #000; }
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .link-arrow:hover .chev,
  .link-back:hover .chev { transform: none; }
}


/* ----------------------------------------------------------- catalogue
   One card per course. Each carries its own progress, because the two courses
   are taken independently and a single figure across both would tell nobody
   anything useful. */

.courses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.course-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.course-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.course-sub {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.course-blurb {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  flex: 1 1 auto;
}

.course-meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.course-progress { margin-top: 4px; }

.pbar {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
}

.pbar span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

/* The bar is never the only thing that says how far along you are: it is a
   length of colour, which is nothing at all to a reader who cannot see it and
   a guess to everyone else. */
.pnote {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.course-start {
  align-self: flex-start;
  margin-top: 4px;
}

.course-card.is-unpublished { background: var(--card-quiet); }

/* Quieter, and set apart from the course you can actually open. */
.course-card.is-unpublished .course-head h2,
.course-card.is-unpublished .course-sub { color: var(--ink-2); }
