:root {
  --bg: #f4f5f7; --surface: #fff; --text: #1c2330; --muted: #5d6778; --line: #d9dde4;
  --accent: #1f5fbf; --accent-text: #fff; --danger: #b3261e; --ok-bg: #e6f4ea; --ok-text: #185c2b;
  --err-bg: #fdecea; --err-text: #8c1d18; --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12151a; --surface: #1b2028; --text: #e7eaf0; --muted: #a0a9b8; --line: #323a47;
    --accent: #6ea4f4; --accent-text: #0d1524; --danger: #f2877f; --ok-bg: #173522; --ok-text: #a8e0b8;
    --err-bg: #40191a; --err-text: #f6b5b0; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
header.top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .75rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .brand { font-weight: 700; text-decoration: none; color: var(--text); margin-right: auto; }
header.top nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
header.top form { margin: 0; }
main { max-width: 26rem; margin: 2.5rem auto; padding: 0 1rem; }
main.wide { max-width: 64rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); font-size: .9rem; }
label { display: block; font-weight: 600; margin: 0 0 .25rem; font-size: .92rem; }
label.check { font-weight: 400; display: flex; gap: .5rem; align-items: baseline; margin-bottom: .4rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .55rem .65rem; margin-bottom: 1rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
textarea { min-height: 5rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, .button { display: inline-block; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  color: var(--accent-text); background: var(--accent); border: 1px solid var(--accent); border-radius: 6px; }
button.secondary, .button.secondary { color: var(--text); background: transparent; border-color: var(--line); }
button.danger { color: var(--danger); background: transparent; border-color: var(--danger); }
button.link { background: none; border: none; color: var(--accent); padding: 0; font-weight: 400; text-decoration: underline; }
button.block { width: 100%; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.notice, .error { padding: .7rem .9rem; border-radius: 6px; margin-bottom: 1rem; }
.notice { background: var(--ok-bg); color: var(--ok-text); }
.error { background: var(--err-bg); color: var(--err-text); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td form { margin: 0; }
.tag { display: inline-block; padding: 0 .45rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; color: var(--muted); }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
.secret { display: block; padding: .8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 1rem; user-select: all; }
.codes { columns: 2; list-style: none; padding: 0; margin: 0 0 1rem; }
.codes li { font-family: ui-monospace, Menlo, Consolas, monospace; padding: .15rem 0; }
.qr { display: block; margin: 0 auto 1rem; background: #fff; padding: 8px; border-radius: 6px; max-width: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
.subnav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.head h1 { margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 1rem; padding: .75rem 1rem; }
legend { font-weight: 600; font-size: .92rem; padding: 0 .3rem; }
ul.plain { margin: 0 0 1rem; padding-left: 1.2rem; }
details { margin-bottom: 1rem; }
