/* Design tokens (see docs/DESIGN.md). Checked by `npm run contrast:check`. */
:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #14181f;
  --muted: #4a5565;
  --border: #c9ced6;
  --field-border: #6b7686;
  --accent: #e69f00;
  --on-accent: #000000;
  --link: #005a8c;
  --good: #006b4f;
  --bad: #a83f00;
  --focus: #0072b2;
  --radius: 12px;
  --gap: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1318;
    --surface: #1a2028;
    --text: #eef1f5;
    --muted: #aab3c0;
    --border: #36404d;
    --field-border: #8a94a3;
    --accent: #e69f00;
    --on-accent: #000000;
    --link: #56b4e9;
    --good: #4fd1a5;
    --bad: #ff9a5c;
    --focus: #56b4e9;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#app { max-width: 720px; margin: 0 auto; padding: 24px var(--gap) 48px; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 16px; }
.small { font-size: 14px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--gap);
  margin: 0 0 var(--gap);
}
label { display: block; font-weight: 600; margin: 0 0 6px; }
input[type="email"], input[type="password"], input[type="text"], input[type="tel"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--field-border);
  border-radius: 10px;
}
input.code { font-size: 24px; letter-spacing: 0.15em; text-align: center; font-variant-numeric: tabular-nums; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 2px solid var(--field-border);
  border-radius: 10px;
  cursor: pointer;
}
button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--on-accent); }
button[disabled] { opacity: 0.55; cursor: default; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.stack > * + * { margin-top: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.error { color: var(--bad); font-weight: 600; margin-top: 12px; }
.error:empty { display: none; }
.secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
  padding: 12px;
  border: 2px dashed var(--field-border);
  border-radius: 10px;
  background: var(--bg);
  user-select: all;
}
.qr { display: block; width: 200px; height: 200px; background: #ffffff; padding: 8px; border-radius: 8px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--gap); }
header.top .brand { font-weight: 700; font-size: 18px; }
nav.tabs { display: flex; gap: 8px; margin: 0 0 var(--gap); }
nav.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  min-height: 44px;
  text-decoration: none;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
}
nav.tabs a[aria-current="page"] { border-color: var(--text); }
.empty { text-align: center; padding: 32px var(--gap); }
.empty .big { font-size: 32px; font-weight: 700; margin: 0 0 8px; }
dl.health { margin: 0; }
dl.health .item { padding: 12px 0; border-top: 1px solid var(--border); }
dl.health .item:first-child { border-top: 0; }
dl.health dt { font-weight: 600; }
dl.health dd { margin: 2px 0 0; }
.status-ok { color: var(--good); font-weight: 600; }
.status-bad { color: var(--bad); font-weight: 600; }
.status-none { color: var(--muted); font-weight: 600; }
@media (min-width: 900px) {
  #app { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
