/* Patient survey, in the look of the Aura nervous system quiz: dark full
   screen, one question per screen, gold accents. Fonts and brand colours come
   from tokens.css; the theme tokens below sit on :root too (Nathan 10.9). */
:root {
  --text: #f5f5db;
  --muted: rgba(245, 245, 219, 0.68);
  --faint: rgba(245, 245, 219, 0.22);
  --tile: rgba(245, 245, 219, 0.04);
  --error: #f4c7c3;
  --error-bg: rgba(190, 70, 70, 0.18);
}

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

html { -webkit-text-size-adjust: 100%; background: var(--midnight); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--midnight);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}

[hidden] { display: none !important; }

/* Header: logo, Back, and the progress line under it. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(15, 31, 47, 0.96);
  border-bottom: 1px solid rgba(245, 245, 219, 0.1);
}
.top-row {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top img { display: block; height: 36px; width: auto; max-width: 60%; }
.top.aura img { height: 20px; }
.back {
  min-height: 44px;
  min-width: 64px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.back:hover { color: var(--gold); }
.track { height: 2px; background: transparent; }
.bar { height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; }

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 48px;
}

.screen { animation: rise 0.28s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .bar { transition: none; }
}

.eyebrow {
  font-family: var(--label);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.tag {
  font-style: italic;
  color: var(--gold);
  margin: 0 0 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 400;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
/* Headings take focus on each new screen so screen readers announce them; no
   outline for that, it reads as a stray box (Arthur, 2026-10-27). */
h1[tabindex="-1"]:focus { outline: none; }
h1.q-heading label { display: block; margin: 0; font-weight: 400; }

p { margin: 0 0 12px; }
.lead { color: var(--muted); }

.field { margin: 22px 0 0; }
.field > label, .q {
  display: block;
  font-weight: 600;
  margin: 0 0 8px;
}
.hint { display: block; color: var(--muted); font-size: 15px; margin: -4px 0 8px; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 18px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--faint);
  border-radius: 0;
  padding: 12px 14px;
  min-height: 50px;
}
textarea { min-height: 132px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { outline: none; border-color: var(--gold); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.dob { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; }
.dob label { display: block; font-size: 15px; color: var(--muted); margin: 0 0 4px; }

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 30px;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: var(--gold);
  color: var(--midnight);
  font-family: var(--label);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
.btn:hover { background: var(--ivory); border-color: var(--ivory); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--faint); }
.btn.secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn.link {
  background: none;
  border-color: transparent;
  color: var(--muted);
  padding: 10px 4px;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn.link:hover { color: var(--gold); }
.btn:disabled { opacity: 0.5; cursor: progress; }

.nav { margin-top: 32px; }

.msg {
  margin: 20px 0 0;
  padding: 12px 14px;
  background: var(--error-bg);
  color: var(--error);
  border-left: 2px solid var(--error);
}
.msg:empty { display: none; }

/* 0 to 10, as large tiles. Unanswered stays unselected: missing is never 0. */
.scale { margin: 26px 0 0; }
.ticks {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.ticks button {
  min-height: 56px;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--faint);
  background: var(--tile);
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, border-color 0.15s;
}
.ticks button:hover { border-color: var(--gold); }
.ticks button.sel { background: var(--gold); border-color: var(--gold); color: var(--midnight); font-weight: 700; }
/* The patient's previous rating, as a dashed outline (Nathan 6.2). */
.ticks button.prev { outline: 2px dashed var(--ivory); outline-offset: 3px; }
.ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
}
.was { font-size: 16px; color: var(--gold); margin: 14px 0 0; }

.choice { display: grid; gap: 10px; margin-top: 26px; }
.choice button {
  min-height: 60px;
  padding: 0 20px;
  text-align: left;
  border: 1px solid var(--faint);
  background: var(--tile);
  color: var(--text);
  font-size: 19px;
}
.choice button:hover { border-color: var(--gold); }
.choice button.sel { background: var(--gold); border-color: var(--gold); color: var(--midnight); }

.stars { display: flex; gap: 8px; margin-top: 26px; }
.stars button {
  flex: 1;
  min-height: 60px;
  min-width: 0;
  border: 1px solid var(--faint);
  background: var(--tile);
  color: var(--faint);
  font-size: 28px;
  line-height: 1;
}
.stars button.on { color: var(--gold); border-color: var(--gold); }

.concern-row { display: flex; gap: 8px; align-items: center; }
.concern-row input { flex: 1; min-width: 0; }
.concern-row .btn.link { flex: none; }

.quote {
  margin: 6px 0 14px;
  padding: 10px 14px;
  border-left: 2px dashed var(--gold);
  background: var(--tile);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.skip { margin-top: 22px; }
.skipped-note { margin-top: 18px; }

.review {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--gold);
  background: rgba(202, 164, 93, 0.08);
}
.review p { margin-bottom: 14px; }

.privacy { margin-top: 28px; font-size: 14px; color: var(--muted); }
.privacy a { color: var(--ivory); }

.done h1 { margin-bottom: 0; }

.foot {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 32px;
  font-size: 14px;
  color: var(--muted);
}
.foot a { color: var(--muted); }

.busy { opacity: 0.6; pointer-events: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Wider screens: the 0 to 10 row on one line. */
@media (min-width: 560px) {
  .ticks { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
  h1 { font-size: 34px; }
}

/* Small phones: still 40px a tile at 320px. */
@media (max-width: 400px) {
  main { padding: 28px 16px 36px; }
  .top-row { padding: 12px 16px; }
  .ticks { gap: 6px; }
  h1 { font-size: 26px; }
}

/* Touch screens. Keep this block last in the file (Nathan 10.8). */
@media (pointer: coarse) {
  input[type="text"], input[type="email"], input[type="tel"], textarea { font-size: 18px; }
  .ticks button { min-height: 56px; }
}
