/* The landing's look for the trainer pages, go/ and /account/ (WI-736 look round). One file both pages use.
   The tokens, the page background, the wordmark, the buttons and the card are the landing's own (landing/v4.css),
   value for value. The landing keeps its own copy in landing/v4.css (it isn't changed by this): CHANGE BOTH TOGETHER.
   Always dark. Glows are gradients, box-shadows and drop-shadows only; no animation. DESIGN.md "Trainer pages' look
   (WI-736)" holds the contrast numbers. The wordmark's rings are shared/rings.svg. */

/* ---------- Tokens (landing/v4.css) ---------- */
:root {
  --v4-base: #050C10;
  --v4-section: #08161B;
  --v4-card: #0C2027;
  --v4-raised: #10303A;
  --v4-line: #1D454D;
  --v4-focus: #7DF2E8;
  --v4-cyan: #2EE6D6;
  --v4-cyan-soft: #7DF2E8;
  --v4-on-cyan: #04201F;
  --v4-text: #F2F7F8;
  --v4-text2: #A9BDC2;
  --v4-muted: #86A0A6;
  --v4-glow: 46, 230, 214;
  --v4-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .86 0 0 0 0 .88 0 0 0 0 .92 0 0 0 .15 -.065'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --v4-font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --v4-radius: 20px;
  /* Ours, not the landing's: a field's edge. The landing's --v4-line is 1.61:1 on the card, under the 3:1 a field's
     edge needs to be found, so fields take the landing's --v4-muted (6.07:1 on the card, 7.12:1 on the page). */
  --lk-field-edge: var(--v4-muted);
}
/* At least the screen's height, so the background's glows are laid out over the whole screen on a short page (on the
   landing the page is always long). */
html.v4-look { color-scheme: dark; min-height: 100%; }

/* ---------- The page background (landing/v4.css, body) ---------- */
/* ":root body" so it wins over theme.js's own body background on /account/ (theme.js adds its style last). */
:root body.v4-page {
  background-color: var(--v4-base);
  background-image:
    var(--v4-grain),
    radial-gradient(circle at var(--v4-arc-x) var(--v4-arc-y), transparent var(--v4-arc-r), rgba(var(--v4-glow), 0.12) calc(var(--v4-arc-r) + 26px), rgba(var(--v4-glow), 0.22) calc(var(--v4-arc-r) + 40px), rgba(var(--v4-glow), 0.10) calc(var(--v4-arc-r) + 56px), transparent calc(var(--v4-arc-r) + 110px)),
    radial-gradient(circle at var(--v4-arc-x) var(--v4-arc-y), transparent calc(var(--v4-arc-r) + 120px), rgba(var(--v4-glow), 0.10) calc(var(--v4-arc-r) + 150px), transparent calc(var(--v4-arc-r) + 200px)),
    radial-gradient(var(--v4-halo-w) var(--v4-halo-h) at calc(100% - var(--v4-halo-in)) var(--v4-halo-y), rgba(var(--v4-glow), 0.16), transparent 70%),
    radial-gradient(900px 260px at 30% 0, rgba(var(--v4-glow), 0.12), transparent 70%);
  --v4-arc-x: calc(100% + 150px); --v4-arc-y: 120px; --v4-arc-r: 210px;
  --v4-halo-w: 420px; --v4-halo-h: 420px; --v4-halo-in: 40px; --v4-halo-y: 200px;
  overflow-x: clip;
}
@media (min-width: 900px) {
  :root body.v4-page {
    --v4-arc-x: calc(100% + 60px); --v4-arc-y: 160px; --v4-arc-r: 340px;
    --v4-halo-w: 760px; --v4-halo-h: 640px; --v4-halo-in: 160px; --v4-halo-y: 320px;
  }
}

/* ---------- The wordmark (landing/v4.css, .brand), its rings from shared/rings.svg ---------- */
.brand {
  position: relative; display: inline-flex; align-items: baseline; gap: 0.28em;
  padding: 14px 0 14px 0.9em; font-family: var(--v4-font); font-size: 2.1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1;
  color: #FFFFFF; text-decoration: none;
}
.brand .go { color: var(--v4-cyan); }
.brand .brand-rings { position: absolute; left: -0.3em; top: 50%; width: 2.2em; height: 2.2em; transform: translateY(-50%); filter: drop-shadow(0 0 7px rgba(46, 230, 214, 0.7)); }
.brand span { position: relative; text-shadow: 0 0 3px var(--v4-section), 0 0 6px var(--v4-section), 0 0 10px var(--v4-section); }
@media (min-width: 1200px) { .brand { font-size: 2.75rem; padding-left: 0.95em; } }

/* ---------- Buttons (landing/v4.css, .v4-btn) ---------- */
/* Pills, 48px tall. Hover lifts a little with a stronger glow, straight away (no transition: no animation). */
.v4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.4em; border: 1.5px solid transparent; border-radius: 999px;
  font: 600 1rem/1.1 var(--v4-font); text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v4-btn svg { width: 1.125em; height: 1.125em; flex: none; }
.v4-btn-primary {
  background: var(--v4-cyan); color: var(--v4-on-cyan);
  box-shadow: 0 0 0 1px rgba(125, 242, 232, 0.35), 0 6px 18px -6px rgba(var(--v4-glow), 0.55);
}
.v4-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(125, 242, 232, 0.6), 0 10px 26px -6px rgba(var(--v4-glow), 0.8), 0 0 22px rgba(var(--v4-glow), 0.3); }
.v4-btn-secondary { background: transparent; border-color: var(--v4-cyan); color: var(--v4-cyan); }
.v4-btn-secondary:hover { transform: translateY(-1px); background: rgba(var(--v4-glow), 0.08); box-shadow: 0 0 18px rgba(var(--v4-glow), 0.35); }
/* Ours: keyboard focus as on the landing (a 2px soft cyan ring with a gap); a disabled button reads as waiting but stays
   readable (the raised card colour, secondary text, a muted edge: 7.14:1 and 5.04:1), never faded. */
.v4-btn:focus-visible, .v4-textbtn:focus-visible { outline: 2px solid var(--v4-focus); outline-offset: 3px; }
.v4-btn[disabled], .v4-btn[disabled]:hover {
  background: var(--v4-raised); border-color: var(--v4-muted); color: var(--v4-text2); box-shadow: none; transform: none; cursor: default;
}
/* A text button: the landing's cyan, bold, 44px tall, no fill and no edge. */
.v4-textbtn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px;
  border: 0; border-radius: 8px; background: none; color: var(--v4-cyan); cursor: pointer;
  font: 700 1rem/1.2 var(--v4-font); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.v4-textbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.v4-textbtn[disabled], .v4-textbtn[disabled]:hover { color: var(--v4-text2); text-decoration: none; cursor: default; }
.v4-btn[hidden], .v4-textbtn[hidden] { display: none; }

/* ---------- Card (landing/v4.css, .v4-card) ---------- */
.v4-card {
  position: relative; border: 1px solid transparent; border-radius: var(--v4-radius);
  background:
    var(--v4-grain) padding-box,
    linear-gradient(var(--v4-card), var(--v4-card)) padding-box,
    linear-gradient(135deg, var(--v4-cyan-soft), rgba(var(--v4-glow), 0.55) 18%, var(--v4-line) 48%, var(--v4-line)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.35), -6px -6px 24px -12px rgba(var(--v4-glow), 0.5);
  color: var(--v4-text);
}

/* ---------- Fields (the landing's register form: a dark field, a cyan focus ring) ---------- */
.v4-input {
  display: block; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--lk-field-edge); border-radius: 12px;
  background: var(--v4-base); color: var(--v4-text); font: 400 1rem/1.4 var(--v4-font);
}
.v4-input::placeholder { color: var(--v4-muted); opacity: 1; }
.v4-input:focus-visible { outline: 2px solid var(--v4-focus); outline-offset: 2px; }

/* ---------- The signed-out screen (shared/signed-out.js) ---------- */
/* Everything else on the page is hidden (from sight, the keyboard and screen readers); one screen, centred, on the page
   background: the wordmark, "You've been signed out." and Sign back in. */
body.is-signed-out > :not(.signed-out) { display: none !important; }
.signed-out {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  min-height: 100vh; min-height: 100dvh; padding: 32px 16px; text-align: center; font-family: var(--v4-font); color: var(--v4-text);
}
.signed-out h1 { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.signed-out h1:focus { outline: none; }
.signed-out .v4-btn { min-width: 220px; }
