:root {
  --brand: #0075fc;
  --ink: #14181f;
  --muted: #5b6573;
  --line: #d9dee5;
  --bg: #f4f6f9;
  --card: #ffffff;
  --danger-bg: #fdecec;
  --danger-ink: #8a1c1c;
  --brand-ink: var(--brand);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ebf0;
    --muted: #a3acb9;
    --line: #2c333d;
    --bg: #0f1216;
    --card: #171b21;
    --danger-bg: #3a1a1a;
    --danger-ink: #ffb4b4;
    /* Small brand-colored text on a dark card fails contrast for most brand colors. */
    --brand-ink: color-mix(in srgb, var(--brand), white 50%);
  }
}
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: var(--bg); color: var(--ink); padding: 16px; }
.card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 12px; padding: 28px 24px 20px; }
header { margin-bottom: 8px; }
.product { margin: 0; font-weight: 700; color: var(--brand-ink); letter-spacing: .01em; }
.company { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
h1 { font-size: 1.4rem; margin: 12px 0 16px; }
p { line-height: 1.5; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input { font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; min-height: 44px; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
button { font: inherit; font-weight: 700; min-height: 44px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; cursor: pointer; }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.alert { background: var(--danger-bg); color: var(--danger-ink); padding: 10px 12px; border-radius: 8px; }
.alt { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.alt summary { cursor: pointer; color: var(--muted); }
.alt form { margin-top: 12px; }
.minor { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
#passkey-signin { width: 100%; margin-bottom: 14px; }
.codes { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; columns: 2; padding: 12px 12px 12px 32px; border: 1px dashed var(--line); border-radius: 8px; }
.qr { display: block; width: 200px; height: 200px; margin: 8px auto; background: #fff; padding: 8px; border-radius: 8px; }
.qr svg { width: 100%; height: 100%; display: block; }
.notice { background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 10px 12px; border-radius: 8px; }
.secret { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.rows { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.rows form button { min-height: 36px; padding: 0 12px; }
section + section { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
h2 { font-size: 1.05rem; margin: 0 0 8px; }
.apps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.apps a { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; }
.apps small { display: block; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; color: var(--muted); font-size: .8rem; }
footer a, a { color: var(--brand-ink); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { min-height: 0; }
.card-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
legend { font-weight: 600; margin-bottom: 4px; }
