:root {
  --bg: #ffffff; --surface: #f4f6f9; --text: #14213d; --muted: #5b667a; --line: #dfe4ec;
  --brand: #0b5fff; --brand-ink: #ffffff; --ok: #16794c; --warn: #b45309; --bad: #b91c1c;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1220; --surface: #161d30; --text: #e8ecf5; --muted: #9aa6bd; --line: #26304a;
    --brand: #6ea0ff; --brand-ink: #0d1220; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
header.site .logo { font-weight: 700; color: var(--text); text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--text); }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin: 40px 0 12px; }
h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: var(--radius); padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn:disabled { opacity: .6; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow-x: auto; }
label { display: block; font-weight: 600; margin: 14px 0 4px; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=date], select, textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin-top: 16px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.msg.ok { border-color: var(--ok); } .msg.err { border-color: var(--bad); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid currentColor; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--bad); }
.card .stat, .stat { font-size: 1.8rem; font-weight: 700; margin: 0; color: var(--text); }
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--brand); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 8px; }
.chart div { flex: 1; min-width: 4px; background: var(--brand); border-radius: 3px 3px 0 0; }
footer.site { border-top: 1px solid var(--line); margin-top: 56px; padding: 20px 0 32px; color: var(--muted); font-size: .9rem; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
