/* ====================================================================
   Grow Wings LMS — sign-in page
   --------------------------------------------------------------------
   Self-contained and light-mode. This file does NOT depend on app.css,
   so the sign-in page can carry Grow Wings branding while the rest of
   the product is still on the old theme. Everything is namespaced under
   .gw-auth, so nothing here can leak into the app.

   Palette sampled from growwings.in: #33999B is the logo, every button
   and the footer band. It is the only colour on this page.
   ==================================================================== */

:root {
  /* brand — schoolTheme.js BRAND / BRAND_SOFT. The same teal as the app;
     the deeper steps are teal-as-TEXT, which #03DAC6 cannot do on paper. */
  --gw-teal:       #03DAC6;
  --gw-teal-lift:  #5EEAD4;
  --gw-teal-deep:  #0F766E;
  --gw-teal-dark:  #115E59;
  --gw-teal-soft:  #5EEAD4;
  --gw-teal-tint:  rgba(3,218,198,.16);
  --gw-teal-wash:  rgba(3,218,198,.07);

  /* neutrals — schoolTheme's INK, inverted for paper */
  --gw-ink:        #0F172A;
  --gw-slate:      #475569;
  --gw-muted:      #5B6879;
  --gw-mist:       rgba(3,218,198,.10);
  --gw-line:       rgba(2,164,149,.22);
  --gw-white:      #FFFFFF;

  --gw-danger:     #C0273B;
  --gw-danger-bg:  rgba(251,113,133,.10);

  /* radii carry hierarchy, deliberately not all the same */
  --gw-r-panel:    34px;
  --gw-r-glass:    26px;
  --gw-r-badge:    18px;
  --gw-r-field:    12px;

  /* teal-tinted shadows, never grey — as schoolTheme's Panel throws one */
  --gw-shadow-sm:  0 1px 2px rgba(2,164,149,.08);
  --gw-shadow-md:  0 10px 30px -12px rgba(2,164,149,.30);
  --gw-shadow-lg:  0 40px 80px -36px rgba(2,164,149,.45);

  --gw-ease:       cubic-bezier(.22,.78,.3,1);
}

/* ── reset, scoped ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--gw-white);
}

body.gw-body {
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system,
               'Segoe UI', Roboto, sans-serif;
  color: var(--gw-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.gw-auth img { max-width: 100%; height: auto; display: block; }
/* A reset for UNSTYLED buttons. It inherits colour on purpose, so a
   bare <button> reads like the text around it — but at (0,1,1) it also
   outranks any .gw-* button that sets its own colour at (0,1,0), which
   is how the primary button ended up near-white on teal in dark mode.
   The ones with a colour of their own are named out. */
.gw-auth button:not(.gw-btn):not(.themeswap) { font: inherit; color: inherit; }
.gw-auth button { font: inherit; }

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

/* ====================================================================
   SHELL
   ==================================================================== */
.gw-auth {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ====================================================================
   LEFT — the form. Quiet on purpose: white, no cards, no shadows.
   ==================================================================== */
.gw-pane {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 38px clamp(24px, 5vw, 76px) 32px;
  overflow: hidden;
}

/* two very faint mist sweeps so the white side is not dead flat */
.gw-pane::before,
.gw-pane::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.gw-pane::before {
  width: 440px; height: 440px;
  top: -190px; left: -200px;
  background: radial-gradient(circle at 50% 50%, var(--gw-mist) 0%, rgba(220,231,236,0) 70%);
  opacity: .8;
}
.gw-pane::after {
  width: 360px; height: 360px;
  bottom: -170px; right: -140px;
  background: radial-gradient(circle at 50% 50%, var(--gw-teal-tint) 0%, rgba(234,245,245,0) 70%);
}

.gw-pane > * { position: relative; z-index: 1; }

/* ── brand ─────────────────────────────────────────────────────── */
.gw-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  align-self: start;
}
/* a fixed box, not just a fixed height: height alone lets a very wide
   logo run off the sign-in panel, and object-fit keeps it in proportion */
.gw-brand__img { max-height: 46px; max-width: 200px; height: auto; width: auto; object-fit: contain; }

/* typographic fallback until the real logo file is dropped in */
.gw-brand__mark { width: 38px; height: 38px; flex: none; }
.gw-brand__word {
  font-weight: 800;
  font-size: 19px;
  line-height: 1.04;
  letter-spacing: -.022em;
  color: var(--gw-teal);
}

/* ── form block ────────────────────────────────────────────────── */
.gw-pane__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* optical centring: a touch above true centre reads as composed */
  padding: 24px 0 58px;
}
.gw-form { width: 100%; max-width: 400px; }

.gw-h1 {
  margin: 0 0 11px;
  font-size: clamp(32px, 3.4vw, 43px);
  line-height: 1.04;
  letter-spacing: -.034em;
  font-weight: 800;
  color: var(--gw-ink);
}
.gw-sub {
  margin: 0 0 32px;
  font-size: 15.5px;
  line-height: 1.58;
  color: var(--gw-slate);
  max-width: 36ch;
}

/* ── fields ────────────────────────────────────────────────────── */
.gw-field { margin-bottom: 17px; }

.gw-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gw-ink);
}
/* --gw-teal-deep, not --gw-teal: the brand teal is a BACKGROUND
   colour and manages 1.76:1 as ink on paper. The deep step is the
   same hue at a readable weight, and the dark block lifts it back to
   the bright teal where the ground is dark. */
.gw-label .gw-req { color: var(--gw-teal-deep); margin-left: 1px; }

.gw-input-wrap { position: relative; }

.gw-input-wrap > svg.gw-icon {
  position: absolute;
  left: 15px; top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  stroke: var(--gw-muted);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke .18s var(--gw-ease);
}

.gw-input {
  width: 100%;
  height: 50px;
  padding: 0 15px 0 44px;
  border: 1.5px solid var(--gw-line);
  border-radius: var(--gw-r-field);
  background: var(--gw-teal-wash);
  color: var(--gw-ink);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .18s var(--gw-ease),
              background .18s var(--gw-ease),
              box-shadow .18s var(--gw-ease);
}
.gw-input::placeholder { color: #A7B6BF; }

.gw-input:hover { border-color: #D2DFE4; }

.gw-input:focus {
  background: var(--gw-white);
  border-color: var(--gw-teal);
  box-shadow: 0 0 0 4px rgba(51,153,155,.14);
}
.gw-input:focus + svg.gw-icon,
.gw-input-wrap:focus-within > svg.gw-icon { stroke: var(--gw-teal); }

.gw-input.is-bad {
  border-color: var(--gw-danger);
  background: var(--gw-danger-bg);
}
.gw-input.is-bad:focus { box-shadow: 0 0 0 4px rgba(194,69,60,.12); }

/* password field keeps room for the reveal button app.js injects */
.gw-input-wrap.has-toggle .gw-input { padding-right: 46px; }

.gw-input-wrap .pw-toggle {
  position: absolute;
  right: 6px; top: 50%;
  width: 38px; height: 38px;
  margin-top: -19px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 9px;
  cursor: pointer;
  color: var(--gw-muted);
  transition: color .16s var(--gw-ease), background .16s var(--gw-ease);
}
.gw-input-wrap .pw-toggle:hover { color: var(--gw-teal-deep); background: var(--gw-teal-tint); }
.gw-input-wrap .pw-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

.gw-err {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gw-danger);
}

/* ── submit ────────────────────────────────────────────────────── */
.gw-btn {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: var(--gw-r-field);
  background: var(--gw-teal);
  /* Dark ink, on both grounds, because the teal is the same colour on
     both. --gw-white is a SURFACE token that flips with the theme;
     using it as ink here is what made this button 1.6:1 in dark mode.
     #04121A is the app's own on-brand ink and clears 4.5:1 against the
     teal and against the darker hover teal below. */
  color: #04121A;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.005em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 22px -10px rgba(51,153,155,.75);
  transition: background .18s var(--gw-ease),
              transform .18s var(--gw-ease),
              box-shadow .18s var(--gw-ease);
}
.gw-btn:hover {
  background: #2C8A8C;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -12px rgba(51,153,155,.85);
}
.gw-btn:active { transform: translateY(0); }
.gw-btn:disabled { opacity: .62; cursor: default; transform: none; }

/* light sweep on hover — answers the pointer, not ambient */
.gw-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.26) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .62s var(--gw-ease);
}
.gw-btn:hover::after { transform: translateX(120%); }

.gw-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.1;
              stroke-linecap: round; stroke-linejoin: round; }

/* ── footer note ───────────────────────────────────────────────── */
.gw-note {
  margin: 24px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--gw-muted);
  max-width: 400px;
}
.gw-note a { color: var(--gw-teal-deep); font-weight: 600; text-decoration: none; }
.gw-note a:hover { text-decoration: underline; }

.gw-pane__foot {
  align-self: end;
  font-size: 12px;
  /* was #9DADB7, which is 2.1:1 on the white pane — quiet to the point
     of unreadable. --gw-muted is the same intent at 5.9:1, and flips
     with the theme like everything else here. */
  color: var(--gw-muted);
}

/* ── flash messages ────────────────────────────────────────────── */
.flashes { margin-bottom: 18px; max-width: 400px; }

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 9px;
  border-radius: var(--gw-r-field);
  border: 1px solid var(--gw-line);
  background: var(--gw-teal-wash);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gw-ink);
}
.flash svg { width: 17px; height: 17px; flex: none; margin-top: 1px;
             stroke: var(--gw-teal); fill: none; stroke-width: 2;
             stroke-linecap: round; stroke-linejoin: round; }
.flash span { flex: 1; }
.flash .x {
  border: 0; background: transparent; cursor: pointer;
  color: var(--gw-muted); font-size: 18px; line-height: 1;
  padding: 0 2px;
}
.flash .x:hover { color: var(--gw-ink); }

.flash.error   { background: var(--gw-danger-bg); border-color: #F3D6D3; }
.flash.error svg   { stroke: var(--gw-danger); }
.flash.warning { background: #FFF8EC; border-color: #F3E3C6; }
.flash.warning svg { stroke: #B5811F; }

/* ====================================================================
   RIGHT — the stage. This is where all the boldness is spent.
   ==================================================================== */
.gw-stage {
  position: relative;
  padding: 22px 22px 22px 0;
}

.gw-stage__panel {
  position: relative;
  height: 100%;
  min-height: 560px;
  border-radius: var(--gw-r-panel);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(126% 96% at 96% 2%,  rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 54%),
    radial-gradient(104% 84% at 2% 100%, rgba(8,52,54,.72)     0%, rgba(8,52,54,0)     62%),
    linear-gradient(158deg,
      #52C3C5 0%,
      var(--gw-teal) 36%,
      #257375 70%,
      #164F51 100%);
  box-shadow: var(--gw-shadow-lg);
}

/* ── wing arcs: the motif, taken from their logo's swoosh ───────── */
.gw-wings {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.gw-wings path { fill: none; stroke-linecap: round; }

/* ── drifting orbs ─────────────────────────────────────────────── */
.gw-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.gw-orb--a {
  width: 300px; height: 300px;
  top: -84px; right: -74px;
  background: radial-gradient(circle at 34% 34%, rgba(255,255,255,.34), rgba(255,255,255,0) 68%);
}
.gw-orb--b {
  width: 236px; height: 236px;
  bottom: -70px; left: -58px;
  background: radial-gradient(circle at 60% 40%, rgba(12,62,64,.52), rgba(12,62,64,0) 70%);
}
.gw-orb--c {
  width: 120px; height: 120px;
  top: 25%; left: 10%;
  background: radial-gradient(circle at 42% 38%, rgba(255,255,255,.22), rgba(255,255,255,0) 70%);
}

/* ── dashed ring behind the student ────────────────────────────── */
.gw-ring {
  position: absolute;
  left: 50%; top: 46%;
  width: 404px; height: 404px;
  margin: -202px 0 0 -202px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,.3);
  z-index: 1;
  pointer-events: none;
}
.gw-ring::after {
  content: '';
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
}

/* ── the frosted card the student stands in front of ───────────── */
.gw-glass {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(372px, 66%);
  height: min(430px, 62%);
  margin-left: calc(min(372px, 66%) / -2);
  margin-top: calc(min(430px, 62%) / -2 - 14px);
  border-radius: var(--gw-r-glass);
  background: linear-gradient(162deg, rgba(255,255,255,.40) 0%, rgba(255,255,255,.14) 54%, rgba(255,255,255,.07) 100%);
  border: 1.5px solid rgba(255,255,255,.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.58),
    0 30px 64px -26px rgba(6,42,44,.72);
  z-index: 2;
}

/* ── student: breaks out of the card, top and bottom ───────────── */
.gw-student {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(440px, 74%);
  margin-left: calc(min(440px, 74%) / -2);
  z-index: 3;
  filter: drop-shadow(0 26px 34px rgba(10,48,50,.34));
  pointer-events: none;
}

/* ── wing badge, pinned to the card's left edge ────────────────── */
/* straddles the card's left edge, so it reads as attached to it */
.gw-badge {
  position: absolute;
  left: 50%;
  margin-left: calc(min(372px, 66%) / -2 - 35px);
  top: 46%;
  width: 70px; height: 70px;
  display: grid;
  place-items: center;
  border-radius: var(--gw-r-badge);
  background: var(--gw-white);
  box-shadow: 0 18px 32px -14px rgba(10,50,52,.52);
  z-index: 4;
}
.gw-badge svg { width: 32px; height: 32px; }

/* ── product-moment chips ──────────────────────────────────────── */
.gw-chip {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 14px 28px -14px rgba(10,50,52,.5);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gw-ink);
  white-space: nowrap;
}
.gw-chip i {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gw-teal-tint);
  flex: none;
}
.gw-chip svg { width: 13px; height: 13px; stroke: var(--gw-teal); fill: none;
               stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.gw-chip--done  { right: 8%;  top: 30%; }
.gw-chip--marks { left: 5%;   bottom: 27%; }

/* ── the panel's words ─────────────────────────────────────────── */
.gw-stage__copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 86px clamp(28px, 4vw, 52px) clamp(28px, 3.4vw, 44px);
  background: linear-gradient(to top, rgba(10,52,54,.80) 0%, rgba(10,52,54,.40) 40%, rgba(10,52,54,0) 100%);
  color: var(--gw-white);
}
.gw-stage__copy h2 {
  margin: 0 0 8px;
  font-size: clamp(23px, 2.3vw, 31px);
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 800;
}
.gw-stage__copy p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255,255,255,.84);
  max-width: 42ch;
}

/* ====================================================================
   MOTION
   One orchestrated entrance, then slow ambient drift. Everything here
   is switched off under prefers-reduced-motion, at the end of the file.
   ==================================================================== */

/* entrance — left column, staggered */
.gw-rise {
  opacity: 0;
  transform: translateY(14px);
  animation: gwRise .66s var(--gw-ease) forwards;
}
.gw-rise-1 { animation-delay: .04s; }
.gw-rise-2 { animation-delay: .12s; }
.gw-rise-3 { animation-delay: .20s; }
.gw-rise-4 { animation-delay: .28s; }
.gw-rise-5 { animation-delay: .36s; }
.gw-rise-6 { animation-delay: .44s; }

@keyframes gwRise {
  to { opacity: 1; transform: translateY(0); }
}

/* entrance — the panel and the things on it */
.gw-stage__panel {
  opacity: 0;
  transform: scale(.965);
  animation: gwPanelIn .8s var(--gw-ease) .06s forwards;
}
@keyframes gwPanelIn {
  to { opacity: 1; transform: scale(1); }
}

.gw-student {
  opacity: 0;
  animation: gwStudentIn .9s var(--gw-ease) .34s forwards,
             gwFloat 7s ease-in-out 1.3s infinite;
}
@keyframes gwStudentIn {
  from { opacity: 0; transform: translateY(26px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gw-badge {
  opacity: 0;
  animation: gwPop .62s var(--gw-ease) .62s forwards,
             gwFloat 5.4s ease-in-out 1.4s infinite;
}
.gw-chip  { opacity: 0; animation: gwPop .62s var(--gw-ease) forwards, gwFloat 6s ease-in-out infinite; }
.gw-chip--done  { animation-delay: .74s, 1.5s; }
.gw-chip--marks { animation-delay: .86s, 1.9s; }

@keyframes gwPop {
  from { opacity: 0; transform: scale(.82); }
  to   { opacity: 1; transform: scale(1); }
}

/* ambient — slow vertical drift, low amplitude */
@keyframes gwFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}

/* ambient — orbs wander */
.gw-orb--a { animation: gwDriftA 19s ease-in-out infinite; }
.gw-orb--b { animation: gwDriftB 23s ease-in-out infinite; }
.gw-orb--c { animation: gwDriftC 16s ease-in-out infinite; }

@keyframes gwDriftA {
  0%,100% { transform: translate(0,0)        scale(1); }
  50%     { transform: translate(-26px,20px) scale(1.07); }
}
@keyframes gwDriftB {
  0%,100% { transform: translate(0,0)        scale(1); }
  50%     { transform: translate(24px,-18px) scale(1.09); }
}
@keyframes gwDriftC {
  0%,100% { transform: translate(0,0)       scale(1); opacity: .75; }
  50%     { transform: translate(18px,24px) scale(1.14); opacity: 1; }
}

/* ambient — ring turns, very slowly */
.gw-ring { animation: gwSpin 64s linear infinite; }
@keyframes gwSpin {
  to { transform: rotate(360deg); }
}

/* ambient — wing arcs draw themselves, over and over */
.gw-wings .gw-draw {
  stroke-dasharray: var(--len, 900);
  stroke-dashoffset: var(--len, 900);
  animation: gwDraw var(--dur, 9s) var(--gw-ease) var(--del, 0s) infinite;
}
@keyframes gwDraw {
  0%        { stroke-dashoffset: var(--len, 900); opacity: 0; }
  14%       { opacity: 1; }
  52%, 70%  { stroke-dashoffset: 0; opacity: 1; }
  100%      { stroke-dashoffset: calc(var(--len, 900) * -1); opacity: 0; }
}

/* ambient — the sparkle on the badge */
.gw-twinkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: gwTwinkle 3.4s ease-in-out infinite;
}
@keyframes gwTwinkle {
  0%, 100% { transform: scale(1)    rotate(0deg);   opacity: 1; }
  50%      { transform: scale(1.18) rotate(18deg);  opacity: .78; }
}

/* ====================================================================
   RESPONSIVE
   The stage stays on mobile — the image and the shapes come with it,
   as a hero above the form.
   ==================================================================== */

/* laptop: give the form a little more room */
@media (max-width: 1180px) {
  .gw-auth { grid-template-columns: minmax(0, 50fr) minmax(0, 50fr); }
  .gw-glass { width: min(320px, 72%); margin-left: calc(min(320px, 72%) / -2); }
  .gw-student { width: min(400px, 82%); margin-left: calc(min(400px, 82%) / -2); }
  .gw-ring { width: 340px; height: 340px; margin: -170px 0 0 -170px; }
  .gw-chip--done  { right: 4%; }
  .gw-chip--marks { left: 2%; }
  .gw-badge {
    margin-left: calc(min(320px, 72%) / -2 - 31px);
    width: 62px; height: 62px;
  }
  .gw-badge svg { width: 28px; height: 28px; }
}

/* ── stack ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gw-auth {
    grid-template-columns: 1fr;
    /* hero takes what it needs, the form fills the rest of the screen */
    grid-template-rows: auto 1fr;
  }

  /* hero first */
  .gw-stage {
    order: -1;
    padding: 0;
  }
  .gw-stage__panel {
    min-height: 0;
    height: 360px;
    border-radius: 0 0 30px 30px;
  }

  .gw-ring { width: 322px; height: 322px; margin: -161px 0 0 -161px; top: 52%; }
  .gw-ring::after { inset: 26px; }

  .gw-glass {
    width: 266px; height: 240px;
    margin-left: -133px;
    margin-top: -134px;
  }

  .gw-student {
    width: 252px;
    margin-left: -126px;
  }

  .gw-badge {
    left: auto;
    margin-left: 0;
    right: 7%;
    top: 20%;
    width: 54px; height: 54px;
    border-radius: 15px;
  }
  .gw-badge svg { width: 25px; height: 25px; }

  .gw-chip {
    padding: 7px 12px 7px 9px;
    font-size: 11.5px;
  }
  .gw-chip i { width: 19px; height: 19px; }
  .gw-chip svg { width: 11px; height: 11px; }
  .gw-chip--done  { right: auto; left: 5%;  top: 16%; }
  .gw-chip--marks { left: auto;  right: 5%; bottom: 20%; }

  .gw-orb--a { width: 190px; height: 190px; top: -60px; right: -50px; }
  .gw-orb--b { width: 170px; height: 170px; bottom: -56px; left: -44px; }
  .gw-orb--c { display: none; }

  /* the tagline moves to the white side on mobile, so it never
     fights the photo for space inside a 340px panel */
  .gw-stage__copy { display: none; }

  .gw-pane {
    padding: 26px clamp(20px, 6vw, 40px) 30px;
    grid-template-rows: auto 1fr auto;
  }
  .gw-pane::before { width: 300px; height: 300px; top: -150px; left: -150px; }
  .gw-pane::after  { display: none; }

  /* pack under the logo rather than floating in the middle of a tall screen */
  .gw-pane__body { justify-content: flex-start; padding: 28px 0 10px; }
}

/* …except on a tall tablet, where there is room to centre it properly */
@media (max-width: 900px) and (min-height: 900px) {
  .gw-pane__body { justify-content: center; padding-bottom: 64px; }
}

@media (max-width: 900px) {
  .gw-form, .gw-note, .flashes { max-width: 460px; margin-left: auto; margin-right: auto; }
  .gw-note { margin-top: 20px; }

  .gw-brand { justify-self: center; }
  .gw-h1 { font-size: 28px; text-align: center; }
  .gw-sub { text-align: center; max-width: 42ch; margin-left: auto; margin-right: auto; }
  .gw-note { text-align: center; }
  .gw-pane__foot { text-align: center; justify-self: center; }
}

/* ── phone ─────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .gw-stage__panel { height: 290px; border-radius: 0 0 26px 26px; }

  .gw-ring { width: 250px; height: 250px; margin: -125px 0 0 -125px; }
  .gw-glass { width: 212px; height: 198px; margin-left: -106px; margin-top: -112px; }
  .gw-student { width: 198px; margin-left: -99px; }

  .gw-badge { width: 46px; height: 46px; border-radius: 13px; right: 6%; top: 17%; }
  .gw-badge svg { width: 21px; height: 21px; }

  .gw-chip--done  { left: 4%;  top: 13%; }
  .gw-chip--marks { right: 4%; bottom: 16%; }

  .gw-pane { padding: 24px 20px 26px; }
  .gw-h1 { font-size: 26px; }
  .gw-sub { font-size: 14.5px; margin-bottom: 24px; }
  .gw-brand__img { max-height: 40px; max-width: 170px; }
  .gw-input { height: 48px; }
  .gw-btn { height: 50px; }
}

/* very short landscape phones — don't let the hero eat the screen */
@media (max-width: 900px) and (max-height: 520px) {
  .gw-stage__panel { height: 200px; }
  .gw-student { width: 150px; margin-left: -75px; }
  .gw-glass { width: 170px; height: 140px; margin-left: -85px; margin-top: -84px; }
  .gw-ring { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
  .gw-chip, .gw-badge { display: none; }
}

/* ====================================================================
   ACCESSIBILITY
   ==================================================================== */
.gw-auth :is(a, button, input):focus-visible {
  outline: 2px solid var(--gw-teal);
  outline-offset: 2px;
  border-radius: 6px;
}
.gw-input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .gw-auth *,
  .gw-auth *::before,
  .gw-auth *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .gw-rise,
  .gw-stage__panel,
  .gw-student,
  .gw-badge,
  .gw-chip {
    opacity: 1 !important;
    transform: none !important;
  }
  .gw-wings .gw-draw { stroke-dashoffset: 0; }
}

/* printing a login page is odd, but don't waste a cartridge on it */
@media print {
  .gw-stage { display: none; }
  .gw-auth { grid-template-columns: 1fr; }
}

/* ── "forgotten your password?" ───────────────────────────────────
   Sits under the password field, right-aligned, where the eye goes
   after a failed attempt. Quiet until hovered: it is the way out, not
   the way in, and it must not compete with Sign in.               */
.gw-forgot {
  margin: -4px 0 18px;
  text-align: right;
  font-size: .84rem;
}
.gw-forgot a {
  color: var(--gw-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.gw-forgot a:hover { color: var(--gw-teal-deep); border-bottom-color: currentColor; }
.gw-forgot a:focus-visible { outline: 2px solid var(--gw-teal-deep); outline-offset: 2px; border-radius: 3px; }

/* ── back to sign in ──────────────────────────────────────────────  */
.gw-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 18px;
  color: var(--gw-muted);
  font-size: .84rem;
  text-decoration: none;
}
.gw-back svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.gw-back:hover { color: var(--gw-teal-deep); }
.gw-back:focus-visible { outline: 2px solid var(--gw-teal-deep); outline-offset: 2px; border-radius: 4px; }

/* ── light / dark switch ──────────────────────────────────────────────
   Its own rules rather than app.css's, because this page deliberately
   does not load app.css. Drawn from this page's tokens so it belongs to
   the sign-in design rather than looking like a piece of the app that
   wandered in.

   It sits in the form pane's top-right corner. .gw-pane is already
   `position:relative` for its mist sweeps, so absolute is enough, and
   z-index clears those sweeps (z-index:0) and nothing else. */
.themeswap {
  position: absolute;
  top: 26px;
  right: clamp(20px, 4vw, 44px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: var(--gw-white);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  color: var(--gw-muted);
  cursor: pointer;
  box-shadow: var(--gw-shadow-sm);
  transition: color .18s var(--gw-ease), border-color .18s var(--gw-ease),
              background .18s var(--gw-ease);
}
.themeswap:hover {
  color: var(--gw-teal-deep);
  border-color: var(--gw-teal-deep);
  background: var(--gw-teal-wash);
}
.themeswap:focus-visible { outline: 2px solid var(--gw-teal-deep); outline-offset: 2px; }
.themeswap svg { width: 17px; height: 17px; stroke: currentColor; grid-area: 1/1; }

/* both icons in the markup, CSS picks — so the button is never briefly
   wrong on first paint, before app.js has run */
.themeswap__moon { display: none; }
:root[data-theme="light"] .themeswap__sun  { display: none; }
:root[data-theme="light"] .themeswap__moon { display: block; }

/* On the narrow layout the pane's own padding tightens, and the brand
   mark moves up beside it — so the button comes in with it. */
@media (max-width: 900px) {
  .themeswap { top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 10px; }
}

/* =====================================================================
   The sign-in page on the dark theme
   ---------------------------------------------------------------------
   This page keeps its own palette on purpose — it is a split-screen
   piece of art direction, not an app screen, and it predates the theme
   system. But with Dark as the product's default, signing in on white
   and landing in a near-black product is a jolt at the worst possible
   moment: the first ten seconds a client ever spends in it.

   So the left pane follows the theme. Only the left pane: the teal
   photo panel on the right is the brand image and stays exactly as it
   is in both themes, which is also what keeps the two looking like one
   page rather than two.

   Scoped to [data-tone="dark"], which the layout puts on <html>, so the
   light theme is untouched.
   ===================================================================== */
[data-tone="dark"]{
  --gw-ink:       #F1F5F9;
  --gw-slate:     #CBD5E1;
  --gw-muted:     #94A3B8;
  --gw-mist:      rgba(3,218,198,.07);
  --gw-line:      rgba(3,218,198,.14);
  --gw-white:     #0D1120;
  --gw-teal:      #03DAC6;
  --gw-teal-lift: #5EEAD4;
  /* teal reads straight off a dark ground, so the deep steps come back
     up to the brand rather than staying at their paper values */
  --gw-teal-deep: #5EEAD4;
  --gw-teal-dark: #03DAC6;
  --gw-teal-tint: rgba(3,218,198,.12);
  --gw-teal-wash: rgba(3,218,198,.06);
  --gw-danger:    #FB7185;
  --gw-danger-bg: rgba(251,113,133,.12);
}
[data-tone="dark"] .gw-body{ background:#070B18; }
[data-tone="dark"] .gw-auth{ background:#070B18; }

/* the form's own surface, and the fields in it */
[data-tone="dark"] .gw-pane{ color:var(--gw-ink); }
[data-tone="dark"] .gw-form input[type=email],
[data-tone="dark"] .gw-form input[type=password],
[data-tone="dark"] .gw-form input[type=text]{
  background:#0A0E1C; border-color:rgba(3,218,198,.18); color:#F1F5F9;
}
[data-tone="dark"] .gw-form input::placeholder{ color:#8392A6; }

/* the mark reverses: the teal wordmark disappears into a dark ground */
[data-tone="dark"] .gw-brand__word{ color:var(--gw-ink); }

/* and under glass, the pane frosts from the dark surface rather than
   from white — the same rule the app follows */
[data-surface="glass"][data-tone="dark"] .gw-form{
  background:color-mix(in srgb,#0D1120 84%,transparent);
  border-color:rgba(3,218,198,.18);
  box-shadow:
    inset 0 1px 0 rgba(3,218,198,.22),
    0 28px 64px -34px rgba(0,0,0,.8);
}

/* The teal panel is artwork, not UI: it is the same in both themes, so
   the handful of places inside it that borrow a token must keep the
   light values. Flipping those tokens for the form turned the chips'
   text white on a white pill and the headline near-black on teal —
   both invisible. Restated here rather than re-scoped above, because
   the panel is the exception and it reads better named as one. */
/* the switch, on the dark ground: the pane's surface token already
   flips to #0D1120 above, so only the lift on hover needs saying */
[data-tone="dark"] .themeswap{ background:#0A0E1C; border-color:rgba(3,218,198,.18); }
[data-tone="dark"] .themeswap:hover{ border-color:var(--gw-teal); }

[data-tone="dark"] .gw-chip{ color:#2C3F4D; }
[data-tone="dark"] .gw-chip i{ background:#EAF5F5; }
[data-tone="dark"] .gw-stage__copy h2{ color:#FFFFFF; }
[data-tone="dark"] .gw-stage__copy p{ color:rgba(255,255,255,.84); }
