/* Standalone styling for the pre-app pages (request access, activate, TOS,
   result) — mirrors login.html's marine palette so they feel of a piece. */
:root {
  --ink: #0f2534; --muted: #5c7488; --line: #dbe4ec; --field: #f4f8fb;
  --accent: #0e7ab8; --accent-strong: #0a5f92; --card: #ffffff;
  --danger-bg: #fdecec; --danger-ink: #a3272a; --danger-line: #f2c4c4;
  --ok-bg: #e4f5ea; --ok-ink: #146c34; --ok-line: #b6e0c4;
  --warn-bg: #fdf3d6; --warn-ink: #7a5c00; --warn-line: #e8cf8c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f1f7; --muted: #93a7b6; --line: #29404f; --field: #14232e;
    --accent: #38a7dd; --accent-strong: #2c93c6; --card: #10202b;
    --danger-bg: #2e1616; --danger-ink: #f2b2b2; --danger-line: #5a2a2a;
    --ok-bg: rgba(60,170,110,.16); --ok-ink: #7fd6a1; --ok-line: rgba(60,170,110,.4);
    --warn-bg: rgba(220,170,60,.15); --warn-ink: #e9c46a; --warn-line: rgba(220,170,60,.4);
  }
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #06263b;
  background-image:
    radial-gradient(1100px 600px at 15% -10%, #0e5b86 0%, rgba(14,91,134,0) 55%),
    radial-gradient(900px 500px at 110% 10%, #0b3f5f 0%, rgba(11,63,95,0) 50%),
    linear-gradient(160deg, #072c44 0%, #05202f 55%, #041824 100%);
  background-attachment: fixed;
  display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1.2rem 4rem;
}
.card {
  position: relative; width: 100%; max-width: 640px; background: var(--card);
  border-radius: 18px; padding: 2.2rem 2.2rem 2rem;
  box-shadow: 0 30px 70px rgba(3,18,28,.5), 0 2px 6px rgba(3,18,28,.25);
}
.card.narrow { max-width: 440px; }
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; margin-bottom: 1.4rem; }
.brand .mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 8px 20px rgba(14,122,184,.35); }
.brand .mark svg { width: 28px; height: 28px; }
.brand h1 { margin: .3rem 0 0; font-size: 1.3rem; letter-spacing: -.01em; }
.brand p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 46ch; }

.alert { display: flex; gap: .5rem; align-items: flex-start; border-radius: 10px; padding: .65rem .8rem;
  font-size: .88rem; margin: 0 0 1.1rem; background: var(--danger-bg); color: var(--danger-ink); border: 1px solid var(--danger-line); }
.note { border-radius: 10px; padding: .6rem .8rem; font-size: .84rem; margin: 0 0 1rem;
  background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.ok-msg { border-radius: 10px; padding: .8rem .9rem; font-size: .92rem;
  background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line); }

form { display: flex; flex-direction: column; gap: .9rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .62rem .75rem; font-size: .93rem; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 10px; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 3.2rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,122,184,.18); }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.checks label { display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; font-weight: 500;
  color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; cursor: pointer; }

.btn-primary { margin-top: .3rem; width: 100%; padding: .78rem 1rem; font-size: .98rem; font-weight: 650;
  color: #fff; background: linear-gradient(150deg, var(--accent) 0%, var(--accent-strong) 100%);
  border: none; border-radius: 10px; cursor: pointer; box-shadow: 0 8px 20px rgba(14,122,184,.32); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: default; filter: none; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
  padding: .72rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--ink); font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-google:hover { background: var(--field); }
.btn-google svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .08em; margin: 1.1rem 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.status { text-align: center; font-size: .88rem; color: var(--muted); min-height: 1.2em; }
.foot { margin-top: 1.3rem; text-align: center; color: var(--muted); font-size: .82rem; }
.foot a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* TOS document body */
.tos-body { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; background: var(--field); font-size: .88rem; line-height: 1.55; }
.tos-body h2 { font-size: 1rem; margin: 1.1rem 0 .3rem; }
.tos-body h2:first-child { margin-top: 0; }
.tos-body p, .tos-body li { color: var(--ink); }
.agree-row { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; }
.agree-row .grow { flex: 1; }
