:root {
  --bg: #f3f5f4; --surface: #fff; --ink: #17211f; --muted: #5b6965; --line: #d9e0de;
  --accent: #1f5f5b; --accent-ink: #fff; --accent-soft: #e2efed;
  --ok: #2e7d4f; --ok-soft: #e3f3e8; --wait: #8a5a00; --wait-soft: #fbf0d9; --bad: #b3261e; --bad-soft: #fbe5e3;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #121816; --surface: #1a2220; --ink: #e6ecea; --muted: #9aa8a4; --line: #2c3734;
  --accent: #6cc3b9; --accent-ink: #0d1a18; --accent-soft: #1d3330;
  --ok: #7fd39d; --ok-soft: #1c3326; --wait: #f0c46a; --wait-soft: #3a2f17; --bad: #ff8a80; --bad-soft: #3a1c1a; color-scheme: dark; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--accent); }
h1, h2 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; } .pre { white-space: pre-wrap; }
.eyebrow { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; flex: none; }
.brand-text { display: grid; }
.bar nav { display: flex; flex-wrap: wrap; gap: 4px; }
.bar nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.bar nav a:hover { background: var(--accent-soft); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 20px; }
.narrow { max-width: 720px; width: 100%; margin: 0 auto; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.stack { display: grid; gap: 12px; } .stack-sm { display: grid; gap: 6px; } .stack-lg { display: grid; gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; } legend { padding: 0; margin-bottom: 6px; }

label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check.inline { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
input, textarea, select { font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; margin: 3px 0 0; accent-color: var(--accent); }
input[type=file] { background: none; border: 1px dashed var(--line); }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.req { color: var(--bad); }
.qlabel { font-weight: 600; font-size: .9rem; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices label { display: flex; align-items: center; gap: 6px; font-weight: 400; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; background: var(--bg); cursor: pointer; }
.choices input { margin: 0; }

.btn { display: inline-block; font: 600 .9rem var(--font); border-radius: 6px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.link { border: 0; background: none; padding: 4px 6px; color: var(--accent); }
.btn.link.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.flash { padding: 10px 14px; border-radius: 8px; background: var(--ok-soft); }
.flash.bad { background: var(--bad-soft); } .flash.wait { background: var(--wait-soft); }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.big { font-size: .85rem; padding: 4px 12px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.wait { background: var(--wait-soft); color: var(--wait); } .pill.bad { background: var(--bad-soft); color: var(--bad); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters input[type=search] { flex: 1; min-width: 160px; width: auto; }
.chip { font-weight: 600; font-size: .8rem; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }

.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { display: grid; gap: 2px; padding: 10px; border-radius: 6px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; } .list li.on { background: var(--accent-soft); }

.empty { padding: 28px 12px; text-align: center; color: var(--muted); display: grid; gap: 6px; }
dl.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; } dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.answer { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.answer .q { font-weight: 600; } .answer .a { white-space: pre-wrap; overflow-wrap: anywhere; }
.linkbox { display: flex; gap: 8px; } .linkbox input { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }

.qrow { display: grid; grid-template-columns: minmax(140px, 220px) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); margin-bottom: 8px; }
.qrow [data-f=label] { grid-column: 1 / -1; }
.qrow .tools { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
@media (max-width: 560px) { .qrow { grid-template-columns: minmax(0, 1fr); } }
details summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.danger-zone[open] summary { margin-bottom: 10px; }

.section-head { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.section-head h3 { margin: 0; font-size: 1.05rem; }
.help { font-weight: 400; display: block; }
.answers-head { margin: 10px 0 0; font-size: 1rem; color: var(--accent); }
.qrow [data-f=help] { grid-column: 1 / -1; font-size: .85rem; }
.job-card { color: var(--ink); text-decoration: none; gap: 8px; }
.job-card:hover { border-color: var(--accent); }
.job-card .btn { justify-self: start; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
