/* The sign-in page, in the landing site's look (stemeup.com): the aubergine
   ground, ITC Ronda headings over Poppins, the gold pill button and the frosted
   card. The ground is plain since 2026-11-21 (the founder's pick G3 on the logo
   and AI-look review): its violet glow top left and plum glow bottom right went,
   as the page glow behind every signed-in screen had on 2026-11-19. branding.css supplies the fonts and the colours;
   this page loads no shell.css, so it is purple-only by design. */
:root {
  --err: var(--status-risk);
  --faint: rgba(247, 233, 255, 0.56);
  --field: rgba(255, 255, 255, 0.06);
  --field-line: rgba(247, 207, 198, 0.3);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; color: var(--text); }
body { background: var(--bg); }
a { color: var(--text); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 12px;
  background: var(--gold-fill); color: var(--pastel-ink); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Faint maths in the background, a nod to the landing site's chalkboard. The page
   is written with a still sketch (the spans below, which is all someone who asks for
   less motion sees); login.js swaps it for the board: problems written out and
   solved a line at a time. */
.sketch {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none;
  font-family: "ITC Ronda", "Poppins", sans-serif; color: #fff;
}
.sketch > span { position: absolute; white-space: nowrap; opacity: 0.075; }

/* The board. One problem, one .work (an <svg>); each line a <text>, each character a
   <tspan> whose outline the pen traces (stroke-dashoffset) before the chalk fills it,
   a little after the one before it — so it reads as handwriting, not typing. */
/* Clipped to its measured box, so what the guard checks is all that is drawn. */
.work { position: absolute; overflow: hidden; transition: opacity 0.9s ease; }
.work.gone { opacity: 0; }
.work.gone.quick { transition-duration: 0.25s; }
.work text { font-family: "ITC Ronda", "Poppins", sans-serif; }
.work tspan {
  fill: rgba(255, 255, 255, 0); stroke: rgba(255, 255, 255, 0.5); stroke-width: 1;
  stroke-dasharray: 300; stroke-dashoffset: 300;
  animation: chalk-draw 0.42s ease-out forwards, chalk-fill 0.3s ease forwards;
  animation-delay: var(--t), calc(var(--t) + 0.24s);
}
.work .answer tspan { stroke: rgba(246, 189, 0, 0.75); animation-name: chalk-draw, chalk-fill-gold; }
/* The answer is underlined once it is written, as you would on a board. */
.work .underline {
  fill: none; stroke: rgba(246, 189, 0, 0.5); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 600; stroke-dashoffset: 600; animation: chalk-draw 0.5s ease-out forwards;
}
/* A wrong step, struck through before the right one is written under it. */
.work .strike {
  fill: none; stroke: rgba(255, 143, 114, 0.6); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: chalk-draw 0.35s ease-out forwards; animation-delay: var(--t);
}
.work .underline { animation-delay: var(--t); }
.work .slip tspan { stroke: rgba(255, 255, 255, 0.4); }
/* A shape, drawn before it is worked out: each stroke traced end to end (its own
   length as the dash), a dot or a label put in after the stroke it belongs to. */
.work .chalk-line {
  fill: none; stroke: rgba(255, 255, 255, 0.38); stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: chalk-draw var(--dur) ease-in-out forwards; animation-delay: var(--t);
}
.work .chalk-dot { fill: rgba(255, 255, 255, 0.45); opacity: 0; animation: chalk-fade 0.2s ease forwards; animation-delay: var(--t); }
/* A region chalked in lightly (a bar, a pie chart's slice), after its outline. */
.work .chalk-shade { fill: rgba(255, 255, 255, 0.07); stroke: none; opacity: 0; animation: chalk-fade 0.5s ease forwards; animation-delay: var(--t); }
.work.still .chalk-shade { animation: none; opacity: 1; }
@keyframes chalk-fade { to { opacity: 1; } }
.work.still .chalk-line { animation: none; stroke-dashoffset: 0; }
.work.still .chalk-dot { animation: none; opacity: 1; }
/* Working already on the board when the page opens: written, not being written. */
.work.still tspan, .work.still .underline, .work.still .strike { animation: none; stroke-dashoffset: 0; }
.work.still tspan { fill: rgba(255, 255, 255, 0.2); stroke: rgba(255, 255, 255, 0.05); }
.work.still .answer tspan { fill: rgba(246, 189, 0, 0.5); stroke: rgba(246, 189, 0, 0.1); }
@keyframes chalk-draw { to { stroke-dashoffset: 0; } }
@keyframes chalk-fill { to { fill: rgba(255, 255, 255, 0.2); stroke: rgba(255, 255, 255, 0.05); } }
@keyframes chalk-fill-gold { to { fill: rgba(246, 189, 0, 0.5); stroke: rgba(246, 189, 0, 0.1); } }
.sketch .s1 { left: 4%; top: 14%; font-size: 30px; transform: rotate(-6deg); }
.sketch .s2 { left: 25%; top: 23%; font-size: 40px; transform: rotate(4deg); }
.sketch .s3 { left: 5%; top: 31%; font-size: 26px; transform: rotate(3deg); }
.sketch .s4 { left: 37%; top: 33%; font-size: 34px; transform: rotate(-8deg); }
.sketch .s5 { left: 63%; top: 5%; font-size: 26px; transform: rotate(5deg); }
.sketch .s6 { left: 91%; top: 58%; font-size: 28px; transform: rotate(-5deg); }
.sketch .s7 { left: 58%; top: 93%; font-size: 24px; transform: rotate(4deg); }

.page { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }

/* Left: the logo at the top and the Accessibility link at the foot, the board between.
   The headline, its line and the four tiles that sat here went on 2026-11-30 (Max, 5.1).
   Sticky, so opening the demo accounts doesn't move the logo. */
.brand { padding: 40px 56px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { width: 190px; height: auto; display: block; }
.foot { font-size: 13px; color: var(--faint); margin: 36px 0 0; }
.brand .foot { margin-top: auto; }
.foot a { color: var(--faint); }
/* F4 (Giammarco's pick, 2026-11-23): every link here is tapped with a finger on an iPad,
   so each is at least 44 tall (Apple's floor), its words where they were. */
.foot a, .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.mobile-foot { display: none; text-align: center; }

/* Right: the card. */
.panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }
.card {
  width: 100%; max-width: 430px; padding: 38px 34px 28px;
  background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card h1 { font-size: 38px; line-height: 1.1; margin: 0 0 8px; letter-spacing: 0.3px; }
.lede { font-size: 15px; line-height: 1.5; color: var(--text-dim); margin: 0 0 24px; }
/* The sign-in step has no line under its heading (Max, 2026-11-30, 5.2): the empty
   paragraph takes no room, and its margin (merged with the heading's) keeps the form
   a heading's breath below it. */
.lede:empty { margin-bottom: 22px; }

label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 8px; }
input {
  width: 100%; height: 54px; padding: 0 16px; margin: 0 0 20px;
  font: 400 16px "Poppins", system-ui, sans-serif; color: var(--text);
  background: var(--field); border: 1px solid var(--field-line); border-radius: 14px;
}
input::placeholder { color: var(--faint); font-weight: 300; }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(246, 189, 0, 0.2); }
.bad input, input.bad { border-color: var(--err); }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.show {
  position: absolute; right: 6px; top: 5px; height: 44px; padding: 0 12px;
  background: none; border: 0; border-radius: 10px; cursor: pointer;
  font: 500 14px "Poppins", sans-serif; color: var(--gold);
}
.show:hover { background: rgba(246, 189, 0, 0.1); }
.hint { font-size: 13px; color: var(--faint); margin: -12px 0 18px; }

/* 1a: "This iPad is shared" (login.js names the device). The box and its words are one
   row at least 44 tall; the hint says what the tick does. */
.tick { display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; align-items: center; margin: -4px 0 14px; }
.tick input {
  width: 24px; height: 24px; margin: 0; padding: 0; border-radius: 6px;
  accent-color: var(--gold-fill); cursor: pointer;
}
.tick input:focus { box-shadow: none; }
.tick input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tick label { display: flex; align-items: center; min-height: 44px; margin: 0; font-size: 15px; cursor: pointer; }
.tick .tick-sub { grid-column: 2; margin: -8px 0 0; font-size: 13px; line-height: 1.45; color: var(--faint); }

/* F3: "Forgot your password?" asks who is asking: two whole-row choices. */
#forgot-who { display: grid; gap: 10px; margin: 0 0 18px; }
#forgot-who[hidden], #forgot-learner-help[hidden] { display: none; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; min-height: 64px;
  padding: 12px 16px; text-align: left; cursor: pointer; color: var(--text);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--field-line); border-radius: 14px;
  font: 400 14px/1.4 "Poppins", system-ui, sans-serif;
}
.choice b { font-size: 16px; font-weight: 500; }
.choice span { color: var(--text-dim); }
.choice:hover { border-color: var(--gold); background: rgba(246, 189, 0, 0.06); }
#forgot-learner-help .ask { margin-bottom: 20px; }

.go {
  display: block; width: 100%; height: 56px; margin: 8px 0 20px;
  background: var(--gold-fill); color: var(--pastel-ink); border: 0; border-radius: 999px;
  font: 500 17px "Poppins", sans-serif; cursor: pointer;
}
.go:hover { background: #ffd040; }
.go:disabled { opacity: 0.6; cursor: not-allowed; }

.err {
  display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; padding: 12px 14px;
  background: rgba(255, 143, 114, 0.12); border: 1px solid rgba(255, 143, 114, 0.42);
  border-radius: 14px; font-size: 14px; line-height: 1.45; color: #ffd9cf;
}
.err:empty { display: none; }

/* Our own message for a field left empty or mistyped, under the field, in place of
   the browser's pop-up (the forms are novalidate; login.js, fieldSays). */
.field-err {
  display: flex; gap: 8px; align-items: flex-start; margin: -10px 0 18px;
  font-size: 13.5px; line-height: 1.45; color: #ffd0c4;
}
.field-err::before {
  content: "!"; flex: none; display: grid; place-items: center; width: 19px; height: 19px;
  margin-top: 1px; border-radius: 50%; background: var(--err); color: var(--pastel-ink);
  font-size: 12px; font-weight: 600;
}
input[aria-invalid="true"] { border-color: var(--err); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(255, 143, 114, 0.22); }
.err.note { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); color: var(--text-dim); }

.links { text-align: center; font-size: 14px; margin: 0 0 8px; }
/* "Check your email": what to do if the reset link doesn't arrive. */
.sent-tip {
  margin: 0 0 22px; padding: 14px 16px; font-size: 14px; line-height: 1.5; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px;
}
.sent-tip a { color: var(--gold); }
.help { text-align: center; font-size: 13px; line-height: 1.5; color: var(--faint); margin: 0; }
.help a { color: var(--gold); }

/* A switched-off account (login.js, showDeactivated): an icon over the title, the
   account it is about, and who to ask, in place of the form. */
.card h1:focus { outline: none; }
.state-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 0 18px;
  border-radius: 50%; color: var(--gold);
  background: rgba(246, 189, 0, 0.1); border: 1px solid rgba(246, 189, 0, 0.38);
}
.state-icon[hidden] { display: none; }
.who {
  display: flex; gap: 10px; align-items: baseline; margin: -6px 0 18px; padding: 10px 14px;
  font-size: 14px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
}
.who-hd { flex: none; font-size: 12px; color: var(--faint); }
.ask {
  margin: 0 0 8px; padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px;
}
.ask p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.ask .ask-hd { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gold); }
#deactivated .go { margin-top: 22px; }
#deactivated .links a { color: var(--gold); }

/* A student who passed (login.js, gcse_passed): the same screen as good news. A larger
   gold rosette with six paper shapes thrown round it once, no "Account" line, and a
   warmer panel. The shapes are still for anyone who asks for less motion. */
.state-icon .icon-passed, .state-icon .confetti { display: none; }
.card.passed .state-icon {
  position: relative; width: 72px; height: 72px; margin-bottom: 20px;
  background: rgba(246, 189, 0, 0.16); border-color: rgba(246, 189, 0, 0.6);
  box-shadow: 0 0 0 8px rgba(246, 189, 0, 0.06);
}
.card.passed .state-icon .icon-off { display: none; }
.card.passed .state-icon .icon-passed { display: block; }
.card.passed .state-icon .confetti { display: block; position: absolute; inset: 0; }
.confetti i {
  position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 2px;
  background: var(--gold); transform: translate(var(--x), var(--y)) rotate(var(--r));
  animation: confetti-throw 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.confetti i:nth-child(1) { --x: -52px; --y: -30px; --r: 24deg; }
.confetti i:nth-child(2) { --x: 50px; --y: -36px; --r: -18deg; background: var(--pink-fill); border-radius: 50%; }
.confetti i:nth-child(3) { --x: -60px; --y: 14px; --r: 40deg; background: var(--mint-fill); }
.confetti i:nth-child(4) { --x: 62px; --y: 8px; --r: 12deg; width: 5px; height: 10px; }
.confetti i:nth-child(5) { --x: -28px; --y: -54px; --r: -32deg; background: var(--pink-fill); width: 5px; height: 10px; }
.confetti i:nth-child(6) { --x: 24px; --y: -58px; --r: 52deg; background: var(--mint-fill); border-radius: 50%; }
@keyframes confetti-throw {
  from { transform: translate(0, 0) rotate(0deg) scale(0.2); opacity: 0; }
  60% { opacity: 1; }
  to { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); opacity: 0.95; }
}
.card.passed .who { display: none; }
.card.passed .lede { font-size: 17px; line-height: 1.55; color: var(--text); }
.card.passed .ask { background: rgba(246, 189, 0, 0.08); border-color: rgba(246, 189, 0, 0.3); }

/* The demo launcher: development servers only (the server cuts it from a
   production page; api/routes/auth.py::without_demo_launcher). */
.demo { margin-top: 22px; padding-top: 16px; border-top: 1px dashed rgba(255, 255, 255, 0.16); font-size: 13px; color: var(--faint); }
.demo summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.demo summary::-webkit-details-marker { display: none; }
.demo summary b { font-weight: 500; color: var(--text-dim); }
.demo .pill { border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px; padding: 6px 14px; color: var(--text); background: rgba(255, 255, 255, 0.07); }
.demo[open] .pill { font-size: 0; }
.demo[open] .pill::before { content: "Close"; font-size: 13px; }
.launch { margin-top: 16px; }
.launch .hd { margin: 0 0 12px; line-height: 1.5; }
.launch .hd.grp { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; }
.launch .tag { font-size: 10px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.la-hd .tag { background: rgba(246, 189, 0, 0.16); color: var(--gold); border: 1px solid rgba(246, 189, 0, 0.45); }
.fe-hd .tag { background: rgba(46, 196, 182, 0.14); color: #5fe0d4; border: 1px solid rgba(46, 196, 182, 0.5); }
.launch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.launch-btn {
  text-align: left; padding: 11px 13px; margin: 0; line-height: 1.25; cursor: pointer;
  font: 500 13px "Poppins", sans-serif; color: var(--text);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--field-line); border-radius: 12px;
}
.launch-btn:hover { border-color: var(--gold); background: rgba(246, 189, 0, 0.06); }
.launch-btn .sub { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 300; color: var(--text-dim); }
.launch-btn.wide { grid-column: 1 / -1; }
.launch-btn.student { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--pastel-ink); }
.launch-btn.student .sub { color: rgba(38, 11, 55, 0.72); }
.launch-btn.college { border-color: rgba(46, 196, 182, 0.5); background: rgba(46, 196, 182, 0.06); }
.launch-btn.college:hover { border-color: #2ec4b6; background: rgba(46, 196, 182, 0.14); }
.launch-btn.student.college { background: #2ec4b6; border-color: #2ec4b6; color: var(--pastel-ink); }
.launch-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.demo-block { margin-top: 18px; line-height: 1.55; font-size: 12px; }
.demo-block p { margin: 4px 0; }
.demo-block b { font-weight: 500; color: var(--text); }
.demo-block code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px; color: var(--mint); cursor: pointer; overflow-wrap: anywhere; }
.demo-block code:hover { color: var(--gold); }
.demo-two-step { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; }
.demo-two-step img { flex: 0 0 auto; border-radius: 6px; background: #fff; image-rendering: pixelated; }
.demo-two-step code { cursor: text; user-select: all; }

/* /login?clean=1: the marketing screenshot, without the demo accounts. */
body.screenshot-clean .demo { display: none; }

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; min-height: 0; }
  .brand { padding: 24px 22px 0; position: static; height: auto; }
  .logo { width: 160px; }
  .brand .foot { display: none; }
  .panel { justify-content: flex-start; padding: 28px 18px 24px; }
  .card { padding: 28px 22px 22px; }
  .card h1 { font-size: 32px; }
  .mobile-foot { display: block; margin-top: 22px; }
  .sketch .s3, .sketch .s4, .sketch .s6, .sketch .s7 { display: none; }
  .launch-grid { grid-template-columns: 1fr; }
}
/* 3a (Giammarco's pick, 2026-11-23): an iPad held upright (744 to 1024 wide) is one
   column, the logo over the card, all in the middle of the screen. Before, the phone
   layout put the card at the top with half the screen empty under it, and the 13-inch
   upright split into two columns. A phone and a computer are as they were. (The
   one-line promise under the logo went with the headline, 2026-11-30.) */
@media (min-width: 700px) and (max-width: 1100px) and (orientation: portrait) {
  .page {
    grid-template-columns: 1fr; align-content: center;
    min-height: 100vh; min-height: 100svh; padding: 32px 0;
  }
  .brand { position: static; height: auto; align-items: center; text-align: center; padding: 0 32px; }
  .logo { width: 180px; }
  .brand .foot { display: none; }
  .panel { justify-content: flex-start; padding: 30px 32px 0; }
  .card { max-width: 460px; padding: 32px 30px 24px; }
  .mobile-foot { display: block; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; }
  .confetti i { animation: none; }
}
