/* styles.css — the drill page at /drill, in the look Monty chose ("Straight lines").
   Tokens are the ones in docs/design-tokens.md: white page, ink type, one blue,
   hairlines instead of shadows, 3px corners. No webfont, no network request, no icon
   font. The same token block opens public/landing.css, so the page and the call cannot
   drift apart; each page loads only the rules it draws.

   This is one look, not two modes: there is no dark palette and no toggle. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url("/fonts/archivo-var-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-400-latin.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --panel: #f4f5f8;
  --ink: #14161a;
  --dim: #5b6270;
  --faint: #8a909b;
  --line: rgba(20, 22, 26, 0.16); /* control edges, borders */
  --rule: rgba(20, 22, 26, 0.1); /* section hairlines */
  --accent: #3b34e8; /* one blue: the action, the meter, focus */
  --accent-ink: #ffffff;
  --end: #14161a; /* the one dark fill, for End drill */
  --end-ink: #ffffff;
  /* Not in the drawn palette, and needed: a message that something failed has to be
     legible as a failure, and none of the ink greys says that. 6.7:1 on white. */
  --danger: #b3261e;
  --radius: 3px;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --column: 720px;
}

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

/* A hidden thing stays hidden. `hidden` is only a browser default, so any class that sets
   `display` beats it: the voice form did, and a customer on a connected site was still
   shown a box asking for a Cloudflare API token. */
[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color-scheme: only light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 600;
  color: var(--dim);
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: rgba(59, 52, 232, 0.16);
}

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

/* ------------------------------------------------------------------ the shell */

.app {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  text-decoration: none;
}

main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.screen[hidden] {
  display: none;
}

.footer {
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 62ch;
}

/* ------------------------------------------------------------------ type */

.lede {
  font-size: 16px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 54ch;
}

.mono-label {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--dim);
}

/* A group of things is a hairline box or a hairline rule, never both. */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 16px;
}

/* ------------------------------------------------------------------ fields */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.label-row label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ink);
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Clear keeps a real tap area, but its words sit on the label's line instead of nine
   pixels under it. */
.label-row .link-btn {
  min-height: 0;
  margin: -11px 0;
  padding: 11px 2px;
}

.optional {
  margin-left: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dim);
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

/* The job ad box grows to fit what is pasted, but a full advert made it as tall as the
   screen and pushed the button out of sight. It scrolls inside a box instead. */
#jobNotes {
  max-height: 340px;
  overflow-y: auto;
}

input::placeholder,
textarea::placeholder {
  color: var(--dim);
  opacity: 1;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

#jobNotes {
  font-size: 16px;
}

.field-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
  max-width: 56ch;
}

.field-hint.centre {
  text-align: center;
  max-width: none;
}

.error {
  font-size: 14px;
  line-height: 1.45;
  color: var(--danger);
  max-width: 56ch;
}

.error[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ actions */

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(0.92);
}

.primary-btn:active:not(:disabled) {
  filter: brightness(0.84);
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
}

.ghost-btn:hover {
  border-color: var(--ink);
}

.end-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--end);
  border-radius: var(--radius);
  background: var(--end);
  color: var(--end-ink);
  font-size: 15px;
  font-weight: 600;
}

.end-btn:hover {
  filter: brightness(1.3);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--accent);
}

.link-btn:disabled {
  color: var(--dim);
  cursor: default;
}

.answer-actions {
  display: flex;
  gap: 10px;
}

.answer-actions .primary-btn,
.answer-actions .ghost-btn {
  flex: 1 1 0;
}

/* ------------------------------------------------------------------ the week */

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--dim);
}

.plan-price {
  font-family: var(--mono);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.plan-price[hidden],
.plan-covers[hidden] {
  display: none;
}

.plan-covers {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.plan-card .primary-btn {
  margin-top: 6px;
}

/* The rehearsal line under the real button: quiet, and it says what it is. */
.plan-card .test-week {
  margin-top: 2px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: none;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 14px;
  cursor: pointer;
}

.plan-card .test-week:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
}

.plan-card .test-week[hidden],
#testWeekNote[hidden] {
  display: none;
}

.week-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.week-bar[hidden] {
  display: none;
}

.week-text {
  flex: 1 1 100%;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

.week-bar .field-hint {
  flex: 1 1 100%;
  margin: 0;
}

.week-bar .field-hint[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ the week's code */

/* The way back in for a customer who paid on another device. It sits under the price and is
   closed until it is wanted, so it never competes with the one thing on the card: the
   button that starts a week. */
.week-code {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.week-code > summary {
  font-size: 14px;
  color: var(--dim);
  cursor: pointer;
  list-style: none;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.week-code > summary::-webkit-details-marker {
  display: none;
}

.week-code > summary::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}

.week-code[open] > summary::before {
  transform: rotate(45deg);
}

.week-code > summary:hover {
  color: var(--ink);
}

.code-form {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.code-form label {
  font-size: 13px;
  color: var(--ink);
}

.code-form input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.code-form .secondary-btn {
  justify-self: start;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}

.code-form .secondary-btn:hover:not(:disabled) {
  border-color: var(--ink);
}

.code-form .secondary-btn:disabled {
  color: var(--dim);
  cursor: default;
}

.code-form .error {
  margin: 0;
}

.week-code-line {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
  overflow-wrap: anywhere;
}

.week-code-line[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ history */

.history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.4;
}

.history-item strong {
  font-weight: 600;
}

.history-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--dim);
}

.history-delete {
  margin-left: auto;
  font-size: 13px;
}

.history-delete:disabled {
  color: var(--dim);
  cursor: default;
}

/* ------------------------------------------------------------------ the voice */

.voice {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-status {
  font-size: 14px;
  line-height: 1.45;
  color: var(--dim);
}

.voice-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voice-account {
  font-size: 13px;
  color: var(--dim);
}

.voice-account summary {
  min-height: 32px;
  padding: 6px 0;
  cursor: pointer;
}

.voice-connected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.voice-connected[hidden] {
  display: none;
}

.voice-connected .field-hint {
  flex: 1 1 220px;
}

/* ------------------------------------------------------------------ the call */

/* The setup form is a column of fields, and each field gets the same air between it and
   the next, so nothing sits against anything else. */
#setupForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* While a call is running there is nothing below it: the stage, where in the four
   questions it is, and the two controls, and nothing else on the screen. */
body[data-screen="drill"] .footer {
  display: none;
}

.screen-drill {
  gap: 14px;
  min-height: calc(100dvh - 180px);
}

.drill-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.job-chip {
  min-width: 0;
}

.job-chip-title {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.job-chip-sub {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--dim);
  overflow-wrap: anywhere;
}

.call-clock {
  flex: none;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

/* One quiet line about earlier drills for the same job: muted, never a banner. */
.carry-line {
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
}

.carry-line[hidden] {
  display: none;
}

/* The stage is the only thing with weight: a hairline box holding the microphone
   meter, then whose turn it is, then one line of help. Nothing either of us says is
   ever printed here. */
.call-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 260px;
  padding: 20px 0;
  text-align: center;
}

/*
 * The level of the microphone, drawn as vertical bars. `--level` is 0..1, set from the
 * analyser; at rest every bar is 24px tall, and the bars rise with the voice. The number
 * in `data-level` is the same measurement, printed in mono. It is the only thing on this
 * page that moves.
 */
.mic-meter {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: min(320px, 100%);
  height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.mic-meter[hidden] {
  display: none;
}

.mic-meter::before {
  content: "Mic level";
  position: absolute;
  top: 5px;
  left: 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--dim);
}

.mic-meter::after {
  content: attr(data-level);
  position: absolute;
  top: 5px;
  right: 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
  color: var(--dim);
}

.mic-meter i {
  display: block;
  flex: 1 1 0;
  min-width: 2px;
  height: calc(24px + var(--level, 0) * var(--k, 1) * 22px);
  max-height: 100%;
  background: var(--accent);
  transition: height 80ms linear;
}

.mic-meter i:nth-child(1) {
  --k: 0.5;
}
.mic-meter i:nth-child(2) {
  --k: 0.85;
}
.mic-meter i:nth-child(3) {
  --k: 1.15;
}
.mic-meter i:nth-child(4) {
  --k: 0.65;
}
.mic-meter i:nth-child(5) {
  --k: 1;
}
.mic-meter i:nth-child(6) {
  --k: 0.55;
}
.mic-meter i:nth-child(7) {
  --k: 1.2;
}
.mic-meter i:nth-child(8) {
  --k: 0.75;
}
.mic-meter i:nth-child(9) {
  --k: 0.45;
}
.mic-meter i:nth-child(10) {
  --k: 1.05;
}
.mic-meter i:nth-child(11) {
  --k: 0.7;
}
.mic-meter i:nth-child(12) {
  --k: 0.95;
}

/* The state word: YOUR TURN, LISTENING, SPEAKING. */
.pill {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
}

/* While the interviewer has the floor the state word steps back, so the eye stays on
   the meter, which is the candidate's own microphone and is quiet. */
.pill[data-state="speaking"] {
  color: var(--dim);
}

/* One line about how the call works. Not the interview, just the instrument. */
.call-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
  max-width: 34ch;
}

.mic-note {
  max-width: 42ch;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
  text-align: left;
}

.mic-note[hidden] {
  display: none;
}

/*
 * The one moment the call screen asks for anything: nothing is arriving from the
 * microphone. A short sentence, the list of inputs this machine has, and the way out. It
 * sits where the hint sits, in the same quiet type, and it goes away by itself the moment
 * sound arrives.
 */
.mic-fix {
  display: grid;
  gap: 8px;
  max-width: 44ch;
  text-align: left;
}

/* The same shape before a drill exists: the microphone is checked, and this says so, where
   the start button is, rather than on a call the person has already begun. */
.mic-preflight {
  display: grid;
  gap: 8px;
  max-width: 44ch;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2, transparent);
  text-align: left;
}

.mic-preflight[hidden] {
  display: none;
}

.mic-fix-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.mic-fix-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mic-fix-pick {
  max-width: 100%;
  min-width: 0;
  flex: 1 1 190px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.mic-fix-row .ghost-btn {
  flex: 0 0 auto;
}

.mic-fix .link-btn {
  justify-self: start;
  font-size: 13px;
  padding: 0;
}

/*
 * One quiet word about the live listening path when this build has none: a status, not
 * something the candidate has to fix.
 */
.voice-note {
  max-width: 40ch;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}

.voice-note[hidden] {
  display: none;
}

/* An answer the network refused: kept, never printed, one tap to send again. */
.call-retry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
}

.call-retry[hidden] {
  display: none;
}

.call-retry-text {
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.45;
  color: var(--danger);
}

/* Where in the four questions this is, and what the interviewer just did. */
.progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.progress-rules {
  display: flex;
  gap: 4px;
}

.progress-rules i {
  display: block;
  flex: 1 1 0;
  height: 3px;
  background: var(--line);
}

.progress-rules i.on {
  background: var(--accent);
}

.call-controls {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.call-controls .ghost-btn,
.call-controls .end-btn {
  flex: 1 1 0;
  min-height: 48px;
}

/* Built by app.js only after speech has failed: quiet, and never the default. */
.typed-escape {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.typed-escape[hidden] {
  display: none;
}

.typed-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.typed-label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ink);
}

.typed-form textarea {
  min-height: 96px;
}

.typed-form .ghost-btn {
  align-self: flex-start;
}

/* ------------------------------------------------------------------ debrief */

.job-line {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--dim);
}

.debrief-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.overall {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

.block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.debrief-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debrief-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 15px;
  line-height: 1.5;
}

.item-label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ink);
}

.quote {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
}

.quote:empty {
  display: none;
}

.note {
  font-size: 15px;
  line-height: 1.5;
  color: var(--dim);
}

.redo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.redo-q {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

.redo-hint {
  font-size: 14px;
  line-height: 1.45;
  color: var(--dim);
}

.debrief-actions {
  display: flex;
  gap: 10px;
}

.debrief-actions .primary-btn,
.debrief-actions .ghost-btn {
  flex: 1 1 0;
}

/* ------------------------------------------------------------------ the gate */

/* Until the page knows whether this visitor has a paid week, no form is shown. app.js
   shows the setup screen on load, so without this the form would appear and be replaced by
   the paywall a moment later. If gate.js never loads the attribute is never set and the
   form stands, which is the safe way for it to break. */
html[data-gate="checking"] #screen-setup {
  display: none;
}

/* When the server could already tell this visitor has no week, it marks the page before it
   sends it, and the paywall is on screen with the price straight away instead of a blank
   page waiting for two calls to come back. gate.js confirms with the server and takes the
   mark off; it never leaves a visitor looking at a paywall the server disagrees with. */
html[data-gate="paywall"] #screen-setup {
  display: none;
}

html[data-gate="paywall"] #screen-paywall {
  display: flex;
}

/* ------------------------------------------------------------------ wide screen */

@media (min-width: 640px) {
  .app {
    padding-left: 24px;
    padding-right: 24px;
    gap: 22px;
  }

  h1 {
    font-size: 30px;
  }

  .card {
    padding: 20px;
  }

  .plan-card {
    gap: 12px;
  }
}
