/* GENERATED by build-site-app-css.sh — do not edit.
   Layer 1 = /var/www/_shared/styles/app.css
   Layer 2 = /var/www/_shared/sites/boxingclub/styles/app.identity.css   <- edit THIS, then re-run the script. */

/* ---- layer 1: PAT-wide standard (/var/www/_shared/styles/app.css) ---- */
/* ============================================================================
 * PAT SPA — shared application stylesheet (PAT-wide STANDARD)
 * ----------------------------------------------------------------------------
 * SOURCE: frontend-wasm-app/styles/app.base.css (since 2026-09-03). Deploy =
 * copy to /var/www/_shared/styles/app.css, bump the ?v= on any app.html
 * that links it, and re-run build-site-app-css.sh for every node-served
 * site. Never hand-edit the served copy.
 * ----------------------------------------------------------------------------
 * Served at /shared/styles/app.css to EVERY tenant. This file is the
 * framework layer: base reset, neutral design tokens, and the chrome that
 * is identical for every site — the unlock/restore flow, the session
 * countdown, the DID chip, and the provenance (reachability) chips.
 *
 * IT CARRIES NO SITE IDENTITY. A tenant's brand (colours, type, family
 * layout for jc-* / c1-* classes) lives in its own site sheet, loaded
 * AFTER this one:  /shared/sites/<slug>/styles/app.css
 *
 * Sites customise by overriding the CSS custom properties below and styling
 * their own family classes. Never add a tenant's palette here.
 *
 * Aligned to the SPA shell in frontend-wasm-app/src/spa/. Class vocabulary
 * is emitted by the Rust views; keep selectors in lockstep with that source.
 * ========================================================================== */

/* ---- Design tokens (neutral defaults; site sheets override) ------------- */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;

  --bg:          #f6f7f9;   /* page background                */
  --surface:     #ffffff;   /* cards, panels                  */
  --surface-2:   #eef1f4;   /* inset / secondary surface      */
  --fg:          #1c2128;   /* primary text                   */
  --fg-dim:      #6b7280;   /* muted text                     */
  --border:      #d7dce2;   /* hairlines, input borders       */
  --accent:      #3b6ea5;   /* neutral slate-blue accent      */
  --accent-fg:   #ffffff;   /* text on accent                 */
  --ok:          #1f9d57;   /* success / verified             */
  --warn:        #b7791f;   /* caution                        */
  --danger:      #c0392b;   /* error / refusal                */

  --radius:      8px;
  --radius-sm:   5px;
  --gap:         16px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --maxw:        1100px;

  /* Auth page (/app/auth) — derived from the tokens above so a site that
     only overrides its palette gets a matching auth page for free. Sites
     may override these four directly for a bespoke brand panel. */
  --auth-bg:       linear-gradient(135deg, var(--bg) 0%, var(--surface-2) 100%);
  --auth-accent:   var(--accent);
  --auth-headline: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--fg)) 100%);
  --auth-glow:     color-mix(in srgb, var(--accent) 10%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14171c;
    --surface:   #1c2128;
    --surface-2: #242b33;
    --fg:        #e6e9ed;
    --fg-dim:    #9aa4b0;
    --border:    #2d343d;
    --accent:    #5b8fc7;
    --shadow:    0 1px 3px rgba(0,0,0,.4);
  }
}

/* ---- Reset & base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.25; font-weight: 650; margin: 0 0 .5em; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.0rem; }
p  { margin: 0 0 .75em; color: var(--fg-dim); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, kbd, samp { font-family: var(--mono); font-size: .92em; }

/* ---- App frame: <header> + <main id="spa-root"> from app.html ---------- */
body > header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 36px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

/* Signed-in user chip in the shell header. Populated as username#suffix
   (falls back to a truncated DID) by the SPA shell. Sits immediately to
   the left of the session countdown (both right-aligned via the header's
   flex-end + the gap). */
#shell-user-chip:not(:empty) {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

#session-countdown {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
#session-countdown:not(:empty)::before {
  content: "⏱ ";
  opacity: .7;
}

#spa-root {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--gap);
}

/* ---- Generic primitives (consumed by views + site sheets) -------------- */
button {
  font: inherit;
  cursor: pointer;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-fg);
  transition: filter .12s ease, opacity .12s ease;
}
button:hover { filter: brightness(1.06); }
button:active { filter: brightness(.94); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary {
  background: transparent;
  color: var(--accent);
}

input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 9px 11px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 72px; }

ul { margin: 0; padding-left: 1.1em; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--fg-dim); font-weight: 600; }

/* Generic card surface — sections/panes inherit unless a site restyles. */
section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--gap);
  margin-bottom: var(--gap);
  box-shadow: var(--shadow);
}

/* ---- Shell: unlock / restore — LEGACY vocabulary ------------------------
 * Emitted by bundles built before 2026-09-03 (justcruizin's fat bundle still
 * is). Kept so an older bundle under this sheet keeps its card; the current
 * shell emits the spa-auth-* vocabulary below. Drop when every site is on a
 * post-09-03 bundle. */
.spa-unlock-card,
.spa-restore-card {
  max-width: 380px;
  margin: 10vh auto 0;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.spa-unlock-brand {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -.01em;
}
.spa-unlock-card h2,
.spa-restore-card h2 { margin: 0; font-size: 1.05rem; color: var(--fg-dim); font-weight: 550; }

.spa-unlock-status,
.spa-restore-status {
  margin: 0;
  min-height: 1.2em;
  font-size: .88rem;
  color: var(--fg-dim);
}

.spa-unlock-restore {
  margin-top: 4px;
  font-size: .82rem;
  color: var(--fg-dim);
}

/* ---- DID chip (cross-family identity label) --------------------------- */
.did-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg-dim);
  border: 1px solid var(--border);
  vertical-align: middle;
}

/* ============================================================================
 * Reachability (provenance) chips — render side READ indicator.
 * Mirrors frontend-wasm-app/src/spa/shell/reachability_chip.rs variant_class().
 * Stable variant names: this-site, stored, from-peer, your-copy,
 * unreachable, absent-strong, absent-weak, unknown.
 * The chip NEVER says "live" and never gates an action — purely informational.
 * ========================================================================== */
.reachability-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
  vertical-align: middle;
}
.reachability-chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}
/* Verified, served by the site you're on — strongest read provenance. */
.reachability-chip--this-site   { color: var(--ok);     background: color-mix(in srgb, var(--ok) 14%, transparent);     border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
/* Stored locally but not re-verified this request. */
.reachability-chip--stored      { color: var(--fg-dim); background: var(--surface-2); border-color: var(--border); }
/* Pulled from a federation peer. */
.reachability-chip--from-peer   { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
/* User's own browser-cached copy. */
.reachability-chip--your-copy   { color: var(--warn);   background: color-mix(in srgb, var(--warn) 14%, transparent);   border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
/* Couldn't refresh — temporary network state, NOT an error. */
.reachability-chip--unreachable { color: var(--fg-dim); background: var(--surface-2); border-color: var(--border); border-style: dashed; }
/* Asked everywhere, not found. */
.reachability-chip--absent-strong { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
/* Not on this site; may exist elsewhere (federation not attempted). */
.reachability-chip--absent-weak { color: var(--fg-dim); background: var(--surface-2); border-color: var(--border); }
/* Forward-compat: unknown future Provenance variant. */
.reachability-chip--unknown     { color: var(--fg-dim); background: var(--surface-2); border-color: var(--border); }


/* ============================================================================
 * Shell: auth page — /app/auth (Sign Up / Sign In / Restore)
 * ----------------------------------------------------------------------------
 * The cross-site STANDARD since 2026-09-03: the legacy auth.html layout
 * (brand panel + auth card with tabs) ported into the SPA shell. Structure
 * only — every colour is a token, so a site's identity sheet restyles the
 * page by overriding tokens (see --auth-* above), never by re-declaring
 * these rules. Vocabulary is emitted by frontend-wasm-app/src/spa/shell/
 * auth.rs and its three pane modules (register.rs, unlock.rs, restore.rs);
 * keep selectors in lockstep with that source.
 * ========================================================================== */

/* Full-bleed split layout: escapes #spa-root's max-width and padding. */
.spa-auth-layout {
  width: 100vw;
  margin: calc(-1 * var(--gap)) 0 0 calc(50% - 50vw);
  min-height: calc(100vh - 49px);
  display: flex;
  background: var(--auth-bg);
  color: var(--fg);
}

/* ---- brand panel ------------------------------------------------------- */
.spa-auth-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  position: relative;
  overflow: hidden;
}
.spa-auth-brand::before {
  content: "";
  position: absolute;
  top: 15%; left: 10%;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--auth-glow) 0%, transparent 70%);
  pointer-events: none;
}
.spa-auth-brand > * { position: relative; z-index: 1; max-width: 520px; }
.spa-auth-headline {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 10px;
}
.spa-auth-accent {
  background: var(--auth-headline);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.spa-auth-tagline { font-size: 17px; color: var(--fg-dim); margin: 0 0 40px; }

.spa-auth-features {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.spa-auth-feature { display: flex; align-items: flex-start; gap: 14px; }
.spa-auth-feature-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--auth-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--auth-accent) 22%, transparent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.spa-auth-feature h3 { font-size: 14px; font-weight: 600; margin: 0 0 3px; }
.spa-auth-feature p  { font-size: 12px; line-height: 1.5; margin: 0; color: var(--fg-dim); }
.spa-auth-features--mobile { display: none; }

/* ---- auth card --------------------------------------------------------- */
.spa-auth-panel {
  width: 540px;
  min-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
}
.spa-auth-card {
  width: 100%;
  margin: 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.spa-auth-card-title { font-size: 22px; margin: 0 0 6px; text-align: center; }
.spa-auth-card-sub   { font-size: 13px; margin: 0 0 20px; text-align: center; color: var(--fg-dim); }

.spa-auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.spa-auth-tab {
  flex: 1;
  padding: 9px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-dim);
  font-size: 13px;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.spa-auth-tab:hover {
  background: color-mix(in srgb, var(--auth-accent) 15%, transparent);
  color: var(--fg);
  filter: none;
}
.spa-auth-tab[aria-selected="true"] { background: var(--accent); color: var(--accent-fg); }
.spa-auth-pane[hidden] { display: none; }

/* Explanatory strip (top of each pane) and the single status banner. */
.spa-auth-help,
.spa-auth-msg {
  margin: 14px 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  border-left: 3px solid var(--auth-accent);
  background: color-mix(in srgb, var(--auth-accent) 8%, var(--surface-2));
  color: var(--fg-dim);
  font-size: 12px;
  line-height: 1.5;
}
.spa-auth-help--warn,
.spa-auth-msg--info { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--fg); }
.spa-auth-msg--ok   { border-left-color: var(--ok);     background: color-mix(in srgb, var(--ok) 10%, transparent);     color: var(--ok); }
.spa-auth-msg--err  { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.spa-auth-msg--busy { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.spa-auth-msg--busy::before {
  content: "";
  flex-shrink: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--auth-accent) 30%, transparent);
  border-top-color: var(--auth-accent);
  animation: spa-auth-spin .8s linear infinite;
}
@keyframes spa-auth-spin { to { transform: rotate(360deg); } }
.spa-auth-msg[hidden] { display: none; }

/* Fields. */
.spa-auth-field { display: block; margin-bottom: 14px; font-size: 13px; }
.spa-auth-field > span { display: block; margin-bottom: 5px; color: var(--fg-dim); font-weight: 500; }
.spa-auth-field .spa-auth-hint { font-size: 11px; font-weight: 400; margin-top: 4px; opacity: .8; }
.spa-auth-card input,
.spa-auth-card textarea {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 13px;
}
.spa-auth-card input:focus,
.spa-auth-card textarea:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--auth-accent) 18%, transparent);
}
.spa-auth-code {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .2em;
  text-align: center;
  text-transform: uppercase;
}
.spa-auth-code-status { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--fg-dim); }
.spa-auth-code-status--ok  { color: var(--ok); }
.spa-auth-code-status--err { color: var(--danger); }
.spa-auth-code-status[hidden] { display: none; }
.spa-auth-signup-fields[hidden],
.spa-auth-guard[hidden] { display: none; }
.spa-auth-restore-code { font-family: var(--mono); font-size: 12px; min-height: 56px; }
.spa-auth-file { padding: 8px; font-size: 12px; }

.spa-auth-primary {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s, filter .12s;
}
.spa-auth-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent);
}
.spa-auth-link { display: block; margin-top: 12px; text-align: center; font-size: .82rem; }

/* Sign In: capsule list. */
.spa-auth-capsules { margin: 12px 0; max-height: 220px; overflow-y: auto; }
.spa-auth-capsule {
  position: relative;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--surface-2);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.spa-auth-capsule:hover,
.spa-auth-capsule:focus-visible { border-color: color-mix(in srgb, var(--auth-accent) 30%, transparent); }
.spa-auth-capsule.is-selected {
  border-color: var(--auth-accent);
  background: color-mix(in srgb, var(--auth-accent) 12%, transparent);
}
.spa-auth-capsule strong { display: block; font-size: 13px; padding-right: 28px; }
.spa-auth-capsule .did-chip { margin-top: 4px; }
.spa-auth-capsule-hint { margin: 3px 0 0; font-size: 11px; color: var(--fg-dim); }
.spa-auth-capsule-delete {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: .5;
}
.spa-auth-capsule-delete:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  filter: none;
}
.spa-auth-empty { font-size: 12px; color: var(--fg-dim); }

/* Restore: the two options. */
.spa-auth-option { margin-bottom: 18px; }
.spa-auth-option--alt { margin-bottom: 0; padding-top: 18px; border-top: 1px solid var(--border); }
.spa-auth-option-label { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--fg-dim); }
.spa-auth-scan {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 8px auto;
  border-radius: var(--radius);
  border: 3px solid var(--accent);
}
.spa-auth-scan[hidden] { display: none; }

/* Sign Up: the backup step (welcome.html flow, in the shell since 2026-09-04). */
.spa-auth-step[hidden] { display: none; }

/* Welcome page: invite note, step titles */
.spa-auth-invite {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-size: 13px;
  background: var(--bg-input, rgba(0,0,0,.04)); color: var(--fg);
}
.spa-auth-invite[hidden] { display: none; }
.spa-auth-step-title { font-size: 17px; margin: 0 0 10px; }
.spa-auth-backup { text-align: center; }
.spa-auth-rc {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  resize: none;
}
.spa-auth-backup-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
}
.spa-auth-ack { display: block; margin: 12px 0; text-align: left; }
.spa-auth-done { text-align: center; }
.spa-auth-print-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
/* The printable backup sheet: off-screen until print(), then the only thing. */
.spa-auth-print { display: none; }
@media print {
  body * { visibility: hidden !important; }
  .spa-auth-print, .spa-auth-print * { visibility: visible !important; }
  .spa-auth-print {
    display: block !important;
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 24px;
    color: #000;
    background: #fff;
  }
  .spa-auth-print img { width: 240px; height: 240px; display: block; margin: 12px 0; }
}
.spa-auth-backup-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 8px auto;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: #fff;
}

@media (max-width: 900px) {
  .spa-auth-layout { flex-direction: column; }
  .spa-auth-brand { flex: none; padding: 40px 24px 0; }
  .spa-auth-brand::before { display: none; }
  .spa-auth-headline { font-size: 36px; }
  .spa-auth-tagline { margin-bottom: 24px; }
  .spa-auth-brand .spa-auth-features { display: none; }
  .spa-auth-features--mobile {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 500px;
    margin-top: 24px;
  }
  .spa-auth-panel { width: 100%; min-width: unset; max-width: 500px; margin: 0 auto; padding: 20px; }
  .spa-auth-card-title { font-size: 18px; }
}

/* ---- Small screens ----------------------------------------------------- */
@media (max-width: 560px) {
  #spa-root { padding: 12px; }
  body { font-size: 14px; }
  .spa-unlock-card, .spa-restore-card { margin-top: 6vh; border-radius: 0; min-height: calc(100vh - 48px); }
  .spa-auth-layout { margin-top: -12px; }
  .spa-auth-panel { padding: 12px; }
  .spa-auth-card { padding: 22px 18px; }
}

/* Honour reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
 * WELCOME PAGE  (/app/welcome)
 * --------------------------------------------------------------------------
 * A WHOLE SEPARATE DISPLAY, not the auth page wearing a label. Operator
 * 2026-09-05: the signup-code hand-off must land on a page like the original
 * welcome.html (retired 2026-09-04) — its structure, its steps, its styles.
 *
 * 🔴 Colours here are HARDCODED, not tokens, and that is deliberate: the
 * operator ruled the original palette exactly, on every site. This is the one
 * page in the app that does NOT restyle from a site identity sheet. Do not
 * "fix" these into var(--…) — that silently un-does the ruling.
 *
 * Vocabulary is emitted by src/spa/shell/auth.rs (welcome_frame) and
 * src/spa/shell/register.rs (render_welcome_panel); keep in lockstep.
 * ========================================================================== */

/* The page owns the viewport: the app's persistent shell header is hidden
   for the duration (mod.rs clears the class on every other render). */
body.spa-welcome-page > header { display: none; }

/* Full-bleed ground: escapes #spa-root's max-width and padding. */
.spa-welcome {
  width: 100vw;
  margin: calc(-1 * var(--gap)) 0 0 calc(50% - 50vw);
  min-height: 100vh;
  background: linear-gradient(135deg, #0b1220 0%, #1e3a8a 100%);
  color: #dbeafe;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
}
.spa-welcome *, .spa-welcome *::before, .spa-welcome *::after { box-sizing: border-box; }

/* ---- progress rail ----------------------------------------------------- */
.spa-welcome-progress {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 28px 0 28px;
}
.spa-welcome-pip { display: flex; align-items: center; gap: 10px; }
.spa-welcome-pip-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid rgba(30, 58, 138, 0.5);
  background: rgba(6, 16, 37, 0.6);
  color: #64748b;
  transition: all 0.3s;
}
.spa-welcome-pip.is-active .spa-welcome-pip-num { border-color: #2563eb; background: #2563eb; color: #fff; }
.spa-welcome-pip.is-done   .spa-welcome-pip-num { border-color: #10b981; background: #10b981; color: #fff; }
.spa-welcome-pip-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  display: none;
}
.spa-welcome-pip.is-active .spa-welcome-pip-label { color: #bfdbfe; display: block; }
.spa-welcome-pip.is-done   .spa-welcome-pip-label { color: #6ee7b7; display: block; }
.spa-welcome-connector { width: 32px; height: 2px; background: rgba(30, 58, 138, 0.4); }

/* ---- card -------------------------------------------------------------- */
.spa-welcome-card {
  width: 100%;
  max-width: 560px;
  background: rgba(7, 17, 39, 0.95);
  padding: 36px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}
.spa-welcome-card h2 {
  font-size: 26px;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}
.spa-welcome-sub {
  color: #94a3b8;
  font-size: 15px;
  margin: 0 0 24px;
  line-height: 1.6;
}
.spa-welcome-sub strong { color: #bfdbfe; }

/* ---- steps ------------------------------------------------------------- */
.spa-welcome-step { display: none; }
.spa-welcome-step.is-active { display: block; }

/* ---- form -------------------------------------------------------------- */
.spa-welcome-field { display: block; margin-bottom: 16px; font-size: 14px; }
.spa-welcome-field > .spa-welcome-label {
  display: block;
  margin-bottom: 6px;
  color: #93c5fd;
  font-weight: 600;
  font-size: 14px;
}
.spa-welcome-field .spa-welcome-help {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 400;
}
.spa-welcome-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(30, 58, 138, 0.5);
  background: rgba(6, 16, 37, 0.8);
  color: #dbeafe;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.spa-welcome-card input:focus {
  outline: none;
  border-color: #e8a832;
  background: rgba(6, 16, 37, 1);
  box-shadow: 0 0 0 2px rgba(232, 168, 50, 0.15);
}

/* ---- buttons ----------------------------------------------------------- */
.spa-welcome-primary {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: 0;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.spa-welcome-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4); }
.spa-welcome-primary:disabled {
  background: rgba(30, 58, 138, 0.4) !important;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none !important;
  box-shadow: none !important;
}
.spa-welcome-action {
  width: 100%;
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border: 0;
  padding: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.spa-welcome-action:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4); }
.spa-welcome-secondary {
  width: 100%;
  background: rgba(30, 58, 138, 0.3);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}
.spa-welcome-secondary:hover { background: rgba(30, 58, 138, 0.5); transform: translateY(-1px); }
/* The generic `button:hover{filter:…}` primitive is not part of this page's
   original look — the lift + shadow above is. */
.spa-welcome button:hover,
.spa-welcome button:active { filter: none; }

/* ---- messages ---------------------------------------------------------- */
.spa-welcome-msg {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 14px 0;
  font-size: 14px;
  border-left: 3px solid;
  line-height: 1.5;
}
.spa-welcome-msg[hidden] { display: none; }
.spa-welcome-msg--info { background: rgba(8, 47, 73, 0.5);  border-color: #0ea5e9; color: #7dd3fc; }
.spa-welcome-msg--ok   { background: rgba(6, 78, 59, 0.5);  border-color: #10b981; color: #6ee7b7; }
.spa-welcome-msg--err  { background: rgba(69, 10, 10, 0.5); border-color: #ef4444; color: #fca5a5; }
/* Busy is the original's #loading block: centred spinner over its label. */
.spa-welcome-msg--busy {
  border-left-color: transparent;
  background: none;
  text-align: center;
  padding: 20px;
  color: #93c5fd;
  font-size: 15px;
}
.spa-welcome-msg--busy::before {
  content: "";
  display: block;
  border: 3px solid rgba(30, 58, 138, 0.3);
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spa-welcome-spin 0.8s linear infinite;
  margin: 0 auto 12px auto;
}
@keyframes spa-welcome-spin { to { transform: rotate(360deg); } }

/* ---- QR, code block, gate, explainer, divider -------------------------- */
.spa-welcome-qr { text-align: center; margin: 20px 0; }
.spa-welcome-qr img {
  max-width: 240px;
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  margin: 0 auto;
  display: block;
}
.spa-welcome-ios[hidden] { display: none; }
.spa-welcome-code {
  background: rgba(6, 16, 37, 0.9);
  border: 1px solid rgba(30, 58, 138, 0.5);
  padding: 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
  font-size: 11px;
  word-break: break-all;
  white-space: pre-wrap;
  color: #93c5fd;
  margin: 14px 0;
  max-height: 100px;
  overflow-y: auto;
}
.spa-welcome-gate {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  margin-top: 8px;
  margin-bottom: 4px;
}
.spa-welcome-gate.is-done { color: #4ade80; }
.spa-welcome-explainer {
  background: rgba(8, 47, 73, 0.35);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.65;
  color: #94a3b8;
}
.spa-welcome-explainer strong { color: #bfdbfe; }
.spa-welcome-divider { border: none; border-top: 1px solid rgba(30, 58, 138, 0.3); margin: 20px 0; }
.spa-welcome-note { font-size: 14px; color: #64748b; margin: 0 0 14px; line-height: 1.6; }

@media (max-width: 600px) {
  .spa-welcome { padding: 14px; }
  .spa-welcome-card { padding: 26px 20px; }
  .spa-welcome-card h2 { font-size: 22px; }
  .spa-welcome-pip-label { display: none !important; }
}

/* ---- layer 2: boxingclub site identity (overrides layer 1) ---- */
/* ============================================================================
 * The Boxing Club — SITE identity sheet for the PAT SPA (/app/*).
 * Loaded by the node-served shell as /styles/app.css. Layer 1 above is the
 * PAT-wide standard verbatim; this layer carries ONLY the club's identity:
 * chalk ground, glove-leather accent, Archivo (self-hosted, same file the
 * static front uses), and the bc-* family classes from spa/sites/boxingclub/.
 * ========================================================================== */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
:root {
  --sans:      "Archivo", "Helvetica Neue", Arial, sans-serif;
  --bg:        #f4f5f2;   /* chalk */
  --surface:   #ffffff;   /* canvas */
  --surface-2: #eceee9;
  --fg:        #15171a;   /* ink */
  --fg-dim:    #5d626a;
  --border:    #e3e5df;   /* tape */
  --accent:    #8a1c2b;   /* glove leather — the one accent */
  --accent-fg: #ffffff;
  --ok:        #1f7a3f;
  --warn:      #9a6a12;
  --danger:    #a51d2d;
  --radius:    6px;
  --radius-sm: 4px;
  --shadow:    none;
  --bc-narrow: 66%;
  --bc-wide:   120%;
}
/* Branded light identity regardless of OS scheme. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #f4f5f2; --surface: #ffffff; --surface-2: #eceee9;
    --fg: #15171a; --fg-dim: #5d626a; --border: #e3e5df; --accent: #8a1c2b; --shadow: none;
  }
}
body { font-size: 16px; }
body > header { background: var(--bg); border-bottom-color: var(--border); }
/* Club voice: condensed, uppercase display; wide, tracked labels. */
h1, h2, h3 { font-stretch: var(--bc-narrow); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
button, .bc-nav-link {
  font-stretch: var(--bc-wide);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: var(--radius);
}
button:hover { filter: none; background: #6e1522; border-color: #6e1522; }
button.secondary { color: var(--fg); border-color: var(--fg); }
button.secondary:hover { background: var(--fg); color: var(--bg); }
input, select, textarea { border-radius: var(--radius); }
/* ---- Unlock / register / restore cards ---------------------------------- */
.spa-unlock-card, .spa-restore-card {
  max-width: 420px;
  margin-top: 8vh;
  padding: 32px 30px 28px;
  border-top: 6px solid var(--accent);
  border-radius: var(--radius);
}
.spa-unlock-brand {
  font-size: 2.1rem;
  line-height: .95;
  font-stretch: var(--bc-narrow);
  font-weight: 800;
  text-transform: uppercase;
}
.spa-unlock-card h2, .spa-restore-card h2 {
  font-stretch: var(--bc-wide);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.spa-unlock-identity { color: var(--fg); font-size: .95rem; }
.spa-unlock-status { font-size: .9rem; }
.spa-unlock-restore {
  font-size: .85rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.spa-register-field { display: flex; flex-direction: column; gap: 4px; }
.spa-register-field label { font-size: .8rem; font-weight: 600; color: var(--fg-dim); }
.spa-register-accounts { display: grid; gap: 6px; }
.spa-register-account-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.spa-register-guard { display: grid; gap: 6px; }
.spa-register-backup { display: grid; gap: 10px; justify-items: center; text-align: center; }
.spa-register-backup-qr { width: min(260px, 80%); height: auto; border: 1px solid var(--border); background: #fff; padding: 8px; }
.spa-restore-qr { display: grid; gap: 6px; }
.spa-restore-scan { width: 100%; border-radius: var(--radius); background: #000; }
.did-chip { background: var(--surface-2); color: var(--fg); }
/* ---- Family chrome: bc-* (spa/sites/boxingclub + panels/hello) ---------- */
.bc-app-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.bc-app-header h1 { margin: 0; font-size: 1.15rem; font-stretch: var(--bc-wide); letter-spacing: .08em; }
.bc-app-header h1::after { content: ""; }
.bc-app-nav { display: flex; align-items: center; gap: 10px; }
.bc-nav-link {
  padding: 9px 16px;
  border: 1px solid var(--fg);
  color: var(--fg);
  text-decoration: none;
}
.bc-nav-link:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
.bc-hello {
  max-width: 620px;
  padding: 32px 30px;
  border-top: 6px solid var(--accent);
}
.bc-hello h2 { font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: .92; margin: 0 0 14px; }
.bc-hello-who { color: var(--fg); font-size: 1rem; }
.bc-hello-note { color: var(--fg-dim); margin: 0; }
