/* Catch on the web.
   The support surface: the pages that genuinely cannot live on a phone —
   a guardian approving their child, and someone locked out of their account.

   Same vocabulary as the iOS app and the club console: blue, grey, white, with
   colour reserved for things that need acting on. Nothing here is decorative.

   🔑 Designed for the person who is least equipped to be here. A guardian
   arrives from an email, on whatever phone they own, having never heard of
   Catch, to make a decision about their child. So: one decision per screen,
   large type, generous targets, and no jargon. */

:root {
  color-scheme: light dark;

  --paper:      #F2F3F7;
  --card:       #FFFFFF;
  --sunken:     #E9EBF0;
  --ink:        #14171F;
  --ink-soft:   #4E5666;
  --ink-faint:  #7A8296;
  --rule:       #D9DDE5;
  --accent:     #3B6EF8;
  --accent-ink: #2A51C4;
  --accent-wash:#E8EEFE;
  --good:       #1B7F4B;
  --good-wash:  #E1F3E9;
  --warn:       #96620B;
  --warn-wash:  #F9EEDB;
  --bad:        #B5342A;
  --bad-wash:   #FAE6E4;
  --radius:     14px;
  --tap:        48px;   /* the iOS app's floor, and it applies here too */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0B0D12;
    --card:       #13161D;
    --sunken:     #1A1E27;
    --ink:        #EDEFF4;
    --ink-soft:   #A7AEBE;
    --ink-faint:  #798194;
    --rule:       #262B36;
    --accent:     #7B9BFF;
    --accent-ink: #A7BDFF;
    --accent-wash:#19213B;
    --good:       #5FD196;
    --good-wash:  #12291E;
    --warn:       #E9B45E;
    --warn-wash:  #2A2013;
    --bad:        #FF8A7E;
    --bad-wash:   #2E1715;
  }
}

* { box-sizing: border-box; }

/* 🔴 Load-bearing. The `hidden` attribute is only `display: none` in the UA
   stylesheet, so ANY author `display` rule beats it — which in the club console
   left the sign-in card permanently visible over a page that had rendered fine
   underneath, and made every screenshot look like a failed login. Every state
   machine on this site toggles `hidden`. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 28px 20px 80px; }
.wrap.wide { max-width: 760px; }

/* ── Identity ─────────────────────────────────────────────────────────────── */

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); position: relative; flex: none;
}
/* The waterline from the app's mark — the one decorative element the iOS app
   allows itself, reused here rather than inventing a second motif. */
.brand-mark::after {
  content: ""; position: absolute; left: 4px; right: 4px; top: 50%;
  height: 2px; background: var(--accent); transform: translateY(-50%);
}
.brand-name { font-weight: 700; letter-spacing: -0.02em; font-size: 1.15rem; }

/* ── Type ─────────────────────────────────────────────────────────────────── */

h1 { font-size: 1.6rem; line-height: 1.25; letter-spacing: -0.022em; margin: 0 0 10px; }
h2 { font-size: 1.1rem; letter-spacing: -0.01em; margin: 26px 0 10px; }
p  { margin: 0 0 14px; color: var(--ink-soft); }
p.lead { font-size: 1.05rem; color: var(--ink); }
strong { color: var(--ink); font-weight: 650; }
small { font-size: .85rem; color: var(--ink-faint); display: block; }

/* ── Surfaces ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 20px; margin: 0 0 16px;
}
.card.tight { padding: 16px; }

.subject {
  background: var(--accent-wash); border-color: transparent;
  text-align: center; padding: 24px 20px;
}
.subject .who { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em;
                color: var(--accent-ink); margin: 0; line-height: 1.2; }
.subject .team { color: var(--ink-soft); margin: 4px 0 0; }

/* ── Forms ────────────────────────────────────────────────────────────────── */

label { display: block; font-size: .9rem; font-weight: 600; margin: 0 0 6px; }
.field { margin: 0 0 16px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; min-height: var(--tap);
  padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 10px; -webkit-appearance: none; appearance: none;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* A pair of real buttons rather than a radio group or a segmented control.
   The iOS app learned this twice: a segmented control discards its label and
   its text does not scale with the reader's type size. */
.choice { display: grid; gap: 10px; }
.choice button {
  display: block; width: 100%; min-height: var(--tap);
  text-align: left; padding: 14px 16px; font: inherit;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer;
}
.choice button .t { font-weight: 650; display: block; }
.choice button .d { color: var(--ink-faint); font-size: .88rem; display: block; margin-top: 2px; }
.choice button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); }
.choice button[aria-pressed="true"] .t { color: var(--accent-ink); }

button.primary {
  width: 100%; min-height: var(--tap); font: inherit; font-weight: 650;
  color: #fff; background: var(--accent); border: none;
  border-radius: 12px; cursor: pointer; padding: 14px;
}
button.primary:disabled { background: var(--rule); color: var(--ink-faint); cursor: not-allowed; }
button.link {
  background: none; border: none; color: var(--accent); font: inherit;
  cursor: pointer; padding: 12px 0; min-height: var(--tap);
}

/* ── Notices. Colour means state, never decoration. ───────────────────────── */

.note { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: .93rem; }
.note.bad  { background: var(--bad-wash);  color: var(--bad); }
.note.warn { background: var(--warn-wash); color: var(--warn); }
.note.good { background: var(--good-wash); color: var(--good); }

.done { text-align: center; padding: 32px 20px; }
.done .tick {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--good-wash); color: var(--good);
  display: grid; place-items: center; font-size: 1.7rem; font-weight: 700;
}

.spinner { text-align: center; color: var(--ink-faint); padding: 40px 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule);
  color: var(--ink-faint); font-size: .85rem;
}
footer a { color: var(--ink-faint); }

/* Nothing on this site animates. A guardian deciding about their child and
   somebody locked out of their account are both already tense; motion here
   would be decoration with a cost. */
@media (prefers-reduced-motion: no-preference) { /* deliberately empty */ }
