:root, :root[data-scheme="light"] {
  --background: #2b5f8a;
  --backdrop: linear-gradient(160deg, var(--background), #6aa7c9);
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #61707d;
  --line: #d9e0e6;
  --field: #7b8794;
  --accent: #1f6fb2;
  --danger: #b42318;
  /* The theme's other tokens (see THEMES.md), as the plain theme has them. */
  --radius: 6px;
  --border: 1px;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f2233;
    --backdrop: linear-gradient(160deg, var(--background), #24435c);
    --surface: #1c252e;
    --text: #e3e8ec;
    --muted: #93a1ad;
    --line: #34424f;
    --field: #6b7d8f;
    --accent: #5aa9e6;
    --danger: #f97066;
  }
}
/* The scheme the user chose, over the browser's (THEMES.md, "Choosing"). */
:root[data-scheme="dark"] {
  --background: #0f2233;
  --backdrop: linear-gradient(160deg, var(--background), #24435c);
  --surface: #1c252e;
  --text: #e3e8ec;
  --muted: #93a1ad;
  --line: #34424f;
  --field: #6b7d8f;
  --accent: #5aa9e6;
  --danger: #f97066;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 16px;
  padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  font: 100%/1.5 var(--font-body);
  color: var(--text); background: var(--backdrop) fixed;
}
body.backdrop { background: url("/branding/background") center / cover fixed, var(--background); }
.card {
  width: min(100%, 380px); padding: 24px; border-radius: calc(var(--radius) * 2);
  background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.brand { text-align: center; margin-bottom: 16px; }
.brand img { max-width: 100%; max-height: 120px; }
.brand h1 { margin: 8px 0 0; font-size: 1.4rem; }
.stack { display: grid; grid-gap: 12px; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.row > * { margin: 0 8px 8px 0; }
label { display: grid; grid-gap: 4px; gap: 4px; color: var(--muted); }
input, select {
  padding: 8px 10px; border: var(--border) solid var(--field); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit;
}
button {
  padding: 9px 14px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
button[disabled] { opacity: .55; cursor: default; }
button.quiet { background: transparent; color: var(--accent); padding-left: 0; }
.error { color: var(--danger); font-weight: 600; }
.error:empty { display: none; }
.notice { color: var(--accent); font-weight: 600; }
button.secondary { background: transparent; color: var(--accent); border: var(--border) solid var(--accent); }
h2 { font-size: 1.15rem; margin: 8px 0; }
h3 { font-size: 1rem; margin: 0 0 8px; }
.terms { max-height: 40vh; overflow: auto; padding: 12px; border: var(--border) solid var(--line); border-radius: var(--radius); }
.terms > :last-child { margin-bottom: 0; }
pre.text { white-space: pre-wrap; font: .9rem/1.4 var(--font-text); margin: 0; }
label.check { display: flex; align-items: center; color: var(--text); }
label.check input { margin: 0 8px 0 0; }
.passkeys ul { margin: 0 0 8px; padding-left: 20px; }
.aside { color: var(--muted); font-size: .9rem; text-align: center; }
.sessions { list-style: none; margin: 0; padding: 0; display: grid; grid-gap: 8px; gap: 8px; }
.sessions button { width: 100%; text-align: left; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
