:root {
  --bg: #282530;
  --panel: #322f3c;
  --line: #4a4658;
  --text: #ffffff;
  --muted: #b9b5c6;
  --accent: #d0596b;
  --accent-soft: rgba(208, 89, 107, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.site-header { text-align: center; padding: 56px 16px 0; }

.wordmark {
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
}

main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  text-align: center;
}

body.wide main { max-width: 1120px; }

section { margin: 48px 0; }

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 20px; text-wrap: balance; }
h1 { font-size: clamp(36px, 8vw, 58px); }
h2 { font-size: 24px; }
h3 { font-size: 18px; }

.hero { margin-top: 40px; }
.hero h1 { margin-bottom: 40px; }

ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }

.quiet { color: var(--muted); font-size: 14px; margin-top: 24px; }

/* Buttons */
.cta, button.cta {
  display: inline-block;
  padding: 22px 36px 22px 32px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-right: 5px solid var(--accent);
  border-bottom: 5px solid var(--accent);
  cursor: pointer;
  transition: background 0.15s;
}
.cta::before { content: "›"; color: var(--accent); font-size: 22px; line-height: 0; margin-right: 24px; letter-spacing: 0; vertical-align: -2px; }
.cta:hover { background: var(--accent-soft); color: var(--text); }

.flash {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  margin: 16px 0;
  text-align: left;
}
.flash-ok { border-color: var(--line); background: var(--panel); }

/* Forms */
form.stack { text-align: left; display: grid; gap: 28px; margin-top: 32px; }

.field label, .field legend { display: block; font-weight: 600; margin-bottom: 4px; padding: 0; }
.field .hint { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.field .req { color: var(--accent); }
.field fieldset, fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }

input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 2px;
  font: inherit;
  line-height: 1.5;
}
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[type="file"] { font: inherit; color: var(--muted); max-width: 100%; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 300; margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}
.choices input { accent-color: var(--accent); margin: 0; }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.count { display: block; text-align: right; color: var(--muted); font-size: 12px; }
.field-error { color: #ff9aa8; font-size: 14px; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }

/* Directory */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; text-align: left; margin: 24px 0; }
.toolbar .field { flex: 1 1 180px; }
.toolbar label { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }

.card { min-width: 0; display: flex; }
.card[hidden] { display: none; }
.card-open {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 20px; background: var(--panel); border: 1px solid var(--line);
  color: inherit; font: inherit; text-align: center; cursor: pointer; min-width: 0;
  transition: border-color 0.15s, transform 0.15s;
}
.card-open:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-open .avatar { width: 112px; height: 112px; font-size: 34px; margin-bottom: 8px; }
.card-name { font-weight: 700; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.card-headline { color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }

.avatar {
  flex: none; width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 28px;
}

/* Full listing */
dialog.profile {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 32px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); text-align: left; overflow-y: auto;
}
dialog.profile::backdrop { background: rgba(15, 13, 20, 0.75); }
dialog.profile .close {
  position: absolute; top: 8px; right: 12px; background: none; border: 0;
  color: var(--muted); font-size: 32px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
dialog.profile .close:hover { color: var(--text); }
.profile-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-bottom: 28px; padding-right: 32px; }
.profile-head > div { flex: 1 1 240px; min-width: 0; }
.profile-head h2 { margin: 0 0 4px; }
.profile-head p { margin: 0 0 12px; color: var(--muted); }

.profile dl { margin: 0; display: grid; gap: 20px; }
.profile dt { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.profile dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; line-height: 1.6; }
.profile dd.tags { white-space: normal; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 600; line-height: 1.4; padding: 4px 12px; border-radius: 999px; color: #1c1a22; background: #cfcbdc; }
.tag-0 { background: #ff9aa8; }
.tag-1 { background: #ffc078; }
.tag-2 { background: #ffe066; }
.tag-3 { background: #8ce99a; }
.tag-4 { background: #66d9e8; }
.tag-5 { background: #91a7ff; }
.tag-6 { background: #d0a9ff; }
.tag-7 { background: #faa2c1; }

.btn {
  display: inline-block; align-self: flex-start; margin-top: auto;
  padding: 10px 18px; border: 1px solid var(--accent);
  font: inherit; font-weight: 600; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; color: var(--text); background: transparent; cursor: pointer;
}
.btn:hover { background: var(--accent); color: var(--text); }

.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
.site-footer p { max-width: 520px; margin: 0 auto; }

/* Consent */
.consent p { margin: 0 0 12px; }
.consent label { display: flex; gap: 12px; align-items: flex-start; font-weight: 300; cursor: pointer; }
.consent input { accent-color: var(--accent); width: 20px; height: 20px; margin: 4px 0 0; flex: none; }

.wordmark img { display: block; margin: 0 auto; height: auto; }

/* Admin digest */
.admin section { text-align: left; }
.admin h1 { text-align: center; }
.steps { padding-left: 20px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0; }
.admin-actions form { margin: 0; }
.admin-actions .btn { margin: 0; }
.copied { color: var(--muted); font-size: 14px; }
.email-preview {
  background: #ffffff; color: #222222; padding: 32px; max-width: 760px;
  font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5;
  border-radius: 2px;
}
.email-preview a { color: #1a5fd6; }
.email-preview p, .email-preview ul { margin: 0 0 14px; }
.email-preview ul { padding-left: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

.leave { margin-top: 48px; }
