/* A small, deliberately plain stylesheet.

   Everything here is one column of readable text with a few affordances. The
   site's job is to answer "when is it and who is coming" quickly on a phone,
   and colours follow the reader's own light/dark preference rather than
   imposing one. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --border: #ddd8d0;
  --ink: #1d1b18;
  --muted: #6a655d;
  --accent: #2f6f4f;
  --accent-ink: #ffffff;
  --danger: #9b2c2c;
  --off: #8a8177;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151a;
    --surface: #1e1d23;
    --border: #34323b;
    --ink: #eceaf0;
    --muted: #a29daa;
    --accent: #7bbd97;
    --accent-ink: #10241a;
    --danger: #f08a8a;
    --off: #7c7686;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 1.5rem 1rem 4rem;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main, header.site, footer.site { max-width: 46rem; margin-left: auto; margin-right: auto; }

h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .35rem; }
p { margin: .4rem 0; }

a { color: var(--accent); }
a:hover { text-decoration: none; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lede { color: var(--muted); margin-bottom: 1.25rem; white-space: pre-wrap; }

ul.occurrences { list-style: none; margin: 1rem 0 0; padding: 0; }

li.occurrence {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .75rem;
  padding: .8rem .9rem;
  margin-bottom: .5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

li.occurrence .when { font-weight: 600; }
li.occurrence .event-name { flex: 1 1 8rem; }
li.occurrence .count { color: var(--muted); font-size: .9rem; }
li.occurrence .join {
  font-weight: 600; font-size: .9rem; text-decoration: none;
  padding: .15rem .5rem; border: 1px solid var(--accent); border-radius: 6px;
}
li.occurrence .join:hover { background: var(--accent); color: var(--accent-ink); }
li.occurrence .note { flex-basis: 100%; color: var(--muted); font-size: .9rem; }
li.occurrence form { display: flex; gap: .4rem; align-items: center; margin: 0; }

li.occurrence.cancelled { opacity: .65; }
li.occurrence.cancelled .when { text-decoration: line-through; }

.badge {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
  padding: .1rem .4rem; border-radius: 4px;
  background: var(--danger); color: #fff;
}
.badge.quiet { background: var(--off); }
.badge.live { background: var(--accent); color: var(--accent-ink); }

button, .button {
  font: inherit;
  padding: .35rem .8rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--muted); border-color: var(--border); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button:hover { filter: brightness(1.08); }

input[type=text], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], select, textarea {
  font: inherit;
  padding: .35rem .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  max-width: 100%;
}
input.alias { width: 9rem; }
textarea { width: 100%; min-height: 5rem; }

label { display: block; margin: .8rem 0 .2rem; font-weight: 600; font-size: .9rem; }
label.inline { display: inline; font-weight: normal; margin: 0; }
.field-hint { color: var(--muted); font-size: .85rem; margin: .15rem 0 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

form.set-link { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .75rem 0 0; }
form.set-link input[type=text] { flex: 1 1 18rem; }

.subscribe { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.subscribe code {
  font-size: .8rem; word-break: break-all;
  background: var(--bg); padding: .2rem .35rem; border-radius: 4px;
}
/* The notes below the buttons take a row of their own. This lives here rather
   than in a style attribute because the site's content policy allows no inline
   style, which silently dropped it and left the notes wrapping in beside the
   buttons. */
.subscribe .field-hint { flex-basis: 100%; }

.error {
  border-left: 3px solid var(--danger);
  padding: .5rem .75rem;
  margin: .5rem 0;
  color: var(--danger);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
}

.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.actions form { margin: 0; }

table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

header.site {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1.5rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
header.site .brand { font-weight: 600; color: var(--ink); text-decoration: none; }

footer.site { margin-top: 3rem; color: var(--muted); font-size: .85rem; }
