/* WWTF design tokens, same as survey.wwtf.at */
:root {
  color-scheme: light;
  --brand: #008fd3;
  --brand-dark: #005b94;
  --text: #181715;
  --muted: #4c4c4b;
  --border: #e4e4e3;
  --accent: #e6f4fb;
  --card: #ffffff;
  --page: #f8f8f7;
  --error: #c11624;
  --radius: 6px;
  --button-height: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  font: 16px/1.4 Inter, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.banner { background: var(--text); color: #fff; font-size: 13px; text-align: center; padding: 8px 16px; }
main { width: 100%; max-width: 40rem; margin: 0 auto; padding: 24px 16px 32px; }
main.wide { max-width: 72rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px 20px; position: relative; }
.logo { display: block; height: 32px; margin-left: auto; margin-bottom: 20px; }
.lang { position: absolute; top: 28px; left: 20px; font-size: 14px; }
h1, legend { font-size: 20px; font-weight: 700; line-height: 1.35; margin: 0 0 12px; padding: 0; }
legend { font-size: 16px; margin-bottom: 0; }
.sub { color: var(--muted); font-size: 15px; line-height: 1.45; }
.sub p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.optional { color: var(--muted); font-weight: 400; font-size: 14px; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 16px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.field { display: block; font-size: 15px; font-weight: 600; margin-top: 20px; }
.field input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; min-height: 48px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-weight: 400; color: var(--text); }
.field-error { display: block; color: var(--error); font-size: 14px; font-weight: 400; margin-top: 6px; }
[aria-invalid="true"] { border-color: var(--error) !important; }
fieldset { border: 0; margin: 24px 0 0; padding: 0; min-width: 0; }

.choices { display: grid; gap: 8px; margin-top: 10px; }
.choices.inline { grid-template-columns: 1fr 1fr; margin-top: 0; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; }
.choice:hover { background: var(--accent); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--accent); }
.choice.disabled { color: var(--muted); cursor: not-allowed; background: var(--page); }
.choice.single { margin-top: 24px; }
.choice input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; flex: none; }
.other-input { display: none; width: 100%; padding: 10px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; color: var(--text); }
input:focus-visible, button:focus-visible, a:focus-visible, .choice:has(input:focus-visible) { outline: none; box-shadow: 0 0 0 3px rgba(0, 143, 212, .35); }

.privacy { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.privacy h2 { font-size: 15px; color: var(--text); margin: 0 0 8px; }
.privacy p { margin: 0 0 8px; }

.choices:has(.has-other:checked) .other-input { display: block; }
textarea.other-input { min-height: 88px; resize: vertical; }
.choices.inline .other-input { grid-column: 1 / -1; }
.questions { display: none; }
form:has(.opens-questions:checked) .questions { display: block; }
/* A box hanging off the attendance choice, so the lunch question after it still reads as its own */
.questions { margin: 12px 0 0 12px; padding: 4px 16px 16px; border-left: 3px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent); }
.card .questions h2 { font-size: 15px; margin-top: 12px; color: var(--muted); }
.questions fieldset, .questions .field { margin-top: 16px; }
.questions .choice:has(input:checked) { background: #fff; }
.card h2 { font-size: 17px; margin: 24px 0 0; }
.notice { background: var(--accent); border-radius: var(--radius); padding: 12px 14px; margin: 16px 0; font-size: 15px; }
.contact { color: var(--muted); font-size: 14px; margin: 24px 0 0; }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 24px; }
footer a { color: var(--muted); }

/* Honeypot: off-screen rather than display:none, which some bots skip */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
button, a.button { font: inherit; font-size: 16px; font-weight: 600; height: var(--button-height); padding: 0 24px; border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); margin-left: auto; }
.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.danger { background: #fff; color: var(--error); border: 1px solid var(--error); }
.danger:hover { background: #fdeeee; }
.error-box { color: var(--error); background: #fdeeee; border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; font-size: 14px; }
.check { width: 56px; height: 56px; margin: 8px auto 16px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; }

.events { list-style: none; margin: 8px 0 0; padding: 0; }
.events li { border-top: 1px solid var(--border); padding: 14px 0; }
.events a { display: block; font-size: 17px; font-weight: 600; margin-bottom: 4px; }

/* Admin */
.event-row { border-top: 1px solid var(--border); padding: 16px 0 8px; }
.event-row h2 { font-size: 17px; margin: 0 0 4px; }
.responses { overflow-x: auto; margin-top: 16px; }
table { border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); min-width: 5rem; max-width: 18rem; }
th:first-child, td:first-child { min-width: 0; }
tr.cancelled td { color: var(--muted); text-decoration: line-through; }
tr.waitlist td { background: #fff8e6; }
.bulk { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--border); padding: 4px 0 12px; }
.bulk .nav { justify-content: flex-start; margin-top: 8px; }
form.narrow { max-width: 36rem; }
details.back { flex: 1 1 16rem; }
details.back form { margin-top: 8px; }
td input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.confirm { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 16px; font-size: 14px; }
.status-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0 8px; }
.status-controls form { flex: 1 1 16rem; }
.status-controls .primary { margin-left: 0; }
.status-draft { color: var(--muted); }
.status-open { color: #1a7f37; }
.status-closed { color: var(--error); }
