/* style.css — Freshwater church portal.
 *
 * Written for the people who actually use it: office administrators and
 * clergy, often on an older shared machine, frequently not confident with
 * software. That drives most of the decisions here.
 *
 *   * 17px base. Small text is the single most common accessibility failure
 *     in software for this audience, and there is no design reason for it.
 *   * System fonts. No webfont means nothing to fail to load on a slow
 *     connection, and no layout shift while it does.
 *   * High contrast throughout, and a visible focus ring that is never
 *     removed. Some of these users navigate by keyboard.
 *   * Large targets. Buttons are 48px tall, which is the comfortable
 *     minimum for an unsteady hand or a trackpad.
 *
 * The palette matches the printed reports so the portal and the PDF a church
 * receives look like the same organisation.
 */

:root {
  --ink: #1a1a1a;
  --muted: #5c5240;
  --cream: #f3eee3;
  --paper: #ffffff;
  --gold: #9a6e1a;
  --gold-dark: #7a5510;
  --rule: #d8cfba;
  --danger: #a8342a;
  --danger-bg: #fdecea;
  --good: #2f6b4f;
  --good-bg: #eef5f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--gold-dark); }
a:hover { color: var(--gold); }

.bar {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bar .wordmark {
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  font-size: 15px;
}
.bar .who { margin-left: auto; color: var(--muted); font-size: 15px; }
.bar .who b { color: var(--ink); }

.wrap { max-width: 760px; margin: 0 auto; padding: 26px 20px 60px; }
.wrap.narrow { max-width: 460px; }

h1 { font-size: 26px; margin: 0 0 6px; font-weight: 600; }
h2 { font-size: 19px; margin: 30px 0 10px; font-weight: 600; }
.lede { color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 16px;
}

label { display: block; font-weight: 600; margin: 16px 0 5px; }
label:first-of-type { margin-top: 0; }

input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  padding: 12px 13px;
  font-size: 17px;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b9ad93;
  border-radius: 4px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.hint { color: var(--muted); font-size: 15px; margin-top: 6px; }

button {
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 0 22px;
  min-height: 48px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #fff;
}
button:hover:not(:disabled) { background: var(--gold-dark); border-color: var(--gold-dark); }
button:disabled { opacity: 0.55; cursor: default; }
button.secondary { background: var(--paper); color: var(--gold-dark); }
button.secondary:hover:not(:disabled) { background: var(--cream); }
button.wide { width: 100%; margin-top: 22px; }

.msg { padding: 12px 14px; border-radius: 4px; margin: 16px 0 0; font-size: 16px; }
.msg.error { background: var(--danger-bg); border: 1px solid var(--danger); color: #7d241c; }
.msg.ok { background: var(--good-bg); border: 1px solid var(--good); color: #24513c; }
.msg:empty { display: none; }

/* A submission in the list. The verdict is the thing being read, so it leads. */
.item { border-top: 1px solid var(--rule); padding: 16px 0; }
.item:first-child { border-top: 0; padding-top: 0; }
.item .ref { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: 15px; color: var(--muted); }
.item .headline { font-weight: 600; margin: 3px 0; }
.item .meta { color: var(--muted); font-size: 15px; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 3px;
  font-size: 14px; font-weight: 600; vertical-align: 2px;
}
.tag.do_not_reply { background: var(--danger-bg); color: #7d241c; }
.tag.caution { background: #fbf3e0; color: #7a5510; }
.tag.inconclusive { background: var(--cream); color: var(--muted); }
.tag.report { background: var(--good-bg); color: #24513c; }

.empty { color: var(--muted); padding: 10px 0; }

.stats { display: flex; gap: 26px; flex-wrap: wrap; margin: 0 0 4px; }
.stats div .n { font-size: 26px; font-weight: 600; display: block; line-height: 1.1; }
.stats div .k { color: var(--muted); font-size: 15px; }

.foot { color: var(--muted); font-size: 15px; margin-top: 34px; }
.foot a { margin-right: 14px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
.row > button { flex: 0 0 auto; }
