/* Sign-in / recovery / verification pages. Plain, single column, phone first.
   Rules kept to: controls carry STATE, not decoration — nothing is restyled on hover, and the
   primary button's disabled state is the only visual change while a request is in flight.
   Hit targets are 3rem (48px) per Apple HIG / Material, comfortably over WCAG 2.5.8's 24px. */

:root {
  --bg: #fff;
  --fg: #111;
  --muted: #6b6b6b;
  --line: #d8d8d8;
  --field: #fff;
  --focus: #111;
  --warn-bg: #fff5f5;
  --warn-line: #e3b4b4;
  --warn-fg: #7a1c1c;
  --ok-bg: #f4f7f4;
  --ok-line: #c3d3c3;
  --ok-fg: #1f3d1f;
  --tap: 3rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101010; --fg: #f2f2f2; --muted: #9a9a9a; --line: #333; --field: #161616;
    --focus: #f2f2f2; --warn-bg: #2a1414; --warn-line: #6b2b2b; --warn-fg: #f0b4b4;
    --ok-bg: #14200f; --ok-line: #3c5a35; --ok-fg: #cfe6c6;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.wrap {
  max-width: 26rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.brand {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

.tag {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  max-width: 34ch;
}

.card {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 1.1rem 1rem 1.15rem;
  margin: 0 0 1rem;
}

/* One block per field the flow asked for — the flow decides, not this stylesheet. */
.field { margin: 0 0 0.9rem; }
.field:last-of-type { margin-bottom: 1rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
}

input {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 0 0.75rem;
  font: inherit;
  color: var(--fg);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

/* A field the service has locked. Its value still travels as a hidden field. */
input[disabled] {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 0.5rem;
  min-height: var(--tap);
}

.primary {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--fg);
  border: 1px solid var(--fg);
}

/* The only state change on the primary control: it is busy. */
.primary[disabled] { opacity: 0.55; cursor: default; }

.primary:focus-visible,
.link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.link {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  min-height: 2.5rem;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  font-size: 0.9rem;
}

.link[disabled] { opacity: 0.55; cursor: default; text-decoration: none; }

.hint, .foot {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.5rem 0 0;
}

.notice {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.notice.good {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok-fg);
}

.signed { margin: 0 0 0.4rem; }

.foot { margin-top: 1.5rem; }
