/* ==========================================================================
   login.css — the sign-in screen.

   Two halves. The left is the product's own instrument, running live; the
   right is a form that gets out of the way. The dark side reuses the exact
   material of the app sidebar so signing in and working feel continuous.
   ========================================================================== */

.auth {
  /* Palette from the supplied design spec, scoped to this screen so the
     application's own approved palette is left alone. */
  --auth-orange:       #F97316;
  --auth-orange-lit:   #FB923C;
  --auth-orange-deep:  #EA6407;
  --auth-dark:         #111111;
  --auth-dark-2:       #1C1C1C;
  --auth-light:        #F7F6F3;
  --auth-text:         #1C1C1C;
  --auth-text-2:       #737373;
  --auth-border:       #E5E2DD;

  /* Re-point the shared tokens the form controls already use. */
  --color-primary:       var(--auth-orange);
  --color-primary-lit:   var(--auth-orange-lit);
  --color-primary-hover: var(--auth-orange-deep);
  --color-primary-wash:  rgba(249, 115, 22, 0.13);
  --color-text:          var(--auth-text);
  --color-text-muted:    var(--auth-text-2);
  --color-border:        var(--auth-border);
  --color-border-strong: #DAD5CE;

  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--auth-light);
}

/* ==========================================================================
   Left panel — near-black, with the accent held to a single warm bloom
   ========================================================================== */

.auth__panel {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(var(--space-4), 3vh, var(--space-6));
  padding: clamp(var(--space-5), 4vh, var(--space-8)) clamp(var(--space-6), 4vw, 56px);
  overflow: hidden;
  color: #F2EEE8;
  background: linear-gradient(155deg, var(--auth-dark-2) 0%, var(--auth-dark) 46%, #0C0C0C 100%);
}

/* Dot field. A data surface, not a texture for its own sake. */
.auth__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(120% 90% at 88% 34%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 88% 34%, #000 0%, transparent 72%);
  pointer-events: none;
}

/* The one warm bloom. Everything else on this side is near-black. */
.auth__glow {
  position: absolute;
  right: -14%;
  top: 26%;
  width: 62%;
  aspect-ratio: 1;
  background: radial-gradient(circle,
    rgba(240, 137, 74, 0.34) 0%,
    rgba(226, 105, 28, 0.16) 34%,
    transparent 68%);
  filter: blur(12px);
  pointer-events: none;
  animation: auth-bloom 15s var(--ease) infinite;
}

/* The bloom swells as the reply lands, then settles. */
@keyframes auth-bloom {
  0%, 52%   { opacity: 0.55; transform: scale(1); }
  60%       { opacity: 1;    transform: scale(1.1); }
  88%       { opacity: 0.8;  transform: scale(1.04); }
  100%      { opacity: 0.55; transform: scale(1); }
}

/* Two hairline arcs sweeping out of the bottom-left corner.
   Both are borders. A box-shadow on a round element casts a filled disc, not
   a ring, which is a heavy dark band rather than a hairline. */
.auth__rays {
  position: absolute;
  left: -26%;
  bottom: -44%;
  width: 92%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(226, 105, 28, 0.20);
  pointer-events: none;
  /* Fade the ring out towards the top so only the lower sweep reads. */
  mask-image: linear-gradient(200deg, transparent 42%, #000 78%);
  -webkit-mask-image: linear-gradient(200deg, transparent 42%, #000 78%);
}
.auth__rays::before,
.auth__rays::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(226, 105, 28, 0.13);
}
.auth__rays::before { inset: 9%; }
.auth__rays::after  { inset: 19%; border-color: rgba(226, 105, 28, 0.08); }

.auth__brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.auth__brand .brand-name { font-size: var(--text-lg); }
.auth__brand .brand-sub { font-size: 10px; }
.auth__brand .brand-mark {
  width: 40px; height: 40px;
  border-radius: 11px;
  /* The mark is the one place a glow is earned: it is the light source the
     rest of the panel is lit by. */
  box-shadow:
    var(--edge-light),
    0 0 0 1px rgba(240, 137, 74, 0.35),
    0 0 24px rgba(226, 105, 28, 0.55),
    0 0 60px rgba(226, 105, 28, 0.28);
}
.auth__brand .brand-mark svg { width: 21px; height: 21px; }

.auth__stage {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
}

.auth__composition {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--space-4), 3vh, var(--space-6));
  width: 100%;
  max-width: 560px;
}

.auth__composition > * {
  opacity: 0;
  animation: auth-rise 700ms var(--ease) both;
}
.auth__composition > *:nth-child(1) { animation-delay: 60ms; }
.auth__composition > *:nth-child(2) { animation-delay: 180ms; }
.auth__composition > *:nth-child(3) { animation-delay: 320ms; }

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.auth__pitch { position: relative; max-width: 44ch; }
.auth__pitch h2 {
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.042em;
  line-height: 1.06;
  color: #fff;
}
/* The second line is the one that matters, so it carries the accent. */
.auth__pitch-accent {
  display: block;
  background: linear-gradient(96deg, #FDBA74 0%, var(--auth-orange-lit) 38%, var(--auth-orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.auth__pitch p {
  margin: var(--space-4) 0 0;
  font-size: var(--text-md);
  line-height: 1.62;
  color: #8F877D;
  max-width: 42ch;
}

/* --- The three states, spelled out under the rail ------------------------- */

.auth-legend {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-legend li { display: flex; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.auth-legend__icon {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(240, 137, 74, 0.34);
  color: var(--color-primary-lit);
  background: rgba(226, 105, 28, 0.09);
}
.auth-legend__icon svg { width: 13px; height: 13px; }
.auth-legend b { display: block; font-size: var(--text-sm); font-weight: 600; color: #E8E2DA; }
.auth-legend span span { display: block; font-size: var(--text-xs); color: #7E766C; margin-top: 1px; }

/* Counts under the legend. Hairline dividers, no boxes: a readout. */
.auth-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-stats > div { padding-right: var(--space-3); border-right: 1px solid rgba(255, 255, 255, 0.08); }
.auth-stats > div:last-child { border-right: 0; padding-right: 0; }
.auth-stats > div + div { padding-left: var(--space-3); }
.auth-stats dt {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
}
.auth-stats dd { margin: 2px 0 0; font-size: 10px; line-height: 1.35; color: #7E766C; }

/* ==========================================================================
   The live cadence rail — the signature element
   ========================================================================== */

.auth-viz {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: var(--space-6) var(--space-6) var(--space-5);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.026);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 70px -30px rgba(0, 0, 0, 0.85);
}

.auth-viz__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.auth-viz__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #857C71;
}

/* The two verdicts occupy the same cell and crossfade. */
.auth-viz__verdicts { position: relative; display: grid; }
.auth-viz__verdict {
  grid-area: 1 / 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-align: center;
}
.auth-viz__verdict--wait  { background: rgba(255, 255, 255, 0.07); color: #9C9388; }
.auth-viz__verdict--human { background: rgba(226, 105, 28, 0.17); color: #F0894A; }

.auth-viz__body { position: relative; }

/* Faint verticals behind the lanes: the time axis, drawn. */
.auth-viz__rules {
  position: absolute;
  left: calc(76px + var(--space-3));
  right: 0; top: -6px; bottom: -6px;
  background-image: repeating-linear-gradient(
    90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 12.5%);
  pointer-events: none;
}
.auth-viz__lanes { display: grid; gap: 13px; }

.auth-lane {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: var(--space-3);
}

.auth-lane__name {
  font-size: 11px;
  font-weight: 600;
  color: #7E766C;
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-lane__name::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 2px;
  background: var(--lane);
  flex: 0 0 auto;
}

.auth-lane__track {
  position: relative;
  height: 16px;
}
.auth-lane__track::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-tick {
  position: absolute;
  top: 2px;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--lane);
  box-shadow: 0 0 8px -1px var(--lane);
  transform-origin: center;
  opacity: 0;
  animation: auth-tick-in 620ms var(--ease) both;
}

@keyframes auth-tick-in {
  from { opacity: 0; transform: scaleY(0.25) translateY(2px); }
  to   { opacity: 0.92; transform: none; }
}

/* The reply sits above the lanes, so the pause dimming never touches it.
   The overlay mirrors the lane grid exactly, which is what makes a percentage
   position land on the track rather than on the whole card. */
.auth-viz__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: var(--space-3);
  pointer-events: none;
}
.auth-viz__overlay-track { position: relative; grid-column: 2; }

.auth-reply {
  position: absolute;
  left: 88%;
  top: 28px;                       /* centre of the LinkedIn lane */
  width: 6px; height: 18px;
  border-radius: 3px;
  background: var(--color-primary-lit);
  box-shadow:
    0 0 0 4px rgba(11, 10, 9, 0.92),
    0 0 16px 2px rgba(240, 137, 74, 0.85),
    0 0 44px 6px rgba(226, 105, 28, 0.5);
  opacity: 0;
  animation: auth-reply 15s var(--ease) 8.6s infinite;
}

.auth-reply__pulse {
  position: absolute;
  left: 50%; top: 50%;
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 1.5px solid var(--color-primary-lit);
  opacity: 0;
  animation: auth-pulse 15s var(--ease) 8.6s infinite;
}

@keyframes auth-reply {
  0%   { opacity: 0; transform: scaleY(0.3); }
  2.5% { opacity: 1; transform: scaleY(1.12); }
  5%   { transform: scaleY(1); }
  30%  { opacity: 1; }
  38%  { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes auth-pulse {
  0%   { opacity: 0.85; transform: scale(0.35); }
  14%  { opacity: 0; transform: scale(1.9); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* While a human owns the prospect, the machine's lanes recede. */
.auth-viz__lanes { animation: auth-lanes-dim 15s var(--ease) infinite; }
@keyframes auth-lanes-dim {
  0%, 57%   { opacity: 1; }
  62%, 90%  { opacity: 0.4; }
  96%, 100% { opacity: 1; }
}

.auth-viz__verdict--wait  { animation: auth-cap-a 15s var(--ease) infinite; }
.auth-viz__verdict--human { animation: auth-cap-b 15s var(--ease) infinite; }

.auth-viz__axis {
  display: flex;
  justify-content: space-between;
  padding-left: calc(76px + var(--space-3));
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 9px;
  color: #6B6359;
}

.auth-viz__caps {
  position: relative;
  display: grid;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  min-height: 32px;
}
.auth-viz__cap {
  grid-area: 1 / 1;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: #9A9186;
}
.auth-viz__cap--a { animation: auth-cap-a 15s var(--ease) infinite; }
.auth-viz__cap--b { color: #F0894A; animation: auth-cap-b 15s var(--ease) infinite; }

@keyframes auth-cap-a {
  0%, 54%   { opacity: 1; }
  58%, 93%  { opacity: 0; }
  97%, 100% { opacity: 1; }
}
@keyframes auth-cap-b {
  0%, 57%   { opacity: 0; }
  61%, 90%  { opacity: 1; }
  94%, 100% { opacity: 0; }
}

/* Motion is the whole point of this panel, so when it is switched off the
   panel must still read: the reply and the paused caption stay put. */
@media (prefers-reduced-motion: reduce) {
  .auth__composition > * { animation: none; opacity: 1; }
  .auth-tick { animation: none; opacity: 0.92; }
  .auth-reply, .auth-reply__pulse, .auth-viz__lanes,
  .auth-viz__cap--a, .auth-viz__cap--b,
  .auth-viz__verdict--wait, .auth-viz__verdict--human { animation: none; }
  .auth-reply { opacity: 1; }
  .auth-reply__pulse { opacity: 0; }
  .auth-viz__cap--a, .auth-viz__verdict--wait { opacity: 0; }
  .auth-viz__cap--b, .auth-viz__verdict--human { opacity: 1; }
}

/* ==========================================================================
   Right panel — the form, on a card, over a warm wash
   ========================================================================== */

.auth__form-side {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(var(--space-5), 4vh, var(--space-8)) var(--space-6);
  min-width: 0;
  overflow: hidden;
  background: var(--auth-light);
}

/* Two soft warm pools, so the card has something to sit on. */
.auth__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(62% 46% at 4% 2%,   rgba(240, 137, 74, 0.22) 0%, transparent 68%),
    radial-gradient(60% 48% at 99% 96%, rgba(226, 105, 28, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.auth__mark {
  display: none;
  position: relative;
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.auth__card {
  position: relative;
  width: 100%;
  max-width: 418px;
  padding: clamp(var(--space-6), 4vh, 38px) clamp(var(--space-5), 3vw, 36px);
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 254, 253, 0.94) 0%, rgba(252, 250, 247, 0.9) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(28, 28, 28, 0.07);
  box-shadow:
    var(--edge-light),
    0 1px 2px rgba(25, 22, 18, 0.04),
    0 24px 56px -20px rgba(25, 22, 18, 0.14);
  animation: auth-rise 600ms var(--ease) both;
}

.auth__avatar {
  width: 58px; height: 58px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--color-primary-hover);
  background: linear-gradient(180deg, rgba(240, 137, 74, 0.18) 0%, rgba(226, 105, 28, 0.11) 100%);
  box-shadow: inset 0 0 0 1px rgba(226, 105, 28, 0.18);
}
.auth__avatar svg { width: 26px; height: 26px; }

.auth__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.auth__sub {
  margin: 7px auto var(--space-6);
  max-width: 30ch;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* The form itself is left-aligned inside a centred card: labels and errors
   need a consistent left edge to be readable. */
.auth__form { text-align: left; }
.auth__form .field { margin-bottom: var(--space-4); }

.auth__input-wrap { position: relative; display: flex; align-items: center; }
.auth__input-wrap > svg {
  position: absolute;
  left: 13px;
  width: 16px; height: 16px;
  color: var(--color-text-faint);
  pointer-events: none;
  transition: color var(--dur-fast) var(--ease);
}
.auth__input-wrap:focus-within > svg { color: var(--color-primary); }

.auth__form .input {
  height: 46px;
  padding-left: 39px;
  border-radius: 11px;
  font-size: var(--text-md);
  background: #fff;
  border-color: #E2DAD0;
  box-shadow: inset 0 1px 2px rgba(25, 22, 18, 0.04);
}
.auth__form .input:hover { border-color: #CFC5B8; }
.auth__form .input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-wash);
}

.auth__form .field__label { font-size: var(--text-sm); font-weight: 600; }

.auth__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.auth__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary-hover);
  border-radius: var(--radius-sm);
}
.auth__link:hover { text-decoration: underline; }

.auth__form .auth__input-wrap .input[type="password"],
.auth__form .auth__input-wrap .input[type="text"]#auth-password { padding-right: 44px; }

.auth__reveal {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--color-text-faint);
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.auth__reveal:hover { color: var(--color-text); background: var(--color-surface-muted); }
.auth__reveal svg { width: 16px; height: 16px; }

.auth__caps {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-warning);
}
.auth__caps svg { width: 13px; height: 13px; }

.auth__remember {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-1) 0 var(--space-5);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
}

.auth__submit {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: var(--text-md);
  justify-content: center;
  background: linear-gradient(180deg, var(--auth-orange-lit) 0%, var(--auth-orange) 55%, var(--auth-orange-deep) 100%);
  box-shadow: var(--edge-light), 0 6px 18px -6px rgba(249, 115, 22, 0.55);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), background 240ms var(--ease);
}
.auth__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--edge-light), 0 10px 26px -6px rgba(249, 115, 22, 0.62);
}
.auth__submit:active:not(:disabled) { transform: translateY(0); }

.auth__submit svg { width: 16px; height: 16px; transition: transform 240ms var(--ease); }
.auth__submit:hover:not(:disabled) svg { transform: translateX(3px); }

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

.auth__or {
  position: relative;
  margin: var(--space-5) 0;
  text-align: center;
}
.auth__or::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px solid var(--color-border);
}
.auth__or span {
  position: relative;
  padding: 0 var(--space-3);
  background: #FCFAF7;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* --- Single sign-on ------------------------------------------------------ */

.auth__sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  height: 46px;
  border-radius: 11px;
  border: 1px solid var(--color-border-strong);
  background: #fff;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
  box-shadow: 0 1px 1.5px rgba(25, 22, 18, 0.045);
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.auth__sso:hover:not(:disabled) { background: #FAF7F3; border-color: #CFC5B8; }
.auth__sso:active:not(:disabled) { transform: translateY(1px); }
.auth__sso.is-busy { opacity: 0.65; }
.auth__sso svg { flex: 0 0 auto; }

/* --- Security note ------------------------------------------------------- */

.auth__secure {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  text-align: left;
}
.auth__secure > svg {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  padding: 7px;
  border-radius: 50%;
  color: var(--color-primary-hover);
  background: rgba(226, 105, 28, 0.10);
}
.auth__secure b { display: block; font-size: var(--text-sm); font-weight: 600; }
.auth__secure span span { display: block; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 1px; }

.auth__note {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}
.auth__note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--color-info); }

/* ==========================================================================
   Responsive
   Desktop: split screen. Tablet: two columns held as long as they are
   readable. Mobile: stacked, with the timeline reduced rather than dropped.
   ========================================================================== */

/* Short viewports. Everything scales down; nothing is hidden, because a
   panel missing half its content reads as empty rather than as compact. */
@media (max-height: 900px) {
  .auth__panel { gap: var(--space-4); }
  .auth__composition { gap: var(--space-4); }
  .auth__pitch h2 { font-size: clamp(28px, 2.9vw, 38px); }
  .auth__pitch p { margin-top: var(--space-3); }
  .auth-viz { padding: var(--space-4) var(--space-5); }
  .auth-viz__head { margin-bottom: var(--space-4); }

  .auth__card { padding: var(--space-5) clamp(var(--space-5), 2.6vw, 30px); }
  .auth__avatar { width: 48px; height: 48px; margin-bottom: var(--space-3); }
  .auth__avatar svg { width: 22px; height: 22px; }
  .auth__title { font-size: 24px; }
  .auth__sub { margin-bottom: var(--space-5); }
  .auth__or { margin: var(--space-4) 0; }
  .auth__secure { margin-top: var(--space-4); padding-top: var(--space-3); }
}

@media (max-height: 800px) {
  .auth__panel { padding-top: var(--space-5); padding-bottom: var(--space-5); }
  .auth__pitch h2 { font-size: clamp(26px, 2.6vw, 32px); }
  .auth__pitch p { font-size: var(--text-base); }
  .auth-viz__lanes { gap: 9px; }
  .auth-viz__label { font-size: 9px; }
  .auth-legend b { font-size: var(--text-xs); }
  .auth-stats { padding-top: var(--space-3); }
  .auth-stats dt { font-size: var(--text-md); }

  .auth__form-side { padding-top: var(--space-5); padding-bottom: var(--space-5); }
  .auth__card { padding: var(--space-4) var(--space-5); }
  .auth__avatar { width: 42px; height: 42px; margin-bottom: var(--space-2); }
  .auth__avatar svg { width: 19px; height: 19px; }
  .auth__title { font-size: 22px; }
  .auth__sub { margin: 4px auto var(--space-4); font-size: var(--text-base); }
  .auth__form .field { margin-bottom: var(--space-3); }
  .auth__form .input { height: 42px; }
  .auth__submit { height: 44px; }
  .auth__sso { height: 44px; }
  .auth__remember { margin-bottom: var(--space-4); }
}

/* Genuinely cramped: drop the axis and tighten the legend to one line each. */
@media (max-height: 700px) {
  .auth-viz__axis { display: none; }
  .auth-legend span span { display: none; }
  .auth-stats dd { font-size: 9px; }
  .auth__pitch p { display: none; }
}

@media (max-width: 1180px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 452px); }
  .auth-legend { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
}

/* ---- Stacked: panel above, form below ---------------------------------- */
@media (max-width: 940px) {
  .auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }

  .auth__panel {
    grid-template-rows: auto auto;
    gap: var(--space-6);
    /* Generous bottom padding: the panel clips its own overflow, so the
       legend's last line needs room rather than luck. */
    padding: var(--space-7) var(--space-6) var(--space-10);
  }
  .auth__stage { align-items: flex-start; }
  .auth__composition { max-width: none; }
  .auth__pitch h2 { font-size: clamp(28px, 6vw, 38px); }
  .auth__pitch p { max-width: none; }
  .auth-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
  .auth__glow { top: -10%; right: -30%; width: 90%; }

  .auth__form-side { padding: var(--space-7) var(--space-6) var(--space-8); }
  .auth__card { max-width: 448px; }
  .auth__mark { display: none; }          /* the panel above carries the brand */
}

/* ---- Phone: the timeline is reduced, not removed ------------------------ */
@media (max-width: 640px) {
  .auth__panel { padding: var(--space-6) var(--space-5) var(--space-8); gap: var(--space-5); }
  .auth__brand .brand-mark { width: 34px; height: 34px; }
  .auth__brand .brand-mark svg { width: 18px; height: 18px; }

  .auth-viz { padding: var(--space-4); }
  .auth-viz__label { font-size: 9px; letter-spacing: 0.09em; }
  .auth-viz__lanes { gap: 9px; }
  .auth-lane { grid-template-columns: 58px 1fr; gap: var(--space-2); }
  .auth-viz__overlay { grid-template-columns: 58px 1fr; gap: var(--space-2); }
  .auth-viz__rules { left: calc(58px + var(--space-2)); }
  .auth-lane__name { font-size: 10px; }
  .auth-lane__track { height: 14px; }
  .auth-tick { height: 10px; top: 2px; }
  .auth-reply { height: 15px; top: 24px; }
  .auth-viz__axis { padding-left: calc(58px + var(--space-2)); }
  .auth-legend { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }

  .auth__form-side { padding: var(--space-6) var(--space-4) var(--space-7); }
  .auth__card { max-width: none; padding: var(--space-5) var(--space-4); border-radius: 18px; }
  .auth__title { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth__card, .auth__glow { animation: none; }
  .auth__submit, .auth__submit svg { transition: none; }
}
