/* ── Signed-out surface: sign in, password reset ────────────────── */

/* This screen does two jobs at once. It has to tell someone who has never
   seen the app what it is, and it has to get a returning user into the form
   without making them read anything.

   On a phone that ordering is vertical: the promise, then the form, then the
   detail. On a wide screen the same three blocks become two columns through
   grid areas, so the markup is written once and never duplicated. */

.auth {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 30rem;
  margin: 0 auto;
}

@media (min-width: 940px) {
  .auth {
    max-width: none;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    grid-template-areas:
      "lede  card"
      "steps card";
    gap: 26px 46px;
    /* Sit in the middle of a tall window rather than clinging to the top.
       Measured against the viewport, not a percentage of the parent — a
       height:100% chain through main and .shell does not resolve reliably
       once main gets its height from flex-grow. The subtraction is the
       app bar, main's padding and the footer. `align-content` centres the
       rows without pinning a height, so longer copy grows down and never
       clips.

       The 260px is deliberately a little generous: overshooting centres the
       block a few pixels high, which nobody notices, whereas undershooting
       overflows and puts a scrollbar on a page that should not have one. */
    min-height: calc(100svh - 260px);
    align-content: center;
  }
  .auth-lede { grid-area: lede; }
  .auth-panel { grid-area: card; align-self: start; }
  .auth-steps { grid-area: steps; }
}

/* Three Ákotí bricks in the accent order — the same geometry as the wordmark
   dot in the app bar, so the page opens with something recognisable rather
   than a stock lock icon. */
.auth-marks { display: flex; gap: 5px; margin-bottom: 15px; }
.auth-marks i {
  display: block; width: 13px; height: 13px;
  border-radius: 7px 2px 7px 2px;
}
.auth-marks i:nth-child(1) { background: var(--blue); }
.auth-marks i:nth-child(2) { background: var(--pink); }
.auth-marks i:nth-child(3) { background: var(--bronze); }

.auth-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.05rem, 8.6vw, 2.9rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 15px;
  text-wrap: balance;
}
@media (min-width: 940px) {
  .auth-title { font-size: clamp(2.5rem, 3.5vw, 3.5rem); }
}

.auth-say {
  font-size: 15px;
  line-height: 1.63;
  color: var(--slate);
  max-width: 34rem;
  margin: 0 0 11px;
}
.auth-say:last-child { margin-bottom: 0; }
/* One emphasis, on the thing that actually distinguishes this: the coach
   reads the learner's own writing, not the course boilerplate. */
.auth-say em { font-style: normal; font-weight: 600; color: var(--pink-deep); }
@media (min-width: 700px) { .auth-say { font-size: 15.5px; } }

/* ── How it works ──────────────────────────────────────────────── */

.auth-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  padding-top: 4px;
}
@media (min-width: 620px) { .auth-steps { grid-template-columns: 1fr 1fr; gap: 15px 22px; } }
@media (min-width: 940px) { .auth-steps { padding-top: 8px; } }

.step { display: flex; gap: 11px; align-items: flex-start; }
.step-n {
  flex: none;
  width: 27px; height: 27px;
  display: grid; place-items: center;
  border-radius: 9px 3px 9px 3px;
  font-family: var(--font-display); font-weight: 900; font-size: 12.5px;
  color: #fff;
  background: var(--slate);
}
/* Walks the accent palette rather than repeating one colour four times. */
.step:nth-child(1) .step-n { background: var(--blue-deep); }
.step:nth-child(2) .step-n { background: var(--pink-deep); }
.step:nth-child(3) .step-n { background: var(--slate); }
.step:nth-child(4) .step-n { background: var(--bronze); }

.step-t { font-weight: 700; font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.step-d { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-top: 3px; }

/* ── The card ──────────────────────────────────────────────────── */

.auth-head {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 12px; margin-bottom: 15px;
  border-bottom: 1px solid var(--line-soft);
}
.auth-head h2 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 1.32rem; letter-spacing: -0.02em;
  color: var(--ink); margin: 0;
}
.auth-head .auth-tag {
  margin-left: auto;
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

/* Form errors get their own tile rather than a line of red text — a failed
   sign-in is the one moment on this page where the reason must be obvious.
   The text tone is darkened from --alert for contrast on the wash. */
.auth-alert {
  background: var(--alert-wash);
  border: 1px solid rgba(194, 91, 102, .3);
  border-left: 3px solid var(--alert);
  border-radius: var(--brick-sm);
  padding: 11px 13px;
  margin-bottom: 15px;
  font-size: 13px; line-height: 1.5; font-weight: 500;
  color: #8d3944;
}
.auth-alert > div + div { margin-top: 4px; }

.auth-alt { margin: 13px 0 0; text-align: center; font-size: 12.5px; }
.auth-alt a {
  color: var(--blue-deep); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(76, 134, 184, .35);
  padding-bottom: 1px;
  display: inline-flex; align-items: center; min-height: 32px;
}
.auth-alt a:hover { border-bottom-color: var(--blue-deep); }

/* The invitation note is the answer to "how do I get in?", so it sits with
   the form rather than being stranded at the bottom of the page. Pink wash
   marks it as information, not a failure. */
.auth-invite {
  margin-top: 13px;
  background: var(--pink-wash);
  border: 1px solid rgba(232, 180, 184, .55);
  border-radius: var(--brick-sm);
  padding: 12px 14px;
  font-size: 12.5px; line-height: 1.55; color: var(--slate);
}
.auth-invite b { color: var(--ink); font-weight: 700; }
.auth-invite a { color: var(--pink-deep); font-weight: 600; }

/* Reset flow: short forms, same card, so the surface stays one thing. */
.auth-solo { max-width: 26rem; margin: 0 auto; }
