/* Palette from the earlier SFB contact page: #610b83 / #d8ccf8. */
:root {
  --accent: #610b83;
  --accent-strong: #4d265d;
  --accent-soft: #d8ccf8;
  --accent-wash: #f4f0fd;
  --bg: #fbfaff;
  --surface: #ffffff;
  --text: #1d1a22;
  --muted: #5d5766;
  --border: #d9d3e4;
  --ok: #1d6b3a;
  --bad: #a3202a;
  --bad-wash: #fdecee;
  --radius: 10px;
  --warn: #7a4a00;
  --warn-wash: #fff4d6;
  --warn-border: #e8b64c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #c9a7f0;
    --accent-strong: #e2cffa;
    --accent-soft: #3a2a4d;
    --accent-wash: #241b30;
    --bg: #15121a;
    --surface: #1e1a25;
    --text: #ece8f2;
    --muted: #a9a2b5;
    --border: #3a3345;
    --ok: #7fd49a;
    --bad: #ff9aa3;
    --bad-wash: #3a1d22;
    --warn: #ffd98a;
    --warn-wash: #3a2e12;
    --warn-border: #8a6a24;
    color-scheme: dark;
  }
}

/* The logo's grey lettering disappears on a dark background. */
@media (prefers-color-scheme: dark) {
  .brand img { background: #fff; border-radius: 6px; padding: 3px 6px; box-sizing: content-box; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

header.site {
  background: var(--accent-wash);
  border-bottom: 1px solid var(--border);
}
header.site .inner,
main,
footer.site {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 16px;
}
header.site .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  margin-right: auto;
}
.brand a { text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}
header.site nav a { text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current] { text-decoration: underline; }

main { padding-top: 1.5rem; padding-bottom: 3rem; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 0.25rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
.tagline { color: var(--muted); margin: 0 0 1.5rem; }

footer.site {
  color: var(--muted);
  font-size: 0.85rem;
  padding-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

/* ---------------------------------------------------------- forms */

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

label { display: block; font-weight: 600; margin: 1rem 0 0.3rem; }
label:first-child { margin-top: 0; }
label.check { font-weight: normal; margin: 0.4rem 0 0; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0; }

input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}
textarea { min-height: 10rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 1px;
  border-color: var(--accent);
}

fieldset {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem 1rem;
}
legend { font-weight: 600; padding: 0 0.4rem; }

button, .button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
button.secondary, .button.secondary {
  background: transparent;
  color: var(--accent);
}
button.secondary:hover, .button.secondary:hover { background: var(--accent-wash); }
button.link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: inherit;
  text-decoration: underline;
}
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button.danger:hover { background: var(--bad-wash); }
button:disabled { opacity: 0.5; cursor: default; }

.session { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.session p { margin: 0 auto 0 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; align-items: center; }

.status { border-radius: 8px; padding: 0.6rem 0.8rem; margin: 1rem 0 0; }
.status.info { background: var(--accent-wash); }
.status.error { background: var(--bad-wash); color: var(--bad); }

.feedback { font-size: 0.9rem; color: var(--muted); min-height: 1.4em; margin-top: 0.3rem; }
.feedback .ok { color: var(--ok); }
.feedback .bad { color: var(--bad); }
.hint.bad { color: var(--bad); }

/* ---------------------------------------------------------- codeword */

/* One click selects the whole phrase, ready to copy. */
.phrase {
  font: 600 1.1rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  user-select: all;
  overflow-wrap: anywhere;
}
.warn { border-left: 4px solid var(--accent); padding-left: 0.8rem; }

pre.output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------- messages */

.thread { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; }
.msg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  max-width: 92%;
}
.msg.mine { align-self: flex-end; background: var(--accent-wash); border-color: var(--accent-soft); }
.msg header { font-size: 0.85rem; color: var(--muted); }
.msg header strong { color: var(--text); }
.msg h3 { font-size: 1rem; margin: 0.4rem 0 0; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.4rem 0 0; }
.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 0.75rem;
  font-size: 0.9rem;
  margin: 0.4rem 0 0;
}
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }

.note { color: var(--muted); font-style: italic; }

.preview {
  background: var(--warn-wash);
  color: var(--warn);
  border: 2px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
}

/* ---------------------------------------------------------- staff list */

.convs { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.convs details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
}
.convs summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.convs summary .id { font-family: ui-monospace, Menlo, monospace; color: var(--muted); }
.convs summary .subject { font-weight: 600; flex: 1 1 12rem; }
.convs summary .when { color: var(--muted); font-size: 0.85rem; }
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  background: var(--accent-wash);
  color: var(--accent);
  border: 1px solid var(--accent-soft);
}
.badge.awaiting { background: var(--accent); color: var(--surface); border-color: var(--accent); }

.people { list-style: none; padding: 0; margin: 0.5rem 0; }
.people li { margin: 0.35rem 0; }
.people code { font-size: 0.85rem; color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0.5rem; }
