/* SGM mentor survey (index.html), its admin page (admin.html) and the admin sign-in
   page (login.html).

   The look follows the ION Lab palette on a white page (SPEC.md section 8): three colours
   and nothing else.
     white #FFFFFF  the background of everything (page, card, boxes, dialogs, fields)
     navy  #010F2A  the text, the frame of a chosen "Don't know", and the fill of the
                    admin's "3/3" chip
     pink  #EC2274  the accent: Next, the progress line, chosen estimates, slider fills and
                    thumbs, radio dots, most focus rings, the markers of errors, and the
                    admin's share bars and "Both complete" frame
   Secondary surfaces, borders, muted text and disabled states are navy or pink at a
   reduced opacity on the white (tints, not new hues). The layout is the one of the HEC
   Qualtrics skin it replaced (Questions.pdf): a framed card, the HEC logo top-right.
   (The first drafts had the same palette inverted, white on navy; on review the white
   page was preferred. In this palette since 1.5.0.)

   Contrast (WCAG 2) drove these choices:
   * Navy on white is 19:1, so all text is navy or a navy tint that keeps >= 4.5:1
     (--muted is 7.8:1 on the white, 7:1 on the tinted boxes).
   * Pink on white is 4.16:1, under the 4.5:1 of normal text: no text is pink. An error
     message is navy, and the pink marks it: a "!" badge, a bar or a frame.
   * White on pink is also 4.16:1, enough only for LARGE text (>= 18.66 px bold): so the pink
     buttons carry 19 px bold white text, and small text on a pink fill (a chosen estimate
     "75%", the "!" of an error, the admin's "x2") is navy (4.58:1).
   * Controls need 3:1 against the white: pink is 4.16:1, outlines (--edge, navy at 60 %)
     5.1:1, also around the slider track. Inside the track (--track, navy at 10 %) the pink
     fill and thumb keep 3.4:1, so the five sliders still read as bars. The lighter tints
     (--line, --surface) only draw separators and surfaces that carry no state on their own.
   * Pink means "act here", "chosen" or "error", so it is not used for what is none of
     these: a disabled Next is grey like the other disabled buttons, and the focus ring is
     navy wherever a pink one would look like a chosen or an invalid control.
   * Pink marks both the accent and errors, so an error never relies on the colour: it has
     its message, a "!" badge and its own border style (a dashed frame around an incomplete
     comparison row, where chosen buttons are pink fills).

   Everything that the Qualtrics page did with inline styles lives here as classes, because
   the CSP allows styles from 'self' only (no style="" attributes). The only styles set from
   JavaScript are the progress-bar width and the slider fill (--fill), which CSP allows
   (element.style is not an inline style attribute).

   Hover tints apply only where a pointer can hover (@media (hover: hover)): on a phone a
   tapped control keeps :hover, and a stuck tint would look like a state (a half-ticked
   Don't-know box, a darker Next after a refused tap).

   Mobile first: mentors fill the survey on phones at the table. Every control is at least
   40 px tall (the sliders' touch band is 32 px: see .rng), slider thumbs are 26 px (32 px
   on touch screens), and nothing is wider than a 360 px screen. */

:root {
  /* The native parts (the number field's arrows, the open select list, scrollbars, and
     the controls that forced-colours mode turns native again) are drawn for a light page,
     with the pink as their accent. The radios, the checkboxes (Don't know, the admin's
     "Refresh every 30 s"), the sliders and the closed select are drawn below (the admin's
     Export menu keeps native radios, in navy). */
  color-scheme: light;
  accent-color: #EC2274;

  /* the palette */
  --navy: #010F2A;
  --pink: #EC2274;
  --white: #FFFFFF;

  /* tints of it (ratios against the white; SPEC.md section 8 has the full table) */
  --text: var(--navy);
  --muted: rgba(1, 15, 42, .72);           /* secondary text: 7.8:1 */
  --faint: rgba(1, 15, 42, .58);           /* disabled text: 4.7:1 */
  --surface: rgba(1, 15, 42, .05);         /* boxes, hover */
  --surface-strong: rgba(1, 15, 42, .09);  /* hover on outline controls */
  --line: rgba(1, 15, 42, .14);            /* separators, card frame, progress track */
  --edge: rgba(1, 15, 42, .6);             /* outline controls: 5.1:1 (>= 3:1) */
  --surface-chosen: rgba(1, 15, 42, .3);   /* a chosen "Don't know" (navy text 9.5:1) */
  --track: rgba(1, 15, 42, .1);            /* inside a slider's track (pink 3.4:1 on it) */
  --pink-tint: rgba(236, 34, 116, .07);    /* behind an error message */
  --pink-step: rgba(236, 34, 116, .16);    /* the admin's share-bar track (pink fill 3.3:1 on it) */
  --pink-hover: #C91F69;                   /* a darker pink: white text 5.4:1 */
  --overlay: rgba(1, 15, 42, .4);          /* behind a dialog: a veil, not a dark page */
  --shadow: rgba(1, 15, 42, .35);          /* under a slider thumb and a dialog */
}

@media (prefers-contrast: more) {
  :root {
    --muted: var(--navy);
    --faint: rgba(1, 15, 42, .72);
    --line: rgba(1, 15, 42, .5);
    --edge: var(--navy);
  }
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

::selection { background: var(--pink); color: var(--navy); }

a:not(.btn) { color: var(--navy); text-decoration-color: var(--pink); }

/* Visible focus rings for keyboard users: pink on the white (4.16:1) around outline
   buttons, sliders and links. Navy (19:1) where a pink ring would read as a state:
   * around the pink fills (it would read as a bigger button);
   * on the controls whose chosen state is pink or whose error is a pink ring: radios, the
     Don't-know and admin boxes, the name select (a focused valid field looked invalid),
     the exact-value field and its "N%" button (left focused after Enter on a phone);
   * on the estimate circles, at offset 0: a pink ring beside a chosen (pink) estimate read
     as a second answer, and a 2 px offset ran into the "Low" caption above.
   Pink again around the chosen "Don't know", whose frame is navy. Headings focused by
   script on a screen change (tabindex="-1") do not need one. */
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.btn-primary:not(.btn-back):focus-visible,
.choice input[type="radio"]:focus-visible,
.dk-box:focus-visible,
.toggle input:focus-visible,
.select:focus-visible,
.exact-input:focus-visible,
.bin-value:focus-visible,
.est-btn:focus-visible { outline-color: var(--navy); }
.est-btn:focus-visible { outline-offset: 0; }
.est-dk[aria-pressed="true"]:focus-visible { outline-color: var(--pink); }
[tabindex="-1"]:focus { outline: none; }

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

/* ---- page and card ---------------------------------------------------------------- */

.page { padding: 32px 16px 48px; }

/* White on the white page: a thin navy-tint frame and the pink edge on top keep the card's
   shape on a desktop screen. */
.card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 6px solid var(--pink);
  padding: 32px;
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 28px;
}

.logo { display: block; width: 150px; height: auto; }

.progress { align-self: stretch; margin-top: 16px; }
.progress-text { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.progress-track { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--pink); transition: width .3s ease; }

@media (max-width: 600px) {
  .page { padding: 0; }
  /* svh = the height with the browser's toolbars shown (iOS Safari's 100vh is the height
     without them, so a short card overflowed by the toolbar); 100vh where svh is unknown.
     The card fills the phone's screen: no side frame, the pink edge stays on top. */
  .card { padding: 16px; min-height: 100vh; min-height: 100svh; border-width: 4px 0 0; }
  .card-header { margin-bottom: 20px; }
  .logo { width: 110px; }
}

/* ---- text --------------------------------------------------------------------------- */

h1, h2, h3 { margin: 0; }

.q-title { font-size: 19px; font-weight: 700; margin: 0 0 2.2em; }
.q-text { font-size: 19px; font-weight: 400; line-height: 1.45; margin: 0 0 16px; }
.q-bold { font-size: 18px; font-weight: 700; margin: 0 0 15px; }
.q-heading { font-size: 26px; font-weight: 400; line-height: 1.25; margin: 0 0 8px; }
.q-intro { color: var(--muted); margin: 0 0 16px; }
.q-note { color: var(--muted); margin: 8px 0 0; }
.q-help { color: var(--muted); font-size: 0.95em; margin: 12px 0 0; }
.venture-desc { font-size: 16px; margin: 16px 0 0; }

/* Navy, bold, with the pink "!" badge: pink text on the white would be under 4.5:1. */
.q-error { color: var(--navy); font-weight: 700; margin: 0; }
.q-error:empty { display: none; }
.q-error:not(:empty) { margin: 0 0 8px; }

/* The "!" badge: a navy mark on a pink disc (4.58:1) for an error; a white mark on a navy
   disc (19:1) for a note and for the total hint. Decoration only: the message says it
   all, so screen readers skip it ("/ ''" is its empty alternative text; a browser without
   that syntax keeps the first declaration). */
.q-error::before,
.total-warn::before,
.box-error::before,
.box-note::before,
.banner-warn::before,
.save-status.is-error::before,
.admin-msg.is-error::before {
  content: "!";
  content: "!" / "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 1px;
}

/* ---- buttons ------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 64px;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
/* White on pink is AA for large text only: 19 px bold (>= 18.66 px bold). */
.btn-primary { background: var(--pink); border-color: var(--pink); color: var(--white); font-size: 19px; font-weight: 700; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--pink-hover); border-color: var(--pink-hover); }
}
/* Outline buttons: "<<" (a btn-primary in survey.js, styled here), Normalize, Clear all,
   Retry, "Start over", the admin's buttons. */
.btn-secondary,
.btn-primary.btn-back { background: transparent; border-color: var(--edge); color: var(--navy); }
@media (hover: hover) {
  .btn-secondary:hover,
  .btn-primary.btn-back:hover { background: var(--surface-strong); border-color: var(--navy); }
}
/* Disabled (Next until the total is 100 % or while no venture was found, "Starting…", and
   the outline buttons): a light outline and dimmed text, in the button's usual place. Not
   pink: a pink outline read as a live outline button (and, under the pink error box, as part
   of the error); a pink fill at a low opacity read as a fourth colour. */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-primary.btn-back:disabled { background: transparent; border-color: var(--line); color: var(--faint); cursor: not-allowed; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}
.nav .btn-next { margin-left: auto; }

/* ---- setup: radio questions --------------------------------------------------------- */

.question {
  border: 0;
  margin: 0;
  padding: 0 0 24px;
  min-width: 0;
}
.question + .question { border-top: 1px solid var(--line); padding-top: 24px; }
/* A floated legend is laid out like a normal block, instead of sitting in (and cutting)
   the fieldset's top border. */
.question legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; }
.question > * { clear: both; }
/* Unanswered: a pink bar on the left; the message in it is navy with the pink "!". */
.question.is-invalid { box-shadow: inset 4px 0 0 var(--pink); padding-left: 16px; }

.choices { display: flex; flex-direction: column; gap: 2px; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}
@media (hover: hover) {
  .choice:hover { background: var(--surface); }
  .choice:hover input[type="radio"]:not(:checked):not(:disabled) { border-color: var(--navy); }
}
/* Drawn by us like the Don't-know box, so they are the same on every platform and in the
   palette. Unchosen: a navy-tint ring; chosen: a pink ring around a pink dot. */
.choice input[type="radio"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.choice input[type="radio"]:checked {
  border-color: var(--pink);
  background: radial-gradient(circle, var(--pink) 0 5px, transparent 5.5px);
}
.choice input[type="radio"]:disabled { border-color: var(--line); }
.choice.is-disabled { color: var(--faint); cursor: not-allowed; }
.choice.is-disabled:hover { background: none; }
.choice.is-disabled input { cursor: not-allowed; }

.loading-line { display: flex; align-items: center; gap: 12px; color: var(--muted); }

/* ---- name --------------------------------------------------------------------------- */

/* Drawn by us (appearance: none, own navy arrow), so the closed field looks the same on
   every platform (iOS Safari otherwise paints its own grey gradient field). The open list
   stays native; each option sets both colours, so a platform that applies one of them
   applies the other too. */
.select {
  display: block;
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  padding: 8px 40px 8px 10px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23010F2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 12px 8px no-repeat;
  color: var(--navy);
  font: inherit;
  font-size: 16px;   /* 16 px or more stops iOS from zooming into the field */
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.select option { background-color: var(--white); color: var(--navy); }
.select option:checked { background-color: var(--pink); color: var(--navy); }
@media (hover: hover) {
  .select:hover { border-color: var(--navy); }
}
.select:disabled { color: var(--muted); border-color: var(--line); background-color: var(--surface); cursor: not-allowed; }
.select.is-invalid { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.retry-row { margin-top: 12px; }

/* ---- verify ------------------------------------------------------------------------- */

.verify {
  max-width: 600px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.verify-title { font-size: 26px; font-weight: 600; color: var(--navy); margin: 0 0 20px; }
.info-box { background: var(--surface); padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.info-box p { margin: 0 0 8px; color: var(--navy); font-size: 18px; }   /* the values are what the mentor checks */
.info-box p:last-child { margin-bottom: 0; }

/* Three kinds of box, told apart by more than colour: success = solid navy bar and its
   "✓" title; note = dashed navy-tint frame and a navy "!" badge; error = pink frame, pink
   tint and a pink "!" badge. Their text is always navy.
   A note that only waits for the network (.is-busy: "Connecting to the server…" on Verify,
   "They are being sent now" on the welcome screen) turns the End screen's spinner where
   the badge would be: it says "working on it", not "look out", and the mentor has nothing
   to do but wait (or press Next). */
.box { padding: 15px; border-radius: 4px; margin-bottom: 16px; font-size: 18px; color: var(--navy); }
.box p { margin: 0 0 10px; }
.box p:last-child { margin-bottom: 0; }
.box-success { background: var(--surface); border-left: 4px solid var(--navy); }
.box-success .box-title { color: var(--navy); font-weight: 700; font-size: 19px; }
.box-note,
.box-error { position: relative; padding-left: 50px; }
.box-note { border: 2px dashed var(--edge); }
.box-error { background: var(--pink-tint); border: 1px solid var(--pink); border-left-width: 4px; }
.box-note::before,
.box-error::before { position: absolute; left: 14px; top: 17px; margin: 0; }
.box-note::before { background: var(--navy); color: var(--white); }
.box-note.is-busy::before {
  content: "";
  border: 3px solid var(--line);
  border-top-color: var(--pink);
  background: none;
  animation: spin .9s linear infinite;
}
.venture-list { margin: 10px 0 0; padding-left: 28px; }
.venture-list li { padding: 3px 0; }
.verify-hint { text-align: center; color: var(--muted); font-size: 18px; margin: 20px 0 0; }
.verify-hint strong { color: var(--navy); }
.verify-loading { text-align: center; color: var(--muted); font-size: 19px; padding: 20px 0; margin: 0; }
/* "Connecting…" or "Could not start the survey: …", added under the hint after a press of Next. */
.verify .start-error { margin: 20px 0 0; }

@media (max-width: 600px) {
  .verify { padding: 16px; border: 0; }
  .verify-title { font-size: 22px; }
}

/* ---- valuation sliders -------------------------------------------------------------- */

.bin { margin-bottom: 10px; }
.bin-label { display: block; font-weight: 600; }
.bin-row { display: flex; align-items: center; gap: 10px; }

/* The touch band of a slider is 32 px (the coarse-pointer thumb's size), not the 44 px
   of other controls: five full-width sliders fill the middle of a phone screen, right
   where a thumb rests to scroll, and in Chrome/Android a swipe that starts on one moves
   it (survey.js puts the value back when the swipe turns into a scroll).
   A light track in a navy-tint outline (5.1:1 on the white), pink fill up to a pink thumb:
   the pink keeps 3.4:1 against the inside of the track (on a mid-grey track it was a change
   of hue only, 1.15:1, and the five sliders no longer read as bars). The thumb's white ring
   keeps it apart from the pink fill, and a soft shadow lifts it off the page. */
.rng {
  --fill: 0%;
  flex: 1;
  min-width: 0;
  height: 32px;              /* the touch area; the visible track is 8 px */
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.rng::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid var(--edge);
  border-radius: 5px;
  background: linear-gradient(to right, var(--pink) var(--fill), var(--track) var(--fill));
}
.rng::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--pink);
  box-shadow: 0 1px 4px var(--shadow);
}
.rng::-moz-range-track { height: 8px; border: 1px solid var(--edge); border-radius: 5px; background: var(--track); }
.rng::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--pink); }
.rng::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--pink);
  box-shadow: 0 1px 4px var(--shadow);
}
.rng:disabled { cursor: not-allowed; opacity: .6; }

@media (pointer: coarse) {
  .rng::-webkit-slider-thumb { width: 32px; height: 32px; margin-top: -12px; }
  .rng::-moz-range-thumb { width: 28px; height: 28px; }
}

/* "N%": a button, because tapping it opens the exact-value field (1-point moves are hard
   with a finger). The dotted underline hints that it can be tapped. */
.bin-value {
  flex: none;
  min-width: 64px;
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: underline dotted var(--faint);
  text-underline-offset: 4px;
  cursor: text;
}
@media (hover: hover) {
  .bin-value:hover { border-color: var(--line); }
}
.exact-input {
  flex: none;
  width: 64px;
  min-height: 44px;
  padding: 4px 6px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.dk-row { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 6px; }
/* The Don't-know box, and the admin's "Refresh every 30 s" box drawn the same way (so both are
   the same on every platform and in the palette): a navy-tint-edged box, pink with a
   white tick when ticked. */
.dk-box,
.toggle input[type="checkbox"] {
  flex: none;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 2px solid var(--edge);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
@media (hover: hover) {
  .dk-box:hover,
  .toggle:hover input[type="checkbox"] { border-color: var(--navy); background: var(--surface-strong); }
}
.dk-box:checked,
.toggle input[type="checkbox"]:checked {
  border-color: var(--pink);
  background: var(--pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.dk-box:disabled { cursor: not-allowed; opacity: .6; }
.dk-row label { font-weight: 600; cursor: pointer; }

.total-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 12px;
}
.total { font-weight: 700; margin: 0; }
.total-row .btn { min-height: 40px; padding: 6px 12px; }
/* "Please make the total exactly 100%." shows from the first, untouched 0 % view, so it
   is a hint (navy, normal weight, the navy badge of a note), not an error: Next stays
   disabled until the total is right. Pink is for the errors a press of Next brings up. */
.total-warn { color: var(--navy); font-weight: 400; margin: 0 0 0 auto; }
.total-warn::before { background: var(--navy); color: var(--white); }
.total-warn:empty { display: none; }

@media (max-width: 600px) {   /* total, then both buttons on one line, then the warning */
  .total, .total-warn { flex-basis: 100%; margin-left: 0; }
}

/* ---- comparison grid ---------------------------------------------------------------- */

.instructions { font-size: 16px; }
.instructions p { margin: 0 0 12px; }

.banner-slot:empty { display: none; }
.banner-warn {
  position: relative;
  margin: 12px 0;
  padding: 10px 12px 10px 46px;
  border: 1px solid var(--pink);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--pink-tint);
  color: var(--navy);
  font-size: 15px;
}
.banner-warn::before { position: absolute; left: 12px; top: 10px; margin: 0; }

.dim { margin: 16px 0 20px; padding: 10px 12px; border-radius: 8px; }
/* Dashed, not solid: the chosen estimates inside are pink fills too. */
.dim.is-invalid { outline: 2px dashed var(--pink); outline-offset: -2px; background: var(--pink-tint); }
.dim-label { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.dim-desc { font-size: 16px; color: var(--muted); margin: 0 0 8px; }
.est-label { font-weight: 700; margin: 12px 0 4px; }

.est-scale { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; }
.est-cell { display: flex; flex-direction: column; align-items: center; }
.est-cap { height: 16px; font-size: 11px; line-height: 16px; color: var(--muted); }

/* Unchosen: an outline. Chosen: a pink fill with navy text (white would be under 4.5:1 at
   13 px). "Don't know" chosen: a navy frame on a navy-tint fill, bold, so it is not mistaken
   for a scale value and stays lighter than the pink answers (a solid navy block was the
   heaviest thing on the screen). */
.est-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
@media (hover: hover) {
  .est-btn:hover { border-color: var(--navy); background: var(--surface-strong); }
}
.est-btn[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--navy); font-weight: 700; }
.est-dk {
  width: auto;
  min-width: 104px;
  height: 40px;
  margin-top: 8px;
  padding: 0 12px;
  border-radius: 5px;
}
.est-dk[aria-pressed="true"] { background: var(--surface-chosen); border-color: var(--navy); color: var(--navy); }
.est-btn:disabled { cursor: not-allowed; opacity: .6; }

/* ---- mentoring intent --------------------------------------------------------------- */

.intent-note { font-size: 19px; margin: 0 0 16px; }

/* ---- welcome: data protection and consent (1.7.0) ---------------------------------------- */

.consent {
  margin: 8px 0 0;
  padding: 18px;
  background: var(--surface);
  border-left: 4px solid var(--navy);
  border-radius: 4px;
}
.consent.is-invalid { border-left-color: var(--pink); box-shadow: none; padding-left: 18px; }
.consent-title { font-size: 19px; font-weight: 700; color: var(--navy); }
.consent-text { font-size: 17px; line-height: 1.45; margin: 0 0 12px; }
.consent-points { margin: 0 0 12px; padding-left: 22px; font-size: 17px; line-height: 1.45; }
.consent-points li { margin: 0 0 6px; }
.consent-choice { align-items: flex-start; font-weight: 700; }
.consent-choice input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--pink);
  cursor: pointer;
}
.consent-choice input[type="checkbox"]:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.consent-decline { color: var(--muted); font-size: 16px; margin: 12px 0 0; }

/* The full notice (static/privacy.html, 1.7.0): plain reading text in the survey's card. */
.notice main { font-size: 17px; line-height: 1.5; }
.notice h2 { font-size: 19px; font-weight: 700; color: var(--navy); margin: 26px 0 8px; }
.notice p { margin: 0 0 12px; }
.notice ul { margin: 0 0 12px; padding-left: 22px; }
.notice li { margin: 0 0 8px; }
.notice-version { color: var(--muted); margin: -8px 0 16px; }
.notice-back { margin: 28px 0 0; color: var(--muted); }

/* ---- end ---------------------------------------------------------------------------- */

.end-body { font-size: 19px; }
.end-body p { margin: 0 0 16px; }

.spinner {
  flex: none;
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner,
  .box-note.is-busy::before { animation-duration: 3s; }
  .progress-fill { transition: none; }
}

/* ---- a new screen's first moments, and the page before survey.js runs ---------------- */

/* survey.js sets .is-settling on #app for a moment after each screen change: the second
   tap of a double tap on Next must not land on the new screen's controls. */
.is-settling, .is-settling * { pointer-events: none !important; }

/* index.html's own content of #app, replaced as soon as survey.js runs. If the script did
   not load (a dropped connection on the first visit), the mentor is told to reload; that
   hint appears only after a few seconds, so a normal load does not flash it. */
.boot-help { color: var(--muted); animation: boot-help-in 0s 4s both; }
@keyframes boot-help-in { from { visibility: hidden; } to { visibility: visible; } }

/* ---- save status line --------------------------------------------------------------- */

/* The words tell the states apart ("Saving…", "Saved ✓", "Couldn't save yet — retrying",
   "Could not save: …"); weight and the pink "!" of the error only add to them. */
.save-status { margin: 20px 0 0; min-height: 1.5em; font-size: 14px; color: var(--muted); }
.save-status.is-ok { color: var(--navy); }
.save-status.is-warn { color: var(--navy); font-weight: 700; }
.save-status.is-error { color: var(--navy); font-weight: 700; }
.save-status.is-error::before { width: 20px; height: 20px; font-size: 14px; }
/* 1.6.0: after 3 failed sends, "Wi-Fi not working? Switch it off to use your mobile data."
   on its own line, in the normal weight: advice, not a second alarm. */
.save-hint { display: block; margin-top: 2px; font-weight: 400; }
/* "Other ways to send your answers" (after 2 failed sends): a button that opens the
   rescue panel, drawn as a link (navy, pink underline) with a full touch height. */
.save-more { margin: 4px 0 0; }
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}
@media (hover: hover) {
  .link-button:hover { text-decoration-color: var(--navy); }
}

/* ---- offline (1.6.0) ------------------------------------------------------------------ */

/* "Offline: using the list saved on this phone at 14:05." Small and calm (a list kept on
   the phone is a working list): muted text by a navy-tint bar. */
.offline-note {
  margin: 0 0 16px;
  padding: 4px 0 4px 12px;
  border-left: 3px solid var(--edge);
  color: var(--muted);
  font-size: 15px;
}
.note-slot:empty { display: none; }
/* "No connection right now — your answers are kept on this phone…": a note with a navy
   "i", not the "!" of a warning: nothing is wrong and nothing is asked of the mentor. */
.box-note.is-info::before { content: "i"; content: "i" / ""; font-family: Georgia, "Times New Roman", serif; font-style: italic; }

/* The rescue panel: the End screen's "not saved yet" and the dialog of "Other ways to send
   your answers". Ways stacked, separated by thin lines; the QR codes navy on white with
   their own white quiet zone (part of the SVG), never recoloured (forced colours below). */
.rescue { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.dialog .rescue { margin-top: 0; padding-top: 0; border-top: 0; }
.rescue-title { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.rescue-intro { margin: 0 0 8px; font-size: 16px; color: var(--muted); }
.rescue-way { padding: 16px 0; border-top: 1px solid var(--line); }
.rescue-way:last-child { padding-bottom: 0; }
.rescue-way-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.rescue-help { margin: 6px 0 0; font-size: 16px; color: var(--muted); }
.rescue-code { margin: 16px 0 0; text-align: center; }
.rescue-code-of { margin: 0 0 8px; font-weight: 700; }
svg.qr { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; background: var(--white); }
.rescue-done { margin: 0; font-weight: 700; }
.rescue-mail { margin-top: 2px; }
.rescue-copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rescue-copied { font-weight: 700; }
.rescue-copied:empty { display: none; }
/* The code as text: to copy by hand, or (rescue page) to paste into. */
.rescue-text {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
  resize: vertical;
}
.rescue-text:focus-visible { outline-color: var(--navy); }

/* The rescue page (/rescue, on a team member's phone). */
.rescue-page-title { margin-bottom: 1em; }
.rescue-result:empty { display: none; }
.rescue-result { margin-bottom: 16px; }
.rescue-label { display: block; margin-top: 24px; font-weight: 700; }
.rescue-paste { font-size: 16px; }                 /* 16 px: iOS does not zoom into the field */
.rescue-close { color: var(--muted); }

/* ---- dialogs (resume, time limit) --------------------------------------------------- */

.overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay);
}
.dialog {
  width: 100%;
  max-width: 480px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--pink);
  background: var(--white);
  box-shadow: 0 12px 40px var(--shadow);
}
.dialog-text { margin: 0; font-size: 19px; }
/* The rescue panel in a dialog: wider, and scrolls inside (codes and three ways are taller
   than a phone screen). On a phone the frame gives the code its room. */
.dialog-wide { max-width: 560px; max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); overflow-y: auto; }
@media (max-width: 600px) {
  .overlay { padding: 8px; }
  .dialog-wide { padding: 16px; max-height: calc(100vh - 16px); max-height: calc(100svh - 16px); }
}
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.dialog-actions .btn { font-size: 19px; }   /* "Start over" as tall as the pink "Resume" */

/* ---- admin page --------------------------------------------------------------------- */

.admin .card { max-width: 1100px; }
.admin-header { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; }
.admin-header h1 { font-size: 24px; font-weight: 700; }
.admin h2 { font-size: 19px; margin: 28px 0 12px; }
.admin h3 { font-size: 18px; margin: 24px 0 4px; }
.admin h4 { font-size: 16px; margin: 16px 0 6px; }

.admin-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.field .select { min-width: 180px; font-weight: 400; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.toggle input[type="checkbox"] { width: 22px; height: 22px; }
.toggle input[type="checkbox"]:checked { background-size: 16px; }

/* Hub, Session, Stream, Shift, Show: one row on a laptop (Hub and Stream wider, for
   "CDL Next Gen Computing"); on a phone Hub on its own row, then two to a row. */
.admin-filters .field { flex: 1 1 150px; }
.admin-filters .field-hub { flex-basis: 230px; }
.admin-filters .field-stream { flex-basis: 200px; }
.admin-filters .field .select { min-width: 0; max-width: none; }
@media (max-width: 600px) {
  .admin-filters .field-hub { flex-basis: 100%; }
  .admin-filters .field-stream { flex-basis: 150px; }
}

.admin-msg { min-height: 1.5em; margin: 16px 0 0; }
.admin-msg.is-error { color: var(--navy); font-weight: 700; }
.admin-msg.is-ok { color: var(--navy); }

/* Under the filters (1.6.7): one quiet line in small muted text, "Updated 14:05 · [ ] Refresh
   every 30 s" on the left and the Export menu on the right. On a phone it wraps, and Export
   keeps to the right of its own line. The line is the panel's anchor (position: relative):
   the panel opens under it, against its right edge and never wider than it, so it neither
   moves the page (it overlays what is below) nor leaves the screen at 390 px. */
.admin-tools { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin-top: 12px; font-size: 14px; color: var(--muted); }
/* "Updating…" (about 70 px at 14 px) and "Updated 14:05" (about 92 px in Arial, 93 in
   Helvetica Neue; every time as wide, with tabular figures) take the same room, so the box and
   Export do not move at each reload, nor does Export jump between one line and two on a
   phone: the line wraps the same way whatever it says. Another day's "Updated 29/09/2026
   14:05" simply grows past it. */
.admin-updated { min-width: 6.8em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-tools .toggle { min-height: 32px; gap: 6px; }
.admin-tools .toggle input[type="checkbox"] { width: 18px; height: 18px; }
.admin-tools .toggle input[type="checkbox"]:checked { background-size: 13px; }

/* The Export menu: a native <details> whose <summary> is a small outline button with a
   chevron (borders in currentColor, so forced colours keep it). The panel is white with a
   thin frame and a soft shadow; navy text, muted legend and note, native radios in navy
   (the pink stays for the one link most exports want). */
.export-menu { margin-left: auto; }
.export-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.export-button::-webkit-details-marker { display: none; }
.export-button::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.export-menu[open] > .export-button { border-color: var(--navy); background: var(--surface); }
.export-menu[open] > .export-button::after { margin-top: 3px; transform: rotate(-135deg); }
@media (hover: hover) {
  .export-button:hover { border-color: var(--navy); background: var(--surface-strong); }
}
.export-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 10;
  width: 360px;
  max-width: 100%;
  padding: 12px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 20px -8px var(--shadow);
  color: var(--navy);
  font-size: 14px;
}
.export-scope { min-width: 0; margin: 0; padding: 0; border: 0; }
.export-scope legend { padding: 0; margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.export-choice { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; cursor: pointer; }
.export-choice input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--navy); cursor: pointer; }
.export-choice input:focus-visible { outline-color: var(--navy); }
.export-links { margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); list-style: none; }
.export-panel a.export-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--edge);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.export-panel a.export-link-main { font-weight: 700; text-decoration-color: var(--pink); text-decoration-thickness: 2px; }
@media (hover: hover) {
  .export-panel a.export-link:hover { text-decoration-color: var(--navy); }
}
.export-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* "Signed in as … · Sign out" under the header (1.6.6). Sign out is a form's button
   (a POST, no script), drawn as a link. */
.admin-account { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0 6px;
  margin: -16px 0 4px; font-size: 14px; color: var(--muted); }
.admin-account form { margin: 0; }
.admin-account .link-button { font-size: 14px; }
/* What the account's role shows (1.7.0): one quiet line under the account line. */
.admin-role-note { margin: 0 0 14px; padding: 8px 12px; font-size: 14px; color: var(--navy);
  background: var(--surface); border-left: 3px solid var(--navy); border-radius: 3px; }

/* The sign-in page (/admin/login, 1.6.6): a narrow card with the admin header, two fields
   in the select's outline and focus ring, and the pink button. Its error line is the
   admin message's, hidden while empty (its "!" badge would show alone). */
.login .card { max-width: 520px; }
.login-title { font-size: 19px; margin: 0; }
.login-error:empty { display: none; }
.login-form { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 20px; }
.login-form .field { align-self: stretch; font-size: 16px; }
.text-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 16px;   /* 16 px or more stops iOS from zooming into the field */
  font-weight: 400;
}
@media (hover: hover) {
  .text-input:hover { border-color: var(--navy); }
}
.text-input:focus-visible { outline-color: var(--navy); }
.login-help { margin: 28px 0 0; font-size: 14px; color: var(--muted); }

/* The counts of what Stream and Shift choose, above the tables (1.6.5): a tinted box (muted
   text 7.4:1 on it) with "Counts" and the choice on one line, four white tiles (Mentor seats,
   Before, After and Both complete: 4 across on a laptop, 2 x 2 on a phone), the partial counts
   as two neutral pills, and the notes. One accent only: the pink share bars and the pink frame
   of "Both complete", the number the analysis needs. Navy text, muted labels (7.8:1 on the
   tiles); the bars are decorative (aria-hidden), the text beside them says the numbers. The
   figures are proportional: tiles are read one by one, not as a column of digits. */
.summary { margin: 0 0 8px; padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); container-type: inline-size; }
.summary-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 16px; margin: 0 0 10px; }
.admin .summary-title { font-size: 15px; font-weight: 700; margin: 0; }
.summary-scope { margin: 0; font-size: 14px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
/* Four tiles or two rows of two, never three and one (a narrow laptop window). Four fit
   from a content width of 590 px (4 x 140 + 3 x 10); "width < 590px", not "max-width:
   589px", so a fractional width between the two (browser zoom) is not left to auto-fit's
   3 + 1. The query measures the box's content, inside its padding and border. */
@container (width < 590px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
/* 1.5 px of pink: the 1 px border and half a pixel inside it, so the tile does not move. */
.kpi-key { border-color: var(--pink); box-shadow: inset 0 0 0 .5px var(--pink); }
.kpi p { margin: 0; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 600; line-height: 1.25; }
.kpi-sub { padding-bottom: 8px; font-size: 13px; color: var(--muted); }
.share-bar { display: block; overflow: hidden; background: var(--pink-step); }
.share-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--pink); }
/* at the foot of its tile: the bars of a row line up even when a label wraps */
.share-bar-kpi { height: 6px; margin-top: auto; border-radius: 3px; }
.share-bar-mini { height: 4px; margin-top: 3px; border-radius: 2px; }
.summary-partial { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; font-size: 14px; }
.summary-partial-label { color: var(--muted); margin-right: 2px; }
.count-pill { padding: 1px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 13px; white-space: nowrap; }
.count-pill strong { font-weight: 600; }
.summary-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* A shift's own counts above its table: "Before 14/35" over a 4 px bar, three times, then
   the partial counts in small muted text; on a phone they wrap. */
.shift-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.shift-share { display: block; min-width: 96px; }
.shift-share strong { font-weight: 600; color: var(--navy); }
.shift-partial { font-size: 13px; }
.table-wrap { overflow-x: auto; }
.status-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.status-table th, .status-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.status-table th { font-weight: 600; }
/* Only the column headers are small and muted: the mentor names (row headers) are what
   staff scan. */
.status-table thead th { font-size: 13px; color: var(--muted); }
.status-table td.num { text-align: right; width: 5em; }
/* A hovered row is marked by a bar on its left (pointer devices only). */
@media (hover: hover) {
  .status-table tbody tr:hover > :first-child { box-shadow: inset 3px 0 0 var(--edge); }
}

/* Status chips: "—" none, "2/3" partial, "3/3 ✓" complete. The text says the state; the
   style ranks them: a muted dash alone (most cells of a table, so no frame to scan past),
   a pink outline (needs a look), a navy fill (done). "×2" is navy on a pink pill (small
   text: pink text would be under 4.5:1 on the white). */
.chip {
  display: inline-block;
  min-width: 56px;
  padding: 2px 10px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.chip-none { color: var(--muted); }
.chip-partial { border-color: var(--pink); color: var(--navy); }
.chip-complete { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip-time { margin-left: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.chip-many {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pink);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.admin-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.admin-footer p { margin: 0 0 6px; }
/* Refresh Airtable and Resync Google Sheet (1.6.7): small link buttons beside the line they
   act on, navy with a navy-tint underline (quieter than Sign out's pink); their messages go
   to the line under them, which takes no room while empty. */
.admin-foot-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.admin-footer .link-button {
  min-height: 0;
  padding: 2px 0;
  font-size: 14px;
  font-weight: 600;
  text-decoration-color: var(--edge);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
@media (hover: hover) {
  .admin-footer .link-button:hover { text-decoration-color: var(--navy); }
}
.admin-footer .link-button:disabled { color: var(--faint); text-decoration-color: var(--line); cursor: not-allowed; }
.admin-footer .admin-foot-msg { min-height: 0; margin: 6px 0 0; }
.admin-footer .admin-foot-msg:empty { margin: 0; }
.warnings { margin: 4px 0 8px; padding-left: 20px; }
.empty-note { color: var(--muted); font-style: italic; }

/* ---- Windows high-contrast mode ----------------------------------------------------- */

/* Forced colours replace every colour with the user's system colours and drop background
   colours, gradients and shadows; url() images are kept as they are. So:
   * the controls drawn here (radio dot, ticks, the select's navy arrow) are native
     again, in the user's colours;
   * what only a fill or a gradient showed gets system colours with forced-color-adjust:
     none (a chosen estimate, the slider's fill and thumb, the progress fill and the admin's
     share bars, the turning part of the spinners) or a border (the slider and progress
     tracks, the admin's share-bar tracks and Counts tiles, the bar of an unanswered question
     and of the invalid name field, the "×2" pill);
   * a focused estimate gets a CanvasText ring (and frame, when unchosen): Chrome paints
     the focus ring and a focused button's border in Highlight, the colour of a chosen
     estimate, so a focused one read as a second answer;
   * the navy logo gets a white backplate, or it would vanish in a dark theme.
   Last in the file, so it wins over the rules above. */
@media (forced-colors: active) {
  .choice input[type="radio"],
  .choice input[type="radio"]:checked,
  .dk-box,
  .dk-box:checked,
  .toggle input[type="checkbox"],
  .toggle input[type="checkbox"]:checked { -webkit-appearance: auto; appearance: auto; background: none; }
  .select { -webkit-appearance: auto; appearance: auto; background-image: none; padding-right: 10px; }
  .select.is-invalid { border-left: 4px solid CanvasText; }

  .logo { forced-color-adjust: none; background: var(--white); padding: 6px; border-radius: 4px; }

  .est-btn[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; }
  .est-btn:focus-visible,
  .est-btn[aria-pressed="true"]:focus-visible { outline-color: CanvasText; }   /* the second: over the pink of a chosen "Don't know" */
  .est-btn:not([aria-pressed="true"]):focus-visible { border-color: CanvasText; }

  .rng::-webkit-slider-runnable-track {
    forced-color-adjust: none;
    border-color: CanvasText;
    background: linear-gradient(to right, Highlight var(--fill), GrayText var(--fill));
  }
  .rng::-webkit-slider-thumb { forced-color-adjust: none; background: Highlight; border-color: CanvasText; box-shadow: none; }
  .rng::-moz-range-track { border: 1px solid CanvasText; }
  .progress-track { height: 8px; border: 1px solid CanvasText; }
  .progress-fill { forced-color-adjust: none; background: Highlight; }
  .question.is-invalid { border-left: 4px solid CanvasText; }
  .chip-many { border: 1px solid CanvasText; }
  .summary { border-color: CanvasText; }
  /* The Counts tiles keep their frames (the key one a 2 px frame, its padding 1 px less so
     nothing moves), the share bars a framed track and a Highlight fill. */
  .kpi,
  .count-pill { border-color: CanvasText; }
  .kpi-key { border-width: 2px; padding: 9px 11px 11px; }
  .share-bar { border: 1px solid CanvasText; }
  .share-bar-kpi { height: 8px; }
  .share-bar-mini { height: 6px; }
  .share-fill { forced-color-adjust: none; background: Highlight; }
  .spinner,
  .box-note.is-busy::before { forced-color-adjust: none; border-color: GrayText; border-top-color: CanvasText; }
  /* A QR code keeps its navy on white: a scanner needs dark modules on a light ground, and
     a dark theme would invert it (or make it one colour). */
  svg.qr { forced-color-adjust: none; }
  .link-button { color: LinkText; text-decoration-color: LinkText; }
  .admin-footer .link-button:disabled { color: GrayText; text-decoration-color: GrayText; }
  .offline-note { border-left-color: CanvasText; }
  /* The Export menu (1.6.7): the button and the panel keep a frame (no shadow, no tint). */
  .export-button,
  .export-panel { border-color: CanvasText; }
}
