:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1b2430; --muted: #566274; --border: #d5dbe3;
  --accent: #0b5cad; --accent-text: #ffffff; --ok: #1a7f37; --warn-bg: #fff4d6; --warn-text: #6b4a00;
  --err-bg: #fde8e8; --err-text: #8a1c1c; --focus: #1a73e8; --code-bg: #eef1f5;
}
:root[data-theme="dark"] {
  --bg: #0f141a; --surface: #182029; --text: #e6ebf1; --muted: #9aa7b8; --border: #2e3946;
  --accent: #5aa9f5; --accent-text: #08121d; --ok: #4cc26a; --warn-bg: #3a2f10; --warn-text: #f2d48a;
  --err-bg: #3d1a1a; --err-text: #ffb4b4; --focus: #8ab4f8; --code-bg: #0c1117;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --surface: #182029; --text: #e6ebf1; --muted: #9aa7b8; --border: #2e3946;
    --accent: #5aa9f5; --accent-text: #08121d; --ok: #4cc26a; --warn-bg: #3a2f10; --warn-text: #f2d48a;
    --err-bg: #3d1a1a; --err-text: #ffb4b4; --focus: #8ab4f8; --code-bg: #0c1117;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, "Segoe UI", Roboto, sans-serif; }
main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
header { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.lead { margin: 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin: 0 0 1rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .4rem 0; }
code { background: var(--code-bg); padding: .05rem .3rem; border-radius: 4px; font-size: .9em; }
button, .btn { display: inline-block; font: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .5rem .9rem; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; }
button:disabled { opacity: .55; cursor: default; }
input[type=text], input[type=password], select { width: 100%; font: inherit; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); min-width: 0; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }
label.btn { color: var(--text); font-size: 1rem; margin: 0; }
label.check { display: flex; gap: .5rem; align-items: center; color: var(--text); font-size: .9rem; margin: .6rem 0; }
button.danger { color: var(--err-text); border-color: var(--err-text); }
select.grow { flex: 1 1 14rem; width: auto; }
.subcard { margin-top: .6rem; padding: .75rem; border: 1px dashed var(--border); border-radius: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem 1rem; }
.grid .wide { grid-column: 1 / -1; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.status { color: var(--muted); }
.err { background: var(--err-bg); color: var(--err-text); padding: .6rem .8rem; border-radius: 6px; margin: .75rem 0 0; }
pre { margin: .75rem 0 0; padding: .75rem; min-height: 8rem; max-height: 28rem; overflow: auto; background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; font: .85rem/1.45 Consolas, "SF Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
footer { color: var(--muted); font-size: .85rem; margin-top: 1.5rem; }
[hidden] { display: none !important; }
