/**
 * Design tokens lifted directly from apps/mobile/src/ui/tokens.ts
 * (seraTokens) -- not re-picked for the web. `display` is Frank Ruhl
 * Libre Medium, matching tokens.ts's own doc comment ("No Instrument
 * Serif anywhere"). `--font-sans: Inter` is Michael's explicit
 * instruction for this site (message in the Sera MCP go-live thread,
 * 2026-10-08); the app itself no longer loads Inter -- tokens.ts's
 * `sans` resolved to the platform system font after the 2026-09-08
 * font-collapse pass. That's a deliberate difference for this
 * standalone site, not a drift from the app.
 */
:root {
  --color-wash: #dceff6; /* seraTokens.color.wash */
  --color-surface: #ffffff; /* seraTokens.color.surface */
  --color-surface-border: #eef0f2; /* seraTokens.color.surfaceBorder */
  --color-ink: #1a1a1a; /* seraTokens.color.ink */
  /* #5b6470, not seraTokens.color.mutedInk (#6f747c) -- the governing
     V5 board for this site (round-2 1R15-0/1RF7-0/1R9F-0 spec panels)
     gives this exact literal for web body copy; same deliberate
     per-site deviation as --font-sans below. */
  --color-muted-ink: #5b6470;
  --color-caption: #8a94a0; /* board literal, privacy page "Last updated" + footer */
  --color-working: #1e8fae; /* seraTokens.color.working */
  --color-failed: #b3261e; /* seraTokens.color.failed */
  --color-primary-text: #ffffff; /* seraTokens.color.primaryText */
  --gradient-primary: linear-gradient(90deg, #3db0d6, #2a93b8); /* seraTokens.color.primaryGradient */
  --gradient-wash: linear-gradient(180deg, var(--color-wash) 0%, #ffffff 520px); /* board: full-page wash fading to white, not a white card */
  --shadow-primary: 0 8px 20px rgba(46, 159, 196, 0.25); /* seraTokens.color.primaryShadow */
  --radius-surface: 16px; /* seraTokens.radius.surface */
  --radius-control: 12px; /* seraTokens.radius.control */
  --border-surface: 1px; /* seraTokens.border.surface */
  --touch-minimum: 44px; /* seraTokens.touch.minimum */
  --font-display: 'Frank Ruhl Libre', serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--gradient-wash);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  padding: 48px 0 32px;
}

.wordmark {
  display: block;
  width: 84px;
  height: auto;
  margin: 0 auto 32px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  line-height: 34px;
  color: var(--color-ink);
  margin: 0 0 8px;
  text-align: left;
}

p {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  color: var(--color-muted-ink);
  margin: 0 0 16px;
  text-align: left;
}

label {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-ink);
  margin-bottom: 6px;
}

input {
  display: block;
  width: 100%;
  background: var(--color-surface);
  border: var(--border-surface) solid var(--color-surface-border);
  border-radius: var(--radius-control);
  padding: 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-ink);
  margin-bottom: 16px;
}

input::placeholder {
  color: var(--color-muted-ink);
}

button {
  display: block;
  width: 100%;
  min-height: var(--touch-minimum);
  border: none;
  border-radius: var(--radius-control);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-primary);
  color: var(--color-primary-text);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 8px;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Deny, board 1R15-0: same outlined pill as Allow, not a text link. */
button.secondary {
  background: var(--color-surface);
  border: var(--border-surface) solid var(--color-surface-border);
  box-shadow: none;
  color: var(--color-ink);
  font-weight: 600;
}

/* Change / Resend code / Get a new code / Not you? Sign out --
   compact inline text, never the full-width pill `button` default. */
button.link-button {
  display: inline;
  width: auto;
  min-height: auto;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  color: var(--color-working);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
}

button.link-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-surface);
  border: var(--border-surface) solid var(--color-surface-border);
  border-radius: var(--radius-control);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--color-ink);
}

.code-boxes {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* Board 1R5D-0 spec panel item 7: 48 x 56, radius 12, hairline
   #EEF0F2 (--color-surface-border), active box Snap blue. */
.code-box {
  width: 48px;
  height: 56px;
  padding: 0;
  margin-bottom: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  border-radius: var(--radius-control);
  border: var(--border-surface) solid var(--color-surface-border);
  background: var(--color-surface);
  color: var(--color-ink);
}

.code-box:focus {
  outline: none;
  border-color: var(--color-working);
}

.resend-row {
  margin-top: -4px;
}

.signed-in-footer {
  text-align: center;
  margin-top: 24px;
}

h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 17px;
  line-height: 24px;
  color: var(--color-ink);
  margin: 32px 0 8px;
  text-align: left;
}

.caption {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-caption);
  margin: -8px 0 24px;
}

.page-footer {
  text-align: center;
  font-size: 13px;
  color: var(--color-caption);
  margin-top: 32px;
  padding-top: 24px;
  border-top: var(--border-surface) solid var(--color-surface-border);
}

.page-footer a {
  color: var(--color-caption);
}

[role='alert'] {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-failed);
  text-align: center;
  margin: -4px 0 16px;
}

[role='alert']:empty {
  display: none;
  margin: 0;
}

/* B13-MCP-003, board 1R15-0 (amended 9 Nov): return host, warnings and
   scope disclosure -- one grey line each under the scope sentence,
   Inter 13/18 #8A94A0. */
.consent-note {
  font-size: 13px;
  line-height: 18px;
  color: var(--color-caption);
  margin: -8px 0 16px;
}

/* B13-MCP-003 (Fizz, 10 Nov): every element that shows the client's name is
   isolated from the surrounding text's direction, as a second layer behind
   sanitiseClientName, which already removes every bidi control. */
.shows-client-name {
  unicode-bidi: isolate;
}
