/* ==========================================================================
   /auth — custom sign-in / sign-up page (terminal design port)
   ---------------------------------------------------------------------------
   Self-contained: its own Glyph token set only. No index.css. Amber (#f0a020)
   is the single accent — CTAs, focus rings, the tagline cursor. There is no
   blue.
   ========================================================================== */

/* The page shell loads Inter 600/700; the Glyph headline needs the 500 cut. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500&display=swap");

:root {
  /* Glyph palette. */
  --bg: #0a0a0c;
  --panel: #101014;
  --line: #27272a;
  --ink: #e6edf3;
  --mute: #8b949e;
  --amber: #f0a020;
  --logo: #e9eef6;
  --input: #121215;
  --oauth: #161b22;

  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 4px;

  /* Derived glows: the amber accent at alpha. No new hue is introduced, only
     transparency, so the "seven tokens only" rule still holds. */
  --glow-soft: color-mix(in srgb, var(--amber) 10%, transparent);
  --glow-strong: color-mix(in srgb, var(--amber) 22%, transparent);
}

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

/* `hidden` must stay authoritative over the component display rules below. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Page shell + top nav ---------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Clamp the ambient aura to the viewport so it can never spawn scrollbars. */
  overflow: hidden;
}

.auth-nav {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-back:hover {
  background: var(--panel);
  border-color: var(--mute);
}
.auth-back:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.auth-back i {
  font-size: 14px;
  line-height: 1;
}

.auth-main {
  position: relative;
  isolation: isolate;
  /* Depth for the pointer-driven tilt on .win. */
  perspective: 1200px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}

/* Big circular ambient aura backlighting the window. It sits centred on the
   window and spills past every edge, so the layout reads as lit from behind.
   z-index:-1 (inside .auth-main's isolated context) keeps it under the window
   and the boot message. */
.auth-main::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1500px, 140vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-strong) 0%, transparent 76%);
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
  animation: aura-breathe 9s ease-in-out infinite;
}
@keyframes aura-breathe {
  0%,
  100% {
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.auth-boot-msg {
  width: 100%;
  max-width: 1040px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 13px;
}
.auth-boot-msg[hidden] {
  display: none !important;
}

/* ---------- Window chrome ---------- */

.win {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  /* Edge aura: a soft amber halo hugging the window. It is always faintly
     present and lifts whenever the pointer is over the shell or a field inside
     has focus. */
  box-shadow:
    0 0 80px -40px var(--glow-strong),
    0 30px 90px -55px var(--glow-strong);
  /* Pointer tilt (auth.js writes --tilt-x/--tilt-y); stays 0 under reduced
     motion because auth.js never wires the tracker then. */
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: box-shadow 0.35s ease, transform 0.2s ease-out;
}
.win:hover,
.win:focus-within {
  box-shadow:
    0 0 110px -28px var(--glow-strong),
    0 0 80px -30px var(--glow-soft);
}

/* Animated border beam: a bright amber segment travels around the window edge.
   Drawn as a masked 1px ring so it never covers the content. */
@property --beam {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
/* Guarded: without mask compositing the ring would degrade to a full-bleed
   gradient over the window, so the beam simply does not exist there. */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .win::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 3px;
    padding: 1px;
    background: conic-gradient(
      from var(--beam),
      transparent 0turn 0.72turn,
      var(--amber) 0.85turn,
      transparent 0.98turn
    );
    -webkit-mask: linear-gradient(black, black) content-box, linear-gradient(black, black);
    -webkit-mask-composite: xor;
    mask: linear-gradient(black, black) content-box, linear-gradient(black, black);
    mask-composite: exclude;
    opacity: 0.7;
    pointer-events: none;
    animation: beam-sweep 7s linear infinite;
  }
}
@keyframes beam-sweep {
  to {
    --beam: 360deg;
  }
}

.bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
/* Window controls, re-tinted to the amber accent: close is a solid light,
   restore-down an outlined ring, minimise a soft dot. The bar is decorative
   (aria-hidden), so all three simply sit there with a slow, offset glow. */
.bar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  /* Glassy top sheen so each control reads as a lit bead. */
  box-shadow: inset 0 1px 1px color-mix(in srgb, var(--ink) 40%, transparent);
  --ctl-glow: color-mix(in srgb, var(--amber) 35%, transparent);
  animation: ctl-glow 3.6s ease-in-out infinite;
  transition: transform 0.2s ease;
}
.bar:hover i {
  transform: scale(1.1);
}
.bar i:nth-child(1) {
  background: var(--amber);
  --ctl-glow: color-mix(in srgb, var(--amber) 60%, transparent);
}
.bar i:nth-child(2) {
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  border: 1.5px solid var(--amber);
  --ctl-glow: color-mix(in srgb, var(--amber) 45%, transparent);
  animation-delay: 0.45s;
}
.bar i:nth-child(3) {
  background: color-mix(in srgb, var(--amber) 60%, var(--mute));
  --ctl-glow: color-mix(in srgb, var(--amber) 30%, transparent);
  animation-delay: 0.9s;
}
@keyframes ctl-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 4px var(--ctl-glow));
  }
  50% {
    filter: drop-shadow(0 0 10px var(--ctl-glow));
  }
}
.bar span {
  margin-left: 8px;
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.tab {
  background: none;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 20px;
  margin-bottom: -1px;
  min-width: 104px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover {
  background: var(--panel);
  color: var(--ink);
}
.tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
  box-shadow: inset 0 2px 0 var(--amber);
}
.tab:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Split body (brand | form) ---------- */

.body {
  display: grid;
  grid-template-columns: 5fr 7fr;
  min-height: 600px;
}
.auth-pane {
  min-width: 0;
}

/* ---------- Brand pane ---------- */

.brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 32px 20px;
  overflow: hidden;
  text-align: center;
}
/* Cursor-tracking spotlight. auth.js already writes --mx/--my (as percentages)
   on this pane; this puts them to work so a soft pool of light follows the
   pointer across the brand mark. */
.brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 50%),
    var(--glow-soft),
    transparent 62%
  );
  pointer-events: none;
  z-index: -1;
}

.logo {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.32;
  /* The Morse "D" carries the app's accent colour, not the neutral logo tone. */
  color: var(--amber);
  white-space: pre;
  /* The brand pane centres text; the art must stay left-aligned or each line
     of the "D" would centre independently and the shape would break. */
  text-align: left;
  /* Segment count, used to stagger the draw-in/out below. */
  --n: 10;
  /* Static glow so the mark still reads as lit between animation cycles. */
  max-width: 100%;
  text-shadow: 0 0 8px color-mix(in srgb, var(--amber) 42%, transparent);
}
/* Each run of blocks is a "segment". auth.js toggles .is-on on the mark; the
   transition delays carried here stagger the reveal forward and the erase in
   reverse, so the "D" draws itself in as morse and un-draws back out. */
.logo .seg {
  opacity: 0;
  transition: opacity 0.32s ease;
  transition-delay: calc((var(--n) - 1 - var(--i, 0)) * 55ms);
}
.logo.is-on .seg {
  opacity: 1;
  transition-delay: calc(var(--i, 0) * 55ms);
}

.word {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
  white-space: nowrap;
  /* Reserve the line so the centred pane does not jump while the wordmark
     types in and back out. */
  min-height: 1.5em;
}
/* Terminal prompt, typed as part of the wordmark (kept as real markup, not a
   ::before, so auth.js can reveal it character by character). */
.word .p {
  color: var(--amber);
}
.word em {
  font-style: normal;
  color: var(--amber);
}

/* The terminal line. auth.js types the tagline into
   .auth-brand__tagline-text and blinks .auth-brand__tagline-cursor. It wraps
   and reserves two lines so the long sentence never clips and the pane does
   not jump as the loop types. */
.term {
  display: block;
  max-width: 100%;
  min-height: 3.2em;
  color: var(--mute);
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
.term .p {
  color: var(--amber);
  margin-right: 8px;
}
.auth-brand__tagline-cursor,
.auth-brand__word-cursor {
  display: none;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--amber);
  animation: blink 1s steps(1) infinite;
}
/* The wordmark runs at 21px, so its caret is a touch larger. */
.auth-brand__word-cursor {
  width: 9px;
  height: 18px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Form pane ---------- */

.form {
  background: var(--panel);
  padding: 36px 34px;
}

/* Only the panel matching data-active-panel is shown. */
.auth-panel {
  display: none;
}
.auth-shell[data-active-panel="sign-in"] .auth-panel--signin,
.auth-shell[data-active-panel="sign-up"] .auth-panel--signup {
  display: block;
}

.h {
  font-family: var(--font-sans);
  font-size: clamp(23px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}
.sub {
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 12px;
  margin: 0 0 26px;
}

/* ---------- OAuth buttons ----------
   .auth-social[data-provider] is the selector auth.js binds its click handler
   to; the .sso class carries the design's look. */

.auth-socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sso {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  background: var(--oauth);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}
.sso:hover:not(:disabled) {
  background: var(--oauth);
  border-color: var(--amber);
  color: var(--amber);
}
.sso:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.sso:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.sso svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.auth-social__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- Divider ---------- */

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mute);
  font-size: 11px;
  margin: 18px 0;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Fields ---------- */

.f {
  margin-bottom: 16px;
}
label {
  display: block;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 7px;
}
.in {
  position: relative;
}
.in input {
  width: 100%;
  padding: 14px 40px 14px 14px;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  caret-color: var(--amber);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.in input::placeholder {
  color: var(--mute);
  opacity: 0.72;
}
.in input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--glow-soft);
}
/* Chromium paints autofilled fields with its own light background. The inset
   shadow covers that paint; the text fill keeps the value legible in the dark
   theme. !important is required because the UA rule wins otherwise. */
.in input:-webkit-autofill,
.in input:-webkit-autofill:hover,
.in input:-webkit-autofill:focus,
.in input:-webkit-autofill:active {
  background-color: var(--input) !important;
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
  border-color: var(--line);
  -webkit-box-shadow: 0 0 0 1000px var(--input) inset !important;
  box-shadow: 0 0 0 1000px var(--input) inset !important;
  transition: background-color 9999s ease-in-out 0s;
}
.in input:-webkit-autofill:focus {
  border-color: var(--amber);
  -webkit-box-shadow:
    0 0 0 1000px var(--input) inset,
    0 0 0 3px var(--glow-soft) !important;
  box-shadow:
    0 0 0 1000px var(--input) inset,
    0 0 0 3px var(--glow-soft) !important;
}
/* auth.js flags the offending field via aria-invalid. The design palette has
   no red token, so the amber accent is the strongest available cue. */
.in input[aria-invalid="true"] {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
}

/* Password eye. auth.js replaces this button's innerHTML with its own icon. */
.eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--mute);
  cursor: pointer;
  /* Press-and-hold control: keep the gesture on the button and suppress the
     tap highlight / long-press callout so a held touch peeks cleanly. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.eye:hover {
  color: var(--ink);
}
.eye:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
.eye svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ---------- Submit ---------- */

.go {
  position: relative;
  width: 100%;
  padding: 15px;
  margin-top: 6px;
  background: var(--amber);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.go:hover:not(:disabled) {
  filter: brightness(1.08);
}
.go:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.go:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
.go[aria-busy="true"],
.go[aria-busy="true"]:disabled {
  cursor: progress;
}

/* Light streak that sweeps across the submit and provider buttons on hover. */
.go,
.sso {
  position: relative;
  overflow: hidden;
}
.go::after,
.sso::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 25%,
    color-mix(in srgb, var(--logo) 55%, transparent) 50%,
    transparent 75%
  );
  transform: translateX(-120%) skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.go:hover:not(:disabled)::after,
.sso:hover:not(:disabled)::after {
  animation: shine-sweep 0.75s ease-out;
}
@keyframes shine-sweep {
  0% {
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
  }
  30% {
    opacity: 0.85;
  }
  100% {
    transform: translateX(120%) skewX(-18deg);
    opacity: 0;
  }
}

/* Spinner is injected into both the amber submit and the dark provider buttons,
   so it uses currentColor to stay visible on either background. */
.auth-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Status line ----------
   Written by auth.js into #signin-flash / #signup-flash. Neutral by default;
   data-tone carries the terminal/error variants. */

.auth-flash {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--mute);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--mute);
  font-size: 12.5px;
  line-height: 1.45;
  transition: opacity 0.15s ease;
}
.auth-flash[data-tone="terminal"],
.auth-flash[data-tone="error"] {
  border-left-color: var(--amber);
}
.auth-flash[data-tone="error"] {
  color: var(--ink);
}
.auth-flash.is-fading {
  opacity: 0;
}
.auth-flash[hidden] {
  display: none !important;
}

.auth-status__text {
  min-width: 0;
}

.auth-status__caret {
  display: inline-block;
  width: 7px;
  height: 12px;
  margin-left: 4px;
  vertical-align: text-bottom;
  background: var(--amber);
  animation: blink 0.9s step-start infinite;
}

.auth-status__action {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.auth-status__action:hover {
  filter: brightness(1.15);
}
.auth-status__action:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.auth-status__action[hidden] {
  display: none !important;
}

/* ---------- Inline error ---------- */

.auth-error {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid var(--amber);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
}
.auth-error[hidden] {
  display: none !important;
}
/* Empty error (diagnostic-only, e.g. data-oauth-status but no visitor text):
   remove it entirely so it never renders as a stray bordered line. */
.auth-error:empty {
  display: none;
}
.auth-error[data-oauth-status] {
  outline: 1px dashed var(--mute);
  outline-offset: 2px;
}

/* ---------- In-panel switch link ---------- */

.alt {
  margin: 18px 0 0;
  text-align: center;
  color: var(--mute);
  font-size: 12px;
}
.auth-switch__btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.auth-switch__btn:hover {
  filter: brightness(1.15);
}
.auth-switch__btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Reveal ---------- */

.auth-shell[data-reveal="done"] .auth-panes {
  animation: auth-reveal 220ms ease-out both;
}
@keyframes auth-reveal {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .brand {
    gap: 22px;
    padding: 28px 16px;
  }
  .word {
    font-size: 19px;
  }
  .form {
    padding: 30px 26px;
  }
}

@media (max-width: 768px) {
  .auth-nav {
    height: 48px;
    padding: 0 16px;
  }
  .auth-back {
    padding: 7px 10px;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .auth-main {
    /* Stack from the top so the form is reachable without the desktop
       vertical centring pushing the top of the page out of view. */
    justify-content: flex-start;
    padding: 16px;
    perspective: none;
  }
  .auth-main::before {
    width: min(900px, 180vw);
    filter: blur(60px);
    opacity: 0.38;
  }
  .win {
    transform: none;
    border-radius: var(--radius);
  }
  .win::after {
    display: none;
  }
  .bar {
    padding: 10px 12px;
  }
  .body {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .brand {
    gap: 14px;
    padding: 26px 20px 22px;
    border-bottom: 1px solid var(--line);
  }
  .logo {
    font-size: 13px;
    line-height: 1.3;
  }
  .word {
    font-size: 18px;
  }
  .term {
    min-height: 2.6em;
    font-size: 11px;
  }
  .form {
    padding: 24px 20px 28px;
  }
  .tabs {
    padding: 8px 10px 0;
  }
  .tab {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
  }
  /* 16px keeps iOS Safari from zooming the viewport when a field is focused. */
  .in input {
    font-size: 16px;
  }
  .sso {
    padding: 13px 12px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .auth-main {
    padding: 12px;
  }
  .brand {
    padding: 22px 14px 18px;
  }
  .form {
    padding: 20px 16px 24px;
  }
  .term {
    display: none;
  }
}

/* ---------- Reduced motion ----------
   Panes must always be visible — never reset opacity/visibility to hidden. */

@media (prefers-reduced-motion: reduce) {
  .auth-panes {
    animation: none;
    opacity: 1;
    visibility: visible;
  }
  .auth-main::before,
  .auth-brand__tagline-cursor,
  .auth-brand__word-cursor,
  .auth-status__caret,
  .auth-spinner,
  .bar i,
  .win::after,
  .go::after,
  .sso::after {
    animation: none;
  }
  /* Morse mark is shown fully and statically — no draw/erase loop. */
  .logo .seg {
    opacity: 1;
    transition: none;
  }
  .auth-flash,
  .tab,
  .sso,
  .go,
  .auth-back,
  .win {
    transition: none;
  }
}
