/* Easy Care Apps, stage 0.
   Deliberately plain. The design system arrives when there is something to
   design; this exists so the spine can be looked at without squinting.
   External stylesheet only: the content security policy forbids inline styles. */

:root {
  --ink: #16202a;
  --ink-soft: #566573;
  --paper: #ffffff;
  --wash: #f4f6f8;
  --line: #d0d8df;
  /* The edge of a box somebody types into. Darker than a divider on purpose:
     a field has to look like a field across a room, on a tablet, in daylight. */
  --line-field: #9fadb8;
  --accent: #0b5f7d;
  --accent-ink: #ffffff;
  --error: #8a1c1c;
  --error-wash: #fdeaea;
  --radius: 6px;
  /* Density. Every screen uses the space it is given: tight padding, small
     headings, side by side rather than stacked, full width rather than a
     narrow centred column. Space is for separating things that are different,
     never for its own sake. Tune the four below and the whole product moves.
     Check a new screen at 1280 and ask how much of it is content. */
  --pad-y: 10px;
  --pad-x: 14px;
  --gap: 12px;
  --stack: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.page__title {
  font-size: 1.22rem;
  margin: 0 0 2px;
}

.page__lede {
  color: var(--ink-soft);
  margin: 0 0 12px;
  font-size: 0.9rem;
  max-width: 70ch;
}

.auth {
  max-width: 380px;
  margin: 8vh auto 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.auth__title {
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.auth__strap {
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.auth__form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 3px;
}

.field__label {
  font-size: 0.82rem;
  font-weight: 600;
}

.field__input {
  font: inherit;
  padding: 6px 9px;
  border: 1px solid var(--line-field);
  border-radius: var(--radius);
  background: var(--paper);
  color: inherit;
}

.field__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.button {
  font: inherit;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  /* A link drawn as a button is a button: no underline (2026-11-10). */
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.button--quiet {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}

.notice {
  padding: 7px 12px;
  border-radius: var(--radius);
  margin: 0 0 12px;
}

.notice--error {
  background: var(--error-wash);
  color: var(--error);
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-y) var(--pad-x);
}

.panel__title {
  font-size: 1rem;
  margin: 0 0 8px;
}

.panel__empty,
.panel__note {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.panel__note {
  margin-bottom: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.table th,
.table td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  color: var(--ink-soft);
  font-weight: 600;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf2;
    --ink-soft: #9fb0bf;
    --paper: #16202a;
    --wash: #0e161d;
    --line: #2a3845;
    --accent: #5fb9d8;
    --accent-ink: #0e161d;
    --error: #ffb4b4;
    --error-wash: #3a1d1d;
  }
}

/* ---------------------------------------------------------------------------
   Stage 1: services, people, staff
   --------------------------------------------------------------------------- */

.main {
  max-width: 900px;
}

.page__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.page__head .page__title {
  margin: 0;
  margin-right: auto;
}

.form {
  display: grid;
  gap: var(--gap);
  max-width: 720px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-y) var(--pad-x);
  margin-bottom: var(--stack);
}

/* A form with nothing to read in it, so it may use the width it is given. */
.form--wide {
  max-width: none;
}

/* Already inside a box: do not draw a second one around it. */
.panel > .form,
.card > .form {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  max-width: none;
}

.form--danger {
  border-color: var(--error);
}

.form__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* A label for a screen reader and not for the eye. Used where a dense table
   gives a field its meaning through the row it sits in, which a screen reader
   cannot see. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The same form inside a table row, where the margin above it would push every
   row taller for nothing. */
.inline-form--tight {
  margin-top: 0;
  flex-wrap: nowrap;
  gap: 6px;
}

.field--inline {
  margin: 0;
}

.field--grow {
  flex: 1 1 200px;
}

.field__hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.field__input--short {
  max-width: 220px;
}

textarea.field__input {
  resize: vertical;
}

.fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px 12px;
  display: grid;
  gap: 8px;
}

.fieldset__legend {
  font-weight: 600;
  padding: 0 6px;
}

.choice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

/* Seven days, or any other short list of tick boxes, packed tight enough to
   read as one question rather than seven. */
.choices--tight {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 4px 10px;
}

/* Choices that are short enough to sit beside one another. */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.choice:hover {
  background: var(--wash);
}

.choice__body {
  display: grid;
  gap: 1px;
}

.choice__name {
  font-weight: 600;
}

.choice__blurb,
.choice__meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.facts {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 4px 16px;
  margin: 0 0 var(--stack);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-y) var(--pad-x);
}

.facts dt {
  font-weight: 600;
  color: var(--ink-soft);
}

.facts dd {
  margin: 0;
}

.facts__note {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.firstfive {
  background: var(--paper);
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: var(--pad-y) var(--pad-x);
  margin-bottom: var(--stack);
}

.firstfive__title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.firstfive p {
  margin: 4px 0;
}

/* What has been agreed and what has not, under the two lines above it. A
   withdrawn consent belongs here and not three tabs away: it changes what
   somebody is about to do. */
.firstfive__consent {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
}

/* The intake path, said as steps rather than left for somebody to know. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.steps__step {
  padding: 7px 10px 7px 12px;
  border-left: 3px solid var(--line);
  background: var(--wash);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
}

.steps__step.is-now {
  border-left-color: var(--accent);
  background: var(--paper);
}

.steps__step.is-done {
  opacity: 0.65;
}

/* The landing page (2026-11-11): the greeting, then the board the founder
   sketched, four cards two by two, all the same size, filling what is left of
   the window ("laid out nicely and proportionately"). They were 150px tall
   in the top quarter of the screen with the rest of it empty. A long list
   scrolls inside its own card, so no card grows taller than its neighbour.
   On a narrow screen they are one column, each as tall as what it holds.

   The height is the window less what is above the board: the top bar, the
   groups bar where a section draws one, the read-only band where there is
   one, and the page's own padding. */
.home {
  --home-top: var(--chrome-h);
  --home-band: 0px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.frame.is-bare .home {
  --home-top: var(--top-h);
}

.readonly ~ .frame .home {
  --home-band: 40px;
}

.home__hello {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.board {
  display: grid;
  gap: var(--gap);
  margin-bottom: var(--stack);
}

/* Two classes, because .card is written further down this file and would
   otherwise put its own margin and padding back. Its margin under each card
   was making the gap between the rows twice the gap between the columns. */
.board .board__card {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
}

.board .board__card .card__title {
  font-size: 1.02rem;
}

@media (min-width: 900px) {
  .home {
    /* 12px of padding above, and 16px left below to match the sides; the
       margin takes back the rest of the page's 32px so nothing scrolls. */
    height: calc(100vh - var(--home-top) - var(--home-band) - 28px);
    min-height: 440px;
    margin-bottom: -16px;
  }

  .board {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .board .board__card {
    min-height: 0;
    overflow-y: auto;
  }
}

.board__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.board__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 8px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

.board__row:hover {
  background: var(--wash);
}

.board__row .small {
  margin-left: 6px;
}

.board__count {
  min-width: 2ch;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.board__row--urgent .board__count {
  color: var(--bad, #b3261e);
}

.panel {
  margin-bottom: 24px;
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters__link {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.filters__link.is-on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--wash);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.tag--active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.tag--urgent {
  background: var(--error-wash);
  color: var(--error);
  border-color: transparent;
}

.is-past {
  color: var(--ink-soft);
}

.disclosure {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.disclosure__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

.disclosure .form {
  margin-top: 16px;
  border: none;
  padding: 0;
}

.notice {
  background: var(--wash);
  border: 1px solid var(--line);
}

.table form {
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Navigation, rebuilt 2026-10-27.

     TOP     the sections, across a dark bar
     SIDE    that section's areas, in labelled groups
     WHO     the person this page is about, and how to change them
     TABS    the parts of one record

   Three levels and a context bar. Compact on purpose: the point of three
   levels is that each one stays short, so the type is small, the rows are
   tight, and nothing is padded for the sake of it.

   Entirely server-rendered, so it works before anything has loaded and needs
   no exception in the content security policy.
   --------------------------------------------------------------------------- */

:root {
  /* 42px until 2026-11-11, when the founder asked for a slightly taller bar
     so its words could be two points larger. Everything that pins itself
     under the bar reads this, so it is the only number to change. */
  --top-h: 48px;
  --groups-h: 34px;
  /* Everything that pins itself pins under the whole stack: the sections bar
     and the groups bar. One value, so adding a level never leaves a band at
     the top of the page that nothing covers. */
  --chrome-h: calc(var(--top-h) + var(--groups-h));
  --side-w: 220px;
  --fb-bar-h: 52px;
  --fb-pal-w: 300px;
  --fb-gap: 14px;
  /* Where the builder's own bar pins itself: under the product's sticky top
     bar. The console has a different header, which does not stick, so it
     overrides this to zero and the bar pins to the window instead. Getting
     this wrong leaves a band at the top of the page that nothing covers, and
     the palette scrolls through it. */
  --fb-top: var(--chrome-h);
  --bar-bg: #0a2634;
  --bar-ink: #eaf2f6;
  --bar-ink-soft: #9fbccb;
  --tint: rgba(11, 95, 125, 0.09);
  --shadow: 0 1px 2px rgba(16, 32, 44, 0.06), 0 1px 10px rgba(16, 32, 44, 0.04);
}

/* Level one: the sections */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: stretch;
  height: var(--top-h);
  padding: 0 14px;
  background: var(--bar-bg);
  color: var(--bar-ink);
}

/* The brand is exactly as wide as the menu below it, so the dark column has
   one straight edge from the top of the window to the bottom instead of a
   notch where the two met. */
.top__brand {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: var(--side-w);
  flex: none;
  margin-left: -14px;
  padding: 0 16px 0 14px;
  color: var(--bar-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The sections take what room there is and scroll within it, so Help at the
   right of the bar is never pushed off the edge of a narrow screen. */
.top__nav {
  display: flex;
  align-items: stretch;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
}

/* 16px, from 14.4 (the founder, 2026-11-11: "if this is font size 14 then I
   would like them to be size 16"). The page's own text is 15px. */
.top__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--bar-ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

/* Help, at the right of the bar on every page, where the day and the time
   were. It opens the help panel (public/js/help.js). */
.top__help {
  flex: none;
  margin-left: 6px;
}

.top__link:hover {
  color: var(--bar-ink);
  background: rgba(255, 255, 255, 0.07);
}

.top__link.is-on {
  color: #fff;
  border-bottom-color: #5fb9d8;
  background: rgba(255, 255, 255, 0.07);
}

.top__link.is-soon {
  opacity: 0.45;
  cursor: default;
}

.top__link .icon {
  width: 19px;
  height: 19px;
}

.top__who {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-left: 14px;
  color: var(--bar-ink-soft);
  font-size: 0.85rem;
  white-space: nowrap;
}

.top__out {
  display: flex;
  align-items: center;
  margin-left: 12px;
}

.button--ghost {
  background: transparent;
  color: var(--bar-ink);
  border-color: rgba(255, 255, 255, 0.28);
  font-weight: 600;
  padding: 5px 12px;
  font-size: 0.85rem;
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  filter: none;
}

.readonly {
  padding: 9px 18px;
  background: #fdf1dd;
  color: #6b4400;
  border-bottom: 1px solid #e8c88a;
  font-size: 0.88rem;
}

/* Level two: this section's groups, across the top.
   The founder's words: "Floating menu appears when click on Care. Then based
   on what clicked next that submenu group planed in the left menu." So the
   group labels left the sidebar, where all of them were on screen at once and
   the list ran twenty-odd rows, and became a bar where one is open at a
   time. */

/* This section's groups, across the top of the work column. It used to span
   the window, which drew a pale strip over the top of the dark menu. */
.groups {
  position: sticky;
  top: var(--top-h);
  z-index: 4;
  display: flex;
  gap: 2px;
  padding: 0 14px;
  height: var(--groups-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.groups__link {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.groups__link:hover {
  color: var(--ink);
  background: var(--wash);
}

.groups__link.is-on {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Level three: the items of whichever group is open */

.frame {
  background:
    linear-gradient(to right, var(--bar-bg) 0 var(--side-w), transparent var(--side-w));
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - var(--top-h));
}

/* The left menu carries the top bar's colour, asked for 2026-10-28. One dark
   band down the left and across the top, and the work on white beside it: the
   navigation stops competing with the content for attention. */
.side {
  position: sticky;
  top: var(--top-h);
  flex: none;
  width: var(--side-w);
  /* Full height, however short the list is: the band reaches the bottom of the
     window and keeps going while the page scrolls. It starts under the top bar
     and nothing is drawn across it. */
  height: calc(100vh - var(--top-h));
  overflow-y: auto;
  padding: 8px 8px 16px;
  background: var(--bar-bg);
  color: var(--bar-ink);
  border-right: 1px solid var(--bar-bg);
  /* A column, so the foot can sit at the bottom of the band. */
  display: flex;
  flex-direction: column;
}

/* The foot of the side menu (the founder, 2026-11-07): who is signed in, Sign
   out and Lock, at the bottom of the band, where the name and Sign out at the
   right of the top bar used to be. A long list pushes it down rather than
   running under it. The name is a link to their own account, and Help left
   for the top bar, both on 2026-11-11. */
.side__foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.side__who {
  margin: 0;
  color: #ffffff;
  font-weight: 600;
}

.side__who span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side__who .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  opacity: 0.75;
}

/* A section with one group draws no group bar, so what sits inside the work
   column pins under the top bar alone. */
.frame.is-bare .who {
  top: var(--top-h);
}

.side__label {
  margin: 11px 9px 3px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--bar-ink-soft);
}

.side__label:first-child {
  margin-top: 2px;
}

/* A heading inside an area, put there in Edit Menu: Essentials, Medical. The
   same voice as the area's own label, a step quieter, so the list reads as
   one area in parts rather than as several areas. */
.side__heading {
  display: block;
  margin: 9px 9px 2px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bar-ink-soft);
}

/* The menu's open/close control. Hidden on a wide screen, where the list is
   always there; see the narrow-screen block for what it does on a phone. */
.side__toggle,
.side__summary {
  display: none;
}

.side__empty {
  margin: 2px 9px 6px;
  font-size: 0.82rem;
  color: var(--bar-ink-soft);
}

.side__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side__link,
.groups__link {
  display: flex;
  align-items: center;
  gap: 7px;
}

.side__link .icon,
.groups__link .icon,
.card__title .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  opacity: 0.75;
}

.side__link.is-on .icon,
.groups__link.is-on .icon {
  opacity: 1;
}

.card__title .icon {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
}

.side__link {
  width: 100%;
  padding: 4px 9px;
  border-radius: 6px;
  color: var(--bar-ink);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.35;
}

a.side__link:hover,
button.side__link:hover {
  background: rgba(255, 255, 255, 0.09);
}

.side__link.is-on {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 600;
}

/* Log Out is drawn in the menu where he drew it and is still a POST with a
   token behind it, so it is a button wearing the menu's clothes. */
.side__out {
  margin: 0;
}

button.side__link {
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Built, but needing a person chosen first. */
.side__link.is-waiting {
  color: var(--bar-ink-soft);
  opacity: 0.6;
  cursor: default;
}

/* Not built yet, in a menu that is now dark: the label stays readable and the
   pill stops shouting. */
.side__link.is-soon {
  color: var(--bar-ink-soft);
}

.side .soon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--bar-ink-soft);
  border-color: transparent;
}

.work {
  flex: 1 1 auto;
  min-width: 0;
}

/* The context bar: who this page is about */

.who {
  position: sticky;
  top: var(--chrome-h);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.who__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  flex: none;
}

.who__name {
  font-weight: 700;
}

.who__facts {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.who__moves {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.who__move,
.who__change {
  font-size: 0.8rem;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
}

a.who__move:hover,
a.who__change:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.who__move.is-off {
  opacity: 0.35;
  cursor: default;
}

.who__change {
  font-weight: 600;
  color: var(--accent);
  border-color: var(--accent);
}

/* Level three: the parts of this record */

.tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tabs__link {
  padding: 7px 11px 6px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.tabs__link:hover {
  color: var(--ink);
}

.tabs__link.is-on {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Not built yet. Never a link, so nothing promises a page that is not there. */

.is-soon {
  color: var(--ink-soft);
  cursor: default;
}

.soon {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 6px;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  vertical-align: 1px;
}

.app .main {
  max-width: none;
  margin: 0;
  padding: 12px 16px 32px;
}

/* Compact forms: two to a row where they fit. */

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

/* Three and four to a row, for the screens that have the width for it. */
.form__row--3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.facts--split {
  grid-template-columns: minmax(130px, auto) 1fr minmax(130px, auto) 1fr;
}

.finder {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: var(--stack);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-y) var(--pad-x);
  margin-bottom: var(--stack);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.card__title {
  margin: 0;
  font-size: 0.98rem;
}

.card__text {
  color: var(--ink-soft);
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.table--pick tbody tr:hover {
  background: var(--tint);
}

/* A phone. The desktop chrome is a dark column beside the work; here there is
   no room for a column, so the menu lies down: the same items, the same
   colour, in a strip under the bar that scrolls sideways.
   Everything the wide layout pins or sizes to the viewport is undone here, or
   the column keeps its full height and paints over the page, which is what the
   founder photographed on 2026-10-29. */
@media (max-width: 900px) {
  .frame {
    display: block;
    /* The dark band belongs to the column, and there is no column now. */
    background: none;
    min-height: 0;
  }

  /* Nothing scrolls sideways. A strip that scrolls hides half its items
     behind a gesture nobody makes, so the menu becomes a line you tap to
     open, and the list underneath runs down the page like a list. */
  .side {
    position: static;
    width: auto;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--bar-bg);
    display: block;
    overflow: visible;
    padding: 0;
  }

  .side__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    color: var(--bar-ink);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    cursor: pointer;
  }

  .side__chevron {
    width: 16px;
    height: 16px;
    flex: none;
    transition: transform 0.15s ease;
  }

  .side__toggle:checked ~ .side__summary .side__chevron {
    transform: rotate(180deg);
  }

  /* Keyboard users get the same outline the browser would give a button. */
  .side__toggle:focus-visible ~ .side__summary {
    outline: 2px solid var(--bar-ink);
    outline-offset: -2px;
  }

  /* The heading above the list is what the summary already says. */
  .side > .side__label {
    display: none;
  }

  .side__list,
  .side__empty {
    display: none;
  }

  .side__toggle:checked ~ .side__list {
    display: block;
    padding: 0 8px 10px;
  }

  .side__toggle:checked ~ .side__empty {
    display: block;
    margin: 0 14px 10px;
  }

  /* On a phone the foot opens with the list, at the end of it. */
  .side__foot {
    display: none;
  }

  .side__toggle:checked ~ .side__foot {
    display: block;
    margin: 0 8px;
    padding: 8px 0 10px;
  }

  .side__link {
    padding: 8px 10px;
  }

  /* The sections wrap onto a second line rather than running off the edge. */
  .top {
    height: auto;
    min-height: var(--top-h);
    flex-wrap: wrap;
    padding: 0 10px 6px;
  }

  .top__nav {
    order: 3;
    width: 100%;
    overflow: visible;
    flex-wrap: wrap;
    gap: 2px;
  }

  .top__brand {
    height: var(--top-h);
  }

  .top__out {
    margin-left: auto;
  }

  .groups {
    height: auto;
    flex-wrap: wrap;
    gap: 0 6px;
    padding: 4px 10px;
    overflow: visible;
  }

  /* The brand is the width of the menu column on a wide screen. With no
     column it takes the room its own name needs and no more. */
  .top__brand {
    width: auto;
    max-width: 55vw;
    margin-left: 0;
    padding: 0 12px 0 0;
    border-right: none;
  }

  .top {
    padding: 0 10px;
  }

  .top__nav {
    overflow-x: auto;
  }

  .who,
  .tabs {
    position: static;
    padding-left: 14px;
    padding-right: 14px;
  }

  .groups {
    position: static;
    padding-left: 14px;
    padding-right: 14px;
  }

  .app .main {
    padding: 12px 12px 32px;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .facts--split {
    grid-template-columns: minmax(120px, auto) 1fr;
  }

  .top__who {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bar-bg: #0a1620;
    --tint: rgba(95, 185, 216, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }

  .readonly {
    background: #3a2d12;
    color: #e8c88a;
    border-bottom-color: #5a4720;
  }
}

/* The gate, said plainly at the top of a staff record. */

.gate {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  background: var(--paper);
}

.gate__title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.gate p {
  margin: 0;
  color: var(--ink-soft);
}

.gate--open {
  border-left-color: #1c7c4a;
}

.gate--open .gate__title {
  color: #1c7c4a;
}

.gate--warn {
  border-left-color: #a96b00;
}

.gate--warn .gate__title {
  color: #a96b00;
}

.gate--shut {
  border-left-color: var(--error);
}

.gate--shut .gate__title {
  color: var(--error);
}

.tag--ok {
  background: #e4f3ea;
  color: #1c7c4a;
  border-color: transparent;
}

.tag--warn {
  background: #fdf1dd;
  color: #8a5800;
  border-color: transparent;
}

.panel--loud {
  background: var(--paper);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
}

/* An invitation link, shown once. Breaks anywhere so it can be selected whole. */
.codeline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  word-break: break-all;
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  .tag--ok {
    background: #16301f;
    color: #7fd3a1;
  }

  .tag--warn {
    background: #33260f;
    color: #e5b765;
  }

  .gate--open,
  .gate--open .gate__title {
    border-left-color: #7fd3a1;
    color: #7fd3a1;
  }

  .gate--warn,
  .gate--warn .gate__title {
    border-left-color: #e5b765;
    color: #e5b765;
  }
}

/* ---------------------------------------------------------------------------
   The platform console. A different colour from the product on purpose: it is
   not the product, and nobody should be unsure which one they are looking at.
   --------------------------------------------------------------------------- */

.platform {
  --accent: #5b3fa8;
  --tint: rgba(91, 63, 168, 0.1);
  /* The same top bar as the product, in the console's own colour. It is not
     the product, and nobody should be unsure which one they are looking at.
     Because it is the same bar, --fb-top needs no override here any more. */
  --bar-bg: #241a3d;
}

/* No width rule of its own: the console's main area is the product's, beside
   the sidebar rather than floating in the middle of the window. */

/* Open support access. Deliberately loud: it should be uncomfortable to leave
   one running. */
.supportbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: #fdf1dd;
  color: #6b4400;
  border-bottom: 1px solid #e8c88a;
}

.supportbar form {
  margin-left: auto;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile__n {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
}

.tile__l {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.small {
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 340px;
  word-break: break-word;
}

@media (prefers-color-scheme: dark) {
  .platform {
    --accent: #a98ae8;
    --tint: rgba(169, 138, 232, 0.14);
    --bar-bg: #1a1430;
  }

  .supportbar {
    background: #3a2d12;
    color: #e8c88a;
    border-bottom-color: #5a4720;
  }
}

/* ---------------------------------------------------------------------------
   The form builder, and the form it builds.

   Rebuilt 2026-10-27. The shape of it is the point: a palette that stays put,
   and a canvas laid out on a twelve column grid so a half-width field is half
   a row. What you are looking at is the form, not a table describing one.
   --------------------------------------------------------------------------- */

/* The bar and the palette are both stuck to the top, one under the other, so
   the palette has to know exactly how tall the bar is. It is given a fixed
   height rather than measured, because a measured one wraps to two lines on a
   narrow window and the palette then slides underneath it. */
.fb__bar {
  position: sticky;
  top: var(--fb-top);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  height: var(--fb-bar-h);
  padding: 0;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}

.fb__count {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.fb__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Show in list, marked on the card so the columns can be seen at a glance. */
.fb-card__listed {
  flex: none;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.7rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Don't need people: about the whole form, so in the bar beside the count. */
.fb__who {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.fb__who--fixed {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-soft);
}

/* The two columns of the page: the palette, and everything else. The palette
   is a column of the PAGE rather than of the form, because a sticky element
   only stays put while its own parent is on screen. Put it inside the form and
   it leaves the moment the last section does, and whatever the page renders
   underneath runs up the left hand side on its own. */
.fb__layout {
  display: flex;
  align-items: flex-start;
  gap: var(--fb-gap);
  padding-top: 12px;
}

/* The column beside the palette: the builder, then whatever the page puts
   under it. Publishing and the way back live here, which is why they line up
   with the questions. Relative, because the settings panel floats in it. */
.fb__work {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

/* Nothing in the panel is wider than the panel. A date box asks for more room
   than half of it by default, and until 2026-10-30 the two side by side pushed
   the panel's contents past its edge, clipped on the left with a scrollbar. */
.fb-panel > *,
.fb-pair > * {
  min-width: 0;
}

.fb-panel .field__input {
  width: 100%;
  min-width: 0;
}

/* In the column it is the column's content, so it has no box of its own.
   Under its card on a narrow screen it does. */
.fb-panel {
  display: grid;
  gap: 10px;
}

.fb-panel.is-inline {
  grid-column: 1 / -1;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

/* Undo and redo, and whether the canvas is saved (2026-11-02). */
.fb__history {
  display: inline-flex;
  gap: 2px;
}

.fb__history .fb-mini {
  font-size: 1rem;
}

.fb__dirty {
  white-space: nowrap;
}

.fb__dirty[hidden] {
  display: none;
}

.fb-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fb-panel__type {
  margin-left: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* The label and its eye: shown on the form, or hidden (2026-11-03). */
.fb-labelbox {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.fb-labelbox .field__input {
  flex: 1 1 auto;
}

.fb-eye {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  padding: 0;
  color: var(--accent);
  background: var(--paper);
  border: 1px solid var(--line-field);
  border-radius: 6px;
  cursor: pointer;
}

.fb-eye:hover {
  border-color: var(--accent);
}

.fb-eye .fb-ico {
  width: 18px;
  height: 18px;
}

.fb-eye__off,
.fb-eye.is-off .fb-eye__on {
  display: none;
}

.fb-eye.is-off .fb-eye__off {
  display: inline;
}

.fb-eye.is-off {
  color: var(--ink-soft);
  background: var(--wash);
}

.fb-panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 0.78rem;
}

.fb-panel__opts[hidden] {
  display: none;
}

.fb-panel__extra {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

/* The column on the left stays on screen, and holds what to add, the chosen
   question's settings or the form's (2026-11-03). Building a twenty question
   form once meant scrolling to the foot of a section for every field, and a
   question's settings once ran off the foot of the screen; in a column that
   scrolls by itself, neither can happen. */
.fb__side {
  position: sticky;
  top: calc(var(--fb-top) + 12px);
  z-index: 1;
  flex: none;
  width: var(--fb-pal-w);
  max-height: calc(100vh - var(--fb-top) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fb-mode[hidden] {
  display: none;
}

.fb-formset {
  display: grid;
  gap: 10px;
}

.fb-formset .field__input {
  width: 100%;
}

/* What the column is showing, at its top. */
.fb__side-h {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.fb__palette-h {
  margin: 12px 2px 4px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

.fb__palette-h:first-child {
  margin-top: 0;
}

.fb__palette-hint {
  margin: 0 2px 8px;
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

/* Two columns of tiles, each the shape of its answer above its name
   (2026-11-02). */
.fb__palette-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

/* The picture beside the name from 2026-11-03, in the wider column. */
.fb-pal {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 6px 8px;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: grab;
}

.fb-pal__icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.fb-pal__name {
  overflow-wrap: anywhere;
}

.fb-pal:hover {
  border-color: var(--accent);
  background: var(--tint);
}

.fb-pal:active {
  cursor: grabbing;
}

.fb-pal--sec {
  font-weight: 600;
  color: var(--accent);
}

.fb__canvas {
  display: grid;
  gap: 8px;
}

/* A section is a real container here, which the product this is measured
   against does not have: theirs is a heading in a flat list. */
.fb-sec {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px 10px;
}

.fb-sec__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.fb-sec__n {
  flex: none;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

.fb-sec__title {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  padding: 5px 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 6px;
}

.fb-sec__title:hover {
  border-color: var(--line);
}

.fb-sec__title:focus {
  border-color: var(--accent);
  outline: none;
}

.fb-sec__more {
  margin-bottom: 6px;
}

.fb-sec__more summary {
  font-size: 0.78rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.fb-sec__help {
  margin-top: 6px;
}

/* The canvas grid. --span is set per card from the width buttons. */
.fb-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  min-height: 40px;
  border-radius: 6px;
}

.fb-grid.is-over {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

.fb-grid__hint {
  grid-column: span 12;
  margin: 0;
  padding: 14px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

/* A card is the question as it will look: its label and the shape of its
   answer. Its settings are in the panel. Compacted 2026-10-29: a card was
   about 190 pixels of controls; it is now as tall as the question. */
.fb-card {
  grid-column: span var(--span, 12);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 8px 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.fb-card:hover {
  border-color: var(--line-field);
}

.fb-card.is-chosen {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.fb-card.is-dragging {
  opacity: 0.4;
}

.fb-card__grip {
  color: var(--ink-soft);
  cursor: grab;
  font-size: 0.9rem;
  line-height: 1;
}

.fb-card__type {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.fb-card__sp {
  flex: 1 1 auto;
}

/* Larger from 2026-10-30, at the founder's request: the arrows, copy and
   cross were hard to see and to hit. */
.fb-mini {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
}

.fb-mini:hover {
  color: var(--ink);
  background: var(--wash);
  border-color: var(--line);
}

.fb-mini--danger:hover {
  color: var(--error);
  border-color: var(--error);
}

.fb-card__head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

/* The question, typed straight onto the card. It looks like the label it
   will be on the form until you are typing in it. */
.fb-card__label {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 2px 4px;
  margin-left: -4px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  text-overflow: ellipsis;
}

.fb-card__label:hover {
  border-color: var(--line);
}

.fb-card__label:focus {
  border-color: var(--accent);
  background: var(--paper);
  outline: none;
}

.fb-card__req {
  flex: none;
  color: var(--error);
  font-weight: 700;
}

/* The type is not shown on the card: the shape of the answer already says
   it, the panel names it, and on a narrow question it pushed the question
   itself out of sight. Kept for a screen reader. */
.fb-card__type {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Move, add, duplicate and remove: a small bar over the card's top edge when
   you are on it, so they never take room from the question. */
.fb-card {
  position: relative;
}

/* A labelled toolbar over the chosen question (2026-11-03, after Cognito
   Forms): up, down, narrower, wider, duplicate, insert, delete. It sits on
   the question's top edge, so it never takes room from the form, and it
   ends at the question's right edge when it would otherwise run off the
   side (is-end, set by the script). */
.fb-card__tools {
  position: absolute;
  bottom: calc(100% - 1px);
  left: -1px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px 3px;
  white-space: nowrap;
  background: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -2px 8px rgba(22, 32, 42, 0.08);
  visibility: hidden;
}

.fb-card__tools.is-end {
  left: auto;
  right: -1px;
}

.fb-card.is-chosen .fb-card__tools {
  visibility: visible;
}

.fb-tool {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 5px;
  font: inherit;
  font-size: 0.72rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.fb-tool:hover {
  background: var(--tint);
  border-color: var(--line);
}

.fb-tool:disabled {
  opacity: 0.35;
  cursor: default;
}

.fb-tool .fb-ico {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.fb-tool--danger:hover {
  color: var(--error);
  border-color: var(--error);
}

.fb-tool--danger:hover .fb-ico {
  color: var(--error);
}

.fb-card__tools .fb-widths {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 0 2px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.fb-card__tools .fb-w-now {
  min-width: 34px;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink-soft);
}

/* A label hidden on the form: faint on the card, with the eye struck out. */
.fb-card.is-label-hidden .fb-card__label {
  color: var(--ink-soft);
  font-style: italic;
}

.fb-card__hidden {
  flex: none;
  display: inline-flex;
  color: var(--ink-soft);
}

.fb-card__hidden[hidden] {
  display: none;
}

.fb-card__hidden .fb-ico {
  width: 15px;
  height: 15px;
}

/* A + box (2026-11-03): where a question can go. Chosen, it is where the
   next question picked from the column goes. */
.fb-slot {
  grid-column: span var(--span, 12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: transparent;
  border: 1px dashed var(--line-field);
  border-radius: 6px;
  cursor: pointer;
}

.fb-slot__plus {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--accent);
}

.fb-slot:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.fb-slot.is-chosen {
  color: var(--ink);
  background: var(--tint);
  border: 2px solid var(--accent);
}

.fb-slot--temp {
  grid-column: 1 / -1;
}

/* The top of the form: its name, what it is for, and whether it needs a
   person. Click it for the form's own settings. */
.fb-head {
  display: grid;
  gap: 2px;
  margin: 10px 0 8px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.fb-head:hover {
  border-color: var(--line-field);
}

.fb-head.is-chosen {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: var(--tint);
}

.fb-head__name {
  font-size: 1.05rem;
  font-weight: 700;
}

.fb-head__desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.fb-head__desc[hidden] {
  display: none;
}

.fb-head__who {
  font-size: 0.74rem;
  color: var(--ink-soft);
}

/* A touch screen has no hover: the bar is there on the chosen card, which a
   tap chooses. */



.fb-foot-lbl {
  font-weight: 600;
}

.fb-widths {
  display: inline-flex;
  gap: 2px;
}

.fb-widths button {
  min-width: 26px;
  padding: 2px 6px;
  font: inherit;
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.fb-widths button:hover {
  border-color: var(--accent);
}

.fb-widths button.on {
  color: var(--accent-ink);
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 600;
}

.fb-req {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fb-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.fb-pair .field__hint {
  grid-column: span 2;
}

.fb__textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

/* Once JavaScript has drawn the builder, the JSON panel is a way in and out
   rather than the editor, so it starts closed. */
.fb.is-enhanced .fb__json {
  margin-top: 20px;
}


@media (max-width: 900px) {
  .fb__layout {
    display: block;
  }


  /* On a phone the column sits across the top: still one tap to add a
     question, still without scrolling to the foot of anything. A question's
     settings open under its card instead. */
  .fb__side {
    position: static;
    width: auto;
    max-height: none;
    margin-bottom: 12px;
  }

  .fb__palette-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  /* The toolbar keeps its pictures and drops its words. */
  .fb-tool__t {
    display: none;
  }

  .fb-slot {
    grid-column: span 12;
  }

  /* Four cards to a row needs a mouse and a wide screen. Below that every
     field is full width, which is also how the form itself renders. */
  .fb-card {
    grid-column: span 12;
  }
}

/* The form itself, as a provider sees it. */

/* Compact, 2026-10-29, at the founder's request: a supervision form of
   eleven questions went from 849 pixels to about 650, still easy to read.
   Space separates things that are different; a section is one thing. */
.formview__section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-y) var(--pad-x);
  margin-bottom: 8px;
}

.formview__title {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.formview__help {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: -2px 0 8px;
}

.formview__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px 12px;
}

.formview .field {
  gap: 2px;
}

.formview .field__input {
  padding: 4px 8px;
}

.formview .field__hint {
  font-size: 0.78rem;
}

.formview__field {
  grid-column: span 12;
}

/* An answer copied from the assessment into a draft (migration 053): a line
   beside it and a word on its label's line, so whoever checks the draft sees
   which they are without the form growing. */
.formview__field.is-drafted {
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}

.formview__drafted {
  float: right;
  margin-left: 8px;
  font-size: 0.72rem;
  color: var(--accent);
}

/* Six columns, expressed on the twelve column grid, so a half and a third
   land on exact boundaries. The four old names are kept because forms
   authored before 2026-10-29 still carry them. */
.formview__field--w1 { grid-column: span 2; }
.formview__field--w2 { grid-column: span 4; }
.formview__field--w3 { grid-column: span 6; }
.formview__field--w4 { grid-column: span 8; }
.formview__field--w5 { grid-column: span 10; }
.formview__field--w6 { grid-column: span 12; }

.formview__field--half { grid-column: span 6; }
.formview__field--third { grid-column: span 4; }
.formview__field--quarter { grid-column: span 3; }

/* The author chose the width when they chose the column. A date, a time or a
   number keeps its own narrow size everywhere else in the product, and inside
   a form it fills the column it was put in, so a row of thirds is a row of
   equal boxes. */
.formview .field__input,
.formview .field__input--short {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* What is attached to an answer: a thumbnail for a photograph, an icon for a
   document, and the way to add another. */
.attach {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.attach__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.attach__thumb {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--wash);
}

.attach__doc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 4px;
  background: var(--wash);
  color: var(--ink-soft);
}

.attach__doc .icon {
  width: 26px;
  height: 26px;
}

.attach__name {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.attach__add {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.attach__signed {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.attach__signature {
  display: block;
  max-width: 320px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

/* The shape of an answer, on the builder's canvas: a box, a line of choices,
   a pad to sign, drawn from the question's settings so the canvas reads as
   the form. Not a control: nothing here is filled in. */
.fb-card__shape {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.fb-shape__box {
  display: block;
  height: 24px;
  padding: 3px 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--wash);
}

.fb-shape__box--tall {
  height: 44px;
}

.fb-shape__box--short {
  max-width: 130px;
}

.fb-shape__box--select {
  max-width: 260px;
}

.fb-shape__box--dashed,
.fb-shape__box--sign {
  border-style: dashed;
}

.fb-shape__box--sign {
  height: 40px;
  font-style: italic;
}

.fb-shape__choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
}

.fb-shape__choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.fb-shape__mark {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1px solid var(--line-field);
  background: var(--paper);
}

.fb-shape__mark--round {
  border-radius: 50%;
}

.fb-shape__mark--square {
  border-radius: 2px;
}

.fb-shape__more,
.fb-shape__end {
  font-style: italic;
}

.fb-shape__info {
  display: block;
  padding: 3px 8px;
  border-left: 3px solid var(--accent);
  background: var(--wash);
}

/* Narrower and wider, with what it is between them. */
.fb-widths {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fb-w {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-field);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.fb-w:disabled {
  opacity: 0.4;
  cursor: default;
}

.fb-w-now {
  min-width: 3.4em;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* An empty pad, where a signature is possible but not being taken: the
   preview, and a form nobody has opened to fill in yet. */
.sign__pad--empty {
  height: 64px;
}

.sign--shown {
  max-width: 420px;
}

/* The pad itself. Wide, short, and obviously a place to write. */
.sign {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.sign__pad {
  width: 100%;
  max-width: 420px;
  height: 100px;
  border: 1px dashed var(--line-field);
  border-radius: var(--radius);
  background: var(--paper);
  touch-action: none;
  cursor: crosshair;
}

.sign__actions {
  display: flex;
  gap: 8px;
}

/* A form that exists to carry an action, with nothing in it to look at. */
.offstage {
  display: contents;
}

.formview__info {
  background: var(--wash);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
}

.formview__info p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.formview__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding-top: 2px;
}

/* A rating scale on one line: the number beside its button rather than
   underneath, which was a second line for every scale on the form. */
.formview__scale {
  display: flex;
  align-items: center;
  gap: 4px 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.formview__point {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.85rem;
}

.formview__scale-end {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Required, as a red asterisk. A screen reader hears "(required)" from the
   hidden text beside it, so nothing is lost by the word going. */
.req {
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: 2px;
}

@media (max-width: 700px) {
  .formview__field--w1,
  .formview__field--w2,
  .formview__field--w3,
  .formview__field--w4,
  .formview__field--w5,
  .formview__field--half,
  .formview__field--third,
  .formview__field--quarter {
    grid-column: span 12;
  }
}

/* On a phone the top bar has to hold five sections and a sign-out button, so
   the brand gives up its space first and nothing is allowed to wrap. */
.button--ghost,
.top__brand {
  white-space: nowrap;
}

@media (max-width: 620px) {
  .top {
    padding: 0 8px;
  }

  .top__brand {
    font-size: 0.82rem;
    padding-right: 9px;
    margin-right: 5px;
  }

  .top__link {
    padding: 0 9px;
    font-size: 0.92rem;
  }

  /* Help keeps its mark and gives up its word, so the sections have the
     room. */
  .top__help span {
    display: none;
  }

  .button--ghost {
    padding: 4px 9px;
    font-size: 0.78rem;
  }
}

/* ---------------------------------------------------------------------------
   The landing page.
   A manager meets exceptions, not statistics. Each tile is a link to the list
   it counts, so the number is a way into the work rather than a report about
   it. Tones: urgent where somebody may already be working without cover, warn
   where that is about to be true, calm where it is simply work waiting.
   --------------------------------------------------------------------------- */

/* Two columns wherever there is room for two, because a screen read top to
   bottom in one narrow strip wastes most of itself. Below the breakpoint they
   stack, and nothing is lost. */
.cols {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

@media (min-width: 1180px) {
  .cols--rail {
    grid-template-columns: minmax(300px, 420px) 1fr;
  }

  .cols--even {
    grid-template-columns: 1fr 1fr;
  }
}

.section__title {
  margin: 14px 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: var(--stack);
}

.tile {
  display: block;
  padding: 9px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.tile:hover {
  border-color: var(--accent);
  border-left-width: 4px;
}

.tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.tile__count {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
}

.tile__unit {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.tile__line {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.tile--urgent {
  border-left-color: var(--error);
}

.tile--urgent .tile__count {
  color: var(--error);
}

.tile--warn {
  border-left-color: #a96b00;
}

.tile--warn .tile__count {
  color: #a96b00;
}

.tile--calm {
  border-left-color: var(--accent);
}

.tile--calm .tile__count {
  color: var(--accent);
}

/* The activity feed: sentences, never identifiers. */

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed__row {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.feed__row:last-child {
  border-bottom: none;
}

.feed__when {
  flex: none;
  width: 108px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.feed__said {
  min-width: 0;
}

.feed__subject {
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .tile--warn {
    border-left-color: #e5b765;
  }

  .tile--warn .tile__count {
    color: #e5b765;
  }
}

@media (max-width: 620px) {
  .feed__row {
    flex-direction: column;
    gap: 2px;
  }

  .feed__when {
    width: auto;
  }
}

/* ---------------------------------------------------------------------------
   Filling a form in, and reading one back.
   --------------------------------------------------------------------------- */

/* A list of forms that can be started: a button and a note about it. */
.pick {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pick__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.pick__row:last-child {
  border-bottom: none;
}

.pick__meta {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

/* A question that was answered wrongly, shown where the answer is rather than
   in a list at the top, because a list at the top means scrolling twice. */
.field__wrong {
  display: block;
  margin-top: 4px;
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 600;
}

.formview__field.is-wrong .field__input {
  border-color: var(--error);
}

/* Reading a completed entry. Every question is shown, including the ones left
   blank: what was not answered is part of the record. */
.answer {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

/* Reading a completed entry: in a wide question the question sits beside its
   answer rather than above it, which halves the rows of a long form. A narrow
   question keeps them stacked, where side by side would squeeze both. */
@media (min-width: 701px) {
  .formview__field--w4 .answer,
  .formview__field--w5 .answer,
  .formview__field--w6 .answer {
    display: grid;
    grid-template-columns: minmax(160px, 32%) 1fr;
    gap: 2px 14px;
    align-items: baseline;
  }
}

.answer__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.answer__value {
  white-space: pre-wrap;
}

.answer__blank {
  color: var(--ink-soft);
  font-style: italic;
}

/* A Name and address answer, a line to each part. */
.answer__value--lines {
  display: flex;
  flex-direction: column;
  white-space: normal;
}

/* Allow formatting on a Long text question (2026-11-10, lib/rich-text.js).
   Filling in, the toolbar sits on the box's top edge, and the box shows the
   formatting as it is typed (public/js/rich-text.js), over the textarea that
   holds the answer. Lists, in the box and read back, keep a wrapped line in
   line with its own words rather than under the bullet (the founder,
   2026-11-10). Reading back, paragraphs and lists sit close together. */
.rich {
  display: flex;
  flex-direction: column;
}

.rich__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-field);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--wash);
}

.rich__tools[hidden] {
  display: none;
}

.rich--on .rich__box {
  display: none;
}

.rich__edit {
  position: relative;
  min-height: 6.4em;
  max-height: 70vh;
  overflow-y: auto;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  line-height: 1.45;
}

.rich__edit:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.rich__edit.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 10px;
  top: 7px;
  color: var(--ink-soft);
  pointer-events: none;
}

.rich__edit div,
.rich__edit p {
  margin: 0;
}

.rich__edit ul,
.rich__edit ol,
.answer__value--rich ul,
.answer__value--rich ol {
  list-style-position: outside;
  padding-left: 22px;
}

.rich__edit ul,
.rich__edit ol {
  margin: 0;
}

.rich__edit li,
.answer__value--rich li {
  padding-left: 3px;
}

.rich__btn[aria-pressed="true"] {
  background: var(--paper);
  border-color: var(--line-field);
}

.rich__btn {
  font: inherit;
  font-size: 0.82rem;
  min-width: 30px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.rich__btn:hover {
  background: var(--paper);
  border-color: var(--line);
}

.rich__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.answer__value--rich {
  white-space: normal;
}

.answer__value--rich p,
.answer__value--rich ul,
.answer__value--rich ol {
  margin: 0 0 4px;
}

.answer__value--rich > :last-child {
  margin-bottom: 0;
}

/* Name and address: a box for each part it asks, two to a row, with the
   lines of the address the full width. */
.contact {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.contact__box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact__box--line1,
.contact__box--line2 {
  grid-column: 1 / -1;
}

.contact__label {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

@media (max-width: 480px) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The care record: one day at a time. */
.day {
  margin-bottom: 20px;
}

.day__date {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

.day__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.day__event {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 2px 12px;
  padding: 7px 0;
}

.day__kind {
  grid-row: span 2;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding-top: 2px;
}

.day__who {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

/* A form reached by a link, by somebody with no account. Wider than a sign-in
   box, because it holds a whole form rather than two fields. */
.auth--wide {
  max-width: 760px;
}

@media (max-width: 620px) {
  .day__event {
    grid-template-columns: 1fr;
  }

  .day__kind {
    grid-row: auto;
  }
}

/* Dragging in the builder, done with pointer events rather than the browser's
   own drag and drop. See the note in public/js/form-builder.js for why. */

.fb-pal,
.fb-card__grip {
  user-select: none;
  -webkit-user-select: none;
}

.fb-card__grip {
  cursor: grab;
}

body.fb-dragging,
body.fb-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

/* What follows the pointer. It must never be what is under the pointer, or
   the drop target can never be found. */
.fb-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
  transform: translate(-1000px, -1000px);
  margin: 8px 0 0 12px;
  padding: 5px 10px;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  color: var(--accent-ink);
  background: var(--ink);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(16, 32, 44, 0.25);
}

/* A question with no label yet. A draft saves with it; publishing will not, so
   it is marked while there is still time to do something about it rather than
   reported as a wall of errors at the publish button. */
.fb-card.is-unlabelled .fb-card__label {
  border-style: dashed;
}

/* Red once you have moved on from it (2026-10-31): the dashed line alone could
   not be found on a long form. The one just added is spared while it is being
   typed. */
.fb-card.is-missing {
  background: var(--error-wash);
  border-color: var(--error);
  box-shadow: inset 3px 0 0 var(--error);
}

.fb-card.is-missing.is-chosen {
  box-shadow: inset 3px 0 0 var(--error), 0 0 0 1px var(--error);
}

.fb-card.is-missing .fb-card__label {
  border-color: var(--error);
}

.fb-card.is-missing .fb-card__label::placeholder {
  color: var(--error);
  opacity: 1;
}

/* Where the builder has just taken you. */
.fb-card.is-found {
  animation: fb-found 1.4s ease-out;
}

@keyframes fb-found {
  from { outline: 3px solid var(--error); outline-offset: 5px; }
  to { outline: 3px solid transparent; outline-offset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-card.is-found { animation: none; }
}

/* How many still need one, in the bar: a button to the next. */
.fb__find {
  flex: none;
  padding: 2px 9px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--error);
  background: var(--error-wash);
  border: 1px solid var(--error);
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.fb__find::after {
  content: " \2192";
}

.fb__find:hover,
.fb__find:focus-visible {
  text-decoration: underline;
}

/* And how many in each section, on its bar. */
.fb-sec__missing {
  flex: none;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--error);
  background: var(--error-wash);
  border-radius: 3px;
  white-space: nowrap;
}

/* A short message from the builder, at the foot of the window. */
.fb-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 7px 6px 7px 14px;
  font-size: 0.85rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(16, 32, 44, 0.3);
}

.fb-toast[hidden] {
  display: none;
}

.fb-toast__go {
  flex: none;
  padding: 3px 10px;
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 5px;
  white-space: nowrap;
  cursor: pointer;
}

.fb-toast__go[hidden] {
  display: none;
}

.fb-toast .fb-toast__x {
  color: inherit;
}

/* "Show me" beside a problem in a refused save or publish. */
.fb-err-go {
  margin-left: 4px;
  padding: 0 7px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
}

/* A list of providers to tick. Two or three columns where there is room, so a
   platform with thirty of them is not thirty lines of scrolling. */
.pickers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px 14px;
  margin: 8px 0 10px;
  max-height: 320px;
  overflow-y: auto;
}

/* A list of names: as many columns as the screen has room for, and taller
   before it starts scrolling, because scrolling inside a page is the thing
   that hides the name somebody was looking for. */
.pickers--wide {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  max-height: 46vh;
}

.pickers--wide .small {
  margin-left: 5px;
}

/* ---------------------------------------------------------------------------
   Edit Menu, in the console (migration 033). The tree on the left is the menu
   as it is built; whatever is chosen is edited on the right. Compact, because
   the whole menu is ninety-odd rows and the point is to see its shape.
   --------------------------------------------------------------------------- */

.menu-editor {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

@media (min-width: 1100px) {
  .menu-editor {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr);
  }

  /* The editing panel stays in view while the tree scrolls past it, under
     the bar that finds and publishes. */
  .menu-editor__side {
    position: sticky;
    top: calc(var(--chrome-h, 48px) + var(--menu-bar-h) + 8px);
  }
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
}

.menu-publish {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--gap);
}

.inline-form--grow {
  flex: 1 1 360px;
}

.menu-editor__group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px 2px;
  margin: 0 0 var(--stack);
}

/* A form for each type of service (migration 050): side by side, so the
   five fit in two or three short rows rather than five long ones. */
.menu-editor__types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 12px;
  margin-top: 6px;
  padding: 8px 0 6px;
  border-top: 1px dashed var(--line);
}

/* A select is as wide as its longest form name unless told otherwise, which
   pushed each box over its neighbour and hid the arrows. Each one keeps to
   its column, and a long name is cut short inside the box. */
.menu-editor__type {
  min-width: 0;
}

.menu-editor__type .field__input {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.menu-editor__types > .field__label,
.menu-editor__types > .field__hint {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}

/* The decision after the assessment (migration 051): its three choices side
   by side on a wide screen. */
.decide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
  align-items: start;
}

.decide .card {
  margin: 0;
}

/* Their record filled in from the assessment (migration 052): one row a part,
   the tick and its name, the boxes as the assessment answers them, and what
   the record holds now. One column on a phone. */
.fill {
  border-top: 1px solid var(--line);
  margin-bottom: var(--stack);
}

.fill__row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) minmax(0, 18rem);
  gap: 6px var(--gap);
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.fill__tick {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
  padding-top: 5px;
}

.fill__boxes {
  display: grid;
  gap: 6px;
}

.fill__boxes .field {
  margin: 0;
  min-width: 0;
}

.fill__boxes .field__input {
  width: 100%;
  min-width: 0;
}

.fill__boxes--2,
.fill__boxes--3,
.fill__boxes--4 {
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
}

.fill__now {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding-top: 5px;
}

.fill__was {
  display: block;
  font-weight: 600;
}

/* What was typed on more than one line stays on its lines, here and in the
   first five seconds, where several answers may fill one box. */
.fill__text,
.firstfive__said {
  white-space: pre-line;
}

@media (max-width: 720px) {
  .fill__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The service somebody is being assessed for, chosen in their row of Book
   an assessment or Assessments (migration 050). */
.step__service {
  width: auto;
  min-width: 0;
  max-width: 260px;
  padding-top: 3px;
  padding-bottom: 3px;
  font-size: 0.82rem;
}

.menu-editor__more {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--gap);
  margin-top: var(--stack);
  padding-top: var(--stack);
  border-top: 1px solid var(--line);
}

.menu-editor__help li {
  margin-bottom: 6px;
}

.mtree,
.mtree__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mtree__list {
  margin-left: 18px;
  border-left: 1px solid var(--line);
}

.mtree__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 2px 6px;
  border-radius: 4px;
  min-height: 28px;
}

.mtree__row:hover {
  background: var(--wash);
}

.mtree__node.is-chosen > .mtree__row {
  background: var(--wash);
  box-shadow: inset 3px 0 0 var(--accent);
}

.mtree__kind {
  flex: 0 0 auto;
  min-width: 52px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.mtree__name {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.mtree__name:hover {
  text-decoration: underline;
}

.mtree__node--section > .mtree__row .mtree__name {
  font-size: 1.02rem;
}

.mtree__node--item > .mtree__row .mtree__name {
  font-weight: 400;
}

.mtree__note {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.mtree__acts {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mtree__btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  width: 24px;
  height: 22px;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.mtree__btn:hover {
  border-color: var(--accent);
}

.mtree__btn--danger:hover {
  color: var(--error);
  border-color: var(--error);
}

.button--danger {
  color: var(--error);
}

.mtree__add {
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}

.mtree__empty {
  margin: 0 0 4px 24px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* Dragging in Edit Menu: a handle on every row, a line where it will land, a
   label that follows the pointer, and a brief highlight where a row arrives. */
.mtree__grip {
  flex: 0 0 auto;
  cursor: grab;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
  touch-action: none;
}

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

.mtree__drop {
  height: 0;
  margin: 1px 0;
  border-top: 2px solid var(--accent);
  list-style: none;
}

.mtree__ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.82rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mtree__node.is-dragging > .mtree__row {
  opacity: 0.4;
}

.mtree__node.is-moved > .mtree__row {
  background: var(--wash);
  box-shadow: inset 3px 0 0 var(--accent);
}

body.is-dragging-menu,
body.is-dragging-menu * {
  cursor: grabbing !important;
  user-select: none;
}

/* Without the script, a moved row is scrolled to: clear of the console's
   own bars rather than under them. */
.mtree__node {
  scroll-margin-top: 140px;
}

/* The Person question's search box (public/js/person-picker.js). Type a few
   letters, pick from what matches. The dropdown underneath is hidden and is
   still what the form posts. */
.pp {
  position: relative;
}

.pp__row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pp__input {
  flex: 1 1 auto;
  min-width: 0;
}

.pp__clear[hidden] {
  display: none;
}

.pp__list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 3px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line-field);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(16, 32, 44, 0.16);
}

.pp__list[hidden] {
  display: none;
}

.pp__item {
  display: flex;
  flex-direction: column;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.pp__item:hover,
.pp__item.is-active {
  background: var(--wash);
}

.pp__name {
  font-size: 0.86rem;
}

.pp__detail {
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.pp__none {
  padding: 6px 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* The Person question's settings in the builder's panel, and the note on its
   card that it files the form. */
.fb-person {
  display: grid;
  gap: 6px;
}

.fb-person__who {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.fb-person__who legend {
  width: 100%;
  margin-bottom: 2px;
}

.fb-person__file {
  font-weight: 600;
}

.fb-shape__tag {
  display: inline-block;
  margin-top: 3px;
  padding: 0 6px;
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 9px;
}

/* The field on the public referral page that only robots fill in. Off the
   page rather than hidden, because some robots skip hidden fields. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* A tick in a question's settings, with what it does under it. */
.fb-tick {
  display: grid;
  gap: 2px;
}

/* Vacancies (migration 039): the advert's own words keep their line breaks,
   and the public list of jobs reads as a compact list rather than cards. */
.prewrap {
  white-space: pre-wrap;
}

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.jobs__item {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.jobs__title {
  font-weight: 600;
}

.jobs__facts {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------
   Form builder tweaks, 2026-10-30: Image, Heading, New row, pages and Show
   only when. The founder's list; DECISIONS.md has the reasoning.
   --------------------------------------------------------------------------- */

/* What a form's script hides stays hidden, whatever display a class gives it. */
.formview [hidden],
.button[hidden] {
  display: none !important;
}

/* A heading inside a section: words, nothing to fill in. */
.formview__heading {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
}

/* An Image question's photograph, at the width of its question. */
.formview__image {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--wash);
}

.formview__image-empty {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  border: 1px dashed var(--line-field);
  border-radius: var(--radius);
}

/* New row: the question starts at the left edge, whatever is before it. A
   width is a span, and starting at column one has to keep that span. */
.formview__field--row.formview__field--w1 { grid-column: 1 / span 2; }
.formview__field--row.formview__field--w2 { grid-column: 1 / span 4; }
.formview__field--row.formview__field--w3 { grid-column: 1 / span 6; }
.formview__field--row.formview__field--w4 { grid-column: 1 / span 8; }
.formview__field--row.formview__field--w5 { grid-column: 1 / span 10; }
.formview__field--row.formview__field--w6 { grid-column: 1 / span 12; }

@media (max-width: 700px) {
  .formview .formview__field--row {
    grid-column: 1 / -1;
  }
}

.fb-card.is-new-row {
  grid-column: 1 / span var(--span, 12);
}

/* A row of its own (2026-11-02): it starts at the left edge, as a new row
   does, and whatever follows starts at the left edge of the next row, keeping
   its own span. On the canvas and on the form alike. */
.fb-card.is-alone {
  grid-column: 1 / span var(--span, 12);
}

.fb-card.is-alone + .fb-card {
  grid-column: 1 / span var(--span, 12);
}

@media (min-width: 701px) {
  .formview__field--alone + .formview__field--w1 { grid-column: 1 / span 2; }
  .formview__field--alone + .formview__field--w2 { grid-column: 1 / span 4; }
  .formview__field--alone + .formview__field--w3 { grid-column: 1 / span 6; }
  .formview__field--alone + .formview__field--w4 { grid-column: 1 / span 8; }
  .formview__field--alone + .formview__field--w5 { grid-column: 1 / span 10; }
  .formview__field--alone + .formview__field--w6 { grid-column: 1 / span 12; }
}

/* Pages. Without the script every page shows, one under the other, each with
   its number. With it, one at a time, named across the top. */
.formview__page-n {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.formview.is-flowing .formview__page:not(.is-current),
.formview.is-flowing .formview__page-n {
  display: none;
}

.formview__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.formview__step {
  padding: 4px 10px;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.formview__step:hover {
  border-color: var(--accent);
}

.formview__step[aria-current="step"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.formview__nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 8px;
}

.formview__nav .button:only-child,
.formview__nav .button[hidden] + .button {
  margin-left: auto;
}

/* The builder: a heading card reads as a heading, an image as a photo. */
.fb-card.is-heading .fb-card__label {
  font-size: 1rem;
  font-weight: 700;
}

.fb-card.is-heading .fb-card__shape:empty {
  display: none;
}

.fb-shape__box--photo {
  width: 72px;
  height: 56px;
  display: grid;
  place-items: center;
  border-style: dashed;
}

.fb-shape__tag--when {
  color: var(--ink-soft);
  border-color: var(--line-field);
}

/* Where each page begins, once a form has more than one. */
.fb-page-band {
  margin: 6px 0 -2px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.fb-sec__page {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.fb-sec__cond {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.fb-sec__when {
  margin-top: 6px;
}

/* Show only when, in the panel and a section's guidance. */
.fb-when {
  display: grid;
  gap: 4px;
}

.fb-when__answers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 0.8rem;
}

/* A form's own page (2026-10-30): its name in the bar over its tabs. */
.who--form .who__name {
  margin: 0;
  font-size: 1.05rem;
}

.button--small {
  padding: 3px 10px;
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-block;
}

.button.is-off {
  opacity: 0.35;
  cursor: default;
}

.steps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* A wide table scrolls inside itself rather than pushing the page sideways. */
/* Relative, so a hidden label in a cell (.sr-only, absolute) scrolls with the
   table rather than widening the page past the screen. */
.table-wrap {
  position: relative;
  overflow-x: auto;
  margin-bottom: 8px;
}

.table-wrap .table {
  margin-bottom: 0;
}

/* Submissions and Summary: the dates, the search box and the button to fill
   one in, on one line where they fit. */
.subs__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.subs__range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 8px;
}

.subs__date {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.subs__search .field__input {
  width: 200px;
  max-width: 100%;
}

.subs__fill {
  margin-left: auto;
}

.subs__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 8px;
  background: var(--tint);
  border-radius: var(--radius);
  margin-bottom: 6px;
}

.subs__count {
  font-weight: 600;
  font-size: 0.88rem;
}

.subs__hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-right: auto;
}

.subs__tick {
  width: 28px;
}

.subs__when {
  white-space: nowrap;
}

.subs__pdf {
  text-align: right;
  width: 1%;
}

.table--subs tr.is-new td {
  background: var(--tint);
}

.table--forms .forms__count {
  white-space: nowrap;
}

.page__head .subs__search {
  margin-left: auto;
}

/* Summary: a card a question, as many across as fit. */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.summary__q {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-width: 0;
}

.summary__title {
  font-size: 0.95rem;
  margin: 0 0 2px;
}

.summary__meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.summary__big {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.summary__big .small {
  font-weight: 400;
  color: var(--ink-soft);
}

.summary__rows {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.summary__rows th {
  text-align: left;
  font-weight: 400;
  padding: 2px 8px 2px 0;
  width: 40%;
}

.summary__rows td {
  padding: 2px 0 2px 6px;
}

.summary__bar progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}

.summary__n,
.summary__pc {
  text-align: right;
  white-space: nowrap;
  width: 1%;
  color: var(--ink-soft);
}

/* Logo and address: the two panels side by side where they fit. */
.letterhead {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  align-items: start;
}

.letterhead .form {
  border: 0;
  padding: 0;
  background: none;
}

.letterhead__logo {
  max-width: 260px;
  max-height: 90px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
}

/* Edit Menu's bar (2026-10-31): finding something, and publishing, pinned
   under the console's own bar while the tree scrolls. On a phone it stays
   where it is, because three rows pinned to the top would leave little of
   the screen for the menu itself. */
:root {
  --menu-bar-h: 66px;
}

.menu-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px var(--gap);
  padding: 8px 12px;
  margin: 0 0 var(--stack);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .menu-bar {
    position: sticky;
    top: var(--chrome-h);
    z-index: 3;
  }
}

.menu-bar__search {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 1 240px;
}

.menu-bar__found {
  position: absolute;
  right: 30px;
  bottom: 9px;
  font-size: 0.75rem;
  color: var(--ink-soft);
  pointer-events: none;
}

.menu-bar__publish {
  flex: 1 1 380px;
}

.menu-bar__publish .field--grow {
  min-width: 160px;
}

.menu-bar__state {
  align-self: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* What just happened, beside the heading. */
.page__said {
  margin: 0;
  padding: 5px 12px;
  font-size: 0.88rem;
}

.mtree__node.is-out-of-search,
.mtree.is-searching .mtree__empty {
  display: none;
}

.mtree__node.is-match > .mtree__row .mtree__name {
  background: var(--tint);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 700;
}

/* A row arrived at by its address lands below both bars, not under them. */
.mtree__node {
  scroll-margin-top: calc(var(--chrome-h) + var(--menu-bar-h) + 12px);
}

/* Editing a published form (2026-10-31): the button, and what it will do. */
.edit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 var(--stack);
}

.edit-form .field__hint {
  flex: 1 1 320px;
}

/* Departments and roles, and Access profiles (2026-10-31): a card a
   department, each a table of its roles edited in place. One a row, the
   full width: a role's four settings need it, and side by side they spilled
   out of their cards. A narrow screen scrolls the table, not the page. */
.roles__add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 var(--stack);
}

.roles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.roles__table {
  min-width: 1040px;
}

.roles__table th:nth-child(1) { width: 18%; }
.roles__table th:nth-child(2) { width: 13%; }
.roles__table th:nth-child(3) { width: 15%; }
.roles__table th:nth-child(4) { width: 17%; }
.roles__table th:nth-child(5),
.roles__table th:nth-child(6) { width: 12%; }

.roles__table .field__input {
  width: 100%;
}

.roles__table td {
  vertical-align: middle;
}

.roles__dept {
  margin: 0;
}

.roles__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.roles__name {
  flex: 1;
  display: flex;
  gap: 6px;
  align-items: center;
}

.roles__title {
  font-weight: 700;
  max-width: 260px;
}

.roles__table .field__input,
.access__table .field__input {
  padding: 4px 6px;
}

.roles__acts {
  white-space: nowrap;
  text-align: right;
  width: 1%;
}

.roles__acts .inline-form {
  display: inline-flex;
  margin: 0;
}

.roles__new td {
  border-bottom: 0;
}

/* The organisation chart (2026-10-31). Nested lists drawn as boxes and
   lines: each role's box, a line down from it, and a line across the top of
   the roles that report to it, half from each side of every box. Wider than
   the screen, it scrolls sideways rather than squeezing the boxes. */
.ochart__filter {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}

.ochart {
  overflow-x: auto;
  padding: 4px 0 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ochart__level {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 16px 0 0;
  list-style: none;
}

.ochart__level--top {
  width: max-content;
  min-width: 100%;
  gap: 22px;
  padding: 12px 10px 0;
}

.ochart__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 5px 0;
}

.ochart__level--top > .ochart__node {
  padding-top: 0;
}

.ochart__node::before,
.ochart__node::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 16px;
  border-top: 1px solid var(--line-field);
}

.ochart__node::before {
  right: 50%;
}

.ochart__node::after {
  left: 50%;
  border-left: 1px solid var(--line-field);
}

.ochart__node:first-child::before,
.ochart__node:last-child::after {
  border-top: 0;
}

.ochart__level--top > .ochart__node::before,
.ochart__level--top > .ochart__node::after {
  display: none;
}

.ochart__level .ochart__level::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 16px;
  border-left: 1px solid var(--line-field);
}

.ochart__box {
  display: grid;
  gap: 1px;
  min-width: 140px;
  max-width: 210px;
  padding: 5px 9px 6px;
  font-size: 0.8rem;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--dept, var(--accent));
  border-radius: 6px;
  box-shadow: var(--shadow);
}

/* A colour a department, on the top edge of its boxes. */
.ochart__box--d0 { --dept: #0b5f7d; }
.ochart__box--d1 { --dept: #7a4fb3; }
.ochart__box--d2 { --dept: #2e7d4f; }
.ochart__box--d3 { --dept: #b8621b; }
.ochart__box--d4 { --dept: #b03a5b; }
.ochart__box--d5 { --dept: #4a6a8a; }

.ochart__dept {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ochart__role {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.ochart__n {
  font-weight: 400;
  color: var(--ink-soft);
}

.ochart__name {
  color: var(--ink);
  text-decoration: none;
}

.ochart__name:hover,
.ochart__name:focus-visible {
  text-decoration: underline;
}

.ochart__vacant {
  font-style: italic;
  color: var(--ink-soft);
}

.ochart__more {
  display: grid;
}

/* Services in their locations (migration 048): a panel a location, or with
   only one, a line above the table saying where they are registered. */
.places {
  display: grid;
  gap: 10px;
}

.places__one {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.places__one-of {
  margin: 0;
}

.places__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.places__title .small,
.places__title .link {
  font-weight: 400;
}

/* Branches (migration 048): beneath the tree at the top, a frame a location
   and inside it a frame a service, each with its own small tree. Side by
   side while they fit, then wrapping. */
.ochart__up {
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.ochart__branches {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.ochart__places {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ochart__place {
  min-width: 0;
  padding: 8px 10px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ochart__place--service {
  flex: 1 1 260px;
  background: var(--wash);
}

.ochart__where {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.95rem;
}

.ochart__place--service .ochart__where {
  font-size: 0.86rem;
}

.ochart__facts,
.ochart__none {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.ochart--branch {
  margin-top: 6px;
  border: 0;
  background: transparent;
}

.ochart__more summary {
  font-size: 0.76rem;
  color: var(--accent);
  cursor: pointer;
}

/* A narrow screen: the same lists, indented, one role a line. */
@media (max-width: 700px) {
  .ochart__level,
  .ochart__level--top {
    display: block;
    width: auto;
    padding: 0 0 0 12px;
  }

  .ochart__level--top {
    padding: 8px;
  }

  .ochart__level .ochart__level {
    margin-left: 10px;
    border-left: 1px solid var(--line-field);
  }

  .ochart__node,
  .ochart__level--top > .ochart__node {
    display: block;
    padding: 6px 0 0;
  }

  .ochart__node::before,
  .ochart__node::after,
  .ochart__level .ochart__level::before {
    display: none;
  }

  .ochart__box {
    max-width: none;
  }
}

.access__levels {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 6px 0 0;
}

/* ------------------------------------------------------------------------
   Scores, flagged answers and actions (2026-11-07, migration 054).
   ------------------------------------------------------------------------ */

/* Filling in: the box under a flagged answer, asking what was found, who will
   sort it and by when. Amber, as a flag is, and compact. */
.followup {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #e8c88a;
  border-left: 4px solid #d99a1e;
  border-radius: var(--radius);
  background: #fdf8ee;
}

.followup[hidden] {
  display: none;
}

.followup.is-wrong {
  border-color: var(--error);
  border-left-color: var(--error);
}

.followup__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b4400;
}

.followup__head .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.followup__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.followup .field {
  min-width: 0;
}

@media (max-width: 620px) {
  .followup__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Reading back: a flagged answer, and what became of it. */
.tag--flag {
  background: #fdf1dd;
  color: #8a5800;
  border-color: transparent;
}

.answer__follow {
  grid-column: 2;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.answer__follow:empty {
  display: none;
}

/* The score and the flagged answers, above a submitted entry's answers. */
.scorecard {
  display: grid;
  gap: 4px;
}

.scorecard__score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
}

.scorecard__label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.scorecard__value {
  font-size: 1.25rem;
}

.scorecard__flags {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 2px;
}

/* My Tasks on the board: how many are waiting, each one a row to open. */
.board__badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 2px;
}

.board__card--busy {
  border-color: var(--accent);
}

.board__task {
  flex: 1 1 auto;
  min-width: 0;
}

.board__due {
  flex: none;
  white-space: nowrap;
}

.board__row--urgent .board__due {
  color: var(--error);
  font-weight: 600;
}

.board__done {
  margin: 8px 0 0;
}

/* The builder: points and a flag beside each answer. */
.fb-score {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.fb-score__list {
  display: grid;
  gap: 3px;
}

.fb-score__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px auto;
  gap: 6px;
  align-items: center;
}

.fb-score__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}

/* As specific as the panel's own rule, which makes every box full width. */
.fb-panel .fb-score__pts {
  width: 64px;
  padding: 3px 6px;
}

.fb-score__na {
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.fb-score__flag {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.fb-scoreset {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.fb-scoreset__more {
  display: grid;
  gap: 8px;
}

.fb-scoreset__more[hidden] {
  display: none;
}

.fb-shape__tag--flag {
  color: #8a5800;
  border-color: #d99a1e;
}

/* ------------------------------------------------------------------------
   Help (2026-11-07, lib/help.js): the drawer beside the work, the small ?
   beside a setting, and the Help page.
   ------------------------------------------------------------------------ */

/* A small round ? beside a heading or a group of settings. */
.help-q {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 4px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  background: var(--paper);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: 1px;
  cursor: pointer;
}

.help-q:hover,
.help-q:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
}

/* A group of settings with its ? in the top right corner. */
.fb-helped {
  position: relative;
}

.fb-helped > .help-q {
  position: absolute;
  top: 0;
  right: 0;
}

.fb__help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fb__help .icon {
  width: 15px;
  height: 15px;
}

/* The help panel: from the right, the work still usable beside it. Full
   width on a phone. One on every page since 2026-11-11, opened from Help in
   the top bar; until then each module drew a drawer of its own. */
.helpdrawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  background: var(--paper);
  color: var(--ink);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(10, 38, 52, 0.18);
  animation: helpdrawer-in 0.18s ease-out;
}

.helpdrawer[hidden] {
  display: none;
}

/* Under the top bar in the product, so Help stays in sight and can be
   pressed again to close it. The console's header is not pinned, so there
   the panel runs from the top of the window. */
.app .helpdrawer {
  top: var(--top-h);
}

/* In a window of its own it is the whole window. */
.helpdrawer--window {
  position: fixed;
  inset: 0;
  width: auto;
  border-left: 0;
  box-shadow: none;
  animation: none;
}

.helpwindow {
  margin: 0;
}

@keyframes helpdrawer-in {
  from { transform: translateX(24px); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .helpdrawer { animation: none; }
}

.helpdrawer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  background: var(--bar-bg);
  color: var(--bar-ink);
}

.helpdrawer__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.helpdrawer__mark .icon {
  width: 18px;
  height: 18px;
}

.helpdrawer__names {
  flex: 1 1 auto;
  min-width: 0;
}

.helpdrawer__kicker {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bar-ink-soft);
}

.helpdrawer__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}

.helpdrawer__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bar-ink);
  font-size: 1rem;
  cursor: pointer;
}

.helpdrawer__close:hover,
.helpdrawer__close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.helpdrawer__search {
  position: relative;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.helpdrawer__search .icon {
  position: absolute;
  left: 24px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.helpdrawer__search .field__input {
  width: 100%;
  padding-left: 32px;
}

.helpdrawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 14px 18px;
}

.helpdrawer__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 8px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.helpdrawer__back[hidden] {
  display: none;
}

.helpdrawer__foot {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

/* "Open in a new window", at the foot of the panel. */
.helpdrawer__pop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.helpdrawer__pop:hover,
.helpdrawer__pop:focus-visible {
  text-decoration: underline;
}

.helpdrawer__pop .icon {
  width: 15px;
  height: 15px;
}

/* The modules of the help, each a heading that opens onto its topics. */
.help__modules {
  display: grid;
  gap: 6px;
}

.help__modules[hidden],
.help__module[hidden] {
  display: none;
}

.help__module {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.help__module[open] {
  border-color: var(--accent);
}

.help__module-head {
  position: relative;
  display: grid;
  gap: 1px;
  padding: 8px 10px 8px 30px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}

.help__module-head::-webkit-details-marker {
  display: none;
}

.help__module-head::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(-45deg);
  transition: transform 0.12s ease;
}

.help__module[open] > .help__module-head::before {
  transform: rotate(45deg);
}

.help__module-head:hover,
.help__module-head:focus-visible {
  background: var(--tint);
}

.help__module-name {
  font-weight: 700;
}

.help__module-blurb {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.help__module > .help__contents {
  padding: 0 6px 6px 20px;
}

/* Which module a topic belongs to, over its title. */
.help__where {
  margin: 0 0 2px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

/* The list of topics: each a row with its title and a line on what it is. */
.help__contents {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.help__contents[hidden],
.help__contents li[hidden] {
  display: none;
}

.help__contents a {
  display: grid;
  gap: 1px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.help__contents a:hover,
.help__contents a:focus-visible {
  background: var(--tint);
}

.help__contents-title {
  font-weight: 600;
  color: var(--accent);
}

.help__contents-sum {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.help__none {
  margin: 8px 2px;
  color: var(--ink-soft);
}

.help__none[hidden],
.help__topic[hidden] {
  display: none;
}

/* A topic's words. */
.help__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.help__body {
  font-size: 0.92rem;
  line-height: 1.5;
}

.help__body h3 {
  margin: 14px 0 4px;
  font-size: 0.92rem;
}

.help__body p {
  margin: 0 0 8px;
}

.help__steps,
.help__bullets {
  margin: 0 0 10px;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.help__list {
  margin: 0 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.help__list dt {
  margin-top: 6px;
  font-weight: 700;
}

.help__list dd {
  margin: 0;
  color: var(--ink);
}

.help__tip {
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--tint);
}

.help__body kbd {
  padding: 0 4px;
  border: 1px solid var(--line-field);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--wash);
  font: inherit;
  font-size: 0.82rem;
}

.help__body code {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--wash);
  font-size: 0.85rem;
}

/* The Help page: a card for each module. */
.helpcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}

.helpcard__topics {
  margin: 6px 0 0;
  padding-left: 18px;
  columns: 2 160px;
  column-gap: 16px;
  font-size: 0.88rem;
}

/* One module's page: its topics down the left, every topic beside them. */
.helppage {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.helppage__nav {
  position: sticky;
  top: calc(var(--top-h) + 10px);
  display: grid;
  gap: 6px;
}

.helppage__nav .helpdrawer__search {
  padding: 0;
  border: 0;
}

.helppage__nav .helpdrawer__search .icon {
  left: 10px;
}

.help__contents--page a {
  padding: 4px 8px;
}

.helppage__topics {
  display: grid;
  gap: 12px;
}

.helppage__topics .help__topic {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  scroll-margin-top: calc(var(--top-h) + 10px);
}

@media (max-width: 760px) {
  .helppage {
    grid-template-columns: minmax(0, 1fr);
  }

  .helppage__nav {
    position: static;
  }
}

/* A section's header on a phone (2026-11-07): its title, New page and four
   buttons ran off the right of the screen. The title takes its own line and
   the controls wrap under it. */
@media (max-width: 620px) {
  .fb-sec__top {
    flex-wrap: wrap;
  }

  .fb-sec__title {
    flex: 1 1 calc(100% - 80px);
  }
}

/* ------------------------------------------------------------------------
   Referral to start, step by step (2026-11-10): the strip across the top of
   each list, every step with how many people are at it.
   ------------------------------------------------------------------------ */
.flow {
  margin: 0 0 12px;
}

.flow__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  counter-reset: none;
}

.flow__step {
  display: flex;
  align-items: center;
}

/* A chevron between steps, drawn rather than typed. */
.flow__step + .flow__step::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 6px 0 2px;
  border-top: 2px solid var(--line-field);
  border-right: 2px solid var(--line-field);
  transform: rotate(45deg);
}

.flow__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.flow__link:hover,
.flow__link:focus-visible {
  border-color: var(--accent);
}

.flow__n {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.flow__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.flow__step.is-empty .flow__count {
  background: var(--wash);
  color: var(--ink-soft);
}

.flow__step.is-on .flow__link {
  border-color: var(--accent);
  background: var(--tint);
  color: var(--accent);
}

.flow__step.is-on .flow__n {
  background: var(--accent);
  color: var(--accent-ink);
}

/* A row's buttons side by side, wrapping on a narrow screen. The cell stays
   a table cell; its forms sit inline in it. */
.step__do > .inline-form {
  display: inline-flex;
  margin: 2px 6px 2px 0;
}

.page__title .help-q {
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  vertical-align: 3px;
}

/* Assessment outcome (2026-11-10). A solid danger button is red with white
   words; .button--danger alone only colours the words, which on a quiet
   button is right and on a solid one was red on blue. */
.button.button--danger:not(.button--quiet) {
  background: var(--error);
  color: #ffffff;
}

/* The outcome's Show button, hidden once the dropdown changes the page by
   itself (public/js/outcome.js). */
.form__actions[hidden] {
  display: none;
}

.outcome__pick {
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

/* The screen lock (migration 057). The cover sits over the whole window and
   the page under it is made invisible, not removed: what was being typed is
   still there when the cover comes off. */
.lockscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
  background: var(--wash);
  overflow: auto;
}

.lockscreen[hidden] {
  display: none;
}

.lockscreen__box {
  margin: 0;
  width: 100%;
}

body.is-locked > .top,
body.is-locked > .readonly,
body.is-locked > .frame,
body.is-locked > .helpdrawer {
  visibility: hidden;
}

/* A number with its unit after it: 10 minutes, 12 hours. */
.field__with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field__with-unit .field__input {
  max-width: 110px;
}

/* A button that reads as a link: Use my password instead, Sign out. */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* A line under a sign-in form: Forgot your password, Back to sign in. */
.auth__after {
  margin: 16px 0 0;
}

/* Two-step sign-in (migration 055): the set-up page and the recovery codes.
   Two panels side by side on a wide screen, one under the other on a phone,
   which is where the square is usually being scanned from another screen. */
.twostep {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

/* The grid's gap spaces the panels; their own margin would double it. */
.twostep .panel {
  margin-bottom: 0;
}

.twostep .panel__title + .panel__note {
  margin-bottom: 10px;
}

.twostep .panel__note + .panel__title {
  margin-top: 14px;
}

.twostep .form {
  border: 0;
  padding: 0;
  margin-top: 10px;
}

/* The square. White behind it whatever the page does, because a scanner
   needs the quiet edge. */
.twostep__qr {
  width: 200px;
  max-width: 100%;
  margin: 0 0 10px;
}

.qr {
  display: block;
  width: 100%;
  height: auto;
}

.twostep__key {
  letter-spacing: 0.06em;
  word-break: normal;
}

/* Ten codes in two columns, in the type somebody copies digits from. */
.twostep__codes {
  columns: 2;
  column-gap: 32px;
  max-width: 420px;
  margin: 12px 0 0;
  padding-left: 28px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  line-height: 1.9;
}

@media print {
  .top, .side, .groups, .button { display: none; }
}

/* The help in a window of its own, when that window is wide: the words keep
   to a width that reads, in the middle, rather than running edge to edge. */
.helpdrawer--window .helpdrawer__search,
.helpdrawer--window .helpdrawer__body {
  padding-left: max(14px, calc(50% - 380px));
  padding-right: max(14px, calc(50% - 380px));
}

.helpdrawer--window .helpdrawer__search .icon {
  left: calc(max(14px, 50% - 380px) + 10px);
}

/* On a narrow screen the sections wrap onto a line of their own under the
   provider's name, and Help stays on the first line, at its right. */
@media (max-width: 900px) {
  .top__help {
    order: 2;
    margin-left: auto;
    height: var(--top-h);
  }
}

/* Staging (2026-11-15, views/partials/_staging.ejs). A second server made
   from the live server's backups looks exactly like the live service, so
   every page carries this: at the foot, in the middle, where it is over
   nothing that is pressed. Sign out and Lock are at the foot on the left.
   Nothing can be pressed through it, on purpose: it must never be the reason
   something could not be reached. */
.staging-band {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 2000;
  max-width: calc(100% - 32px);
  padding: 6px 16px;
  border: 2px solid #2b2100;
  border-radius: 999px;
  background: #ffcf40;
  color: #2b2100;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media print {
  .staging-band {
    position: static;
    transform: none;
    margin: 0 0 8px;
    box-shadow: none;
  }
}
