/* ==========================================================================
   Ulgama components · v2.0 "The Registry" · October 19, 2026
   Needs tokens.css first. Plain CSS, no build step, no JavaScript required.
   Works under a strict content security policy: no inline styles, no data:
   images, no third-party anything. Icons come from icons/sprite.svg:
     <svg class="icon" aria-hidden="true" focusable="false">
       <use href="/static/ulgama/icons/sprite.svg#status-current"></use></svg>

   Written with logical properties (inline/block, start/end) so a future
   right-to-left language mirrors without new CSS. Never uppercase anything:
   capitals break the Turkish dotted and dotless i.

   .is-hover, .is-focus, .is-active and .is-disabled exist only so the
   showcase page can show every state at once. Product markup never needs them.
   ========================================================================== */

/* --- Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body,
[data-theme] {
  background: var(--paper);
  color: var(--ink);
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  overflow-wrap: break-word;
}
h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--weight-strong);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
h1 { font-size: var(--text-2xl); line-height: 1; letter-spacing: -0.01em; }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
/* Serif for what is said, sans for what is done: titles and section heads in the serif. */
h1, h2 {
  font-family: var(--font-serif);
  font-weight: var(--weight-serif);
  font-variant-numeric: lining-nums tabular-nums;
}
/* At iPhone accessibility text sizes a long title meets the edge: break it at a hyphen, not
   anywhere (T-18). */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  h1, h2 { hyphens: auto; }
}
p { margin: 0; max-inline-size: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0; padding-inline-start: 1.25em; }
small, .text-sm { font-size: var(--text-sm); }
.text-quiet { color: var(--ink-2); }
.number { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
figure { margin: 0; }
hr { border: 0; border-block-start: var(--border) solid var(--hairline); margin: var(--space-5) 0; }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }
::selection { background: var(--brand-tint); color: var(--ink); }
:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  inset-block-start: -100vh;
  max-inline-size: calc(100% - 2 * var(--space-4));
  z-index: var(--z-toast);
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  padding: var(--space-2) var(--space-4);
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--radius-md);
  font-weight: var(--weight-strong);
}
.skip-link:focus { inset-block-start: var(--space-2); }

/* --- Layout helpers -------------------------------------------------------- */
.container { max-inline-size: 72rem; margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 40em) { .container { padding-inline: var(--space-6); } }
.stack > * + * { margin-block-start: var(--stack-gap, var(--space-4)); }
.stack--sm { --stack-gap: var(--space-2); }
.stack--lg { --stack-gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
@media (max-width: 40em) {
  /* On a phone the buttons stack full width; put the primary one first. */
  .actions > .button { flex: 1 1 100%; }
}
/* Always stacked, e.g. inside a phone sheet or a narrow panel. */
.actions--stack > .button { flex: 1 1 100%; }

/* --- Icons ----------------------------------------------------------------- */
.icon {
  display: inline-block;
  flex: none;
  inline-size: 1.25em;
  block-size: 1.25em;
  vertical-align: -0.25em;
  stroke-width: 1.75;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}
.icon--sm { inline-size: 1em; block-size: 1em; vertical-align: -0.15em; }
.icon--lg { inline-size: 2rem; block-size: 2rem; }
.icon--xl { inline-size: 3rem; block-size: 3rem; }
/* Arrows and chevrons point the other way in a right-to-left language (README 19): those
   marked .icon--flip, and every chevron and arrow from the sprite. Nothing else mirrors. */
[dir="rtl"] .icon--flip,
[dir="rtl"] .icon:has(> use[href$="#chevron-right"], > use[href$="#chevron-left"], > use[href$="#arrow-right"], > use[href$="#arrow-left"]) { transform: scaleX(-1); }

/* --- Links ----------------------------------------------------------------- */
a,
.link {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  border-radius: 2px;
}
a:hover,
.link.is-hover { color: var(--brand-pressed); text-decoration-thickness: 2px; }
a.is-focus,
.link.is-focus { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.link .icon { inline-size: 1em; block-size: 1em; margin-inline-start: 0.2em; vertical-align: -0.1em; }
/* A text link that starts with its icon: a gap between the two (design review SET-26). */
.icon-link { display: inline-flex; align-items: center; gap: var(--space-1); }

/* --- Buttons --------------------------------------------------------------- */
/* Primary = ledger ink. Only one primary button per screen.
   There is deliberately no red "danger" button: anything clickable is ledger
   ink. Destructive actions use a secondary button with explicit words
   ("Remove this document") and a confirmation step. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: var(--target);
  min-inline-size: var(--target);
  padding: var(--space-2) var(--space-4);
  border: var(--border) solid transparent;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: var(--weight-strong);
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}
.button:hover,
.button.is-hover { background: var(--brand-pressed); color: var(--on-brand); text-decoration: none; }
.button:active,
.button.is-active { transform: translateY(1px); }
.button:focus-visible,
.button.is-focus { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }

.button--secondary {
  background: var(--sb-button-2);
  color: var(--brand);
  border-color: var(--control-border);
}
.button--secondary:hover,
.button--secondary.is-hover { background: var(--brand-tint); color: var(--brand); border-color: var(--brand); }

.button--quiet {
  background: transparent;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding-inline: var(--space-3);
}
.button--quiet:hover,
.button--quiet.is-hover { background: var(--paper-2); color: var(--brand-pressed); text-decoration: underline; text-decoration-thickness: 2px; }

.button:disabled,
.button[aria-disabled="true"],
.button.is-disabled {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  border: var(--border) dashed var(--control-border);
  text-decoration: none;
  cursor: not-allowed;
  transform: none;
}
.button[aria-disabled="true"] { border-color: transparent; }
.button[aria-busy="true"] { cursor: progress; }
.button[aria-busy="true"]::before {
  content: "";
  inline-size: 1em;
  block-size: 1em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: ulgama-spin 0.8s linear infinite;
}
@keyframes ulgama-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .button[aria-busy="true"]::before { animation: none; } }
.button--block { inline-size: 100%; }

/* --- Form fields ----------------------------------------------------------- */
/* Order inside a field: label, help, error (when there is one), control.
   Mark the optional fields "(optional)"; never mark required ones with *. */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-inline-size: 0;
  margin-inline: 0;
  padding: 0;
  border: 0;
}
.label,
.field > legend { font-weight: var(--weight-strong); padding: 0; }
.label__optional { font-weight: var(--weight-regular); color: var(--ink-2); }
.help { color: var(--ink-2); font-size: var(--text-sm); max-inline-size: var(--measure); }
.error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--amber); /* 3.1: messages are amber; brick belongs to the papers */
  font-weight: var(--weight-strong);
  max-inline-size: var(--measure);
}
.error .icon { margin-block-start: 0.1em; }

.input,
.textarea {
  inline-size: 100%;
  max-inline-size: 32rem;
  min-block-size: var(--target);
  padding: var(--space-2) var(--space-3);
  border: var(--border) solid var(--control-border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  line-height: var(--leading-body);
}
.input--short { max-inline-size: 14rem; }
.textarea { min-block-size: 7rem; resize: vertical; }
.input::placeholder,
.textarea::placeholder { color: var(--ink-2); opacity: 1; }
.input:hover,
.textarea:hover,
.input.is-hover { border-color: var(--ink-2); }
.input:focus,
.textarea:focus,
.input.is-focus {
  outline: var(--focus-width) solid var(--brand);
  outline-offset: 0;
  border-color: var(--brand);
}
.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.field--error .input,
.field--error .textarea {
  border: var(--border-strong) solid var(--sb-warn-border);
  padding: calc(var(--space-2) - 1px) calc(var(--space-3) - 1px);
}
.input:disabled,
.textarea:disabled,
.input.is-disabled {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  border-style: dashed;
  cursor: not-allowed;
}
.input[readonly] { background: var(--paper-2); }

/* Date: the browser's own picker is the most familiar one on every phone. */
.input[type="date"] { max-inline-size: 14rem; }
.input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }

/* Select: native, with a drawn chevron. */
.select { position: relative; display: block; inline-size: 100%; max-inline-size: 32rem; }
.select > select { appearance: none; padding-inline-end: 2.75rem; cursor: pointer; }
.select::after {
  content: "";
  position: absolute;
  inset-inline-end: 1.1rem;
  inset-block-start: 50%;
  inline-size: 0.55rem;
  block-size: 0.55rem;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* --- Checkboxes and radios -------------------------------------------------- */
/* The whole row is the target (44px tall); the box itself is 1.5rem. */
.choices { display: flex; flex-direction: column; gap: var(--space-1); }
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-block-size: var(--target);
  padding-block: var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.choice__text { display: flex; flex-direction: column; gap: var(--space-1); padding-block-start: 0.05rem; }
.choice__hint { color: var(--ink-2); font-size: var(--text-sm); }
.choice input {
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  margin: 0;
  border: var(--border-strong) solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input::before {
  content: "";
  inline-size: 0.45rem;
  block-size: 0.85rem;
  border: solid var(--on-brand);
  border-width: 0 3px 3px 0;
  transform: translateY(-1px) rotate(45deg);
  opacity: 0;
}
.choice input[type="radio"]::before {
  inline-size: 0.7rem;
  block-size: 0.7rem;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  transform: none;
}
.choice:hover input,
.choice.is-hover input { border-color: var(--ink-2); }
.choice input:checked { background: var(--brand); border-color: var(--brand); }
.choice input[type="radio"]:checked { background: var(--card); }
.choice input:checked::before { opacity: 1; }
.choice input:indeterminate::before,
.choice input.is-mixed::before {
  inline-size: 0.8rem;
  block-size: 0;
  border-width: 0 0 3px 0;
  transform: none;
  opacity: 1;
}
.choice input:indeterminate,
.choice input.is-mixed { background: var(--brand); border-color: var(--brand); }
.choice input:focus-visible,
.choice.is-focus input { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.choice input:disabled,
.choice.is-disabled input { background: var(--disabled-bg); border-style: dashed; cursor: not-allowed; }
.choice:has(input:disabled),
.choice.is-disabled { color: var(--disabled-ink); cursor: not-allowed; }
.field--error .choice input { border-color: var(--sb-warn-border); }

/* --- File upload ------------------------------------------------------------ */
/* <label class="button button--secondary upload__button">Choose a file
     <input class="visually-hidden" type="file"></label>  works with no JS. */
.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-inline-size: 32rem;
  padding: var(--space-5);
  border: var(--border-strong) dashed var(--control-border);
  border-radius: var(--radius-md);
  background: var(--card);
  text-align: center;
}
.upload > .icon { inline-size: 2rem; block-size: 2rem; color: var(--ink-2); }
.upload.is-dragover { border-color: var(--brand); border-style: solid; background: var(--brand-tint); }
.field--error .upload { border-color: var(--sb-warn-border); }
.upload__button { position: relative; overflow: hidden; }
.upload__button:focus-within { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }

.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); max-inline-size: 32rem; }
.file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding-block: var(--space-2);
  padding-inline: var(--space-3) var(--space-2);
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--card);
}
.file > .icon { color: var(--ink-2); }
.file__name { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.file__meta { grid-column: 2; color: var(--ink-2); font-size: var(--text-sm); overflow-wrap: anywhere; }
.file > .button { grid-row: 1 / span 2; grid-column: 3; }
.file .progress { grid-column: 2; }

/* An ink ruler, not a progress pill. */
.progress {
  appearance: none;
  inline-size: 100%;
  block-size: 10px;
  border: 0;
  border-block-end: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
.progress::-webkit-progress-bar { background: transparent; }
.progress::-webkit-progress-value { background: var(--ink); border-radius: 0; }
.progress::-moz-progress-bar { background: var(--ink); border-radius: 0; }

/* --- Status tags and severity ---------------------------------------------- */
/* A status tag is tint, icon, word: in that order, always all three.
   Severity is a label with a four-step meter and a word, never a tint, so a
   row never carries two coloured blocks. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375em;
  padding-block: 0.125em;
  padding-inline: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--grey-tint);
  color: var(--grey);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  line-height: 1.45;
  vertical-align: middle;
}
.tag .icon { inline-size: 1.15em; block-size: 1.15em; vertical-align: 0; }
.tag--missing,
.tag--expired { background: var(--brick-tint); color: var(--brick); }
.tag--expiring { background: var(--amber-tint); color: var(--amber); }
.tag--review { background: var(--plum-tint); color: var(--plum); }
.tag--current { background: var(--moss-tint); color: var(--moss); }
.tag--off { background: var(--grey-tint); color: var(--grey); }

.severity {
  display: inline-flex;
  align-items: center;
  gap: 0.375em;
  color: var(--grey);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  line-height: 1.45;
  vertical-align: middle;
}
.severity .icon { inline-size: 1.15em; block-size: 1.15em; vertical-align: 0; }
.tag .icon, .severity .icon { stroke-width: 1.9; }
/* In ink: the meter's bars say the level. Brick, amber and plum belong to papers, so a
   "Critical" beside a missing paper is not a second brick (design review MON-19). */
.severity--critical,
.severity--high,
.severity--medium { color: var(--ink); }
.severity--low { color: var(--ink-2); }

/* A count, e.g. unread items. Ink, never a signal colour. */
.count {
  display: inline-block;
  min-inline-size: 1.6em;
  padding: 0 0.45em;
  border-radius: var(--radius-round);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  line-height: 1.6;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --- Cards ------------------------------------------------------------------ */
/* Paper page, white cards, a hairline between them. No shadows. */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
}
.card__header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.card__title { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: var(--leading-tight); }
.card__meta { color: var(--ink-2); font-size: var(--text-sm); }
.card__footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block-start: auto; padding-block-start: var(--space-2); }
/* A whole card that opens something: one real link, stretched over the card. */
.card--link { position: relative; }
.card--link .card__link { color: inherit; text-decoration: none; }
.card--link .card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link:hover,
.card--link.is-hover { border-color: var(--control-border); }
.card--link:hover .card__link,
.card--link.is-hover .card__link { text-decoration: underline; }
.card--link:focus-within,
.card--link.is-focus { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.card--link .card__link:focus-visible { outline: none; }
.card--selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* --- Tables that become cards on a phone ------------------------------------ */
/* Give every <td> a data-label with its column name. The table turns into
   cards when its container is narrower than 36em, whatever the screen.
   Keep role="table", "row", "columnheader" and "cell" on the elements so
   screen readers still hear a table after the layout changes. */
.table-wrap { container-type: inline-size; overflow-x: auto; }
.table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--card);
}
.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  border-block-end: var(--border) solid var(--hairline);
  text-align: start;
  vertical-align: top;
}
.table tr:last-child td { border-block-end: 0; }
.table thead th {
  border-block-end: 2px solid var(--ink); /* 3.1: no fill, a 2px ink line under the head */
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
}
.table thead th:first-child { border-start-start-radius: var(--radius-md); }
.table thead th:last-child { border-start-end-radius: var(--radius-md); }
.table tbody tr:hover,
.table tbody tr.is-hover { background: var(--paper-2); }
.table tbody tr[aria-selected="true"],
.table tbody tr.is-selected { background: var(--brand-tint); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; } /* a numeric <th> too (MON-8) */
.table__primary { font-weight: var(--weight-strong); }

@container (max-width: 36em) {
  .table--cards,
  .table--cards tbody,
  .table--cards tr,
  .table--cards td { display: block; }
  .table--cards { border: 0; background: none; }
  .table--cards thead {
    position: absolute; inline-size: 1px; block-size: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .table--cards tr {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    margin-block-end: var(--space-3);
    border: var(--border) solid var(--hairline);
    border-radius: var(--radius-md);
    background: var(--card);
  }
  .table--cards tbody tr:hover { background: var(--card); }
  .table--cards td {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) 1fr;
    gap: var(--space-3);
    padding: 0;
    border: 0;
  }
  .table--cards td::before {
    content: attr(data-label);
    color: var(--ink-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-strong);
  }
  .table--cards td.table__primary { grid-template-columns: 1fr; font-size: var(--text-lg); }
  .table--cards td.table__primary::before { display: none; }
  .table--cards .num { text-align: start; }
}
@container (max-width: 18em) {
  /* Very narrow, or text at 200%: label above value. */
  .table--cards td { grid-template-columns: 1fr; gap: 0; }
}

/* --- Banners ---------------------------------------------------------------- */
/* Never a coloured block. A neutral panel; only the icon and the title carry
   the signal colour. Put a banner at the top of the content it is about. */
.banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-4);
  border: var(--border) solid var(--control-border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
}
.banner > .icon { grid-row: 1 / span 3; margin-block-start: 0.1em; color: var(--brand); }
.banner__title { font-weight: var(--weight-strong); color: var(--brand); }
.banner__text { grid-column: 2; }
.banner__actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-block-start: var(--space-2); }
.banner--attention > .icon,
.banner--attention .banner__title { color: var(--amber); }
.banner--critical > .icon,
.banner--critical .banner__title { color: var(--brick); }
.banner--offline > .icon,
.banner--offline .banner__title { color: var(--grey); }

/* --- Empty states ------------------------------------------------------------ */
/* What will be here, why it matters, and the one action that fills it. */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-7) var(--space-5);
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--card);
  text-align: center;
}
.empty > .icon { inline-size: 3rem; block-size: 3rem; color: var(--ink-2); }
.empty__title { font-size: var(--text-lg); font-weight: var(--weight-strong); }
.empty__text { color: var(--ink-2); max-inline-size: 40ch; }
.empty .actions { justify-content: center; margin-block-start: var(--space-2); }

/* --- Confirmation ------------------------------------------------------------ */
/* 1. After something worked: a calm panel that says what changed.
   2. Before something that cannot be undone: a <dialog> that names the
      consequence, with the safe choice as the primary button. */
.confirmation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-5);
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--card);
}
.confirmation > .icon { grid-row: 1 / span 3; inline-size: 2rem; block-size: 2rem; color: var(--brand); }
.confirmation__title { font-size: var(--text-xl); font-weight: var(--weight-strong); line-height: var(--leading-tight); }
.confirmation > :not(.icon) { grid-column: 2; }
@media (max-width: 40em) {
  /* Narrow screens and large text: the icon sits above the words. */
  .confirmation { grid-template-columns: minmax(0, 1fr); padding: var(--space-4); }
  .confirmation > .icon { grid-row: auto; }
  .confirmation > :not(.icon) { grid-column: 1; }
}

.dialog {
  inline-size: min(34rem, calc(100% - 2 * var(--space-4)));
  max-block-size: calc(100% - 2 * var(--space-4));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-overlay);
}
.dialog::backdrop { background: var(--overlay); }
.dialog__body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); }
.dialog__title { font-size: var(--text-xl); }
@media (max-width: 40em) {
  /* On a phone the dialog rises from the bottom, within thumb reach. */
  .dialog[open] {
    inline-size: 100%;
    max-inline-size: 100%;
    margin: auto 0 0;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
  }
}
.dialog.is-static { position: relative; inset: auto; margin: 0; display: block; }
/* The same step in place, without a script (ui/_confirm.html; design review S1): a <details>
   whose summary is the button that asks. Open, it takes the whole row it sits in, so the step
   never squeezes into a button's column. */
.confirm > summary { list-style: none; cursor: pointer; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] { grid-column: 1 / -1; }
:where(.task__end, .pack__actions, .board-rows__row) > .confirm[open],
:where(.task__end, .pack__actions):has(> .confirm[open]) { flex-basis: 100%; }
.confirm__step {
  inline-size: auto;
  max-inline-size: 34rem;
  margin-block-start: var(--space-3);
  border: var(--border) solid var(--control-border);
  box-shadow: none;
  text-align: start;
}
.confirm__step .dialog__title { font-weight: var(--weight-strong); line-height: var(--leading-tight); }
.confirm__step .actions form { margin: 0; }

/* --- Toasts ------------------------------------------------------------------ */
/* Confirms something small that just happened. It stays 6 s, and for as long as it
   is hovered or focused, and has a close button, because some people read slowly
   (done.js; design review MOT-1).
   <div class="toast-region" role="status" aria-live="polite">…</div> */
.toast-region {
  position: fixed;
  inset-block-end: var(--space-4);
  inset-inline: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
}
@media (min-width: 40em) {
  .toast-region { inset-inline: auto var(--space-5); inset-block-end: var(--space-5); align-items: flex-end; }
}
.toast-region.is-static { position: static; align-items: flex-start; }
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-inline-size: min(30rem, 100%);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--toast-bg);
  font-size: var(--text-sm);
  color: var(--toast-ink);
  box-shadow: var(--toast-shadow);
  pointer-events: auto;
}
.toast__text { flex: 1; min-inline-size: 0; padding-block: var(--space-2); }
.toast__icon { flex: none; color: var(--toast-mark); }
.toast a,
.toast a:hover,
.toast .link { color: inherit; font-weight: var(--weight-strong); }
.toast form { margin: 0; } /* Undo inside the toast (Areas of work, design review SET-9) */
.toast__close {
  display: inline-grid;
  place-items: center;
  min-inline-size: var(--target);
  min-block-size: var(--target);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.toast__close:hover { background: var(--toast-close-hover); }
.toast__close:focus-visible { outline: var(--focus-width) solid currentColor; outline-offset: -4px; }

/* --- Tabs --------------------------------------------------------------------- */
/* Links to server-rendered views. On a narrow screen the row scrolls
   sideways; labels are never cut short. */
.tabs {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  border-block-end: var(--border) solid var(--hairline);
  scrollbar-width: thin;
}
.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
  justify-content: center;
  min-block-size: var(--target);
  min-inline-size: var(--target);
  padding-block: var(--space-2);
  margin-block-end: -1px;
  border-block-end: 3px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.tabs__tab:hover,
.tabs__tab.is-hover { color: var(--ink); border-block-end-color: var(--control-border); }
.tabs__tab[aria-current="page"],
.tabs__tab[aria-selected="true"] {
  color: var(--brand);
  font-weight: var(--weight-strong);
  border-block-end-color: var(--brand);
}
.tabs__tab:focus-visible,
.tabs__tab.is-focus { outline: var(--focus-width) solid var(--brand); outline-offset: -2px; }

/* --- Breadcrumb ---------------------------------------------------------------- */
/* On a phone it becomes one "back to the parent" link. */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.breadcrumb li { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumb li + li::before {
  content: "";
  inline-size: 0.45em;
  block-size: 0.45em;
  border: solid var(--ink-2);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}
[dir="rtl"] .breadcrumb li + li::before { transform: rotate(135deg); }
.breadcrumb a { display: inline-flex; align-items: center; min-block-size: var(--target); }
.breadcrumb [aria-current="page"] { color: var(--ink-2); }
@container (max-width: 30em) {
  .breadcrumb li { display: none; }
  .breadcrumb li:nth-last-child(2) { display: inline-flex; }
  .breadcrumb li:nth-last-child(2)::before {
    content: "";
    inline-size: 0.45em;
    block-size: 0.45em;
    border: solid var(--brand);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(135deg);
  }
  [dir="rtl"] .breadcrumb li:nth-last-child(2)::before { transform: rotate(-45deg); }
}
.breadcrumb { container-type: inline-size; }

/* --- Pagination ----------------------------------------------------------------- */
.pagination { container-type: inline-size; }
.pagination__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.pagination__pages { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.pagination a,
.pagination [aria-current="page"],
.pagination__gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-inline-size: var(--target);
  min-block-size: var(--target);
  padding-inline: var(--space-3);
  border-radius: var(--radius-md);
}
.pagination a { text-decoration: none; }
.pagination a:hover,
.pagination a.is-hover { background: var(--paper-2); text-decoration: underline; }
.pagination [aria-current="page"] { background: var(--brand); color: var(--on-brand); font-weight: var(--weight-strong); }
.pagination__gap { color: var(--ink-2); padding-inline: 0; min-inline-size: auto; }
.pagination__status { color: var(--ink-2); display: none; }
@container (max-width: 34em) {
  .pagination__pages { display: none; }
  .pagination__status { display: block; }
}

/* --- Lists ---------------------------------------------------------------------- */
/* A white list with a hairline between rows: tasks, things that need attention,
   the menu. Each list is a container, so its rows lay themselves out by the
   room they have, not by the screen. */
.list {
  container-type: inline-size;
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--card);
}
.list > li + li { border-block-start: var(--border) solid var(--hairline); }
.lead { font-size: var(--text-lg); }
/* A list with no bullets, e.g. facts inside a card. */
.plain { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 2rem;
  block-size: 2rem;
  border-radius: var(--radius-round);
  background: var(--on-shell);
  color: var(--shell);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  line-height: 1;
}
/* An icon-only link or button. Always give it an aria-label. */
.icon-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-inline-size: var(--target);
  min-block-size: var(--target);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--brand);
  cursor: pointer;
}
.icon-button:hover { background: var(--paper-2); color: var(--brand-pressed); }
.icon-button .icon { inline-size: 1.5rem; block-size: 1.5rem; }

/* --- App shell ------------------------------------------------------------------ */
/* One markup for every screen size.
   Phone and tablet (narrower than 64em): a top bar with the organization, the
   page, and a tab bar along the bottom: Today, Inbox, Documents, Menu.
   Desktop (64em and wider): a sidebar with everything, the page beside it.
   Very large text (narrower than 18em, e.g. 200% on a phone): the tab bar
   goes and the top bar shows one "Menu" button, so the page keeps the screen.

   <body class="app">
     <a class="skip-link" href="#main">…</a>
     <header class="app-bar">…</header>             phone and tablet
     <nav class="sidebar" aria-label="…">…</nav>     desktop
     <main class="app-main" id="main">
       <div class="page">…</div>
       <footer class="app-footer">…</footer>
     </main>
     <nav class="tabbar" aria-label="…">…</nav>      phone and tablet
   </body>

   The sidebar and the tab bar carry the same links. Only one is ever shown;
   the other is display: none, so a screen reader meets one navigation. */
.app { min-block-size: 100vh; min-block-size: 100dvh; }

/* The organization: its own square logo (an <img>) and its name, never cut short. */
.org {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-inline-size: 0;
  min-block-size: var(--target);
  color: var(--ink);
  font-weight: var(--weight-strong);
  line-height: var(--leading-tight);
  text-decoration: none;
}
.org:hover { color: var(--ink); text-decoration: underline; }
.org__logo { flex: none; inline-size: 2rem; block-size: 2rem; border-radius: var(--radius-sm); }
.org__name { min-inline-size: 0; overflow-wrap: anywhere; }

.app-bar {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-1);
  padding-inline: var(--space-4) var(--space-2);
  border-block-end: 0;
  background: var(--shell);
  color: var(--on-shell);
}
.app-bar .org { flex: 1; }
.app-bar .org, .app-bar .icon-button { color: var(--on-shell); }
.app-bar .icon-button:hover { background: var(--shell-2); color: var(--on-shell); }
.app-bar__menu { display: none; }

/* The tab bar (3.1, D-092): the ink bar of the phone design, 84 tall (56 for the tabs and the
   28 the home indicator needs, or the device's own safe area when it is more), 24px icons,
   15px labels that keep their size at Large, the current tab in cream and 700 with a 3px line
   over it. Today, Inbox and Menu are always there; Documents only for a member who may open the
   documents, so a volunteer or a member sees three tabs. The iPhone app draws its own bar in
   mobile/www (D-092 (4): Today, Documents, Scan, Community, Me; the Inbox behind a bell). */
.tabbar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-inline: 6px;
  padding-block-end: max(28px, env(safe-area-inset-bottom));
  border-block-start: var(--border) solid var(--shell-hairline);
  background: var(--shell);
}
.tabbar__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-block-size: 56px;
  padding-block: var(--space-1) 0;
  padding-inline: var(--space-1);
  border-block-start: 3px solid transparent;
  color: var(--on-shell-2);
  font-size: var(--text-tab);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.tabbar__item .icon { inline-size: 24px; block-size: 24px; }
.tabbar__item:hover { color: var(--on-shell); text-decoration: underline; }
/* The current tab: cream, bold, and a line above it, so it is never colour alone. */
.tabbar__item[aria-current="page"] { border-block-start-color: var(--sb-tab-mark); color: var(--on-shell); font-weight: 700; }
.tabbar__item:focus-visible { outline-color: var(--sb-tab-mark); outline-offset: -4px; }
.tabbar__badge { position: absolute; inset-block-start: 0.2rem; inset-inline-start: calc(50% + 0.4rem); background: var(--on-shell); color: var(--shell); }

.app-main { padding-block-end: calc(56px + 3px + max(28px, env(safe-area-inset-bottom))); }
.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  max-inline-size: 72rem;
  margin-inline: auto;
  padding: var(--space-5) var(--space-4) var(--space-6);
  color: var(--ink-2);
  font-size: var(--text-sm);
}

@media (max-width: 18em) {
  /* Very large text: the page keeps the screen. */
  .tabbar { display: none; }
  .app-bar { position: static; flex-wrap: wrap; padding-block: var(--space-2); }
  .app-bar .org { flex: 1 1 100%; }
  .app-bar__menu { display: inline-flex; margin-inline-start: auto; }
  .app-main { padding-block-end: 0; }
}

/* The menu (ShadowNav, 3.1, D-092): ink panel, padding 16 12 14, gap 14. The organisation row,
   the search field, the places as 44px rows (58 at Large) with 20px icons, then Me and the
   settings button in the footer. What a role cannot open is left out, never greyed. */
.sidebar {
  display: none;
  inline-size: var(--sidebar-width);
  padding-inline: var(--space-3);
  border-inline-end: 0;
  background: var(--shell);
  color: var(--on-shell);
}
@media (min-width: 64em) {
  .app { display: grid; grid-template-columns: var(--nav) minmax(0, 1fr); }
  .app-bar,
  .tabbar { display: none; }
  .app-main { grid-column: 2; grid-row: 1; padding-block-end: 0; }
  .app-footer { padding-inline: var(--space-6); }
  .sidebar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    inset-block-start: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    block-size: 100vh;
    block-size: 100dvh;
    overflow-y: auto;
    padding-block: 16px 0;
    padding-inline: 12px;
    font-size: var(--text-sm); /* the menu reads at 15, the page at 17 */
    line-height: 1.45;
  }
  /* Me and the settings button stay in view while a long list of places scrolls. */
  .sidebar__foot {
    position: sticky;
    inset-block-end: 0;
    margin-inline: -12px;
    padding-block: 0 14px;
    padding-inline: 12px;
    background: var(--shell);
  }
}
.sidebar > * { flex: none; } /* a long menu scrolls; its rows never squash */
.sidebar > .org { gap: 10px; min-block-size: 0; padding-block: 2px 0; padding-inline: 6px; font-size: var(--text-sm); line-height: 1.2; }
/* The footer: its rule runs across the menu's column only (208 at Standard), not to the edges;
   the sheet behind it bleeds to the edges so places scrolling under it stay hidden. */
.sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-block-start: auto;
  margin-inline: -12px;
  padding-inline: 12px;
  background: var(--shell);
}
.sidebar__foot > .nav-list { padding-block-start: 10px; border-block-start: var(--border) solid var(--shell-hairline); }
.nav-item .count { min-inline-size: 24px; padding-inline: 7px; line-height: 22px; }
.sidebar .org, .sidebar .org__name { color: var(--on-shell); }

/* Search: a labelled field and a button; works without JavaScript. */
.search { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.search .input { flex: 1 1 8rem; min-inline-size: 0; }
.search .button { flex: none; padding-inline: var(--space-3); }
/* In the menu: 44 tall, a field on the ink panel; "/" focuses it (keys.js). */
.sidebar .search .input {
  min-block-size: var(--sb-nav-row);
  padding-block: 0;
  border-color: var(--sb-nav-field-border);
  background: var(--shell-2);
  color: var(--on-shell);
}
.sidebar .search .input::placeholder { color: var(--on-shell-2); }
.sidebar .search .button { display: none; } /* the field carries its own icon */
/* Search open: the field takes the current item's look. */
.nav-search.is-current .input {
  border-color: transparent;
  background: var(--sb-nav-current-bg);
  color: var(--sb-nav-current-ink);
  font-weight: 700;
  box-shadow: inset calc(3px * var(--sb-dir)) 0 0 var(--sb-nav-accent);
}
.sidebar .nav-search.is-current .search__icon { color: var(--sb-nav-accent); }

/* Navigation. 3.0 (D-091): one flat list. After core's places, one place per group the
   organization has an area in (Board, People, Programs, Money, Building, then More), always
   in that order; a group with more than one area opens its own page. The headings below
   are the Menu page's, and only it groups areas. */
.nav { display: flex; flex-direction: column; gap: var(--space-3); }
.nav-group { display: flex; flex-direction: column; gap: var(--space-1); }
.nav-heading {
  padding-inline: var(--space-3);
  color: var(--on-shell-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  line-height: var(--leading-body);
}
.nav-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-block-size: var(--sb-nav-row);
  padding-block: var(--space-1);
  padding-inline: 12px;
  border-radius: var(--radius-sm);
  color: var(--on-shell);
  line-height: 1.25;
  text-decoration: none;
}
.nav-item > .icon { inline-size: 20px; block-size: 20px; color: var(--on-shell-2); }
.nav-item:hover { background: var(--shell-2); color: var(--on-shell); }
/* The current item: a cream sheet, ink words in 700, a 3px blue bar at its start. The bar is
   an inset shadow whose offset follows --sb-dir, so it moves to the right in a right-to-left
   page with no rule of its own. */
.nav-item[aria-current="page"] {
  background: var(--sb-nav-current-bg);
  color: var(--sb-nav-current-ink);
  font-weight: 700;
  box-shadow: inset calc(3px * var(--sb-dir)) 0 0 var(--sb-nav-accent);
}
.nav-item[aria-current="page"] > .icon { color: var(--sb-nav-accent); }
.nav-item .count { margin-inline-start: auto; background: var(--on-shell); color: var(--shell); }
.nav-item__text { display: flex; flex-direction: column; min-inline-size: 0; }
.nav-item__hint { color: var(--on-shell-2); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.nav-item[aria-current="page"] .nav-item__hint { color: var(--sb-nav-current-ink); }
/* The focus ring on the ink menu and app bar: the light blue the tab bar uses (8.4:1 on the
   menu), since the page's blue ring is 2.2:1 there (Accessibility, "Focus ring … both themes"). */
.sidebar :focus-visible, .app-bar :focus-visible { outline-color: var(--sb-tab-mark); }

/* The footer row: a 36px avatar with the initials, "Me", and the settings button beside it for
   those who may open settings. Me open: the row takes the current item's look and the avatar
   turns ink with cream initials. */
.nav-foot { display: flex; align-items: center; gap: 0; border-radius: var(--radius-sm); }
.nav-foot > .nav-item { flex: 1; gap: 10px; min-inline-size: 0; padding-inline: 6px 0; }
.nav-foot .avatar { inline-size: 36px; block-size: 36px; background: var(--on-shell); color: var(--shell); font-weight: 700; }
.nav-foot:has(> .nav-item[aria-current="page"]) {
  background: var(--sb-nav-current-bg);
  box-shadow: inset calc(3px * var(--sb-dir)) 0 0 var(--sb-nav-accent);
}
.nav-foot > .nav-item[aria-current="page"] { box-shadow: none; }
.nav-foot > .nav-item[aria-current="page"] .avatar { background: var(--sb-nav-current-ink); color: var(--sb-nav-current-bg); }
.nav-foot__settings { inline-size: 44px; block-size: 44px; color: var(--on-shell-2); }
.nav-foot__settings .icon { inline-size: 20px; block-size: 20px; }
.nav-foot__settings:hover { background: var(--shell-2); color: var(--on-shell); }
.nav-foot:has(> .nav-item[aria-current="page"]) .nav-foot__settings,
.nav-foot__settings[aria-current="page"] { color: var(--sb-nav-accent); }
.nav-foot__settings[aria-current="page"] { background: var(--sb-nav-current-bg); }

/* --- Page --------------------------------------------------------------------------- */
.page {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  max-inline-size: 72rem;
  margin-inline: auto;
  padding-block: 16px 28px;
  padding-inline: 16px; /* the phone's 16px screen margin, at every text size */
  gap: 1.1rem;
}
/* The laptop frame (every Shadow board screen): main padding 22 32 24 and a 16px stack, both in
   rem so they grow at Large (27 40 · 20), as the Large file draws them. */
@media (min-width: 40em) { .page { padding-block: 1.3rem 1.4rem; padding-inline: 1.875rem; gap: 0.95rem; } }
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  position: relative;
  padding-block-end: calc(var(--space-4) + 3px);
}
.page-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 3px;
  border-block-start: var(--rule);
  border-block-end: var(--rule-2);
}
.page-header__text { display: flex; flex: 1 1 20rem; flex-direction: column; gap: var(--space-2); min-inline-size: 0; }
.page-header__meta { color: var(--ink-2); font-family: var(--font-serif); font-style: italic; font-size: var(--text-date); line-height: 1.2; }
.section { display: flex; flex-direction: column; gap: var(--space-3); min-inline-size: 0; }
.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
}
.section__note { color: var(--ink-2); font-size: var(--text-sm); }
/* Two columns when the page is wide enough: the main job, then what supports it. */
.split { display: grid; gap: var(--space-6); align-items: start; }
@container (min-width: 52em) {
  .split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
.cards { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.cards--stack { grid-template-columns: minmax(0, 1fr); }
/* Today's module cards in the main column when "Yours" is empty: one column, two from 40em of
   the column, never more (design review CORE-19). */
.cards--two { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 40em) {
  .cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The margin column: the areas beside the day's work, on the tinted ground. */
.split > .section:last-child { background: var(--paper-2); padding: var(--space-5); border-radius: var(--radius-sm); }

/* --- Tasks (Today) ------------------------------------------------------------------- */
.task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
}
.task__body { display: flex; flex: 1 1 15rem; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.task__title { font-weight: var(--weight-strong); }
.task__meta { color: var(--ink-2); font-size: var(--text-sm); }
.task__lead {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-2);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.task__more > summary { font-size: var(--text-sm); }
.task__more[open] > .task__meta,
.task__more[open] > .task__steps { margin-block-end: var(--space-2); }
.task__steps { display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding-inline-start: 1.25rem; color: var(--ink-2); font-size: var(--text-sm); }
.task__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2) var(--space-3);
  margin-inline-start: auto;
}
.task__end form { display: flex; margin: 0; }

/* --- Menu: every area, as big rows --------------------------------------------------- */
.menu-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  min-block-size: 3.5rem;
  padding: var(--space-3) var(--space-4);
  color: var(--ink);
  text-decoration: none;
}
.list > li:first-child > .menu-item { border-start-start-radius: var(--radius-md); border-start-end-radius: var(--radius-md); }
.list > li:last-child > .menu-item { border-end-start-radius: var(--radius-md); border-end-end-radius: var(--radius-md); }
.menu-item:hover { background: var(--paper-2); color: var(--ink); }
.menu-item:hover .menu-item__title { text-decoration: underline; }
.menu-item:focus-visible { outline-offset: -3px; }
.menu-item__icon {
  display: grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--paper-2);
  color: var(--ink);
}
.menu-item__text { display: flex; flex-direction: column; gap: 0.125rem; min-inline-size: 0; }
.menu-item__title { color: var(--brand); font-weight: var(--weight-strong); }
.menu-item__hint { color: var(--ink-2); font-size: var(--text-sm); }
.menu-item > .icon:last-child { color: var(--ink-2); }
@container (max-width: 16em) {
  .menu-item { grid-template-columns: minmax(0, 1fr) auto auto; }
  .menu-item__icon { display: none; }
}
.menu-groups { display: grid; gap: var(--space-6); }
@container (min-width: 46em) {
  .menu-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* --- Readiness score ------------------------------------------------------------------ */
/* One internal number the board watches over time. Ink, never a signal colour:
   the score is a trend to discuss, not a verdict. */
.score { display: grid; gap: var(--space-4) var(--space-6); align-items: center; }
@container (min-width: 44em) {
  .score { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.score__main { display: flex; flex-direction: column; gap: var(--space-2); }
.score__value { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.score__number { font-family: var(--font-serif); font-size: var(--text-3xl); font-weight: var(--weight-regular); line-height: 0.9; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.score__of { color: var(--ink-2); }
.progress--ink::-webkit-progress-value { background: var(--ink); }
.progress--ink::-moz-progress-bar { background: var(--ink); }
/* The trend: one bar per quarter. The numbers and months are HTML text, so
   they grow with the reader's text size; each bar is a tiny SVG whose height
   is an attribute, which a strict content security policy allows. */
.trend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: end;
  max-inline-size: 22rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trend li { display: grid; grid-template-rows: auto 4.5rem auto; justify-items: center; gap: var(--space-1); }
.trend__value { grid-row: 1; color: var(--ink-2); font-family: var(--font-serif); font-size: 1.1765rem; font-weight: var(--weight-regular); font-variant-numeric: lining-nums tabular-nums; }
.trend__bar { grid-row: 2; inline-size: 100%; max-inline-size: 3rem; block-size: 100%; }
.trend__bar rect { fill: var(--control-border); }
.trend__label { grid-row: 3; color: var(--ink-2); font-size: var(--text-sm); }
.trend__now .trend__value,
.trend__now .trend__label { color: var(--ink); font-weight: var(--weight-strong); }
.trend__now .trend__bar rect { fill: var(--ink); }
/* 3.1 (Fuller pages, "▸ Change roles"): a small triangle and plain words in 600, underlined on
   hover; the triangle turns down when open and points the reading way. */
details.disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: var(--target);
  color: var(--brand);
  font-weight: var(--weight-strong);
  text-decoration: none;
  text-underline-offset: 0.2em;
  list-style: none;
  cursor: pointer;
}
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "▸" / ""; display: inline-block; }
[dir="rtl"] details.disclosure:not([open]) > summary::before { transform: scaleX(-1); }
details.disclosure[open] > summary::before { transform: rotate(90deg); }
details.disclosure > summary:hover { color: var(--brand-pressed); text-decoration: underline; }
details.disclosure[open] > summary { margin-block-end: var(--space-2); }

/* --- Shelf summary -------------------------------------------------------------------- */
.shelves { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
/* A shelf is a tab with a heavy base. */
.shelves .card { border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-block-end: 4px solid var(--ink); }
.shelves .card__title { font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: var(--text-xl); }
.counts { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.counts li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-3); }
.counts__n { color: var(--ink); font-family: var(--font-serif); font-size: 1.412rem; font-weight: var(--weight-regular); font-variant-numeric: lining-nums tabular-nums; }

/* --- Needs attention: what it is, what happens if it lapses, by when ------------------ */
.issue { display: grid; gap: var(--space-3) var(--space-6); padding: var(--space-4); }
.issue__main { display: flex; flex-direction: column; gap: var(--space-2); min-inline-size: 0; }
.issue__signals { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.issue__title { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.issue__where { color: var(--ink-2); font-size: var(--text-sm); }
.issue__label { font-weight: var(--weight-strong); }
.issue__act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
@container (min-width: 44em) {
  .issue { grid-template-columns: minmax(0, 1fr) auto; }
  .issue__act { flex-direction: column; align-items: flex-end; text-align: end; }
}

/* --- Entrance: sign-in and the steps around it: see "S3 account and sign-in" at the end. */
.divider { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-2); font-size: var(--text-sm); }
.divider::before,
.divider::after { content: ""; flex: 1; border-block-start: var(--border) solid var(--hairline); }
.input--code {
  max-inline-size: 13rem;
  font-size: var(--text-xl);
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}
.feature-icon {
  display: grid;
  place-items: center;
  inline-size: 4.5rem;
  block-size: 4.5rem;
  border-radius: var(--radius-round);
  background: var(--paper-2);
  color: var(--ink);
}
.feature-icon .icon { inline-size: 2.5rem; block-size: 2.5rem; }
.ticks { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.ticks li { display: flex; align-items: flex-start; gap: var(--space-2); }
.ticks .icon { margin-block-start: 0.15em; color: var(--ink-2); }

/* --- Facts: label and value pairs ------------------------------------------------ */
/* <dl class="facts"><dt>Where</dt><dd>Back stairs</dd>…</dl>. Side by side when
   there is room, label above value when there is not. */
.facts {
  display: grid;
  grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr);
  gap: var(--space-2) var(--space-5);
  margin: 0;
}
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; min-inline-size: 0; }
@container (max-width: 28em) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-block-end: var(--space-3); }
}

/* --- History: what happened, when, by whom ----------------------------------------- */
/* <ol class="list history"><li><span class="history__date">…</span>
   <div><p class="history__what">…</p><p class="history__who">…</p></div></li></ol>
   Newest first. Nothing in it can be edited: it is the record. */
.history > li {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
  padding: var(--space-3) var(--space-4);
}
.history__date { color: var(--ink-2); font-family: var(--font-serif); font-size: 1.1765rem; font-weight: var(--weight-regular); font-variant-numeric: lining-nums tabular-nums; padding-block-start: 0.1em; }
.history__what { font-weight: var(--weight-strong); }
.history__who { color: var(--ink-2); font-size: var(--text-sm); }
@container (max-width: 30em) {
  .history > li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* --- A file that is filed, or about to be ------------------------------------------- */
.doc-file { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.doc-file > .icon { inline-size: 2rem; block-size: 2rem; color: var(--ink-2); }
.doc-file__text { display: flex; flex: 1 1 12rem; flex-direction: column; min-inline-size: 0; }
.doc-file__name { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.doc-file__meta { color: var(--ink-2); font-size: var(--text-sm); }

/* A photo that is filed in the vault but not shown inline. */
.photo-slot {
  display: grid;
  place-items: center;
  gap: var(--space-2);
  max-inline-size: 22rem;
  aspect-ratio: 4 / 3;
  padding: var(--space-4);
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  color: var(--ink-2);
  text-align: center;
}
.photo-slot .icon { inline-size: 2rem; block-size: 2rem; }

/* --- Scanned pages on the phone ------------------------------------------------------ */
.thumbs { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.thumb {
  inline-size: 5.5rem;
  aspect-ratio: 17 / 22;
  padding: 0.5rem;
  border: var(--border) solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--control-border);
}
.thumb svg { display: block; inline-size: 100%; block-size: 100%; }

/* --- Lock screen: PIN dots and keypad ------------------------------------------------- */
.lock { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); text-align: center; color: var(--on-shell); }
.app:has(.lock) { background: var(--shell) repeating-linear-gradient(to bottom, transparent 0 43px, var(--shell-2) 43px 44px); }
.lock .button { background: var(--on-shell); color: var(--shell); }
.lock__symbol { inline-size: 3rem; block-size: auto; color: var(--logo); }
.pin { display: flex; justify-content: center; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.pin__dot {
  inline-size: 1rem;
  block-size: 1rem;
  border: var(--border-strong) solid var(--on-shell);
  border-radius: var(--radius-round);
}
.pin__dot.is-filled { background: var(--on-shell); }
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 4.5rem);
  gap: var(--space-3) var(--space-5);
  justify-content: center;
}
.keypad__key {
  display: grid;
  place-items: center;
  inline-size: 4.5rem;
  block-size: 4.5rem;
  border: var(--border) solid var(--shell-hairline);
  border-radius: var(--radius-round);
  background: transparent;
  color: var(--on-shell);
  font: inherit;
  font-family: var(--font-serif);
  font-size: 1.882rem;
  font-weight: var(--weight-serif);
  font-variant-numeric: lining-nums tabular-nums;
  cursor: pointer;
}
.keypad__key:hover { background: var(--paper-2); }
.keypad__key--quiet { border-color: transparent; background: transparent; color: var(--brand); font-size: var(--text-md); }
@media (max-width: 20em) {
  .keypad { grid-template-columns: repeat(3, var(--target)); gap: var(--space-2); }
  .keypad__key { inline-size: var(--target); block-size: var(--target); font-size: var(--text-md); }
}

.back-link { display: inline-flex; align-items: center; gap: var(--space-1); min-block-size: var(--target); }

/* --- Printed letter (receipts, acknowledgments) --------------------------------------- */
/* One US Letter page. On screen it sits on the paper like a sheet, light in both themes (the
   sheet carries data-theme="light", MON-24); printed, it is black on white with one-inch margins. */
.letter {
  display: flex;
  flex-direction: column;
  gap: 1.4em;
  max-inline-size: 8.5in;
  min-block-size: 11in;
  margin-inline: auto;
  padding: 0.8in 0.9in;
  background: var(--card);
  color: var(--ink);
  font-size: 12pt;
  line-height: 1.45;
}
.letter p { max-inline-size: none; }
.letter__head { display: flex; align-items: center; gap: 1em; padding-block-end: 1em; border-block-end: 1px solid var(--ink); }
.letter__logo { inline-size: 0.6in; block-size: 0.6in; }
.letter__org { font-size: 14pt; font-weight: var(--weight-strong); line-height: 1.2; }
.letter__address { font-size: 10pt; color: var(--ink-2); }
.letter__receipt { inline-size: 100%; border-collapse: collapse; font-size: 11pt; }
.letter__receipt th,
.letter__receipt td { padding: 0.35em 0.6em; border: 1px solid var(--ink); text-align: start; vertical-align: top; }
.letter__receipt th { inline-size: 40%; font-weight: var(--weight-strong); }
.letter__receipt .num { text-align: end; font-variant-numeric: tabular-nums; } /* money columns (MON-8) */
.letter__signature { display: flex; flex-direction: column; gap: 0.2em; }
.letter__line { inline-size: 2.6in; margin-block: 2.2em 0.3em; border-block-start: 1px solid var(--ink); }
.letter__foot { margin-block-start: auto; padding-block-start: 1em; border-block-start: 1px solid var(--ink-2); color: var(--ink-2); font-size: 9.5pt; }
.letter-page { padding: var(--space-5) var(--space-3); }
@media (max-width: 40em) {
  .letter { min-block-size: 0; padding: var(--space-5) var(--space-4); font-size: var(--text-md); }
}

.error-code { font-size: var(--text-lg); font-weight: var(--weight-strong); letter-spacing: 0.06em; }

/* --- An email as it arrives ------------------------------------------------------------- */
.mail { display: flex; flex-direction: column; gap: 0; max-inline-size: 40rem; padding: 0; overflow: hidden; }
.mail__head { padding: var(--space-4) var(--space-5); border-block-end: var(--border) solid var(--hairline); background: var(--paper-2); }
.mail__head .facts { gap: var(--space-1) var(--space-4); }
.mail__body { padding: var(--space-5); white-space: pre-line; overflow-wrap: anywhere; }

/* --- Very large text on a phone ------------------------------------------------ */
/* 200% text on a phone leaves about 11em of width. Headings step down one
   size, padding tightens and long words hyphenate instead of breaking at
   random. Nothing scrolls sideways. */
@media (max-width: 20em) {
  body { hyphens: auto; -webkit-hyphens: auto; }
  h1 { font-size: var(--text-xl); }
  h2 { font-size: var(--text-lg); }
  .page { padding-inline: var(--space-3); }
  .card, .entrance__panel { padding: var(--space-3); }
  .task, .issue, .menu-item { padding-inline: var(--space-3); }
  .app-bar .icon-button { display: none; }
  .mail__head, .mail__body { padding: var(--space-3); }
  .menu-item { grid-template-columns: minmax(0, 1fr) auto; }
  .menu-item > .icon:last-child { display: none; }
}

/* --- Standalone links are 44px targets too ------------------------------------ */
/* A link that stands on its own (a title, "See all", a footer link) gets a
   44px-tall hit area. Padding with an equal negative margin grows the target
   without moving anything. Links inside running text stay as they are. */
.task__title,
.table__primary a,
.card__title a,
.issue__title a,
.card__footer > a:not(.button),
.section__header a,
.photo-slot a,
details.disclosure p a {
  padding-block: 0.75rem;
  margin-block: -0.75rem;
}
.task__title, .issue__title a, .card__title a { text-decoration-color: var(--brand); text-underline-offset: 0.3em; }
.app-footer a,
.entrance__foot a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--target);
  min-inline-size: var(--target);
}
.app-footer,
.entrance__foot { align-items: center; }

/* --- Windows high contrast -------------------------------------------------------- */
/* --- 1.4: what the product needed ------------------------------------------------- */
/* The organization before it has a logo of its own: its first letter, in ink. */
.org__mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 2rem;
  block-size: 2rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-weight: var(--weight-strong);
  line-height: 1;
}
.sidebar .org__mark, .app-bar .org__mark { background: var(--sb-org-badge); color: var(--sb-org-badge-ink); font-weight: 700; }
.sidebar .org__mark { inline-size: 32px; block-size: 32px; font-size: var(--text-paper); }

/* A button that reads as a link: the language switch, which has to POST. */
button.link {
  min-block-size: var(--target); /* a 44px target, like every other control */
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
button.link:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.app-footer .link,
.entrance__top .link,
.entrance__foot .link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--target);
  min-inline-size: var(--target);
}
.app-footer > span:first-child, .entrance__foot > span:first-child { font-weight: var(--weight-strong); color: var(--ink-2); }
.app-footer .by, .entrance__foot .by { font-weight: var(--weight-regular); }
.app-footer form,
.entrance__top form,
.entrance__foot form { display: contents; }

/* A number of minutes beside a Done button. */
.input--tiny { inline-size: 7rem; max-inline-size: 7rem; }
.task__end form { flex-wrap: wrap; gap: var(--space-2); }

/* Short standalone links are 44px wide as well as tall ("Open" under a card). */
.card__footer > a:not(.button) { min-inline-size: var(--target); }
/* A link that is the whole value of a fact, or a paragraph of its own in the sign-in panel. */
.facts dd > a:only-child,
.entrance__panel > p > a:only-child { display: inline-block; padding-block: 0.75rem; margin-block: -0.75rem; }

/* A card that opens and closes: its heading is the 44px target, a chevron says so. */
details.card > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-block-size: var(--target);
  cursor: pointer;
  list-style: none;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary .card__meta { margin-inline-start: auto; }
details.card > summary::after {
  content: "";
  inline-size: 0.55rem;
  block-size: 0.55rem;
  margin-inline-end: 0.2rem;
  border: solid var(--ink-2);
  border-width: 0 2px 2px 0;
  transform: translateY(-25%) rotate(45deg);
}
details.card[open] > summary::after { transform: translateY(25%) rotate(-135deg); }
details.card > summary:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); border-radius: var(--radius-sm); }

/* A receipt with one row per gift: every column as wide as it needs. */
.letter__receipt--rows th { inline-size: auto; }
.letter h2 { font-size: 13pt; }

/* Targets found short on the converted pages: a one-word crumb or disclosure,
   a link alone in a table cell or beside a status, a document's name. */
.breadcrumb a,
details.disclosure > summary { min-inline-size: var(--target); }
.table td > a:only-child { display: inline-block; padding-block: 0.75rem; margin-block: -0.75rem; }
.cluster > a:not(.button) { display: inline-flex; align-items: center; min-block-size: var(--target); }
/* A file field in a row keeps its own width, so its button sits beside it (SET-26). */
.cluster > input[type="file"]:not([class]) { inline-size: auto; }
a.doc-file__name { display: inline-flex; align-items: center; min-block-size: var(--target); }

/* A monthly trend: as many bars as there are months, up to a year. */
.trend--months { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-inline-size: 36rem; }

/* Something to copy exactly, such as a private calendar address. */
.code-block {
  display: block;
  padding: var(--space-3);
  border: var(--border) solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
  user-select: all;
}

/* A row of tags or chips as a list: no bullets, no indent. */
.plain-row { margin: 0; padding: 0; list-style: none; }

/* Disclosures side by side; the one that opens takes the whole row. */
.cluster > details[open] { flex-basis: 100%; }

/* The CSRF field opens most forms; it takes no space, so it adds no gap either. */
.stack > input[type="hidden"] + * { margin-block-start: 0; }

/* Long words at 200% text: a column may shrink below its longest word, which then wraps. */
.split > *,
.choice__text { min-inline-size: 0; }
.banner { grid-template-columns: auto minmax(0, 1fr); }
.banner__text,
.banner__title,
.choice__text { overflow-wrap: break-word; hyphens: auto; }

/* What only makes sense on a screen: back links and buttons above a letter. */
@media print { .screen-only, .breadcrumb { display: none; } }

/* Three or four tabs: Documents shows only to those who may open it. */
.tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }

/* Messages after a form: calm banners at the top of the page, which stay until
   the next page, so nobody has to catch them before they vanish. */
.messages { display: flex; flex-direction: column; gap: var(--space-3); }

/* Pages with no organization around them: privacy, help, an ended membership. */
.site-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-block-end: var(--border) solid var(--hairline);
  background: var(--paper);
}
.site-bar__home { display: inline-flex; align-items: center; min-block-size: var(--target); color: var(--logo); text-decoration: none; } /* WEL-16: a wordmark, not a text link */
.site-bar__logo { display: block; inline-size: 7rem; block-size: auto; }
.site-bar__links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.site-bar__links a { display: inline-flex; align-items: center; min-block-size: var(--target); }

/* ==========================================================================
   2.0 · The Registry: what the redesign added (T-06 to T-17, D-074)
   ========================================================================== */

/* --- Date stamp for "coming up" rows (add .task--stamp and .task__stamp) --- */
/* The stamp replaces the date in the meta line; .task__end keeps the Done button. */
.task--stamp { align-items: stretch; }
.task__stamp {
  display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center;
  inline-size: 4.25rem; line-height: 1;
  border-inline-end: 1px solid var(--hairline); padding-block: var(--space-1); color: var(--ink-2); font-size: var(--text-sm);
}
.task__stamp strong { font-family: var(--font-serif); font-weight: var(--weight-regular); font-size: var(--text-stamp); color: var(--ink); line-height: 1.1; }

/* --- Logo: the refined mark and the wordmark in the serif ------------------- */
.logo { display: inline-flex; align-items: center; gap: 0.4em; color: var(--logo); line-height: 1; }
.logo__mark { inline-size: 0.8em; block-size: 0.9em; }
.logo__word { font-family: var(--font-serif); font-weight: var(--weight-strong); letter-spacing: -0.015em; }
.site-bar__logo, .entrance__logo { inline-size: auto; }
.site-bar__logo { font-size: 1.647rem; }

/* --- Search: one field that carries its own icon (T-07) ------------------------ */
.search__field { position: relative; display: flex; flex: 1 1 8rem; min-inline-size: 0; }
.search__field .input { flex: 1; padding-inline-start: 2.6rem; }
.search__icon {
  position: absolute; inset-inline-start: var(--space-3); inset-block-start: 50%; translate: 0 -50%;
  color: var(--ink-2); pointer-events: none;
}
.sidebar .search__icon { color: var(--on-shell-2); }

/* --- Page header: the date and the counts beside the title (T-08) --------------- */
.page-header__aside { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); text-align: end; }
.page-header__counts { color: var(--ink-2); font-size: var(--text-sm); }
@container (max-width: 40em) {
  .page-header__aside { align-items: flex-start; text-align: start; }
}

/* --- A section's count or span, on the far side of its heading (.section__header) --- */
.section__count { color: var(--ink-2); font-size: var(--text-sm); }

/* --- Shelves: three tabs, a heavy base under the current one (T-13) -------------- */
.shelf-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.shelf-tab {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: var(--space-1) var(--space-3);
  min-block-size: var(--target); padding: var(--space-4) var(--space-4) var(--space-3);
  border: 1px solid var(--hairline); border-block-end: 4px solid var(--hairline);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--card); color: var(--ink); text-decoration: none;
  transition: border-color var(--duration-fast) var(--ease);
}
.shelf-tab:hover { border-color: var(--control-border); color: var(--ink); }
.shelf-tab[aria-selected="true"] { border-color: var(--ink); border-block-end-color: var(--ink); }
.shelf-tab:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.shelf-tab__name { font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: var(--text-xl); line-height: var(--leading-tight); }
.shelf-tab__count { font-family: var(--font-serif); font-size: 1.412rem; color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; }
.shelf-tab__about { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--text-sm); }
@container (max-width: 40em) {
  /* On a phone the shelves are a row that scrolls sideways; names never break, the line under
     each name goes. */
  .shelf-tabs {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: max-content; gap: var(--space-2);
    overflow-x: auto; padding-block-end: var(--space-1);
  }
  .shelf-tab { padding: var(--space-3) var(--space-4); }
  .shelf-tab__name { font-size: 1.176rem; }
  .shelf-tab__count { font-size: var(--text-md); }
  .shelf-tab__about { display: none; }
}
.folders .menu-item__icon {
  display: inline-grid; place-items: center; inline-size: var(--target); block-size: var(--target);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--paper-2); color: var(--ink);
}
.folders .menu-item__title { color: var(--ink); font-weight: var(--weight-strong); }
@container (max-width: 30em) { .folders .menu-item__icon { display: none; } }
.folders .tag { white-space: nowrap; }

/* --- Filing in two steps: the step meter replaces the double rule (T-14) ------------ */
.page-header--steps { padding-block-end: 0; }
.page-header--steps::after { content: none; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-block-start: calc(-1 * var(--space-4)); }
.steps__bar { block-size: 4px; background: var(--hairline); }
.steps__bar--done { background: var(--ink); }
/* The suggestions read as a choice: the chosen one is marked and tinted. */
.suggestion { grid-template-columns: auto minmax(0, 1fr); }
.suggestion__mark {
  inline-size: 1.5rem; block-size: 1.5rem; border: 2px solid var(--control-border); border-radius: var(--radius-round);
}
.suggestion.is-chosen { background: var(--brand-tint); }
.suggestion.is-chosen .suggestion__mark { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 0.35rem, transparent 0.4rem); }
.suggestions .menu-item__title { color: var(--ink); }

/* --- Compliance: numbered items, the day to act by in a ruled box (screen 06) -------- */
.issues { counter-reset: issue; }
.issues > .issue { counter-increment: issue; position: relative; padding-inline-start: calc(var(--space-4) + 2.5rem); }
.issues > .issue::before {
  content: counter(issue); position: absolute; inset-inline-start: var(--space-4); inset-block-start: var(--space-4);
  font-family: var(--font-serif); font-size: 1.412rem; line-height: 1; color: var(--ink-2);
  font-variant-numeric: lining-nums tabular-nums;
}
.act-by {
  display: flex; flex-direction: column; align-items: center; min-inline-size: 10rem;
  padding: var(--space-2) var(--space-4); border: 1px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink-2); font-size: var(--text-sm); text-align: center;
}
.act-by strong { font-family: var(--font-serif); font-weight: var(--weight-regular); font-size: 1.412rem; color: var(--ink); line-height: 1.2; }
.issue__act .button { min-inline-size: 10rem; }

/* --- Readiness at the top of Compliance: number, ink ruler, trend (T-09) ------------- */
.readiness { display: grid; gap: var(--space-5); padding: 0; overflow: hidden; }
.readiness__main, .readiness__trend { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); }
.readiness__trend { border-block-start: 1px solid var(--hairline); }
@container (min-width: 44em) {
  .readiness { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
  .readiness__trend { border-block-start: 0; border-inline-start: 1px solid var(--hairline); }
}
.readiness__value { display: flex; align-items: baseline; gap: var(--space-2); }
.readiness__of { font-family: var(--font-serif); font-style: italic; font-size: var(--text-date); color: var(--ink-2); }
.ruler { display: block; inline-size: 100%; block-size: 0.75rem; }
[dir="rtl"] .ruler { transform: scaleX(-1); }
.ruler__fill { fill: var(--ink); transform-box: fill-box; transform-origin: 0 0; animation: ruler-fill var(--sb-beat-ruler) var(--ease) both; }
.ruler__base { fill: var(--ink); }
@keyframes ruler-fill { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .ruler__fill { animation: none; } }
.ruler__scale {
  display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none;
  color: var(--ink-2); font-size: var(--text-sm); font-variant-numeric: tabular-nums;
}
/* --- Done: the row folds away and a toast says who and when (T-12, done.js) ---------- */
.task.is-leaving {
  overflow: hidden; opacity: 0; padding-block: 0;
  transition: block-size var(--duration) var(--ease), opacity var(--duration) var(--ease),
    padding var(--duration) var(--ease);
}
/* --- Organization settings: tabs and the area switches (T-15) ------------------------ */
.page-tabs ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; padding: 0; list-style: none; border-block-end: 1px solid var(--hairline); }
.page-tabs a {
  display: inline-flex; align-items: center; min-block-size: var(--target); padding-inline: var(--space-3);
  border-block-end: 3px solid transparent; margin-block-end: -1px; font-weight: var(--weight-strong); text-decoration: none;
}
.page-tabs a[aria-current="page"] { border-block-end-color: var(--ink); color: var(--ink); }
.area { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: var(--space-4); }
.area + .area { border-block-start: 1px solid var(--hairline); }
.area__icon { color: var(--ink); }
.area--off .area__icon { color: var(--control-border); }
.area__text { display: flex; flex-direction: column; gap: var(--space-1); min-inline-size: 0; }
.area__name { font-weight: var(--weight-strong); }
.area__hint { color: var(--ink-2); font-size: var(--text-sm); }
.area form { display: flex; margin: 0; }
/* The switch is drawn with the 3.1 shared pieces below (e. A segmented control and a switch). */

/* --- Languages: the packs with their rulers, the string editor (T-16) ---------------- */
.ruler__fill--quiet { fill: var(--control-border); }
.chip {
  display: inline-flex; align-items: center; min-block-size: var(--target); padding-inline: var(--space-3);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: var(--weight-strong); text-decoration: none;
}
.chip[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.search--page { max-inline-size: 28rem; }
.strings td { vertical-align: top; }
.strings td .textarea { display: block; max-inline-size: none; min-block-size: var(--target); }
.strings td .textarea + .textarea { margin-block-start: var(--space-2); }
.strings__english + .strings__english { margin-block-start: var(--space-2); }
.strings { table-layout: fixed; inline-size: 100%; }
/* A placeholder on the update review, named for what fills it ("a number"), never cut in two (SET-15). */
.strings__slot { display: inline-block; padding-inline: var(--space-1); border: 1px dashed var(--hairline); border-radius: var(--radius-sm); color: var(--ink-2); font-size: var(--text-sm); white-space: nowrap; }
/* On a phone the English sits above its field, so the field gets the whole width (SET-2). */
@media (max-width: 40em) {
  .strings, .strings tbody, .strings tr, .strings td { display: block; inline-size: 100%; }
  .strings thead {
    position: absolute; inline-size: 1px; block-size: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .strings td:first-child { border-block-end: 0; padding-block-end: 0; }
}

/* --- Inbox: a 340px list beside the reading pane (Sidebar "Inbox · laptop"; D-092) --------- */
.inbox-page { display: flex; flex-direction: column; gap: var(--space-4); }
.inbox-page__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.inbox { display: grid; gap: var(--space-4); }
@container (min-width: 52em) {
  .inbox {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 0; align-items: stretch;
    border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--sb-card);
  }
  .inbox__list { border-inline-end: 1px solid var(--rule); }
  .inbox__pane { padding: 22px 26px; min-inline-size: 0; }
  .inbox__back { display: none; }
}
@container (max-width: 52em) {
  /* On a phone an open conversation is the page, with "Inbox" to go back. */
  .inbox--open .inbox__list { display: none; }
  /* The title row steps aside but its h1 stays for screen readers (design review CORE-9). */
  .inbox-page--open .title-row {
    position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .inbox-page--open .title-row > :not(.title-row__title), .inbox-page--open .inbox-page__note { display: none; }
  .inbox__list { border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--sb-card); }
}
.threads { margin: 0; padding: 0; list-style: none; }
.threads > li + li { border-block-start: 1px solid var(--rule); }
.thread {
  display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px;
  padding-block: 12px; padding-inline: 12px 14px; min-block-size: var(--target);
  color: var(--ink); text-decoration: none;
}
.thread:hover { background: var(--paper-2); color: var(--ink); }
.thread[aria-current="page"] { background: var(--paper); box-shadow: inset calc(3px * var(--sb-dir)) 0 0 var(--brand); }
.thread__dot { margin-block-start: 7px; inline-size: 8px; block-size: 8px; border-radius: var(--radius-round); }
.thread--unread .thread__dot { background: var(--brand); }
.thread__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.thread__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: var(--text-sm); }
.thread__who { min-inline-size: 0; overflow-wrap: anywhere; }
.thread__when { flex: none; color: var(--ink-2); }
.thread__subject { font-size: var(--text-paper); line-height: 1.3; }
.thread--unread .thread__who, .thread--unread .thread__subject { font-weight: 700; }
.thread__about { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); line-height: 1.3; }
.thread__about .tile { flex: none; }
.conversation { display: flex; flex-direction: column; gap: var(--space-4); min-inline-size: 0; }
.conversation__head { display: flex; flex-direction: column; gap: 4px; }
.conversation__title { margin: 0; font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: var(--text-xl); line-height: 1.1; }
.conversation__with { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.messages-thread { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.message { padding-block: 10px; padding-inline: 12px; border-inline-start: 3px solid var(--sb-card-border); }
.message--theirs { border-inline-start-color: var(--ink); }
.message__meta { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.message__meta strong { color: var(--ink); }
.message__body { max-inline-size: 62ch; margin: 0; margin-block-start: var(--space-1); line-height: 1.45; }
.tied { display: flex; flex-direction: column; gap: 12px; padding-block: 14px; padding-inline: 16px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper); }
.tied__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--text-sm); }
.tied__title { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.tied__open { font-weight: var(--weight-strong); }
.tied__string { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tied__paper { display: flex; align-items: flex-start; gap: 8px; flex: 1 1 0; min-inline-size: 10rem; margin: 0; }
.tied__knot { flex: none; inline-size: 28px; block-size: 12px; margin-block-start: 6px; color: var(--sb-peg-ink); }
.tied__words { display: flex; flex-direction: column; font-size: var(--text-sm); line-height: 1.25; min-inline-size: 0; }
.tied__name, .tied__word { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.reply { display: flex; flex-direction: column; gap: 10px; margin-block-start: auto; }
.reply__label { font-weight: var(--weight-strong); }
.reply .textarea { min-block-size: 64px; }
.reply__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.reply__note { color: var(--ink-2); font-size: var(--text-sm); }
.notices { display: flex; flex-direction: column; gap: var(--space-3); }
.notices__title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }

@media (forced-colors: active) {
  .tag, .severity, .button, .card, .banner, .toast, .empty, .confirmation, .upload, .file { border: 1px solid CanvasText; }
  .choice input:checked, .choice input:indeterminate { background: Highlight; border-color: Highlight; }
  .choice input::before { border-color: HighlightText; }
  .choice input[type="radio"]::before { background: Highlight; }
  .tabs__tab[aria-current="page"] { border-block-end-color: Highlight; }
  .pagination [aria-current="page"] { border: 2px solid Highlight; }
  .nav-item[aria-current="page"], .tabbar__item[aria-current="page"] { border: 2px solid Highlight; }
  .pin__dot.is-filled { background: CanvasText; }
  .keypad__key, .thumb, .photo-slot { border: 1px solid CanvasText; }
  .list, .menu-item__icon, .avatar, .feature-icon { border: 1px solid CanvasText; }
}

@page { size: letter; margin: 0.75in 0.9in; }

/* --- Print: black on white, every state still readable by icon and word ------------ */
@media print {
  /* !important so print wins over every palette and theme. */
  :root, [data-theme], [data-palette] {
    color-scheme: light;
    --paper: #FFFFFF !important; --paper-2: #FFFFFF !important; --card: #FFFFFF !important;
    --ink: #000000 !important; --ink-2: #333333 !important; --hairline: #999999 !important; --control-border: #666666 !important;
    --logo: #000000 !important;
    --brand: #000000 !important; --brand-tint: #FFFFFF !important; --on-brand: #FFFFFF !important;
    /* The state inks survive print (Printed briefing: the count in brick, words in their state's
       colour, with print-color-adjust: exact); everything else prints black. */
    --brick: #9A2F28 !important; --amber: #7A4E00 !important; --plum: #6A3E86 !important; --moss: #2B6A3A !important; --grey: #333333 !important;
    /* 3.1 (D-092): the wall prints light whatever the screen's theme: the light theme's
       surfaces and fills, edges and pegs in black. */
    --sb-wall: #E9E3D4 !important; --sb-wall-dot: rgb(27 26 23 / 0.16) !important; --sb-empty: #E2DBCB !important;
    --sb-card: #FFFFFF !important; --sb-area-card: #FFFFFF !important; --sb-card-border: #999999 !important; --sb-card-shadow: none !important;
    --sb-place-fill: #8DB396 !important; --sb-due-fill: #F3D081 !important; --sb-lapsed-fill: #994234 !important;
    --sb-place-edge: #2B6A3A !important; --sb-due-edge: #7A4E00 !important; --sb-lapsed-edge: #9A2F28 !important;
    --sb-missing-edge: #9A2F28 !important; --sb-unchecked-edge: #333333 !important; --sb-review-dot: #6A3E86 !important;
    --sb-peg-ink: #000000 !important; --sb-warn-bg: #FFFFFF !important; --sb-warn-border: #000000 !important; --sb-warn-ink: #000000 !important;
  }
  body, [data-theme] { background: #FFFFFF; color: #000000; }
  .paper, .tile, [class*="ink--"], .strip, .strip__count { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tag { background: none; border: 1px solid currentColor; }
  .card, .table tr, .banner, .confirmation { break-inside: avoid; }
  .skip-link, .tabs, .pagination, .toast-region, .actions, .toast__close,
  .app-bar, .sidebar, .tabbar, .app-footer, .task__end, .issue__act .button { display: none; }
  .app { display: block; }
  .app-main { padding: 0; }
  .task, .issue, .history > li { break-inside: avoid; }
  .letter-page { padding: 0; }
  .letter { max-inline-size: none; min-block-size: 0; padding: 0; font-size: 12pt; }
  .letter__logo { filter: grayscale(1); }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* --- Calendar month (D-078) ---------------------------------------------------
   One month of everything dated. A deadline is a tag, a board meeting carries the governance
   mark, an event is plain text with its time: nothing is said by colour alone. Wide screens get
   the grid; a phone gets the days that have something, as a list. */
.month-nav { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.month-nav__title { font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: var(--text-xl); margin: 0; }
.month-nav__step { display: inline-flex; align-items: center; gap: var(--space-1); min-block-size: var(--target); }
.month-nav__today { margin-inline-start: auto; }
.month { inline-size: 100%; border-collapse: collapse; table-layout: fixed; background: var(--card); border: var(--border) solid var(--hairline); }
.month th { padding: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--ink-2); text-align: start; border-block-end: var(--rule-2); }
.month abbr { text-decoration: none; }
.month__day { vertical-align: top; block-size: 7rem; padding: var(--space-2); border: var(--border) solid var(--hairline); }
.month__day--out { background: var(--paper); }
.month__day--out .month__date { color: var(--ink-2); }
.month__day--today { box-shadow: inset 0 0 0 2px var(--ink); }
.month__date { display: block; font-family: var(--font-serif); font-size: var(--text-lg); line-height: 1; margin-block-end: var(--space-2); }
.month__day--today .month__date { font-weight: var(--weight-strong); }
.month__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--text-sm); }
.month__item { min-inline-size: 0; }
.month__link { display: inline-flex; gap: var(--space-1); align-items: baseline; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.month__link:hover { color: var(--brand); text-decoration: underline; }
.month__link .icon { flex: none; inline-size: 1em; block-size: 1em; align-self: center; }
.month__time { color: var(--ink-2); white-space: nowrap; }
.month__tag {
  display: inline-block; max-inline-size: 100%; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  background: var(--paper-2); color: var(--ink); font-weight: var(--weight-strong); text-decoration: none; overflow-wrap: anywhere;
}
.month__tag:hover { background: var(--brand-tint); color: var(--brand); }
.agenda { display: none; list-style: none; margin: 0; padding: 0; }
.agenda__day { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-3); border-block-end: var(--border) solid var(--hairline); }
.agenda__date { display: flex; flex-direction: column; align-items: center; margin: 0; line-height: 1; }
.agenda__dow { font-size: var(--text-sm); color: var(--ink-2); }
.agenda__num { font-family: var(--font-serif); font-size: var(--text-stamp); }
@media (max-width: 720px) {
  .month { display: none; }
  .agenda { display: block; }
  .month-nav__title { order: -1; flex-basis: 100%; }
  .month-nav__today { margin-inline-start: 0; }
}

/* The map of documents (D-088): columns in the order documents can be got. On a phone the
   columns stack; from a tablet up they sit side by side and the map scrolls inside itself. */
.map { position: relative; display: grid; gap: var(--space-4); }
.map__heading { font-size: var(--text-sm); color: var(--ink-2); margin: 0 0 var(--space-2); }
.map__nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.map-node { position: relative; z-index: 1; background: var(--card); border: var(--border) solid var(--hairline); border-inline-start-width: 4px; border-radius: var(--radius-sm); padding: var(--space-3); display: grid; gap: var(--space-1); }
.map-node--ok { border-inline-start-color: var(--moss); }
.map-node--expiring { border-inline-start-color: var(--amber); }
.map-node--review { border-inline-start-color: var(--plum); }
.map-node--missing, .map-node--expired { border-inline-start-color: var(--brick); }
.map-node__title { font-weight: var(--weight-strong); color: var(--ink); overflow-wrap: anywhere; }
.map-node__meta { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; }
.map-node__open { font-size: var(--text-sm); }
.map-node--focus { outline: var(--focus-width) solid var(--brand); outline-offset: 2px; }
.map-node--critical { border-color: var(--brick); }
.map-node--dim { opacity: 0.45; }
.map__edges { display: none; }
@media (min-width: 768px) {
  .map { grid-auto-flow: column; grid-auto-columns: minmax(12rem, 1fr); overflow-x: auto; padding-block-end: var(--space-2); }
  .map__edges { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: visible; }
  .map__edges line { stroke: var(--ink-2); stroke-width: 2; }
  .map__edges line.soft { stroke-dasharray: 6 5; }
}
/* More steps off to the side (design review CORE-11): the far edge fades while there is more to
   scroll, and stops fading at the end. A map that fits has no scroll timeline, so no fade; the
   lede says how many steps there are either way. */
@property --map-fade { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes map-fade { from { --map-fade: 3rem; } 90% { --map-fade: 3rem; } to { --map-fade: 0px; } }
@media (min-width: 768px) {
  @supports (animation-timeline: scroll()) {
    .map { mask-image: linear-gradient(calc(-90deg * var(--sb-dir)), transparent 0, var(--ink) var(--map-fade)); animation: map-fade linear both; animation-timeline: scroll(self inline); }
  }
}

/* --- 3.0 "Shadow board" (D-091): the paper and the wall -------------------------- */
/* A paper is drawn the same way everywhere: `{% paper state size %}`. The tile's fill and the
   review dot come from here, not from the sprite (the style policy refuses colour set inside
   it), and its edge is `currentColor`. Tiles and strokes keep their size at Large text. */
.paper { display: inline-block; flex: none; vertical-align: middle; overflow: visible; }
.paper--lg { inline-size: 44px; block-size: 56px; }
.paper--md { inline-size: 22px; block-size: 28px; }
.paper--sm { inline-size: 10px; block-size: 14px; }
.paper--place, .paper--review { fill: var(--sb-place-fill); color: var(--sb-place-edge); }
.paper--review { stroke: var(--sb-review-dot); }
.paper--due { fill: var(--sb-due-fill); color: var(--sb-due-edge); } /* the corner folded over */
.paper--lapsed { fill: var(--sb-lapsed-fill); color: var(--sb-lapsed-edge); stroke: var(--sb-wall); } /* the bar across it */
.paper--missing { fill: none; color: var(--sb-missing-edge); }
.paper--unchecked { fill: none; color: var(--sb-unchecked-edge); } /* 3.1: not checked yet, dotted */
/* Right to left: the plum dot sits in the end corner (README 19); the tile is otherwise even. */
[dir="rtl"] .paper--review { transform: scaleX(-1); }

/* The wall: a pegboard every paper hangs on, and a peg for each. */
.wall { background: var(--sb-wall-dots), var(--sb-wall); border-radius: var(--radius-sm); }
@media (max-width: 40em) {
  .wall { background-size: 10px 10px, auto; }
}
/* Said under a wall while a keyboard is on it (design review CORE-15; keys.js part 2). */
.wall-hint { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--ink-2); }
.peg {
  display: block;
  inline-size: var(--sb-peg);
  block-size: var(--sb-peg);
  border-radius: var(--radius-round);
  background: var(--sb-peg-ink);
  box-shadow: 0 0 0 2px var(--sb-wall);
}
@media (forced-colors: active) {
  .paper { forced-color-adjust: none; }
  .wall { border: 1px solid CanvasText; }
}

/* --- 3.0 Today: the strip, my wall, the other areas (D-091, Stage 2) ------------------ */
/* Words in a state's ink. */
.ink--lapsed, .ink--missing { color: var(--brick); }
.ink--due { color: var(--amber); }
.ink--place { color: var(--moss); }
.ink--review { color: var(--plum); }
.ink--today { color: var(--ink); }
.ink--task { color: var(--ink-2); }
.ink--unchecked { color: var(--ink-2); } /* "{n} to check": grey, never a gap's ink */

/* A small paper drawn in CSS (10 × 14), for the strip and the margin, where a sprite <use>
   per paper would be heavy. Same fills and edges as `{% paper %}`. */
.tile {
  flex: none;
  display: inline-block;
  inline-size: 10px;
  block-size: 14px;
  box-sizing: border-box;
  border: 1px solid;
  border-radius: 1px;
}
.tile--place { background: var(--sb-place-fill); border-color: var(--sb-place-edge); }
.tile--review {
  background: radial-gradient(circle at calc(100% - 2.6px) 2.6px, var(--sb-review-dot) 0 1.8px, transparent 2.4px), var(--sb-place-fill);
  border-color: var(--sb-place-edge);
}
/* Coming due and lapsed differ by shape, not only by colour (WCAG 1.4.1, design review CORE-1),
   as the sprite draws them: coming due has its lower corner cut and folded over in its edge's
   ink; lapsed is struck through by a bar in the wall's colour. Tiles do not mirror. */
.tile--due {
  background: linear-gradient(var(--sb-due-edge) 0 0) 100% 100% / 4px 4px no-repeat border-box, var(--sb-due-fill);
  border-color: var(--sb-due-edge);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%);
}
.tile--lapsed {
  background: linear-gradient(135deg, transparent calc(50% - 0.9px), var(--sb-wall) 0 calc(50% + 0.9px), transparent 0), var(--sb-lapsed-fill);
  border-color: var(--sb-lapsed-edge);
}
.tile--missing { border: 1.5px dashed var(--sb-missing-edge); }
.tile--unchecked { border: 1.5px dotted var(--sb-unchecked-edge); }
[dir="rtl"] .tile--review {
  background: radial-gradient(circle at 2.6px 2.6px, var(--sb-review-dot) 0 1.8px, transparent 2.4px), var(--sb-place-fill);
}

/* The strip: the count, and one row per shelf. The tile column keeps one width on every row
   (subgrid). Each row draws its papers one of three ways; strip.js picks the one that fits
   (the rule for big walls). Without the script, the gaps counted by state, which always fit. */
.strip { display: flex; flex-direction: column; gap: 12px; padding: 12px 18px 14px; font-size: var(--text-sm); line-height: 1.3; }
.strip__head { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--ink); text-decoration: none; }
.strip__head:hover .strip__need { text-decoration: underline; }
.strip__count { font-family: var(--font-serif); font-size: var(--text-count); line-height: 0.9; letter-spacing: -0.02em; color: var(--brick); }
.strip__say { display: flex; flex-direction: column; gap: 2px; font-weight: var(--weight-strong); line-height: 1.2; }
.strip__critical { display: inline-flex; align-items: center; gap: 5px; color: var(--brick); }
.strip__chevron { inline-size: 22px; block-size: 22px; margin-inline-start: auto; color: var(--brand); }
.strip__head--clear { min-block-size: 41px; color: var(--moss); font-size: var(--text-md); font-weight: var(--weight-strong); }
.strip__head--clear .icon { inline-size: 30px; block-size: 30px; }
.strip__rows { display: grid; grid-template-columns: minmax(6.6rem, max-content) minmax(0, 1fr) auto; /* the label column fits the longest shelf name in each language (Turkish file) */ row-gap: 7px; margin: 0; padding: 0; list-style: none; }
.strip__row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; column-gap: 16px; }
.strip__shelf { font-weight: var(--weight-strong); }
.strip__tiles { display: flex; align-items: center; min-inline-size: 0; block-size: 14px; overflow: hidden; }
.strip__mode { display: none; flex: 1; align-items: center; min-inline-size: 0; }
.strip__row:not([data-mode]) .strip__mode--grouped,
.strip__row[data-mode="3"] .strip__mode--grouped,
.strip__row[data-mode="2"] .strip__mode--gaps,
.strip__row[data-mode="1"] .strip__mode--all { display: flex; }
.strip__mode--all { flex: none; gap: 6px; }
.strip__area { display: flex; gap: 2px; }
.strip__mode--gaps { gap: 2px; }
.strip__mode--grouped { gap: 12px; }
.strip__group { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; line-height: 14px; }
.strip__bar {
  flex: 1 1 auto;
  min-inline-size: 40px;
  block-size: 14px;
  box-sizing: border-box;
  border: 1px solid var(--sb-place-edge);
  border-radius: 1px;
  background: var(--sb-place-fill);
}
.strip__mode--gaps .strip__bar { margin-inline-start: 4px; }
.strip__words { font-weight: var(--weight-strong); text-align: end; white-space: nowrap; }

/* My wall and the margin beside it. */
.board { display: grid; gap: 20px; align-items: start; }
@container (min-width: 52em) {
  .board { grid-template-columns: minmax(0, 1fr) 236px; }
}
/* Large: the papers go to one column and the margin stays on the right, 280 wide (Text sizes,
   "Today · Large"); the frame is 1016 wide there, under 52em of 21px. */
@container (min-width: 880px) {
  html[data-text-size="large"] .board { grid-template-columns: minmax(0, 1fr) 280px; }
}
.board__yours { display: flex; flex-direction: column; gap: var(--space-3); min-inline-size: 0; }
/* Each card keeps its own height: opening "How to do it" on one card grows that card only, and
   the card beside it stays as it was (the row no longer stretches every card to the tallest). */
.slots { display: grid; align-items: start; gap: 12px; margin: 0; padding: 18px 14px 14px; list-style: none; }
@container (min-width: 40em) {
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html[data-text-size="large"] .slots { grid-template-columns: minmax(0, 1fr); }

/* One task on the wall: a card on its peg when its paper is up, an empty dashed outline when
   the paper is missing or has lapsed, a dashed ink outline when it is due today. */
.slot {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-block-size: 64px;
  padding-block: 8px;
  padding-inline: 12px 8px;
  border: 1px solid var(--sb-card-border);
  border-radius: var(--radius-sm);
  background: var(--sb-card);
  box-shadow: var(--sb-card-shadow);
}
.slot--down { border: 2px dashed var(--sb-missing-edge); background: var(--sb-empty); box-shadow: none; }
.slot--today { border: 2px dashed var(--ink); background: var(--sb-empty); box-shadow: none; }
.slot > .peg { position: absolute; inset-block-start: -7px; inset-inline-start: calc(50% - var(--sb-peg) / 2); }
.slot__tile { display: flex; }
.slot__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.slot__title { margin: 0; font-size: var(--text-paper); font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; text-wrap: pretty; }
.slot__meta { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.25; }
.slot__more { font-size: var(--text-sm); }
/* An opened card keeps its tile and button beside the title, where they were, rather than
   sliding to the middle of the steps. */
.slot:has(> .slot__text > .slot__more[open]) { align-items: start; }
.slot__minutes { margin: 2px 0 0; }
.slot.is-leaving {
  overflow: hidden; min-block-size: 0; opacity: 0; padding-block: 0;
  transition: block-size var(--duration) var(--ease), opacity var(--duration) var(--ease),
    padding var(--duration) var(--ease);
}
.slot__act, .slot__act form { display: flex; align-items: center; gap: 6px; }
.slot__act .button { min-inline-size: 64px; padding-inline: 14px; font-size: var(--text-sm); } /* the card's button: 15/600, 14 inside */

/* The other areas: one card each, the worst first, then those with nothing missing. */
.board__margin { display: flex; flex-direction: column; gap: 10px; }
.area-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--sb-card);
}
.area-card__name { margin: 0; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.2; }
.area-card__name a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.area-card__name a:hover { text-decoration: underline; }
.area-card__name .icon { inline-size: 18px; block-size: 18px; }
.area-card__count { margin: 0; font-family: var(--font-serif); font-size: 1.765rem; line-height: 1; letter-spacing: -0.01em; text-align: end; }
/* The count says what it counts, in words a sighted reader sees (design review CORE-8). */
.area-card__unit { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); letter-spacing: 0; }
.area-card__tiles { display: flex; flex-wrap: wrap; gap: 3px; }
.area-card__word { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); text-align: end; }
.all-clear { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-block-size: 44px; margin: 0; padding: 0 4px; font-size: var(--text-sm); }
.all-clear .icon { inline-size: 20px; block-size: 20px; color: var(--moss); }
.all-clear__word { font-weight: var(--weight-strong); color: var(--moss); }

/* Every paper in place: the wall says so, and what comes due next. */
.full-wall { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding-block: var(--space-7); text-align: center; }
.full-wall__mark { inline-size: 64px; block-size: 64px; color: var(--moss); }
.full-wall__title { margin: 0; font-family: var(--font-serif); font-size: clamp(36px, 2.588rem, 55px); font-weight: var(--weight-serif); line-height: 1.1; }
.full-wall__next { margin: 0; font-size: 1.118rem; color: var(--ink-2); }
@media (forced-colors: active) {
  .tile, .strip__bar { forced-color-adjust: none; }
  .slot--down, .slot--today { border-color: CanvasText; }
}

/* --- 3.0 Documents, an area, one document, the (?) layer (D-091, Stage 3) ------------- */
.shelves__actions { flex: none; }
@container (min-width: 40em) {
  .title-row .shelves__actions { flex-wrap: nowrap; } /* the field and File a paper on one line */
}
.shelves__find { flex: 0 1 260px; }
.shelf { display: flex; flex-direction: column; gap: var(--space-3); }
.shelf__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.shelf__head h2 { margin: 0; font-size: 1.53rem; }
.shelf__about { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.shelf__gaps { margin-block: 0; margin-inline: auto 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }

/* A shelf's areas on the pegboard: four a row, three at Large. */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr)); align-items: start; gap: 12px; margin: 0; padding: 16px; list-style: none; }
@container (min-width: 60em) {
  .areas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html[data-text-size="large"] .areas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* An area's card (Screens v2, Documents): the whole card opens the area; its name (16/600) and
   its count on one line, the count at the end; its md tiles; the gap names run as one line of
   text split by middots. */
.shelf-area { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px 8px; padding: 12px 14px 14px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-area-card); }
.shelf-area > :where(:not(.shelf-area__name, .shelf-area__count)) { grid-column: 1 / -1; }
.shelf-area__name { margin: 0; font-family: var(--font-sans); font-size: var(--text-paper); font-weight: var(--weight-strong); line-height: 1.2; }
.shelf-area__name a { color: var(--ink); text-decoration: none; }
.shelf-area__name a::after { content: ""; position: absolute; inset: 0; }
.shelf-area:hover .shelf-area__name a { text-decoration: underline; }
.shelf-area__count { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); text-align: end; }
.shelf-area__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.shelves__actions > .button { flex: none; }
.shelf-area__tiles { display: flex; flex-wrap: wrap; gap: 4px 10px; }
/* Documents v3 (D-117): a record's papers are one group, 10px from the next (md tiles; 6px for
   sm on the phone); the records rolled up are counted in grey under the name; the lock is for
   those who may open the card, its sentence for screen readers only. */
.shelf-area__group { display: flex; flex-wrap: wrap; gap: 4px; }
.shelf-area__roll { margin: -4px 0 0; color: var(--ink-2); font-size: var(--text-sm); }
.shelf-area__lock { inline-size: 16px; block-size: 16px; margin-inline-start: 6px; vertical-align: -2px; color: var(--ink-2); }
.shelf__empty { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.shelf__empty a { color: var(--ink-2); }
.area-folder { display: flex; flex-direction: column; gap: var(--space-3); }
.area-folder__name { margin: 0; font-size: var(--text-lg); }
/* Documents v3 Phase 2: one folder or record on an area's page. Its name and count, a small wall
   with strings (drawn only; the rows say the same in words), and one short row per paper. Under
   48rem of room, so also sooner at Large text, a row stacks. */
.area-folder + .area-folder { margin-block-start: var(--space-5); }
.area-folder__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--space-3); }
.area-folder__count { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.area-wall { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 12px; list-style: none; }
.area-wall__paper { position: relative; display: flex; flex-direction: column; align-items: center; inline-size: 22px; }
.area-wall__paper > .peg { position: relative; z-index: 1; margin-block-end: calc(var(--sb-peg) / -2); }
.area-wall__string { position: absolute; inset-block-start: calc(var(--sb-peg) / 2 - 1px); inset-inline-start: calc(50% - 35px); color: var(--sb-peg-ink); overflow: visible; }
.area-rows-wrap { container-type: inline-size; }
.area-rows { inline-size: 100%; table-layout: fixed; border-collapse: collapse; border: var(--border) solid var(--hairline); background: var(--card); font-size: var(--text-sm); }
.area-rows thead th { padding: 6px var(--space-3); border-block-end: 2px solid var(--ink); color: var(--ink-2); font-weight: var(--weight-strong); text-align: start; }
/* The same columns in every table on the page, so the folders read as one list. */
.area-rows thead th:nth-child(2), .area-rows thead th:nth-child(4) { inline-size: 9rem; }
.area-rows thead th:nth-child(3) { inline-size: 9.5rem; }
.area-rows thead th:nth-child(5) { inline-size: 11rem; }
.area-row { scroll-margin-block-start: var(--space-6); }
.area-row + .area-row { border-block-start: var(--border) solid var(--hairline); }
.area-row:target { outline: 2px solid var(--brand); outline-offset: -2px; }
.area-row > th, .area-row > td { padding: 6px var(--space-3); overflow-wrap: anywhere; text-align: start; vertical-align: middle; font-weight: var(--weight-regular); }
.area-row__line { display: flex; align-items: center; gap: var(--space-3); }
.area-row__tile { position: relative; flex: none; }
.area-row__name { display: flex; flex-direction: column; min-inline-size: 0; }
.area-row__name > a { font-weight: var(--weight-strong); }
.area-row__string { color: var(--ink-2); }
.area-row__state > span:first-child { display: block; font-weight: var(--weight-strong); }
.area-row__when { color: var(--ink-2); }
.area-row > .area-row__act { overflow-wrap: normal; text-align: end; }
@container (max-width: 52rem) {
  .area-rows, .area-rows tbody { display: block; }
  .area-rows thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .area-row { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); }
  .area-row > th, .area-row > td { padding: 0; }
  .area-row > .area-row__state, .area-row > .area-row__often, .area-row > .area-row__who { padding-inline-start: calc(22px + var(--space-3)); }
  .area-row > .area-row__who--none { display: none; }
  .area-row__state > span:first-child { display: inline; }
  .area-row__when { margin-inline-start: var(--space-2); }
  .area-row > .area-row__act { margin-block-start: var(--space-2); text-align: start; }
  .area-row__act > .button { inline-size: 100%; }
}
.shelf-area__gaps { margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); line-height: 1.35; }
.shelf-area__gaps > li { display: inline; }
.shelf-area__gaps > li + li::before { content: " · "; }

/* An area opened: its papers on pegs, in the order they wait on each other. A paper that waits
   on the one before it hangs from it by a string between their pegs. */
.hangs { display: grid; grid-template-columns: repeat(auto-fill, 96px); gap: 22px 12px; margin: 0; padding: 18px 16px 16px; overflow: hidden; list-style: none; }
.hang { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.hang > .peg { position: relative; z-index: 2; }
.hang__string { position: absolute; z-index: 1; inset-block-start: 4px; inset-inline-start: -60px; color: var(--sb-peg-ink); overflow: visible; }
.hang__paper { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-block-start: -4px; color: var(--ink); text-decoration: none; }
.hang__paper:hover .hang__name { text-decoration: underline; }
.hang__name { font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; }
.hang__state { font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.2; }
.hang__note { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.25; }
/* The list under the wall, in the wall's order (design review CORE-7): a paper on a string
   draws the string's end before its name, and says what it waits on in words. */
.folder-papers__name { display: flex; align-items: center; gap: 6px; }
.folder-papers__string { flex: none; color: var(--sb-peg-ink); }

/* One document: the paper on its peg, its actions and the (?) tag, then what it is; beside it
   the details and the area's papers with this one ringed. */
.doc { display: grid; gap: 24px; align-items: start; }
/* The details follow the hung paper in the page (design review CORE-17): on a phone they are
   read right under it; from a laptop up they are the column beside the rest. */
@container (min-width: 52em) {
  .doc { grid-template-columns: minmax(0, 1fr) 288px; grid-template-rows: auto 1fr; }
  .doc__head { grid-column: 1; grid-row: 1; }
  .doc__rest { grid-column: 1; grid-row: 2; }
  .doc__side { grid-column: 2; grid-row: 1 / span 2; }
}
.doc__wall { padding: 22px 16px 16px; }
.hung {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--sb-card-border);
  border-radius: var(--radius-sm);
  background: var(--sb-card);
  box-shadow: var(--sb-card-shadow);
}
.hung--down { border: 2px dashed var(--sb-missing-edge); background: var(--sb-empty); box-shadow: none; }
.hung > .peg { position: absolute; inset-block-start: -7px; inset-inline-start: calc(50% - var(--sb-peg) / 2); }
.hung__text p, .hung__state p { margin: 0; }
.hung__title { font-weight: var(--weight-strong); }
.hung__by { color: var(--ink-2); font-size: var(--text-sm); }
.hung__state { font-size: var(--text-sm); font-weight: var(--weight-strong); text-align: end; }
.doc__acts { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.doc__side { display: flex; flex-direction: column; gap: var(--space-4); }
.doc__area { display: flex; flex-direction: column; gap: 6px; }
.doc__area p { margin: 0; }
.doc__tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.doc__tile { display: inline-flex; border-radius: 1px; }
.doc__tile--this { box-shadow: 0 0 0 2px var(--sb-wall), 0 0 0 4px var(--sb-peg-ink); }

/* The (?) tag: a paper tag on a string. It opens the why behind a paper; on a computer a layer
   under the tag that leaves the page usable, on a phone a sheet over a scrim. The browser's own
   popover closes it on Esc, a tap outside or the tag, and gives focus back to the tag. */
.why { position: relative; }
.why__tag {
  anchor-name: --why-tag;
  position: relative;
  display: inline-grid;
  place-items: center;
  inline-size: 60px;
  block-size: 48px;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-start-start-radius: 3px;
  border-end-start-radius: 3px;
  border-start-end-radius: 24px;
  border-end-end-radius: 24px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.why__tag:hover { background: var(--sb-wall); }
.why__tag:active { border-width: 2.5px; background: var(--hairline); }
.why__tag:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.why__hole { position: absolute; inset-inline-start: 8px; inline-size: 7px; block-size: 7px; border: 1.5px solid currentColor; border-radius: var(--radius-round); }
.why__mark { font-family: var(--font-serif); font-size: 25px; font-weight: 600; line-height: 1; }
.why:has(.why__layer:popover-open) .why__tag { background: var(--ink); color: var(--paper); }
.why__layer {
  inline-size: min(var(--popover), calc(100vw - 32px));
  margin: 0;
  padding: 16px 18px 18px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-overlay);
  font-size: var(--text-md);
  line-height: 1.45;
  overflow: visible;
  opacity: 1;
  translate: 0 0;
  transition: opacity var(--sb-layer), translate var(--sb-layer), overlay var(--sb-layer) allow-discrete, display var(--sb-layer) allow-discrete;
}
@starting-style {
  .why__layer:popover-open { opacity: 0; translate: 0 4px; }
}
.why__layer p { margin: 0 0 var(--space-2); }
.why__layer::backdrop { background: transparent; }
@supports (anchor-name: --a) {
  .why__layer { position-anchor: --why-tag; inset: auto; inset-block-start: calc(anchor(bottom) + 14px); inset-inline-end: anchor(end); }
}
@supports not (anchor-name: --a) {
  .why__layer { margin: auto; }
}
.why__string { position: absolute; inset-block-start: -15px; inset-inline-end: 29px; inline-size: 1.5px; block-size: 14px; background: var(--sb-peg-ink); }
.why__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.why__title { margin: 0; font-family: var(--font-serif); font-size: 1.412rem; font-weight: var(--weight-serif); line-height: 1.15; }
.why__close { margin-block: -10px 0; margin-inline: 0 -10px; }
.why__paper { color: var(--ink-2); font-weight: var(--weight-strong); }
.why__label { font-weight: var(--weight-strong); }
.why__rule { color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 40em) {
  /* A phone: a sheet from the bottom, over a scrim. */
  .why__layer, .why__layer:popover-open {
    position: fixed;
    inset: auto 0 0 0;
    inline-size: auto;
    max-block-size: 80vh;
    margin: 0;
    padding-block-end: calc(22px + env(safe-area-inset-bottom));
    border: 0;
    border-start-start-radius: var(--radius-lg);
    border-start-end-radius: var(--radius-lg);
    overflow-y: auto;
  }
  .why__layer::backdrop { background: var(--overlay); }
  .why__string { display: none; }
  .why__layer::before {
    content: "";
    display: block;
    inline-size: 36px;
    block-size: 5px;
    margin: -6px auto 10px;
    border-radius: var(--radius-round);
    background: var(--control-border);
  }
}

/* --- 3.0 Compliance (D-091, Stage 4): the wall in one block, then the most serious ---- */
.comply { display: flex; flex-direction: column; gap: var(--space-3); padding: 16px 18px 14px; }
.comply > .strip { padding: 0; background: none; }
.comply__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.comply__count { margin: 0; font-family: var(--font-serif); font-size: var(--text-3xl); line-height: 0.9; letter-spacing: -0.02em; }
.comply__say { display: flex; flex-direction: column; gap: 2px; font-weight: var(--weight-strong); }
.comply__say p { margin: 0; }
.comply__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-block: 0; margin-inline: auto 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.comply__legend li { display: inline-flex; align-items: center; gap: 6px; }
/* The same key under Documents' title and under Today's strip, at the start (CORE-1). */
.comply__legend--under { margin-inline: 0; }

.serious { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.serious__row {
  display: grid;
  grid-template-columns: 24px 22px minmax(0, 1fr) 13.75rem auto;
  align-items: start;
  gap: 6px 14px;
  padding: var(--space-4);
}
.serious__row + .serious__row { border-block-start: 1px solid var(--hairline); }
.serious__row--review { grid-template-columns: 22px minmax(0, 1fr); }
.serious__n { font-family: var(--font-serif); font-size: 1.412rem; line-height: 1.1; color: var(--ink-2); text-align: end; }
.serious__main { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.serious__main p { margin: 0; }
.serious__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.25; }
.serious__where { color: var(--ink-2); font-size: var(--text-sm); }
.serious__tied { font-size: var(--text-sm); }
.serious__tie { display: inline-flex; align-items: center; gap: 4px; }
.serious__string { flex: none; color: var(--sb-peg-ink); }
.serious__when { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.serious__act-by { color: var(--ink); font-weight: var(--weight-regular); }
.serious__act { display: flex; justify-content: flex-end; }
.serious__more { margin-block-start: var(--space-3); }
/* At Large, and on a narrow screen, the date moves under the paper's name. */
@container (max-width: 52em) {
  .serious__row { grid-template-columns: 24px 22px minmax(0, 1fr) auto; }
  .serious__when { grid-column: 3; grid-row: 2; }
}
html[data-text-size="large"] .serious__row { grid-template-columns: 24px 22px minmax(0, 1fr) auto; }
html[data-text-size="large"] .serious__when { grid-column: 3; grid-row: 2; }
@container (max-width: 30em) {
  .serious__row { grid-template-columns: 22px minmax(0, 1fr); }
  .serious__n { display: none; }
  .serious__when, .serious__act { grid-column: 2; grid-row: auto; justify-content: flex-start; }
}

/* --- 3.0 Filing a paper (D-091, Stage 5): the panel, the drop target, the hang -------- */
/* The panel: the filing steps on the right of the page, over a cream wash; on a phone a sheet
   from the bottom. A <dialog> opened modal: Esc closes it, and focus goes back to what
   opened it. */
.panel {
  inline-size: min(var(--panel), 100vw);
  max-inline-size: 100vw;
  block-size: 100dvh;
  max-block-size: 100dvh;
  margin-block: 0;
  margin-inline: auto 0;
  padding: 0;
  border: 0;
  border-inline-start: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  box-shadow: calc(-16px * var(--sb-dir)) 0 40px var(--sb-panel-shadow-color);
}
.panel::backdrop { background: var(--sb-wash); }
.panel[open] { display: flex; flex-direction: column; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: 18px 12px; padding-inline: 22px 18px; border-block-end: 1px solid var(--hairline); }
.panel__title { margin: 0; font-family: var(--font-serif); font-size: 1.53rem; font-weight: var(--weight-serif); line-height: 1.1; }
.panel__title:focus { outline: none; }
.panel__title:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.panel__body { flex: 1; overflow-y: auto; padding: 18px 22px 22px; }
.panel__body .actions .button { min-block-size: 48px; }
.panel__busy { display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); }
.panel__bar { display: block; block-size: 4px; border-radius: var(--radius-round); background: linear-gradient(90deg, var(--brand) 0 40%, var(--hairline) 40%); background-size: 250% 100%; animation: panel-busy 1.2s linear infinite; }
@keyframes panel-busy { from { background-position: 100% 0; } to { background-position: 0 0; } }
[dir="rtl"] .panel__bar { transform: scaleX(-1); } /* the busy stripe runs the reading way */
@media (max-width: 40em) {
  .panel {
    inline-size: 100vw;
    block-size: auto;
    max-block-size: 88dvh;
    margin-block: auto 0;
    margin-inline: 0;
    border: 0;
    border-start-start-radius: var(--radius-lg);
    border-start-end-radius: var(--radius-lg);
    box-shadow: var(--shadow-overlay);
  }
  .panel::before { content: ""; display: block; inline-size: 36px; block-size: 5px; margin: 8px auto 0; border-radius: var(--radius-round); background: var(--control-border); }
  .panel__body { padding-block-end: calc(22px + env(safe-area-inset-bottom)); }
}

/* A file dragged over the page: the scrim and a target that says what happens. */
.drop { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; background: var(--sb-scrim); pointer-events: none; }
.drop[hidden] { display: none; }
.drop__target { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; inline-size: 264px; block-size: 336px; padding: 24px; border: 3px dashed var(--on-shell); border-radius: var(--radius-sm); color: var(--on-shell); text-align: center; }
.drop__icon { inline-size: 40px; block-size: 40px; }
.drop__title { margin: 0; font-family: var(--font-serif); font-size: 2rem; line-height: 1.05; }
.drop__text { margin: 0; font-size: var(--text-sm); }

/* The steps inside the panel (and on their own pages). */
.file-step { display: flex; flex-direction: column; gap: var(--space-4); }
.file-step__h { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.file-step__for { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
/* The panel's drop zone (ShadowFilingPanel, start): centred, a dashed ink outline waiting for
   the paper, 18/600, one sentence, then the file field. */
.drop-target { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: 30px 24px; padding-inline: 20px; border: 2px dashed var(--control-border); border-radius: var(--radius-sm); background: var(--paper); text-align: center; }
.drop-target__outline { inline-size: 44px; block-size: 56px; border: 2px dashed var(--ink); border-radius: 2px; }
.drop-target__text { max-inline-size: 30ch; font-size: var(--text-sm); }
.drop-target input[type="file"] { max-inline-size: 100%; }
.drop-target p { margin: 0; }
.drop-target__icon { inline-size: 28px; block-size: 28px; color: var(--ink-2); }
.drop-target__title { font-size: var(--text-lg); font-weight: var(--weight-strong); }
.outline-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.outline-card p { margin: 0; }
.outline-card__where { color: var(--ink-2); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.outline-card__tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.outline-card__tiles .doc__tile--this { box-shadow: 0 0 0 2px var(--sb-wall), 0 0 0 3.5px var(--sb-peg-ink); }
.outline-card__title { font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.25; }
.outline-card__becomes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.warn-box { padding: 12px 14px; border: 1.5px solid var(--sb-warn-border); border-radius: var(--radius-sm); background: var(--sb-warn-bg); color: var(--sb-warn-ink); }
.warn-box p { margin: 0; }

/* Filed: the card swings onto its peg (skipped under reduced motion). */
@keyframes hang-swing {
  0% { opacity: 0; transform: translateY(-30px) rotate(-3deg); }
  45% { opacity: 1; transform: translateY(0) rotate(0); }
  62% { transform: rotate(1.6deg); }
  80% { transform: rotate(-0.8deg); }
  100% { transform: rotate(0); }
}
.is-hung { transform-origin: 50% 0; animation: hang-swing var(--sb-hang) both; }
.hang.is-hung .paper { transition: fill var(--sb-beat-fill) var(--sb-beat-fill-delay); }
@media (prefers-reduced-motion: reduce) {
  .is-hung, .panel__bar { animation: none; }
}

/* --- 3.0 The board briefing (D-091, Stage 6): one column, 960 wide, read then acknowledge - */
.briefing { display: flex; flex-direction: column; gap: var(--space-6); inline-size: 100%; max-inline-size: 60rem; margin-inline: auto; }
.briefing__for { margin: 4px 0 0; font-family: var(--font-serif); font-size: var(--text-date-sm); font-style: italic; color: var(--ink-2); }
.briefing__lead { margin: 0; max-inline-size: var(--measure); font-size: 1.176rem; line-height: 1.45; }
.briefing__count { font-size: clamp(56px, 3.765rem, 80px); }
.briefing__know { display: flex; flex-direction: column; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.briefing__know > li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.briefing__know p { margin: 4px 0 0; }
.briefing__since { display: grid; gap: var(--space-5); }
@container (min-width: 40em) {
  .briefing__since { grid-template-columns: 1fr 1fr; }
}
.briefing__h { margin: 0 0 var(--space-2); font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.briefing__rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.briefing__rows > li { display: flex; align-items: center; gap: 10px; min-block-size: 44px; padding: 6px 12px; }
.briefing__rows > li + li { border-block-start: 1px solid var(--hairline); }

/* ==========================================================================
   3.1 · Shadow board: the shared pieces (D-092, Stage S0, November 13, 2026)
   Every later page uses these as they are; docs/shadow-board.md shows each one.
   ========================================================================== */

/* --- a. The title row every laptop page uses ------------------------------------------- */
/* <header class="title-row"><h1 class="title-row__title">People</h1>
   <p class="title-row__aside">29 people</p><div class="title-row__actions">…</div></header>
   The serif title, an italic aside, actions on the far side, a 2px ink rule beneath. Two
   buttons that do not fit side by side wrap, the main one first. */
.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) 14px;
  padding-block-end: 10px;
  border-block-end: 2px solid var(--ink);
}
.title-row__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-title);
  font-weight: var(--weight-serif);
  line-height: 1;
  letter-spacing: -0.01em;
}
.title-row__aside { margin: 0; color: var(--ink-2); font-family: var(--font-serif); font-size: var(--text-date-sm); font-style: italic; line-height: 1.2; }
.title-row__actions { display: flex; flex-wrap: wrap; align-items: center; align-self: center; gap: var(--space-2); margin-inline-start: auto; }
@media (max-width: 40em) {
  .title-row__actions { flex-basis: 100%; margin-inline-start: 0; }
  .title-row__actions > .button { flex: 1 1 100%; }
}

/* --- b. The amber message box ----------------------------------------------------------- */
/* Failures, a secret shown once, restrictions, a warning before filing. Never brick. */
.amber-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-block: 12px;
  padding-inline: 14px;
  border: 1px solid var(--sb-warn-border);
  border-radius: var(--radius-sm);
  background: var(--sb-warn-bg);
  color: var(--sb-warn-ink);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.amber-box p { margin: 0; max-inline-size: var(--measure); }
.amber-box__title { font-size: var(--text-paper); font-weight: 700; }
.amber-box a:not(.button) { color: var(--brand); font-weight: var(--weight-strong); }
.amber-box__code-label { color: var(--ink-2); }
.amber-box__secret .code-block { background: var(--card); font-size: var(--text-md); }
.amber-box__actions { margin-block-start: var(--space-2); }
.amber-box[tabindex="-1"]:focus { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
/* A code read out to Charwa: mono, spaced, read one character at a time ({% error_code %}). */
.error-code-chars { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.1em; }

/* --- c. A confirmation in place --------------------------------------------------------- */
/* It replaces what was asked: a sage tile for a paper, the circle check for a decision. */
.confirmed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 24px;
  padding-inline: 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.confirmed__head { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 18px; }
.confirmed__mark { inline-size: 44px; block-size: 44px; color: var(--moss); }
.confirmed__words { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.confirmed__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-xl); font-weight: var(--weight-serif); line-height: 1.1; }
.confirmed__text { margin: 0; font-size: var(--text-paper); }
.confirmed__next { margin: 0; padding-block-start: 14px; border-block-start: 1px solid var(--hairline); font-size: var(--text-sm); }
.confirmed[tabindex="-1"]:focus { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
@media (max-width: 40em) {
  .confirmed { padding: var(--space-4); }
}

/* --- d. The form plan: every {{ form.as_div }} (templates/django/forms/) ----------------- */
/* One column, at most 560 wide; the label above, the sentence that puts it right, the field,
   the help under it. A field that went wrong: a 2px amber edge, an amber bar on its start
   side and a sentence. The box at the top is the amber box. */
.form-errors__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.form-errors__list a { display: inline-block; padding-block: 0.5rem; margin-block: -0.5rem; }
.form-errors + .form-fields { margin-block-start: var(--space-4); }
.form-fields { display: flex; flex-direction: column; gap: 16px; max-inline-size: 560px; margin-block-end: var(--space-4); }
.form-field { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; }
.form-fields__group { margin: var(--space-3) 0 0; padding-block-end: 6px; border-block-end: 1px solid var(--hairline); font-family: var(--font-serif); font-size: var(--text-lg); font-weight: var(--weight-serif); line-height: 1.2; }
.form-fields__group:first-child { margin-block-start: 0; }
.form-field__label { padding: 0; font-weight: var(--weight-strong); }
.form-field__set { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.form-field__help { margin: 0; max-inline-size: var(--measure); color: var(--ink-2); font-size: var(--text-sm); }
.form-field__error { margin: 0; max-inline-size: var(--measure); color: var(--amber); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.form-field--error { padding-inline-start: 12px; border-inline-start: 3px solid var(--sb-warn-border); }
.form-field--error :is(input, select, textarea):not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"]) {
  border: 2px solid var(--sb-warn-border);
}
.form-field__check { display: flex; align-items: center; gap: 10px; min-block-size: var(--target); font-weight: var(--weight-regular); cursor: pointer; }
.form-field :is(input, select, textarea):not([type="checkbox"], [type="radio"]) { max-inline-size: 100%; }
/* A money field: "$" before the number (ui/widgets/dollars.html, design review MON-15). */
.money-input { display: flex; align-items: center; gap: 6px; max-inline-size: 100%; }
.money-input__unit { color: var(--ink-2); font-weight: var(--weight-strong); }
.form-fields ul:not([class]) { margin: 0; padding: 0; list-style: none; } /* radio and checkbox choices */
.form-fields ul:not([class]) label { display: flex; align-items: center; gap: 10px; min-block-size: var(--target); font-weight: var(--weight-regular); }
/* A group of choices as this Django draws it (div#id_x > div > label > input): one box of ticks,
   44px rows split by the light rule, each choice's words in 600 (Forms, "Roles"). At most as wide
   as the inputs above and below it (32rem), and narrower on a phone (design review BRD-15). */
:is(.form-field__set, .form-field) > div:not([class]):has(> div > label > input:is([type="checkbox"], [type="radio"])) {
  display: flex;
  flex-direction: column;
  max-inline-size: min(100%, 32rem);
  border: var(--border) solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--card);
}
:is(.form-field__set, .form-field) > div:not([class]):has(> div > label > input:is([type="checkbox"], [type="radio"])) > div + div { border-block-start: var(--border) solid var(--hairline); }
:is(.form-field__set, .form-field) > div:not([class]) > div > label:has(> input:is([type="checkbox"], [type="radio"])) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-block-size: 44px;
  padding-inline: 12px;
  font-weight: var(--weight-strong);
  cursor: pointer;
}

/* --- e. A segmented control and a switch -------------------------------------------------- */
/* Segmented: real radios, 44px, the chosen one in ink. */
.segmented { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.segmented__legend { padding: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.segmented__options {
  display: inline-flex;
  flex-wrap: wrap;
  align-self: flex-start;
  overflow: hidden;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-strong);
}
.segmented__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding-inline: 16px;
  background: var(--sb-button-2);
  color: var(--brand);
  cursor: pointer;
}
html[data-text-size="large"] .segmented__option { min-block-size: var(--target); }
.segmented__option + .segmented__option { border-inline-start: 1px solid var(--control-border); }
.segmented__option:has(:checked) { background: var(--ink); color: var(--paper); }
.segmented__option:has(:focus-visible) { outline: var(--focus-width) solid var(--brand); outline-offset: -4px; }
.segmented__input { position: absolute; inline-size: 1px; block-size: 1px; margin: 0; opacity: 0; }
/* Switch: a 52 × 30 track inside a 44px target, blue when on; locked on, it is grey. */
.switch {
  position: relative;
  flex: none;
  inline-size: 52px;
  block-size: var(--target);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.switch::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block: calc(50% - 15px);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-round);
  background: var(--card);
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 3px;
  inline-size: 24px;
  block-size: 24px;
  border-radius: var(--radius-round);
  background: var(--control-border);
  translate: 0 -50%;
  transition: translate var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}
.switch[aria-checked="true"]::before { border-color: var(--brand); background: var(--brand); }
.switch[aria-checked="true"]::after { translate: calc(22px * var(--sb-dir)) -50%; background: var(--on-brand); } /* 52 - 24 - 3 - 3: moved, not laid out again (MOT-5) */
.switch[aria-disabled="true"] { cursor: not-allowed; }
.switch[aria-disabled="true"]::before { border-color: var(--sb-switch-locked); background: var(--sb-switch-locked); }
.switch:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); border-radius: var(--radius-round); }
.switch[aria-busy="true"] { cursor: progress; }

/* A margin card (group pages' margin and a module's margin: Money, Building, Board, People,
   Programs; D-092): the up card, a hairline edge, 12 14 inside, a 15/600 heading, then its lines;
   a list's links are 44px rows split by the light rule. One definition for every margin piece. */
.margin-card {
  display: flex; flex-direction: column; gap: 6px; min-inline-size: 0;
  padding-block: 12px; padding-inline: 14px;
  border: var(--border) solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card);
  font-size: var(--text-sm); line-height: 1.4;
}
.margin-card p { margin: 0; }
.margin-card__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.25; }
.margin-card__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.margin-card__list > li + li { border-block-start: var(--border) solid var(--hairline); }
.margin-card__link { display: flex; align-self: stretch; align-items: center; min-block-size: var(--target); font-weight: var(--weight-strong); }
.margin-card > .button { align-self: stretch; justify-content: center; }

/* --- f. "On the wall": the part of the wall a page opens with ------------------------------ */
.on-wall { display: flex; flex-direction: column; gap: 8px; min-inline-size: 0; }
.on-wall__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.on-wall__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.on-wall__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.on-wall__more { display: inline-flex; align-items: center; min-block-size: var(--target); margin-inline-start: auto; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.wall-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px; margin: 0; padding: 12px; list-style: none; }
.wall-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  block-size: 100%;
  padding-block: 10px 12px;
  padding-inline: 12px;
  border: 1px solid var(--sb-card-border);
  border-radius: var(--radius-sm);
  background: var(--sb-area-card);
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.25;
  text-decoration: none;
}
.wall-card:hover { color: var(--ink); }
.wall-card:hover .wall-card__name { text-decoration: underline; }
.wall-card__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
/* A name keeps its words whole: when it and its note do not fit side by side the note goes under
   it, rather than the name breaking mid-word (Large, narrow cards; X5). */
.wall-card__name { flex: 1 1 7rem; min-inline-size: 0; font-weight: var(--weight-strong); overflow-wrap: break-word; }
html[data-text-size="large"] .wall-cards { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.wall-card__note { flex: none; font-weight: var(--weight-strong); }
.wall-card__shelf { color: var(--ink-2); line-height: 1.2; }
.wall-card__tiles { display: flex; flex-wrap: wrap; gap: 2px; }

/* --- g. A record's small wall, and the papers a thing needs ------------------------------- */
/* Papers in a fixed order, each on its peg. A paper that waits on the one before it carries
   the 28 × 12 string glyph at its start, so the glyph always wraps with it. */
.small-wall { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px 12px; margin: 0; padding-block: 26px 18px; padding-inline: 16px; list-style: none; }
.small-wall__paper { position: relative; display: grid; grid-template-columns: 7rem; justify-items: center; gap: 8px; text-align: center; }
.small-wall__paper--tied { grid-template-columns: 28px 7rem; column-gap: 4px; }
.small-wall__paper--tied > :not(.small-wall__string) { grid-column: 2; }
.small-wall__string { grid-column: 1; grid-row: 1 / span 3; align-self: start; margin-block-start: 2px; color: var(--sb-peg-ink); }
.small-wall__paper > .peg { position: relative; z-index: 1; margin-block-end: -13px; }
.small-wall__name { font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; }
.small-wall__name a { color: var(--ink); text-decoration: none; }
.small-wall__name a:hover { text-decoration: underline; }
.small-wall__level { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.3; } /* Fuller pages: the level in grey on its own line */
.small-wall__state { font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.3; }
.small-wall__note { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.3; }
.small-wall__act { min-block-size: 40px; font-size: var(--text-sm); }
.string-glyph { display: block; inline-size: 28px; block-size: 12px; overflow: visible; }
@media (max-width: 40em) {
  /* A phone: one paper a row; the first takes the peg, each one after hangs below the paper
     it waits on by a 1.5px string, 16px long (20 at Large), with a 6px knot at each end. */
  .small-wall { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; padding-inline: 12px; }
  .small-wall__paper,
  .small-wall__paper--tied { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; justify-items: start; text-align: start; }
  .small-wall__paper > :not(.small-wall__string, .peg, .paper) { grid-column: 2; }
  .small-wall__paper > .paper { grid-column: 1; grid-row: 1 / span 4; }
  .small-wall__paper > .peg { position: absolute; inset-block-start: -7px; inset-inline-start: 17px; margin: 0; }
  .small-wall__paper--tied > .peg { display: none; }
  .small-wall__string {
    position: absolute;
    inset-block-start: -19px;
    inset-inline-start: 21.25px;
    inline-size: var(--sb-string);
    block-size: 22px;
    margin: 0;
    background: var(--sb-peg-ink);
  }
  html[data-text-size="large"] .small-wall { gap: 20px; }
  html[data-text-size="large"] .small-wall__string { inset-block-start: -23px; block-size: 26px; }
  .small-wall__string > .string-glyph { display: none; }
  .small-wall__string::before,
  .small-wall__string::after {
    content: "";
    position: absolute;
    inset-inline-start: -2.25px;
    inline-size: 6px;
    block-size: 6px;
    border-radius: var(--radius-round);
    background: var(--sb-peg-ink);
  }
  .small-wall__string::before { inset-block-start: 0; }
  .small-wall__string::after { inset-block-end: 0; }
}
/* The papers a thing needs: small tiles, names and words; a string brings its string, top to
   bottom, as a 1.5 × 9px link. */
.paper-list { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); line-height: 1.3; }
.paper-list__row { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.paper-list__row--tied::before {
  content: "";
  position: absolute;
  inset-block-start: -9px;
  inset-inline-start: 4.25px;
  inline-size: var(--sb-string);
  block-size: 9px;
  background: var(--sb-peg-ink);
}
.paper-list__name { min-inline-size: 0; overflow-wrap: anywhere; }
.paper-list__state { font-weight: var(--weight-strong); text-align: end; }

/* --- h. Time running left to right ------------------------------------------------------- */
/* A row of large tiles per label, the steps' labels under the last row, today's in ink. It
   scrolls inside itself on a narrow screen; the page never scrolls sideways. The one column is
   as wide as the rows, so each row's label can stay at the start edge while the months scroll
   under it (design review MON-10). */
.time-rows { display: grid; grid-template-columns: max-content; gap: 6px; max-inline-size: 100%; overflow-x: auto; padding-block-end: 4px; }
/* It takes the keyboard (tabindex, role group and a label), so arrows scroll it, and a shadow
   shows on an edge only while steps are hidden past it, as a wide report's do (design review
   CORE-10, MON-4): the covers scroll with the steps, the shadows stay with the box. */
.time-rows {
  background:
    linear-gradient(to right, var(--sb-card) 40%, transparent) left / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--sb-card) 40%, transparent) right / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--sb-panel-shadow-color), transparent) left / 0.875rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--sb-panel-shadow-color), transparent) right / 0.875rem 100% no-repeat scroll,
    var(--sb-card);
}
.time-rows__label { position: sticky; inset-inline-start: 0; justify-self: start; margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.time-row + .time-rows__label { margin-block-start: 6px; }
.time-row { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
/* At Large the tiles keep their size but the column narrows: a year of months fits with 6px gaps
   instead of scrolling inside its card (X5). */
html[data-text-size="large"] .time-row { gap: 6px; }
.time-row__step,
.time-row__when { flex: none; inline-size: 44px; }
.time-row__step { block-size: 56px; }
.time-row__empty { display: block; inline-size: 44px; block-size: 56px; }
.time-row__when { color: var(--ink-2); font-size: var(--text-sm); text-align: center; }
.time-row__when.is-now { color: var(--ink); font-weight: var(--weight-strong); }

/* --- i. Empty and failure states ------------------------------------------------------------ */
.no-outlines { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-block: 36px 30px; padding-inline: 24px; text-align: center; }
.no-outlines__title { margin: 0; color: var(--ink-2); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.no-outlines__text { margin: 0; max-inline-size: 46ch; }
.clear-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.clear-head__mark { inline-size: 56px; block-size: 56px; color: var(--moss); }
.clear-head__words { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.clear-head__title { margin: 0; color: var(--moss); font-size: var(--text-date-sm); font-weight: var(--weight-strong); }
.clear-head__next { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.clear-head__count { display: flex; align-items: center; gap: 8px; margin: 0; margin-inline-start: auto; font-size: var(--text-sm); }
.did-not-load,
.cannot-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-block: var(--space-7) 56px;
  text-align: center;
}
.did-not-load__mark { inline-size: 64px; block-size: 64px; color: var(--ink-2); }
.cannot-open__mark { inline-size: 56px; block-size: 56px; color: var(--ink-2); }
.did-not-load__title,
.cannot-open__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: var(--weight-serif);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.did-not-load__text,
.cannot-open__text { margin: 0; max-inline-size: 46ch; font-size: var(--text-lede); line-height: 1.4; }
.did-not-load__help { margin: 16px 0 0; max-inline-size: 50ch; color: var(--ink-2); font-size: var(--text-sm); }
.did-not-load__code { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.did-not-load__code-label { color: var(--ink-2); font-size: var(--text-sm); }
.did-not-load__code .error-code-chars { font-size: var(--text-code); letter-spacing: 0.12em; }
.cannot-open__actions { justify-content: center; }
/* The wall while it loads: flat grey blocks, grey pegs, no edge and no colour. */
.wall-loading { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); gap: 16px 12px; padding-block: 18px 14px; padding-inline: 14px; }
.wall-loading__block { position: relative; display: block; min-block-size: 64px; border-radius: var(--radius-sm); background: var(--sb-loading); animation: wall-loading 1.6s ease-in-out infinite alternate; }
.wall-loading__peg { position: absolute; inset-block-start: -7px; inset-inline-start: calc(50% - var(--sb-peg) / 2); inline-size: var(--sb-peg); block-size: var(--sb-peg); border-radius: var(--radius-round); background: var(--sb-loading-peg); box-shadow: 0 0 0 2px var(--sb-wall); }
@keyframes wall-loading { to { background: var(--sb-loading-2); } }
@media (prefers-reduced-motion: reduce) {
  .wall-loading__block { animation: none; }
}

/* --- j. A wall is one Tab stop (keys.js): its focused paper shows the ring ----------------- */
[data-wall-item]:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }

/* --- k. The laptop side panel and the phone sheet ---------------------------------------- */
/* .side-panel: a <dialog> on the end side of the page, --panel wide, a 1.5px ink edge at its
   start, over a cream wash; on a phone it becomes a sheet. .sheet: 12px top corners, a 36 × 5
   grab handle and a 22px spacer at the bottom. The filing panel and the (?) sheet are drawn
   the same way. */
.side-panel {
  inline-size: min(var(--panel), 100vw);
  max-inline-size: 100vw;
  block-size: 100dvh;
  max-block-size: 100dvh;
  margin-block: 0;
  margin-inline: auto 0;
  padding: 0;
  border: 0;
  border-inline-start: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  box-shadow: calc(-16px * var(--sb-dir)) 0 40px var(--sb-panel-shadow-color);
}
.side-panel::backdrop { background: var(--sb-wash); }
.side-panel[open] { display: flex; flex-direction: column; }
.side-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: 18px 12px; padding-inline: 22px 18px; border-block-end: 1px solid var(--hairline); }
.side-panel__title { margin: 0; font-family: var(--font-serif); font-size: 1.53rem; font-weight: var(--weight-serif); line-height: 1.1; }
.side-panel__body { flex: 1; overflow-y: auto; padding-block: 18px 22px; padding-inline: 22px; }
.sheet {
  border-start-start-radius: var(--radius-lg);
  border-start-end-radius: var(--radius-lg);
  padding-block-end: calc(22px + env(safe-area-inset-bottom));
}
.sheet::before {
  content: "";
  display: block;
  inline-size: 36px;
  block-size: 5px;
  margin: 8px auto 10px;
  border-radius: var(--radius-round);
  background: var(--control-border);
}
/* A side panel that becomes a sheet on the phone (Check a paper) is a plain panel on a laptop: no
   grab handle, square corners, no bottom spacer. */
@media not (max-width: 40em) {
  .side-panel.sheet { border-radius: 0; padding-block-end: 0; }
  .side-panel.sheet::before { display: none; }
}
@media (max-width: 40em) {
  .side-panel {
    inline-size: 100vw;
    block-size: auto;
    max-block-size: 88dvh;
    margin-block: auto 0;
    margin-inline: 0;
    border: 0;
    border-start-start-radius: var(--radius-lg);
    border-start-end-radius: var(--radius-lg);
    box-shadow: var(--shadow-overlay);
  }
  .side-panel::before { content: ""; display: block; inline-size: 36px; block-size: 5px; margin: 8px auto 0; border-radius: var(--radius-round); background: var(--control-border); }
  .side-panel__body { padding-block-end: calc(22px + env(safe-area-inset-bottom)); }
}


/* ==========================================================================
   Stage anchors · Shadow board 3.1 (D-092)
   Each later stage adds its page styles ONLY between its own BEGIN and END
   lines below, and changes nothing else in this sheet. The four numbered lines
   after each END stay as they are: they keep the stages' insertions apart, so
   the branches merge one after another without touching. Shared pieces belong
   above, in "3.1 · the shared pieces"; ask for a change there in your report.
   ========================================================================== */

/* >>> S1 wall screens: BEGIN (only stage S1 writes below this line) */
/* Today, a volunteer (Requests and forms, "Today · a volunteer · laptop"): no strip and no count;
   their own week on the wall, what they lead under it as words, their own papers in the margin. */
.board__h { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: var(--leading-tight); } /* 18/600, as drawn */
.board--mine .board__yours { gap: var(--space-4); }
.board__papers { display: flex; flex-direction: column; gap: var(--space-3); padding: 16px 18px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
@container (min-width: 52em) {
  .board--mine { grid-template-columns: minmax(0, 1fr) 320px; }
}
.today-under { display: flex; flex-direction: column; gap: var(--space-3); min-inline-size: 0; }
.wall-papers { display: flex; flex-direction: column; gap: var(--space-2); }
.wall-papers__title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.wall-papers__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
/* Documents (Screens v2, "Documents · laptop" and "Documents · phone"; Large): the title row
   holds the search field and File a paper; at Large they move under the title. On the phone
   each area is a row at least 56 tall: its name, its count, small tiles and a chevron. */
.shelf-area { position: relative; }
.shelf-area__mini, .shelf-area__go { display: none; }
html[data-text-size="large"] .shelves__actions { flex-basis: 100%; margin-inline-start: 0; }
@container (max-width: 40em) {
  .areas { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; }
  .shelf-area { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 4px 10px; min-block-size: 56px; padding: 8px 12px; }
  .shelf-area__name { grid-column: 1; }
  .shelf-area__count { grid-column: 2; grid-row: 1; text-align: end; }
  .shelf-area__mini { display: flex; flex-wrap: wrap; gap: 2px 6px; grid-column: 1 / 3; }
  .shelf-area__mini > .shelf-area__group { gap: 2px; }
  .shelf-area__roll { grid-column: 1 / 3; margin: 0; }
  .shelf-area__tiles, .shelf-area__gaps { display: none; }
  .shelf-area__go { display: block; grid-column: 3; grid-row: 1 / span 2; inline-size: 20px; block-size: 20px; color: var(--ink-2); }
  .shelf-area__name a::after { content: ""; position: absolute; inset: 0; }
  .shelves__find { flex: 1 1 100%; }
  .shelves__find .input { min-block-size: 48px; }
}
/* A folder opened (Screens v2): on the laptop lg papers on pegs, and the list under them in
   the same order. On the phone the wall is left out, so each paper shows once: the list says
   its state and what it waits on, and draws the string's end (design review CORE-7). */
@container (max-width: 40em) {
  .hangs { display: none; }
}
/* The map (Complete pages, "9 · Map of your documents"): the documents as cards on a pegboard,
   their state as a tile and its word, the critical path marked in words, strings between them. */
.map__lede { margin: 0; max-inline-size: 60rem; color: var(--ink-2); }
.map.wall { padding: 18px 16px 16px; }
.map-node { background: var(--sb-card); border: 1px solid var(--sb-card-border); border-inline-start-width: 1px; box-shadow: var(--sb-card-shadow); }
.map-node--missing, .map-node--expired { border: 2px dashed var(--sb-missing-edge); background: var(--sb-empty); box-shadow: none; }
.map-node--critical { border-color: var(--sb-missing-edge); }
.map-node__meta { align-items: center; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.map-node__critical { display: inline-flex; align-items: center; gap: 4px; color: var(--brick); }
.map-node__critical .icon { inline-size: 16px; block-size: 16px; }
.map__edges .map__string { fill: none; stroke: var(--sb-peg-ink); stroke-width: 1.5; stroke-linecap: round; }
.map__edges .map__string.soft { stroke-dasharray: 4 3; }
/* One document (Screens v2; Large; Phone): "Tied to this paper" as a vertical chain joined by a
   1.5px line with this paper ringed; at Large the side column grows to 356 and the buttons stack,
   the main one first; on the phone the buttons fill the width. */
.tied { display: flex; flex-direction: column; gap: var(--space-2); }
.tied__title { margin: 0; font-size: var(--text-lg); font-family: var(--font-sans); font-weight: var(--weight-strong); }
.tied__chain { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
/* scoped to the document page's chain: the Inbox's "Tied to this message" is a row of papers
   joined by string glyphs (the rules near .tied__string) and must not take this line */
.tied__chain > .tied__paper { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; }
.tied__chain > .tied__paper + .tied__paper::before { content: ""; position: absolute; inset-block-start: -14px; inset-inline-start: 10.25px; inline-size: 1.5px; block-size: 14px; background: var(--sb-peg-ink); }
.tied__paper--this > .paper { border-radius: 2px; box-shadow: 0 0 0 2px var(--sb-wall), 0 0 0 4px var(--sb-peg-ink); }
.tied__name { font-size: var(--text-paper); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.tied__state { font-size: var(--text-sm); font-weight: var(--weight-strong); text-align: end; }
.tied__note { grid-column: 2 / -1; color: var(--ink-2); font-size: var(--text-sm); }
/* At Large the side column stays from 860px of page (a px query: 52em is 1092px at 21px, so a
   1280 laptop lost it; Large, "One document"). The main button takes the first row; Open and
   the (?) tag share the second. */
@container (min-width: 860px) {
  html[data-text-size="large"] .doc { grid-template-columns: minmax(0, 1fr) 356px; }
}
html[data-text-size="large"] .doc__acts { justify-content: flex-start; align-items: center; }
html[data-text-size="large"] .doc__acts .actions { display: contents; }
html[data-text-size="large"] .doc__acts .actions > :first-child { flex: 1 1 100%; }
html[data-text-size="large"] .hung { grid-template-columns: 44px minmax(0, 1fr); }
html[data-text-size="large"] .hung__state { grid-column: 2; text-align: start; }
@container (max-width: 40em) {
  /* the phone: the file's dates under its name, the buttons the full width */
  .hung { grid-template-columns: 44px minmax(0, 1fr); }
  .hung__state { grid-column: 2; text-align: start; }
  .hung__title { overflow-wrap: anywhere; }
  .doc__acts .actions { flex: 1 1 100%; }
  .doc__acts .actions { flex-direction: column; align-items: stretch; }
  .doc__acts .actions .button { inline-size: 100%; }
  .history > li { grid-template-columns: minmax(0, 1fr); }
}
/* A filed paper (Complete pages, "8 · A filed paper"): the file on record hangs on its peg with
   the older versions behind it, because a filed version is never changed or deleted. */
.filed__signals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-family: var(--font-sans); font-style: normal; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.filed__peg { position: relative; display: flex; justify-content: center; padding: 22px 16px 16px; margin-block-end: var(--space-3); }
.filed__peg > .peg { position: absolute; inset-block-start: 10px; inset-inline-start: calc(50% - var(--sb-peg) / 2); z-index: 2; }
.filed__stack { position: relative; display: grid; }
.filed__stack > * { grid-area: 1 / 1; }
.filed__behind { inline-size: 44px; block-size: 56px; border: 1px solid var(--sb-card-border); border-radius: 2px; background: var(--sb-card); transform: translate(calc(5px * var(--sb-dir)), 4px) rotate(calc(3deg * var(--sb-dir))); }
.filed__behind + .filed__behind { transform: translate(calc(9px * var(--sb-dir)), 7px) rotate(calc(5deg * var(--sb-dir))); }
.filed__stack > .paper { position: relative; }
/* Compliance (Screens v2; Large; States): "Checked today at …" in the title row with what modules
   add there, the public records' date under it; with nothing needing attention the all-clear mark
   takes the count's place. At Large the legend wraps under the count and the date moves under
   the paper's name. */
.comply__records { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.comply__clear { flex: 1 1 auto; }
.comply__clear .clear-head { background: none; padding: 0; }
html[data-text-size="large"] .comply__legend { flex-basis: 100%; margin-inline-start: 0; }
html[data-text-size="large"] .serious__row { grid-template-columns: 24px 22px minmax(0, 1fr) auto; }
html[data-text-size="large"] .serious__when { grid-column: 3; grid-row: 2; }
/* Undo (D-097): the toast after "File it here", fixed at the end corner like every toast. */
.undo-toast { position: fixed; z-index: var(--z-toast); inset-block-end: var(--space-4); inset-inline: var(--space-4); display: flex; align-items: center; gap: var(--space-3); max-inline-size: 30rem; margin-inline: auto; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); background: var(--toast-bg); color: var(--toast-ink); font-size: var(--text-sm); box-shadow: var(--toast-shadow); }
@media (min-width: 40em) {
  .undo-toast { inset-inline: auto var(--space-5); inset-block-end: var(--space-5); }
}
.undo-toast__text { flex: 1; min-inline-size: 0; margin: 0; }
.undo-toast__button { flex: none; }
@media print { .undo-toast { display: none; } }
/* Can we…?, an answer, a link to send it, send a document (Last pages 4–7): questions as rows,
   the answer as two lists of papers with their tiles and words, never a yes or no. */
.can-we__lede, .send__lede { margin: 0; max-inline-size: 60rem; color: var(--ink-2); }
.can-we { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.can-we__q { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 2px 12px; min-block-size: var(--target); padding: 12px 16px; }
.can-we__q + .can-we__q { border-block-start: 1px solid var(--hairline); }
.can-we__ask { font-size: var(--text-lg); font-weight: var(--weight-strong); color: var(--ink); }
.can-we__ask::after { content: ""; position: absolute; inset: 0; }
.can-we__why { grid-column: 1; color: var(--ink-2); font-size: var(--text-sm); }
.can-we__go { grid-column: 2; grid-row: 1 / span 2; inline-size: 20px; block-size: 20px; color: var(--ink-2); }
.answer-list .paper-list__name { display: flex; flex-direction: column; gap: 2px; }
.answer-list__why { color: var(--ink-2); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.answer-list__none { inline-size: 10px; }
.ask-link { display: flex; flex-direction: column; gap: var(--space-4); max-inline-size: 40rem; }
.ask-link__url { font-family: var(--font-mono); }
/* I2: who files it, under the date on a Compliance row (Screens v2, "Compliance · laptop"). */
.serious__who { color: var(--ink); font-weight: var(--weight-regular); }
/* I2: motion on hang (README "Filing a paper"), the rest of it. The swing is 3.0's (.is-hung);
   filing.js adds the ghost of the old outline (900 ms), fills the card's tile from its old look
   (320 ms after 420 ms), pulses the strip's tile (600 ms after 500 ms) and lifts the count in
   (400 ms after 600 ms). "That did not file": the paper tried lifts off the peg in 200 ms in the
   panel's own outline card and the outline is as it was. All skipped under reduced motion. */
.is-hung { z-index: 1; }
.is-hung .paper { transition: fill var(--sb-beat-fill) var(--sb-beat-fill-delay); }
.hang-ghost {
  position: absolute; z-index: 0; pointer-events: none;
  border: 2px dashed var(--sb-missing-edge); border-radius: var(--radius-sm); background: var(--sb-empty);
  animation: hang-ghost var(--sb-beat-ghost) both;
}
@keyframes hang-ghost { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }
@keyframes strip-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.7); } }
.strip__tiles .tile.is-pulsing { animation: strip-pulse var(--sb-beat-pulse) var(--sb-beat-pulse-delay) both; }
@keyframes count-rise { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.strip__count.is-rising { display: inline-block; animation: count-rise var(--sb-beat-rise) var(--sb-beat-rise-delay) both; }
.doc__tile--this { position: relative; }
.doc__lift { position: absolute; inset: 0; display: inline-flex; pointer-events: none; animation: paper-lift var(--duration) var(--ease) both; }
@keyframes paper-lift { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) {
  .hang-ghost, .strip__tiles .tile.is-pulsing, .strip__count.is-rising { animation: none; }
  .is-hung .paper { transition: none; }
  .doc__lift { display: none; }
}
/* I2: Today at phone width (Screens v2, "Today · iPhone"; Phone, "Today · phone · Large").
   The strip is a card: the count at 38, each shelf's name and its words on one line with the
   xs tiles beneath (6 × 9, drawn from the same state classes: the sprite has no xs cut). The
   first outline is opened: its steps, who, about how long and how often, Start (48 tall) and
   the (?) tag. Two cards follow, then "N more" (strip.js folds the rest; without it all show). */
.slot__open, .slot[data-opened] .slot__act .why, .slot__word-phone { display: none; }
.slots-more { display: flex; justify-content: center; gap: 8px; inline-size: 100%; min-block-size: 48px; }
.slots-more[hidden] { display: none; }
.slots-more .icon { inline-size: 18px; block-size: 18px; }
@media (max-width: 40em) {
  .strip { gap: 10px; padding: 12px; }
  .strip__count { font-size: var(--text-count-phone); }
  .strip__rows { display: flex; flex-direction: column; gap: 8px; }
  .strip__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "shelf words" "tiles tiles"; row-gap: 4px; column-gap: 10px; }
  .strip__shelf { grid-area: shelf; }
  .strip__words { grid-area: words; }
  .strip__tiles { grid-area: tiles; block-size: 9px; }
  .strip__tiles .tile { inline-size: 6px; block-size: 9px; border-width: 1px; border-radius: 0; }
  .strip__tiles .tile--review { background: radial-gradient(circle at calc(100% - 1.8px) 1.8px, var(--sb-review-dot) 0 1.3px, transparent 1.7px), var(--sb-place-fill); }
  [dir="rtl"] .strip__tiles .tile--review { background: radial-gradient(circle at 1.8px 1.8px, var(--sb-review-dot) 0 1.3px, transparent 1.7px), var(--sb-place-fill); }
  /* At 6 × 9 the cut corner is half the tile's width and the bar stays 1.4px (CORE-1). */
  .strip__tiles .tile--due { background-size: 3px 3px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%); }
  .strip__tiles .tile--lapsed { background: linear-gradient(135deg, transparent calc(50% - 0.7px), var(--sb-wall) 0 calc(50% + 0.7px), transparent 0), var(--sb-lapsed-fill); }
  .strip__area { gap: 1px; }
  .strip__mode--all { gap: 2px; }
  .strip__mode--gaps { gap: 1px; }
  .strip__bar { block-size: 9px; }
  .strip__group { line-height: 9px; }

  .slots { padding-inline: 0; background: none; }
  .slots.is-folded > .slot:nth-child(n + 4) { display: none; }
  .slot[data-opened] { grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .slot[data-opened] .slot__more { display: none; }
  .slot[data-opened] .slot__open { display: flex; grid-column: 1 / -1; flex-direction: column; gap: 12px; }
  .slot[data-opened] .slot__act { display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; }
  .slot[data-opened] .slot__act > .button, .slot[data-opened] .slot__act > form { flex: 1; }
  .slot[data-opened] .slot__act .button { inline-size: 100%; min-block-size: 48px; font-size: var(--text-md); }
  .slot[data-opened] .slot__act .why { display: block; flex: none; }
  .slot[data-opened] .slot__word-wide { display: none; }
  .slot[data-opened] .slot__word-phone { display: inline; }
  html[data-text-size="large"] .slot:not([data-opened]) { grid-template-columns: 22px minmax(0, 1fr); }
  html[data-text-size="large"] .slot:not([data-opened]) .slot__act { grid-column: 2; justify-self: start; }
}
.slot__steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--text-md); line-height: 1.3; }
.slot__steps > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 10px; }
.slot__n { display: grid; place-items: center; inline-size: 24px; block-size: 24px; box-sizing: border-box; border: 1.5px solid var(--ink); border-radius: var(--radius-round); font-size: var(--text-sm); font-weight: 700; line-height: 1; }
.slot__who { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
/* Filing, its outline: "What Ulgama read" stands open under a rule, as drawn (Screens v2 "Filing · 3 Its outline"; X5). */
.file-step__read { display: flex; flex-direction: column; gap: 8px; padding-block-start: 14px; border-block-start: 1px solid var(--hairline); }
.file-step__read > p { margin: 0; }
.file-step__read-title { margin: 0; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); }
/* Kept without an outline (D-101): under the shelves in Documents, and the panel's way to it. */
.kept-files { margin-block-start: var(--space-6); }
.kept-files__list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.kept-files__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-3); border-block-end: 1px solid var(--hairline); }
.kept-files__row > .doc-file { flex: 1 1 18rem; min-inline-size: 0; }
.kept-files__acts form { display: contents; }
.file-step__keep { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin-block-start: var(--space-4); }
.file-step__keep p { margin: 0; }
/* A paper's card on Today: its title is the paper (the wall's keyboard item, Enter opens it);
   the main button is the next Tab stop (Accessibility, "Keyboard"). It reads as the title. */
.slot__paper { color: inherit; text-decoration: none; }
.slot__paper:hover { text-decoration: underline; text-underline-offset: 0.2em; }
/* The (?) sheet on a phone: its title and Close stay at the top while it scrolls (README 12). */
@media (max-width: 40em) {
  .why__head { position: sticky; inset-block-start: -16px; z-index: 1; padding-block: var(--space-2); background: var(--card); }
}
/* A group page's tabs (group.<g>.tabs; People: Everyone, Staff, Board, Volunteers with counts). */
.group-page__tabs { margin-block-end: var(--space-4); }
.group-page__count { margin-inline-start: var(--space-2); color: var(--ink-2); font-weight: var(--weight-strong); }
/* Today's margin: "2 wait on other papers" under an area's word when some of its gaps hang on another. */
.area-card__wait { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
/* Filing, "2 Reading": the file's card under the bar while it is checked. */
.panel__reading { display: flex; flex-direction: column; gap: var(--space-3); margin-block-start: var(--space-4); }
.panel__reading[hidden] { display: none; }
/* Filing, "b Choose": each outline with its state now. */
.suggestion__state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--weight-strong); }
/* <<< S1 wall screens: END */
/* ··· after S1, line 1 of 4: leave as it is ··· */
/* ··· after S1, line 2 of 4: leave as it is ··· */
/* ··· after S1, line 3 of 4: leave as it is ··· */
/* ··· after S1, line 4 of 4: leave as it is ··· */
/* >>> S2 inbox search me tasks: BEGIN (only stage S2 writes below this line) */
.form-lede { margin: 0; color: var(--ink-2); max-inline-size: var(--measure); }
.form-note { margin: 0; margin-block-start: var(--space-3); color: var(--ink-2); font-size: var(--text-sm); max-inline-size: var(--measure); }
/* Me (Sidebar "Me · laptop" and "Me · iPhone"; D-092) */
.me-page { display: flex; flex-direction: column; gap: var(--space-4); }
.me-head { align-items: center; }
.avatar--lg { inline-size: 44px; block-size: 44px; }
.me-papers { display: flex; flex-direction: column; gap: 8px; }
.me-papers__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.me-papers__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.me-papers__more { margin-inline-start: auto; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.me-grid { display: grid; gap: 20px; align-items: start; }
@container (min-width: 52em) { .me-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.me-column { display: flex; flex-direction: column; gap: var(--space-4); min-inline-size: 0; }
.me-section { display: flex; flex-direction: column; gap: 14px; padding-block: 16px; padding-inline: 18px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--sb-card); }
.me-section:focus { outline: none; }
.me-section__title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.me-section__hint { margin: 0; color: var(--ink-2); font-size: var(--text-sm); line-height: 1.4; }
.me-choice { display: flex; flex-direction: column; gap: 6px; }
.me-choice__save[hidden] { display: none; }
.me-name { margin: 0; font-size: var(--text-paper); }
.me-rows { margin: 0; padding: 0; list-style: none; }
.me-rows > li + li { border-block-start: 1px solid var(--rule); }
.me-row, .me-switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.me-row { min-block-size: 56px; padding-block: 6px; color: var(--ink); text-decoration: none; }
.me-row:hover .me-row__title { color: var(--brand); }
.me-switch { padding-block: 10px; }
.me-row__text { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.35; }
.me-row__title { font-size: var(--text-paper); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.me-row__hint { color: var(--ink-2); font-size: var(--text-sm); }
/* Search (Sidebar "Search · laptop"; D-092) */
.search-page { display: flex; flex-direction: column; gap: 18px; }
.search-page__body { display: flex; flex-direction: column; gap: 22px; max-inline-size: 760px; }
.search-page__form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search-page__field {
  flex: 1 1 18rem; display: flex; align-items: center; gap: 10px; min-block-size: 52px;
  padding-inline: 14px 4px; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); background: var(--card);
}
.search-page__field:focus-within { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.search-page__icon { flex: none; inline-size: 20px; block-size: 20px; color: var(--ink-2); }
.search-page__input { flex: 1; min-inline-size: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: var(--text-lg); }
.search-page__input:focus { outline: none; }
.search-page__clear { display: grid; place-items: center; inline-size: var(--target); block-size: var(--target); color: var(--ink); }
.found { display: flex; flex-direction: column; gap: 8px; }
.found__title { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.found__count { color: var(--ink-2); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.found__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--sb-card); }
.found__list > li + li { border-block-start: 1px solid var(--rule); }
.found__cards { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.found-paper, .found-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-block-size: 64px; padding-block: 10px; padding-inline: 14px;
}
.found-row { grid-template-columns: minmax(0, 1fr); }
.found__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.found__name { color: var(--ink); font-size: var(--text-paper); text-decoration: none; overflow-wrap: anywhere; }
a.found__name:hover { color: var(--brand); text-decoration: underline; }
.found__name strong { font-weight: 700; }
.found__where { color: var(--ink-2); }
.found__state { font-weight: var(--weight-strong); }
.found-area, .found-message {
  display: flex; flex-direction: column; gap: 4px; padding-block: 12px; padding-inline: 14px;
  border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--sb-card); color: var(--ink); text-decoration: none;
}
.found-area { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.found-area:hover, .found-message:hover { border-color: var(--control-border); color: var(--ink); }
.found-area__note { font-size: var(--text-sm); font-weight: var(--weight-strong); }
.found-area__tiles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px; }
.found-message { font-size: var(--text-sm); line-height: 1.3; }
.found-message__top { display: flex; justify-content: space-between; gap: 12px; }
@container (max-width: 30em) {
  .found-paper { grid-template-columns: 22px minmax(0, 1fr); }
  .found-paper > .button { grid-column: 2; justify-self: start; }
}
/* A group's page (Sidebar: People, Programs, Money, Building; D-092) */
.group-page { display: flex; flex-direction: column; gap: var(--space-4); }
.group-page__grid { display: grid; gap: var(--space-5); align-items: start; }
@container (min-width: 52em) { .group-page__grid { grid-template-columns: minmax(0, 1fr) 268px; } }
.group-page__work, .group-page__margin { display: flex; flex-direction: column; gap: var(--space-4); min-inline-size: 0; }
.group-page__title { margin: 0; font-family: var(--font-sans); margin-block-end: var(--space-2); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.group-page__areas { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.group-page__areas a { display: inline-flex; align-items: center; min-block-size: var(--target); font-weight: var(--weight-strong); }
/* A page you can't open (Sidebar; D-092): the shared piece, and why under it */
.refused { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.refused__why { margin: 0; max-inline-size: 46ch; color: var(--ink-2); font-size: var(--text-sm); text-align: center; }
/* Tasks (Complete pages "7 · Tasks", Last pages "14 · Minutes per role"; D-092) */
.tasks-page { display: flex; flex-direction: column; gap: var(--space-4); }
.tasks-page__link { display: inline-flex; align-items: center; min-block-size: var(--target); font-weight: var(--weight-strong); }
.tasks-group { display: flex; flex-direction: column; gap: 10px; margin-block-start: var(--space-3); }
.tasks-group__title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.tasks-cards { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.task-card { padding-block: 12px; padding-inline: 14px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
/* The card's lines sit 3px apart in 15px type, as drawn; links and summaries keep their 44px targets. */
.task-card .task__body { gap: 3px; }
.task-card .task__lead, .task-card .task__meta { font-size: var(--text-sm); line-height: 1.35; }
.task-card .task__body > .cluster { gap: 4px 16px; }
.task-card .task__body > .cluster > .disclosure > summary, .task-card .task__more > summary { min-block-size: var(--target); }
.task-card__escalated { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--text-sm); font-weight: 700; }
.title-row--lede { flex-direction: column; align-items: flex-start; gap: 6px; }
/* Help and Privacy (Last pages "15 · Help"; D-092) */
.help-page { display: flex; flex-direction: column; gap: 14px; }
.help-page > p, .help-page > ul, .help-page > ol { max-inline-size: 62ch; margin: 0; }
.help-page > ul { display: flex; flex-direction: column; gap: 8px; padding-inline-start: 20px; }
.help-page__heading, .help-page h2 { margin: 0; margin-block-start: var(--space-2); font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: var(--text-xl); line-height: 1.1; }
/* Approvals in the Inbox (Sidebar "Inbox · laptop", "Inbox · an approval · iPhone"; I1, D-092) */
.decisions { border-block-end: 1px solid var(--hairline); }
.approval__facts { display: grid; gap: 10px; margin: 0; padding-block: var(--space-3); border-block: 1px solid var(--hairline); }
.approval__fact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.approval__fact dt { color: var(--ink-2); font-size: var(--text-sm); }
.approval__fact dd { margin: 0; font-weight: var(--weight-strong); }
.approval__amount { font-family: var(--font-serif); font-size: var(--text-date); font-variant-numeric: tabular-nums; }
.approval__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.approval__actions form { display: contents; }
.approval__actions .button { min-block-size: var(--target); }
.approval__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); max-inline-size: var(--measure); }
@media (max-width: 40em) { .approval__actions { flex-direction: column; } .approval__actions .button { inline-size: 100%; justify-content: center; } }
/* No messages yet: where the first row would be, at the top of the list, not a card in a card (X5). */
.inbox__list > .empty { align-items: flex-start; gap: 4px; padding: 14px; border: 0; border-radius: 0; background: none; text-align: start; }
.inbox__list > .empty > .icon { inline-size: 24px; block-size: 24px; }
.inbox__list > .empty .empty__title { font-size: var(--text-md); }
/* An approval (round 3): who asked and their words, "Send it back" beside Approve and Not now,
   opening its note under the buttons; "Yours is in" when a second person must decide. */
.approval__asked { margin: 0; }
.approval__said { margin: 0; }
.approval__back[open] { display: flex; flex-direction: column; gap: var(--space-3); flex-basis: 100%; }
.approval__back > summary { list-style: none; cursor: pointer; }
.approval__back > summary::-webkit-details-marker { display: none; }
.approval__actions .approval__back-form { display: flex; flex-direction: column; }
.approval__in { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: var(--weight-strong); }
.approval__who { margin: var(--space-3) 0 0; padding-inline-start: var(--space-5); }
/* <<< S2 inbox search me tasks: END */
/* ··· after S2, line 1 of 4: leave as it is ··· */
/* ··· after S2, line 2 of 4: leave as it is ··· */
/* ··· after S2, line 3 of 4: leave as it is ··· */
/* ··· after S2, line 4 of 4: leave as it is ··· */
/* >>> S3 account and sign-in: BEGIN (only stage S3 writes below this line) */
/* Signing in and the steps around it (README 20, 27b; Sign in and signing, Account pages).
   ui/entrance.html: on a laptop the start side is an empty pegboard (the rail and its pegs,
   never an outline: nobody is in yet) and the end side holds the page; on a phone the page is
   the screen, 20px from its edges, as the 402px screens draw it. */
.entrance {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "top" "main" "foot";
  min-block-size: 100vh;
  min-block-size: 100dvh;
  background: var(--paper);
}
.entrance__brand { display: none; }
/* On a phone the name and mark still say where you are (an emailed set-password link lands
   here): the logo alone, on the start side of the top row, beside the language; no rail, no
   tagline (design review WEL-10). */
@media (max-width: 51.99em) {
  .entrance { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand top" "main main" "foot foot"; }
  .entrance__brand { grid-area: brand; display: flex; align-items: center; padding-block-start: var(--space-1); padding-inline-start: 20px; }
  .entrance__brand > :not(.entrance__logo) { display: none; }
  .entrance__logo { font-size: 1.647rem; }
}
.entrance__top { grid-area: top; display: flex; justify-content: flex-end; padding: var(--space-1) 20px 0; }
.entrance__top a, .entrance__top .link { display: inline-flex; align-items: center; min-block-size: var(--target); }
.entrance__main { grid-area: main; display: flex; flex-direction: column; align-items: stretch; padding: var(--space-2) 20px var(--space-6); }
.entrance__panel { display: flex; flex-direction: column; gap: var(--space-4); inline-size: 100%; }
.entrance__foot {
  grid-area: foot; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0 var(--space-4); padding: var(--space-2) 20px var(--space-4);
  color: var(--ink-2); font-size: var(--text-sm);
}
@media (min-width: 52em) {
  .entrance {
    grid-template-columns: clamp(20rem, 37.5vw, 30rem) minmax(0, 1fr);
    grid-template-areas: "brand top" "brand main" "brand foot";
  }
  .entrance__brand {
    grid-area: brand; position: sticky; inset-block-start: 0;
    display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6);
    block-size: 100vh; block-size: 100dvh; box-sizing: border-box;
    padding: 44px 40px 36px;
    background: var(--sb-wall-dots), var(--sb-wall);
    color: var(--ink);
  }
  .entrance__logo { --logo: var(--ink); align-self: flex-start; font-size: var(--text-logo); }
  .entrance__rail {
    display: flex; justify-content: space-around;
    padding-inline: 20px; padding-block-end: 66px;
    border-block-start: 3px solid var(--sb-peg-ink);
  }
  .entrance__peg {
    inline-size: 12px; block-size: 12px; margin-block-start: 8px; border-radius: 50%;
    background: var(--sb-peg-ink); box-shadow: 0 0 0 2px var(--sb-wall);
  }
  .entrance__tagline {
    max-inline-size: 16ch; font-family: var(--font-serif); font-size: var(--text-xl);
    font-weight: var(--weight-regular); line-height: 1.2; text-wrap: balance;
  }
  .entrance__top { padding: 22px 28px 0; }
  .entrance__main { align-items: center; justify-content: center; padding: var(--space-5) 40px; }
  .entrance__panel {
    max-inline-size: 520px; box-sizing: border-box; padding: 32px;
    border: var(--border) solid var(--ink); border-radius: var(--radius-md);
    background: var(--sb-card); box-shadow: var(--sb-card-shadow);
  }
  /* A page that is a form of its own (Sign in, Add a passkey) stands on the cream. */
  .entrance__panel:has(> .entrance__open) {
    max-inline-size: 480px; padding: 0; border: 0; background: transparent; box-shadow: none;
  }
  .entrance__foot { padding-block-end: 22px; }
}

/* The page inside: a head, the ways forward one under the other, quiet links last. */
.account { display: flex; flex-direction: column; gap: var(--space-4); }
.account__head { display: flex; flex-direction: column; gap: var(--space-2); }
.account__title { margin: 0; font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: var(--text-title); line-height: 1.05; text-wrap: balance; }
.account__lede { color: var(--ink-2); }
.account__who { color: var(--ink-2); font-size: var(--text-sm); overflow-wrap: anywhere; }
.account__question { font-size: var(--text-lg); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.account__subtitle { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.account__way { display: flex; flex-direction: column; gap: 6px; }
.account__passkey { min-block-size: max(52px, var(--target)); }
.account__passkey .icon { inline-size: 22px; block-size: 22px; }
.account__form { display: flex; flex-direction: column; gap: var(--space-4); }
.account__form .form-fields { max-inline-size: none; }
.account__back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
  min-block-size: var(--target); margin-inline-start: -8px; padding: 0 8px;
  border: 0; background: none; color: var(--brand); font: inherit; font-weight: var(--weight-strong);
  text-decoration: none; cursor: pointer; border-radius: var(--radius-sm);
}
.account__back .icon { inline-size: 20px; block-size: 20px; }
.account__back:hover { color: var(--brand-pressed); }
.account__back:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.account > p > a, .account__link, .account__others a { display: inline-flex; align-items: center; min-block-size: var(--target); }
/* "Forgot your password?" (allauth puts it in the password's help) is a full target too, at
   every text size (design review WEL-12). */
.account__form .form-field__help a { display: inline-flex; align-items: center; min-block-size: var(--target); }
.account__link { padding: 0; }
.account__others { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.account__choice { display: flex; flex-direction: column; gap: var(--space-4); }
.account__card {
  display: flex; flex-direction: column; gap: 10px; padding: var(--space-4);
  border: var(--border) solid var(--sb-card-border); border-radius: var(--radius-md); background: var(--sb-card);
}
.account__card-title { display: flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-strong); }
.account__note {
  display: flex; flex-direction: column; gap: 6px; padding: 14px var(--space-4);
  border: var(--border) solid var(--hairline); border-radius: var(--radius-md); background: var(--sb-card);
  font-size: var(--text-sm);
}
.account__note-title { font-size: var(--text-md); font-weight: var(--weight-strong); }
.account--centred { align-items: center; text-align: center; }
.account__mark { inline-size: 56px; block-size: 56px; color: var(--ink-2); }
.account--page { max-inline-size: 32rem; }
.account__steps { margin: 0; padding: 0; list-style: none; border: var(--border) solid var(--sb-card-border); border-radius: var(--radius-md); background: var(--sb-card); }
.account__step { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; }
.account__step + .account__step { border-block-start: var(--border) solid var(--hairline); }
.account__step-mark .icon { inline-size: 24px; block-size: 24px; }
.account__step-text { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); }
.account__step-text .button { align-self: flex-start; margin-block-start: var(--space-2); font-size: var(--text-md); }
.account__step-title { font-size: var(--text-md); font-weight: var(--weight-strong); }

/* The six-digit code: six boxes of 48 × 56 (account.js); without the script, one plain field. */
.code-boxes { display: grid; grid-template-columns: repeat(6, 48px); gap: 8px; }
.code-boxes__box {
  inline-size: 48px; block-size: 56px; box-sizing: border-box; padding: 0;
  border: var(--border) solid var(--control-border); border-radius: var(--radius-md);
  background: var(--card); color: var(--ink);
  font-family: var(--font-serif); font-size: var(--text-xl); text-align: center;
  font-variant-numeric: tabular-nums;
}
.code-boxes__box:focus { border: var(--border-strong) solid var(--ink); outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.code-boxes__box[aria-invalid="true"] { border: var(--border-strong) solid var(--sb-warn-border); }

/* Pages under Me in the app's frame: Sign-in security and its three pages, Devices, Your
   organizations, the email address and the password. */
.account-page { display: flex; flex-direction: column; gap: 18px; max-inline-size: 62rem; }
.account-page__lede { max-inline-size: 66ch; text-wrap: pretty; }
.account-page__heading { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.account-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 14px; }
.account-card {
  display: flex; flex-direction: column; gap: 12px; padding: 18px;
  border: var(--border) solid var(--sb-card-border); border-radius: var(--radius-md); background: var(--sb-card);
}
.account-card__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.account-card__title .icon { inline-size: 24px; block-size: 24px; }
.account-card__state { display: flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-strong); }
.account-card__state--on { color: var(--moss); }
.account-card__state .icon { inline-size: 20px; block-size: 20px; }
.account-card__note { color: var(--ink-2); font-size: var(--text-sm); text-wrap: pretty; }
.account-card__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-start: auto; }
.account-rows { margin: 0; padding: 0; list-style: none; border: var(--border) solid var(--hairline); border-radius: var(--radius-md); background: var(--sb-card); }
.account-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  min-block-size: 64px; padding: var(--space-2) 14px;
}
.account-row + .account-row, .account-emails > .account-row + .account-row { border-block-start: var(--border) solid var(--hairline); }
.account-row--device { grid-template-columns: minmax(0, 1fr) auto; min-block-size: 72px; }
.account-row--org { grid-template-columns: 36px minmax(0, 1fr) auto; }
.account-row--choice { grid-template-columns: auto minmax(0, 1fr); cursor: pointer; }
.account-row__icon { inline-size: 24px; block-size: 24px; }
.account-row__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; line-height: 1.3; }
.account-row__name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.account-row__meta, .account-row__small { color: var(--ink-2); font-size: var(--text-sm); }
.account-row__actions { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.account-row__actions a { display: inline-flex; align-items: center; min-block-size: var(--target); font-weight: var(--weight-strong); }
.account-row__badge {
  display: grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: var(--radius-md);
  background: var(--ink); color: var(--paper); font-weight: var(--weight-strong);
}
.account-row__badge--current { background: var(--sb-org-badge); color: var(--sb-org-badge-ink); }
.account-row__now { color: var(--moss); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.account-row__badge-word {
  padding: 2px var(--space-2); border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: var(--text-sm); font-weight: var(--weight-strong);
}
.account-emails { display: flex; flex-direction: column; margin: 0; padding: 0; border: var(--border) solid var(--hairline); border-radius: var(--radius-md); background: var(--sb-card); }
.account-emails > legend { padding: var(--space-3) 14px 0; }
.account-devices__end, .account-codes__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) 14px; }
.account-codes__new { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-inline-start: auto; }
.account-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.account-codes__code {
  padding: 10px 12px; border: var(--border) solid var(--hairline); border-radius: var(--radius-md); background: var(--card);
  font-family: var(--font-mono); font-size: var(--text-lg); letter-spacing: 0.06em; font-variant-numeric: tabular-nums;
}
.account-steps { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.account-steps__step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; }
.account-steps__n {
  display: grid; place-items: center; inline-size: 30px; block-size: 30px; box-sizing: border-box;
  border: 1.5px solid var(--ink); border-radius: 50%; font-weight: var(--weight-strong);
}
.account-steps__body { display: flex; flex-direction: column; gap: 12px; padding-block-start: 3px; min-inline-size: 0; }
.account-key { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
/* The QR code keeps a white ground in dark mode, or its dark squares would vanish. */
.account-key__qr { inline-size: 168px; block-size: 168px; border: var(--border) solid var(--ink); background: var(--sb-qr-ground); }
.account-key__text { display: flex; flex-direction: column; gap: 6px; }
.account-key__label { color: var(--ink-2); font-size: var(--text-sm); }
.account-key__value { font-family: var(--font-mono); font-size: var(--text-lg); letter-spacing: 0.08em; overflow-wrap: anywhere; }
@media (max-width: 40em) {
  .account-row { grid-template-columns: 24px minmax(0, 1fr); }
  .account-row--device, .account-row--choice { grid-template-columns: minmax(0, 1fr); }
  .account-row--org { grid-template-columns: 36px minmax(0, 1fr); }
  .account-row > :last-child:not(.account-row__text) { grid-column: 2; }
  .account-row--device > :last-child:not(.account-row__text) { grid-column: 1; }
  .account-codes__new { margin-inline-start: 0; }
}
@media print {
  .account-codes__actions, .breadcrumb { display: none; }
}
/* A used recovery code stays in its place, struck through (Account pages, round 3). */
.account-codes__code--used { color: var(--ink-2); }
.account-codes__used { font-family: var(--font-sans); font-size: var(--text-sm); }
/* <<< S3 account and sign-in: END */
/* ··· after S3, line 1 of 4: leave as it is ··· */
/* ··· after S3, line 2 of 4: leave as it is ··· */
/* ··· after S3, line 3 of 4: leave as it is ··· */
/* ··· after S3, line 4 of 4: leave as it is ··· */
/* >>> S4 settings: BEGIN (only stage S4 writes below this line) */
/* Organization settings (Complete pages 1): the pages as rows of two, the plan's limits as
   shelves with room left (papers fill it from the start side; the edge is where it ends). */
.settings { display: flex; flex-direction: column; gap: 18px; }
.settings-rows { /* the grid draws the seams: a 1px gap over the hairline, each cell on the card (SET-4) */
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--hairline); overflow: hidden;
}
.settings-rows > li { background: var(--sb-card); }
.settings-rows > li:last-child:nth-child(odd) { grid-column: 1 / -1; } /* an odd last row fills the line */
.settings-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 10px;
  min-block-size: 80px; padding: 8px 14px; color: var(--ink); text-decoration: none; /* the mock's 64 is its content box */
}
.settings-row:hover .settings-row__label { text-decoration: underline; }
.settings-row .icon { color: var(--brand); }
.settings-row__text { display: flex; flex-direction: column; line-height: 1.3; min-inline-size: 0; }
.settings-row__label { font-weight: var(--weight-strong); }
.settings-row__hint { color: var(--ink-2); font-size: var(--text-sm); }
.settings-plan { display: flex; flex-direction: column; gap: 12px; }
.settings-plan__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.settings-plan__note { margin: 0; max-inline-size: 70ch; color: var(--ink-2); font-size: var(--text-sm); }
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.limit {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card);
}
.limit__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 0; }
.limit__name { font-weight: var(--weight-strong); }
.limit__shelf { position: relative; display: block; block-size: 14px; border-block-end: 3px solid var(--ink); }
.limit__fill {
  position: absolute; inset-block-end: 0; inset-inline-start: 0; block-size: 12px;
  border-inline-start: 1px solid var(--sb-place-edge);
  background-image: repeating-linear-gradient(calc(90deg * var(--sb-dir)), var(--sb-place-fill) 0 9px, var(--sb-wall) 9px 11px);
}
.limit__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 40em) {
  .settings-rows, .limits { grid-template-columns: minmax(0, 1fr); }
}
.limit__fill--0 { inline-size: 0%; }
.limit__fill--1 { inline-size: 5%; }
.limit__fill--2 { inline-size: 10%; }
.limit__fill--3 { inline-size: 15%; }
.limit__fill--4 { inline-size: 20%; }
.limit__fill--5 { inline-size: 25%; }
.limit__fill--6 { inline-size: 30%; }
.limit__fill--7 { inline-size: 35%; }
.limit__fill--8 { inline-size: 40%; }
.limit__fill--9 { inline-size: 45%; }
.limit__fill--10 { inline-size: 50%; }
.limit__fill--11 { inline-size: 55%; }
.limit__fill--12 { inline-size: 60%; }
.limit__fill--13 { inline-size: 65%; }
.limit__fill--14 { inline-size: 70%; }
.limit__fill--15 { inline-size: 75%; }
.limit__fill--16 { inline-size: 80%; }
.limit__fill--17 { inline-size: 85%; }
.limit__fill--18 { inline-size: 90%; }
.limit__fill--19 { inline-size: 95%; }
.limit__fill--20 { inline-size: 100%; }
.settings__note { margin: 0; max-inline-size: 70ch; color: var(--ink-2); font-size: var(--text-sm); }
/* Roles (Settings · Roles): a table of role, can open, can change, people; one card per role on
   a phone, each cell with its own label. */
/* The rows share the table's columns (subgrid), so the last one is as wide as its widest cell,
   the head's "People" included, and never breaks that word (design review SET-13). */
.roles-table { display: grid; grid-template-columns: minmax(10rem, 220px) minmax(0, 1fr) minmax(0, 1fr) max-content; line-height: 1.35; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.roles-table__row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.roles-table__row > * { padding: 9px 14px; min-inline-size: 0; }
.roles-table__row + .roles-table__row { border-block-start: 1px solid var(--hairline); }
.roles-table__row--head { font-weight: 700; }
.roles-table__row--head + .roles-table__row { border-block-start: 2px solid var(--ink); }
.roles-table__role { display: flex; flex-direction: column; }
.roles-table__name { font-size: var(--text-paper); font-weight: var(--weight-strong); }
.roles-table__how { color: var(--ink-2); font-size: var(--text-sm); }
.roles-table__count { text-align: end; font-family: var(--font-serif); font-size: var(--text-date-sm); font-variant-numeric: lining-nums tabular-nums; }
.roles-table__row--head .roles-table__count { font-family: var(--font-sans); font-size: inherit; }
.roles-table__label { display: none; }
@media (max-width: 52em) {
  .roles-table { grid-template-columns: minmax(0, 1fr); }
  .roles-table__row { grid-template-columns: minmax(0, 1fr); padding-block: 6px; }
  .roles-table__row > * { padding-block: 3px; }
  .roles-table__row--head { display: none; }
  .roles-table__label { display: inline; color: var(--ink-2); font-family: var(--font-sans); font-size: var(--text-sm); }
  .roles-table__count { text-align: start; font-family: var(--font-sans); font-size: inherit; }
}
/* One role (Settings pages · One role): a card per group that opens if it holds something, a
   square tick per thing; a passkey-only thing greyed for a role that signs in with a code. */
.grants { display: flex; flex-direction: column; gap: 16px; }
.grants__group { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.grants__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; min-block-size: var(--target); align-items: center; cursor: pointer; list-style: none; }
.grants__head::-webkit-details-marker { display: none; }
.grants__name { display: flex; align-items: center; gap: 8px; font-size: var(--text-md); font-weight: var(--weight-strong); }
.grants__mark { inline-size: 16px; block-size: 16px; color: var(--ink-2); }
.grants__group[open] .grants__mark { rotate: 90deg; }
.grants__count { color: var(--ink-2); font-size: var(--text-sm); }
.grants__rows { display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; }
/* The one Save stays in sight at the foot of the window while the groups scroll, with how many
   ticks are not saved yet (design review SET-12); above the phone tab bar, as .paint__bar. */
.grants__bar {
  position: sticky; inset-block-end: 0; z-index: var(--z-sticky); align-items: center;
  margin: 0; padding-block: 12px; padding-inline: 16px;
  border-block-start: 1px solid var(--hairline); background: var(--sb-card);
}
.grants__unsaved { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 63.99em) {
  .grants__bar { inset-block-end: calc(56px + 3px + max(28px, env(safe-area-inset-bottom))); }
}
@media (min-width: 64em) {
}
@media (max-width: 18em) {
  .grants__bar { inset-block-end: 0; } /* very large text: the tab bar is hidden */
}
.grant { display: flex; align-items: center; gap: 12px; min-block-size: var(--target); cursor: pointer; }
.grant input { flex: none; inline-size: 22px; block-size: 22px; margin: 0; accent-color: var(--ink); }
.grant__text { display: flex; flex-direction: column; line-height: 1.3; }
.grant__hint { color: var(--ink-2); font-size: var(--text-sm); }
/* A locked permission reads at 4.5:1: its hint is the reason the administrator needs; the
   disabled box is what says "locked" (design review MOT-2). */
.grant--locked { color: var(--ink-2); cursor: not-allowed; }
.grant--locked .grant__hint { color: var(--ink-2); }
/* Two columns: the work, then a margin card (Languages, Your data); one column on a phone. */
.settings-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-split__main { display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; }
.settings-margin { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.settings-margin p { margin: 0; }
.settings-margin__number { font-family: var(--font-serif); font-size: var(--text-2xl); line-height: 1; font-variant-numeric: lining-nums; }
.settings-margin__count span + span { color: var(--ink-2); }
.settings-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.settings-head__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.settings-head__title:not(:first-child) { margin-block-start: 6px; }
.settings-head__aside { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 52em) { .settings-split { grid-template-columns: minmax(0, 1fr); } }
/* Languages (Complete pages 3): each pack fills like a shelf of 20 tiles. */
.packs { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.pack { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.pack + .pack { border-block-start: 1px solid var(--hairline); }
.pack__text { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.pack__text p { margin: 0; }
.pack__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pack__name > span:first-child { font-size: var(--text-lg); font-weight: var(--weight-strong); }
.pack__sub, .pack__meta { color: var(--ink-2); font-size: var(--text-sm); }
.pack__ruler { display: flex; flex-wrap: wrap; gap: 1px; }
.pack__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.pack__end p { margin: 0; }
.pack__pct { font-weight: var(--weight-strong); }
.pack__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pack__actions form { margin: 0; }
.pack-add { display: flex; flex-wrap: wrap; gap: 8px; }
.pack-add .input { flex: 1 1 16rem; max-inline-size: none; }
/* A language, edited (Complete pages 4): pill filters, a field that needs fixing keeps the 2px
   amber edge until it is fixed. */
.string-filters .chip { border-color: var(--control-border); border-radius: var(--radius-round); background: var(--sb-card); }
.string-filters .chip[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.strings__cell--error .textarea[aria-invalid="true"] { border: 2px solid var(--amber); }
.strings__cell--error .error { color: var(--ink); }
/* Compliance profile and packs (Complete pages 5) and one pack (Settings pages). */
.settings-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); min-inline-size: 0; }
.settings-card > p, .settings-card > ul { margin: 0; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-grid__side { display: flex; flex-direction: column; gap: 18px; min-inline-size: 0; }
@media (max-width: 52em) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
.settings-list { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.pack-update__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
/* The jurisdiction as a string of places: a peg for each, a string down to the next. */
.places { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.places__place { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-block-size: 34px; padding-inline-start: 22px; }
.places__peg { position: absolute; inset-inline-start: 4px; inset-block-start: 50%; inline-size: 8px; block-size: 8px; margin-block-start: -4px; border-radius: var(--radius-round); background: var(--sb-peg-ink); }
.places__place--tied::before { content: ""; position: absolute; inset-inline-start: 7px; inset-block: -50% 50%; border-inline-start: 1.5px solid var(--sb-peg-ink); }
.places__name { font-weight: var(--weight-strong); }
.places__kind { color: var(--ink-2); font-size: var(--text-sm); }
.title-row--stacked { flex-direction: column; align-items: flex-start; }
.title-row--stacked .settings__note { margin: 0; }
/* A pack's page (design review CORE-13): a jump list, then what applies, then what does not. */
.pack-jump > ul { margin: 0; padding: 0; list-style: none; }
.pack-jump a { display: inline-flex; align-items: center; min-block-size: var(--target); }
.pack-group { display: flex; flex-direction: column; gap: 14px; }
.pack-items { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.pack-item { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.pack-item p, .pack-item ol { margin: 0; }
.pack-item__signals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.pack-item__tag { display: inline-flex; align-items: center; gap: 6px; }
.pack-item__tag--off { color: var(--ink-2); }
.pack-item__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-xl); font-weight: var(--weight-serif); line-height: 1.15; }
.pack-item__where, .pack-item__source { color: var(--ink-2); font-size: var(--text-sm); }
/* Your data (Settings · Your data): where it is kept, and the copy in the wall's order. */
.kept { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.kept dt { font-weight: var(--weight-strong); }
.kept dd { margin: 0; }
@media (max-width: 40em) { .kept { grid-template-columns: minmax(0, 1fr); } .kept dd { margin-block-end: 6px; } }
.copy-tree { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px 14px; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-wall); font-family: var(--font-mono); font-size: var(--text-sm); }
.copy-take { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; }
/* Reports and one report (Settings pages). */
.report-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.report-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-block-size: 64px; padding: 10px 14px; }
.report-row + .report-row { border-block-start: 1px solid var(--hairline); }
.report-row__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; flex: 1 1 18rem; }
.report-row__name { font-weight: var(--weight-strong); }
.report-row__about { color: var(--ink-2); font-size: var(--text-sm); }
.report-table thead th { border-block-end: 2px solid var(--ink); }
.report-table td { font-variant-numeric: tabular-nums; }
/* A report's table (reports/_table.html, MON-4) is `table--cards`: one card per row on a phone.
   Wider, a date stays on one line, long text gets room instead of being cut mid-word, and when
   the columns are wider than the page a soft shadow at the edge says more wait to the side (the
   covers scroll with the table, the shadows stay put: they show only where there is more). */
.report-frame { container: report / inline-size; }
@container report (min-width: 36.01em) {
  .report-table .report-cell--date { white-space: nowrap; }
  .report-table .report-cell--wide { min-inline-size: 14rem; }
  .report-frame > .report-table {
    border-radius: var(--radius-md);
    background:
      linear-gradient(to right, var(--card) 40%, transparent) left / 2.5rem 100% no-repeat local,
      linear-gradient(to left, var(--card) 40%, transparent) right / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--sb-panel-shadow-color), transparent) left / 0.875rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, var(--sb-panel-shadow-color), transparent) right / 0.875rem 100% no-repeat scroll,
      var(--card);
  }
  .report-frame .report-table > .table { background: transparent; }
}
/* The organization's own key (Settings pages): status, creating the three shares (shown once,
   in the amber box), rebuilding and the drill. Made and used in the browser only. */
.org-key { gap: 18px; }
.org-key .form-field { max-inline-size: 560px; }
.shares__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shares__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.shares__who { font-weight: var(--weight-strong); }
.shares .code-block { overflow-wrap: anywhere; }
.org-key__result { margin: 0; font-weight: var(--weight-strong); }
.org-key__result:empty { display: none; }
/* Task settings (Settings pages): each setting a row with a tick box and its words; Save posts
   them together, so they are drawn as the form's tick boxes, never as switches that save at once
   (design review SET-8; the box as on one role's page). */
.options { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.options > li + li { border-block-start: 1px solid var(--hairline); }
.option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-block-size: 64px; padding: 10px 14px; cursor: pointer; }
.option__box { inline-size: 22px; block-size: 22px; margin: 0; accent-color: var(--ink); }
.option__text { display: flex; flex-direction: column; gap: 2px; }
.option__label { font-weight: var(--weight-strong); }
.option__help { color: var(--ink-2); font-size: var(--text-sm); }
/* Compliance snapshot (Settings pages): evidence, never a verdict; every line says its source
   and the day it was checked. */
.snapshot-head { align-items: flex-start; }
.snapshot-head__text { display: flex; flex-direction: column; gap: 6px; flex: 1 1 26rem; min-inline-size: 0; }
.snapshot-head__lede { margin: 0; max-inline-size: 70ch; color: var(--ink-2); }
.snapshot-counts { margin: 0; font-weight: var(--weight-strong); }
.evidence { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.evidence__line { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.evidence__line p { margin: 0; }
.evidence__signals { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--text-sm); }
.evidence__word { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.evidence__on, .evidence__note { color: var(--ink-2); font-size: var(--text-sm); }
.evidence__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.evidence__source { font-size: var(--text-sm); }
/* <<< S4 settings: END */
/* ··· after S4, line 1 of 4: leave as it is ··· */
/* ··· after S4, line 2 of 4: leave as it is ··· */
/* ··· after S4, line 3 of 4: leave as it is ··· */
/* ··· after S4, line 4 of 4: leave as it is ··· */
/* >>> S5 people training keys: BEGIN (only stage S5 writes below this line) */
/* People, a person, Training, Keys and codes (Sidebar "People · laptop", Fuller pages
   "1 · A person", More areas, Complete pages "14 · Keys", Last pages "11 · Everyone's
   training", Forms; D-092). One plan for the three modules: the part of the wall, then the work
   beside a 268px margin; one column on a phone. */
.people-page,
.person-page,
.people-form { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
.people-form > form { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 40em) {
  .people-form__actions { flex-direction: column; align-items: stretch; }
  .people-form__actions > .button { inline-size: 100%; min-block-size: 52px; justify-content: center; }
}
.people-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 20px; align-items: start; }
.people-layout__work,
.people-layout__margin { display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; }
.people-layout__margin { gap: 12px; }
.people-layout__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
@media (max-width: 64em) {
  .people-layout { grid-template-columns: minmax(0, 1fr); }
}
.people-note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); line-height: 1.45; }

/* Tabs for Everyone, Staff, Board and Volunteers, each with its count in grey. Four short tabs
   wrap onto a second line on a phone rather than scroll out of sight (design review BRD-11). */
.people-tabs { flex-wrap: wrap; gap: 4px; border-block-end-color: var(--sb-card-border); font-size: var(--text-sm); }
.people-tabs .tabs__tab { padding-inline: 14px; color: var(--brand); font-weight: var(--weight-strong); }
.people-tabs .tabs__tab[aria-current="page"] { color: var(--ink); border-block-end-color: var(--ink); font-weight: 700; }
.people-tabs__count { color: var(--ink-2); font-weight: var(--weight-strong); }

/* A row: the person, their papers as md tiles in the fixed order, what needs doing. */
.people-head,
.people-row { display: grid; grid-template-columns: minmax(0, 1fr) 108px minmax(0, 1.15fr); gap: 16px; }
.people-head { padding-inline: 14px; color: var(--ink-2); font-size: var(--text-sm); }
.people-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.people-row { align-items: center; min-block-size: 56px; padding-block: 8px; padding-inline: 14px; }
.people-row + .people-row { border-block-start: 1px solid var(--hairline); }
.people-row__who { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.25; }
.people-row__name { color: var(--brand); font-size: var(--text-paper); font-weight: var(--weight-strong); text-decoration: underline; overflow-wrap: anywhere; } /* a row's link looks like one (BRD-12) */
/* The whole row (and the whole checklist card) is the link's target, so it is never under 44px. */
.people-row,
.move-card { position: relative; }
.people-row__name::after,
.move-card__who::after { content: ""; position: absolute; inset: 0; }
.people-row__role { color: var(--ink-2); font-size: var(--text-sm); }
.people-row__papers { display: flex; flex-wrap: wrap; gap: 4px; }
.people-row__need { display: flex; flex-direction: column; font-size: var(--text-sm); line-height: 1.3; }
.people-row__state { font-weight: var(--weight-strong); }
.people-az { align-self: flex-start; display: inline-flex; align-items: center; min-block-size: var(--target); font-size: var(--text-sm); font-weight: var(--weight-strong); }
@media (max-width: 40em) {
  .people-head { display: none; }
  .people-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* "Starting and leaving": a checklist card per person, a round mark per step. */
.move-card { display: flex; flex-direction: column; gap: 8px; padding-block: 14px; padding-inline: 16px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); font-size: var(--text-sm); }
.move-card p { margin: 0; }
.move-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; }
.move-card__who { margin: 0; font-family: var(--font-sans); line-height: 1.25; color: var(--ink); font-size: var(--text-paper); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.move-card__kind { color: var(--ink-2); }
.move-card__done { font-weight: var(--weight-strong); }
.move-card__steps { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; line-height: 1.3; }
.move-card__step { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; }
.move-card__step--done { color: var(--ink-2); }
.move-card__mark { display: inline-grid; place-items: center; inline-size: 16px; block-size: 16px; margin-block-start: 2px; box-sizing: border-box; border: 1.5px solid var(--control-border); border-radius: var(--radius-round); }
.move-card__step--done .move-card__mark { border: 0; background: var(--moss); color: var(--card); }
.move-card__mark > .icon { inline-size: 11px; block-size: 11px; }

/* A person: the personnel file as a small wall, beside the cards for roles, name and leaving. */
.person-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.person-layout__main,
.person-layout__side { display: flex; flex-direction: column; gap: 14px; min-inline-size: 0; }
.person-layout__main { gap: 18px; }
@media (max-width: 52em) {
  .person-layout { grid-template-columns: minmax(0, 1fr); }
}
.person-file { display: flex; flex-direction: column; gap: 10px; }
/* A person on a phone (Community "A person · iPhone"; X5): the papers hang as pegged rows on the
   pegboard, each a card with its tile, name and state, and Remind on one not in place. The
   laptop keeps the small wall; each hides the other, so only one is ever read. */
.peg-rows { display: none; flex-direction: column; margin: 0; padding: 2px 8px 12px; list-style: none; border-radius: var(--radius-sm); background: var(--sb-wall-dots), var(--sb-wall); }
.peg-row { display: flex; flex-direction: column; align-items: center; }
.peg-row > .peg { position: relative; z-index: 1; margin-block: 14px -6px; }
.peg-row__card { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; align-self: stretch; min-block-size: 64px; padding-block: 8px; padding-inline: 12px 8px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); box-shadow: var(--sb-card-shadow); }
.peg-row__card form { margin: 0; }
.peg-row__words { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; line-height: 1.25; }
.peg-row__name { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.peg-row__name a { color: inherit; }
.peg-row__state { font-size: var(--text-sm); font-weight: var(--weight-strong); }
@media (max-width: 40em) {
  .person-file__wall { display: none; }
  .peg-rows { display: flex; }
}
html[data-text-size="large"] .peg-row__card { grid-template-columns: 22px minmax(0, 1fr); }
html[data-text-size="large"] .peg-row__card > form, html[data-text-size="large"] .peg-row__card > .button, html[data-text-size="large"] .peg-row__card > .glass-lock { grid-column: 2; justify-self: start; }
.person-file__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.person-file__head a { display: inline-flex; align-items: center; min-block-size: var(--target); font-weight: var(--weight-strong); }
.person-file__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.person-file__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.person-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.person-card > p,
.person-card form { margin: 0; }
.person-card__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.person-card .button { align-self: flex-start; justify-content: flex-start; text-align: start; }
.person-minors { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.person-minors__state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
/* The name stays behind grey bars until someone asks to see it. */
.person-hidden { display: flex; flex-direction: column; gap: 6px; }
.person-hidden > span { block-size: 12px; border-radius: 2px; background: var(--hairline); }
.person-hidden > span:nth-child(1) { inline-size: 70%; }
.person-hidden > span:nth-child(2) { inline-size: 55%; }
.person-hidden > span:nth-child(3) { inline-size: 62%; }
/* Training: each course a row with its tile, who owes it and when; your own training under it;
   everyone's training as a table, each cell a tile and its word. */
.course-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.course-row { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-block-size: 56px; padding-block: 9px; padding-inline: 14px; }
.course-row--mine { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.course-row--plain { grid-template-columns: minmax(0, 1fr); min-block-size: 0; padding-block: 8px; }
.course-row + .course-row { border-block-start: 1px solid var(--hairline); }
.course-row__words { display: flex; flex-direction: column; gap: 1px; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.course-row__name { color: var(--ink); font-size: var(--text-paper); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
/* A course's name is a link that looks like one, stretched over its row so the whole row is the
   target; the row's Remind sits above it (design review BRD-12). */
a.course-row__name { color: var(--brand); text-decoration: underline; }
a.course-row__name::after { content: ""; position: absolute; inset: 0; }
.course-row :is(form, details, .button) { position: relative; z-index: 1; }
.course-row__meta { color: var(--ink-2); }
.course-row__state { font-weight: var(--weight-strong); }
.course-row__act { margin: 0; }
.course-row__hand-in form { padding-block-start: var(--space-3); }
@media (max-width: 40em) {
  .course-row { grid-template-columns: 22px minmax(0, 1fr); }
  .course-row__act { grid-column: 2; }
  .course-row:is(.course-row--plain, .course-row--mine) { grid-template-columns: minmax(0, 1fr); }
}
.training-mine,
.training-courses { display: flex; flex-direction: column; gap: 10px; }
.training-state { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--weight-strong); }
.training-matrix { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.training-matrix .table { border: 0; background: none; font-size: var(--text-sm); }
.training-matrix .table :is(th, td) { padding-block: 10px; padding-inline: 12px; border-block-end: 1px solid var(--hairline); background: none; vertical-align: top; text-align: start; }
.training-matrix .table thead th { padding-block: 8px; border-block-end: 2px solid var(--ink); font-weight: 700; }
.training-matrix .table tbody th { font-weight: var(--weight-strong); }
.training-matrix .table tbody tr:last-child > * { border-block-end: 0; }
.training-matrix .disclosure > summary { font-size: var(--text-sm); }
/* Keys and codes are not papers: what one person holds hangs on hooks, never as tiles
   (Complete pages "14 · Keys"); the register is a list of rows with a ring, never a tile. */
.hooks { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding-block: 20px; padding-inline: 16px; list-style: none; }
.hook { display: flex; flex-direction: column; align-items: center; gap: 6px; inline-size: 11rem; text-align: center; }
.hook__ring,
.key-row__ring { display: grid; place-items: center; flex: none; inline-size: 52px; block-size: 52px; box-sizing: border-box; border: 1px solid var(--sb-card-border); border-radius: var(--radius-round); background: var(--sb-card); color: var(--ink); }
.hook__ring > .icon,
.key-row__ring > .icon { inline-size: 26px; block-size: 26px; }
.hook__name { font-size: var(--text-sm); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.hook__meta { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 40em) {
  .hooks { flex-direction: column; align-items: stretch; }
  .hook { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; inline-size: auto; text-align: start; }
  .hook > .peg { display: none; }
  .hook__ring { grid-row: 1 / span 3; }
}
/* The register by door (More areas "Keys and codes · laptop": "Doors"; X5): each door's name in
   sans 600 with its keys out beside it, then its items. */
.key-door { display: flex; flex-direction: column; gap: 6px; }
.key-door + .key-door { margin-block-start: 14px; }
.key-door__name { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.key-door__count { color: var(--ink-2); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.key-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.key-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start; padding-block: 12px; padding-inline: 14px; }
.key-row + .key-row { border-block-start: 1px solid var(--hairline); }
.key-row__body { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; font-size: var(--text-sm); }
.key-row__body p { margin: 0; }
.key-row__name { font-size: var(--text-paper); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.key-row__meta,
.key-row__since { color: var(--ink-2); }
.key-row__holders { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.key-row__holder { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.key-row__holder form { margin: 0; }
/* The group pages' margin (People, Programs; FIXES 4): each module's piece is a `.margin-card`
   (the class Money, Building and Board use; it is defined with them). After events, which
   Programs also draws on its own page, and "Areas in <group>" take the same look here; "Areas"
   is the last card, a 44px row an area. Lists inside a card lose their own box. */
.group-page__margin > .prog-after,
.group-page__margin > section:has(> .group-page__areas) {
  display: flex; flex-direction: column; gap: 8px; padding-block: 12px; padding-inline: 14px;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); font-size: var(--text-sm);
}
.group-page__margin > :is(.prog-after, section:has(> .group-page__areas)) > h2 {
  margin: 0; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.25;
}
:is(.group-page__margin, .margin-card) :is(.prog-after__list, .agenda__items, .cm-rows) { border: 0; border-radius: 0; background: none; }
:is(.group-page__margin, .margin-card) :is(.prog-after__row, .agenda__item, .cm-row) { padding-inline: 0; }
.margin-card .agenda__item { gap: 6px; }
.margin-card .move-card { padding-block: 10px 0; padding-inline: 0; border: 0; border-block-start: 1px solid var(--hairline); border-radius: 0; background: none; }
.group-page__margin .group-page__areas { gap: 0; }
.group-page__margin .group-page__areas > li + li,
.margin-card .agenda__items > li + li,
.margin-card .cm-rows > li + li,
.group-page__margin .prog-after__row + .prog-after__row { border-block-start: 1px solid var(--hairline); }
.group-page__margin .group-page__areas a { display: flex; }
/* Round 3 (R2): Building's Keys and codes card names a leaver's codes, each with Done. */
.keys-change { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.keys-change__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.keys-change__text { flex: 1 1 12em; min-inline-size: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
/* <<< S5 people training keys: END */
/* ··· after S5, line 1 of 4: leave as it is ··· */
/* ··· after S5, line 2 of 4: leave as it is ··· */
/* ··· after S5, line 3 of 4: leave as it is ··· */
/* ··· after S5, line 4 of 4: leave as it is ··· */
/* >>> S6 programs calendar community: BEGIN (only stage S6 writes below this line) */
/* Programs (Sidebar "Programs · laptop", Fuller pages "An event", Community "How many came";
   D-092): the page's own stack, events by date, After events, the event's two columns, and the
   head count with its stepper. Phone: one column, the papers under each event. */
.prog-page, .prog-event-page, .prog-count, .prog-form { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
.prog-board { display: grid; gap: 20px; align-items: start; }
.prog-board__work { display: flex; flex-direction: column; gap: 24px; min-inline-size: 0; }
.prog-board__margin { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
@media (min-width: 64em) {
  .prog-board { grid-template-columns: minmax(0, 1fr) 268px; }
}
.prog-events { display: flex; flex-direction: column; gap: 8px; min-inline-size: 0; }
.prog-events__head, .prog-event { display: grid; grid-template-columns: 56px minmax(0, 1fr) 250px; gap: 16px; }
.prog-events__head { padding-inline: 16px; color: var(--ink-2); font-size: var(--text-sm); }
.prog-events__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.prog-event { padding: 14px 16px; }
.prog-event + .prog-event { border-block-start: 1px solid var(--hairline); }
.date-block { display: flex; flex-direction: column; align-items: center; margin: 0; line-height: 1.1; }
.date-block__wd, .date-block__mon { color: var(--ink-2); font-size: var(--text-sm); }
.date-block__day { font-family: var(--font-serif); font-size: var(--text-stamp); line-height: 1.05; }
.prog-event__main { display: flex; flex-direction: column; gap: 3px; min-inline-size: 0; }
.prog-event__title { color: var(--ink); font-size: var(--text-md); font-weight: var(--weight-strong); line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.prog-event__title:hover { color: var(--brand); text-decoration: underline; }
.prog-event__when, .prog-event__who, .prog-event__note, .prog-event__clear { margin: 0; font-size: var(--text-sm); line-height: 1.3; }
.prog-event__who, .prog-event__clear { color: var(--ink-2); }
.prog-event__note { text-wrap: pretty; }
.prog-event__needs { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; }
.prog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.prog-tag { display: inline-flex; align-items: center; min-block-size: 26px; padding-inline: 8px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); font-size: var(--text-sm); line-height: 1.1; }
.prog-more, .prog-note { margin: 0; font-size: var(--text-sm); }
.prog-note { color: var(--ink-2); line-height: 1.45; text-wrap: pretty; }
@media (max-width: 52em) {
  .prog-events__head { display: none; }
  .prog-event { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .prog-event__needs { grid-column: 2; }
  .prog-event__needs:empty { display: none; }
}
.prog-programs { display: flex; flex-direction: column; gap: 10px; }
.prog-programs__title, .prog-after__title, .prog-permits__title, .prog-under__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.prog-after { display: flex; flex-direction: column; gap: 12px; }
.prog-after__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.prog-after__row { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 14px; }
.prog-after__row + .prog-after__row { border-block-start: 1px solid var(--hairline); }
.prog-after__text { display: flex; flex-direction: column; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.prog-after__name { color: var(--ink); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.prog-after__words { font-weight: var(--weight-strong); }
.prog-links { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.prog-links a { display: inline-flex; align-items: center; gap: 8px; min-block-size: var(--target); font-weight: var(--weight-strong); }
.prog-under { display: flex; flex-direction: column; gap: 8px; }
.prog-under__list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.prog-under__list li { min-block-size: var(--target); display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }

/* One event: facts and the permits' small wall on the start side, the cards on the end side. */
.prog-meta { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.prog-event-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 52em) {
  .prog-event-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
.prog-event-grid__main, .prog-event-grid__side { display: flex; flex-direction: column; gap: 18px; min-inline-size: 0; }
.prog-facts, .prog-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.prog-permits { display: flex; flex-direction: column; gap: 10px; }
.prog-card__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.prog-card__count { margin: 0; font-weight: var(--weight-strong); }
.prog-card .help { margin: 0; }

/* The head count: the number in the serif, a 64px step each side (stepper.js). */
.prog-count { max-inline-size: 560px; }
.prog-count__head { display: flex; flex-direction: column; gap: 4px; }
.prog-count__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-title); font-weight: var(--weight-serif); line-height: 1.1; letter-spacing: -0.01em; }
.prog-count__for { margin: 0; }
.count-form { display: flex; flex-direction: column; gap: 16px; }
.count-form input[data-stepper] {
  inline-size: 100%; min-block-size: 88px; box-sizing: border-box; text-align: center;
  font-family: var(--font-serif); font-size: var(--text-3xl); line-height: 0.9; letter-spacing: -0.02em;
}
.prog-card .count-form input[data-stepper] { font-size: var(--text-xl); min-block-size: var(--target); }
/* The shared field rules are stronger than the line above; the stepper's number wins here: the
   serif 72 on the card itself, no box of its own (Community "How many came · iPhone"). */
.count-form .stepper input[data-stepper] {
  min-block-size: 88px; padding-inline: 0; border-color: transparent; background: none;
  font-family: var(--font-serif); font-size: var(--text-3xl); line-height: 0.9; text-align: center;
  appearance: textfield; -moz-appearance: textfield;
}
.count-form .stepper input[data-stepper]::-webkit-inner-spin-button,
.count-form .stepper input[data-stepper]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.count-form .stepper input[data-stepper] { border-block-end-color: var(--control-border); }
.count-form .stepper input[data-stepper]:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: 2px; }
.prog-card .count-form .stepper input[data-stepper] { min-block-size: var(--target); border-color: var(--control-border); background: var(--card); font-size: var(--text-xl); }
.stepper {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 12px;
  padding: 16px 12px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card);
}
.prog-card .stepper { grid-template-columns: var(--target) minmax(0, 1fr) var(--target); padding: 8px; gap: 8px; }
.stepper__step {
  display: grid; place-items: center; inline-size: 64px; block-size: 64px; box-sizing: border-box; padding: 0;
  border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--sb-button-2);
  color: var(--brand); font-size: var(--text-xl); font-weight: var(--weight-strong); line-height: 1; cursor: pointer;
}
.prog-card .stepper__step { inline-size: var(--target); block-size: var(--target); font-size: var(--text-lg); }
/* An event on the laptop: the counts as plain fields side by side, Record and Cancel together (X5). */
.count-form--plain { gap: 12px; }
.count-form--plain .form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 8px; max-inline-size: none; }
.count-form--plain .actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.count-form--plain .actions > .button { padding-inline: 14px; font-size: var(--text-sm); }
html[data-text-size="large"] .count-form--plain .form-fields { grid-template-columns: minmax(0, 1fr); }
.count-form__expected { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.count-outline { display: flex; flex-direction: column; gap: 8px; }
.count-outline__label { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.count-outline__box { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: var(--radius-sm); background: var(--sb-empty); }
.count-outline__box--up { border: 1px solid var(--sb-card-border); background: var(--sb-card); box-shadow: var(--sb-card-shadow); }
.count-outline__tile { inline-size: 22px; block-size: 28px; box-sizing: border-box; border: 1.5px dashed var(--ink); border-radius: 1px; }
.count-outline__text { display: flex; flex-direction: column; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.count-outline__name { font-size: var(--text-paper); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
@media (max-width: 40em) {
  .prog-count .actions > .button { flex: 1 1 100%; }
}
/* The calendar (Board and calendar, "Calendar · month · laptop" and "agenda · iPhone"; Complete
   pages "12 · Calendar address"; D-092): a view of Programs. A paper coming due or lapsing is a
   tile on its day, an event is words; today's number sits in ink; a busy day shows two lines and
   "n more". On a phone it is an agenda by day. */
.cal-page { display: flex; flex-direction: column; gap: 14px; min-inline-size: 0; }
.cal-views { display: inline-flex; border: 1px solid var(--control-border); border-radius: var(--radius-sm); overflow: hidden; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.cal-views__option { display: inline-flex; align-items: center; min-block-size: var(--target); padding-inline: 16px; background: var(--sb-button-2); color: var(--brand); text-decoration: none; }
.cal-views__option + .cal-views__option { border-inline-start: 1px solid var(--control-border); }
.cal-views__option[aria-current="page"] { background: var(--ink); color: var(--paper); }
/* The design draws only the title row over the month; the month's steps and what to show share
   one line under it, the steps on the start side (Board and calendar "Calendar · month"; X5). */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.cal-bar .month-nav__title { font-size: var(--text-lg); }
.cal-bar .filters { margin: 0; }
.cal-page .month { background: var(--sb-card); border-color: var(--hairline); }
.cal-page .month th { border-block-end: 1px solid var(--ink); }
.cal-page .month__day { padding-block: 6px; padding-inline: 8px; }
.cal-page .month__date {
  display: inline-grid; place-items: center; min-inline-size: 28px; block-size: 28px; box-sizing: border-box;
  padding-inline: 4px; margin-block-end: 4px; border-radius: 999px; font-size: var(--text-lg);
}
.cal-page .month__day--today { box-shadow: none; }
/* The day's number is the sans at 15 (the design's month), and an event reads as one run of
   words, its time first, so a narrow day does not split it into two columns. */
.cal-page .month__date { font-family: var(--font-sans); font-size: var(--text-sm); }
.cal-page .month__link { display: block; font-size: var(--text-sm); line-height: 1.3; }
.cal-page .month__link .icon { display: inline-block; vertical-align: -0.125em; }
.cal-page .month__day--today .month__date { background: var(--ink); color: var(--paper); font-weight: var(--weight-strong); }
/* Another month's dates are real dates people read: --ink-2 at full strength (4.5:1 or more on
   the page; design review BPC-1). The cell's own ground already says "another month". */
.cal-page .month__day--out .month__date { color: var(--ink-2); }
.month__paper { display: inline-flex; align-items: center; gap: 5px; padding: 0; background: none; font-weight: var(--weight-strong); }
.month__paper .tile { flex: none; }
.month__paper:hover { background: none; text-decoration: underline; }
.month__more { margin-block-start: 4px; font-size: var(--text-sm); }
.month__more > summary { cursor: pointer; color: var(--brand); font-weight: var(--weight-strong); min-block-size: 24px; }
.month__more[open] > summary { margin-block-end: 4px; }
.cal-page .agenda { display: none; flex-direction: column; gap: 14px; }
.cal-page .agenda__day { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; }
.cal-page .agenda__date { display: block; margin: 0; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--ink-2); }
.cal-page .agenda__date--today { color: var(--ink); }
.agenda__items { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.agenda__item { display: flex; align-items: center; min-block-size: var(--target); padding: 6px 12px; box-sizing: border-box; font-size: var(--text-sm); }
.agenda__item + .agenda__item { border-block-start: 1px solid var(--hairline); }
.agenda__item .month__link, .agenda__item .month__tag { font-size: var(--text-sm); font-weight: var(--weight-strong); }
.agenda__item .month__time { font-weight: var(--weight-regular); }
@media (max-width: 720px) {
  .cal-page .agenda { display: flex; }
}
.cal-new__copy { align-self: flex-start; }
.cal-new { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--sb-card); }
.cal-new__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.cal-new .amber-box__secret .code-block { overflow-wrap: anywhere; font-size: var(--text-sm); }
/* Community (Community "Community · iPhone", Community pages: all; D-092). Members open these
   pages inside the app as web pages, so each is one column that reads the same at 402px and on
   a laptop. Community holds no papers: no tiles, except a paper an event's runner needs. */
.cm-page { display: flex; flex-direction: column; gap: 14px; max-inline-size: 720px; min-inline-size: 0; }
.cm-head { display: flex; flex-direction: column; gap: 6px; }
.cm-back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-block-size: var(--target);
  margin-inline-start: -8px; padding-inline: 8px; font-weight: var(--weight-strong); text-decoration: none;
}
.cm-back .icon { inline-size: 20px; block-size: 20px; }
.cm-head__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-title); font-weight: var(--weight-serif); line-height: 1.05; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cm-head__meta { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.cm-head__lede { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.cm-org { margin: 0; font-weight: var(--weight-strong); }
.cm-h2 { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.cm-h3 { margin: 0; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.cm-section { display: flex; flex-direction: column; gap: 8px; min-inline-size: 0; }
.cm-split { display: flex; flex-direction: column; gap: 18px; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-actions form { display: flex; margin: 0; }
.cm-note, .cm-so-far { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.cm-so-far { color: var(--ink); font-weight: var(--weight-strong); }
.cm-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
/* A public report: its preview's title, and its counts as rows of what was counted and how
   many (design review BPC-7). */
.cm-preview__title { margin: 0; font-weight: var(--weight-strong); }
.cm-counts { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; max-inline-size: 560px; margin: 0; padding: 0; border: 0; }
.cm-counts__row { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; align-items: center; gap: 8px; }
.cm-counts__head { font-size: var(--text-sm); color: var(--ink-2); }
.cm-counts__error { grid-column: 1 / -1; margin: 0; }
.cm-body { display: flex; flex-direction: column; gap: 12px; }
.cm-body .prose { margin: 0; }
.cm-page .list { border-radius: var(--radius-sm); background: var(--sb-card); }
.cm-page .task { padding: 10px 12px; }
.cm-page .task__end .button { min-block-size: var(--target); }
.cm-wide { justify-content: center; inline-size: 100%; min-block-size: 48px; gap: 10px; }
.cm-wide .icon { inline-size: 20px; block-size: 20px; }
.cm-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.cm-rows > li + li { border-block-start: 1px solid var(--hairline); }
.cm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; }
.cm-row__main { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; line-height: 1.3; }
.cm-row__title { color: var(--ink); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.cm-row__meta { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.cm-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 10px; min-block-size: 52px; padding-inline: 14px 12px; color: var(--ink); text-decoration: none; }
.cm-nav:hover { background: var(--paper-2); }
.cm-nav > span:first-child { grid-column: 1; }
.cm-nav .icon { grid-column: 3; inline-size: 20px; block-size: 20px; color: var(--brand); }
.cm-nav__count { grid-column: 2; font-size: var(--text-sm); color: var(--ink-2); }
/* A count still owed: the dashed ink outline that "due today" has on Today. */
/* A count still owed: a plain row with the coming-due paper, as in Programs' After events; no
   look of its own beside the six (design review BPC-11). */
.cm-owed { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-block: 10px; padding-inline: 12px 10px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); color: var(--ink); text-decoration: none; }
.cm-owed__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.cm-owed__title { font-size: var(--text-md); font-weight: var(--weight-strong); }
.cm-owed__act { pointer-events: none; }
.cm-events { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cm-event { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-block: 10px; padding-inline: 12px 10px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.cm-event .date-block__day { font-size: var(--text-xl); }
.cm-event__main { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.cm-event__title { margin: 0; color: var(--ink); font-size: var(--text-md); font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; text-wrap: pretty; }
.cm-event__when, .cm-event__clear { margin: 0; }
.cm-event__clear { color: var(--ink-2); font-weight: var(--weight-strong); }
.cm-event__need { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: var(--weight-strong); }
@media (max-width: 30em) {
  .cm-event { grid-template-columns: 44px minmax(0, 1fr); }
  .cm-event__act { grid-column: 2; }
}
/* Questions: answers as 44px choices; a closed one shows counts in ink, never a paper colour. */
.cm-polls { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.cm-poll__q { margin: 0; font-weight: var(--weight-strong); text-wrap: pretty; }
.cm-poll__answers, .cm-poll__counts { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cm-poll__answers form { margin: 0; }
.cm-choice {
  display: flex; align-items: center; inline-size: 100%; min-block-size: var(--target); padding-inline: 12px;
  border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--card);
  color: var(--ink); font: inherit; font-weight: var(--weight-strong); text-align: start; cursor: pointer;
}
.cm-choice[aria-current="true"] { border: 2px solid var(--ink); }
.cm-choice__mine { font-weight: var(--weight-regular); color: var(--ink-2); }
.cm-count { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
.cm-count__n { font-weight: var(--weight-strong); }
.cm-count__bar { grid-column: 1 / -1; inline-size: 100%; block-size: 6px; }
.cm-count__bar::-webkit-meter-bar { background: var(--sb-wall); border: 0; border-radius: 3px; block-size: 6px; }
.cm-count__bar::-webkit-meter-optimum-value, .cm-count__bar::-webkit-meter-suboptimum-value { background: var(--ink); border-radius: 3px; }
.cm-count__bar::-moz-meter-bar { background: var(--ink); border-radius: 3px; }
.cm-signed { margin: 0; padding: 10px 12px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--sb-card); font-weight: var(--weight-strong); }
.cm-fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.cm-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-inline__label { font-weight: var(--weight-strong); }
.cm-check { display: inline-flex; align-items: center; gap: 8px; min-block-size: var(--target); }
.cm-tel { display: inline-flex; align-items: center; min-block-size: var(--target); font-weight: var(--weight-strong); }
/* The door list, as printed: black on white, one row a household, a box to tick. */
.door-list { display: flex; flex-direction: column; gap: 14px; max-inline-size: 720px; }
.door-list__head { display: flex; flex-direction: column; gap: 4px; padding-block-end: 10px; border-block-end: 2px solid var(--ink); }
.door-list__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-title); font-weight: var(--weight-serif); line-height: 1.05; }
.door-list__meta, .door-list__note { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.door-list__table { inline-size: 100%; border-collapse: collapse; }
.door-list__table th { padding-block: 6px; padding-inline: 8px; border-block-end: 1px solid var(--ink); font-size: var(--text-sm); text-align: start; }
.door-list__table td { padding-block: 10px; padding-inline: 8px; border-block-end: 1px solid var(--hairline); }
.door-list__box { display: inline-block; inline-size: 18px; block-size: 18px; box-sizing: border-box; border: 1.5px solid var(--ink); border-radius: 2px; vertical-align: middle; }
@media print {
  .door-list__table tr { break-inside: avoid; }
}
/* Programs' own table of programs: the same card table as Everyone's training (rules, no fill,
   the head over a 2px ink line); on a phone it stays the shared cards. */
@media (min-width: 40.0625em) {
  .prog-programs .table-wrap { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
  .prog-programs .table { border: 0; background: none; font-size: var(--text-sm); }
  .prog-programs .table :is(th, td) { padding-block: 10px; padding-inline: 12px; border-block-end: 1px solid var(--hairline); background: none; vertical-align: top; text-align: start; }
  .prog-programs .table thead th { padding-block: 8px; border-block-end: 2px solid var(--ink); font-weight: 700; }
  .prog-programs .table tbody tr:last-child > * { border-block-end: 0; }
}
/* Names at events (Last pages 12): the rules as a plain bulleted list at 15. */
.prog-bullets { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-inline-start: 1.2em; font-size: var(--text-sm); line-height: 1.45; list-style: disc; }
/* Community on a laptop (Community pages, the running pages): the head closes with the 2px
   ink rule and its lede is the italic serif; on a phone it stays the member's plain head. */
@media (min-width: 52em) {
  .cm-head { padding-block-end: 10px; border-block-end: 2px solid var(--ink); }
  .cm-head__lede { font-family: var(--font-serif); font-style: italic; font-size: var(--text-lg); line-height: 1.35; }
}
/* "Your events" under the wall on Today (Requests and forms, "Today · a volunteer"): each a card
   row with its date, its name and time, and a chevron; the margin's card lists them plainly. */
.prog-under__rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.prog-under__rows > li + li { border-block-start: 1px solid var(--hairline); }
.prog-under__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; align-items: center; gap: 12px; padding-block: 10px; padding-inline: 14px; color: var(--ink); text-decoration: none; }
.prog-under__row:hover .prog-under__name { text-decoration: underline; }
.prog-under__row .date-block__day { font-size: var(--text-xl); }
.prog-under__row > .icon { inline-size: 20px; block-size: 20px; color: var(--brand); }
.prog-under__words { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.prog-under__name { font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; }
.prog-under__when { color: var(--ink-2); font-size: var(--text-sm); }
.prog-plain { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
/* Round 3 (R2): why an event close to a licence does not need it. */
.prog-event__why { color: var(--ink-2); }
/* <<< S6 programs calendar community: END */
/* ··· after S6, line 1 of 4: leave as it is ··· */
/* ··· after S6, line 2 of 4: leave as it is ··· */
/* ··· after S6, line 3 of 4: leave as it is ··· */
/* ··· after S6, line 4 of 4: leave as it is ··· */
/* >>> S7 money: BEGIN (only stage S7 writes below this line) */
/* Money, Finance, Donations, Grants and Reporting (Sidebar "Money", Fuller pages "6 · Finance",
   More areas, Records, Complete pages 10 and 15). Each page: its part of the wall, then the work
   and a 268px margin; one column on a phone. */
.money-page { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
.money-lede { margin: 0; max-inline-size: var(--measure); color: var(--ink-2); font-size: var(--text-sm); }
.money-grid { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 20px; align-items: start; }
.money-grid--finance { grid-template-columns: minmax(0, 1fr) 268px; gap: 20px; }
.money-work,
.money-margin { display: flex; flex-direction: column; gap: 18px; min-inline-size: 0; }
.money-margin { gap: 12px; }
@media (max-width: 52em) {
  .money-grid,
  .money-grid--finance { grid-template-columns: minmax(0, 1fr); }
}
/* A card on the page: the up card, a hairline edge. */
.money-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-inline-size: 0;
  padding-block: 14px;
  padding-inline: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--sb-card);
}
.money-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.money-card__title,
.money-section__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.25; }
.money-card__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.money-card__big { margin: 0; font-family: var(--font-serif); font-size: var(--text-display); line-height: 0.9; letter-spacing: -0.02em; }
.money-card p { margin: 0; }
.money-card .disclosure > summary { font-weight: var(--weight-strong); }
.money-section { display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; }
.money-quiet { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
/* What a statement row asks for: the month, its state in its ink, the one thing to do. */
.money-todo { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid var(--hairline); }
.money-todo__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-block: 8px; font-size: var(--text-sm); line-height: 1.3; }
.money-todo__row + .money-todo__row { border-block-start: 1px solid var(--hairline); }
.money-todo__text { display: flex; flex-direction: column; min-inline-size: 0; }
.money-todo__title,
.money-todo__state { font-weight: var(--weight-strong); }
/* A list of rows in one card: expenses, decisions, gifts, awards. */
.money-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.money-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; min-block-size: 60px; padding-block: 8px; padding-inline: 14px; }
.money-row + .money-row { border-block-start: 1px solid var(--hairline); }
.money-row--decide { grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; padding-block: 12px; padding-inline: 16px; }
.money-row--tiles { grid-template-columns: auto minmax(0, 1fr) auto; }
.money-row__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; line-height: 1.3; }
.money-row__title { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.money-row__meta { color: var(--ink-2); font-size: var(--text-sm); overflow-wrap: anywhere; }
.money-row__state { font-size: var(--text-sm); font-weight: var(--weight-strong); }
.money-row__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* Approve over Send it back, both at the row's end (an expense waiting for a decision). */
.money-row__acts--stack { flex-direction: column; align-items: flex-end; }
.money-row__acts--stack > .money-row__back { flex: none; }
.money-row__acts--stack > .money-row__back[open] { align-self: stretch; }
.money-row:target { outline: var(--focus-width) solid var(--brand); outline-offset: -2px; }
.money-amount { font-family: var(--font-serif); font-size: var(--text-date); line-height: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 40em) {
  .money-row,
  .money-row--decide,
  .money-row--tiles { grid-template-columns: minmax(0, 1fr); }
  .money-row--tiles > .paper { display: none; }
}
/* A paper of another area on this page: a dashed outline that links to it. */
.money-outline {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding-block: 14px;
  padding-inline: 16px;
  border: 2px dashed var(--sb-missing-edge);
  border-radius: var(--radius-sm);
  background: var(--sb-empty);
}
.money-outline__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.35; }
.money-outline__title { font-size: var(--text-paper); font-weight: var(--weight-strong); }
.money-outline__state { font-weight: var(--weight-strong); }
.money-outline__link { display: inline-flex; align-items: center; min-block-size: var(--target); font-weight: var(--weight-strong); }
/* Papers in a card: a tile, the name and its word (the budget, an award's reports). */
.money-papers { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.money-papers__row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-block: 6px; }
.money-papers__row + .money-papers__row { border-block-start: 1px solid var(--hairline); }
.money-papers__text { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.3; }
.money-papers__state { font-size: var(--text-sm); font-weight: var(--weight-strong); }
/* Donations: counts in the serif, funds as a short list, a gift's letter as a paper. */
.money-count { display: flex; align-items: baseline; gap: 10px; }
.money-count__n { font-family: var(--font-serif); font-size: var(--text-display); line-height: 0.9; letter-spacing: -0.02em; }
.money-funds { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.money-funds__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 10px; padding-block: 6px; }
.money-funds__row + .money-funds__row { border-block-start: 1px solid var(--hairline); }
.money-funds__name { font-weight: var(--weight-strong); }
.money-funds__n { color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: end; }
.money-letter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.money-letter__state { display: inline-flex; align-items: center; gap: 5px; font-weight: var(--weight-strong); }
.money-key { min-block-size: 1.4em; }
.money-form { max-inline-size: 640px; }
.money-record-head { flex-direction: column; align-items: flex-start; gap: 6px; }
.money-record-head__meta { overflow-wrap: anywhere; }
.money-missing { margin: 0; padding-inline-start: 1.2em; }
.money-sealed-fields { margin-block-start: var(--space-4); }
/* The gift receipt letter (Gift receipt letter file): one Letter page; the organization's
   square and name, the date in the serif, the facts between two rules, the statements at the
   foot. A part the organization has not recorded is a marked, dashed space. */
.receipt__badge {
  display: grid;
  flex: none;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--radius-sm);
  background: var(--sb-org-badge);
  color: var(--sb-org-badge-ink);
  font-weight: 700;
  print-color-adjust: exact;
}
.receipt__org { display: flex; flex-direction: column; line-height: 1.3; }
.receipt__date { font-family: var(--font-serif); font-size: var(--text-lede); }
.receipt__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-xl); font-weight: var(--weight-serif); }
.receipt__facts { display: grid; grid-template-columns: 11em minmax(0, 1fr); margin: 0; border-block: 1px solid var(--ink); }
.receipt__facts dt,
.receipt__facts dd { margin: 0; padding-block: 0.55em; }
.receipt__facts dt { color: var(--ink-2); }
.receipt__facts dd { font-weight: var(--weight-strong); }
.receipt__facts dt:not(:first-of-type),
.receipt__facts dt:not(:first-of-type) + dd { border-block-start: 1px solid var(--hairline); }
.receipt__amount { font-family: var(--font-serif); font-size: var(--text-date); line-height: 1.2; }
.letter__slot { display: inline-block; padding-inline: 0.4em; border: 1px dashed var(--ink-2); color: var(--ink-2); font-style: italic; }
.receipt .letter__foot { display: flex; flex-direction: column; gap: 0.5em; color: var(--ink); font-size: var(--text-sm); }
/* The Pennsylvania disclosure statement prints at the letter's body size, never greyed (10 P.S.
   § 162.13(c) "conspicuously"; the research's software note): the foot is body size and only its
   other lines are small. */
.receipt .letter__foot { font-size: inherit; }
.receipt .letter__foot > :not(.receipt__disclosure) { font-size: var(--text-sm); }
.receipt__disclosure { color: var(--ink); font-size: inherit; }
/* Grants: an award row keeps the tile column even before its reports are papers. */
.money-row__no-tile { inline-size: 22px; }
.money-grid--record { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.money-card--down { border: 2px dashed var(--sb-missing-edge); background: var(--sb-empty); }
.money-paper-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
@media (max-width: 52em) {
  .money-grid--record { grid-template-columns: minmax(0, 1fr); }
}
/* Volunteer hours: a block for each hour given, on the pegboard; numbers only. */
.money-hours {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 14px;
  padding-inline: 16px;
  border-radius: var(--radius-sm);
  background-color: var(--sb-wall);
  background-image: radial-gradient(circle, var(--sb-wall-dot) 1.1px, transparent 1.5px);
  background-size: 12px 12px;
}
.money-hours__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.money-hours__rows { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.money-hours__row { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) 4rem; align-items: center; gap: 10px; font-size: var(--text-sm); }
.money-hours__what { overflow-wrap: anywhere; }
.money-hours__blocks { display: flex; flex-wrap: wrap; gap: 2px; }
.money-hours__blocks--more::after { content: "…"; padding-inline-start: 4px; color: var(--ink-2); }
.money-hours__block { inline-size: 10px; block-size: 14px; border: 1px solid var(--sb-place-edge); border-radius: 1px; background: var(--sb-place-fill); }
.money-hours__n { font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
@media (max-width: 40em) {
  .money-hours__row { grid-template-columns: minmax(0, 1fr) auto; }
  .money-hours__blocks { grid-column: 1 / -1; grid-row: 2; }
}
/* Reporting: the two downloads drawn as what they hold, on the pegboard. */
.report-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.report-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  block-size: 100%;
  padding-block: 18px;
  padding-inline: 12px;
  border-radius: var(--radius-sm);
  background-color: var(--sb-wall);
  background-image: radial-gradient(circle, var(--sb-wall-dot) 1.1px, transparent 1.5px);
  background-size: 12px 12px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}
.report-tile:hover .report-tile__name { text-decoration: underline; }
.report-tile:focus-visible { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.report-tile__binder { position: relative; display: flex; align-items: flex-start; gap: 4px; inline-size: 96px; block-size: 80px; padding-inline: 10px; }
.report-tile__binder > .paper { position: relative; z-index: 0; }
.report-tile__binder > .paper:nth-of-type(2) { margin-block-start: 4px; }
.report-tile__binder > .paper:nth-of-type(3) { margin-block-start: 8px; }
.report-tile__frame { position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 1; block-size: 62px; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); background: var(--sb-card); }
.report-tile__sheet { display: flex; flex-direction: column; gap: 6px; inline-size: 66px; block-size: 84px; padding-block: 10px; padding-inline: 8px; border: 1px solid var(--ink); border-radius: 2px; background: var(--sb-card); }
.report-tile__sheet > span { display: block; block-size: 3px; background: var(--hairline); }
.report-tile__sheet > span:first-child { background: var(--ink); }
.report-tile__sheet > span:last-child { inline-size: 70%; }
.report-tile__name { font-weight: var(--weight-strong); }
.report-tile__note { color: var(--ink-2); font-size: var(--text-sm); }
/* Round 3 (R2): an expense's note and approvals under it; Send it back opens its form. */
.money-row__ask { color: var(--ink); }
.money-row__back { flex: 1 1 100%; }
.money-row__back form { margin-block-start: var(--space-2); }
/* <<< S7 money: END */
/* ··· after S7, line 1 of 4: leave as it is ··· */
/* ··· after S7, line 2 of 4: leave as it is ··· */
/* ··· after S7, line 3 of 4: leave as it is ··· */
/* ··· after S7, line 4 of 4: leave as it is ··· */
/* >>> S8 building: BEGIN (only stage S8 writes below this line) */
/* Building (S8, D-092): Maintenance, the report panel, a repair, Assets and Vendors. */
.building-page, .repair-page, .report-page { display: flex; flex-direction: column; gap: var(--space-4); }
.building-h { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.25; }
.margin-card .booked { border: 0; background: none; }
.margin-card .booked__row { padding-inline: 0; }
.margin-card .booked__row:first-child { padding-block-start: 0; }
.building-grid { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 20px; align-items: start; }
.building-work, .building-margin { display: flex; flex-direction: column; gap: var(--space-4); min-inline-size: 0; }
.building-work > section, .building-margin > section { display: flex; flex-direction: column; gap: 10px; }
.building-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.building-rows > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-3); min-block-size: 52px; padding-block: 6px; padding-inline: 14px; }
.building-rows > li + li { border-block-start: 1px solid var(--hairline); }
.building-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); margin: 0; }
.building-links a { display: inline-flex; align-items: center; min-block-size: var(--target); font-size: var(--text-sm); font-weight: var(--weight-strong); }
@media (max-width: 60em) { .building-grid { grid-template-columns: minmax(0, 1fr); } }

/* Things to fix: an up card each, the mark at the end of the title line. */
.fix-cards { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fix-card { display: flex; flex-direction: column; gap: var(--space-1); padding-block: 12px; padding-inline: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); box-shadow: var(--sb-card-shadow); }
.fix-card p { margin: 0; }
.fix-card__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) 12px; }
.fix-card__title { color: var(--ink); font-size: var(--text-md); font-weight: var(--weight-strong); line-height: 1.25; text-decoration: none; }
.fix-card__title:hover { text-decoration: underline; }
.fix-card__by { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.3; }
.fix-card__next { font-size: var(--text-sm); line-height: 1.35; }
.fix-mark { display: inline-flex; flex: none; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.fix-mark .icon { inline-size: 14px; block-size: 14px; }
.fix-mark--life { color: var(--brick); }
.fix-mark--safety { color: var(--amber); }

/* Inspections booked: the paper's small tile, then its words. */
.booked { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.booked__row { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; align-items: start; padding-block: 10px; padding-inline: 14px; }
.booked__row + .booked__row { border-block-start: 1px solid var(--hairline); }
.booked__row > .tile { margin-block-start: 3px; }
.booked__words { display: flex; flex-direction: column; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.booked__title { color: var(--ink); font-weight: var(--weight-strong); }
.booked__state { font-weight: var(--weight-strong); }
.booked__note { color: var(--ink-2); }
.booked__words form { margin: 0; }
.booked__words .button--quiet { padding-inline: 0; font-size: var(--text-sm); }

/* Report something: the form in a panel, or a page one column wide. */
.report-page .report-form { max-inline-size: var(--panel); }
.report-form { display: flex; flex-direction: column; gap: var(--space-4); }
.report-form .actions .button { inline-size: 100%; justify-content: center; }
.report-panel__close { min-inline-size: var(--target); min-block-size: var(--target); padding: 0; justify-content: center; }
.harm-choices { display: flex; flex-direction: column; margin: 0; padding: 0; border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--card); }
.harm-choices > div + div { border-block-start: 1px solid var(--hairline); }
.harm-choice { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: center; min-block-size: 52px; padding-block: 6px; padding-inline: 12px; font-weight: var(--weight-regular); cursor: pointer; }
.harm-choice input { inline-size: 22px; block-size: 22px; margin: 0; accent-color: var(--brand); }
.harm-choice__words { display: flex; flex-direction: column; line-height: 1.3; }
.harm-choice:has(input:checked) .harm-choice__label { font-weight: var(--weight-strong); }
.harm-choice__hint { color: var(--ink-2); font-size: var(--text-sm); }
/* In the laptop's panel, the three answers sit in one row. */
@media (min-width: 48em) {
  .report-panel .harm-choices { flex-direction: row; }
  .report-panel .harm-choices > div { flex: 1 1 0; min-inline-size: 0; }
  .report-panel .harm-choices > div + div { border-block-start: 0; border-inline-start: 1px solid var(--control-border); }
  .report-panel .harm-choice { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; min-block-size: 48px; padding-inline: 6px; }
  .report-panel .harm-choice input { position: absolute; opacity: 0; inline-size: 1px; block-size: 1px; }
  .report-panel .harm-choice__hint { display: none; }
  .report-panel .harm-choice__label { color: var(--brand); font-size: var(--text-sm); font-weight: var(--weight-strong); }
  .report-panel .harm-choice:has(input:checked) { background: var(--ink); }
  .report-panel .harm-choice:has(input:checked) .harm-choice__label { color: var(--paper); }
  .report-panel .harm-choice:has(input:focus-visible) { outline: var(--focus-width) solid var(--brand); outline-offset: calc(-1 * var(--focus-width) - 2px); }
}

/* A repair request: what is wrong and its history beside "It is fixed". */
.repair-head { display: flex; flex-direction: column; gap: var(--space-2); padding-block-end: 10px; border-block-end: 2px solid var(--ink); }
.repair-head__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-title); font-weight: var(--weight-serif); line-height: 1.05; letter-spacing: -0.01em; }
.repair-head__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; font-size: var(--text-sm); }
.repair-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.repair-main, .repair-side { display: flex; flex-direction: column; gap: var(--space-4); min-inline-size: 0; }
@media (max-width: 60em) { .repair-grid { grid-template-columns: minmax(0, 1fr); } }
.repair-card { display: flex; flex-direction: column; gap: 10px; padding-block: 16px; padding-inline: 18px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.repair-card p { margin: 0; max-inline-size: 62ch; }
.repair-card--fix { border-color: var(--ink); }
.repair-card__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.repair-h { margin: 0; font-family: var(--font-serif); font-size: var(--text-date); font-weight: var(--weight-serif); line-height: 1.1; }
.repair-facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); margin: 0; font-size: var(--text-sm); line-height: 1.4; }
.repair-facts dt, .repair-facts dd { margin: 0; padding-block: 7px; border-block-start: 1px solid var(--hairline); }
.repair-facts dt { color: var(--ink-2); }
@media (max-width: 40em) { .repair-facts { grid-template-columns: minmax(0, 1fr); } .repair-facts dd { border-block-start: 0; padding-block-start: 0; } }
.repair-ready { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0; padding-block: 12px; padding-inline: 14px; border-radius: var(--radius-sm); background: var(--sb-wall) var(--sb-wall-dots); font-size: var(--text-sm); line-height: 1.35; }
.repair-ready > .tile { margin-block-start: 2px; }
.repair-history { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.repair-history > li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding-block: 8px; padding-inline: 14px; font-size: var(--text-sm); line-height: 1.35; }
.repair-history > li + li { border-block-start: 1px solid var(--hairline); }
.repair-history__on { font-weight: var(--weight-strong); }
.repair-history__what { display: flex; flex-direction: column; min-inline-size: 0; }
@media (max-width: 40em) { .repair-history > li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
/* Assets: a row per asset with its mark, and one asset's small wall beside its status. */
.asset-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.asset-rows > li + li { border-block-start: 1px solid var(--hairline); }
.asset-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 20px; gap: 12px; align-items: center; min-block-size: 64px; padding-block: 8px; padding-inline: 14px; color: var(--ink); text-decoration: none; }
.asset-row:hover .asset-row__name { text-decoration: underline; }
.asset-row__icon { inline-size: 24px; block-size: 24px; }
.asset-row__go { inline-size: 20px; block-size: 20px; color: var(--brand); }
.asset-row__words { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.3; }
.asset-row__name { font-weight: var(--weight-strong); }
.asset-row__hint { color: var(--ink-2); font-size: var(--text-sm); }
.asset-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; padding-block-end: 10px; border-block-end: 2px solid var(--ink); }
.asset-head__words { display: flex; flex: 1 1 380px; flex-direction: column; gap: 6px; min-inline-size: 0; }
.asset-head__words p { margin: 0; font-size: var(--text-sm); }
.asset-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.asset-papers { display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; }
@media (max-width: 60em) { .asset-grid { grid-template-columns: minmax(0, 1fr); } }
/* Vendors: each vendor's papers as md tiles in a fixed order, then its small wall. */
.vendor-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.vendor-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; align-items: start; min-block-size: 56px; padding-block: 9px; padding-inline: 14px; }
.vendor-row + .vendor-row { border-block-start: 1px solid var(--hairline); }
.vendor-row__tiles { display: flex; flex-wrap: wrap; gap: 4px; padding-block-start: 2px; }
.vendor-row__words { display: flex; flex-direction: column; gap: 1px; min-inline-size: 0; font-size: var(--text-sm); line-height: 1.3; }
.vendor-row__name { color: var(--ink); font-size: var(--text-md); font-weight: var(--weight-strong); }
.vendor-row__gap { font-weight: var(--weight-strong); }
.vendor-row__papers { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); color: var(--ink-2); }
.vendor-note { display: flex; flex-direction: column; gap: var(--space-2); padding-block: 14px; padding-inline: 16px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); font-size: var(--text-sm); line-height: 1.4; }
.vendor-note p { margin: 0; }
.vendor-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 60em) { .vendor-grid { grid-template-columns: minmax(0, 1fr); } }
.vendor-papers { display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; }
.vendor-wall { padding-block: 26px 16px; padding-inline: 14px; border-radius: var(--radius-sm); background: var(--sb-wall) var(--sb-wall-dots); }
.vendor-contracts { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.vendor-signed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.vendor-state { display: inline-flex; align-items: center; gap: 5px; font-weight: var(--weight-strong); }
.vendor-years { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.vendor-years > li { display: flex; flex-direction: column; gap: 2px; padding-block: 6px; font-size: var(--text-sm); }
.vendor-years > li + li { border-block-start: 1px solid var(--hairline); }
.vendor-years__top { display: flex; justify-content: space-between; font-size: var(--text-md); }
/* The 1099 list (Last pages "13 · The 1099 list · laptop"; I1, D-092) */
.ten99-page { display: flex; flex-direction: column; gap: 16px; max-inline-size: 900px; }
.ten99-guide { border-width: 2px; border-inline-start-width: 6px; font-size: var(--text-md); }
.ten99-guide .amber-box__text { display: flex; align-items: flex-start; gap: 10px; }
.ten99-guide .icon { flex: none; margin-block-start: 2px; }
.ten99 { inline-size: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); font-size: var(--text-md); }
.ten99 th, .ten99 td { padding-block: 10px; padding-inline: 12px; border-block-end: 1px solid var(--hairline); text-align: start; vertical-align: top; }
.ten99 thead th { padding-block: 8px; border-block-end: 2px solid var(--ink); font-weight: 700; }
.ten99 tbody tr:last-child > * { border-block-end: 0; }
.ten99__vendor { font-weight: var(--weight-strong); }
.ten99__paid { text-align: end; font-variant-numeric: tabular-nums; }
.ten99 th.ten99__paid { text-align: end; }
.ten99__mark { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--weight-strong); }
.ten99__mark .tile { flex: none; }
.ten99__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); max-inline-size: var(--measure); }
.ten99-amount { display: flex; flex-direction: column; gap: 8px; padding-block: 14px; padding-inline: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.ten99-amount p { margin: 0; }
.ten99-amount__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
@media (max-width: 40em) {
  .ten99, .ten99 tbody, .ten99 tr, .ten99 th, .ten99 td { display: block; }
  .ten99 thead { display: none; }
  .ten99 tr { padding-block: 10px; padding-inline: 12px; border-block-end: 1px solid var(--hairline); }
  .ten99 th, .ten99 td { padding: 0; border: 0; }
  .ten99 td { margin-block-start: 4px; }
  .ten99 td::before { content: attr(data-label) " · "; color: var(--ink-2); font-weight: 400; }
  .ten99__paid, .ten99 th.ten99__paid { text-align: start; }
}
/* Round 3 (R2): a vendor's row offers the first gap's action under its words. */
.vendor-row__act { align-self: flex-start; margin-block-start: 6px; }
/* <<< S8 building: END */
/* ··· after S8, line 1 of 4: leave as it is ··· */
/* ··· after S8, line 2 of 4: leave as it is ··· */
/* ··· after S8, line 3 of 4: leave as it is ··· */
/* ··· after S8, line 4 of 4: leave as it is ··· */
/* >>> S9 board and signing: BEGIN (only stage S9 writes below this line) */
/* The briefing (Screens v2 "Board · briefing"; Large "Board briefing · Large"; D-092): one
   column 960 wide, the serif title with its italic date over the double rule, the lead, the
   count and the strip, what the board should know as one ruled card, hung and came down side by
   side, the forms on pegs, then the Acknowledge box (or its record, in place). */
.briefing { gap: 30px; }
.briefing__head { display: flex; flex-direction: column; gap: 10px; }
.briefing__titles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.briefing__titles h1 { margin: 0; font-family: var(--font-serif); font-size: var(--text-display); font-weight: var(--weight-serif); line-height: 1; letter-spacing: -0.01em; }
.briefing__for { margin: 0; }
.briefing__rule { block-size: 3px; border-block-start: 2px solid var(--ink); border-block-end: 1px solid var(--ink); }
.briefing__lead { max-inline-size: 60ch; font-size: var(--text-date-sm); }
.briefing__wall { padding: 16px; }
.briefing__section { display: flex; flex-direction: column; gap: 12px; }
.briefing__h2 { margin: 0; font-family: var(--font-serif); font-size: var(--text-xl); font-weight: var(--weight-serif); line-height: 1.1; }
.briefing__know { gap: 0; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.briefing__know > li { gap: 16px; padding: 18px 20px; }
.briefing__know > li + li { border-block-start: 1px solid var(--hairline); }
.briefing__h { font-family: var(--font-serif); font-size: var(--text-date); font-weight: var(--weight-serif); line-height: 1.1; }
.briefing__rows { background: var(--sb-card); }
.briefing__rows > li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; font-size: var(--text-paper); }
.briefing__row-name { min-inline-size: 0; overflow-wrap: anywhere; }
.briefing__row-day { color: var(--ink-2); font-size: var(--text-sm); }
.briefing__row-day.ink--lapsed { color: var(--brick); font-weight: var(--weight-strong); }
.briefing__ack { display: flex; flex-direction: column; gap: 16px; padding: 24px 28px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--sb-card); }
.briefing__ack .choice { min-block-size: var(--target); }
.briefing__done { border-color: var(--ink); }
.briefing__record { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.briefing__record-line { display: flex; align-items: center; gap: 10px; margin: 0; }
.briefing__tiles { display: inline-flex; gap: 3px; }
@media (max-width: 40em) {
  .briefing__ack { padding: 20px 16px; }
  .briefing__ack .actions > .button, .briefing__done .actions > .button { flex: 1 1 100%; justify-content: center; }
}

/* The conflict-of-interest forms: each board member's form, an lg paper on its peg, the name
   and the state in words under it. Seven across on a laptop, four on a phone. A form signed
   today is ringed in ink (the Board page). */
.coi { display: flex; flex-direction: column; gap: 12px; }
.coi__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.coi__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-xl); font-weight: var(--weight-serif); line-height: 1.1; }
.coi__count { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.coi__due { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.coi__pegs { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 16px 10px; margin: 0; padding: 18px 16px 16px; list-style: none; }
.coi__paper { display: flex; flex-direction: column; align-items: center; gap: 8px; min-inline-size: 0; text-align: center; }
.coi__hang { display: flex; flex-direction: column; align-items: center; }
.coi__hang > .peg { position: relative; z-index: 1; margin-block-end: -6px; }
.coi__name { font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.2; overflow-wrap: anywhere; }
.coi__note { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.2; }
.coi__note[class*="ink--"] { font-weight: var(--weight-strong); }
.coi__note.ink--missing, .coi__note.ink--lapsed { color: var(--brick); }
.is-ringed .paper { outline: 2px solid var(--sb-peg-ink); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (max-width: 40em) {
  .coi__pegs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; padding: 18px 10px 14px; }
}

/* The Board page (Board and calendar file, "Board · laptop"): the title row, its part of the
   wall, then a work column and a 268 margin; on a phone, one column. */
.board-page { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
.board-meta { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.board-grid, .meeting-grid { display: grid; gap: 20px; align-items: start; }
.board-grid__work, .board-grid__margin, .board-work { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
@media (min-width: 60em) {
  .board-grid { grid-template-columns: minmax(0, 1fr) 268px; }
  .meeting-grid { grid-template-columns: minmax(0, 1.5fr) 280px; gap: 24px; }
}
html[data-text-size="large"] .board-grid { grid-template-columns: minmax(0, 1fr); }
.board-h { margin: 0 0 8px; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
.board-section { display: flex; flex-direction: column; gap: 10px; }
.board-next { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); box-shadow: var(--sb-card-shadow); }
.board-next__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.25; }
.board-work .coi__title { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.25; }
.margin-card .board-rows { border: 0; background: none; }
.margin-card .board-rows__row { padding-inline: 0; }
.margin-card .report-tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.board-next__meta { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.board-agenda { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.board-agenda__item { display: grid; grid-template-columns: 22px 10px minmax(0, 1fr); align-items: start; gap: 10px; padding-block: 8px; border-block-start: 1px solid var(--hairline); font-size: var(--text-sm); line-height: 1.35; }
.board-agenda__n { font-family: var(--font-serif); font-size: var(--text-date-sm); line-height: 1; }
.board-agenda__tile { padding-block-start: 2px; }
.board-agenda__words { display: flex; flex-direction: column; min-inline-size: 0; }
.board-agenda__text { font-size: var(--text-paper); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.board-agenda__note[class*="ink--"] { font-weight: var(--weight-strong); }
.board-pair { display: grid; gap: 16px; align-items: start; }
@media (min-width: 48em) { .board-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.board-rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.board-rows__row { position: relative; display: flex; align-items: center; gap: 10px; min-block-size: var(--target); padding: 8px 12px; font-size: var(--text-sm); line-height: 1.3; }
.board-rows__row + .board-rows__row { border-block-start: 1px solid var(--hairline); }
.board-rows__row--paper { display: grid; grid-template-columns: 22px minmax(0, 1fr); }
.board-rows__row--end { justify-content: space-between; flex-wrap: wrap; }
.board-rows__words { display: flex; flex-direction: column; min-inline-size: 0; }
.board-rows__title { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
/* A row whose title is a link: the link in --brand, underlined, stretched over the row so the
   whole row is its target; the row's own buttons, forms and other links sit above it (design
   review BRD-12). */
a.board-rows__title { color: var(--brand); text-decoration: underline; }
a.board-rows__title::after { content: ""; position: absolute; inset: 0; }
.board-rows__row :is(form, details, .button, a:not(.board-rows__title)) { position: relative; z-index: 1; }
.board-rows__text { overflow-wrap: anywhere; }
.board-rows__note { color: var(--ink-2); }
.board-rows__note[class*="ink--"] { font-weight: var(--weight-strong); }
.board-rows__note.ink--due { color: var(--amber); }
.board-rows__note.ink--lapsed, .board-rows__note.ink--missing { color: var(--brick); }
.board-rows__state { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--weight-strong); }
.board-terms__rule { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.board-terms__last { font-weight: var(--weight-strong); }
/* A board's seats as bars along the years (Fuller pages "2 · A board or committee"): who, the
   term's bar on the year track with today's ink line through every row, then the terms in words.
   The bar's place is a part of the track (SVG units), so nothing is styled inline. */
.term-bars { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) max-content max-content; column-gap: 16px; padding: 12px 16px 16px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.term-bars__head, .term-bars__rows, .term-bars__row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
.term-bars__head { padding-block-end: 6px; color: var(--ink-2); font-size: var(--text-sm); }
.term-bars__years { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; margin: 0; padding: 0; list-style: none; }
/* Each year has a class, so the plain-markup rule that spaces a list's items leaves the years in
   one line (design review BRD-13). */
.term-bars__year { margin: 0; border-inline-start: 1px solid var(--hairline); padding-inline-start: 4px; }
.term-bars__rows { margin: 0; padding: 0; list-style: none; }
.term-bars__row { min-block-size: 48px; padding-block: 8px; border-block-start: 1px solid var(--hairline); }
.term-bars__who, .term-bars__terms { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.25; }
.term-bars__name { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.term-bars__role, .term-bars__ends { color: var(--ink-2); font-size: var(--text-sm); }
.term-bars__track { display: block; inline-size: 100%; block-size: 24px; overflow: visible; }
.term-bars__bar { fill: var(--sb-place-fill); stroke: var(--sb-place-edge); stroke-width: 1; vector-effect: non-scaling-stroke; }
.term-bars__bar--last { fill: var(--sb-due-fill); fill-opacity: .55; stroke: var(--sb-due-edge); }
.term-bars__bar--honey { fill-opacity: 1; }
.term-bars__today { stroke: var(--sb-peg-ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.term-bars__row.is-honey .term-bars__count { color: var(--amber); font-weight: var(--weight-strong); }
.term-bars__end { margin: 0; }
@media (max-width: 40em) {
  .term-bars { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .term-bars__head > :first-child, .term-bars__head > :last-child { display: none; }
  .term-bars__row { row-gap: 6px; }
}
html[data-text-size="large"] .term-bars { grid-template-columns: minmax(0, 1fr); }
html[data-text-size="large"] .term-bars__head > :first-child, html[data-text-size="large"] .term-bars__head > :last-child { display: none; }
/* A decision's outcome, a stamp in ink: never colour alone, the word is there. */
.board-stamp { flex: none; padding: 2px 10px; border: 1.5px solid currentColor; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.board-stamp--adopted { color: var(--moss); }
.board-stamp--rejected { color: var(--brick); }
.board-stamp--deferred { color: var(--ink-2); }
/* A meeting's minutes as what they are on the wall: an outline on a peg until filed. */
.meeting-minutes { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 16px 18px; text-align: center; }
.meeting-minutes .board-h { margin: 0; }
.meeting-minutes__hang { display: flex; flex-direction: column; align-items: center; }
.meeting-minutes__hang > .peg { position: relative; z-index: 1; margin-block-end: -5px; }
.meeting-minutes__hang .paper--lg { inline-size: 66px; block-size: 84px; }
.meeting-minutes__state { margin: 0; font-weight: var(--weight-strong); }
.meeting-minutes__state.ink--missing, .meeting-minutes__state.ink--lapsed { color: var(--brick); }
.meeting-minutes__text { margin: 0; font-size: var(--text-sm); }
.meeting-minutes form, .meeting-minutes .actions { align-self: stretch; justify-content: center; text-align: start; }
.meeting-minutes .form-field input[type="file"] { font-size: var(--text-sm); }
/* Signing (Sign in and signing, "Read and sign", "Signed", "Who has signed"; Complete pages
   "To sign"; Last pages "Signature requests"): a form waiting for you hangs as its own dashed
   outline; read, agree and sign are three steps on one page; the signed form swings onto its
   peg (600 ms; it simply appears with reduced motion). The check of who signs is unchanged. */
.sign-waiting { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sign-waiting__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 2px dashed var(--sb-missing-edge); border-radius: var(--radius-sm); background: var(--sb-empty); }
.sign-waiting__row > .paper { justify-self: center; }
.sign-waiting__words { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.3; }
.sign-waiting__title { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.sign-waiting__meta { font-size: var(--text-sm); }
@media (max-width: 40em) {
  .sign-waiting__row { grid-template-columns: 44px minmax(0, 1fr); }
  .sign-waiting__row > .button { grid-column: 1 / -1; justify-content: center; }
}
.sign-page { max-inline-size: 46rem; }
.sign-fills { display: flex; align-items: center; gap: 12px; margin: 0; font-size: var(--text-sm); }
.sign-fills__words { display: flex; flex-direction: column; line-height: 1.3; }
.sign-fills__lead { font-weight: var(--weight-strong); }
.sign-steps { display: flex; flex-direction: column; gap: 16px; }
.sign-step { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.sign-step__h { margin: 0; font-family: var(--font-serif); font-size: var(--text-date-sm); font-weight: var(--weight-serif); line-height: 1.1; }
.sign-step__note { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.sign-step__statement { margin: 0; max-inline-size: var(--measure); }
@media (max-width: 40em) {
  .sign-step { padding: 14px; }
  .sign-step .actions > .button { flex: 1 1 100%; justify-content: center; }
}
.sign-done__hang { display: flex; flex-direction: column; align-items: center; }
.sign-done__hang > .peg { position: relative; z-index: 1; margin-block-end: -6px; }
@media (prefers-reduced-motion: no-preference) {
  .sign-done__hang > .paper { transform-origin: 50% 0; animation: sign-swing var(--sb-beat-swing) var(--ease); }
}
@keyframes sign-swing {
  0% { transform: rotate(calc(-14deg * var(--sb-dir))); opacity: 0; }
  60% { transform: rotate(calc(4deg * var(--sb-dir))); opacity: 1; }
  100% { transform: rotate(0deg); }
}
.sign-count { display: flex; align-items: center; gap: 14px; }
.sign-count__n { margin: 0; font-family: var(--font-serif); font-size: var(--text-count); line-height: 0.9; letter-spacing: -0.02em; }
.sign-count__words { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.sign-count__of { font-weight: var(--weight-strong); }
.sign-about { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); font-size: var(--text-sm); }
.sign-about p { margin: 0; }
/* The printed briefing (Printed briefing, both pages; README 14): two fixed pages, one sheet
   printed on both sides. On screen each page is a white sheet; printed, each fills its page with
   the design's inner padding, 12 pt and up, colours exact, Letter by default and fitting A4 (the
   page box is the paper's: 10.9 in tall fits both). The states keep their order in black and
   white: honey lightest, sage mid, terracotta darkest, missing dashed. */
.print-brief { display: flex; flex-direction: column; gap: var(--space-5); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-brief__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.print-brief__bar p { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.print-brief__page { display: flex; flex-direction: column; gap: 18px; inline-size: 100%; max-inline-size: 8.27in; margin-inline: auto; padding: 0.6in 0.7in 0.5in; border: 1px solid var(--sb-card-border); background: var(--card); color: var(--ink); font-size: var(--text-paper); line-height: 1.45; }
.print-brief__page p { margin: 0; }
.print-brief__mast { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block-end: 10px; border-block-end: 1px solid var(--sb-card-border); line-height: 1.25; }
.print-brief__mast--two { justify-content: space-between; color: var(--ink-2); }
.print-brief__mark { display: grid; flex: none; place-items: center; inline-size: 28px; block-size: 28px; border-radius: var(--radius-sm); background: var(--sb-org-badge); color: var(--sb-org-badge-ink); font-weight: 700; }
.print-brief__org { font-weight: var(--weight-strong); }
.print-brief__when { margin-inline-start: auto; color: var(--ink-2); }
.print-brief__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-display); font-weight: var(--weight-serif); line-height: 1; letter-spacing: -0.01em; }
.print-brief__wall { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.print-brief__count { display: flex; align-items: center; gap: 14px; }
.print-brief__n { font-family: var(--font-serif); font-size: var(--text-count); line-height: 0.85; letter-spacing: -0.02em; }
.print-brief__say { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.print-brief__strong { font-weight: var(--weight-strong); }
.print-brief__quiet, .ack-table__quiet { color: var(--ink-2); }
.print-brief__shelves { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.print-brief__shelf { display: flex; justify-content: space-between; gap: 12px; line-height: 1.2; }
.print-brief__tiles { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 5px; }
.print-brief__area { display: inline-flex; gap: 2px; }
.print-brief__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 10px 0 0; border-block-start: 1px solid var(--sb-card-border); list-style: none; }
.print-brief__legend li { display: flex; align-items: center; gap: 6px; }
.print-brief__h { margin: 0 0 10px; font-family: var(--font-serif); font-size: var(--text-xl); font-weight: var(--weight-serif); line-height: 1.1; }
.print-brief__h--sm { font-size: var(--text-date-sm); }
.print-brief__two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.print-brief__foot { display: flex; justify-content: space-between; gap: 16px; margin-block-start: auto; padding-block-start: 10px; border-block-start: 1px solid var(--sb-card-border); color: var(--ink-2); line-height: 1.3; }
.print-brief__foot > span:last-child { flex: none; }
.print-brief .coi__pegs { grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); }
.ack-table { inline-size: 100%; border-collapse: collapse; }
.ack-table th { padding-block: 4px; border-block-end: 2px solid var(--ink); font-weight: var(--weight-strong); text-align: start; }
.ack-table td { block-size: 34px; padding-block: 0 5px; padding-inline-end: 12px; border-block-end: 1px solid var(--control-border); vertical-align: bottom; }
.ack-table th:first-child, .ack-table td:first-child { inline-size: 170px; }
.ack-table th:last-child, .ack-table td:last-child { inline-size: 96px; }
@media (max-width: 40em) {
  .print-brief__page { padding: 20px 16px; }
  .print-brief__two { grid-template-columns: minmax(0, 1fr); }
  .ack-table th:first-child, .ack-table td:first-child { inline-size: auto; }
}
@page briefing { margin: 0; }
@media print {
  .print-brief { gap: 0; }
  .print-brief__page { page: briefing; box-sizing: border-box; block-size: 10.9in; max-inline-size: none; margin: 0; overflow: hidden; border: 0; font-size: 12pt; break-after: page; break-inside: avoid; }
  .print-brief__page:last-child { break-after: auto; }
  .print-brief__title { font-size: 30pt; }
  .print-brief__h { font-size: 19.5pt; }
  .print-brief__h--sm { font-size: 16.5pt; }
  .print-brief__n { font-size: 39pt; }
  .print-brief .serious__title { font-size: 13.5pt; }
  .print-brief .coi__name, .print-brief .coi__note, .print-brief .briefing__row-day, .print-brief .coi__count { font-size: 12pt; }
  .print-brief .briefing__rows > li { min-block-size: 34px; font-size: 12pt; }
  .print-brief .briefing__know > li { padding: 12px 16px; }
}
/* A circle and Names at circles (Last pages 8 and 9): what came on the start side, Record and
   Names on the end side; a circle's names are seen only by its facilitator (D-080). */
.circle-grid { display: grid; gap: 18px; align-items: start; }
.circle-grid > * { min-inline-size: 0; }
@media (min-width: 52em) { .circle-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
html[data-text-size="large"] .circle-grid { grid-template-columns: minmax(0, 1fr); }
.circle-rules { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-inline-start: 20px; list-style: disc; font-size: var(--text-sm); }
/* Round 3 (R2): Who has signed, the ones not signed yet. */
.sign-waiting { margin-block: var(--space-4); }
.sign-waiting .board-rows__row form { margin: 0; }
/* <<< S9 board and signing: END */
/* ··· after S9, line 1 of 4: leave as it is ··· */
/* ··· after S9, line 2 of 4: leave as it is ··· */
/* ··· after S9, line 3 of 4: leave as it is ··· */
/* ··· after S9, line 4 of 4: leave as it is ··· */
/* >>> F1 first run: BEGIN (only stage F1 writes below this line) */
/* The first run (First run file, D-093): the dark set-up bar, Paint the wall, File what you
   have, Today while setting up, Check a paper, and the outlines taken off in Documents. */
.setup-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-block-end: var(--space-5); padding-block: 12px; padding-inline: 20px;
  border-radius: var(--radius-sm); background: var(--shell); color: var(--on-shell-2);
  font-size: var(--text-sm);
}
.setup-bar__org { display: inline-flex; align-items: center; gap: 12px; color: var(--on-shell); font-weight: var(--weight-strong); }
.setup-bar__mark {
  display: inline-grid; place-items: center; inline-size: 32px; block-size: 32px; flex: none;
  border-radius: var(--radius-sm); background: var(--sb-org-badge); color: var(--sb-org-badge-ink);
}
.setup-bar__steps { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; margin-inline-start: auto; padding: 0; list-style: none; }
.setup-bar__step { display: inline-flex; align-items: center; gap: 8px; }
.setup-bar__step--now { color: var(--on-shell); font-weight: var(--weight-strong); }
.setup-bar__n {
  display: inline-grid; place-items: center; inline-size: 26px; block-size: 26px; box-sizing: border-box;
  border: 1.5px solid currentColor; border-radius: var(--radius-round);
}
.setup-bar__step--now .setup-bar__n { border-color: var(--on-shell); background: var(--on-shell); color: var(--shell); }
.setup-bar__n .icon { inline-size: 14px; block-size: 14px; }

.paint__grid, .filewhat__grid { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 60em) {
  .paint__grid { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 40px; }
  .filewhat__grid { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 40px; }
}
html[data-text-size="large"] .paint__grid, html[data-text-size="large"] .filewhat__grid { grid-template-columns: minmax(0, 1fr); }
.paint__ask, .filewhat__work { display: flex; flex-direction: column; gap: 12px; min-inline-size: 0; }
.paint__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-setup); font-weight: var(--weight-serif); line-height: 1.05; }
.paint__lede { margin: 0; font-size: var(--text-lede); max-inline-size: var(--measure); }
/* Welcome's other steps (who, where, who else) under the same set-up bar and title (X5). */
.welcome-step { display: flex; flex-direction: column; gap: 12px; max-inline-size: 560px; }
.welcome-step__count { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.welcome-step > .stack { margin-block-start: 8px; }
.paint__q { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.paint__h { margin: 0; padding: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.paint__where {
  display: flex; align-items: center; gap: 12px; min-block-size: 56px; padding-block: 8px; padding-inline: 16px;
  border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card);
}
.paint__place { display: flex; flex-direction: column; min-inline-size: 0; }
.paint__place-name { font-weight: var(--weight-strong); }
.paint__place-from { font-size: var(--text-sm); color: var(--ink-2); }
.paint__change { margin-inline-start: auto; display: inline-flex; align-items: center; min-block-size: var(--target); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.paint__ticks { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.paint__tick {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-block-size: 52px; padding-block: 6px; padding-inline: 16px; box-sizing: border-box;
  border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); cursor: pointer;
}
.paint__tick:has(.paint__box:checked) { border-color: var(--ink); }
.paint__tick:has(.paint__box:focus-visible) { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.paint__box { inline-size: 22px; block-size: 22px; margin: 0; accent-color: var(--ink); }
.paint__add { font-size: var(--text-sm); color: var(--ink-2); }
.paint__note { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.paint__redraw { align-self: start; }
.paint__bar {
  position: sticky; inset-block-end: 0; z-index: var(--z-sticky);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  min-block-size: 76px; margin-block-start: var(--space-5); padding-block: 14px; padding-inline: 20px; box-sizing: border-box;
  border-block-start: 1px solid var(--hairline); background: var(--sb-card);
}
.paint__later { font-size: var(--text-sm); color: var(--ink-2); }
.paint__more, .paint__next { margin-inline-start: auto; }
.paint__more { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.paint__bar form { display: inline-flex; margin: 0; }
/* Where the tab bar shows (below 64em), the sticky bar sits on top of it,
   never behind it, and keeps only its main button; the note, Back and Skip follow the form in
   `.paint__below` (design review WEL-3). The offset is the tab bar's own height (.app-main). */
.paint__below { display: none; }
@media (max-width: 63.99em) {
  .paint__bar { inset-block-end: calc(56px + 3px + max(28px, env(safe-area-inset-bottom))); }
  .paint__bar > .paint__later, .paint__bar > .paint__more { display: none; }
  .paint__below { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-block: 12px; padding-inline: 16px; }
  .paint__below .paint__more { margin-inline-start: 0; }
}
@media (max-width: 18em) {
  .paint__bar { inset-block-end: 0; } /* very large text: the tab bar is hidden */
}

.paint-wall { display: flex; flex-direction: column; gap: 12px; padding-block: 16px; padding-inline: 18px; min-inline-size: 0; }
.paint-wall__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.paint-wall__label { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.paint-wall__total { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.paint-wall__n { font-family: var(--font-serif); font-size: var(--text-2xl); line-height: 1; }
.paint-wall__unit, .paint-wall__shelf-n { font-size: var(--text-sm); color: var(--ink-2); }
.paint-wall__shelf { display: flex; flex-direction: column; gap: 8px; }
.paint-wall__shelf-head { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-sm); }
.paint-wall__shelf-name { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.paint-wall__areas { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.paint-wall__area {
  display: flex; flex-direction: column; gap: 4px; padding-block: 6px; padding-inline: 9px;
  border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-area-card);
}
.paint-wall__name { font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.2; }
.paint-wall__tiles { display: flex; flex-wrap: wrap; gap: 2px; }
.paint-wall__key { display: flex; align-items: center; gap: 10px; margin: 0; margin-block-start: auto; font-size: var(--text-sm); }
.paint-wall__none { margin: 0; color: var(--ink-2); }
.tile--ringed { box-shadow: 0 0 0 1.5px var(--sb-peg-ink); }
.tile--just-filed { transition: background-color var(--sb-beat-mark) var(--ease), border-color var(--sb-beat-mark) var(--ease); }
@media (prefers-reduced-motion: reduce) { .tile--just-filed { transition: none; } }

.filewhat__drop {
  display: flex; flex-direction: column; align-items: start; gap: 12px; padding: 20px;
  border: 2px dashed var(--sb-unchecked-edge); border-radius: var(--radius-sm); background: var(--paper-2); /* WEL-18: 3.6:1 on paper-2 */
}
.filewhat__drop.is-over { border-color: var(--ink); }
.filewhat__drop-say, .filewhat__read { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.filewhat__pickers { display: flex; flex-wrap: wrap; gap: 10px; }
.filewhat__picker { position: relative; display: inline-flex; }
.filewhat__input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; opacity: 0; cursor: pointer; }
.filewhat__picker:has(.filewhat__input:focus-visible) .button { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.filewhat__group { display: flex; flex-direction: column; gap: 8px; }
.filewhat__group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.filewhat__h { font-family: var(--font-sans); margin: 0; font-size: var(--text-md); font-weight: var(--weight-strong); }
.filewhat__n { font-weight: var(--weight-strong); }
.filewhat__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.filewhat__item { display: flex; align-items: center; gap: 12px; padding-block: 9px; padding-inline: 14px; }
.filewhat__item + .filewhat__item { border-block-start: 1px solid var(--hairline); }
.filewhat__item > .button { margin-inline-start: auto; }
.filewhat__tick { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; }
.filewhat__tick input { inline-size: 20px; block-size: 20px; margin: 0; margin-block-start: 2px; accent-color: var(--ink); }
.filewhat__text { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.3; overflow-wrap: anywhere; }
.filewhat__title { font-weight: var(--weight-strong); }
.filewhat__meta { font-size: var(--text-sm); color: var(--ink-2); }
.filewhat__skipped { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.filewhat__said { font-weight: var(--weight-strong); }

.strip__head--setup { flex-wrap: wrap; }
.strip__count--check { color: var(--ink); }
.strip__of { display: block; font-size: var(--text-sm); color: var(--ink-2); font-weight: var(--weight-regular); }
.strip__whole { margin-inline-start: auto; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.strip__words--check { color: var(--ink-2); }
.set-up-done { display: flex; align-items: center; gap: 12px; margin-block: var(--space-4); font-size: var(--text-md); font-weight: var(--weight-strong); }

.next-check { display: flex; flex-direction: column; gap: 12px; margin-block-end: var(--space-5); }
.next-check__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.next-check__title { margin: 0; font-family: var(--font-serif); font-size: 1.412rem; font-weight: var(--weight-serif); line-height: 1.1; }
.next-check__note { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.next-check__cards { display: grid; gap: 12px; margin: 0; padding-block: 18px 14px; padding-inline: 14px; list-style: none; }
@media (min-width: 52em) { .next-check__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
html[data-text-size="large"] .next-check__cards { grid-template-columns: minmax(0, 1fr); }
.next-check__card {
  position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-block-size: 64px; padding-block: 8px; padding-inline: 12px 8px; box-sizing: border-box;
  border: 2px dotted var(--sb-unchecked-edge); border-radius: var(--radius-sm); background: var(--sb-empty);
}
.next-check__card > .peg { position: absolute; inset-block-start: -7px; inset-inline-start: calc(50% - 5px); }
.next-check__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.next-check__name { font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; }
.next-check__meta { font-size: var(--text-sm); line-height: 1.25; color: var(--ink-2); }
.next-check__go { min-inline-size: 72px; }
.next-check__more { margin: 0; font-size: var(--text-sm); }

.share-work, .looks-key {
  display: flex; flex-direction: column; gap: 10px; margin-block-end: 12px; padding-block: 14px; padding-inline: 16px;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card);
}
.share-work__title, .looks-key__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-paper); font-weight: var(--weight-strong); }
.share-work__note { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.share-work__people { margin: 0; padding: 0; list-style: none; }
.share-work__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0; padding-block: 8px; border-block-start: 1px solid var(--hairline); }
.share-work__who { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; line-height: 1.25; }
.share-work__name { font-size: var(--text-sm); font-weight: var(--weight-strong); }
.share-work__area { font-size: var(--text-sm); color: var(--ink-2); }
.share-work__invite { display: inline-flex; align-items: center; min-block-size: var(--target); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.looks-key__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.looks-key__list li { display: flex; align-items: center; gap: 10px; }

.check { display: flex; flex-direction: column; gap: 16px; }
.check-page .check { max-inline-size: var(--panel); }
.check__scroll { display: flex; flex-direction: column; gap: 16px; }
.check__paper {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: center; padding-block: 12px; padding-inline: 14px;
  border: 2px dotted var(--sb-unchecked-edge); border-radius: var(--radius-sm); background: var(--sb-area-card);
}
.check__paper-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.check__title { font-size: var(--text-md); font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; }
.check__where, .check__why, .check__then, .check__count { font-size: var(--text-sm); color: var(--ink-2); }
.check__why p, .check__then, .check__count { margin: 0; }
.check__why { display: flex; flex-direction: column; gap: 6px; }
.check__label { font-weight: var(--weight-strong); }
.check__answers { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.check__ask { margin-block-end: 4px; padding: 0; font-size: var(--text-md); font-weight: var(--weight-strong); }
.check__answer { display: flex; flex-direction: column; gap: 8px; }
.check__choice {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: center;
  min-block-size: 52px; padding-block: 6px; padding-inline: 16px; box-sizing: border-box;
  border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--paper); cursor: pointer;
}
.check__choice:has(input:checked) { border: 2px solid var(--ink); padding-inline: 15px; }
.check__choice:has(input:focus-visible) { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.check__choice input, .check__option input { inline-size: 20px; block-size: 20px; margin: 0; accent-color: var(--ink); }
.check__more { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius-sm); background: var(--sb-area-card); font-size: var(--text-sm); }
.check__more p { margin: 0; }
.check__answers:has(input[name="answer"]:checked) .check__answer:not(:has(input[name="answer"]:checked)) .check__more,
.check__answers:not(:has(input[name="answer"]:checked)) .check__more { display: none; }
.check__more[data-for="have"] { align-items: center; border: 2px dashed var(--control-border); text-align: center; }
.check__drop { font-weight: var(--weight-strong); }
.check__becomes { display: flex; align-items: center; gap: 10px; }
.check__becomes-word { font-weight: var(--weight-strong); }
.check__pick { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.check__sub { margin-block-end: 4px; padding: 0; font-weight: var(--weight-strong); }
.check__option {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; min-block-size: var(--target);
  padding-inline: 12px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--paper); cursor: pointer;
}
.check__words-label { font-size: var(--text-sm); }
.check__foot { display: flex; flex-direction: column; gap: 8px; padding-block-start: 12px; border-block-start: 1px solid var(--hairline); }
.check__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.check-panel .check { min-block-size: 100%; }
.check-panel .check__foot { position: sticky; inset-block-end: -22px; margin-block-start: auto; padding-block-end: 16px; background: var(--card); }

.taken-off { display: flex; flex-direction: column; gap: 10px; margin-block-start: var(--space-6); }
.taken-off h2 { margin: 0; }
.taken-off__note { margin: 0; color: var(--ink-2); }
.taken-off__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.taken-off__item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 10px; padding-inline: 14px; }
.taken-off__item + .taken-off__item { border-block-start: 1px solid var(--hairline); }
.taken-off__item form { margin: 0; }
.taken-off__text { display: flex; flex-direction: column; min-inline-size: 0; }
.taken-off__title { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.taken-off__meta, .taken-off__why { font-size: var(--text-sm); color: var(--ink-2); }
@media (max-width: 40em) {
  .taken-off__item, .next-check__card { grid-template-columns: 22px minmax(0, 1fr); }
  .taken-off__item form, .next-check__go { grid-column: 1 / -1; }
  .paint__bar { padding-inline: 16px; }
  .setup-bar__steps { margin-inline-start: 0; }
}
/* <<< F1 first run: END */
/* ··· after F1, line 1 of 4: leave as it is ··· */
/* ··· after F1, line 2 of 4: leave as it is ··· */
/* ··· after F1, line 3 of 4: leave as it is ··· */
/* ··· after F1, line 4 of 4: leave as it is ··· */
/* >>> F2 plans and payment: BEGIN (only stage F2 writes below this line) */
/* The strip above every page while money is owed (Payment states): amber while a trial ends or
   a payment is late, plain white under glass. Worded for the role by plans/strip.py. */
.pay-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-block-end: var(--space-4); padding: 12px 14px;
  border: 1.5px solid var(--sb-warn-border); border-radius: var(--radius-sm);
  background: var(--sb-warn-bg); color: var(--sb-warn-ink);
}
.pay-strip--glass, .pay-strip--trial0 { border-color: var(--ink); background: var(--card); color: var(--ink); }
.pay-strip__word {
  padding-block: 2px; padding-inline: 10px;
  border: 1.5px solid currentColor; border-radius: var(--radius-sm);
  background: var(--card); font-size: var(--text-sm); font-weight: var(--weight-strong); white-space: nowrap;
}
.pay-strip--trial .pay-strip__word, .pay-strip--late .pay-strip__word { color: var(--amber); border-color: var(--sb-warn-border); }
.pay-strip__text { flex: 1 1 240px; min-inline-size: 0; margin: 0; text-wrap: pretty; }
.pay-strip__action { white-space: nowrap; }

/* Under glass (and an ended trial): the server marks <main data-read-only>. The wall goes under
   a pane: its tiles lose most of their colour and a sheen crosses it. Reading never changes. */
[data-read-only] .wall { position: relative; }
[data-read-only] .wall .tile, [data-read-only] .wall .paper { filter: saturate(0.35); }
[data-read-only] .wall::after {
  content: "";
  position: absolute; inset: 0;
  border: 2px solid var(--ink); border-radius: var(--radius-sm);
  background: linear-gradient(
    115deg,
    color-mix(in srgb, var(--card) 10%, transparent) 0%,
    color-mix(in srgb, var(--card) 10%, transparent) 32%,
    color-mix(in srgb, var(--card) 70%, transparent) 44%,
    color-mix(in srgb, var(--card) 15%, transparent) 56%,
    color-mix(in srgb, var(--card) 10%, transparent) 100%
  );
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--card) 50%, transparent);
  pointer-events: none;
}
.glass-tag {
  position: absolute; z-index: 1; inset-block-start: -13px; inset-inline-end: 10px;
  padding-block: 2px; padding-inline: 10px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font-size: var(--text-sm); font-weight: var(--weight-strong);
}
/* Every control that would add or change something keeps its words and loses its colour; it is
   never hidden, and its edge stays solid. Submit buttons of forms that post (except to what keeps working), links
   into the filing panel or to a page that adds or edits, and anything marked data-writes. A
   control marked data-still-works keeps its colour. glass.js makes pressing one say why. */
[data-read-only] :is(
  form[method="post" i]:not([data-still-works], [action^="/me/"], [action^="/i18n/"], [action^="/export/"], [action^="/reports/"], [action^="/inbox/"], [action^="/billing/"], [action^="/accounts/"], [action^="/search/"])
    :is(button:not([type="button"], [type="reset"]), input[type="submit"]),
  a[data-file-panel], a[data-writes], button[data-writes], a[href$="/new/"], a[href*="/new/?"], a[href$="/add/"], a[href$="/edit/"], a[href*="/upload/"]
):not([data-still-works]) {
  border-color: var(--control-border);
  background: var(--sb-button-2);
  color: var(--ink-2);
  cursor: not-allowed;
}
[data-read-only] form[method="post" i]:not([data-still-works], [action^="/me/"], [action^="/i18n/"], [action^="/export/"], [action^="/reports/"], [action^="/inbox/"], [action^="/billing/"], [action^="/accounts/"], [action^="/search/"])
  .switch::before { border-color: var(--control-border); background: var(--card); }
[data-read-only] form[method="post" i]:not([data-still-works], [action^="/me/"], [action^="/i18n/"], [action^="/export/"], [action^="/reports/"], [action^="/inbox/"], [action^="/billing/"], [action^="/accounts/"], [action^="/search/"])
  .switch::after { background: var(--control-border); }
[data-read-only] :is(form, a, button) .icon { filter: none; }
.glass-why { margin-block: var(--space-2) 0; color: var(--ink); font-size: var(--text-sm); flex-basis: 100%; }
/* A paper's button under glass (Payment states, Today's papers): the server writes "Read only" in
   its place (ui/_read_only.html). Dashed in the control's border, no fill, ink-2: the design's
   lock. Dashed here is the glass's mark, not the offline state's. */
.glass-lock {
  display: inline-flex; align-items: center; min-block-size: 40px; padding-inline: 12px;
  border: 1px dashed var(--control-border); border-radius: var(--radius-sm); background: transparent;
  color: var(--ink-2); font-size: var(--text-sm); font-weight: var(--weight-strong); white-space: nowrap;
}

/* The subscription as a paper on Today: first on the director's and treasurer's Today. */
.sub-paper {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin-block: var(--space-4); padding: 12px 14px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-sm); background: var(--card);
}
.sub-paper__text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.sub-paper__title { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.sub-paper__title a { color: var(--ink); text-decoration: none; }
.sub-paper__title a:hover { text-decoration: underline; }
.sub-paper__line { margin: 0; font-size: var(--text-sm); }
.sub-paper__line.ink--due { color: var(--ink-2); }
.sub-paper__word { font-size: var(--text-sm); font-weight: var(--weight-strong); }
@media (max-width: 40em) {
  .sub-paper { grid-template-columns: auto minmax(0, 1fr); }
  .sub-paper > .button, .sub-paper__word { grid-column: 1 / -1; justify-self: start; }
}

/* The refusal page and the door. */
.ro-page, .door { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-block: var(--space-7); padding-inline: var(--space-4); text-align: center; }
.ro-page__mark { inline-size: 56px; block-size: 56px; color: var(--ink-2); }
.ro-page__title, .door__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: var(--text-display); line-height: 1.05; max-inline-size: 16ch; text-wrap: balance; }
.ro-page__text, .door__text { margin: 0; max-inline-size: 46ch; font-size: var(--text-lede); line-height: 1.4; text-wrap: pretty; }
.ro-page__actions, .door__actions { justify-content: center; }
.door { gap: 16px; border-radius: var(--radius-sm); background: var(--sb-wall-dots), var(--sb-wall); background-size: 18px 18px, auto; }
.door__leaf {
  position: relative; display: block; inline-size: 96px; block-size: 132px;
  border: 3px solid var(--sb-peg-ink); border-block-end: 0; border-start-start-radius: 4px; border-start-end-radius: 4px;
  background: var(--sb-card);
}
.door__panel { position: absolute; inset-inline: 10px; block-size: 44px; border: 1.5px solid var(--sb-peg-ink); }
.door__panel:first-child { inset-block-start: 10px; }
.door__panel + .door__panel { inset-block-end: 10px; }
.door__knob { position: absolute; inset-block-start: 62px; inset-inline-end: 12px; inline-size: 10px; block-size: 10px; border-radius: var(--radius-round); background: var(--sb-peg-ink); }
.door__foot { margin: 0; max-inline-size: 50ch; color: var(--ink-2); font-size: var(--text-sm); text-wrap: pretty; }

/* The pay pages: the work, then a margin with the plan and the copy. */
.bill { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 20px; align-items: start; margin-block-start: var(--space-5); }
@media (max-width: 60em) { .bill { grid-template-columns: minmax(0, 1fr); } }
.bill__work, .bill__margin { min-inline-size: 0; }
.bill h2 { margin: 0; font-size: var(--text-lg); }
.bill-invoice { display: flex; flex-direction: column; gap: var(--space-3); }
.bill-invoice__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin: 0; }
.bill-invoice__number { margin: 0; font-family: var(--font-serif); font-size: var(--text-date); font-weight: 500; }
.bill-invoice__state { font-weight: var(--weight-strong); }
.bill-lines__total { font-family: var(--font-serif); font-size: var(--text-date); }
.bill-pay { display: flex; flex-direction: column; gap: var(--space-2); }
.bill-pay__title { margin: 0; font-size: var(--text-md); }
.bill-pay__note { margin: 0; white-space: pre-line; }

/* "Your plan": the plan and the add-ons that are on, added up. */
.your-plan { display: flex; flex-direction: column; gap: 10px; border: 1.5px solid var(--ink); }
.your-plan__label { margin: 0; font-family: var(--font-sans); color: var(--ink-2); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.your-plan__name { margin: 0; font-family: var(--font-serif); font-size: var(--text-title); line-height: 1; }
.your-plan__lines { display: flex; flex-direction: column; margin: 0; font-size: var(--text-sm); }
.your-plan__line { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; border-block-start: 1px solid var(--hairline); }
.your-plan__line dt, .your-plan__line dd { margin: 0; }
.your-plan__line dd { white-space: nowrap; }
.your-plan__total { align-items: baseline; padding-block-start: 8px; border-block-start: 2px solid var(--ink); font-weight: var(--weight-strong); }
.your-plan__total dd { font-family: var(--font-serif); font-size: var(--text-date); font-weight: 400; }
.your-plan > .text-quiet { margin: 0; font-size: var(--text-sm); }

/* Settings → Areas of work: groups of areas, each with its price or "In your plan" and its switch,
   then a margin with what was just switched, "Your plan" and what switching does. */
.work-areas { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 20px; align-items: start; margin-block-start: var(--space-4); }
@media (max-width: 60em) { .work-areas { grid-template-columns: minmax(0, 1fr); } }
.work-areas__main, .work-areas__margin { display: flex; flex-direction: column; gap: 14px; min-inline-size: 0; }
.work-areas__group { display: flex; flex-direction: column; gap: 6px; }
.work-areas__group h2 { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.area-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--card); }
.area-list .area { padding-block: 9px; padding-inline: 14px; gap: 4px 14px; }
.area__price { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--ink); }
.area__price--included { color: var(--moss); }
.area--off .area__price, .area--off .area__name { color: var(--ink-2); }
.area__always { color: var(--ink-2); font-size: var(--text-sm); white-space: nowrap; }
.area__needs { margin: 0; color: var(--ink-2); font-size: var(--text-sm); }
.areas-said { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--sb-warn-border); border-radius: var(--radius-sm); background: var(--sb-warn-bg); color: var(--sb-warn-ink); }
.areas-said[hidden] { display: none; }
.areas-said__title, .areas-said__text { margin: 0; }
.areas-said__title { font-weight: var(--weight-strong); }
.areas-said form { margin: 0; }
.areas-said .link { min-block-size: var(--target); font-weight: var(--weight-strong); }
.areas-count { display: flex; flex-direction: column; gap: 10px; }
.areas-count__n { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.areas-count__n .score__number { font-family: var(--font-serif); font-size: var(--text-display); line-height: 0.9; }
.areas-count h2 { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.areas-count ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-inline-start: 18px; list-style: disc; }

/* "Area switched off" (an old link) and "Not available": a rail with no papers, the words, the way on. */
.area-off, .not-available { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-block: var(--space-7); padding-inline: var(--space-4); text-align: center; }
.not-available { max-inline-size: 440px; margin-inline: auto; padding-block: 40px; padding-inline: 32px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--card); }
.area-off__mark { inline-size: 56px; block-size: 56px; color: var(--ink-2); }
.not-available__mark { inline-size: 120px; block-size: 44px; color: var(--control-border); }
.area-off__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: var(--text-display); line-height: 1.05; }
.not-available__title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: var(--text-title); line-height: 1.1; }
.area-off__text { margin: 0; max-inline-size: 48ch; font-size: var(--text-lede); line-height: 1.45; text-wrap: pretty; }
.not-available__text { margin: 0; text-wrap: pretty; }
.area-off__actions, .not-available .actions { justify-content: center; }
.area-off__settings { display: inline-flex; align-items: center; min-block-size: var(--target); }
/* Under glass, under the wall: the next Must-have reminder still goes out (round 3). */
.glass-note { margin-block: var(--space-3) 0; color: var(--ink-2); font-size: var(--text-sm); }
/* <<< F2 plans and payment: END */
/* ··· after F2, line 1 of 4: leave as it is ··· */
/* ··· after F2, line 2 of 4: leave as it is ··· */
/* ··· after F2, line 3 of 4: leave as it is ··· */
/* ··· after F2, line 4 of 4: leave as it is ··· */
/* >>> F4 operator: BEGIN (only stage F4 writes below this line) */
/* R6 (round 3): the hall poster, here because F4's operator console has no CSS of its own. */
/* The hall poster (Hall poster, 11 × 17 in; D-092): one tabloid sheet, light whatever the
   theme (the sheet carries data-theme="light"), the sample wall drawn with the paper tiles at
   poster size. Sizes inside the sheet are em of its base, so the print rule sets one size. */
.hall-poster { display: flex; flex-direction: column; gap: var(--space-5); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hall-poster__bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.hall-poster__intro { display: flex; flex-direction: column; gap: var(--space-3); }
.hall-poster__h1 { margin: 0; font-family: var(--font-serif); font-size: var(--text-display); font-weight: var(--weight-serif); line-height: 1; }
.hall-poster__say { margin: 0; max-inline-size: var(--measure); color: var(--ink-2); }
.hall-poster__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.hall-poster__sheet {
  box-sizing: border-box; display: flex; flex-direction: column; gap: 1.2em;
  inline-size: 100%; max-inline-size: 11in; margin-inline: auto; padding: 0.6in 0.7in 0.45in;
  border: 1px solid var(--sb-card-border); background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--text-lg); line-height: 1.4;
}
.hall-poster__sheet p, .hall-poster__sheet h2, .hall-poster__sheet h3, .hall-poster__sheet ul { margin: 0; }
.hall-poster__sheet ul { padding: 0; list-style: none; }
.hall-poster__head { display: flex; flex-direction: column; gap: 0.6em; }
.hall-poster__org { font-weight: var(--weight-strong); }
.hall-poster__title { font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: 2.55em; line-height: 1; letter-spacing: -0.015em; text-wrap: balance; }
.hall-poster__second { color: var(--ink-2); }
.hall-poster__second--title { font-family: var(--font-serif); font-style: italic; font-size: 1.64em; line-height: 1.15; }
.hall-poster__rule { block-size: 4px; margin-block-start: 0.3em; border-block: 3px solid var(--ink); border-block-end-width: 1px; box-sizing: border-box; }
.hall-poster__wall { display: flex; flex-direction: column; padding: 1.1em 1.8em 1.6em; border-radius: var(--radius-lg); background: var(--sb-wall-dots), var(--sb-wall); background-size: 18px 18px, auto; }
.hall-poster__rail { display: block; block-size: 4px; background: var(--ink); }
.hall-poster__pegs { display: flex; justify-content: space-between; padding-inline: 8px; }
.hall-poster__hang { position: relative; display: flex; flex-direction: column; align-items: center; }
.hall-poster__peg { position: relative; z-index: 1; inline-size: 16px; block-size: 16px; margin-block: 10px -8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--sb-wall); }
/* The string over the last three gaps: a curve from each peg to the next. */
.hall-poster__hang--string::after { content: ""; position: absolute; inset-block-start: 14px; inset-inline-start: 50%; inline-size: calc(100% + 2.6em); block-size: 18px; border-block-end: 2.5px solid var(--ink); border-radius: 0 0 50% 50%; }
.hall-poster__hang--string + .hall-poster__hang--string + .hall-poster__hang--string::after { content: none; }
.hall-poster__wall .paper, .hall-poster__state > .paper { inline-size: 2.9em; block-size: 3.7em; }
.hall-poster__section { display: flex; flex-direction: column; gap: 0.8em; }
.hall-poster__h { font-family: var(--font-serif); font-weight: var(--weight-serif); font-size: 2em; line-height: 1.05; }
.hall-poster__h-second { font-style: italic; font-size: 0.68em; color: var(--ink-2); }
.hall-poster__states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9em 1.1em; }
.hall-poster__state { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 0.8em; align-items: start; }
.hall-poster__state > .paper { inline-size: 2.4em; block-size: 3em; }
.hall-poster__words { display: flex; flex-direction: column; gap: 2px; text-wrap: pretty; }
.hall-poster__word { font-weight: 700; font-size: 1.18em; line-height: 1.15; }
.hall-poster__string { position: relative; display: block; inline-size: 2.4em; block-size: 3em; }
/* The legend's string as on the wall (design review SET-25): the sprite's string curve, its ends
   on the two pegs' centres (0.375em in, 0.725em down), so it hangs peg to peg, not as a face. */
.hall-poster__sag { position: absolute; inset-block-start: 0.598em; inset-inline-start: 0.312em; inline-size: 1.777em; block-size: 0.762em; overflow: visible; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.hall-poster__knot { position: absolute; z-index: 1; inset-block-start: 0.45em; inline-size: 0.55em; block-size: 0.55em; border-radius: 50%; background: var(--ink); }
.hall-poster__knot:first-child { inset-inline-start: 0.1em; }
.hall-poster__knot:last-child { inset-inline-end: 0.1em; }
.hall-poster__shelves { display: flex; flex-direction: column; border-block-start: 2px solid var(--ink); }
.hall-poster__shelf { display: grid; grid-template-columns: 13.6em minmax(0, 1fr); gap: 0.9em; align-items: baseline; padding-block: 0.55em; border-block-end: 1px solid var(--sb-card-border); }
.hall-poster__boxes { margin-block-start: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1em; }
.hall-poster__box { display: flex; flex-direction: column; gap: 0.35em; padding: 1em 1.1em; border: 2px solid var(--ink); border-radius: var(--radius-md); background: var(--card); text-wrap: pretty; }
.hall-poster__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9em; font-size: 0.9em; color: var(--ink-2); }
.hall-poster__logo { display: block; block-size: 1.8em; inline-size: auto; }
@media (max-width: 40em) {
  .hall-poster__sheet { padding: 20px 16px; font-size: var(--text-md); }
  .hall-poster__states, .hall-poster__boxes { grid-template-columns: minmax(0, 1fr); }
  .hall-poster__shelf { grid-template-columns: minmax(0, 1fr); }
  .hall-poster__wall { padding-inline: 8px; }
  .hall-poster__wall .paper { inline-size: 1.6em; block-size: 2em; }
}
@page tabloid { size: 11in 17in; margin: 0; }
@media print {
  /* The whole document on the tabloid page, so nothing before the sheet asks for a Letter one
     (a browser lays the pages out at the first page's size). */
  body:has(.hall-poster), .hall-poster { page: tabloid; }
  body:has(.hall-poster) .page { margin: 0; padding: 0; max-inline-size: none; }
  body:has(.hall-poster) .page > :not(.hall-poster) { display: none; }
  .hall-poster { gap: 0; }
  .hall-poster__bar { display: none; }
  .hall-poster__sheet { block-size: 17in; max-inline-size: none; margin: 0; border: 0; overflow: hidden; font-size: 16.5pt; break-inside: avoid; }
}
/* <<< F4 operator: END */
/* ··· after F4, line 1 of 4: leave as it is ··· */
/* ··· after F4, line 2 of 4: leave as it is ··· */
/* ··· after F4, line 3 of 4: leave as it is ··· */
/* ··· after F4, line 4 of 4: leave as it is ··· */
/* >>> F7 feedback: BEGIN (only stage F7 writes below this line) */
/* Feedback (Feedback file, screens 1 to 4; D-083 (2), D-092). Tell the center: the four kinds
   as cards, two by two; the chosen one up in ink. Safety takes the honey of the Safety mark. */
.tell-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.tell-kinds > div { display: flex; min-inline-size: 0; }
.tell-kind { position: relative; display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: 4px; min-block-size: 104px; padding: 12px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); cursor: pointer; }
.tell-kind input { position: absolute; inset-block-start: 0; inset-inline-start: 0; inline-size: 1px; block-size: 1px; margin: 0; opacity: 0; }
.tell-kind:has(input:checked) { padding: 11px; border: 2px solid var(--ink); background: var(--sb-card); }
.tell-kind:has(input:focus-visible) { outline: var(--focus-width) solid var(--brand); outline-offset: var(--focus-gap); }
.tell-kind__icon { inline-size: 26px; block-size: 26px; }
.tell-kind__label { font-weight: var(--weight-strong); }
.tell-kind__hint { font-size: var(--text-sm); line-height: 1.25; }
.tell-kind--safety { color: var(--amber); }
.tell-kind--safety .tell-kind__hint { color: var(--ink); }
.tell__form .form-field__check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.tell__send { justify-content: center; inline-size: 100%; min-block-size: 52px; }
/* A member's own notes and thanks, hung on the pegboard: open ones in hand (dashed, down),
   seen-to ones up as a card. */
.fb-board { display: flex; flex-direction: column; gap: 16px; margin: 0; padding-block: 18px 12px; padding-inline: 10px; list-style: none; border-radius: var(--radius-sm); background: var(--sb-wall-dots), var(--sb-wall); }
.fb-hung, .fb-thanks { position: relative; }
.fb-peg { position: absolute; inset-block-start: -7px; inset-inline-start: calc(50% - 5px); z-index: 1; inline-size: 10px; block-size: 10px; border-radius: var(--radius-round); background: var(--sb-peg-ink); box-shadow: 0 0 0 2px var(--sb-wall); }
.fb-note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; min-block-size: 60px; padding-block: 8px; padding-inline: 12px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); box-shadow: var(--sb-card-shadow); }
.fb-note--open { border: 2px dashed var(--ink); background: var(--sb-empty); box-shadow: none; }
.fb-note__icon { inline-size: 22px; block-size: 22px; }
.fb-note__words { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.fb-note__title { font-weight: var(--weight-strong); line-height: 1.25; overflow-wrap: anywhere; }
.fb-note__state { font-size: var(--text-sm); font-weight: var(--weight-strong); }
.fb-note__said { font-size: var(--text-sm); color: var(--ink-2); overflow-wrap: anywhere; }
/* Your hours: one block an hour, the newest in moss. */
.fb-hours { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.fb-hours__count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; font-family: var(--font-sans); font-size: var(--text-md); }
.fb-hours__n { font-family: var(--font-serif); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: 0.9; font-variant-numeric: lining-nums tabular-nums; }
.fb-hours__words { font-weight: var(--weight-strong); }
.fb-blocks { display: flex; flex-wrap: wrap; gap: 3px; }
.fb-block { inline-size: 16px; block-size: 18px; border: 1px solid var(--sb-place-edge); border-radius: var(--radius-sm); background: var(--sb-place-fill); }
.fb-block--new { background: var(--sb-place-edge); }
.fb-board--thanks { gap: 14px; }
.fb-thanks { display: flex; flex-direction: column; gap: 6px; padding-block: 18px 12px; padding-inline: 16px; border: 1px solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); box-shadow: var(--sb-card-shadow); transform: rotate(calc(-1deg * var(--sb-dir))); }
.fb-thanks:nth-child(even) { transform: rotate(calc(1deg * var(--sb-dir))); }
.fb-thanks__words { font-family: var(--font-serif); font-style: italic; font-size: var(--text-lede); line-height: 1.3; overflow-wrap: anywhere; }
.fb-thanks__from { font-size: var(--text-sm); color: var(--ink-2); }
.fb-took__state { font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--ink-2); }
.fb-took__state.ink--place { color: var(--moss); }
/* Notes from members, the manager's register on a laptop; one card a note on a phone. */
.fb-page { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
.fb-page__lede { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: var(--text-lede); color: var(--ink-2); }
.fb-page__note { max-inline-size: 72ch; margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.fb-register { inline-size: 100%; border-collapse: collapse; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.fb-register th { padding-block: 8px; padding-inline: 12px; border-block-end: 2px solid var(--ink); font-weight: var(--weight-strong); text-align: start; }
.fb-register td { padding-block: 10px; padding-inline: 12px; border-block-end: 1px solid var(--hairline); vertical-align: top; }
.fb-register__kind { font-weight: var(--weight-strong); white-space: nowrap; }
.fb-register__icon { inline-size: 18px; block-size: 18px; margin-inline-end: 8px; vertical-align: -3px; }
.fb-register__row--safety .fb-register__kind { color: var(--amber); }
.fb-register__what { min-inline-size: 0; overflow-wrap: anywhere; }
.fb-register__what > * { display: block; }
.fb-register__what > * + * { margin-block-start: 4px; }
.fb-register__next { font-size: var(--text-sm); color: var(--ink-2); }
.fb-register__since { color: var(--ink-2); white-space: nowrap; }
.fb-answer form { display: flex; flex-direction: column; gap: 8px; margin-block-start: 8px; }
.fb-answer textarea, .fb-answer select { inline-size: 100%; }
@media (max-width: 767px) {
  .fb-register, .fb-register tbody, .fb-register tr, .fb-register td { display: block; }
  .fb-register thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .fb-register__row { padding-block: 6px; border-block-end: 1px solid var(--hairline); }
  .fb-register td { padding-block: 4px; border: 0; }
}
.fb-seen { display: flex; flex-direction: column; gap: 8px; }
.fb-h { margin: 0; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
/* Each note's answer opens from a secondary button (Feedback file, "Notes from members"). */
details.fb-answer > summary {
  display: inline-flex; align-items: center; min-block-size: var(--target); padding-inline: 14px; box-sizing: border-box;
  border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--sb-button-2);
  color: var(--brand); font-size: var(--text-sm); font-weight: var(--weight-strong); text-decoration: none; list-style: none; cursor: pointer;
}
details.fb-answer > summary::-webkit-details-marker { display: none; }
details.fb-answer > summary::before { content: none; }
/* <<< F7 feedback: END */
/* ··· after F7, line 1 of 4: leave as it is ··· */
/* ··· after F7, line 2 of 4: leave as it is ··· */
/* ··· after F7, line 3 of 4: leave as it is ··· */
/* ··· after F7, line 4 of 4: leave as it is ··· */
/* >>> X1 pass: BEGIN (only stage X1 writes below this line) */
.me-head .avatar { background: var(--ink); color: var(--paper); font-weight: 700; } /* Sidebar, Me: the ink disc with cream initials */
/* Small section heads are sans 18/600 in every design (Me, Search, Tasks, the Inbox's notices,
   sign-in security, Subscription); these h2s took the serif from the base rule. */
:is(.notices__title, .found__title, .me-section__title, .tasks-group__title, .account-card__title, .account-page__heading),
.bill h2 { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-strong); }
/* "Adding to" in the filing panel (ShadowFilingPanel): the outline Add was pressed on, as a card. */
.file-step__for { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-block-end: 16px; font-size: var(--text-sm); text-align: start; }
.file-step__for p { margin: 0; }
.file-step__card { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 12px; padding-block: 12px; padding-inline: 14px; border: var(--border) solid var(--hairline); border-radius: var(--radius-sm); background: var(--paper); }
.file-step__card-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.file-step__card-text strong { font-size: var(--text-paper); line-height: 1.25; }
.title-row__lede { flex-basis: 100%; order: 4; margin: 0; max-inline-size: var(--measure); color: var(--ink-2); font-size: var(--text-md); } /* inside the title block, above the rule */
/* The amber box as a standing notice (Records, "One program"): a 6px start-side bar and an icon
   before the words. A message (Forms that go wrong) keeps the plain box. */
.amber-box--notice { position: relative; border-inline-start-width: 6px; padding-inline-start: 44px; }
.amber-box__icon { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; inline-size: 20px; block-size: 20px; color: var(--sb-warn-border); }
/* Two fields that belong together (dates from and until): side by side when they fit. It had
   no rule, so the second label sat on the first field. */
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); gap: var(--space-3); }
/* The outline card in the filing panel: the name 16/600, Critical on its own line under it. */
.outline-card__title { font-size: var(--text-paper); }
.outline-card__title .ink--lapsed { display: block; font-size: var(--text-sm); }
@container (max-width: 40em) { .comply__count { font-size: var(--text-count-phone-lg); } } /* Screens v2, Compliance · phone: serif 52 */
/* Compliance's rows (Screens v2): the name 16/600 in ink, underlined on hover; the first row's
   action is the page's main button. */
.serious__title { font-size: var(--text-paper); }
.serious__title a { color: var(--ink); text-decoration: none; }
.serious__title a:hover { text-decoration: underline; }
/* The map (Complete pages 9): column heads 15/600 in ink, sans; a card's name 15/600 in ink,
   underlined only on hover (Open is its link too). */
.map .map__heading { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.25; color: var(--ink); }
.map .map-node__title { font-size: var(--text-sm); line-height: 1.3; text-decoration: none; }
.map .map-node__title:hover { text-decoration: underline; }
/* A filed paper (Complete pages 8): the signals run under the title, the main button beside the
   title; the file on record hangs on a pegboard, everything centred under its peg. */
.title-row > .filed__signals { order: 3; flex-basis: 100%; }
.title-row:has(> .filed__signals) > .title-row__actions { order: 2; }
.split > .filed__record { align-items: center; padding: 16px; background: var(--sb-wall-dots), var(--sb-wall); text-align: center; }
.filed__record-title { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-strong); }
.filed__card { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.filed__card .doc-file { justify-content: center; }
.filed__card .doc-file__text { flex: 0 1 auto; align-items: center; }
.filed__card .facts { font-size: var(--text-sm); text-align: start; }
/* One document (Screens v2): the buttons and the (?) tag hang on the pegboard under the card;
   the details are one card of stacked label and value rows split by the light rule; the area
   sits on its own pegboard with this paper ringed. */
.doc__wall { display: flex; flex-direction: column; gap: 14px; }
.doc__side .facts { display: block; margin: 0; padding-block: 4px; padding-inline: 16px; border: var(--border) solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); font-size: var(--text-sm); line-height: 1.35; }
.doc__side .facts dt { padding-block-start: 9px; border-block-start: var(--border) solid var(--hairline); }
.doc__side .facts dt:first-of-type { border-block-start: 0; }
.doc__side .facts dd { margin: 0; padding-block: 1px 9px; font-weight: var(--weight-strong); }
.doc__area { padding-block: 12px 14px; padding-inline: 14px; border-radius: var(--radius-sm); font-size: var(--text-sm); }
.doc__area-name { font-weight: var(--weight-strong); }
/* A paper's state in a list: its md tile and its word in the state's ink, never a tinted pill. */
.paper-state { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-sm); font-weight: var(--weight-strong); }
/* <<< X1 pass: END */
/* ··· after X1, line 1 of 4: leave as it is ··· */
/* ··· after X1, line 2 of 4: leave as it is ··· */
/* ··· after X1, line 3 of 4: leave as it is ··· */
/* ··· after X1, line 4 of 4: leave as it is ··· */
/* ··· before R5, line 1 of 4: leave as it is ··· */
/* ··· before R5, line 2 of 4: leave as it is ··· */
/* ··· before R5, line 3 of 4: leave as it is ··· */
/* ··· before R5, line 4 of 4: leave as it is ··· */
/* >>> R5 education: BEGIN (only agent R5 writes below this line; D-099) */
/* Education (Feedback and Education 5 to 8): a child's safeguards file on a laptop, the
   guardian's pages, pickup and applying at phone width, one column, 16px margins. */
.edu-page { display: flex; flex-direction: column; gap: 18px; min-inline-size: 0; }
.edu-phone { max-inline-size: 34rem; }
.edu-org { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.edu-head { display: flex; flex-direction: column; gap: 8px; }
.edu-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-block-size: var(--target); margin-inline-start: -8px; padding-inline: 8px; font-weight: var(--weight-strong); text-decoration: none; }
.edu-back .icon { inline-size: 20px; block-size: 20px; }
.edu-head__title { margin: 0; font-family: var(--font-serif); font-size: var(--text-title); font-weight: var(--weight-serif); line-height: 1.05; overflow-wrap: anywhere; }
.edu-head__meta { margin: 0; color: var(--ink-2); }
.edu-head__rule { display: block; block-size: 3px; border-block: var(--border) solid var(--ink); }
.edu-h2 { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.edu-section { display: flex; flex-direction: column; gap: 10px; }
.edu-note { margin: 0; font-size: var(--text-sm); color: var(--ink-2); text-wrap: pretty; }
.edu-saved { margin: 0; font-weight: var(--weight-strong); color: var(--moss); }
.edu-rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: var(--border) solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.edu-row { display: flex; flex-direction: column; gap: 2px; min-block-size: 52px; justify-content: center; padding-block: 8px; padding-inline: 12px; }
.edu-row + .edu-row { border-block-start: var(--border) solid var(--hairline); }
.edu-row__name { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.edu-row__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--text-sm); color: var(--ink-2); }
.edu-row__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 6px; }
.edu-row__links { font-size: var(--text-sm); }
.edu-row__links a { display: inline-flex; align-items: center; min-block-size: var(--target); }
.edu-check { display: flex; align-items: center; gap: 10px; min-block-size: var(--target); }
.edu-check input { inline-size: 22px; block-size: 22px; flex: none; }
.edu-register { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
.edu-allergy { font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--brick); }
.edu-card { display: flex; flex-direction: column; gap: 6px; padding-block: 14px; padding-inline: 16px; border: var(--border) solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.edu-card p { margin: 0; }
.edu-card__title { margin: 0; font-size: var(--text-md); font-weight: var(--weight-strong); }
.edu-card__sub { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); }
.edu-card__line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
.edu-card__aside { font-size: var(--text-sm); color: var(--ink-2); }
.edu-card__from { font-size: var(--text-sm); color: var(--ink-2); }
.edu-card--allergy { border: 1.5px solid var(--brick); }
.edu-card--allergy .edu-card__title { color: var(--brick); }
.edu-quote { font-family: var(--font-serif); font-style: italic; font-size: var(--text-lede); line-height: 1.3; }
.edu-box { display: flex; flex-direction: column; gap: 10px; padding-block: 14px; padding-inline: 16px; border: var(--border) solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.edu-readings { display: grid; gap: 4px 16px; margin: 0; }
.edu-readings dt { font-weight: var(--weight-strong); }
.edu-readings dd { margin: 0; margin-block-end: 8px; color: var(--ink-2); }
/* Screen 5: the file's head, the access note, its own small wall, the two boxes. */
.edu-file__head { display: flex; flex-direction: column; gap: 6px; padding-block-end: 10px; border-block-end: 2px solid var(--ink); }
.edu-file__name { margin: 0; font-family: var(--font-serif); font-size: var(--text-title); font-weight: var(--weight-serif); line-height: 1; overflow-wrap: anywhere; }
.edu-file__meta { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.edu-access { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: var(--text-sm); }
.edu-access .icon { flex: none; inline-size: 20px; block-size: 20px; }
.edu-file__boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 14px; }
.edu-custody { margin: 0; padding-block: 10px; padding-inline: 12px; border-inline-start: 4px solid var(--amber); background: var(--sb-card); }
.edu-leave summary { min-block-size: var(--target); display: flex; align-items: center; font-weight: var(--weight-strong); cursor: pointer; }
.edu-leave form { display: flex; flex-direction: column; gap: 10px; }
.edu-leave p { margin: 0; }
/* Screen 6: the term as pegs on a string, filled when the child came. */
.edu-pegs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding-block-start: 6px; padding-inline: 0; list-style: none; background: linear-gradient(var(--sb-peg-ink), var(--sb-peg-ink)) 0 13px / 100% 2px no-repeat; }
.edu-pegs__day { display: flex; flex-direction: column; align-items: center; gap: 2px; min-inline-size: 2rem; }
.edu-peg { display: block; inline-size: 16px; block-size: 16px; box-sizing: border-box; border: 2px solid var(--sb-peg-ink); border-radius: var(--radius-round); background: var(--sb-peg-ink); }
.edu-peg--away { background: var(--sb-card); }
.edu-peg--ahead { border-style: dotted; background: var(--sb-card); }
.edu-pegs__label { font-size: var(--text-sm); color: var(--ink-2); }
.edu-keep { margin: 0; padding: 0; list-style: none; border: var(--border) solid var(--hairline); border-radius: var(--radius-sm); background: var(--sb-card); }
.edu-keep li + li { border-block-start: var(--border) solid var(--hairline); }
.edu-keep__row { display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 10px; align-items: center; min-block-size: 52px; padding-block: 6px; padding-inline: 12px; color: var(--ink); text-decoration: none; }
.edu-keep__row .icon { inline-size: 20px; block-size: 20px; color: var(--brand); }
.edu-keep__row:hover .edu-keep__name { text-decoration: underline; }
.edu-keep__words { display: flex; flex-direction: column; line-height: 1.3; min-inline-size: 0; }
.edu-keep__name { font-weight: var(--weight-strong); }
.edu-keep__hint { font-size: var(--text-sm); color: var(--ink-2); overflow-wrap: anywhere; }
/* Screen 7: who may collect, with a limit in honey, and the stop box in brick. */
.edu-pickups { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.edu-pickup { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding-block: 10px; padding-inline: 12px; border: var(--border) solid var(--sb-card-border); border-radius: var(--radius-sm); background: var(--sb-card); }
.edu-pickup--limit { border: 1.5px solid var(--sb-due-edge); }
.edu-pickup__initials { display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: var(--radius-round); background: var(--ink); color: var(--paper); font-weight: var(--weight-strong); }
.edu-pickup__words { display: flex; flex-direction: column; line-height: 1.3; min-inline-size: 0; }
.edu-pickup__name { font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.edu-pickup__rel { font-size: var(--text-sm); color: var(--ink-2); }
.edu-pickup__rel.ink--due { font-weight: var(--weight-strong); color: var(--amber); }
.edu-stop { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 2px solid var(--brick); border-radius: var(--radius-sm); background: var(--sb-card); }
.edu-stop p { margin: 0; }
.edu-stop__title { margin: 0; font-size: var(--text-md); font-weight: var(--weight-strong); color: var(--brick); }
.edu-stop__call { justify-content: center; min-block-size: 52px; }
/* <<< R5 education: END */
/* ··· after R5, line 1 of 4: leave as it is ··· */
/* ··· after R5, line 2 of 4: leave as it is ··· */
/* ··· after R5, line 3 of 4: leave as it is ··· */
/* ··· after R5, line 4 of 4: leave as it is ··· */

/* --- The conflict-of-interest questions (research 2026-11-13, Part 3.4; behind a setting) --- */
.sign-coi { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.sign-coi__family { margin: 0; font-weight: var(--weight-strong); }
.sign-coi__list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding-inline-start: 1.5em; }
.sign-coi__answer { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.sign-coi__text { padding: 0; margin-block-end: var(--space-1); }
.choices--row { flex-direction: row; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.choices--row .choice { min-block-size: var(--target); }
.sign-coi-answers { display: flex; flex-direction: column; gap: var(--space-1); }
.sign-coi-answers__title { margin: 0; font-weight: var(--weight-strong); }
.sign-coi-answers__list { display: grid; grid-template-columns: minmax(8em, auto) minmax(0, 1fr); gap: var(--space-1) var(--space-3); margin: 0; }
.sign-coi-answers__list dt { color: var(--ink-2); }
.sign-coi-answers__list dd { margin: 0; overflow-wrap: anywhere; }
.sign-coi-settings { display: flex; flex-direction: column; gap: var(--space-2); }
@media (max-width: 40em) {
  .sign-coi-answers__list { grid-template-columns: minmax(0, 1fr); }
}

/* Documents v3 Phase 3: a paper waiting for a second person (D-104). */
.review-dot { display: inline-block; inline-size: .6rem; block-size: .6rem; border-radius: 50%; background: var(--plum); vertical-align: baseline; }
.review-preview { display: block; max-inline-size: 100%; max-block-size: 28rem; margin-block-end: var(--space-3, .75rem); border: var(--border) solid var(--hairline); }
.review-warnings { margin-block-start: var(--space-3, .75rem); padding-inline-start: 1.25rem; color: var(--amber); }
