:root { --ink: #000; --paper: #fff; --muted: #3d3d3d; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* Centred content screens (everything except the test) */
.pane {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px; max-width: 620px; margin: 0 auto; gap: 6px;
}
.logo { width: 116px; height: 116px; margin-bottom: 6px; }
h1 { font-size: 40px; letter-spacing: .03em; margin: 0 0 4px; }
h2 { font-size: 25px; font-weight: 700; margin: 0 0 14px; line-height: 1.3; }
p { font-size: 17px; line-height: 1.5; margin: 0 0 12px; }
.muted { color: var(--muted); }
.spacer { height: 18px; }

button.btn {
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 2px solid var(--paper);
  border-radius: 14px; padding: 15px 30px; min-height: 54px; min-width: 180px;
}
button.btn:active { opacity: .75; }
button.btn:disabled { opacity: .35; cursor: default; }

/* Screening form */
form { width: 100%; text-align: left; }
.q { margin: 0 0 22px; }
.q > label.qlabel { display: block; font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.q input[type=number] { font: inherit; padding: 10px 12px; width: 130px; border: 1.5px solid #999; border-radius: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  font: inherit; padding: 10px 16px; border: 1.5px solid #999; border-radius: 999px;
  cursor: pointer; user-select: none; background: var(--paper); color: var(--ink);
}
.opt.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scale { display: flex; flex-wrap: wrap; gap: 6px; }
.scale .opt { min-width: 42px; text-align: center; padding: 10px 0; }

/* Countdown */
.count { font-size: 22vh; font-weight: 700; line-height: 1; }

/* Test screen: top 50% digit, bottom 50% button */
#test { flex-direction: column; padding: 0; }
#test .top { flex: 1; display: flex; align-items: center; justify-content: center; }
#digit { font-size: 34vh; font-weight: 700; line-height: 1; }
#test .bottom { flex: 1; padding: 14px; display: flex; }
#tapbtn {
  flex: 1; background: var(--ink); color: var(--paper); border: 3px solid var(--paper);
  border-radius: 20px; font-size: 8vh; font-weight: 700; letter-spacing: 4px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#tapbtn.flash { background: var(--paper); color: var(--ink); }

.err { color: #b00; font-size: 15px; min-height: 18px; }
a.dl { font-size: 15px; text-decoration: underline; color: var(--ink); }
