/* Shared look for the participant pages (landing.html, task.html).
   Plain CSS, no build step. Colors are tokens: light by default, dark via
   prefers-color-scheme. Shape rule: controls use --radius-control, panels
   and dialogs use --radius-panel, pills (timer, badges) are fully round. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light dark;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f3f5f4;
  --surface: #fcfdfc;
  --surface-2: #eef1f0;
  --border: #dde2e0;
  --border-strong: #8a918e;   /* inputs: 3:1 against --surface */
  --text: #151918;
  --text-2: #4a5351;
  --accent: #00793a;          /* UNT green (#00853e), a shade darker for 5:1 text contrast on --bg */
  --accent-hover: #00632f;
  --accent-soft: #e4f3ea;
  --on-accent: #fcfdfc;
  --danger: #b3261e;
  --danger-soft: #fbeceb;
  --shadow: 0 1px 2px rgb(21 25 24 / 0.05), 0 8px 24px rgb(21 25 24 / 0.06);

  --radius-control: 10px;
  --radius-panel: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101413;
    --surface: #171c1a;
    --surface-2: #1f2523;
    --border: #2c3431;
    --border-strong: #6b7471;
    --text: #edf1ef;
    --text-2: #a9b3af;
    --accent: #3fbf7a;
    --accent-hover: #5cd08f;
    --accent-soft: #15301f;
    --on-accent: #08130d;
    --danger: #ff8a80;
    --danger-soft: #3a1b19;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
}
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a, button, input, label { touch-action: manipulation; -webkit-tap-highlight-color: rgb(0 121 58 / 0.15); }
a:hover { color: var(--accent-hover); }

.icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: currentColor; vertical-align: -0.25em; }

/* --- Accessibility helpers --- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: var(--radius-control); background: var(--accent); color: var(--on-accent); font-weight: 700; }
.skip-link:focus { top: 12px; color: var(--on-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

/* --- Buttons: .btn is secondary, .btn-primary is the main action on screen --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  font: 700 16px/1.2 var(--font); white-space: nowrap; text-decoration: none;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-control);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease);
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { color: var(--on-accent); background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

/* --- Form fields --- */
.field {
  width: 100%; min-height: 44px; padding: 10px 14px;
  font: 17px/1.4 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-control);
}
.field::placeholder { color: var(--text-2); opacity: 1; }
.field:disabled { background: var(--surface-2); color: var(--text-2); }

/* --- Panels --- */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-panel); box-shadow: var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
