/* Shared styles for the report form and the pages people reach from email links. */
/* Fonts are hosted here rather than loaded from Google, so visiting the form doesn't tell anyone else you were here. */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("/fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Layout idea: one question per screen, thumb-sized answers stacked in a narrow column, a fixed action bar at the bottom like a phone app. */
:root {
  /* Bighorn Historical Combat colours: dark with the club blue, softened a little for easier reading. */
  --paper: #10151b;
  --surface: #18202a;
  --ink: #dde4ec;
  --muted: #93a2b2;
  --line: #2b3746;
  --accent: #4ba8ee;
  --accent-ink: #0d1218;
  --accent-soft: #15304a;
  --cream: #efe4b8;
  --danger: #f2998d;
  --focus: #8cc8f5;
  --font-display: "Montserrat", "Arial Black", "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 34rem; margin: 0 auto; padding: 10px 16px 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--accent);
  letter-spacing: 0.02em; text-transform: uppercase; margin-right: auto;
}
.pill {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted);
}
.preview {
  width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.875rem; color: var(--muted);
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  border: 0; background: transparent; padding: 4px 10px; cursor: pointer; font-size: 0.875rem; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.linkbtn {
  background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline;
  cursor: pointer; font-size: inherit;
}
.progress { height: 4px; background: var(--line); }
.progress span { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.25s ease; }

main {
  max-width: 34rem; margin: 0 auto; padding: 20px 16px 120px;
  display: flex; flex-direction: column; gap: 18px;
}
.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 0; }
h1, h2 {
  font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0;
  text-wrap: balance;
}
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.45rem; }
.sub { color: var(--muted); margin: -8px 0 0; }
p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 700; }
.note { font-size: 0.9375rem; color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.event-chip {
  align-self: flex-start; font-size: 0.9375rem; background: var(--accent-soft); color: var(--ink);
  border-radius: 8px; padding: 6px 10px;
}

.opts { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 52px;
  text-align: left; padding: 13px 14px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
}
.opt:hover { border-color: var(--muted); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mark {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid var(--muted); border-radius: 50%;
  display: grid; place-items: center;
}
.multi .mark { border-radius: 6px; }
.opt[aria-pressed="true"] .mark { border-color: var(--accent); background: var(--accent); }
.opt[aria-pressed="true"] .mark::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--surface);
}
.multi .opt[aria-pressed="true"] .mark::after {
  width: 10px; height: 5px; border-radius: 0; background: none;
  border-left: 2.5px solid var(--surface); border-bottom: 2.5px solid var(--surface);
  transform: translateY(-2px) rotate(-45deg);
}
.opt-text { display: flex; flex-direction: column; gap: 4px; }
.opt-note { font-size: 0.875rem; color: var(--muted); font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .opt { width: auto; min-height: 44px; padding: 10px 14px; align-items: center; }
.chips .mark { display: none; }

input[type="text"], input[type="email"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 52px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.row { display: flex; gap: 8px; align-items: stretch; }
.row > input { flex: 1; min-width: 0; }
.check {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
}
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check.checked { border-color: var(--accent); background: var(--accent-soft); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.filebtn {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; cursor: pointer;
  border: 1.5px dashed var(--muted); border-radius: 12px; background: var(--surface); font-weight: 700;
}
.filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--danger); font-size: 0.9375rem; font-weight: 700; }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  background: var(--paper); border-top: 1px solid var(--line);
}
.actionbar-inner {
  max-width: 34rem; margin: 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 10px;
}
.btn {
  min-height: 52px; padding: 0 20px; border-radius: 12px; cursor: pointer; font-weight: 700;
  border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
}
.btn-primary { flex: 1; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink); }

.idbox {
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: 0.08em; color: var(--cream);
  background: var(--surface); border: 2px solid var(--accent); border-radius: 12px; padding: 6px 16px; align-self: flex-start;
  font-variant-numeric: tabular-nums;
}
.summary { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.summary th, .summary td { text-align: left; vertical-align: top; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary th { color: var(--muted); font-weight: 400; width: 45%; padding-right: 12px; }
details summary { cursor: pointer; font-weight: 700; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 10; background: rgb(0 0 0 / 0.45);
  display: grid; place-items: end center; padding: 16px;
}
.modal {
  width: 100%; max-width: 34rem; max-height: 85%; overflow: auto; background: var(--surface);
  border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.footnote { font-size: 0.8125rem; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }
