/* ContactTracker: the Planogram. A report is a shelf: every supplier row of a client's sheet is a facing, and a
   facing fills in when it gets a note. Flat colour only. The direction lives in .impeccable/surfaces/; DESIGN.md
   records the system once the first screens are built. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* The shell: a gondola header board. */
  --aisle: #1d3f73;
  --aisle-deep: #142e55;
  --aisle-ink: #ffffff;
  --aisle-ink-2: #c8d5ea;

  /* The shelf. */
  --ground: #f3f3ef;
  --strip: #ffffff;
  --strip-press: #e9eef6;
  --fixture: #d6dbe1;
  --fixture-edge: #a3acb7;
  --ink: #161c24;
  --ink-2: #3c4552;
  --field-line: #7f8995;

  /* Heading groups: given out in the order the headings come on her sheet. */
  --hue-1: #1f7a8c;
  --hue-2: #7b4a8e;
  --hue-3: #a2561f;
  --hue-4: #4257a8;
  --hue-5: #557a2a;

  /* States: one mark each, the same everywhere. */
  --waiting: #f5c518;
  --waiting-ink: #3b2f00;
  --waiting-wash: #fff5cc;
  --waiting-line: #e6cf72;
  --done: #17794a;
  --done-wash: #e5f3eb;
  --failed: #b3261e;
  --failed-ink: #8a1c16;
  --failed-wash: #fcebe9;
  --failed-line: #d9a29d;
  --needs-wash: #e9eef6; /* needs you: a choice or a check waiting on her (never a failure) */

  --face: "Atkinson Hyperlegible Next", system-ui, "Segoe UI", Roboto, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --gutter: 16px;
  --radius: 6px;
  --tap: 48px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--aisle);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--fixture-edge) var(--ground); }
body {
  margin: 0;
  font-family: var(--face);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  caret-color: var(--aisle);
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--waiting); color: var(--ink); }
a { color: var(--aisle); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--aisle); outline-offset: 2px; }
[hidden] { display: none !important; }

/* The aisle sign: brand and Help, then the page's name. */
.aisle {
  background: var(--aisle);
  color: var(--aisle-ink);
  padding: max(env(safe-area-inset-top), 8px) var(--gutter) 14px;
}
.aisle :focus-visible { outline-color: var(--aisle-ink); }
.aisle-bar, .aisle-title, .aisle-sub { max-width: 48rem; margin-inline: auto; }
.aisle-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.aisle-home {
  font-family: var(--label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aisle-ink-2);
  text-decoration: none;
}
.aisle-title {
  margin-block: 2px 0;
  font-family: var(--label);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.aisle-sub { margin-block: 4px 0; color: var(--aisle-ink-2); font-size: 0.9375rem; }

.app-main { max-width: calc(48rem + 2 * var(--gutter)); margin: 0 auto; padding: 16px var(--gutter) 6rem; }

/* Controls. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.btn-primary { background: var(--aisle); color: var(--aisle-ink); }
.btn-primary:hover { background: var(--aisle-deep); }
.btn-primary:active { background: #0e2342; }
.btn-quiet { background: var(--strip); border-color: var(--fixture-edge); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn-quiet:active { background: var(--strip-press); }
.btn-wide { width: 100%; padding-block: 10px; }

.field {
  width: 100%;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--strip);
  color: var(--ink);
  font: inherit;
}
.field::placeholder { color: #5f6875; opacity: 1; }
.field:focus-visible { outline-offset: 0; border-color: var(--aisle); }

/* Find a client. */
.find { margin-bottom: 20px; }
.find-label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 0.9375rem; }
.find-row { display: flex; gap: 8px; }
.find-row .field { flex: 1; min-width: 0; }

/* A bay: a heading, its shelf of rows, and the shelf's edge under them. */
.bay { margin-bottom: 28px; }
.bay-head {
  margin: 0 0 8px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.shelf {
  margin: 0 calc(-1 * var(--gutter));
  padding: 0;
  list-style: none;
  background: var(--strip);
  border-top: 1px solid var(--fixture);
  border-bottom: 4px solid var(--fixture-edge);
}
.shelf-item + .shelf-item { border-top: 1px solid var(--fixture); }
@media (min-width: 52rem) {
  .shelf { margin-inline: 0; border: 1px solid var(--fixture); border-bottom: 4px solid var(--fixture-edge); }
}

.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 10px var(--gutter);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.12s var(--ease-out);
}
a.row:hover { background: #f6f8fb; }
a.row:active { background: var(--strip-press); }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.9375rem; color: var(--ink-2); }
.row-meta { display: grid; justify-items: end; gap: 2px; font-size: 0.9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.row-when.is-today { font-weight: 700; color: var(--ink); }
.row-count { font-size: 0.875rem; }

/* The facing: a pack on the shelf. Filled = it has notes; outlined = empty; dashed = a potential client. */
.facing {
  flex: none;
  width: 18px;
  height: 28px;
  border: 2px solid var(--fixture-edge);
  border-radius: 2px;
  background: transparent;
}
.facing.is-filled { border-color: var(--facing-hue, var(--aisle)); background: var(--facing-hue, var(--aisle)); }
.facing.is-potential { border-style: dashed; border-color: var(--ink-2); }

/* Tags and state marks. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.tag-potential { background: #e8ebef; color: var(--ink-2); }
.tag-waiting { background: var(--waiting); color: var(--waiting-ink); }
.tag-done { background: var(--done-wash); color: var(--done); }
.tag-failed { background: var(--failed-wash); color: var(--failed-ink); }

.state-mark { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 1px; background: currentColor; }

.notice {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 700;
}
.notice-failed { background: var(--failed-wash); color: var(--failed-ink); }
.notice-failed .state-mark { background: var(--failed); }
.notice-waiting { background: var(--waiting-wash); color: var(--waiting-ink); }
.notice-waiting .state-mark { background: var(--waiting); }
.notice-done { background: var(--done-wash); color: var(--done); }
.notice-long { font-weight: 400; }
.notice-long strong { font-weight: 700; }

/* Nothing to show: no clients, no match, couldn't load. */
.blank { padding: 8px 0 24px; max-width: 38rem; }
.blank-title { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.blank p { margin: 0 0 14px; color: var(--ink-2); }
.add { display: grid; gap: 10px; margin-top: 6px; }
.add .find-label { margin-bottom: 0; }

/* ---- The report ---- */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stack { display: grid; gap: 10px; }
.stack > .find-label { margin-bottom: -4px; }
.field-area { min-height: 6.5rem; padding-block: 10px; line-height: 1.45; resize: vertical; }
select.field { padding-right: 36px; appearance: none; background: var(--strip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23161c24' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; }
.btn-danger { background: var(--strip); border-color: var(--failed-line); color: var(--failed-ink); }
.btn-danger:hover { border-color: var(--failed); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* The date line in the aisle sign: Previous, the day with Change, Next. */
.dayline {
  max-width: 48rem;
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}
.day-step {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: var(--radius);
  color: var(--aisle-ink);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}
.day-step:hover { border-color: var(--aisle-ink); }
.day-step.is-off { opacity: 0.35; }
.day-change { justify-self: center; text-align: center; }
.day-change > summary {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-height: 40px;
  padding: 7px 4px;
  list-style: none;
  cursor: pointer;
}
.day-change > summary::-webkit-details-marker { display: none; }
.day-name { font-family: var(--label); font-weight: 700; font-size: 1.375rem; letter-spacing: 0.02em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.day-change-word { font-size: 0.9375rem; font-weight: 700; color: var(--aisle-ink-2); text-decoration: underline; text-underline-offset: 0.2em; }
.day-form { display: grid; gap: 8px; margin: 8px auto 4px; max-width: 18rem; text-align: left; font-size: 0.9375rem; font-weight: 700; }
.btn-on-aisle { background: var(--aisle-ink); color: var(--aisle); }
.btn-on-aisle:hover { background: #e4ebf6; }
.tag-on-aisle { background: rgb(255 255 255 / 0.16); color: var(--aisle-ink); border: 1px dashed rgb(255 255 255 / 0.6); }

.notice-plain { justify-content: space-between; align-items: center; background: var(--strip); border: 1px solid var(--fixture); color: var(--ink); }
.notice-plain > .btn, .notice-plain > form { flex-shrink: 0; white-space: nowrap; }
.question { margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius); background: var(--needs-wash); border: 1px solid var(--aisle); }
.question p { margin: 0 0 10px; }
.question-title { font-weight: 700; font-size: 1.0625rem; }
.question-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Who was there: row 2 of the column. */
.who { margin: 0 calc(-1 * var(--gutter)) 24px; background: var(--strip); border-block: 1px solid var(--fixture); }
.who-edit > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 12px var(--gutter);
  list-style: none;
  cursor: pointer;
}
.who-edit > summary::-webkit-details-marker { display: none; }
.who-label { grid-column: 1; font-size: 0.875rem; font-weight: 700; color: var(--ink-2); }
.who-names { grid-column: 1; font-weight: 700; overflow-wrap: anywhere; }
.who-change { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; color: var(--aisle); text-decoration: underline; text-underline-offset: 0.2em; }
.who-edit[open] .who-change { visibility: hidden; }
.who-edit > form { padding: 0 var(--gutter) 14px; }
@media (min-width: 52rem) { .who { margin-inline: 0; border: 1px solid var(--fixture); border-radius: var(--radius); } }

/* Recordings not yet turned into notes. */
.rec { padding: 12px var(--gutter); }
.rec-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: baseline; }
.rec .state-mark { width: 12px; height: 12px; }
.rec-transcribing .state-mark, .rec-uploading .state-mark, .rec-waitingtoupload .state-mark { background: var(--waiting); }
.rec-transcribing .state-mark { animation: pulse 1.6s var(--ease-out) infinite; }
.rec-failed .state-mark { background: var(--failed); }
.rec-what { display: grid; gap: 2px; }
.rec-sub { font-size: 0.9375rem; color: var(--ink-2); }
.rec-figures { display: grid; justify-items: end; font-variant-numeric: tabular-nums; font-size: 0.9375rem; color: var(--ink-2); }
.rec-figures > :first-child { font-weight: 700; color: var(--ink); }
.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 24px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.blank-tight { padding: 0 0 18px; }

/* A heading's bay: its colour chip, the rows with notes, then the empty facings. */
.bay-head { display: flex; align-items: center; gap: 8px; }
.bay-hue { width: 12px; height: 12px; border-radius: 1px; background: var(--facing-hue, transparent); }
.bay-general { --facing-hue: var(--ink-2); }
.shelf-rows { margin: 0; padding: 0; list-style: none; }
.row-static { min-height: 52px; padding-block: 12px 4px; }
.row-static .row-name { font-size: 1.0625rem; }

.notes { margin: 0; padding: 0 var(--gutter) 10px calc(var(--gutter) + 32px); list-style: none; }
.bay-general .notes { padding-top: 8px; padding-left: var(--gutter); }
.note + .note { border-top: 1px dashed var(--fixture); }
.note-edit > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 8px 0;
  list-style: none;
  cursor: pointer;
}
.note-edit > summary::-webkit-details-marker { display: none; }
.note-text { grid-column: 1; overflow-wrap: anywhere; }
.note-flag { grid-column: 1; display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 3px; background: var(--needs-wash); color: var(--aisle-deep); font-size: 0.9375rem; }
.note-flag .state-mark { background: transparent; border: 2px solid var(--aisle); }
.note-change { grid-column: 2; grid-row: 1; align-self: start; font-size: 0.9375rem; font-weight: 700; color: var(--aisle); text-decoration: underline; text-underline-offset: 0.2em; }
.note-edit[open] > summary .note-change { visibility: hidden; }
.note-edit[open] > summary .note-text { color: var(--ink-2); }
.note-tools { display: grid; gap: 12px; padding: 4px 0 14px; }
.note-more { display: flex; flex-wrap: wrap; gap: 8px; }
.note-delete { margin-left: auto; }
.note-source { margin: 0; font-size: 0.875rem; color: var(--ink-2); }

.empties { display: grid; gap: 8px; padding: 12px var(--gutter) 14px; border-top: 1px solid var(--fixture); }
.shelf-rows:empty + .empties, .shelf > .empties:first-child { border-top: 0; }
.empties-label { font-size: 0.875rem; font-weight: 700; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px 4px 8px;
  border: 1px solid var(--fixture);
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: none;
}
.chip:hover { border-color: var(--fixture-edge); background: var(--strip); }
.facing-sm { width: 12px; height: 18px; border-width: 2px; }
.shelf-none { margin: 0; padding: 14px var(--gutter); color: var(--ink-2); }

/* Send: Excel and the email, each with its one mark. */
.send-line { display: grid; gap: 6px; padding: 14px var(--gutter); }
.send-line + .send-line { border-top: 1px solid var(--fixture); }
.send-what { margin: 0; font-size: 1.0625rem; }
.send-state { display: grid; gap: 8px; justify-items: start; }
.send-status { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.send-when { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.9375rem; }
.send-detail { margin: 0; color: var(--ink-2); font-size: 0.9375rem; max-width: 60ch; }
.send-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tag .state-mark { width: 8px; height: 8px; }
.tag-waiting .state-mark { background: var(--waiting-ink); }
.tag-done .state-mark { background: var(--done); }
.tag-failed .state-mark { background: var(--failed); }
/* Needs you: not a failure, something waiting on Sandra. An outlined square, like a facing still to fill. */
.tag-needs { background: var(--strip); color: var(--aisle); box-shadow: inset 0 0 0 1px var(--aisle); }
.tag-needs .state-mark { background: transparent; border: 2px solid var(--aisle); }
.earlier { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 14px 0 0; font-weight: 700; }

/* The action bar: Add to report and Type, first on the page and kept in view while she scrolls. */
.action-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: -8px calc(-1 * var(--gutter)) 16px;
  padding: 10px var(--gutter);
  background: var(--ground);
  border-bottom: 1px solid var(--fixture);
  box-shadow: 0 6px 16px rgb(22 28 36 / 0.06);
}
.btn-record { min-height: 56px; font-size: 1.125rem; }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: #ff5a4f; box-shadow: 0 0 0 3px rgb(255 255 255 / 0.25); }
.action-bar .btn-quiet { min-height: 56px; min-width: 6rem; }
@media (min-width: 52rem) { .action-bar { margin-inline: 0; border: 1px solid var(--fixture); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); } }

/* The date calendar: a month of days under the day's Change. A block marks a day with a report. */
.dayline { position: relative; }
.cal {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  z-index: 20;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--strip);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 32px rgb(10 20 40 / 0.28);
}
.cal-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-month { font-family: var(--label); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.02em; }
.cal-step { display: inline-flex; align-items: center; min-height: 40px; color: var(--aisle); font-weight: 700; font-size: 0.9375rem; text-underline-offset: 0.2em; }
.cal-step-next { justify-self: end; }
.cal-step.is-off { min-height: 0; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th { padding: 0 0 4px; font-family: var(--label); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; color: var(--ink-2); }
.cal-grid td { padding: 2px; }
.cal-pick { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cal-day {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  cursor: pointer;
}
.cal-day:hover { background: var(--strip-press); }
.cal-mark { width: 8px; height: 10px; border-radius: 1px; }
.cal-day.has-report .cal-mark { background: var(--aisle); }
.cal-day.is-today { border-color: var(--aisle); }
.cal-day.is-off { opacity: 0.3; cursor: not-allowed; font-weight: 400; }
.cal-day.is-off:hover { background: none; }
.cal-pick:checked + .cal-day { background: var(--aisle); color: var(--aisle-ink); }
.cal-pick:checked + .cal-day.has-report .cal-mark { background: var(--aisle-ink); }
.cal-pick:focus-visible + .cal-day { outline: 3px solid var(--waiting); outline-offset: 1px; }
.cal-key { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; font-size: 0.875rem; color: var(--ink-2); }
.cal-key-mark { width: 8px; height: 10px; border-radius: 1px; background: var(--aisle); }
.cal-taken { margin: 0 0 10px; font-size: 0.875rem; color: var(--ink-2); }
.cal-go { width: 100%; }

/* Recording (/Report/{id}/Record): Stop and Cancel first, then the clock and the level. */
.rec-controls {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: -8px calc(-1 * var(--gutter)) 0;
  padding: 10px var(--gutter);
  background: var(--ground);
  border-bottom: 1px solid var(--fixture);
}
.btn-stop { min-height: 64px; font-size: 1.25rem; gap: 12px; }
.stop-mark { width: 18px; height: 18px; border-radius: 2px; background: var(--aisle-ink); }
.btn-cancel { min-height: 64px; min-width: 6.5rem; }
.rec-confirm { margin: 12px 0 0; padding: 14px 16px; border-radius: var(--radius); background: var(--needs-wash); border: 1px solid var(--aisle); }
.rec-confirm p { margin: 0 0 10px; }
.rec-confirm-q { font-weight: 700; font-size: 1.125rem; }
.rec-now { display: grid; justify-items: center; gap: 10px; padding: 28px 0 24px; text-align: center; }
.rec-now-label { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--label); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
.rec-dot.is-live { box-shadow: none; animation: pulse 1.2s var(--ease-out) infinite; }
.rec-clock { margin: 0; font-family: var(--label); font-weight: 700; font-size: 4.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rec-level { display: flex; gap: 5px; }
.rec-level .facing { --facing-hue: var(--aisle); }
.rec-signal { margin: 0; max-width: 22rem; font-size: 0.9375rem; color: var(--ink-2); }
.rec-tips { padding: 14px 16px 16px; border-radius: var(--radius); background: var(--strip); border: 1px solid var(--fixture); }
.rec-tips .bay-head { margin-top: 0; }
.rec-tips ul { margin: 0 0 10px; padding-left: 1.2em; display: grid; gap: 6px; }
.rec-tips-more { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.rec-panel-title { margin: 8px 0 8px; font-size: 1.25rem; line-height: 1.3; }
.rec-panel > p { color: var(--ink-2); }
.rec-steps { margin: 0 0 16px; padding-left: 1.4em; display: grid; gap: 6px; }

/* The Excel preview (/Report/{id}/Excel): the column as it goes into her sheet, column A beside the new column, and
   a sliver of the older reports to its right. Gridlines and fills are the sheet's own: flat, thin, no shadows. */
.xl-where { margin: 0 0 18px; color: var(--ink-2); max-width: 60ch; }
.xl-where b { color: var(--ink); }
.xl-file { overflow-wrap: anywhere; }
.xl-q { min-width: 0; border-color: var(--aisle); }
.xl-q > legend { float: left; width: 100%; margin: 0 0 6px; padding: 0; }
.xl-q > legend + * { clear: left; }
.xl-q-notes { margin: 0 0 12px; padding: 0 0 0 1.1em; display: grid; gap: 4px; }
.xl-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: var(--tap);
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--fixture-edge);
  border-radius: var(--radius);
  background: var(--strip);
  cursor: pointer;
}
.xl-choice input { width: 22px; height: 22px; margin: 1px 0 0; }
.xl-choice:has(input:checked) { border-color: var(--aisle); box-shadow: inset 0 0 0 1px var(--aisle); }
.xl-choice:has(input:focus-visible) { outline: 2px solid var(--aisle); outline-offset: 2px; }
.xl-choice-sub { display: block; font-size: 0.9375rem; color: var(--ink-2); }

.xl { margin: 6px 0 20px; }
.xl-sheet { margin: 0 calc(-1 * var(--gutter)); background: var(--strip); border-block: 1px solid var(--fixture-edge); }
@media (min-width: 52rem) { .xl-sheet { margin-inline: 0; border: 1px solid var(--fixture-edge); } }
.xl-grid { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.35; }
.xl-col-a { width: 40%; }
.xl-col-older { width: 22px; }
.xl-grid th, .xl-grid td { padding: 7px 8px; border: 1px solid #dde1e6; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.xl-grid thead th {
  padding-block: 3px;
  background: #eef0f3;
  font-family: var(--label);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: center;
}
.xl-grid thead .xl-new-head { background: var(--aisle); color: var(--aisle-ink); }
.xl-grid tr > :first-child { border-left: 0; }
.xl-grid tr > :last-child { border-right: 0; }
.xl-older { padding: 0 !important; background: repeating-linear-gradient(135deg, #eef0f3 0 4px, var(--strip) 4px 8px); }
.xl-grid thead .xl-older { background: #eef0f3; }
.xl-a { font-weight: 400; color: var(--ink); }
.xl-b { border-left: 2px solid var(--aisle) !important; border-right: 2px solid var(--aisle) !important; }
.xl-line { display: block; }
.xl-line + .xl-line { margin-top: 4px; }
.xl-title .xl-a, .xl-title .xl-b { font-weight: 700; }
.xl-title .xl-b { font-variant-numeric: tabular-nums; }
.xl-info .xl-a { color: var(--ink-2); }
.xl-heading .xl-a { display: flex; align-items: center; gap: 8px; font-family: var(--label); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.xl-supplier.is-filled .xl-a { font-weight: 700; padding-left: 12px; }
.xl-supplier.is-filled .xl-a::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 1px; background: var(--facing-hue, var(--aisle)); vertical-align: 0.05em; }
.xl-supplier.is-empty .xl-a { color: var(--ink-2); padding-left: 12px; }
.tag-new { background: var(--strip); color: var(--aisle); border: 1px solid var(--aisle); }
.xl-added .xl-a .tag { margin-left: 4px; }
.xl-wait .xl-a { font-weight: 700; padding-left: 12px; }
.xl-wait td.xl-b { background: var(--needs-wash); }
.xl-additional .xl-a { font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.04em; vertical-align: middle; background: #f7f8f9; }
.xl-additional .xl-a.xl-merged { border-top-color: transparent; }
.xl-additional tr:first-child > * { border-top: 2px solid #c3c9d0; }
.xl-key { margin: 8px 0 0; font-size: 0.875rem; color: var(--ink-2); }

/* Add to Excel: its button in the top action bar (like the report's), with a line under it on when it goes in. */
.btn-commit { min-height: 56px; font-size: 1.125rem; }
.xl-bar-only { grid-column: 1 / -1; }
.commit-note { margin: -6px 0 16px; font-size: 0.9375rem; color: var(--ink-2); }

/* Earlier reports (/Clients/{id}/Reports): one row per report, its date on a shelf-edge ticket. */
.hist-today { margin: 0 0 16px; }
.hist-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
.ticket {
  display: grid;
  justify-items: center;
  width: 48px;
  padding: 4px 0 5px;
  border: 1px solid var(--fixture-edge);
  border-top: 4px solid var(--aisle);
  background: var(--strip);
  line-height: 1;
}
.ticket-day { font-family: var(--label); font-weight: 700; font-size: 1.625rem; font-variant-numeric: tabular-nums; }
.ticket-wd { margin-top: 2px; font-family: var(--label); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.ticket.is-today { background: var(--aisle); border-color: var(--aisle); color: var(--aisle-ink); }
.ticket.is-today .ticket-wd { color: var(--aisle-ink-2); }
.hist-when { font-size: 0.875rem; font-weight: 700; color: var(--aisle); }
.hist-row .row-sub { display: grid; gap: 0; }
.hist-rows { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.hist-none { font-weight: 400; color: var(--ink-2); }
.hist-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-none { background: transparent; color: var(--ink-2); border: 1px solid var(--fixture); }

/* The way to the to-dos in the top bar: how many are open, and a red count of the overdue ones. */
.aisle-tools { display: flex; align-items: center; gap: 8px; }
.aisle-todos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: var(--radius);
  color: var(--aisle-ink);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.aisle-todos:hover { border-color: var(--aisle-ink); }
.aisle-todos[aria-current] { background: rgb(255 255 255 / 0.14); }
.aisle-todos-n { font-variant-numeric: tabular-nums; }
.aisle-todos-late { padding: 0 6px; border-radius: 3px; background: var(--failed-wash); color: var(--failed-ink); font-size: 0.8125rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
/* A phone: the name takes its own line, so To-dos, Help and Menu keep their words (never a glyph alone). */
@media (max-width: 400px) {
  .aisle-bar { flex-wrap: wrap; row-gap: 6px; }
  .aisle-home { flex-basis: 100%; font-size: 0.875rem; letter-spacing: 0.05em; }
  .aisle-tools { flex: 1; justify-content: flex-end; }
}

/* Three in the action bar (the report: Add to report, Type, To-do). */
.action-bar:has(> :nth-child(3)) { grid-template-columns: minmax(0, 1fr) auto auto; }
.action-bar:has(> :nth-child(3)) .btn-quiet { min-width: 0; padding-inline: 14px; }

/* To-dos (/Todos): bays by when they're due; each to-do ticks off by filling its facing. */
.todo-filter { margin: 0 0 20px; }
.bay-count { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.todo-bay-overdue { --facing-hue: var(--failed); }
.todo-bay-overdue .bay-head { color: var(--failed-ink); }
.todo-bay-today { --facing-hue: var(--aisle); }
.todo-bay-later { --facing-hue: var(--ink-2); }
.todo-bay-nodate { --facing-hue: var(--fixture-edge); }
.todo-done-bay { --facing-hue: var(--done); }
.todo-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 6px var(--gutter) 6px calc(var(--gutter) - 12px); }
.todo-tick-form { margin: 0; }
.todo-tick {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
}
.todo-tick .facing { width: 22px; height: 30px; border-color: var(--ink-2); }
.todo-tick:hover .facing { background: var(--strip-press); }
.todo-tick:active .facing { background: var(--done-wash); border-color: var(--done); }
.todo-main { display: grid; gap: 3px; min-width: 0; padding-block: 11px; }
.todo-text { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.todo-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 0.9375rem; color: var(--ink-2); }
.todo-due { font-variant-numeric: tabular-nums; }
.todo-bay-overdue .todo-due, .todo-due.is-overdue { color: var(--failed-ink); font-weight: 700; }
.todo .note-flag { margin-top: 4px; }
.todo-change { align-self: center; padding: 10px 0; font-size: 0.9375rem; font-weight: 700; color: var(--aisle); text-underline-offset: 0.2em; }
.todo-tools { display: grid; gap: 12px; padding: 4px var(--gutter) 16px; border-top: 1px dashed var(--fixture); margin-top: 2px; padding-top: 14px; }
.todo-tools .question-actions .btn { flex: 1 1 8rem; }
.todo-delete { justify-self: start; }
.todo.is-editing { background: var(--needs-wash); }
.todo.is-done .todo-text { font-weight: 400; color: var(--ink-2); }
.todo.is-done .facing { position: relative; border-color: var(--done); background: var(--done); }
.todo.is-done .facing::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 6px;
  height: 12px;
  border: solid var(--strip);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.todo.is-done .todo-tick:hover .facing { background: var(--done); opacity: 0.8; }
.todo-none { margin: 0; padding: 14px var(--gutter); color: var(--ink-2); background: var(--strip); border-top: 1px solid var(--fixture); border-bottom: 4px solid var(--fixture-edge); margin-inline: calc(-1 * var(--gutter)); }
@media (min-width: 52rem) { .todo-none { margin-inline: 0; border: 1px solid var(--fixture); border-bottom-width: 4px; } }
.todo-pending { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-weight: 700; color: var(--ink-2); }
.todo-pending .state-mark { background: var(--waiting); animation: pulse 1.6s var(--ease-out) infinite; }
.todo-pending.rec-failed .state-mark { background: var(--failed); animation: none; }
.todo-pending.rec-failed { color: var(--failed-ink); }
.todo.is-new { animation: arrive 1.8s ease-out both; animation-delay: var(--d, 0s); }

/* The due date: quick picks as chips, and Another day's calendar. */
.due { min-width: 0; margin: 0; padding: 0; border: 0; }
.due > legend { padding: 0; }
.due-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.due-pick { position: absolute; opacity: 0; width: 1px; height: 1px; }
.due-chip {
  display: grid;
  align-content: center;
  min-height: var(--tap);
  padding: 4px 12px;
  border: 1px solid var(--fixture-edge);
  border-radius: var(--radius);
  background: var(--strip);
  line-height: 1.2;
  cursor: pointer;
}
.due-chip:hover { border-color: var(--ink-2); }
.due-chip-name { font-weight: 700; font-size: 0.9375rem; }
.due-chip-day { font-size: 0.8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.due-pick:checked + .due-chip { background: var(--aisle); border-color: var(--aisle); color: var(--aisle-ink); }
.due-pick:checked + .due-chip .due-chip-day { color: var(--aisle-ink-2); }
.due-pick:focus-visible + .due-chip { outline: 3px solid var(--aisle); outline-offset: 2px; }
.due-more { margin-top: 10px; }
.due-more > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  color: var(--aisle);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.due-more:has(.cal-pick:checked) > summary { text-decoration: none; padding: 0 12px; border-radius: var(--radius); background: var(--aisle); color: var(--aisle-ink); }
.due-cal { display: grid; gap: 14px; margin-top: 8px; padding: 12px; border: 1px solid var(--fixture); border-radius: var(--radius); background: var(--strip); }
.due-month > caption { padding: 0 0 6px; text-align: left; }
.due-month .cal-day { min-height: 42px; }
.due-month .cal-day.is-current { border-style: dashed; border-color: var(--ink-2); }

/* The menu: the last thing in the top bar; its panel drops under it, over the page. */
.menu { position: relative; }
.menu-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: var(--radius);
  color: var(--aisle-ink);
  font-weight: 700;
  font-size: 0.9375rem;
  list-style: none;
  cursor: pointer;
}
.menu-open::-webkit-details-marker { display: none; }
.menu-open:hover, .menu[open] > .menu-open { border-color: var(--aisle-ink); background: rgb(255 255 255 / 0.1); }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; }
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -5px; }
.menu-bars::after { top: 5px; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(17rem, calc(100vw - 2 * var(--gutter)));
  padding: 8px 0 12px;
  border-radius: var(--radius);
  background: var(--strip);
  color: var(--ink);
  box-shadow: 0 12px 32px rgb(10 20 40 / 0.28);
}
.menu-list { margin: 0; padding: 0; list-style: none; }
.menu-list a { display: flex; align-items: center; min-height: var(--tap); padding: 0 16px; color: var(--ink); font-weight: 700; text-decoration: none; }
.menu-list a:hover { background: var(--strip-press); }
.menu-list a[aria-current] { background: var(--needs-wash); color: var(--aisle); font-weight: 700; }
.menu-group { margin: 8px 0 0; padding: 8px 16px 2px; border-top: 1px solid var(--fixture); font-family: var(--label); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); }
.menu-out { margin: 8px 16px 0; padding-top: 12px; border-top: 1px solid var(--fixture); }
.menu-out .btn { width: 100%; }
@media (max-width: 400px) {
  .menu-open { padding: 0 12px; }
  .menu-bars { display: none; }
}

/* Sign in (/Account/Login): the passkey first and biggest, the password tucked under it. */
.signin { display: grid; gap: 10px; margin: 8px 0 24px; }
.signin .notice { margin: 0; }
.btn-passkey { width: 100%; min-height: 64px; font-size: 1.1875rem; gap: 12px; }
.passkey-mark {
  width: 22px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 11px 11px 9px 9px;
  background: repeating-radial-gradient(ellipse at 50% 85%, transparent 0 3px, currentColor 3px 4.5px);
  opacity: 0.95;
}
.btn-quiet .passkey-mark { width: 18px; height: 24px; }
.signin-how { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.signin-wait { display: flex; align-items: baseline; gap: 10px; margin: 0; font-weight: 700; }
.signin-wait .state-mark { background: var(--waiting); animation: pulse 1.6s var(--ease-out) infinite; }
.signin-password { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); background: var(--strip); border-block: 1px solid var(--fixture); }
@media (min-width: 52rem) { .signin-password { margin-inline: 0; border: 1px solid var(--fixture); border-radius: var(--radius); } }
.signin-password > summary, .signin-recovery > summary, .setting-more > summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 700;
  color: var(--aisle);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  list-style: none;
  cursor: pointer;
}
.signin-password > summary::-webkit-details-marker, .signin-recovery > summary::-webkit-details-marker, .setting-more > summary::-webkit-details-marker { display: none; }
.signin-password[open] > summary { color: var(--ink); text-decoration: none; }
.signin-password > form { padding-bottom: 16px; }
.signin-recovery > summary { min-height: 40px; font-size: 0.9375rem; }
.signin-recovery[open] { display: grid; gap: 8px; }
.field-code { max-width: 12rem; font-variant-numeric: tabular-nums; letter-spacing: 0.12em; }
.signin-foot { margin: 20px 0 0; color: var(--ink-2); font-size: 0.9375rem; max-width: 40ch; }

/* Settings › Sign-in. */
.bay-intro { margin: -2px 0 10px; color: var(--ink-2); font-size: 0.9375rem; }
.setting-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 12px var(--gutter); }
.setting-row .facing { --facing-hue: var(--aisle); }
.setting-main { display: grid; gap: 2px; min-width: 0; }
.setting-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 700; }
.setting-sub { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.setting-sub b { color: var(--ink); }
.setting-sub b.is-low { color: var(--failed-ink); }
.setting-act { font-size: 0.9375rem; font-weight: 700; color: var(--aisle); text-underline-offset: 0.2em; padding: 10px 0; }
.setting-q { grid-column: 1 / -1; margin: 8px 0 0; }
.setting-block { display: grid; gap: 12px; justify-items: start; padding: 14px var(--gutter) 16px; }
.setting-block > .question, .setting-block > form, .setting-block > details { justify-self: stretch; }
.setting-block > .question { margin: 0; }
.passkey-add { display: grid; gap: 10px; margin-top: 14px; }
.passkey-add .notice { margin: 0; }
.field-hint { margin: -4px 0 0; font-size: 0.875rem; color: var(--ink-2); }
.field-problem { margin: -4px 0 0; font-size: 0.9375rem; font-weight: 700; color: var(--failed-ink); }
.field[aria-invalid="true"] { border-color: var(--failed); box-shadow: inset 0 0 0 1px var(--failed); }
.auth-setup p { margin: 0; }
.qr { width: 220px; max-width: 100%; padding: 0; border: 1px solid var(--fixture); background: #fff; line-height: 0; }
.qr svg { width: 100%; height: auto; }
.auth-key { display: inline-block; margin: 4px 0; padding: 2px 6px; background: var(--ground); border: 1px solid var(--fixture); border-radius: 3px; font-size: 0.9375rem; letter-spacing: 0.06em; word-break: break-all; }
.question-keep { background: var(--waiting-wash); border-color: var(--waiting-line); }
.hp-check { background: var(--failed-wash); border-color: var(--failed-line); }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 0 0 14px; padding: 0 0 0 2.1em; font-variant-numeric: tabular-nums; }
.codes li { padding-left: 0.2em; }
.codes code { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.08em; }
@media print {
  .aisle, .action-bar, .bay, .notice, .question-actions, .uifirst-toolbar { display: none !important; }
  .question-keep { background: none; border: 0; }
}

/* A note's recording, to play back. */
.note-source audio { display: block; width: 100%; height: 40px; margin-top: 6px; }

/* The signature: when a recording has been turned into notes, its rows' facings fill one by one. */
.facing.is-arriving { animation: stock 0.55s var(--ease-out) both; animation-delay: var(--d, 0s); transform-origin: bottom; }
.shelf-item.is-new { animation: arrive 1.8s ease-out both; animation-delay: var(--d, 0s); }
@keyframes stock { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes arrive { from { background: var(--strip-press); } to { background: var(--strip); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* A client, on the laptop (US-011): the setup checklist, its tab, email addresses and the sheet's rows with links. */
.aisle-client { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.setup { margin: 0 0 24px; padding: 14px 16px; border-radius: var(--radius); background: var(--needs-wash); border: 1px solid var(--aisle); }
.setup-title { margin: 0 0 8px; font-size: 1.0625rem; color: var(--aisle-deep); }
.setup-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.setup-list li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.setup-list li.is-done { font-weight: 400; color: var(--ink-2); }
.setup-list a { color: var(--aisle-deep); text-underline-offset: 0.2em; }
.setup-list .facing { border-color: var(--aisle); background: var(--strip); }
.facing.is-ticked { position: relative; border-color: var(--done) !important; background: var(--done) !important; }
.facing.is-ticked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid var(--strip);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.tab-where { margin: 0; font-size: 1.0625rem; overflow-wrap: anywhere; }
.tab-file { font-weight: 700; }
.tab-pick-intro { margin: 4px 0 0; font-weight: 700; }
.tab-pick { justify-self: stretch; margin: 0; border: 1px solid var(--fixture); border-bottom-width: 4px; }

.addresses { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.addresses > legend { padding: 0; margin-bottom: 6px; }
.address-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.address { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; align-items: center; max-width: 32rem; }
.address .field-problem { grid-column: 1 / -1; margin: 0; }
.address-remove {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--fixture-edge);
  border-radius: var(--radius);
  background: var(--strip);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.address-remove:hover { border-color: var(--failed); color: var(--failed-ink); }
.addresses > .btn { justify-self: start; }
.setting-block > .addresses { justify-self: stretch; }

.links-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 10px; }
.links-count { margin: 0; font-weight: 700; color: var(--aisle); }
.links { counter-reset: none; }
.link { padding: 10px var(--gutter); }
.link.is-unlinked, .link.is-suggested { background: var(--needs-wash); }
.link-line { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; min-height: 44px; }
.link-wording { font-weight: 700; overflow-wrap: anywhere; }
.link.is-not .link-wording { font-weight: 400; color: var(--ink-2); }
.link-to { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.link-arrow { color: var(--ink-2); }
.link.is-suggested .link-name { color: var(--ink-2); font-style: italic; }
.link-not { color: var(--ink-2); font-size: 0.9375rem; }
.link-acts { display: flex; align-items: center; justify-content: flex-end; gap: 4px 14px; }
.link-acts form { margin: 0; }
.link-act {
  padding: 10px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--aisle);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  white-space: nowrap;
}
.link-same { margin: 4px 0 0; font-size: 0.875rem; color: var(--ink-2); max-width: 60ch; }
@media (max-width: 40rem) {
  .link-line { grid-template-columns: minmax(0, 1fr) auto; }
  .link-to { grid-column: 1; grid-row: 2; }
  .link-acts { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; }
}
.pick { display: grid; gap: 18px; margin: 12px 0 4px; padding: 14px 16px; border: 1px solid var(--fixture-edge); border-radius: var(--radius); background: #fbfbf9; }
.pick-list { max-height: 22rem; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none; border: 1px solid var(--fixture); border-radius: var(--radius); background: var(--strip); }
.pick-list label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; cursor: pointer; }
.pick-list label:hover { background: var(--strip-press); }
.pick-list input { width: 18px; height: 18px; accent-color: var(--aisle); }
.pick-supplier label { font-weight: 700; }
.pick-line label { padding-left: 40px; }
.pick-more { padding-top: 14px; border-top: 1px solid var(--fixture); }
.pick-more .setting-sub { margin: 0 0 8px; }

/* Settings › Client workbooks (US-011): a tick box (a facing, green when ticked) per workbook; a ticked one lists its tabs. */
.wb-seen { margin: -4px 0 14px; }
.wb { padding: 6px var(--gutter) 10px; }
.wb-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.wb-tick-form { margin: 0; }
.wb-tick { display: grid; place-items: center; width: 48px; height: 52px; margin-left: -12px; border: 0; background: none; cursor: pointer; }
.wb-tick .facing { width: 22px; height: 30px; border-color: var(--ink-2); }
.wb-tick:hover .facing { background: var(--strip-press); }
.wb-tick:active .facing { background: var(--done-wash); border-color: var(--done); }
.wb-tick .facing.is-ticked::after { left: 6px; top: 6px; }
.wb-q { margin: 10px 0 4px; }
.wb-tabs { margin: 8px 0 0 48px; padding: 0; list-style: none; border-left: 2px solid var(--fixture); }
.wb-tab { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 14px; align-items: center; min-height: 44px; padding: 2px 0 2px 14px; }
.wb-tab + .wb-tab { border-top: 1px solid var(--fixture); }
.wb-tab form { margin: 0; }
.wb-tab-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; overflow-wrap: anywhere; }
.wb-tab-name a { color: var(--ink); font-weight: 700; text-underline-offset: 0.2em; }
.wb-tab-tab { font-size: 0.875rem; color: var(--ink-2); }
.wb-tab.is-not .wb-tab-name { color: var(--ink-2); }
a.tag { text-decoration: none; }
@media (max-width: 40rem) {
  .wb-tabs { margin-left: 10px; }
  .wb-tab { grid-template-columns: minmax(0, 1fr) auto; }
  .wb-tab-state { grid-column: 1; grid-row: 2; }
  .wb-tab form { grid-column: 2; grid-row: 1 / span 2; }
}

/* The client list (US-011): where clients come from when they can't yet, and the archived ones. */
.setup-notice { margin-bottom: 18px; }
.list-foot { margin: -8px 0 0; font-size: 0.9375rem; }
.list-foot a, .crumbs a { color: var(--aisle); font-weight: 700; text-underline-offset: 0.2em; }
.crumbs { margin: 0 0 12px; font-size: 0.9375rem; }
.archived-intro { margin: 0 0 12px; }
.wb-found { margin: 0 0 18px; }

/* Suppliers (US-012): the master list, one supplier, and filling the list from a client's sheet. */
.sup-tools { display: grid; gap: 14px 24px; margin: 0 0 22px; }
.sup-tools .find { margin: 0; }
@media (min-width: 52rem) { .sup-tools { grid-template-columns: 1fr 1fr; align-items: start; } }
.sup-add-first { margin-top: 18px; text-align: left; }
.row.sup-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 60px; }
.sup-lines { font-size: 0.9375rem; color: var(--ink); overflow-wrap: anywhere; }
.row-sub:empty { display: none; }
.sup-foot { margin: 14px 0 0; font-size: 0.9375rem; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sup-foot a { color: var(--aisle); font-weight: 700; text-underline-offset: 0.2em; }
.sup-line { padding: 10px var(--gutter); }
.sup-line-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; min-height: 44px; }
.sup-line.is-not .setting-name { font-weight: 400; color: var(--ink-2); }
.sup-line .question { margin: 10px 0 0; }
.sup-add-line { padding-inline: 0; }
.sup-client { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px var(--gutter); }
.sup-client > a { color: var(--ink); text-underline-offset: 0.2em; }
.sup-client.is-not > a { color: var(--ink-2); font-weight: 400; }
.sup-wordings { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.sup-wordings > li { padding: 2px 10px; border: 1px solid var(--fixture); border-radius: 2px; background: var(--ground); font-size: 0.9375rem; }
.sup-wording-line { margin-left: 6px; color: var(--ink-2); }
.sup-wordings > li.is-suggested { font-style: italic; border-style: dashed; }
.row-meta[aria-hidden] { font-size: 1.5rem; color: var(--ink-2); }
.sheet-tick { display: grid; grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1fr); gap: 6px 14px; align-items: center; min-height: 44px; cursor: pointer; }
.sheet-tick input { width: 22px; height: 22px; accent-color: var(--aisle); }
.sheet-tick input:not(:checked) ~ .link-wording { font-weight: 400; color: var(--ink-2); }
.sheet-tick input:checked ~ .sheet-becomes .sheet-if-not, .sheet-tick input:not(:checked) ~ .sheet-becomes .sheet-if-ticked { display: none; }
.sheet-tick input:not(:checked) ~ .sheet-becomes { color: var(--ink-2); }
.sheet-becomes { font-size: 0.9375rem; overflow-wrap: anywhere; }
.sheet-actions { display: grid; gap: 10px; justify-items: start; margin: 16px 0 0; }
.sheet-tip { margin: 18px 0 0; }
@media (max-width: 40rem) {
  .sheet-tick { grid-template-columns: auto minmax(0, 1fr); }
  .sheet-becomes { grid-column: 2; }
}

/* Monthly reports (US-017): the period, the suppliers with notes, and one supplier's email before its draft. */
.mr-months { margin-bottom: 4px; }
.chip.is-here { border-color: var(--aisle); background: var(--aisle); color: var(--aisle-ink); font-weight: 700; }
.mr-cal { max-width: 26rem; margin: 14px 0 0; padding: 12px; border: 1px solid var(--fixture); border-radius: var(--radius); background: var(--strip); }
.mr-cal-say { margin: 0 0 8px; }
.mr-cal .cal-day { color: var(--ink); text-decoration: none; }
.mr-cal .cal-day.is-in { background: var(--aisle); color: var(--aisle-ink); }
.mr-cal .cal-day.is-before { color: var(--ink-2); font-weight: 400; }
.mr-cal .cal-day:focus-visible { outline: 3px solid var(--waiting); outline-offset: 1px; }
.row.mr-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.mr-row .row-meta { text-align: right; }
.mr-laptop { margin: 10px 0 0; }
.mr-none > summary { cursor: pointer; list-style: none; }
.mr-none > summary::-webkit-details-marker { display: none; }
.mr-none > summary::after { content: " ›"; }
.mr-none[open] > summary::after { content: " ⌄"; }
.mr-bar { align-items: center; }
.mr-bar-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.mr-bar-sub { font-size: 0.9375rem; color: var(--ink-2); }
.mr-bar-sub a { color: var(--aisle); font-weight: 700; }
.mr-email { margin: 0; }
.mr-field { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 4px 12px; padding: 10px var(--gutter); }
.mr-field + .mr-field { border-top: 1px solid var(--fixture); }
.mr-field dt { font-family: var(--label); font-weight: 600; text-transform: uppercase; color: var(--ink-2); }
.mr-field dd { margin: 0; overflow-wrap: anywhere; }
.mr-change { margin: 8px 0 14px; }
.mr-change a { color: var(--aisle); font-weight: 700; }
.mr-optional { font-weight: 400; color: var(--ink-2); }
.mr-intro { width: 100%; resize: vertical; }
.mr-client { margin: 0 0 12px; padding: 0; border: 1px solid var(--fixture); min-width: 0; }
.mr-client-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px var(--gutter); cursor: pointer; border-bottom: 1px solid var(--fixture); }
.mr-client-what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.mr-client-name { font-weight: 700; font-size: 1.0625rem; }
.mr-visit { padding: 10px var(--gutter) 6px; }
.mr-visit + .mr-visit { border-top: 1px dashed var(--fixture); }
.mr-date { margin: 0 0 4px; font-family: var(--label); font-weight: 600; text-transform: uppercase; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mr-notes { margin: 0; padding: 0; list-style: none; }
.mr-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 6px 0; cursor: pointer; }
.mr-note .facing { margin-top: 2px; }
.mr-check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mr-check:checked + .facing { position: relative; border-color: var(--aisle); background: var(--aisle); }
.mr-check:checked + .facing::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid var(--strip);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.mr-check:checked + .facing-sm::after { left: 2px; top: 1px; width: 4px; height: 9px; border-width: 0 2px 2px 0; }
.mr-check:focus-visible + .facing { outline: 3px solid var(--waiting); outline-offset: 2px; }
.mr-note:has(.mr-check:not(:checked)) .mr-note-text { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--fixture-edge); }
.mr-client:has([data-mr-client-tick]:not(:checked)) { background: var(--ground); }
.mr-client:has([data-mr-client-tick]:not(:checked)) .mr-client-name { color: var(--ink-2); }
@media (max-width: 40rem) {
  .row.mr-row { grid-template-columns: auto minmax(0, 1fr); }
  .mr-row .row-meta { grid-column: 2; text-align: left; justify-items: start; justify-content: start; }
  .mr-field { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Monthly reports: notes added since the draft was made (US-017). */
.mr-new { font-weight: 700; color: var(--ink); }
.mr-new-tag { margin-left: 6px; vertical-align: 1px; text-decoration: none; }

/* Settings › Laptop helper (US-016). */
.hp-bar-state { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.hp-bar-sub { color: var(--ink-2); font-size: 0.9375rem; }
.hp-key-text { margin: 0 0 14px; }
.hp-key-text code { display: inline-block; font-size: 1.125rem; font-weight: 700; letter-spacing: 0.06em; padding: 8px 12px; background: #fff;
  border: 1px solid var(--fixture-edge); user-select: all; overflow-wrap: anywhere; }
.hp-steps { margin-block: 0; list-style: decimal; padding: 14px var(--gutter) 16px calc(var(--gutter) + 1.5em); display: grid; gap: 10px; }
.hp-what p { margin: 0; }
.hp-steps li { padding-left: 0.3em; }
.hp-steps li::marker { font-family: var(--label); font-weight: 700; color: var(--aisle); }
.hp-checks { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.hp-facts .mr-field { grid-template-columns: 6.5rem minmax(0, 1fr); }
.hp-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hp-fact-sub { flex-basis: 100%; color: var(--ink-2); font-size: 0.9375rem; }
.hp-key-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* The client list's status filter (US-018): All, Clients, Potential, Archived, each with its count. */
.client-show { margin: -4px 0 16px; }
.client-show .chips { gap: 6px; }
.client-show .chip { padding: 4px 9px; gap: 5px; min-height: 40px; font-size: 0.875rem; }
.chip-count { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 400; }
.chip.is-here .chip-count { color: var(--aisle-ink-2); }
.list-none { margin: 0 0 16px; padding-inline: 0; }

/* Make them a client (US-018): the client workbooks to pick from, without the browser's fieldset frame. */
.mk-books { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.mk-books > legend { padding: 0; margin-bottom: 8px; }
