:root {
  --bg: #fdf8f3;
  --surface: #ffffff;
  --surface-2: #fbf1e8;
  --text: #2b2420;
  --muted: #7b6f66;
  --border: #eadfd5;
  --accent: #f0643c;
  --accent-ink: #ffffff;
  --accent-soft: #fde4da;
  --teal: #1f9d8b;
  --teal-soft: #d8f2ee;
  --yellow: #f3b52f;
  --yellow-soft: #fdf0cf;
  --red: #d9473f;
  --red-soft: #fbe0de;
  --wa: #25d366;
  --shadow: 0 1px 2px rgb(60 30 10 / .05), 0 6px 24px rgb(60 30 10 / .06);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1614;
    --surface: #24201d;
    --surface-2: #2d2824;
    --text: #f3ece6;
    --muted: #a99d93;
    --border: #3a332e;
    --accent: #ff7a52;
    --accent-ink: #1a1614;
    --accent-soft: #4a2a1f;
    --teal: #3cc4af;
    --teal-soft: #1d3b36;
    --yellow: #f5c44f;
    --yellow-soft: #43381c;
    --red: #f06a62;
    --red-soft: #482422;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 24px rgb(0 0 0 / .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Rubik', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h2 { font-size: 1.2rem; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 1.25rem; color: var(--text); }
.topbar nav { display: flex; align-items: center; gap: 14px; font-size: .95rem; }
.topbar nav form { margin: 0; }
.who { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 20px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
  transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn.big { padding: 14px 28px; font-size: 1.05rem; }
.btn.small { padding: 6px 14px; font-size: .88rem; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--red); }
.btn.wa { background: var(--wa); color: #fff; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card.narrow { max-width: 420px; margin: 40px auto; }
.card.form-card { max-width: 680px; margin: 0 auto; }
.card.empty { text-align: center; padding: 48px 22px; }
.card.highlight { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.emoji { font-size: 3rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.big-text { font-size: 1.15rem; }
.hint { color: var(--muted); font-size: .85rem; display: block; margin-top: 4px; font-weight: 400; }

.flash, .error, .warn, .success { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.flash { background: var(--teal-soft); color: var(--text); }
.error { background: var(--red-soft); }
.warn { background: var(--yellow-soft); }
.success { background: var(--teal-soft); font-weight: 600; }

/* forms */
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .95rem; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.add-row input { flex: 1 1 160px; width: auto; }
fieldset.modes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
fieldset.modes legend { font-weight: 500; margin-bottom: 8px; }
label.mode { flex-direction: row; align-items: flex-start; gap: 10px; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; }
label.mode input { width: auto; margin-top: 4px; accent-color: var(--accent); }
label.mode span { display: flex; flex-direction: column; }
label.mode small { color: var(--muted); font-weight: 400; }
label.mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode-fields { display: none; }
.mode-fields.on { display: block; }
details summary { cursor: pointer; color: var(--muted); margin-top: 12px; }
details.bulk form { margin-top: 10px; }

/* landing */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.accent { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step .num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; margin-bottom: 10px; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* dashboard */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 4px 0 2px; }
.page-head p { margin: 0; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.event-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); color: var(--text); transition: transform .15s; }
.event-card:hover { transform: translateY(-2px); text-decoration: none; }
.event-card h3 { margin: 10px 0 2px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress span { display: block; height: 100%; background: var(--teal); }

.pill { display: inline-block; font-size: .8rem; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pill.collecting, .pill.joined { background: var(--yellow-soft); color: var(--text); }
.pill.proposing { background: var(--accent-soft); color: var(--text); }
.pill.confirmed, .pill.ok { background: var(--teal-soft); color: var(--text); }
.pill.bad, .pill.cancelled { background: var(--red-soft); color: var(--text); }

/* event page */
.stepper { list-style: none; display: flex; padding: 0; margin: 0 0 20px; gap: 6px; }
.stepper li { flex: 1; text-align: center; font-size: .85rem; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.stepper li.done { background: var(--teal-soft); color: var(--text); }
.stepper li.now { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }

.people, .date-options, .locs { list-style: none; padding: 0; margin: 0; }
.person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.person:last-child { border-bottom: 0; }
.person-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; }
.person-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.person-actions form { margin: 0; }
.note { font-size: .85rem; color: var(--muted); margin-top: 4px; white-space: pre-line; }

.date-option { padding: 12px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.date-option:last-child { border-bottom: 0; }
.date-option .bar { grid-column: 1 / -1; display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.bar .yes { background: var(--teal); } .bar .maybe { background: var(--yellow); } .bar .no { background: var(--red); }
.date-option .counts { color: var(--muted); }
.date-option .propose { grid-column: 1 / -1; display: flex; gap: 8px; margin: 0; }
.date-option .propose select { flex: 1; padding: 6px 10px; }
.date-option.best .date-label b { color: var(--accent); }
.crown { margin-inline-end: 4px; }

.heat-wrap { overflow-x: auto; margin-top: 10px; }
.heat { border-collapse: separate; border-spacing: 3px; font-size: .78rem; }
.heat th { font-weight: 500; color: var(--muted); white-space: nowrap; padding: 2px 4px; }
.heat tbody th { text-align: start; color: var(--text); }
.heat td { width: 26px; height: 22px; border-radius: 5px; }
.heat td.yes { background: var(--teal); } .heat td.maybe { background: var(--yellow); } .heat td.no { background: var(--red); }

.search-box { background: var(--surface-2); border-radius: 14px; padding: 14px; margin: 10px 0; }
.search-box p { margin: 0 0 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--surface); border: 1.5px solid var(--border); padding: 6px 14px; border-radius: 99px; color: var(--text); font-weight: 500; }
.loc { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.loc img, .loc-ph { width: 72px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; font-size: 1.5rem; }
.loc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.loc form { margin: 0; }

.convo { border-bottom: 1px solid var(--border); padding: 4px 0 8px; }
.convo summary { color: var(--text); }
.bubbles { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; max-height: 360px; overflow-y: auto; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .9rem; white-space: pre-line; }
.bubble.out { align-self: flex-start; background: var(--surface-2); }
.bubble.in { align-self: flex-end; background: var(--teal-soft); }
.bubble time { display: block; font-size: .7rem; color: var(--muted); margin-top: 2px; }
.row-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.card.highlight form { margin: 0 0 10px; }
.danger-zone { display: flex; gap: 10px; justify-content: flex-start; margin-top: 12px; }
.danger-zone form { margin: 0; }

/* address book */
.picker { margin-top: 14px; border: 1.5px solid var(--border); border-radius: 14px; padding: 4px 14px 12px; }
.picker summary { color: var(--text); font-weight: 500; margin-top: 8px; }
.picker form { margin-top: 10px; }
.contact-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.contact-pick { flex-direction: row; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border); font-weight: 400; cursor: pointer; }
.contact-pick:last-child { border-bottom: 0; }
.contact-pick input { width: auto; accent-color: var(--accent); }
.contact-pick span:first-of-type { flex: 1; }
.contact-pick:has(input:checked) { background: var(--accent-soft); border-radius: 8px; }
.picker-actions { display: flex; gap: 8px; }
.contacts { list-style: none; padding: 0; margin: 0 0 8px; }
.contact-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.contact-row > form:last-child { margin: 0; }
.contact-edit { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; margin: 0; }
.contact-edit input { flex: 1 1 140px; width: auto; padding: 7px 10px; }
.contact-meta { display: flex; gap: 6px; align-items: center; }

.btn.mail { background: var(--teal); color: #fff; }
.btn.full { width: 100%; }
.center { text-align: center; }
.contact-line span:empty { display: none; }

/* participant response page */
.respond-head { text-align: center; padding: 8px 0 16px; max-width: 640px; margin: 0 auto; }
.respond-head h1 { margin: 2px 0 6px; }
.respond-head p { margin: 4px 0; }
.respond-form, main > .card.highlight.center, main > section.card.empty { max-width: 640px; margin-left: auto; margin-right: auto; }
.respond-form .card { margin-bottom: 14px; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; margin-top: 10px; }
.day-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.day-label { font-weight: 500; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 99px; padding: 3px; gap: 2px; flex: none; }
.seg-opt { flex-direction: row; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt span { display: grid; place-items: center; width: 38px; height: 32px; border-radius: 99px; filter: grayscale(1); opacity: .45; transition: all .12s; }
.seg-opt input:checked + span { filter: none; opacity: 1; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
.seg-opt.no input:checked + span { background: var(--red-soft); }
.seg-opt.maybe input:checked + span { background: var(--yellow-soft); }
.seg-opt.yes input:checked + span { background: var(--teal-soft); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); }
.loc-vote { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.answer-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.hint.center { max-width: 640px; margin: 14px auto; }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 24px 16px 28px; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 10px; }
.site-footer nav a { color: var(--muted); font-size: .92rem; }
.site-footer nav a:hover { color: var(--accent); }
.copyright { margin: 0; color: var(--muted); font-size: .82rem; }

/* content pages */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.15rem; margin-top: 1.4em; }
.prose p, .prose li { line-height: 1.7; }
.prose ul { padding-inline-start: 1.2em; }
.lead-text { font-size: 1.1rem; }
.how-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.how-steps li { counter-increment: step; position: relative; padding-inline-start: 52px; margin-bottom: 18px; }
.how-steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 2px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.how-steps h2 { margin: 0 0 4px; }
/* Honeypot: invisible to people, still in the form for bots. Clipped in place rather than pushed
   off-screen, because a far-left offset becomes scrollable on right-to-left pages. */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* password rules checklist */
.pw-rules { list-style: none; padding: 0; margin: -6px 0 0; color: var(--muted); }
.pw-rules li::before { content: '○'; display: inline-block; width: 1.4em; }
.pw-rules li.ok { color: var(--teal); }
.pw-rules li.ok::before { content: '✓'; }

/* sign-in */
.btn.google { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); gap: 10px; }
.btn.google:hover { background: var(--surface-2); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.card.narrow.center form { margin: 12px 0; }

/* date options */
fieldset.modes.two { grid-template-columns: repeat(2, 1fr); }
.option-dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 10px; }
.days.options { grid-template-columns: 1fr; }
.days.options .day-row { padding: 10px 0; }

/* language menu */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 99px; color: var(--muted); white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: var(--surface-2); color: var(--text); }
.lang-list { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 140px; z-index: 20; }
.lang-list a { padding: 8px 12px; border-radius: 8px; color: var(--text); }
.lang-list a:hover { background: var(--surface-2); text-decoration: none; }
.lang-list a[aria-current] { font-weight: 600; color: var(--accent); }

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .row, fieldset.modes, .steps { grid-template-columns: 1fr; }
  .stepper li { font-size: .72rem; }
  .who { display: none; }
  .topbar { padding: 12px 16px; }
  .card { padding: 18px 16px; }
}
