/**
 * ACE Login
 *
 * The homepage and All Courses system, scoped to .al so nothing here reaches
 * another page: the same charcoal and teal, the same buttons (10px radius, the
 * teal fill with its glow), the same teal eyebrow, Poppins over Inter, and the
 * All Courses drawing ink for the panel beside the form.
 *
 * Rules carried over from those pages:
 *   - anything given a display value also gets an explicit [hidden] rule;
 *   - text in teal uses the lighter teal, white text sits on the deeper one;
 *   - nothing waits on a script to be visible: undrawn and unrevealed states
 *     only apply under .al-js (set in <head>), and only when motion is wanted.
 */

/* ============================================================ tokens */

.al {
  --al-bg: var(--color-bg, #262624);
  --al-deep: var(--color-secondary, #1a1918);
  --al-sheet: #1b1d1d;
  --al-field: #1f1f1d;
  --al-field-hi: #232321;
  --al-line: rgba(255, 255, 255, .08);
  --al-line2: rgba(255, 255, 255, .14);
  --al-line3: rgba(255, 255, 255, .24);
  --al-text: var(--color-text, #e8e6dc);
  --al-head: var(--color-heading, #f5f4ef);
  --al-muted: var(--color-text-muted, #a39e93);
  --al-teal: var(--color-primary, #008a81);
  --al-rgb: var(--ace-primary-rgb, 0, 138, 129);
  --al-teal-text: #61b6b1;
  --al-teal-fill: #007870;
  --al-bad: #ef8a6f;
  --al-bad-rgb: 224, 101, 74;
  --al-discord: #5865f2;
  --al-discord-rgb: 88, 101, 242;
  --al-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --al-head-font: var(--font-heading, Poppins, system-ui, sans-serif);
  --al-body-font: var(--font-body, Inter, system-ui, sans-serif);

  /* The drawings' ink, and the teal until a programme sets its own accent. */
  --al-ink: 226, 236, 240;
  --acc: #61b6b1;
  --acc-rgb: 97, 182, 177;

  color: var(--al-text);
  font-family: var(--al-body-font);
  color-scheme: dark;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .al {
    --al-teal-text: color-mix(in srgb, var(--al-teal) 62%, #fff);
    --al-teal-fill: color-mix(in srgb, var(--al-teal) 87%, #000);
  }
}

/* ============================================================ base */

body.al-on { margin: 0; background: var(--color-bg, #262624); }
@media (prefers-reduced-motion: reduce) { html:has(> body.al-on) { scroll-behavior: auto; } }

.al *, .al *::before, .al *::after { box-sizing: border-box; }
.al [hidden] { display: none !important; }
:where(.al) :is(h1, h2, p) { margin: 0; }
:where(.al) a { color: inherit; text-decoration: none; }
:where(.al) button { font: inherit; color: inherit; }
.al-i { display: inline-block; flex: none; width: 20px; height: 20px; vertical-align: middle; }
.al-sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================================ the page */

.al {
  position: relative;
  display: grid;
  grid-template-columns: minmax(440px, 42fr) minmax(0, 58fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--al-bg);
}

.al-main {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  padding: max(26px, env(safe-area-inset-top, 0px)) clamp(28px, 4.4vw, 64px) 22px;
}
.al-top, .al-panel, .al-foot { width: 100%; max-width: 412px; margin-inline: auto; }

.al-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.al-logo { display: inline-flex; align-items: center; border-radius: 8px; }
.al-logo img { display: block; height: 42px; width: auto; max-width: 100%; }
.al-logo-text { font: 700 1.05rem/1.2 var(--al-head-font); color: var(--al-head); }
.al-back {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 4px;
  font-size: .82rem; font-weight: 500; color: var(--al-muted); border-radius: 8px;
  transition: color .15s ease;
}
.al-back .al-i { width: 16px; height: 16px; transition: transform .15s ease; }

.al-panel { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 30px 0 26px; }

.al-eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--al-teal-text);
}
.al-title {
  margin-top: 10px;
  font: 700 clamp(1.95rem, 2.5vw, 2.35rem)/1.08 var(--al-head-font);
  letter-spacing: -.03em; color: var(--al-head);
}
.al-sub { margin-top: 10px; font-size: .96rem; line-height: 1.55; color: var(--al-muted); }

.al-foot { font-size: .74rem; color: var(--al-muted); }

/* ============================================================ notices from the server */

.al-notices { display: grid; gap: 10px; margin-top: 22px; }
.al-notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(var(--al-bad-rgb), .4);
  background: linear-gradient(180deg, rgba(var(--al-bad-rgb), .12), rgba(var(--al-bad-rgb), .06));
}
.al-notice-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: -1px; color: var(--al-bad); }
.al-notice-icon .al-i { width: 22px; height: 22px; }
.al-notice.is-discord .al-notice-icon { border-radius: 7px; background: var(--al-discord); color: #fff; }
.al-notice.is-discord .al-notice-icon .al-i { width: 16px; height: 16px; }
.al-notice-body { min-width: 0; }
.al-notice-text { font-size: .9rem; font-weight: 600; line-height: 1.45; color: #f6dfd8; }
.al-notice-hint { margin-top: 3px; font-size: .82rem; line-height: 1.5; color: var(--al-text); opacity: .82; }
.al-notice-hint a { color: var(--al-teal-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ the form */

.al-form { display: grid; gap: 16px; margin-top: 24px; }
.al-notices + .al-form { margin-top: 18px; }

.al-field { display: grid; gap: 7px; min-width: 0; }
.al-label { font-size: .8rem; font-weight: 600; color: var(--al-text); letter-spacing: .005em; }
.al-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }

.al-control { position: relative; }
.al-lead {
  position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  color: var(--al-muted); pointer-events: none; transition: color .18s ease;
}
.al-input {
  display: block; width: 100%; height: 50px; margin: 0;
  padding: 0 14px 0 43px;
  border: 1px solid var(--al-line2); border-radius: 10px;
  background: var(--al-field);
  color: var(--al-head);
  font: 400 1rem/1.2 var(--al-body-font);
  outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.al-input.has-eye { padding-right: 52px; }
.al-input::placeholder { color: var(--al-muted); opacity: .85; }
.al-input:focus {
  outline: 2px solid transparent; outline-offset: 2px;   /* drawn by the system in high-contrast modes */
  border-color: rgba(var(--acc-rgb), .9);
  background-color: var(--al-field-hi);
  box-shadow: 0 0 0 3px rgba(var(--al-rgb), .3), 0 8px 26px rgba(var(--al-rgb), .12);
}
.al-control:focus-within .al-lead { color: var(--al-teal-text); }
.al-input[aria-invalid="true"] { border-color: rgba(var(--al-bad-rgb), .85); }
.al-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(var(--al-bad-rgb), .24); }
.al-input[aria-invalid="true"] ~ .al-lead, .al-control:has(.al-input[aria-invalid="true"]) .al-lead { color: var(--al-bad); }

/* Browser autofill keeps the dark field rather than painting it pale. */
.al-input:-webkit-autofill,
.al-input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--al-head);
  caret-color: var(--al-head);
  -webkit-box-shadow: 0 0 0 40px var(--al-field) inset;
  transition: background-color 9999s ease 0s, border-color .18s ease;
}
.al-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px var(--al-field-hi) inset, 0 0 0 3px rgba(var(--al-rgb), .3);
}

/* Show / hide password. */
.al-eye {
  position: absolute; right: 6px; top: 50%; margin-top: -19px;
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--al-muted); cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.al-eye:focus-visible { outline: 2px solid var(--al-teal-text); outline-offset: 0; color: var(--al-head); }
.al-eye .al-i { width: 20px; height: 20px; }
.al-eye-slash { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .26s cubic-bezier(.4, 0, .2, 1); }
.al-eye[aria-pressed="true"] { color: var(--al-teal-text); }
.al-eye[aria-pressed="true"] .al-eye-slash { stroke-dashoffset: 0; }

/* A field's own message. */
.al-msg {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: .8rem; line-height: 1.45; color: var(--al-bad);
}
.al-msg .al-i { width: 15px; height: 15px; margin-top: 1.5px; }
.al-msg-hint { color: var(--al-muted); }
.al-msg.is-new { animation: al-msg-in .26s cubic-bezier(.2, .7, .2, 1); }

/* Remember me, Forgot password. */
.al-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -2px; }
.al-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .875rem; color: var(--al-text); user-select: none; }
.al-check input {
  flex: none; width: 18px; height: 18px; margin: 0;
  -webkit-appearance: none; appearance: none;
  border: 1.5px solid var(--al-line3); border-radius: 5px; background: var(--al-field);
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.al-check input:checked {
  border-color: var(--al-teal-fill);
  background: var(--al-teal-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17.5 19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.al-check input:focus-visible { outline: 2px solid var(--al-teal-text); outline-offset: 2px; }
.al-link { font-size: .875rem; font-weight: 600; color: var(--al-teal-text); border-radius: 4px; }
.al-link:focus-visible, .al-enrol a:focus-visible, .al-back:focus-visible, .al-logo:focus-visible,
.al-notice-hint a:focus-visible { outline: 2px solid var(--al-teal-text); outline-offset: 3px; }

/* ============================================================ the security question */

.al-cap-new {
  display: inline-flex; align-items: center; gap: 6px;
  margin: -4px -6px -4px 0; padding: 4px 8px; border: 0; border-radius: 999px;
  background: transparent; color: var(--al-teal-text);
  font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.al-cap-new .al-i { width: 15px; height: 15px; }
.al-cap-new:focus-visible { outline: 2px solid var(--al-teal-text); outline-offset: 1px; }
.al-cap-new[aria-busy="true"] { cursor: progress; }
.al-cap-new[aria-busy="true"] .al-i { animation: al-turn .7s linear infinite; }

.al-cap-box {
  display: flex; align-items: stretch; height: 50px;
  border: 1px solid var(--al-line2); border-radius: 10px;
  background: var(--al-field); overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.al-cap-box:focus-within {
  outline: 2px solid transparent; outline-offset: 2px;
  border-color: rgba(var(--acc-rgb), .9);
  box-shadow: 0 0 0 3px rgba(var(--al-rgb), .3), 0 8px 26px rgba(var(--al-rgb), .12);
}
.al-captcha.is-invalid .al-cap-box { border-color: rgba(var(--al-bad-rgb), .85); }
.al-captcha.is-invalid .al-cap-box:focus-within { box-shadow: 0 0 0 3px rgba(var(--al-bad-rgb), .24); }

/* The question reads like a drawing's read-out: figures on a fine grid. */
.al-cap-q {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 14px 0 15px;
  border-right: 1px solid var(--al-line2);
  background:
    linear-gradient(rgba(var(--acc-rgb), .09) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, rgba(var(--acc-rgb), .09) 1px, transparent 1px) 0 0 / 8px 8px,
    rgba(var(--al-rgb), .08);
  cursor: text;
}
.al-cap-eq {
  display: inline-flex; align-items: baseline; gap: 8px; overflow: hidden;
  font: 600 1.18rem/1 var(--al-head-font); letter-spacing: .01em;
  font-variant-numeric: tabular-nums; color: var(--al-head);
}
.al-cap-eq > span[data-al-a], .al-cap-eq > span[data-al-b] { display: inline-block; min-width: .62em; text-align: center; }
.al-cap-op, .al-cap-eqs { font: 600 1.05rem/1 var(--al-head-font); color: var(--al-teal-text); }
.al-cap-eq.is-out > span[data-al-a], .al-cap-eq.is-out > span[data-al-b] { animation: al-figure-out .16s ease-in forwards; }
.al-cap-eq.is-in > span[data-al-a], .al-cap-eq.is-in > span[data-al-b] { animation: al-figure-in .26s cubic-bezier(.2, .7, .2, 1) both; }
.al-cap-eq.is-in > span[data-al-b] { animation-delay: .04s; }

.al-cap-input {
  flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0 14px;
  border: 0; border-radius: 0; background: transparent; outline: none;
  color: var(--al-head); font: 500 1.05rem/1.2 var(--al-body-font); font-variant-numeric: tabular-nums;
  -webkit-appearance: none; appearance: none;
}
.al-cap-input::placeholder { color: var(--al-muted); opacity: .85; font-weight: 400; }

/* ACE Security's own markup, if it ever arrives in a shape this page does not know. */
.al-captcha.is-raw .ace-captcha-box {
  margin: 0; padding: 12px 14px; border: 1px solid var(--al-line2); border-radius: 10px; background: var(--al-field);
}
.al-captcha.is-raw .ace-captcha-field { display: grid; gap: 8px; margin: 0; }
.al-captcha.is-raw .ace-captcha-field span { font: 600 .8rem/1.4 var(--al-body-font); color: var(--al-text); text-transform: none; letter-spacing: 0; }
.al-captcha.is-raw .ace-captcha-field span::before { content: none; }
.al-captcha.is-raw input[type="text"] {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--al-line2); border-radius: 8px;
  background: var(--al-bg); color: var(--al-head); font: 400 1rem var(--al-body-font);
}

/* ============================================================ buttons */

.al-submit-wrap { margin-top: 4px; }
.al-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; margin: 0; padding: 0 20px;
  border: 1px solid transparent; border-radius: 10px;
  font: 600 .98rem/1.2 var(--al-body-font); letter-spacing: .005em;
  text-decoration: none; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.al-btn:active { transform: translateY(0) scale(.985); }
.al-btn:focus-visible { outline: 2px solid var(--al-teal-text); outline-offset: 3px; }
.al-btn .al-i { width: 19px; height: 19px; }
.al-btn-icon { position: relative; display: grid; place-items: center; width: 20px; height: 20px; }
.al-btn-icon .al-i, .al-discord-tile .al-i { grid-area: 1 / 1; }

.al-btn.is-primary {
  background: var(--al-teal-fill); color: #fff;
  box-shadow: 0 10px 28px rgba(var(--al-rgb), .32), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.al-btn.is-primary .al-idle { transition: transform .15s ease; }

.al-btn.is-discord {
  justify-content: center;
  background: rgba(255, 255, 255, .04); border-color: var(--al-line2); color: var(--al-head);
}
.al-discord-tile {
  display: grid; place-items: center; width: 30px; height: 30px; margin-left: -6px;
  border-radius: 8px; background: var(--al-discord); color: #fff;
  box-shadow: 0 4px 14px rgba(var(--al-discord-rgb), .4), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.al-discord-tile .al-i { width: 18px; height: 18px; }

/* Waiting: a spinner in place of the icon, and no second press. */
.al-spin { display: none; }
.al-btn.is-busy { cursor: progress; transform: none; }
.al-btn.is-busy .al-idle { display: none; }
.al-btn.is-busy .al-spin { display: inline-block; animation: al-turn .8s linear infinite; }
.al-btn.is-primary.is-busy { background: var(--al-teal-fill); box-shadow: 0 8px 22px rgba(var(--al-rgb), .24), inset 0 1px 0 rgba(255, 255, 255, .14); }
.al-btn.is-discord.is-busy { border-color: rgba(var(--al-discord-rgb), .55); background: rgba(var(--al-discord-rgb), .1); box-shadow: none; }

.al-status { margin-top: 10px; font-size: .8rem; line-height: 1.45; color: var(--al-muted); text-align: center; }
.al-status:empty { display: none; }
.al-status.is-bad { color: var(--al-bad); }

.al-alt { margin-top: 22px; }
.al-or {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
  font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--al-muted);
}
.al-or::before, .al-or::after { content: ""; flex: 1; height: 1px; background: var(--al-line2); }
.al-note { margin-top: 9px; font-size: .78rem; line-height: 1.45; color: var(--al-muted); text-align: center; }

.al-enrol { margin-top: 24px; font-size: .9rem; color: var(--al-muted); text-align: center; }
.al-enrol a { margin-left: 2px; font-weight: 600; color: var(--al-teal-text); border-radius: 4px; }


/* Hover only where there is a pointer that hovers: a tap on a phone should
   not leave a button lit on the next page. */
@media (hover: hover) {
  .al-back:hover { color: var(--al-head); }
  .al-back:hover .al-i { transform: translateX(-2px); }
  .al-input:hover { border-color: var(--al-line3); }
  .al-eye:hover { color: var(--al-head); background: rgba(255, 255, 255, .06); }
  .al-check input:hover { border-color: rgba(var(--acc-rgb), .7); }
  .al-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .al-cap-new:hover { background: rgba(var(--al-rgb), .12); }
  .al-cap-box:hover { border-color: var(--al-line3); }
  .al-btn:not(.is-busy):hover { transform: translateY(-1px); }
  .al-btn.is-primary:not(.is-busy):hover { background: var(--al-teal); box-shadow: 0 14px 34px rgba(var(--al-rgb), .42), inset 0 1px 0 rgba(255, 255, 255, .2); }
  .al-btn.is-primary:not(.is-busy):hover .al-idle { transform: translateX(2px); }
  .al-enrol a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .al-motion:hover { border-color: rgba(var(--al-rgb), .6); }
  .al-btn.is-discord:not(.is-busy):hover {
    border-color: rgba(var(--al-discord-rgb), .7);
    background: rgba(var(--al-discord-rgb), .12);
    box-shadow: 0 12px 30px rgba(var(--al-discord-rgb), .2);
  }
}

/* ============================================================ the drawing panel */

.al-hero {
  container: al-hero / size;
  position: sticky; top: 14px; align-self: start;
  height: calc(100vh - 28px); height: calc(100dvh - 28px);
  margin: 14px 14px 14px 0;
  border-radius: 22px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--al-line2);
  background:
    radial-gradient(110% 80% at 64% 34%, rgba(var(--al-rgb), .13), transparent 62%),
    linear-gradient(180deg, #1d2020, #191b1b);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .04);
  --px: 0;
  --py: 0;
}

.al-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.al-hero-grid {
  position: absolute; inset: -80px;
  background-image:
    linear-gradient(rgba(var(--acc-rgb), .085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--acc-rgb), .085) 1px, transparent 1px),
    linear-gradient(rgba(var(--acc-rgb), .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--acc-rgb), .04) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  -webkit-mask-image: radial-gradient(85% 75% at 55% 40%, #000 30%, transparent 100%);
          mask-image: radial-gradient(85% 75% at 55% 40%, #000 30%, transparent 100%);
}
.al-hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(42% 34% at 50% 52%, rgba(var(--al-rgb), .2), transparent 72%),
    radial-gradient(30% 26% at 14% 96%, rgba(var(--al-rgb), .1), transparent 70%);
}
/* Bottom shade, so the words sit clear of the drawing. */
.al-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(24, 26, 26, .96) 22%, rgba(24, 26, 26, 0));
}

.al-scene { position: absolute; inset: 0; }
.al-layer {
  position: absolute;
  transform: translate3d(calc(var(--px) * var(--z, 0) * 1px), calc(var(--py) * var(--z, 0) * 1px), 0);
}

/* The table the sheets lie on: one proportion, scaled to whatever fits
   between the top of the panel and the words at its foot. */
.al-stage {
  position: absolute; left: 50%; top: 64px;
  width: 84%; aspect-ratio: 1.3;
  transform: translateX(-50%);
}
@supports (width: 1cqh) {
  .al-stage { width: min(90cqw, calc((100cqh - clamp(260px, 37cqh, 330px)) * 1.3)); }
}

.al-sheet {
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--al-line2);
  background:
    radial-gradient(90% 90% at 60% 30%, rgba(var(--acc-rgb), .09), transparent 70%),
    var(--al-sheet);
  box-shadow: 0 26px 64px rgba(0, 0, 0, .5), 0 2px 0 rgba(255, 255, 255, .02) inset, 0 0 0 1px rgba(0, 0, 0, .3);
}
.al-sheet-in { display: block; }
.al-sheet .al-art { display: block; width: 100%; height: auto; }
.al-sheet.is-pe { --acc: #f0a04b; --acc-rgb: 240, 160, 75; --z: 6;  --sd: .05s; left: 0;   top: 0;   width: 44%; }
.al-sheet.is-me { --acc: #5ec8b3; --acc-rgb: 94, 200, 179;  --z: 10; --sd: .2s;  right: 0;  top: 8%;  width: 41%; }
.al-sheet.is-ce { --acc: #86b1e8; --acc-rgb: 134, 177, 232; --z: 16; --sd: .35s; left: 6%;  bottom: 0; width: 74%; }
.al-sheet.is-pe .al-sheet-in { opacity: .82; }
.al-sheet.is-me .al-sheet-in { opacity: .92; }

/* The building behind it all. */
.al-frame { --z: 3; --sd: 0s; right: -3%; bottom: 13%; width: min(40%, 380px); }
.al-frame .al-art { display: block; width: 100%; height: auto; }

/* Drafting symbols, adrift above the sheets. */
.al-sym { --z: 24; display: block; color: var(--al-text); }
.al-sym-in { display: block; }
.al-sym.is-level  { --sd: 2.6s;  left: 46%;  top: -3%;  width: 15%; }
.al-sym.is-grid   { --sd: 2.75s; left: -3.5%; top: 50%; width: 3.4%; }
.al-sym.is-bubble { --sd: 2.9s;  left: 85%;  top: 56%;  width: 6.4%; }
.al-sym.is-north  { --sd: 3s;    left: -3.5%; top: 4%;  width: 4.6%; }
.al-sym.is-limit  { --sd: 3.1s;  left: 84%;  top: 82%;  width: 12.5%; }

/* The words. */
.al-hero-copy {
  position: absolute; z-index: 2;
  left: clamp(28px, 4vw, 52px); right: clamp(28px, 4vw, 52px); bottom: clamp(26px, 5.2cqh, 46px);
  max-width: 34rem;
}
.al-hero-title {
  font: 700 clamp(1.45rem, 2.1vw, 2.05rem)/1.14 var(--al-head-font);
  letter-spacing: -.025em; color: var(--al-head); text-wrap: balance;
}
.al-hero-text { margin-top: 10px; font-size: .98rem; line-height: 1.6; color: var(--al-muted); max-width: 44ch; text-wrap: pretty; }

/* Pause, as on the homepage and All Courses. */
.al-motion {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px;
  border-radius: 999px; border: 1px solid var(--al-line2); background: rgba(20, 20, 19, .78);
  color: var(--al-text); font: 600 .72rem/1.2 var(--al-body-font); cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .15s ease, background-color .15s ease;
}
.al-motion:focus-visible { outline: 2px solid var(--al-teal-text); outline-offset: 2px; }
.al-motion .al-i { width: 13px; height: 13px; }
.al-motion-pause, .al-motion-play { display: inline-flex; align-items: center; gap: 6px; }
.al-motion-play, .al-paused .al-motion-pause { display: none; }
.al-paused .al-motion-play { display: inline-flex; }
:root:not(.al-js) .al-motion { display: none; }
@media (prefers-reduced-motion: reduce) { .al-motion { display: none; } }

.al-banner { display: none; }

/* ============================================================ the drawings: ink */

.al-art { overflow: visible; }
.al-art text { font-family: var(--al-mono); }

.al-grid-fine { fill: none; stroke: rgba(var(--acc-rgb), .07); stroke-width: .6; }
.al-grid-major { fill: none; stroke: rgba(var(--acc-rgb), .13); stroke-width: .8; }

.al-ln, .al-ln2, .al-ln3 { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.al-ln { stroke: rgba(var(--al-ink), .3); stroke-width: 1; }
.al-ln2 { stroke: rgba(var(--al-ink), .58); stroke-width: 1.25; }
.al-ln3 { stroke: rgba(var(--al-ink), .86); stroke-width: 1.6; }
.al-hatch { fill: none; stroke: rgba(var(--al-ink), .2); stroke-width: 1; }
.al-hair { stroke: rgba(var(--al-ink), .14); stroke-width: .8; }
.al-dim { fill: none; stroke: rgba(var(--acc-rgb), .6); stroke-width: .8; }
.al-ext { fill: none; stroke: rgba(var(--al-ink), .14); stroke-width: .8; stroke-dasharray: 2 3; }

.al-tx { fill: rgba(var(--al-ink), .62); font-size: 8.5px; font-weight: 600; letter-spacing: .06em; }
.al-tx.is-strong { fill: rgba(var(--al-ink), .92); font-weight: 700; }
.al-tx.is-tiny { font-size: 7px; }
.al-tx.is-acc { fill: var(--acc); }
.al-tx.is-badge { fill: var(--acc); font-size: 7.6px; font-weight: 800; letter-spacing: .05em; }
.al-tx.is-axis { fill: var(--acc); font-size: 10px; font-weight: 800; letter-spacing: 0; }
.al-tx.is-key { fill: rgba(var(--al-ink), .5); font-size: 10px; font-weight: 700; letter-spacing: 0; }
.al-tx.is-read { fill: rgba(var(--al-ink), .95); font-size: 11.5px; font-weight: 700; letter-spacing: 0; }
.al-tx.is-read.is-acc { fill: var(--acc); }
.al-tx.is-read.is-max { fill: #fff; }
.al-tx.is-tag { fill: #151716; font-size: 6px; font-weight: 800; letter-spacing: .04em; }
.al-badge { fill: rgba(var(--acc-rgb), .14); stroke: rgba(var(--acc-rgb), .55); stroke-width: .8; }
.al-readout { fill: rgba(12, 15, 15, .62); stroke: rgba(var(--al-ink), .2); stroke-width: 1; }

/* civil */
.al-load { fill: none; stroke: var(--acc); stroke-width: 1.3; stroke-linecap: round; }
.al-arrow line, .al-arrow path { fill: none; stroke: rgba(var(--acc-rgb), .85); stroke-width: 1.05; stroke-linecap: round; stroke-linejoin: round; }
.al-beam-fill { fill: rgba(var(--al-ink), .07); }
.al-react line, .al-react path { fill: none; stroke: rgba(var(--al-ink), .72); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.al-diag { fill: rgba(var(--acc-rgb), .13); }
.al-curve { fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.al-conc { fill: rgba(var(--al-ink), .06); }
.al-stirrup { fill: none; stroke: rgba(var(--acc-rgb), .78); stroke-width: 1; }
.al-bars circle { fill: rgba(var(--al-ink), .82); }

.al-cut-line { stroke: rgba(var(--acc-rgb), .85); stroke-width: 1; stroke-dasharray: 4 3; }
.al-cut-tip, .al-cut-beam { fill: var(--acc); }
.al-cut-dot .al-core { fill: #151817; stroke: var(--acc); stroke-width: 1.7; }
.al-cut-dot .al-halo { fill: rgba(var(--acc-rgb), .2); }
.al-cut-tag rect { fill: rgba(12, 15, 15, .85); stroke: rgba(var(--acc-rgb), .7); stroke-width: .9; }
.al-tx.is-tagread { fill: var(--acc); font-size: 9.6px; font-weight: 700; letter-spacing: 0; }

/* materials */
.al-spec { fill: rgba(200, 206, 212, .1); }
.al-cracks { opacity: 0; }
.al-cracks path { fill: none; stroke: #f2b27b; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.al-peak line { stroke: rgba(var(--acc-rgb), .45); stroke-width: .8; stroke-dasharray: 2 3; }
.al-peak circle { fill: var(--acc); }

/* project */
.al-bar { fill: rgba(var(--al-ink), .04); stroke: rgba(var(--al-ink), .24); stroke-width: .8; }
.al-bar-fill { fill: rgba(var(--acc-rgb), .85); transform-box: fill-box; transform-origin: 0 50%; }
.al-bar-fill.is-done { fill: rgba(var(--acc-rgb), .42); }
.al-ms { fill: rgba(var(--al-ink), .12); stroke: rgba(var(--al-ink), .5); stroke-width: .8; }
.al-ms.is-done { fill: var(--acc); stroke: var(--acc); }
.al-today line { stroke: var(--acc); stroke-width: 1.3; stroke-dasharray: 3 2; }
.al-today rect { fill: var(--acc); }

/* the building */
.al-iso-col { fill: none; stroke: rgba(var(--al-ink), .17); stroke-width: 1; stroke-linecap: round; }
.al-iso-floor { fill: none; stroke: rgba(var(--al-ink), .085); stroke-width: .8; stroke-linecap: round; }
.al-iso-scan { opacity: 0; }
.al-iso-scan path { fill: rgba(97, 182, 177, .07); stroke: rgba(97, 182, 177, .55); stroke-width: 1; }
.al-iso-bubble { fill: none; stroke: rgba(var(--al-ink), .26); stroke-width: .8; }
.al-tx.is-iso { fill: rgba(var(--al-ink), .42); font-size: 7.5px; letter-spacing: 0; }

/* symbols */
.al-sym-svg { display: block; width: 100%; height: auto; overflow: visible; }
.al-sym-ln { fill: none; stroke: rgba(var(--al-ink), .42); stroke-width: 1; }
.al-sym-acc { fill: var(--al-teal-text); }
.al-sym-dash { stroke: rgba(var(--al-ink), .22); stroke-width: 1; stroke-dasharray: 3 3; }
.al-tx.is-sym { fill: rgba(var(--al-ink), .72); font-size: 9px; }
.al-tx.is-sym.is-big { font-size: 11px; font-weight: 800; letter-spacing: 0; }

/* ============================================================ motion */

@keyframes al-draw { to { stroke-dashoffset: 0; } }
@keyframes al-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes al-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes al-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes al-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes al-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes al-sheet { from { opacity: 0; transform: translateY(22px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes al-turn { to { transform: rotate(360deg); } }
@keyframes al-msg-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes al-notice-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes al-figure-out { to { opacity: 0; transform: translateY(-.55em); } }
@keyframes al-figure-in { from { opacity: 0; transform: translateY(.55em); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {

  /* The form arrives first and quickly: nothing here waits on the drawing. */
  .al-js .al-in { animation: al-in .5s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 45ms + 40ms) both; }
  .al-js .al-notice { animation: al-notice-in .4s cubic-bezier(.2, .7, .2, 1) .15s both; }
  .al-js .al-top { animation: al-fade .5s ease both; }

  /* The drawing: sheets settle, then their lines draw. Start states only
     while a script is running and motion is wanted. */
  .al-js:not(.al-paused) .al-sheet-in,
  .al-js:not(.al-paused) .al-sym-in { animation: al-sheet .9s cubic-bezier(.2, .7, .2, 1) var(--sd, 0s) both; }
  .al-js:not(.al-paused) .al-sheet.is-pe .al-sheet-in { animation-name: al-sheet-pe; }
  .al-js:not(.al-paused) .al-sheet.is-me .al-sheet-in { animation-name: al-sheet-me; }

  .al-js:not(.al-paused) .al-scene .al-d {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: al-draw var(--t, .8s) cubic-bezier(.45, 0, .2, 1) calc(var(--d, 0s) + var(--sd, 0s)) forwards;
  }
  .al-js:not(.al-paused) .al-scene .al-f {
    opacity: 0;
    animation: al-fade .6s ease calc(var(--d, 0s) + var(--sd, 0s)) forwards;
  }
  .al-js:not(.al-paused) .al-scene .al-r {
    opacity: 0;
    animation: al-rise .5s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0s) + var(--sd, 0s)) forwards;
  }
  .al-js:not(.al-paused) .al-scene .al-arrow.al-r { animation-name: al-drop; }
  .al-js:not(.al-paused) .al-scene .al-bar-fill {
    transform: scaleX(0);
    animation: al-grow var(--t, 1s) cubic-bezier(.4, 0, .2, 1) calc(var(--d, 0s) + var(--sd, 0s)) forwards;
  }

  /* The loops: only while the panel can be seen and motion is wanted. */
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-hero-grid { animation: al-drift 64s linear infinite; }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-hero-glow { animation: al-breathe 9s ease-in-out infinite alternate; }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-sym-in {
    animation: al-sheet .9s cubic-bezier(.2, .7, .2, 1) var(--sd, 0s) both, al-bob var(--bob, 9s) ease-in-out calc(var(--sd, 0s) + .9s) infinite alternate;
  }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-iso-scan { animation: al-iso 15s linear 4.2s infinite; }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-today { animation: al-today 11s ease-in-out 3s infinite alternate both; }

  /* Materials: the curve plots to failure, the cracks open, and again. */
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-plot { stroke-dasharray: 1; animation: al-plot 8s linear 2.2s infinite both; }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-peak,
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-peak-tx { animation: al-peak 8s linear 2.2s infinite both; }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-cracks { animation: al-peak 8s linear 2.2s infinite both; }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-cracks path { stroke-dasharray: 1; animation: al-crack 8s linear 2.2s infinite both; }
  .al-js:not(.al-paused) .al-hero:not(.is-off) .al-press { animation: al-press 8s ease-in-out 2.2s infinite both; }
  .al-js:not(.al-paused) .al-hero.is-off .al-sheet-in,
  .al-js:not(.al-paused) .al-hero.is-off .al-scene * { animation-play-state: paused; }
}

@keyframes al-sheet-pe { from { opacity: 0; transform: translateY(22px) scale(.975); } to { opacity: .82; transform: none; } }
@keyframes al-sheet-me { from { opacity: 0; transform: translateY(22px) scale(.975); } to { opacity: .92; transform: none; } }
@keyframes al-drift { to { transform: translate3d(80px, 80px, 0); } }
@keyframes al-breathe { from { opacity: .72; } to { opacity: 1; } }
@keyframes al-bob { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
@keyframes al-iso {
  0% { transform: translateY(0); opacity: 0; }
  7% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-238px); opacity: 0; }
}
@keyframes al-today { from { transform: translateX(196px); } to { transform: translateX(214px); } }
@keyframes al-plot {
  0% { stroke-dashoffset: 1; opacity: 1; }
  75% { stroke-dashoffset: 0; opacity: 1; }
  88% { stroke-dashoffset: 0; opacity: 1; }
  96%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes al-peak { 0%, 54% { opacity: 0; } 58%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes al-crack { 0%, 55% { stroke-dashoffset: 1; } 64%, 100% { stroke-dashoffset: 0; } }
@keyframes al-press { 0% { transform: translateY(0); } 55% { transform: translateY(3px); } 72% { transform: translateY(4px); } 90%, 100% { transform: translateY(0); } }

.al-sym:nth-child(even) .al-sym-in { --bob: 11s; }
.al-sym.is-bubble .al-sym-in { --bob: 8s; }

/* Still, when asked for or when the system says so: every drawing finished. */
@media (prefers-reduced-motion: reduce) {
  .al-hero *, .al-hero *::before, .al-hero *::after { animation: none !important; transition: none !important; }
  .al .al-d { stroke-dashoffset: 0 !important; }
  .al .al-f, .al .al-r { opacity: 1 !important; }
  .al-cap-eq span, .al-msg.is-new, .al-eye-slash { animation: none !important; transition: none !important; }
}

/* ============================================================ narrower split (tablets, small laptops) */

@media (max-width: 1099px) {
  .al { grid-template-columns: minmax(380px, 1fr) minmax(0, 1fr); }
  .al-main { padding-inline: clamp(24px, 4vw, 44px); }
  .al-frame, .al-sym.is-north, .al-sym.is-grid { display: none; }
}

/* A tall, narrow panel: the sheets stack instead of spreading. */
@container al-hero (max-aspect-ratio: 4 / 5) {
  .al-stage { top: 70px; width: min(90cqw, calc((100cqh - 300px) * .98)); aspect-ratio: .98; }
  .al-sheet.is-pe { display: none; }
  .al-sheet.is-me { top: 0; right: 0; width: 66%; }
  .al-sheet.is-ce { left: 0; bottom: 0; width: 100%; }
  .al-sym.is-level  { left: 2%; top: 10%; width: 26%; }
  .al-sym.is-bubble, .al-sym.is-limit { display: none; }
}

/* ============================================================ short screens */

@media (min-width: 860px) and (max-height: 820px) {
  .al-main { padding-top: 20px; padding-bottom: 16px; }
  .al-panel { padding: 18px 0 16px; }
  .al-form { gap: 13px; margin-top: 18px; }
  .al-title { font-size: clamp(1.8rem, 2.3vw, 2.1rem); }
  .al-input, .al-cap-box { height: 46px; }
  .al-btn { height: 48px; }
  .al-alt { margin-top: 16px; }
  .al-or { margin-bottom: 12px; }
  .al-enrol { margin-top: 16px; }
  .al-note { display: none; }
}

@media (min-width: 860px) and (max-height: 740px) {
  .al-main { padding-top: 16px; padding-bottom: 12px; }
  .al-logo img { height: 36px; }
  .al-panel { padding: 12px 0 10px; }
  .al-title { margin-top: 6px; font-size: 1.75rem; }
  .al-sub { margin-top: 6px; }
  .al-form { gap: 11px; margin-top: 16px; }
  .al-field { gap: 5px; }
  .al-input, .al-cap-box { height: 44px; }
  .al-btn { height: 46px; }
  .al-alt { margin-top: 14px; }
  .al-or { margin-bottom: 10px; }
  .al-enrol { margin-top: 12px; }
}

/* ============================================================ stacked: tablets in portrait, phones */

@media (max-width: 859px) {
  .al { display: flex; flex-direction: column; }
  .al-hero {
    order: -1; position: relative; top: 0; align-self: stretch;
    height: clamp(176px, 30vh, 260px); margin: 0;
    border-radius: 0; border: 0; border-bottom: 1px solid var(--al-line2);
    box-shadow: none;
  }
  .al-hero::after { display: none; }
  .al-stage, .al-frame, .al-hero-copy { display: none; }
  .al-banner { display: block; position: absolute; inset: 0; }
  .al-banner .al-art {
    position: absolute; right: max(4px, env(safe-area-inset-right, 0px)); bottom: 0;
    width: auto; height: 100%; max-width: 100%;
    --acc: #86b1e8; --acc-rgb: 134, 177, 232;
  }
  .al-hero-glow { background: radial-gradient(60% 70% at 62% 64%, rgba(var(--al-rgb), .2), transparent 72%); }
  .al-motion {
    top: max(14px, env(safe-area-inset-top, 0px)); right: calc(max(18px, env(safe-area-inset-right, 0px)) + 46px);
    width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%;
  }
  .al-motion .al-i { width: 14px; height: 14px; }
  .al-motion-pause, .al-motion-play { font-size: 0; gap: 0; }

  /* The logo and the way back sit on the banner. */
  .al-main { position: static; min-height: 0; padding: 0 20px 22px; }
  .al-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 4; max-width: none;
    padding: max(14px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px));
  }
  .al-logo img { height: 32px; }
  .al-back {
    width: 38px; height: 38px; padding: 0; justify-content: center;
    border-radius: 50%; border: 1px solid var(--al-line2); background: rgba(20, 20, 19, .72);
    color: var(--al-text); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  .al-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .al-panel { max-width: 440px; padding: 24px 0 10px; justify-content: flex-start; }
  .al-foot { max-width: 440px; margin-top: 18px; text-align: center; }
}

@media (max-width: 859px) and (min-width: 560px) {
  .al-panel { padding-top: 36px; }
}

/* Phones: the whole form, down to Sign In, on the first screen. */
@media (max-width: 559px) {
  .al-hero { height: clamp(140px, 21vh, 184px); }
  .al-main { padding-inline: 16px; }
  .al-panel { padding-top: 14px; }
  .al-title { margin-top: 6px; font-size: 1.8rem; }
  .al-sub { margin-top: 6px; font-size: .92rem; }
  .al-notices { margin-top: 16px; }
  .al-form { gap: 12px; margin-top: 18px; }
  .al-field { gap: 6px; }
  .al-input, .al-cap-box { height: 48px; }
  .al-btn { height: 50px; }
  .al-row { margin-top: 0; }
  .al-cap-q { padding-inline: 12px; gap: 8px; }
  .al-cap-eq { gap: 6px; font-size: 1.1rem; }
  .al-check, .al-link { font-size: .85rem; }
  .al-alt { margin-top: 18px; }
  .al-or { margin-bottom: 12px; }
  .al-enrol { margin-top: 18px; }
}

@media (max-width: 340px) {
  .al-logo img { height: 28px; }
  .al-row { gap: 8px; }
}
