:root {color-scheme:light; --bg:#faf9f6; --fg:#202823; --muted:#515d55; --surface:#fff; --line:#707970; --rule:#d0d4cf; --accent:#176142; --on-accent:#fff; --focus:#176142; --hover:#e7ebe5}
:root[data-theme=dark] {color-scheme:dark; --bg:#17201b; --fg:#edf2ec; --muted:#bac7bd; --surface:#212d25; --line:#8b9a8f; --rule:#49574d; --accent:#a2dfbd; --on-accent:#153123; --focus:#a2dfbd; --hover:#334338}
* {box-sizing:border-box}
body {margin:0;background:var(--bg);color:var(--fg);font:1rem/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
main {width:min(100% - 32px,1100px);margin:28px auto 56px}
header {display:flex;justify-content:space-between;gap:24px;align-items:start;border-bottom:3px solid var(--fg);padding-bottom:20px}
h1 {font-size:clamp(1.7rem,4vw,2.5rem);letter-spacing:-.025em;line-height:1.15;margin:0 0 8px}
h2 {font-size:1.35rem;margin:0 0 12px}
h3 {font-size:1.05rem;margin:28px 0 4px}
p {margin:8px 0 16px}
header p {margin:0;color:var(--muted)}
.instructions {max-width:82ch;margin:24px 0}
section {margin-top:32px;padding-top:22px;border-top:1px solid var(--rule)}
form {display:grid;gap:16px}
label {display:flex;flex-direction:column;gap:6px;font-weight:600;min-width:0}
input,select,button {font:inherit;color:var(--fg);background:var(--surface);min-height:44px;border:1px solid var(--line);border-radius:4px;padding:9px 12px;max-width:100%;min-width:0}
input,select {width:100%}
textarea {width:100%;background:var(--surface);color:var(--fg);border:1px solid var(--line);padding:12px;font:.8rem/1.5 ui-monospace,monospace;resize:vertical}
summary {cursor:pointer;min-height:44px;padding:10px 0;font-weight:600}
button {font-weight:600;cursor:pointer}
button:hover:enabled {background:var(--hover)}
button:disabled {cursor:default;border-style:dashed;color:var(--muted)}
button.primary:disabled {background:var(--surface);border-color:var(--line);color:var(--muted)}
.primary {background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.primary:hover:enabled {background:var(--accent);filter:brightness(.9)}
:focus-visible {outline:3px solid var(--focus);outline-offset:3px}
.theme {width:110px;flex-shrink:0;font-size:.9rem}
.actions {display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.invite {display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-top:22px}
.invite label {flex:1 1 350px;font-size:.9rem}
#invite {font-size:.85rem;font-weight:400}
.note,footer {color:var(--muted);font-size:.9rem}
#feedback:empty,#stats-error:empty {display:none}
#status {font-weight:600;background:var(--surface);padding:14px 16px;border:1px solid var(--line)}
.section-title {display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.section-title h2 {margin:0}
table {width:100%;border-collapse:collapse;font-size:.9rem;table-layout:fixed}
caption {text-align:left;font-weight:600;padding:10px 0}
th,td {padding:10px 8px;text-align:left;vertical-align:top;overflow-wrap:anywhere;border-bottom:1px solid var(--rule)}
th {font-weight:600;border-bottom:2px solid var(--line)}
td small {display:block;color:var(--muted)}
pre {max-height:320px;overflow:auto;font: .8rem/1.6 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--surface);border:1px solid var(--line);padding:14px}
footer {border-top:3px solid var(--fg);margin-top:36px;padding-top:16px}
@media(min-width:650px) {form {grid-template-columns:1fr 1fr}main {margin-top:40px}}
@media(min-width:1000px) {form {grid-template-columns:1.15fr .7fr 1.25fr auto}}
@media(max-width:600px) {
  main {width:calc(100% - 24px)}header {gap:12px}.theme {width:90px}
  table,tbody,tr,td {display:block;width:100%}thead {display:none}tr {padding:12px 0;border-bottom:1px solid var(--line)}
  td {border:0;padding:3px 0;display:grid;grid-template-columns:38% 1fr;gap:10px}
  td::before {content:attr(data-label);font-weight:600}td[colspan] {display:block}
  section {margin-top:26px}.invite button {width:100%}
}
