/* The sign-up pages, built for somebody in their fifties or sixties filling this in on a
 * phone, in a car park, in the evening.
 *
 * Owner's decision of 30 October 2026, and it is a floor rather than a preference: 20px
 * body text and NOTHING below 18px anywhere, labels and helper text included. The reason
 * the floor is written here and checked by devtools/test_a11y_drive.py is that small text
 * does not arrive in a redesign - it arrives one `font-size: 12.5px` at a time, on a
 * caption, by somebody fitting a line into a row. The previous version of this file had
 * six of them.
 *
 * THE NUMBERS, so a future edit knows what it is breaking:
 *
 *   --fs-body      20px     body, inputs, buttons, helper text
 *   --fs-small     18px     the absolute floor. Nothing smaller, ever.
 *   --fs-h1        32px     one question per screen, asked in full
 *   --tap          56px     every button and every input. 48px is the usual minimum and
 *                           this is deliberately above it: a thumb on a moving bus.
 *
 * CONTRAST. Every colour pair here is AAA (7:1 or better) against the ground it sits on,
 * computed rather than eyeballed - the ratios are in the test. There is no grey-on-grey
 * and no colour-only signal: every tag carries a word, and the green tick carries "All
 * set" beside it.
 *
 * NO RED. An applicant is never refused, so nothing on their side of the app is painted
 * the colour of a refusal. Something we need from them is amber and the sentence beside it
 * is an invitation. Red exists in app.css for the owner's screens and does not come here.
 */

.drive {
  --fs-body: 20px;
  --fs-small: 18px;
  --fs-h1: 32px;
  --fs-h2: 26px;
  --fs-h3: 22px;
  --tap: 56px;
  --gap: 20px;

  --d-helper: #4A4A4A;
  --d-done: #0F5D34;
  --d-done-bg: #EAF4EE;
  --d-attention: #6B4A00;
  --d-attention-bg: #FDF4E3;
  --d-waiting: #3F3F46;
  --d-waiting-bg: #F2F2F4;
  --d-line: #C9C9CE;

  font-size: var(--fs-body);
  line-height: 1.6;
}

.drive .wrap { max-width: 44rem; margin: 0 auto; padding-block: 24px 96px;
               padding-inline: 20px; }

/* ---- type ------------------------------------------------------------------------- */
.drive h1 { font-family: var(--display, inherit); font-size: var(--fs-h1);
            line-height: 1.2; margin: 4px 0 14px; text-wrap: balance; }
.drive h2 { font-size: var(--fs-h2); line-height: 1.25; margin: 40px 0 14px;
            text-transform: none; letter-spacing: 0; color: inherit; }
/* A token, not 22px: a heading that does not grow with the phone's large-text
   setting ends up smaller than the body text under it. */
.drive h3 { font-size: var(--fs-h3); margin: 0 0 10px; }
.dlede { font-size: var(--fs-body); color: var(--d-helper); max-width: 34ch;
         margin: 0 0 24px; }
/* The smallest text on the page, and it is still 18px. Named "small" for where it sits in
   the hierarchy, not for how little it can be read at. */
.dsmall { font-size: var(--fs-small); color: var(--d-helper); margin: 10px 0 0; }
.dhelp-text { font-size: var(--fs-small); color: var(--d-helper); margin: 8px 0 0; }

.dnote { background: var(--d-waiting-bg); color: #0B0B0C; padding: 18px 20px;
         border-radius: 12px; margin: 0 0 24px; font-size: var(--fs-body); }
.dnote.ok { background: var(--d-done-bg); border-left: 6px solid var(--d-done); }
.dnote.attention { background: var(--d-attention-bg);
                   border-left: 6px solid var(--d-attention); }

/* ---- the one thing this screen asks ---------------------------------------------- */
/* ONE QUESTION PER SCREEN. The step line above it, the question, the answer, then help.
   Nothing else competes for the eye, which is what makes a long form finishable. */
.dstep { font-size: var(--fs-small); color: var(--d-helper); letter-spacing: .02em;
         margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.dstepbar { height: 10px; border-radius: 999px; background: var(--d-waiting-bg);
            overflow: hidden; margin: 0 0 24px; }
.dstepbar i { display: block; height: 100%; background: var(--d-done);
              transition: width .25s; }

/* ---- buttons --------------------------------------------------------------------- */
/* Full width on a phone, 56px tall everywhere, and the label says what happens. These
   override app.css deliberately: the shared button is sized for somebody at a desk. */
.drive .btn, .drive button.dbig, .drive .dfile {
  min-height: var(--tap);
  font-size: var(--fs-body);
  padding: 14px 24px;
  border-radius: 12px;
}
.drive .btn, .drive button.dbig {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; border: 2px solid #0B0B0C; background: #0B0B0C; color: #FFFFFF;
  font: inherit; font-weight: 600; cursor: pointer; text-align: center;
}
.drive button.dbig.ghost, .drive .btn.ghost { background: #FFFFFF; color: #0B0B0C; }
.drive .btn:disabled, .drive button.dbig:disabled { opacity: .55; cursor: default; }
.dactions { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
@media (min-width: 560px) {
  .dactions { flex-direction: row; }
  .dactions > * { flex: 1; }
}

/* A link that is really a button still needs a thumb's worth of room. */
.drive .linkbtn, .drive a.dlink {
  min-height: 48px; display: inline-flex; align-items: center;
  font-size: var(--fs-body); padding: 10px 4px; color: #0B0B0C;
  text-decoration: underline; text-underline-offset: 3px; background: none;
  border: 0; font: inherit; cursor: pointer;
}

/* Keyboard focus, visible on both grounds. Never removed: the people this page is for
   are the likeliest to be using a keyboard or a switch. */
.drive :focus-visible { outline: 3px solid #0B0B0C; outline-offset: 3px;
                        border-radius: 6px; }
.drive .btn:focus-visible, .drive button.dbig:focus-visible {
  outline: 3px solid #0B0B0C; outline-offset: 4px;
}

/* ---- choosing a path ------------------------------------------------------------- */
.dpaths { display: grid; gap: 16px; }
.dpath { display: flex; flex-direction: column; gap: 8px; text-align: left;
         padding: 22px; border: 2px solid var(--d-line); border-radius: 14px;
         background: #FFFFFF; color: #0B0B0C; cursor: pointer; font: inherit;
         min-height: var(--tap); }
.dpath:hover, .dpath:focus-visible { border-color: #0B0B0C; }
.dpath b { font-size: 24px; }
.dpath span { color: var(--d-helper); font-size: var(--fs-small); line-height: 1.55; }

/* ---- the checklist --------------------------------------------------------------- */
/* Big green ticks, and a word beside every one of them. */
.dlist { list-style: none; margin: 0; padding: 0; display: flex;
         flex-direction: column; gap: 14px; }
.ditem { display: flex; align-items: center; gap: 16px; width: 100%;
         min-height: 72px; padding: 16px 18px; border: 2px solid var(--d-line);
         border-radius: 14px; background: #FFFFFF; color: #0B0B0C; font: inherit;
         text-align: left; cursor: pointer; }
.ditem:hover, .ditem:focus-visible { border-color: #0B0B0C; }
.ditem .dmark { flex: none; width: 44px; height: 44px; border-radius: 50%;
                display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.ditem .dnames { flex: 1; min-width: 0; }
.ditem .dnames b { display: block; font-size: var(--fs-body); font-weight: 600; }
.ditem .dnames span { display: block; font-size: var(--fs-small);
                      color: var(--d-helper); }
.ditem .dchev { flex: none; font-size: 26px; color: var(--d-helper); }

.ditem.done { background: var(--d-done-bg); border-color: var(--d-done); }
.ditem.done .dmark { background: var(--d-done); color: #FFFFFF; }
.ditem.done .dnames span { color: var(--d-done); }
.ditem.attention { background: var(--d-attention-bg); border-color: var(--d-attention); }
.ditem.attention .dmark { background: var(--d-attention); color: #FFFFFF; }
.ditem.attention .dnames span { color: var(--d-attention); }
.ditem.waiting .dmark { background: var(--d-waiting-bg); color: var(--d-waiting); }
.ditem.waiting .dnames span { color: var(--d-waiting); }

/* ---- a photograph ---------------------------------------------------------------- */
/* Two ways in, and the camera first because that is what nine people in ten will use. */
/* `text-transform: none` is not decoration. Something in app.css sets the buttons
   SHOUTING, and uppercase is measurably slower to read - worst for exactly the people
   this page is for, because the word shapes that fluent readers recognise are gone. */
.dfile { text-transform: none; position: relative; overflow: hidden; display: flex;
         align-items: center;
         justify-content: center; gap: 10px; width: 100%; border: 2px solid #0B0B0C;
         background: #0B0B0C; color: #FFFFFF; font: inherit; font-weight: 600;
         cursor: pointer; }
.dfile.ghost { background: #FFFFFF; color: #0B0B0C; }
.dfile input { position: absolute; inset: 0; opacity: 0; cursor: pointer;
               font-size: 200px; }

.dexample { margin: 0 0 20px; }
.dexample figcaption { font-size: var(--fs-small); color: var(--d-helper);
                       margin-top: 8px; }
.dexample .dshot { display: block; width: 100%; max-width: 100%; border-radius: 12px;
                   border: 2px solid var(--d-line); background: var(--d-waiting-bg); }

.dpreview { margin: 0 0 20px; }
.dpreview img { display: block; width: 100%; max-width: 100%; border-radius: 12px;
                border: 2px solid var(--d-line); }
.dverdict { margin: 14px 0 0; padding: 14px 18px; border-radius: 12px;
            font-size: var(--fs-body); }
.dverdict.ok { background: var(--d-done-bg); color: var(--d-done); }
.dverdict.attention { background: var(--d-attention-bg); color: var(--d-attention); }

/* ---- answering a question -------------------------------------------------------- */
.dfield { display: block; margin: 0 0 22px; }
.dfield > span { display: block; font-size: var(--fs-body); font-weight: 600;
                 margin: 0 0 8px; color: #0B0B0C; }
.dfield input[type="text"], .dfield input[type="tel"], .dfield input[type="number"],
.dfield select {
  font: inherit; font-size: var(--fs-body); color: #0B0B0C; width: 100%;
  min-height: var(--tap); padding: 12px 14px; border: 2px solid var(--d-line);
  border-radius: 12px; background: #FFFFFF;
}
.dfield input:focus, .dfield select:focus { border-color: #0B0B0C; }

/* THE DATE, AS THREE CHOICES. Never a typed format: 04/01/2029 is the first of April to
   one person and the fourth of January to another, and an <input type=date> on a desktop
   browser is a typed format with a calendar hidden behind an icon the size of a pea. */
.ddate { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 12px; }
.ddate label { display: block; }
.ddate label > span { display: block; font-size: var(--fs-small);
                      color: var(--d-helper); margin: 0 0 6px; }
.ddate select { font: inherit; font-size: var(--fs-body); width: 100%;
                min-height: var(--tap); padding: 12px 10px; border-radius: 12px;
                border: 2px solid var(--d-line); background: #FFFFFF; color: #0B0B0C; }
@media (max-width: 420px) {
  .ddate { grid-template-columns: 1fr; }
}

/* A tick box big enough to hit, and the sentence beside it is the label. */
.dagree { display: flex; align-items: flex-start; gap: 14px; margin: 18px 0;
          font-size: var(--fs-body); line-height: 1.5; cursor: pointer;
          min-height: var(--tap); padding: 8px 0; }
.dagree input { flex: none; width: 32px; height: 32px; margin: 2px 0 0; }
.dagree span { flex: 1; }

/* ---- help, on every single screen ------------------------------------------------ */
/* NOT A FOOTER LINK. The decision was "help on every screen with big Call us and Text us
   buttons", and this is that: two 56px buttons with the number written out, plus the way
   out of the form that loses nothing. */
.dhelp { margin: 36px 0 0; padding: 20px; border-radius: 14px;
         background: var(--d-waiting-bg); }
.dhelp h2 { font-size: 22px; margin: 0 0 6px; }
.dhelp .dhelprow { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
@media (min-width: 480px) {
  .dhelp .dhelprow { flex-direction: row; }
  .dhelp .dhelprow > * { flex: 1; }
}
.dhelp a.dcall { min-height: var(--tap); display: inline-flex; align-items: center;
                 justify-content: center; gap: 10px; border: 2px solid #0B0B0C;
                 border-radius: 12px; background: #FFFFFF; color: #0B0B0C;
                 font-size: var(--fs-body); font-weight: 600; text-decoration: none;
                 padding: 14px 20px; }
.dhelp a.dcall:hover, .dhelp a.dcall:focus-visible { background: #0B0B0C;
                                                     color: #FFFFFF; }

/* ---- the car, and the foot of the checklist -------------------------------------- */
.dveh { border-top: 2px solid var(--d-line); padding-top: 22px; margin-top: 22px; }
.dfoot { display: flex; flex-direction: column; gap: 16px; margin-top: 36px; }

/* 200% ZOOM AND PHONE LARGE-TEXT. Both come down to the same thing: nothing may have a
   fixed height that text can outgrow, and nothing may be wider than the screen. The rules
   above size by content and `--tap` is a MINIMUM height, so a doubled font makes every
   row taller rather than clipping it. This is the backstop for anything that slips. */
.drive img, .drive figure, .drive table { max-width: 100%; }

/* COMPONENTS BORROWED FROM app.css. The shared sign-in card, the toast and the topbar are
 * sized for somebody at a desk, and an applicant meets the sign-in card BEFORE any of the
 * screens above. So the floor is applied to anything inside this page that takes typing,
 * rather than restyling the shared components and changing four other apps.
 */
.drive .wrap input:not([type="file"]):not([type="checkbox"]),
.drive .wrap select,
.drive .wrap textarea,
.drive .wrap button {
  font-size: var(--fs-body);
  min-height: var(--tap);
}
/* app.css line 48 styles EVERY label as 12px uppercase with letter-spacing - which is
 * right on a dispatcher's dense form and wrong here in three separate ways. It leaks in
 * two directions: the size, and - because text-transform and letter-spacing inherit -
 * the shouting, which reached the labels' child spans even where the size did not.
 *
 * Uppercase is not a style question for this page. It removes the word shapes fluent
 * readers rely on, and it is measurably slower to read for exactly the people this app
 * is for. The whole of it is reset here rather than patched where it shows.
 */
.drive .wrap label {
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-weight: inherit;
  color: inherit;
  margin: 0;
}
.drive .wrap p, .drive .wrap li, .drive .wrap a { font-size: inherit; }
/* The toast carries the only confirmation that a document saved, so it is not a whisper. */
.drive .toast { font-size: var(--fs-body); padding: 16px 20px; }
