/* Reclaimt product look, calm register (owner-approved on the Vendors screen, 2026-11-15, then extended to every P1 screen).
   Shell paper, hairlines instead of boxes, viridian for the one main action, very large light numerals,
   small solid squares for a status, and flat drawn buildings that echo the Reclaimt mark. No circles, no yellow.
   It sits on top of reclaimt.css and app.css (the old primitives) and re-points their tokens.
   Light only: the brand has no dark scheme yet. No inline styles and no data: images, so the content security policy holds. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin.woff2") format("woff2"); font-weight: 300 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-italic-latin.woff2") format("woff2"); font-weight: 300 500; font-style: italic; font-display: swap; }

body {
  color-scheme: light;
  --shell: #f6f5f1; --white: #fcfbf8; --stone: #e6e3da; --stone-2: #eeece5;
  --viridian: #344945; --viridian-2: #2a3c39; --dusk: #6b8785; --mist: #d9e5e8;
  --peach: #eec7ac; --peach-soft: #f6e3d6; --sage: #becdb6; --tan: #dfcfb0; --brown: #5b4132;
  /* the status squares */
  --sq-expired: #b4472e; --sq-soon: #e8893b; --sq-missing: #20292a; --sq-unverified: #c9ae7c; --sq-undecided: #b4b0a3; --sq-current: #7fa088; --sq-review: #8fa5ad; --sq-quiet: #d3cfc3;
  /* the old token names, re-pointed, so every primitive the other panels use follows */
  --paper: var(--shell); --surface: var(--white); --surface-2: var(--stone-2);
  --ink: #20292a; --ink-2: #56605f; --ink-3: #5f6968; --edge: #7f8785;
  --line: #dcd8cd; --line-2: #c9c5b8;
  --accent: var(--viridian); --accent-ink: var(--shell); --accent-hover: var(--viridian-2); --accent-soft: var(--stone-2);
  --ok: #3d5f4a; --ok-soft: #dfe8df; --warn: #7a4a1e; --warn-soft: var(--peach-soft); --bad: #94402a; --bad-soft: #f2dfd6;
  --shadow: none; --radius: 28px; --radius-sm: 14px; --control: 48px;
  --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font: 400 1rem/1.5 var(--font); background: var(--shell); color: var(--ink);
}
::selection { background: var(--peach); color: var(--ink); }
:focus-visible { outline: 2px solid var(--viridian); outline-offset: 3px; }
.icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---- top bar: almost nothing */
.bar { position: static; min-height: 84px; padding: 0 clamp(20px, 3.4vw, 48px); border: 0; background: transparent; }
.brand { gap: 10px; color: var(--viridian); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.brand .mark { width: 22px; height: 22px; }
.brand .product { display: inline-flex; align-items: center; gap: 12px; margin-left: 4px; color: var(--ink-2); font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.brand .product::before { content: ""; width: 1px; height: 14px; margin: 0; background: var(--line-2); }
.tag { padding: 5px 10px; border-radius: 4px; background: var(--peach-soft); color: var(--warn); font-size: .75rem; }
#who { margin: 0; padding-right: 14px; border: 0; color: var(--ink-2); font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.bar nav button.link { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--ink-2); font-size: .9375rem; font-weight: 400; text-decoration: none; }
.bar nav button.link:hover { background: var(--stone-2); color: var(--ink); }

/* ---- page: a deck on the left, the vendors on the right, a lot of air */
main { max-width: 1200px; padding: 12px clamp(20px, 3.4vw, 48px) 140px; }
body[data-view="list"] main { max-width: 1320px; }
.home { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.err, .note, .success { margin: 0 0 24px; padding: 14px 20px; border: 0; border-radius: 4px; font-size: .9375rem; }

/* ---- the deck: one large count, a short street of firms, and the filters on the field the street stands on */
.deck { position: sticky; top: 24px; overflow: hidden; border-radius: 40px; background: var(--mist); }
.deck__sky { position: relative; padding: 38px 38px 0; }
.deck h1 { color: var(--viridian); font-size: .8125rem; font-weight: 500; line-height: 1.2; letter-spacing: .26em; text-transform: uppercase; }
/* the heading takes focus when the screen opens so a screen reader starts here; it is not a control, so it shows no ring */
h1:focus-visible { outline-color: transparent; }
.reading { display: grid; gap: 12px; margin: 44px 0 0; }
.reading__n { color: var(--viridian); font-size: clamp(6.5rem, 10vw, 8.5rem); font-weight: 200; line-height: .8; letter-spacing: -0.04em; }
.reading__note { color: #3f5052; font: italic 300 1.375rem/1.3 var(--serif); }
.street { display: block; width: calc(100% + 76px); height: auto; margin: 34px -38px 0; }

.tabs { display: grid; gap: 2px; width: auto; max-width: none; margin: 0; padding: 14px 16px 22px; border: 0; border-radius: 0; background: var(--viridian); }
.tabs button { justify-content: space-between; width: 100%; min-height: 50px; padding: 0 20px; border: 0; border-radius: 6px; background: transparent; color: #e3ebe7; font-size: 1rem; font-weight: 400; }
.tabs button:hover { background: rgb(246 245 241 / .1); color: var(--shell); }
.tabs button:focus-visible { outline-color: var(--shell); outline-offset: 2px; }
.tabs button[aria-pressed="true"] { background: var(--shell); color: var(--viridian); font-weight: 500; box-shadow: none; }
.tabs .count { color: #b9c9c4; font-size: 1.125rem; font-weight: 300; font-variant-numeric: tabular-nums; }
.tabs button[aria-pressed="true"] .count { color: var(--viridian); font-weight: 500; }

/* ---- drawn buildings: flat cut-paper shapes, an arch for a door, skinny slits for windows. Their colours are soft on purpose and are never a status colour. */
.firm { flex: none; display: block; overflow: visible; }
.firm .wall { fill: var(--fw, var(--sage)); }
.firm .pane { fill: var(--fp, var(--white)); }
/* one shape and one size for every vendor; only the colours change. Expired: dusty pink with a coffee-brown arch. Expiring soon: sand with a viridian arch. Every other vendor: viridian with a pale arch. */
.firm--expired { --fw: #e9bca3; --fp: var(--brown); }
.firm--soon { --fw: #e2d2ae; --fp: var(--viridian); }
.firm--other { --fw: var(--viridian); --fp: var(--shell); }
.street .sage { fill: var(--sage); }
.street .dusk { fill: var(--dusk); }
.street .tan { fill: var(--tan); }
.street .peach { fill: var(--peach); }
.street .brown { fill: var(--brown); }
.street .fog { fill: #86a0aa; }
.street .viridian { fill: var(--viridian); }
.street .white { fill: var(--white); }
.street .ink { fill: var(--ink); }
.street .pen { fill: none; stroke: var(--ink); stroke-width: 1.5px; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ---- the stream */
.stream { display: grid; gap: 20px; align-content: start; min-width: 0; padding-top: 4px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 8px; margin: 0 0 8px; }
.search { flex: 1 1 100%; flex-direction: row; align-items: center; gap: 14px; min-height: 56px; padding: 0 24px; border-radius: 999px; background: var(--stone-2); color: var(--ink-2); cursor: text; }
.search input { flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 1rem; outline: 2px solid transparent; }
.search:focus-within { outline: 2px solid var(--viridian); outline-offset: 2px; }
.actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: -8px; }
.actions .primary { margin-left: auto; }

/* ---- buttons: thin and quiet, and all one size (48 by 220) so a page reads evenly; one filled button marks the main action.
   Text links, the quiet toolbar actions and the filters are not buttons of this kind and keep their own width.
   A confirm button that states a count ("Confirm: import 120 vendor(s)") may grow past 220 rather than cut its words. */
button { min-height: 48px; min-width: 220px; padding: 0 12px; gap: 10px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink); font: 500 .9375rem/1 var(--font); transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
button:hover { border-color: var(--ink-3); background: var(--stone-2); color: var(--ink); }
button:active { transform: scale(.97); }
button.primary { border-color: var(--viridian); background: var(--viridian); color: var(--shell); }
button.primary:hover { border-color: var(--viridian-2); background: var(--viridian-2); color: var(--shell); }
button.ghost { min-width: 0; padding: 0 16px; border-color: transparent; color: var(--ink-2); font-weight: 400; }
button.ghost:hover { border-color: transparent; background: var(--stone-2); color: var(--ink); }
button.link { min-width: 0; min-height: 36px; padding: 0 10px; border: 0; background: none; color: var(--viridian); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.tabs button { min-width: 0; }
button.go { gap: 8px; border-color: currentColor; background: var(--shell); }
button.go .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
button.go:hover { border-color: var(--viridian); background: var(--viridian); color: var(--shell); }
button.go:hover .icon { transform: translateX(3px); }
button:disabled { opacity: .45; }

/* ---- group headings: small, wide-set labels */
.group { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin-top: 12px; }
.group h2, .eyebrow { margin: 0; color: var(--ink-2); font: 500 .75rem/1.3 var(--font); letter-spacing: .22em; text-transform: uppercase; }

/* ---- a status: one small solid square, then the words. The square's colour changes; the words always say it. */
.vendor-name { white-space: normal; }
.states { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; }
.state { display: inline-flex; align-items: center; gap: 9px; font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.state::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--sq, var(--sq-quiet)); }
.state--expired { --sq: var(--sq-expired); }
.state--soon { --sq: var(--sq-soon); }
.state--missing { --sq: var(--sq-missing); }
.state--unverified { --sq: var(--sq-unverified); }
.state--undecided { --sq: var(--sq-undecided); }
.state--current { --sq: var(--sq-current); }
.state--review { --sq: var(--sq-review); }
.state--follow { --sq: var(--sq-expired); }
.memo { color: var(--ink-2); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ext { margin: 0; color: var(--ink-2); font-size: .8125rem; letter-spacing: .08em; }
.flag { margin-left: 8px; color: var(--bad); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }

/* ---- select box: a small square in the row's left margin */
.pick { flex: none; display: grid; place-items: center; width: 24px; height: 44px; cursor: pointer; }
input[type=checkbox] { appearance: none; position: relative; min-width: 18px; width: 18px; min-height: 18px; height: 18px; margin: 0; padding: 0; border: 1.5px solid var(--edge); border-radius: 3px; background: transparent; cursor: pointer; transition: background-color .15s, border-color .15s; }
input[type=checkbox]:hover { border-color: var(--viridian); }
input[type=checkbox]:checked { border-color: var(--viridian); background: var(--viridian); }
input[type=checkbox]:checked::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 5px; height: 9px; border: solid var(--shell); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }

/* ---- vendor rows: no boxes, a hairline under each, a soft band on hover */
.leads, .lines { margin: 0; padding: 0; list-style: none; }
.lead, .line { display: flex; align-items: center; margin: 0 -16px; padding-inline: 16px; background: linear-gradient(var(--line), var(--line)) 16px 100% / calc(100% - 32px) 1px no-repeat; cursor: pointer; transition: background-color .2s var(--ease); }
.lead:hover, .line:hover { background-color: var(--stone-2); }
.lead:focus-visible, .line:focus-visible { outline-offset: -2px; }
.row__main { flex: 1 1 auto; display: grid; gap: 8px; min-width: 0; }
.title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; }
.row__side { flex: none; }

/* expired or expiring soon: taller, the drawing larger, the days as one large reading */
.lead { gap: 28px; min-height: 200px; padding-block: 32px; }
/* the drawing is 56px in a 108px column, on every row */
.lead .firm, .line .firm { width: 108px; height: 56px; }
.lead .vendor-name { font-size: 1.625rem; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 10px 0 0; }
.facts dt { color: var(--ink-2); font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-size: .9375rem; overflow-wrap: anywhere; }
.lead .row__side { display: grid; justify-items: end; gap: 18px; }
.days { display: grid; justify-items: end; margin: 0; }
.days__n { font-size: 5.25rem; font-weight: 200; line-height: .8; letter-spacing: -0.04em; }
.days__unit { margin-top: 10px; color: var(--ink-2); font: italic 300 1.0625rem/1.2 var(--serif); }

/* every other vendor: one height, three lines */
.line { gap: 28px; min-height: 132px; padding-block: 20px; }
.line .row__main { gap: 5px; }
.line .vendor-name { font-size: 1.125rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.line .row__side { display: flex; align-items: center; gap: 20px; }
.contact { margin: 0; color: var(--ink-2); font-size: .875rem; overflow-wrap: anywhere; }
.when { display: grid; justify-items: end; gap: 2px; }
.date { font-size: 1.375rem; font-weight: 300; letter-spacing: -0.01em; white-space: nowrap; }
.none { color: var(--ink-2); font: italic 300 1rem/1.3 var(--serif); }

/* ---- sections and panels. A .card on an inner page is a section under a hairline with a lot of air around it;
   a .card inside one is a stone panel (and a white one inside that); panels that open on the Vendors screen are white. */
.card, .settings .card { margin: 0; padding: 64px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.card > h2 { margin-bottom: 0; }
.card > h3 { margin-bottom: 12px; }
.card .card, .settings .card .card { margin-top: 16px; padding: 24px 26px; border: 0; border-radius: 6px; background: var(--stone-2); }
.card .card .card { background: var(--white); }
.stream .card, .card[role="alertdialog"] { margin: 0 0 24px; padding: 28px; border: 0; border-radius: 6px; background: var(--white); }
.stream .card > h2, .card[role="alertdialog"] > h2 { margin-bottom: 14px; font-size: 1.5rem; }
h2 { font: 400 1.875rem/1.12 var(--serif); letter-spacing: -0.015em; }
h3 { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.card p.muted { font-size: .9375rem; }
.stream p.muted { font: italic 300 1.0625rem/1.4 var(--serif); }
input, select, textarea { min-height: 48px; padding: 8px 16px; border: 1px solid transparent; border-radius: 4px; background: var(--stone-2); color: var(--ink); font-size: .9375rem; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--viridian); outline-offset: 1px; border-color: transparent; }
input[type=search] { min-width: 0; }
label { gap: 10px; color: var(--ink); font-size: .875rem; font-weight: 500; }
label.inline { min-height: 48px; font-weight: 400; }
.table-wrap { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
th:first-child, td:first-child { padding-left: 0; }
.stream .card th:first-child, .stream .card td:first-child { padding-left: 14px; }
th { padding: 0 14px 14px; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: .6875rem; font-weight: 500; letter-spacing: .18em; }
td { padding: 18px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.badge { gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: .875rem; font-weight: 500; }
.badge::before { width: 10px; height: 10px; border-radius: 0; background: var(--sq-quiet); }
.badge.ok, .badge.warn, .badge.bad { border: 0; background: transparent; color: var(--ink); }
.badge.ok::before { background: var(--sq-current); }
.badge.warn::before { background: var(--sq-soon); }
.badge.bad::before { background: var(--sq-expired); }

/* ---- empty states: one drawing, one sentence */
p.empty-line { display: grid; justify-items: center; gap: 24px; margin: 0; padding: 64px 24px 96px; color: var(--ink-2); font: italic 300 1.375rem/1.4 var(--serif); text-align: center; }
p.empty-line .firm { width: 128px; height: 128px; }
.empty { padding: 48px; text-align: left; }
.empty .firm { width: 104px; height: 104px; margin-bottom: 20px; }
.empty h2 { font-size: 1.75rem; }
.empty ol { max-width: 60ch; margin: 16px 0; }
.empty .row { justify-content: flex-start; }

/* ---- tablet: the deck lies down, the count beside its filters */
@media (max-width: 1080px) {
  .home { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .deck { position: static; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .deck__sky { display: grid; grid-template-rows: auto 1fr auto; }
  .street { align-self: end; }
  .tabs { align-content: center; padding: 20px 16px; }
}

/* ---- phone */
@media (max-width: 680px) {
  .bar { min-height: 64px; gap: 4px; }
  .brand .product { display: none; }
  .bar nav button.link { min-height: 44px; padding: 0 9px; font-size: .875rem; }
  main { padding-top: 4px; padding-bottom: 88px; }
  .deck { display: block; border-radius: 32px; }
  .deck__sky { display: block; padding: 28px 28px 0; }
  .reading { margin-top: 28px; }
  .reading__n { font-size: 6.25rem; }
  .reading__note { font-size: 1.25rem; }
  .street { width: calc(100% + 56px); margin: 24px -28px 0; }
  .tabs { display: flex; flex-wrap: nowrap; gap: 6px; padding: 12px 16px 18px; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: none; width: auto; min-height: 44px; gap: 10px; padding: 0 16px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-left: 0; }
  .actions .primary { grid-column: 1 / -1; grid-row: 1; margin-left: 0; }
  .actions .ghost { justify-content: center; border-color: var(--line-2); }
  .group { flex-wrap: wrap; gap: 4px 16px; }
  .group .ghost { margin-left: -16px; }
  /* a row becomes a small grid: the drawing and the day count on top, the words across the full width under them */
  .lead, .line { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0; min-height: 0; }
  .pick { grid-area: pick; margin-right: 12px; }
  .lead .firm, .line .firm { grid-area: firm; }
  .row__main { grid-area: main; }
  .row__side { grid-area: side; }
  .lead { grid-template-areas: "pick firm side" "main main main"; align-items: center; row-gap: 18px; padding-block: 26px 28px; }
  .lead .firm, .line .firm { width: 44px; height: 44px; margin-right: 14px; }
  .lead .vendor-name { font-size: 1.4375rem; }
  .lead .row__side { justify-self: end; }
  .days__n { font-size: 4.25rem; }
  .facts { gap: 12px 32px; }
  .line { grid-template-areas: "pick firm main" ". . side"; align-items: start; row-gap: 12px; padding-block: 22px; }
  .line .row__side { flex-wrap: wrap; justify-content: flex-start; gap: 10px 16px; }
  .when { justify-items: start; }
  .date { font-size: 1.25rem; }
  .stream .card { padding: 22px; }
  .empty { padding: 32px 24px; }
}
@media (max-width: 480px) { .brand > span:not(.product) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }

/* ---- every other screen (a vendor, notifications, settings, signed out).
   A large light title, then sections with a lot of air between them: the section's name in serif on the left, what it holds on the right.
   Three voices keep a page from reading as one block of lines: serif for names and notes, the grotesque for what you act on, small wide-set capitals for labels. */
h1 { font-size: clamp(2.75rem, 5vw, 4rem); font-weight: 300; line-height: 1; letter-spacing: -0.04em; }
main > h1 { margin: 28px 0 48px; }
button.link.back { margin: 4px 0 36px -10px; color: var(--ink-2); text-decoration: none; }
button.link.back:hover { background: var(--stone-2); color: var(--ink); }
.page-head { flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 28px; margin: 0 0 80px; }
.page-head .firm { width: 88px; height: 88px; }
.page-head .titles { gap: 20px; }
.page-head h1 + .muted { max-width: 46ch; margin: 0; font: italic 300 1.375rem/1.35 var(--serif); }
main a { color: var(--viridian); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* a section: its name on the left, everything else in one column on the right */
main > .card > h2 + p.muted { max-width: 60ch; margin: 0 0 28px; font: 400 1.125rem/1.5 var(--serif); }
main > .card > p.muted:last-child { margin: 28px 0 0; font-size: .8125rem; }
main > .card > button { justify-self: start; }
@media (min-width: 1081px) {
  main > .card:has(> h2):not([role]) { display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 72px; }
  main > .card:has(> h2):not([role]) > * { grid-column: 2; }
  main > .card:has(> h2):not([role]) > :not(button) { min-width: 0; }
  main > .card:has(> h2):not([role]) > h2 { position: sticky; top: 32px; grid-column: 1; grid-row: 1 / span 40; align-self: start; }
  main > .card > h2 + * { margin-top: 7px; }
  main > details.card > :not(summary) { margin-left: 332px; }
}
@media (max-width: 1080px) { main > .card > h2 { margin-bottom: 20px; } }
/* a section that opens and closes: its name is the summary, with the chevron after it */
details.card > summary { gap: 16px; font: 400 1.875rem/1.12 var(--serif); letter-spacing: -0.015em; }
details.card > summary::before { order: 2; width: 9px; height: 9px; margin-bottom: 4px; }
details.card[open] > summary { margin-bottom: 28px; }
.card details.card > summary { font: 500 1rem/1.3 var(--font); letter-spacing: 0; }
.card details.card > summary::before { width: 7px; height: 7px; margin-bottom: 2px; }
.card details.card[open] > summary { margin-bottom: 4px; }
.card > h3.eyebrow { margin: 56px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.card > h3.eyebrow + .none { margin: 16px 0 0; }

/* rows of controls: fields stand on a grid with their names above, so everything lines up along the bottom */
.row { gap: 16px 12px; margin: 20px 0 0; }
.row > input:not([type=checkbox]), .row > select { flex: 1 1 200px; }
.row:has(> label:not(.inline)) { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 16px; align-items: end; }
.row:has(> label:not(.inline)) > button { justify-self: start; }
.row > label.inline { align-items: center; }
.row > label:not(.inline) > input, .row > label > select, .field > input, .field > select, .field > textarea { width: 100%; }
.row + table { margin-top: 28px; }
main > details.card td:first-child { white-space: nowrap; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; margin-top: 32px; }
.fields > .field:last-child:nth-child(odd) { grid-column: 1 / -1; }
.field__name { display: flex; align-items: baseline; gap: 10px; }
.opt { color: var(--ink-2); font: italic 300 .9375rem/1 var(--serif); }
.uploader .row { margin-top: 32px; }

/* the file picker: a quiet panel with a drawn certificate. The browser's own file input covers the panel, see-through, so a click, the keyboard and a drop all go to it. */
.picker { display: grid; }
.drop { position: relative; flex-direction: row; align-items: center; gap: 24px; min-height: 148px; padding: 28px 32px; border-radius: 6px; background: var(--stone-2); color: var(--ink); cursor: pointer; transition: background-color .2s var(--ease); }
.drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.drop:hover { background: var(--stone); }
.drop.is-over { background: var(--mist); }
.drop:has(input:focus-visible) { outline: 2px solid var(--viridian); outline-offset: 3px; }
.sheet { flex: none; display: block; width: 84px; height: 84px; }
.sheet .back { fill: var(--sage); }
.sheet .page { fill: var(--white); }
.sheet .rule { fill: var(--line-2); }
.sheet .seal { fill: var(--viridian); }
.drop__text { flex: 1 1 auto; display: grid; gap: 6px; min-width: 0; }
.drop__title { font-size: 1.1875rem; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.drop__hint { color: var(--ink-2); font: italic 300 1.0625rem/1.3 var(--serif); }
.drop__browse { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 220px; min-height: 48px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--shell); font-size: .9375rem; font-weight: 500; transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.drop:hover .drop__browse, .drop.is-over .drop__browse { border-color: var(--viridian); background: var(--viridian); color: var(--shell); }
.picked, ul.files, .log { margin: 0; padding: 0; list-style: none; }
.picked li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.picked__name, .file__name { font-weight: 500; overflow-wrap: anywhere; }

/* a received document: its files, one per line */
ul.files { margin-top: 14px; }
ul.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }

/* contacts: the name over the address, the actions to the right */
ul.contacts > li { flex-wrap: nowrap; gap: 8px 16px; padding: 20px 0; border-color: var(--line); }
.who { flex: 0 0 auto; display: grid; gap: 2px; max-width: 60%; margin: 0 8px 0 0; }
.card .card > details { margin-top: 16px; }
.who strong { font-size: 1.0625rem; font-weight: 500; }
ul.contacts .badge, ul.contacts .flag { flex: none; }
.acts { flex: 0 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 4px; margin-left: auto; }

/* the message log: when, what and for whom, where it stands */
.msg { display: grid; grid-template-columns: 124px minmax(0, 1fr) 200px; gap: 8px 28px; align-items: start; margin: 0; padding: 28px 0; border-bottom: 1px solid var(--line); }
.msg:first-child { padding-top: 0; }
.msg__when { display: grid; gap: 4px; margin: 0; }
.msg__main { display: grid; gap: 8px; min-width: 0; }
.msg__main summary { font-size: 1.0625rem; font-weight: 500; line-height: 1.35; cursor: pointer; }
.msg__main summary:hover { color: var(--viridian); }
.msg__side { display: grid; justify-items: end; gap: 4px; }
.msg .state { align-items: baseline; white-space: normal; }

table { font-size: .9375rem; }
.coverages td:first-child { font-size: 1.0625rem; }
tr.click:hover td { background: var(--stone-2); }
pre.mail { margin: 12px 0; padding: 18px 20px; border: 0; border-radius: 4px; background: var(--stone-2); }
.card .card pre.mail { background: var(--white); }
code { color: var(--ink-2); }

@media (max-width: 680px) {
  h1 { font-size: 2.5rem; }
  .page-head { flex-wrap: wrap; gap: 16px; margin-bottom: 48px; }
  .page-head .firm { width: 56px; height: 56px; }
  .page-head h1 + .muted { font-size: 1.1875rem; }
  button.link { min-height: 44px; }
  .card, .settings .card { padding: 44px 0; }
  .card .card, .settings .card .card { padding: 20px 18px; }
  h2, details.card > summary { font-size: 1.625rem; }
  main > .card:has(> table) { overflow-x: auto; }
  /* the coverage list has no header row, so on a phone each coverage is a small stack instead of a wide table */
  .coverages, .coverages tbody, .coverages tr, .coverages td { display: block; }
  .coverages tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .coverages td { padding: 3px 0; border: 0; }
  .coverages td:empty { display: none; }
  .who { max-width: 100%; }
  .drop { flex-wrap: wrap; gap: 16px 18px; min-height: 0; padding: 22px; }
  .sheet { width: 60px; height: 60px; }
  .drop__text { flex: 1 1 0; }
  .drop__browse { flex: 1 1 100%; width: auto; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .msg { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .msg__when { display: flex; align-items: baseline; gap: 10px; }
  .msg__side { justify-items: start; }
  ul.contacts > li { flex-wrap: wrap; }
  .acts { flex: 1 1 100%; justify-content: flex-start; margin-left: -10px; }
  .row > button, main > .card > button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  button, .lead, .line, button.go .icon { transition: none; }
}

/* ---- How it works: six steps, a numeral and a drawn mark each, the longer text one click away */
body[data-view="how"] main { max-width: 1180px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 56px; margin: 0; padding: 64px 0; border-top: 1px solid var(--line); list-style: none; }
.step { position: relative; display: block; margin: 0; padding: 0; border: 0; }
.step__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 6px; background: var(--stone-2); color: var(--viridian); }
.step__icon .icon { width: 30px; height: 30px; stroke-width: 1.4; }
.step__no { position: absolute; top: -8px; right: 0; color: var(--stone); font: 200 4.5rem/1 var(--font); letter-spacing: -0.04em; }
.step h2 { margin: 28px 0 10px; font: 400 1.75rem/1.15 var(--serif); letter-spacing: -0.015em; }
.step > p { max-width: 32ch; margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; }
.step details { margin-top: 18px; }
.step summary { cursor: pointer; color: var(--viridian); font-size: .9375rem; font-weight: 500; }
.step details > p { max-width: 36ch; margin: 12px 0 0; color: var(--ink-2); font-size: .9375rem; line-height: 1.6; }
.note-block { padding: 48px 0 0; border-top: 1px solid var(--line); }
.note-block h2 { margin: 0 0 16px; color: var(--ink-2); font: 500 .75rem/1.2 var(--font); letter-spacing: .2em; text-transform: uppercase; }
.note-block ul { margin: 0; padding: 0; list-style: none; }
.note-block li { display: block; max-width: 70ch; margin: 0; padding: 6px 0; border: 0; font: 400 1.125rem/1.5 var(--serif); }

/* ---- the Actions menu on a contact */
.menu { position: relative; flex: none; margin-left: auto; }
button.menu__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); text-decoration: none; }
button.menu__btn:hover { border-color: var(--ink-3); background: var(--stone-2); }
.menu__list { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; min-width: 210px; margin: 0; padding: 6px; border-radius: 6px; background: var(--white); box-shadow: 0 10px 30px rgb(26 25 21 / .14), 0 0 0 1px var(--line); list-style: none; }
.menu__list[hidden] { display: none; }
.menu__list li { display: block; margin: 0; padding: 0; border: 0; }
.menu__list button { display: flex; justify-content: flex-start; width: 100%; min-width: 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font-size: .9375rem; font-weight: 400; text-align: left; }
.menu__list button:hover, .menu__list button:focus-visible { background: var(--stone-2); outline-offset: -2px; }

/* ---- Advanced settings: closed by default, its parts are plain titled blocks */
.advanced .adv__item { margin: 0 0 40px; padding: 0; }
.advanced .adv__item:last-child { margin-bottom: 0; }
.advanced .adv__item > h3 { margin: 0 0 8px; font: 500 1.125rem/1.3 var(--font); }

@media (max-width: 1080px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 40px 0; }
  .step__no { font-size: 3.5rem; }
  .step > p, .step details > p { max-width: none; }
  .menu { flex: 1 1 100%; margin-left: 0; }
  .menu__list { left: 0; right: auto; }
}

/* the top bar now has four links: let it wrap instead of overflowing on narrow screens */
.bar { flex-wrap: wrap; row-gap: 0; }
.bar nav { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1180px) { .bar .tag { display: none; } }

/* ---- Reminder schedule: one tab per required coverage, five steps in date order */
.reminders > p.muted { max-width: 62ch; margin: 0 0 24px; font: 400 1.125rem/1.5 var(--serif); }
.reminders .pause { align-items: center; margin: 0 0 36px; }
.rtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 36px; padding: 0 0 0; border-bottom: 1px solid var(--line); }
.rtabs button { min-width: 0; min-height: 48px; margin-bottom: -1px; padding: 0 20px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-2); font-size: 1rem; font-weight: 400; }
.rtabs button:hover { background: var(--stone-2); color: var(--ink); }
.rtabs button[aria-selected="true"] { border-bottom-color: var(--viridian); color: var(--viridian); font-weight: 500; }
.rtabs button.is-expired::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; background: #b8532c; }
.rpanel:focus-visible { outline-offset: 6px; }
.rpanel__line { margin: 0 0 28px; font: italic 300 1.25rem/1.4 var(--serif); color: var(--ink-2); }
.rpanel__line--expired { color: #8a3d1d; }
.timeline { margin: 0; padding: 0; list-style: none; }
.tstep { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 260px); align-items: baseline; gap: 8px 32px; margin: 0; padding: 26px 20px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.tstep:last-child { border-bottom: 1px solid var(--line); }
.tstep p { margin: 0; }
.tstep__date { display: grid; gap: 4px; }
.tstep__date .num { font: 400 1.5rem/1.1 var(--serif); letter-spacing: -0.01em; }
.tstep__rel { color: var(--ink-2); font-size: .8125rem; }
.tstep__name { font-size: 1.0625rem; font-weight: 500; }
.tstep__to { margin-top: 2px; color: var(--ink-2); font-size: .875rem; }
.tstep__state { display: grid; gap: 4px; justify-items: start; }
.tstep--past .tstep__date .num, .tstep--past .tstep__name { color: var(--ink-2); }
.tstep--next { background: var(--stone-2); }
.rpanel__end { max-width: 60ch; margin: 22px 0 0; color: var(--ink-2); font: italic 300 1.0625rem/1.45 var(--serif); }
.rpending { margin: 32px 0 0; padding: 0; list-style: none; }
.rpending li { display: block; margin: 0; padding: 8px 0; border: 0; font-size: .9375rem; }
@media (max-width: 860px) {
  .tstep { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 22px 14px; }
  .tstep__date { grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; }
  .rtabs button { padding: 0 14px; }
}

/* ---- COI request: four answers at a glance (what, still needed, email, upload link) */
.req { margin: 0; padding: 36px 0 8px; border-top: 1px solid var(--line); }
.req:first-of-type { border-top: 0; padding-top: 8px; }
.req__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.req__head h3 { margin: 0; font: 400 1.5rem/1.2 var(--serif); letter-spacing: -0.01em; }
.req__when { margin: 8px 0 24px; color: var(--ink-2); font-size: .9375rem; }
.qrows { margin: 0; padding: 0; }
.qrow { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 6px 32px; margin: 0; padding: 18px 0; border-top: 1px solid var(--line); }
.qrow dt { margin: 0; color: var(--ink-2); font: 500 .75rem/1.6 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.qrow dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.qstate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.qwarn { margin: 10px 0 0; padding: 10px 14px; border-radius: 4px; background: var(--bad-soft); color: var(--bad); font-size: .9375rem; font-weight: 500; }
.qmore { margin: 10px 0 0; }
.qmore > summary { cursor: pointer; color: var(--viridian); font-size: .9375rem; font-weight: 500; }
.qmail { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.qmail__head { margin: 0 0 4px; }
.qlinks { margin: 10px 0 0; padding: 0; list-style: none; }
.qlinks li { display: block; margin: 0; padding: 6px 0; border: 0; font-size: .9375rem; }
.qconfirm { margin: 16px 0 0; padding: 20px 22px; border-radius: 6px; background: var(--stone-2); }
.qconfirm p { margin: 0 0 14px; max-width: 60ch; }
.qact { margin: 20px 0 0; align-items: center; }
.qearlier { margin-top: 32px; }
.qearlier > summary { font-size: 1rem; }
@media (max-width: 720px) { .qrow { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* timeline emphasis: one row at most. Past and paused rows are quiet; the warning tint is for a failed delivery or an unresolved overdue coverage. */
.tstep--warn { background: #f6e6dd; }
.tstep--warn .state .icon { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; color: var(--bad); }

/* field-level help and the CSV size input with its unit */
.help { display: block; margin-top: 4px; color: var(--ink-2); font-size: .8125rem; font-weight: 400; line-height: 1.45; }
label.inline > span { display: block; }
.sizeinput { display: flex; gap: 8px; }
.sizeinput input { flex: 1 1 auto; min-width: 0; }
.sizeinput select { flex: 0 0 auto; width: 88px; }

/* ---- review screen: the original beside the fields (wide), or behind a Document / Details switch (phone) */
.help[hidden] { display: none; }
.help--need { color: #8a3d1d; font-weight: 500; }
.review__switch { display: none; }
.review__hint { display: none; }
/* Select vendors mode: a slim bar above the list; checkboxes exist only while it is on */
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 16px; padding: 14px 18px; border-radius: 6px; background: var(--stone-2); }
.selbar__count { margin: 0; min-width: 7ch; font-weight: 500; }
.selbar__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.selbar__hint { flex: 1 1 100%; margin: 0; color: var(--ink-2); font-size: .875rem; }
.noselect { flex: 1 1 100%; min-width: 0; white-space: normal; color: var(--ink-2); font-size: .8125rem; }
.pick input:disabled { cursor: not-allowed; opacity: .45; }
@media (max-width: 680px) { .selbar__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 0; width: 100%; } .selbar__actions .primary { grid-column: 1 / -1; order: -1; } .selbar__actions button { min-width: 0; min-height: 44px; padding: 6px 10px; white-space: normal; line-height: 1.2; } }
/* Next step guide: one compact card under the vendor heading; a colour block when something needs doing, a hairline block when it is only waiting, one quiet line when nothing is needed */
.nextstep { margin: -32px 0 40px; padding: 22px 26px 24px; border: 0; border-left: 6px solid var(--viridian); border-radius: 6px; background: var(--white); }
.nextstep--wait { border-left-color: var(--line-2); background: var(--stone-2); }
.nextstep .eyebrow { margin: 0 0 8px; }
.nextstep h2 { margin: 0 0 8px; font-size: 1.5rem; }
.nextstep p { margin: 0 0 10px; max-width: 62ch; }
.nextstep__also { color: var(--ink-2); font-size: .9375rem; }
.nextstep button { margin-top: 6px; }
.nextstep button.link { padding-left: 0; }
.nextline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: -40px 0 40px; color: var(--ink-2); font-size: .9375rem; }
.nextline::before { content: ""; width: 8px; height: 8px; background: var(--dusk); }
.nextlabel { color: var(--viridian); font-size: .875rem; font-weight: 500; }
[id$="-card"], [id^="sub-"] { scroll-margin-top: 20px; }
.target-flash { box-shadow: 0 0 0 2px var(--viridian); transition: box-shadow .4s ease; }
.earlier { margin-top: 16px; padding: 16px 18px; border-radius: 4px; background: var(--bad-soft, #f4e7e1); }
.earlier[hidden] { display: none; }
.earlier p { margin: 0 0 8px; }
.review__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 24px; }
.review__doc { position: sticky; top: 16px; display: grid; gap: 10px; }
.viewer { display: block; width: 100%; height: min(78vh, 820px); min-height: 460px; border: 0; border-radius: 6px; background: var(--stone); }
.review__form { display: grid; gap: 28px; min-width: 0; }
.cov { display: grid; gap: 14px; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.cov__on { align-items: flex-start; }
.cov .fields { margin: 0; }
.cov .memo { margin: 0; }
@media (max-width: 960px) {
  .review__switch { display: flex; gap: 8px; margin-top: 20px; }
  .review__hint { display: block; }
  .review__switch button { min-width: 0; flex: 1 1 0; }
  .review__switch button[aria-pressed="true"] { border-color: var(--viridian); background: var(--viridian); color: var(--shell); }
  .review__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .review__doc { position: static; }
  .viewer { height: 70vh; min-height: 380px; }
  .review[data-pane="document"] .review__form { display: none; }
  .review[data-pane="details"] .review__doc { display: none; }
}

/* nothing in the review or the email details may push a phone-width page sideways */
.qmail, .qmail pre { min-width: 0; max-width: 100%; }
.qmail pre { overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.review__form .row { flex-wrap: wrap; }
.review__form input:not([type="checkbox"]), .review__form select { min-width: 0; max-width: 100%; }
p.memo, .qmail .memo, .qrow .memo { white-space: normal; overflow-wrap: anywhere; }

/* a finished review: what was accepted from this document, and what was not */
.accsum { margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.accsum > p.muted { margin: 4px 0 14px; }
.accsum__list { margin: 0; padding: 0; list-style: none; }
.accsum__list li { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); }
.accsum__name { font-weight: 500; }
@media (max-width: 720px) { .accsum__list li { grid-template-columns: minmax(0, 1fr); } }

.accsum__more { margin: 18px 0 0; align-items: center; }

/* SPEC-AMD-003 Phase 2: minimum amounts under each coverage (Vendor Details) and the default minimums (Settings) */
.minimums { margin: 0 0 8px; padding: 0; list-style: none; }
.minimums li { margin: 4px 0; }
.minimums .memo { margin-left: 8px; }
.minimums-editor .row { margin-top: 12px; }
.minimums-editor .note { margin: 16px 0 0; }
.minimums-editor .note ul { margin: 0 0 8px; padding-left: 20px; }
.minimum-history { margin-top: 8px; color: var(--ink-2); font-size: .875rem; }
.minimum-history summary { cursor: pointer; }
.minimum-history ul { margin: 8px 0 0; padding-left: 20px; }
.minimums-defaults { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.minimums-defaults fieldset { margin: 16px 0 0; padding: 12px 16px 16px; border: 1px solid var(--line); border-radius: 4px; }
.minimums-defaults legend { padding: 0 6px; font-weight: 600; }
.minimums-defaults fieldset .row { margin-top: 12px; }
.coverages tr.minimums-row td { padding-top: 0; }

/* SPEC-AMD-003 Phase 3: recorded amounts (review panel and accepted certificates) */
div.limits { margin-top: 16px; }
fieldset.limit { margin: 10px 0 0; padding: 8px 14px 12px; border: 1px solid var(--line); border-radius: 4px; }
fieldset.limit legend { padding: 0 6px; font-weight: 600; }
fieldset.limit label.inline { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.limit__amount { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.limit__amount > input { flex: 1 1 160px; max-width: 240px; }
ul.limits { margin: 8px 0 4px; padding: 0; list-style: none; }
ul.limits li { margin: 6px 0; }
.record-limit { margin: 8px 0 12px; }
.accsum__list ul.limits { grid-column: 1 / -1; }
.accsum__list ul.limits li { display: block; padding: 8px 0 8px 16px; border-top: 0; border-left: 2px solid var(--line); }
.accsum__list ul.limits li > .state, .accsum__list ul.limits li > .memo { margin-right: 8px; }
.accsum__list ul.limits li > button.link { display: block; margin-top: 4px; }
.accsum__list ul.limits li > span:first-child { margin-right: 8px; }

/* SPEC-AMD-003 Phase 4: limit statuses beside each minimum on Vendor Details */
.minimums .limit-status { margin-left: 8px; }
.minimums .limit-status .memo { white-space: normal; }

/* SPEC-AMD-003 Phase 5: the three choices for a shortfall, the approval form and the correction preview */
.limit-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 4px; }
.approve-limit, .correction { margin: 10px 0 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; }
.approve-limit textarea, .correction textarea { width: 100%; }
.message-preview { margin: 8px 0; padding: 10px 12px; max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-word; background: var(--paper-2, #f4f1ea); font: .8125rem/1.5 var(--mono, ui-monospace, monospace); }
/* notes inside an accepted certificate and the Phase 5 forms wrap (the shared .memo does not wrap, which clipped them at phone width) */
.accsum .memo, .approve-limit .memo, .correction .memo { white-space: normal; }
