:root {
  --bg: #f7f8fa; --surface: #fff; --text: #172033; --muted: #5b6475; --line: #d9dde5; --accent: #2457d6; --accent-text: #fff;
  --ok: #17703a; --ok-bg: #e4f4ea; --warn: #8a5300; --warn-bg: #fff1d6; --bad: #a3231a; --bad-bg: #fde7e4; --focus: #ffb000;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f141d; --surface: #171e2b; --text: #e8ecf3; --muted: #9aa5b8; --line: #2b3548; --accent: #7aa2ff; --accent-text: #0b1220;
    --ok: #6fd695; --ok-bg: #12301f; --warn: #ffc766; --warn-bg: #33270d; --bad: #ff8f84; --bad-bg: #3a1714; }
}
* { box-sizing: border-box; }
html { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--text); } .brand span { font-weight: 400; color: var(--muted); }
.top nav { display: flex; gap: 4px 16px; flex-wrap: wrap; } .top nav a { text-decoration: none; padding: 4px 0; color: var(--text); border-bottom: 2px solid transparent; }
.top nav a[aria-current] { border-bottom-color: var(--accent); font-weight: 600; }
.top .lang { margin-left: auto; display: flex; gap: 10px; } .top .lang a { text-decoration: none; font-size: .85rem; color: var(--muted); }
main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 24px 20px 48px; }
footer { padding: 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 20px; }
h1 { font-size: 1.6rem; margin: 0 0 16px; } h2 { font-size: 1.15rem; margin: 28px 0 10px; }
.narrow { max-width: 460px; } .narrow.wide { max-width: 640px; }
.stack > * + * { margin-top: 14px; } .row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], select, textarea { width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.field.has-error input { border-color: var(--bad); }
.checkbox { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: start; } .checkbox label { font-weight: 400; margin: 0; } .checkbox p { grid-column: 2; }
.checkbox input { margin-top: 5px; width: 18px; height: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 16px; } legend { font-weight: 600; padding: 0 6px; }
button, .button { display: inline-block; padding: 10px 18px; font: inherit; font-weight: 600; color: var(--accent-text); background: var(--accent); border: 1px solid var(--accent); border-radius: 6px; cursor: pointer; text-decoration: none; }
button.secondary, .button.secondary { color: var(--accent); background: transparent; }
button.danger, .button.danger { color: #fff; background: var(--bad); border-color: var(--bad); }
@media (prefers-color-scheme: dark) { button.danger, .button.danger { color: #1a0a08; } }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 400; text-decoration: underline; }
form.inline { display: inline; } .inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; } .inline-form select { width: auto; }
.error { color: var(--bad); font-weight: 600; margin: 4px 0; } .hint { color: var(--muted); font-size: .9rem; margin: 6px 0; } .hint.warn { color: var(--warn); }
.aside { margin-top: 20px; color: var(--muted); } .crumb { margin: 0 0 8px; }
.flash, .notice { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--warn-bg); color: var(--text); margin: 0 0 16px; }
.flash { background: var(--ok-bg); } .notice.bad { background: var(--bad-bg); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; } .card h2 { margin: 0 0 6px; font-size: .9rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.big { font-size: 1.8rem; font-weight: 700; margin: 0; line-height: 1.2; } .of { color: var(--muted); font-size: 1rem; font-weight: 400; }
progress { width: 100%; height: 10px; margin-top: 8px; accent-color: var(--accent); }
.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); } th { font-size: .85rem; color: var(--muted); } .num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--line); color: var(--text); }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-bad { background: var(--bad-bg); color: var(--bad); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; word-break: break-all; } .select-all { user-select: all; }
code.secret { display: block; padding: 10px 12px; background: var(--surface); border: 1px dashed var(--accent); border-radius: 6px; }
pre { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; } pre code { word-break: normal; }
dl.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; align-items: baseline; } dl.keys dt { font-weight: 600; } dl.keys dd { margin: 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; } .tabs a { padding: 8px 0; text-decoration: none; color: var(--text); border-bottom: 2px solid transparent; margin-bottom: -1px; } .tabs a[aria-current] { border-bottom-color: var(--accent); font-weight: 600; }
.chart { margin: 8px 0 16px; } .chart svg { width: 100%; height: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; } .chart .bar { fill: var(--accent); } .chart .axis { stroke: var(--line); stroke-width: 1; } .chart figcaption { color: var(--muted); font-size: .85rem; }
.qr { width: 220px; height: 220px; background: #fff; padding: 6px; margin: 10px 0; border-radius: 6px; } .qr svg { width: 100%; height: 100%; }
.codes { list-style: none; padding: 0; columns: 2; } .codes li { margin: 4px 0; font-size: 1.1rem; }
.steps li { margin-bottom: 14px; } details { margin: 8px 0 16px; }
@media (max-width: 600px) { .row { display: block; } dl.keys { grid-template-columns: 1fr; } }
