/* dashboard.kollected.ai: one stylesheet for the whole portal (v3.1, the operations look, made exact).
   Same identity as v2: a forest sidebar, white bordered panels on a concrete canvas, Satoshi for the app, Cal Sans on
   the landing only, Plex Mono for IDs and money, and the brand's lime timing cursor marking where you are.
   What v3 adds is discipline:
   - one spacing scale (4 8 12 16 20 24 32 48) and one panel inset (--pad), so the left edge of a heading, a panel's
     text and a table's first column are the same line on every page;
   - one type scale (12 13 14 16 20 24, on a 4px line grid) with tabular numerals wherever numbers stack;
   - one control height (--ctl): 36px with a mouse, 44px on touch screens and under 1024px wide;
   - hairlines do all the separating: no shadows anywhere, no dashed "placeholder" borders (the drop zone is the one
     dashed thing, because dashed means "drop here");
   - lime is a signal only: the cursor (current page, current step), the main action, a count that waits on you;
   - forest marks money: one forest edge on the balance, on the pay terms and on a review's pay line, nowhere else;
   - facts that belong together are parted by a drawn hairline (.bits), never by a dot typed into the words.
   No inline styles anywhere (the CSP forbids them). */

@font-face { font-family: 'Cal Sans'; src: url('/fonts/cal-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/fonts/satoshi-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/fonts/satoshi-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/fonts/satoshi-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/fonts/satoshi-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi Fallback'; src: local('Arial'), local('ArialMT'), local('Helvetica'); size-adjust: 99%; ascent-override: 102%; descent-override: 24.2%; line-gap-override: 10.1%; }
@font-face { font-family: 'Cal Sans Fallback'; src: local('Arial Black'), local('Arial-Black'); size-adjust: 78.5%; ascent-override: 127.4%; descent-override: 38.2%; line-gap-override: 0%; }

:root {
  /* surfaces */
  --bg: #f3f4f1;          /* the canvas: concrete, a cool grey with the forest in it */
  --bg-2: #e9ece7;        /* hover fills, sunken areas, the empty track, a disabled button */
  --card: #ffffff;        /* panels */
  --card-2: #f8f9f7;      /* table heads, quiet panel areas */
  /* ink */
  --ink: #202020;
  --ink-2: #5b655f;       /* secondary text: 6:1 on white, 5.5:1 on the canvas, 5.1:1 on --bg-2 */
  --ink-3: #656f69;       /* the faintest text allowed: 5.2:1 on white, 4.7:1 on the canvas (never on --bg-2: 4.4:1) */
  /* lines */
  --rule: #dfe3de;        /* hairlines inside and around panels */
  --rule-2: #cad1c9;      /* the edges of boxes, choices and buttons */
  --rule-3: #8b948e;      /* hovered edges and link underlines (never text) */
  /* a field's edge: 3.6:1 on white, 3.3:1 on the canvas (WCAG 1.4.11 asks 3:1 for a control's boundary) */
  --rule-strong: #8a8778;
  /* brand */
  --lime: #9ff25f;        /* the timing cursor, the main action, a waiting count. Nothing else. */
  --lime-2: #8fe24d;
  --lime-edge: #7fcf45;   /* the edge and the pressed fill of a lime button */
  --forest: #264b2e;
  --forest-2: #1d3b23;
  --forest-3: #315c3a;
  --pale: #e2ffcc;        /* text on forest: 9.1:1 */
  --on-forest: #ffffff;   /* the brightest text on forest and other dark fills: the current nav item, a name */
  --on-forest-2: #c3dcb7; /* quieter text on forest: 6.7:1 */
  --forest-rule: #3d5f44; /* hairlines on forest */
  /* states (muted, readable) */
  --green: #1f6b35;
  --green-tint: #e7f3ea;
  --amber: #fff3dc;
  --amber-ink: #7a4c00;
  --amber-edge: #c98a00;  /* a warning's coloured edge */
  --amber-rule: #ecdcb8;  /* a warning's border, and a closed upload line's */
  --amber-wash: #fffaf0;  /* a warning's panel */
  --red: #a3271f;
  --red-tint: #fbe8e6;
  --red-edge: #ecc4c0;    /* a danger button's, a failed upload's, an error's and the danger zone's edge */
  --red-wash: #fff7f6;    /* an error's panel */
  --blue: #285a72;
  --blue-tint: #e5eef3;
  --selected: #f4f9f0;    /* a chosen option, the current step, a drop zone with files over it */
  --film: #0f1712;
  --film-text: #e7ece8;

  --font-display: 'Cal Sans', 'Cal Sans Fallback', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Satoshi Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Plex Mono', Consolas, Menlo, monospace;

  /* shape: small radii, one per role */
  --radius-xs: 4px;       /* badges */
  --radius-s: 6px;        /* controls, buttons */
  --radius: 8px;          /* panels */
  --radius-l: 12px;       /* landing blocks */
  /* measure */
  --pad: 20px;            /* the one inset: panels, table edges, metric cells, steps */
  --ctl: 36px;            /* the one control height: buttons, inputs, selects, nav items, tabs */
  --side-w: 232px;
  --max: 1160px;
  --max-wide: 1440px;
  --margin: clamp(16px, 3vw, 32px);   /* the public pages' side margin (.container) */
  --gutter: clamp(16px, 3vw, 40px);   /* the app's, beside the sidebar (.shell__main, .shell__flash) */
  --t-fast: 120ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}
@media (max-width: 720px) { :root { --pad: 16px; } }
/* every control is a 44px tap target on a touch screen, and under 1024px wide (some phones and render tools report no
   coarse pointer) */
@media (pointer: coarse), (max-width: 1023px) { :root { --ctl: 44px; } }

*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip on html too, so body's own clip applies to body's box (on body alone it passes to the viewport, and a
   phone's layout viewport still grows to fit anything too wide: a long link) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01'; overflow-x: clip; scroll-padding-top: 16px; }
/* In-page jumps (the skip link, #join, #your-uploads, the agreement's parts) land below whatever sticks to the top: the
   public header (57px) from 721px wide; the app's top bar from 721px to 1023px (48px, a hairline, then one row of 44px
   tabs: 93px; the admin's ten tabs take two rows until about 900px wide: 137px). public/js/app.js measures the bar
   into --bar-h, so a jump lands just under it whichever it is; without the script the taller bar is assumed. From
   1024px the app's nav is the sidebar, beside the page, not over it. On phones and short landscape screens nothing
   sticks (The public header, The app shell), so the small default above is enough. */
@media (min-width: 721px) and (min-height: 501px) {
  html:has(body.area-public) { scroll-padding-top: 72px; }
}
@media (min-width: 721px) and (max-width: 1023px) and (min-height: 501px) {
  html:has(body.area-kollector) { scroll-padding-top: calc(var(--bar-h, 93px) + 11px); }
  html:has(body.area-admin) { scroll-padding-top: calc(var(--bar-h, 137px) + 11px); }
}
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); overflow-x: clip; }
.area-public { font-size: 16px; line-height: 24px; }
/* Kollectors work on phones, often outdoors: one size up there */
@media (max-width: 720px) {
  .area-kollector, .area-kollector .tbl, .area-kollector .lede, .area-kollector .choice, .area-kollector .h4, .area-kollector .steps__t, .area-kollector .empty__t, .area-kollector .agree-part .prose { font-size: 15px; line-height: 22px; }
  .area-kollector .field__l { font-size: 14px; }
  .area-kollector .field__hint, .area-kollector .steps__b, .area-kollector .tbl .small { font-size: 13px; line-height: 18px; }
}
h1, h2, h3, h4, p, figure, ol, ul, dl, dd { margin: 0; }
ol[role='list'], ul[role='list'] { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--rule-3); }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--forest); color: var(--on-forest); }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 3px; }
strong, b { font-weight: 700; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.9em; font-variant-numeric: tabular-nums slashed-zero; }
.tbl td, .stat__v { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }

/* ---------- Type: 12 13 14 16 20 24 on a 4px line grid; Cal Sans on the landing only ---------- */
.h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.015em; word-spacing: 0.04em; text-wrap: balance; }
.h2 { font-weight: 700; font-size: 24px; line-height: 32px; letter-spacing: -0.015em; text-wrap: balance; }
.h3 { font-weight: 700; font-size: 16px; line-height: 24px; letter-spacing: -0.008em; }
.h4 { font-weight: 700; font-size: 14px; line-height: 20px; }
@media (max-width: 720px) { .h2 { font-size: 20px; line-height: 28px; } }
.area-public .h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.1; letter-spacing: -0.01em; word-spacing: 0.04em; }
/* sign-in and the other short public pages set their title in Satoshi: Cal Sans is the landing's voice */
.area-public .page-head .h2 { font-family: var(--font-body); font-weight: 700; font-size: 24px; line-height: 32px; letter-spacing: -0.015em; word-spacing: 0; }
.area-public .h3 { font-size: 18px; }
.area-public .h4 { font-size: 16px; line-height: 24px; }
.eyebrow { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.lede { font-size: 14px; line-height: 20px; color: var(--ink-2); max-width: 64ch; text-wrap: pretty; }
.area-public .lede { font-size: clamp(16px, 1.4vw, 18px); line-height: 1.5; max-width: 34em; }
.muted { color: var(--ink-2); }
/* quiet words keep --ink-2 (5.5:1), the darker of the two greys a line of text may take */
.faint { color: var(--ink-2); }
.small { font-size: 13px; line-height: 20px; }
/* a mono space is as wide as a digit: closer spaces keep a duration whole to the eye ("1 min 15 s", not "1  min  15  s") */
.num { font-family: var(--font-mono); font-weight: 400; font-size: 0.93em; font-variant-numeric: tabular-nums slashed-zero; word-spacing: -0.2em; }
.nw { white-space: nowrap; }
/* free text that may hold a long link or file name (a review note): it wraps anywhere, so a table column can narrow */
.cell-wrap { overflow-wrap: anywhere; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--margin); }
.container--wide { max-width: var(--max-wide); }
.main { flex: 1; padding-block: 28px 64px; }
.narrow { max-width: 440px; }
.narrow-m { max-width: 760px; }
.stack > * + * { margin-top: 16px; }
.stack-l > * + * { margin-top: 32px; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cluster.gap-s { gap: 8px; }
.between { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
/* three a row from a tablet up (each track at least 30%: never four), so three cards never leave one alone */
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(210px, 30%)), 1fr)); }
.grid-4 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
/* four cards read 4, 2 or 1 a row, never 3 and one alone */
@media (min-width: 632px) and (max-width: 846px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section { margin-top: 32px; }
.section > h2, .section > .h2, .section > .h3 { margin-bottom: 12px; }
.section > .h3 + .muted, .section > .between + .muted { margin-top: -8px; margin-bottom: 12px; }
.section > .between { margin-bottom: 12px; }
.section > * + .tbl-wrap { margin-top: 12px; }
.center { text-align: center; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 20px 0; }
.inline-form { display: inline; margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* lime, so it shows on the forest sidebar as well as on the canvas */
.skip { position: absolute; left: 12px; top: -64px; z-index: 30; background: var(--lime); color: var(--ink); font-weight: 700; padding: 10px 16px; border: 1px solid var(--lime-edge); border-radius: var(--radius-s); }
.skip:focus { top: 12px; }
/* in the app the skip link opens over the forest sidebar or top bar: a lime ring there, the forest one on the canvas */
body:not(.area-public) .skip:focus-visible { outline-color: var(--lime); }
/* a heading row with its "see all" link: the link is quiet and sits on the heading's baseline */
.between > a, .card__head > a { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.between > a:hover, .card__head > a:hover { color: var(--ink); }

/* ---------- The app shell: a forest sidebar (the control room) ---------- */
.shell { flex: 1; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; background: linear-gradient(90deg, var(--forest) var(--side-w), var(--bg) var(--side-w)); }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--forest); color: var(--pale); padding: 20px 12px 16px; gap: 20px; }
/* a window too short for the whole sidebar (the admin's: about 600px, ADMIN_NAV in src/views/layout.tsx): it scrolls
   with the page, so no link is ever out of reach below the fold */
@media (min-width: 1024px) and (max-height: 639px) { .side { position: static; height: auto; align-self: start; } }
.side__top { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; min-height: 32px; }
.side__brand { display: inline-flex; align-items: center; min-height: 24px; text-decoration: none; }
.side__logo { height: 20px; width: auto; }
.side__logo--short { display: none; }
/* the role tag is a label, not a signal: outlined, never lime-filled */
.side__tag { font-size: 11px; line-height: 16px; font-weight: 700; color: var(--on-forest); background: none; box-shadow: inset 0 0 0 1px var(--on-forest-2); padding: 1px 6px; border-radius: var(--radius-xs); }
/* the nav runs to the sidebar's edges, so the cursor can sit on the edge itself; a sidebar taller than its window (one
   more admin nav item) scrolls its links inside itself, so Sign out stays in reach */
.side__nav { flex: 1; overflow-y: auto; margin-inline: -12px; padding-inline: 12px; }
.side__nav ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.side__nav a { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--ctl); padding: 0 8px 0 12px; border-radius: var(--radius-s); color: var(--on-forest-2); font-weight: 500; text-decoration: none; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.side__nav a:hover { background: var(--forest-3); color: var(--on-forest); }
.side__nav a[aria-current='page'] { background: var(--forest-2); color: var(--on-forest); font-weight: 700; }
/* the timing cursor: the logo's lime bar, on the sidebar's own edge, marks the page you are on */
.side__nav a[aria-current='page']::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--lime); }
.side__nav a:focus-visible { outline-offset: -2px; }
/* a count waiting behind a nav item or a quick link (applications, reviews, deletion requests): lime, it waits on you */
.count { display: inline-grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 500; line-height: 16px; min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--radius-xs); background: var(--lime); color: var(--forest-2); font-variant-numeric: tabular-nums; }
.side__foot { display: grid; gap: 8px; padding: 16px 12px 0; border-top: 1px solid var(--forest-rule); }
.side__who { display: grid; gap: 0; min-width: 0; }
.side__name { font-weight: 700; color: var(--on-forest); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__code { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--on-forest-2); }
/* Sign out reads as a link: underlined */
.side__out { justify-self: start; display: inline-flex; align-items: center; background: none; border: 0; padding: 0; min-height: 24px; color: var(--on-forest-2); font-size: 13px; text-decoration: underline; text-decoration-color: var(--on-forest-2); text-underline-offset: 3px; cursor: pointer; }
.side__out:hover { color: var(--on-forest); text-decoration-color: currentColor; }
.side :focus-visible { outline-color: var(--lime); }
/* on a touch screen, and in the top bar, the logo link and Sign out are 40px tap targets */
@media (pointer: coarse), (max-width: 1023px) { .side__brand, .side__out { min-height: 40px; } }
.shell__body { min-width: 0; display: flex; flex-direction: column; }
.shell__main { width: 100%; max-width: var(--max); padding-inline: var(--gutter); margin-inline: 0; }
.shell__main--wide { max-width: var(--max-wide); }
.shell__flash { padding: 16px var(--gutter) 0; max-width: var(--max); }
.shell__flash--wide { max-width: var(--max-wide); }
.shell__flash .flash { margin-top: 0; }
.shell__flash + .main { padding-top: 20px; }

/* Phones and tablets: the sidebar becomes a top bar, the nav a row of tabs with the lime bar under the current one.
   The tabs wrap onto a second row rather than hide past the edge (the admin has ten): every link stays in view. */
@media (max-width: 1023px) {
  .shell { display: flex; flex-direction: column; min-height: 100dvh; background: var(--bg); }
  .shell__body { flex: 1; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; padding: 0; gap: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'top foot' 'nav nav'; }
  .side__top { grid-area: top; min-height: 48px; padding: 0 16px; }
  .side__foot { grid-area: foot; border-top: 0; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
  .side__who { display: none; }
  /* a Kollector's code is what support and payouts know them by: it stays in view, an outlined chip beside Sign out */
  .area-kollector .side__who { display: block; }
  .area-kollector .side__name { display: none; }
  .area-kollector .side__code { display: block; padding: 2px 6px; border-radius: var(--radius-xs); box-shadow: inset 0 0 0 1px var(--forest-rule); color: var(--pale); }
  .side__nav { grid-area: nav; overflow: visible; margin-inline: 0; padding-inline: 0; border-top: 1px solid var(--forest-rule); }
  .side__nav ul { display: flex; flex-wrap: wrap; gap: 0; padding: 0 8px; white-space: nowrap; }
  .side__nav a, .side__nav a:hover, .side__nav a[aria-current='page'] { min-height: 44px; padding: 0 12px; border-radius: 0; background: none; font-size: 14px; line-height: 20px; }
  .side__nav a[aria-current='page']::before { left: 12px; right: 12px; top: auto; bottom: 0; width: auto; height: 3px; border-radius: 2px 2px 0 0; }
  .shell__main, .shell__flash { padding-inline: 16px; }
  .main { padding-block: 20px 48px; }
}
/* phones and short landscape screens: the bar scrolls away with the page instead of covering a quarter of it */
@media (max-width: 720px), (max-height: 500px) { .side { position: static; } }
@media (max-width: 419px) { .side__logo--full { display: none; } .side__logo--short { display: block; height: 18px; } }
/* a Kollector's few tabs share a phone's width in equal parts, the words centred (and wrap, never hide, if they must) */
@media (max-width: 560px) {
  .area-kollector .side__nav li { flex: 1 1 0; min-width: max-content; }
  .area-kollector .side__nav a, .area-kollector .side__nav a:hover, .area-kollector .side__nav a[aria-current='page'] { justify-content: center; padding: 0 8px; }
  .area-kollector .side__nav a[aria-current='page']::before { left: 8px; right: 8px; }
}
/* the admin's ten tabs make two rows on a phone, not three with one alone: smaller type, closer tabs */
@media (max-width: 499px) {
  .area-admin .side__nav ul { padding: 0 4px; }
  .area-admin .side__nav a, .area-admin .side__nav a:hover, .area-admin .side__nav a[aria-current='page'] { padding: 0 6px; font-size: 13px; }
  .area-admin .side__nav a[aria-current='page']::before { left: 6px; right: 6px; }
}
/* a team lead's six tabs (with Team) take smaller type, so they keep one row as five do */
@media (max-width: 459px) {
  .area-kollector .side__nav ul:has(> li:nth-child(6)) { padding: 0 4px; }
  .area-kollector .side__nav ul:has(> li:nth-child(6)) a { padding: 0 6px; font-size: 13px; }
  .area-kollector .side__nav ul:has(> li:nth-child(6)) a[aria-current='page']::before { left: 6px; right: 6px; }
}
/* five tabs still fit one row on a 360px phone */
@media (max-width: 400px) {
  .area-kollector .side__nav ul { padding: 0 4px; }
  .area-kollector .side__nav a, .area-kollector .side__nav a:hover, .area-kollector .side__nav a[aria-current='page'] { padding: 0 5px; }
  .area-kollector .side__nav a[aria-current='page']::before { left: 5px; right: 5px; }
}
@media (max-width: 379px) {
  .area-admin .side__nav a, .area-admin .side__nav a:hover, .area-admin .side__nav a[aria-current='page'] { padding: 0 4px; }
  .area-admin .side__nav a[aria-current='page']::before { left: 4px; right: 4px; }
}

/* ---------- The public header ---------- */
.hdr { background: var(--bg); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
/* phones and short landscape screens: it scrolls away with the page */
@media (max-width: 720px), (max-height: 500px) { .hdr { position: static; } }
.hdr__bar { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.hdr__brand { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.hdr__logo { height: 22px; width: auto; }
.hdr__logo--short { display: none; }
@media (max-width: 419px) { .hdr__logo--full { display: none; } .hdr__logo--short { display: block; height: 20px; } }
.hdr__end { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- Footer ---------- */
.ftr { border-top: 1px solid var(--rule); padding-block: 20px 28px; margin-top: auto; }
/* the app's footer: one hairline above it, inside the page's own gutter */
.ftr--app { border-top: 0; padding-block: 0 24px; }
.ftr__in { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.ftr--app .ftr__in { padding-top: 16px; }
.ftr--app .ftr__in::before { content: ''; flex: 0 0 100%; order: -1; border-top: 1px solid var(--rule); margin-bottom: 8px; }
/* the logo link is a 40px tap target, its logo 20px tall */
.ftr__brand { display: inline-flex; align-items: center; min-height: 40px; }
.ftr__brand img { height: 20px; width: auto; }
.ftr__links { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0; margin: 0; list-style: none; font-size: 13px; }
/* the links read as links: underlined; each a 40px tap target on a touch screen */
.ftr__links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-2); }
.ftr__links a:hover { color: var(--ink); text-decoration-color: currentColor; }
@media (pointer: coarse), (max-width: 1023px) { .ftr__links a { min-height: 40px; } }
.ftr__op { font-size: 12px; line-height: 16px; color: var(--ink-2); margin-left: auto; }
@media (max-width: 640px) { .ftr__op { margin-left: 0; width: 100%; } }

/* ---------- Page head: back link, title, one line of help, a rule ---------- */
.page-head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.page-head > * + * { margin-top: 4px; }
.page-head > .eyebrow + .h2 { margin-top: 0; }
.page-head > .h2 + p:not(.lede), .page-head > .lede + p { margin-top: 12px; }
/* a row of tags or the rate under the title (a project page) sits as a line of help does; two rows, 8px apart */
.page-head > .h2 + .cluster, .page-head > .lede + .cluster { margin-top: 12px; }
.page-head > .cluster + .cluster { margin-top: 8px; }
.area-public .page-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 24px; }
.area-public .page-head > * + * { margin-top: 8px; }
.area-public .page-head .lede { font-size: 16px; line-height: 24px; }
/* the way back: small, its chevron drawn (no arrow typed into the words); on a touch screen a 40px tap target whose
   extra height hangs into the space above it */
.back { display: flex; width: fit-content; gap: 6px; align-items: center; min-height: 24px; margin: -4px 0 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }
.back::before { content: ''; flex: none; width: 6px; height: 6px; margin: 0 1px 0 3px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
@media (pointer: coarse), (max-width: 1023px) { .back { min-height: 40px; margin: -12px 0 0; } }

/* Sign in, and the other short public pages: one panel, centred */
.area-public .main > .narrow { margin: clamp(16px, 6vh, 64px) auto 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-l); padding: clamp(20px, 4vw, 32px); }
.area-public .main > .narrow .btn--primary { width: 100%; }
.area-public .main > .narrow > .page-head:last-child { margin-bottom: 0; }
/* its small links under the main button ("Send a new code", "Use a different email"): on a narrow phone, where they
   cannot share a line, each is a full-width centred row */
@media (max-width: 379px) {
  .area-public .main > .narrow > .cluster { display: grid; gap: 4px; }
  .area-public .main > .narrow > .cluster .btn { width: 100%; }
}

/* ---------- Flash and notes: a panel with a state edge; the four states are complete ---------- */
.flash, .note { padding: 10px 14px 10px 16px; border-radius: var(--radius-s); border: 1px solid var(--rule); background: var(--card); box-shadow: inset 3px 0 0 var(--ink-3); }
.flash { margin-top: 16px; font-weight: 500; }
.note > * + * { margin-top: 4px; }
.flash--ok, .note--ok { box-shadow: inset 3px 0 0 var(--green); }
.flash--info, .note--info { box-shadow: inset 3px 0 0 var(--blue); }
.flash--warn, .note--warn { box-shadow: inset 3px 0 0 var(--amber-edge); background: var(--amber-wash); border-color: var(--amber-rule); }
.flash--error, .note--error { box-shadow: inset 3px 0 0 var(--red); background: var(--red-wash); border-color: var(--red-edge); color: var(--red); }
.note__list { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Buttons: one height (--ctl), one radius, no shadows ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ctl); padding: 0 14px; border-radius: var(--radius-s); border: 1px solid transparent; font-weight: 700; font-size: 14px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.btn:hover { text-decoration: none; }
/* pressed is a darker fill, not a jump */
.btn--primary { background: var(--lime); color: var(--ink); border-color: var(--lime-edge); }
.btn--primary:hover { background: var(--lime-2); }
.btn--primary:active { background: var(--lime-edge); }
.btn--secondary { background: var(--card); color: var(--ink); border-color: var(--rule-2); }
.btn--secondary:hover { border-color: var(--rule-3); background: var(--card-2); }
.btn--secondary:active { background: var(--bg-2); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--bg-2); }
.btn--dark { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.btn--dark:hover { background: var(--forest-2); }
.btn--danger { background: var(--card); color: var(--red); border-color: var(--red-edge); }
.btn--danger:hover { background: var(--red-tint); border-color: var(--red); }
/* disabled: a grey fill with readable words (5.1:1), not a faded copy; after the variants, so a hover never lights it.
   A button that is sending (public/js/app.js disables it and sets aria-busy) keeps its colours and shows a turning
   ring beside its label instead. */
.btn:disabled:not([aria-busy='true']), .btn[aria-disabled='true'] { background: var(--bg-2); border-color: var(--rule); color: var(--ink-2); cursor: not-allowed; }
.btn[aria-busy='true'] { cursor: progress; pointer-events: none; }
.btn[aria-busy='true']::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: turn 0.7s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.btn--s { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.area-public .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.area-public .btn--s { min-height: 36px; padding: 0 14px; font-size: 14px; }
@media (pointer: coarse), (max-width: 1023px) { .btn--s, .area-public .btn--s { min-height: 40px; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 20px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-section { border-top: 1px solid var(--rule); padding-top: 24px; }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section > h2 { margin-bottom: 16px; }
.field { display: grid; gap: 6px; align-content: start; border: 0; padding: 0; margin: 0; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field__l { font-size: 13px; line-height: 20px; font-weight: 700; color: var(--ink); padding: 0; }
legend.field__l { margin-bottom: 6px; }
.field__opt { font-weight: 400; color: var(--ink-2); }
.field__hint { font-size: 12px; line-height: 16px; color: var(--ink-2); }
.field__err { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--red); }
/* no inset shadows: a field is its edge (--rule-strong, 3:1, darker on hover), a 2px forest ring inside it on focus;
   the edge changes at once (no transition), so a field that loses focus shows its resting edge straight away */
.input { width: 100%; min-height: var(--ctl); padding: 7px 11px; border: 1px solid var(--rule-strong); border-radius: var(--radius-s); background: var(--card); color: var(--ink); font-weight: 500; line-height: 20px; }
.input::placeholder { color: var(--ink-3); font-weight: 400; opacity: 1; }
.input:hover { border-color: var(--ink-2); }
/* an error is a red ring as well as the message, never colour alone; after :hover, so the pointer never greys out the
   red edge; before :focus */
.field--error .input { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.input:focus { border-color: var(--forest); outline: 2px solid var(--forest); outline-offset: -2px; }
/* a field in error keeps its red while it has focus, the focus ring red too (the error outranks the forest, as the
   message says what to fix): public/js/app.js focuses the first one as the page opens (the export page's project, a
   form sent back), so without this its red ring would never be seen */
.field--error .input:focus { border-color: var(--red); outline-color: var(--red); }
/* disabled and read-only fields are sunken */
.input:disabled, .input[readonly] { background: var(--card-2); color: var(--ink-2); border-color: var(--rule); }
input.input[type='number'], input.input[inputmode='decimal'], input.input[inputmode='numeric'] { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums slashed-zero; }
input.input, select.input { height: var(--ctl); }
/* the sign-in code: six digits, set wide in mono so each one can be checked */
input.input[autocomplete='one-time-code'] { height: 48px; font-family: var(--font-mono); font-size: 20px; letter-spacing: 0.32em; font-variant-numeric: tabular-nums slashed-zero; }
textarea.input { min-height: 88px; resize: vertical; }
select.input { appearance: none; }
/* a list to pick from: the select, and a field that suggests as you type (a <datalist>: the admin's project and team
   fields, public/js/pick.js), which is the select's job done by typing. One drawn chevron for both; the browser's own
   marker on such a field (Chrome's, shown on hover beside where the chevron sits) gives way to it: !important, as
   Chrome's own stylesheet shows it otherwise */
select.input, input.input[list] { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235b655f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input.input[list]::-webkit-calendar-picker-indicator { display: none !important; }
/* 16px under 768px, so iOS does not zoom in on focus */
@media (max-width: 767px) { .input, input.input[type='number'], input.input[inputmode='decimal'], input.input[inputmode='numeric'] { font-size: 16px; min-height: 44px; } input.input, select.input { height: 44px; } }
input[type='checkbox'], input[type='radio'] { accent-color: var(--forest); width: 16px; height: 16px; flex: none; margin: 2px 0 0; }
/* the file picker: the browser's own button, dressed as ours */
input[type='file'] { font-size: 13px; color: var(--ink-2); max-width: 100%; }
input[type='file']::file-selector-button { font: inherit; font-weight: 700; color: var(--ink); min-height: var(--ctl); padding: 0 14px; margin-right: 12px; border: 1px solid var(--rule-2); border-radius: var(--radius-s); background: var(--card); cursor: pointer; }
input[type='file']::file-selector-button:hover { border-color: var(--rule-3); background: var(--card-2); }
.choices { display: grid; gap: 8px; }
.choices--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.choices--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; min-height: var(--ctl); padding: 7px 12px; border: 1px solid var(--rule-2); border-radius: var(--radius-s); background: var(--card); cursor: pointer; font-size: 14px; line-height: 20px; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.choice:hover { border-color: var(--rule-3); }
/* the chosen one: a forest ring on --selected (no lime: a choice is not the main action) */
.choice:has(input:checked) { border-color: var(--forest); background: var(--selected); box-shadow: inset 0 0 0 1px var(--forest); }
.choice:has(input:focus-visible) { outline: 2px solid var(--forest); outline-offset: 2px; }
@media (pointer: coarse), (max-width: 1023px) { .choice { padding-block: 11px; } }
/* a plain one-column list of ticks (a review checklist) reads as one ruled group, not a pile of boxes */
.choices:not(.choices--2):not(.choices--3) { gap: 0; border: 1px solid var(--rule-2); border-radius: var(--radius-s); background: var(--card); overflow: hidden; }
.choices:not(.choices--2):not(.choices--3) > .choice { border: 0; border-radius: 0; box-shadow: none; }
.choices:not(.choices--2):not(.choices--3) > .choice + .choice { border-top: 1px solid var(--rule); }
.choices:not(.choices--2):not(.choices--3) > .choice:hover { background: var(--card-2); }
.choices:not(.choices--2):not(.choices--3) > .choice:has(input:checked) { background: var(--selected); }
.choices:not(.choices--2):not(.choices--3) > .choice:has(input:focus-visible) { outline-offset: -2px; }
/* the same on a phone, where the two- and three-column lists fall to one column */
@media (max-width: 500px) {
  .choices.choices--2 { gap: 0; grid-template-columns: 1fr; border: 1px solid var(--rule-2); border-radius: var(--radius-s); background: var(--card); overflow: hidden; }
  .choices--2 > .choice { border: 0; border-radius: 0; box-shadow: none; }
  .choices--2 > .choice + .choice { border-top: 1px solid var(--rule); }
  .choices--2 > .choice:has(input:checked) { background: var(--selected); box-shadow: inset 3px 0 0 var(--forest); }
  .choices--2 > .choice:has(input:focus-visible) { outline-offset: -2px; }
}
@media (max-width: 420px) {
  .choices.choices--3 { gap: 0; grid-template-columns: 1fr; border: 1px solid var(--rule-2); border-radius: var(--radius-s); background: var(--card); overflow: hidden; }
  .choices--3 > .choice { border: 0; border-radius: 0; box-shadow: none; }
  .choices--3 > .choice + .choice { border-top: 1px solid var(--rule); }
  .choices--3 > .choice:has(input:checked) { background: var(--selected); box-shadow: inset 3px 0 0 var(--forest); }
  .choices--3 > .choice:has(input:focus-visible) { outline-offset: -2px; }
}
/* a tick box and its sentence: bare, no box in any state; the whole line is the target (40px on a touch screen) */
.choice--tick, .choice--tick:hover { background: transparent; border-color: transparent; padding: 6px 0; min-height: 0; }
.choice--tick:has(input:checked) { background: transparent; border-color: transparent; box-shadow: none; }
@media (pointer: coarse), (max-width: 1023px) { .choice--tick, .choice--tick:hover { min-height: 40px; padding-block: 10px; } }
.tick { display: grid; gap: 4px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
/* on a Kollector's phone the main action of a form, of the next-step card and of an empty state spans the width */
@media (max-width: 560px) {
  .area-kollector .form-actions .btn--primary, .area-kollector .next .btn, .area-kollector .empty .btn { width: 100%; min-height: 48px; }
}

/* ---------- Panels: one radius, a hairline border, one inset, no shadows ---------- */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--pad); }
.card > * + * { margin-top: 12px; }
.card > .h3 + *, .card > .h4 + * { margin-top: 8px; }
.card > .h3 + .form, .card > .h4 + .form, .card > .h4 + .facts, .card > .h3 + .facts { margin-top: 12px; }
.card > .inline-form { display: block; }
.card--card { background: var(--card); }
/* the old tinted cards are all the same quiet panel now; a coloured edge is kept for state only (.note, .flash) */
.card--pale, .card--sky { background: var(--card); }
.card--sand { background: var(--card-2); }
.card--forest { background: var(--forest); border-color: var(--forest); color: var(--pale); }
.card--forest .muted, .card--forest .eyebrow, .card--forest .lede { color: var(--on-forest-2); }
.card--forest :focus-visible { outline-color: var(--lime); }
.card--line { background: transparent; border: 1px solid var(--rule-2); }
/* the pay terms: the one kind of panel with an edge, and the edge is forest (money), never lime */
.card--money { box-shadow: inset 3px 0 0 var(--forest); }
.card__head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
a.card { display: block; text-decoration: none; transition: border-color var(--t-fast) var(--ease); }
a.card:hover { border-color: var(--rule-3); }
/* a panel inside a panel gives up its frame: columns of one panel, parted by space */
.card > .grid-2 { gap: 24px 40px; margin-top: 16px; }
.card > .grid-2 > .card, .card > .grid-2 > .stat { background: none; border: 0; border-radius: 0; padding: 0; }
.card > .facts { margin-bottom: -10px; }
.area-public .card { border-radius: var(--radius-l); padding: clamp(20px, 3vw, 32px); }

/* ---------- Badges (status): a dot and a word, the same height everywhere ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px 0 7px; border-radius: var(--radius-xs); font-size: 12px; font-weight: 700; line-height: 20px; white-space: nowrap; vertical-align: top; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--neutral { background: var(--bg-2); color: var(--ink-2); }
.pill--ok { background: var(--green-tint); color: var(--green); }
.pill--info { background: var(--blue-tint); color: var(--blue); }
.pill--warn { background: var(--amber); color: var(--amber-ink); }
.pill--bad { background: var(--red-tint); color: var(--red); }
.pill--dark { background: var(--ink); color: var(--on-forest); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-xs); background: var(--card-2); box-shadow: inset 0 0 0 1px var(--rule); font-size: 12px; font-weight: 500; color: var(--ink-2); }
/* a rate is money: mono, ink, in a ruled box. It is not a status, so it carries no colour. */
.rate { display: inline-flex; align-items: center; height: 20px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule-2); padding: 0 7px; border-radius: var(--radius-xs); white-space: nowrap; font-variant-numeric: tabular-nums slashed-zero; vertical-align: top; }
.card--forest .rate { background: transparent; color: var(--pale); box-shadow: inset 0 0 0 1px var(--forest-rule); }

/* ---------- Metrics: one strip of cells split by hairlines; the label leads, the figure follows ---------- */
.stats { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
/* a metric on its own (two inside a card) is a quiet tile; in the strip each cell draws its left and top hairline, and
   the strip's edge hides those on the outer sides */
.stat { display: flex; flex-direction: column; background: var(--card-2); padding: 14px var(--pad) 16px; min-width: 0; border: 1px solid var(--rule); border-radius: var(--radius-s); }
.stats > .stat { background: var(--card); border: 0; border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); border-radius: 0; margin: -1px 0 0 -1px; }
.stat__l { order: -1; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); }
/* a figure too long for its cell wraps, balanced, rather than being cut: a duration keeps its unit with its number
   ("2 min" / "30 s", never "2 min 30" / "s") */
.stat__v { margin-top: 6px; font-weight: 700; font-size: 24px; line-height: 28px; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; text-wrap: balance; }
/* a number or a sum in a metric keeps the metric's own face (a page may mark it .num for a table's sake) */
.stat__v .num { font-family: inherit; font-weight: inherit; font-size: inherit; word-spacing: normal; }
.stat__h { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--ink-2); }
/* no ragged last row: a known number of cells gets a column count that divides it (without :has(), auto-fit) */
@media (min-width: 721px) {
  .stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats:has(> .stat:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats:has(> .stat:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stats:has(> .stat:nth-child(6):last-child), .stats:has(> .stat:nth-child(9):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats:has(> .stat:nth-child(7):last-child), .stats:has(> .stat:nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats:has(> .stat:nth-child(7):last-child) > .stat:last-child { grid-column: span 2; }
}
@media (min-width: 1200px) { .stats:has(> .stat:nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat__v { font-size: 20px; line-height: 24px; }
  /* three metrics sit side by side on a phone; a long figure wraps rather than being cut */
  .stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats:has(> .stat:nth-child(3):last-child) > .stat { grid-column: auto; padding-inline: 12px; }
  .stats:has(> .stat:nth-child(3):last-child) .stat__v { font-size: 18px; overflow-wrap: anywhere; }
}

/* ---------- Tables: dense and scannable; they stack into records on phones ---------- */
/* a table wider than its panel (a tablet, a long review note) scrolls inside the panel instead of losing its last
   columns; position: relative keeps the visually hidden spans inside it too. It never scrolls up and down: a link's
   tap area (Tap targets) may reach a pixel past the last row. */
.tbl-wrap { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; position: relative; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.tbl th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); padding: 10px 12px; background: var(--card-2); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
/* the first and last columns sit on the one inset, in line with the heading above the panel */
.tbl th:first-child, .tbl td:first-child { padding-left: var(--pad); }
.tbl th:last-child, .tbl td:last-child { padding-right: var(--pad); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--card-2); }
.tbl .num, .tbl td.r, .tbl th.r { text-align: right; }
.tbl a { font-weight: 700; text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.tbl .small { line-height: 16px; font-size: 12px; }
.tbl .pill { vertical-align: top; }
/* a date, a duration, a sum or a code stays on one line: its column is as wide as the longest */
.tbl time, .tbl .num, .tbl .mono { white-space: nowrap; }
/* except a link name (a project's, in mono): it is as long as its title, so it breaks after a hyphen, as words do,
   and never pushes the columns beside it out of the panel or past a phone record's edge */
.tbl .cell-slug { white-space: normal; overflow-wrap: break-word; }
/* an email breaks only before its @ and its dots (views/ui.tsx EmailText), so its column is as narrow as its longest
   part */
.tbl .cell-email { overflow-wrap: break-word; }
/* dated lines in a cell (Started, Sent, Reviewed): the words in one column, the times in the next */
.when { display: inline-grid; grid-template-columns: auto auto; column-gap: 8px; text-align: left; }
.when > p { display: contents; }
.when > p > span { color: var(--ink-2); }
/* a totals row: the lines above add up to it, under a double rule, as on a statement (its cells keep their columns'
   inset) */
.tbl tfoot th, .tbl tfoot td { padding-top: 12px; padding-bottom: 12px; border: 0; border-top: 3px double var(--rule-2); background: var(--card); font-size: 14px; line-height: 20px; font-weight: 700; color: var(--ink); text-align: left; }
.tbl tfoot td.num { font-weight: 500; text-align: right; }
/* an empty value */
.nil { color: var(--ink-3); }
/* A real table (not the stacked phone records): a column never starves. Long names (.upl__name, review.css
   .review-file, team.css .team-person, money.css .money-file) break only between words and at hyphens
   (overflow-wrap: break-word adds no break inside a word to a column's least width, where anywhere would let a column
   shrink to one letter); free text (.cell-wrap: a note that may hold a long link) still wraps anywhere, from a readable
   width. A table wider than its panel then scrolls inside it (.tbl-wrap). */
@media (min-width: 721px) {
  .tbl .upl__name { overflow-wrap: break-word; min-width: 12ch; }
  /* a file name in a money or people table (a Kollector's uploads), and a short name (a team's, a project's, a task's)
     that should stay on one line */
  .tbl td.money-file { min-width: 16ch; }
  .tbl .cell-name { min-width: 11ch; overflow-wrap: break-word; }
  .tbl .cell-wrap { min-width: 15ch; }
  /* an upload's dates: each line ("Sent 21 Nov 2026") stays whole, so a label never sits apart from its date */
  .tbl .upl__dates p { white-space: nowrap; }
}
/* a tablet's or a laptop's table, beside the sidebar: closer columns, so more of it fits before it scrolls (the outer
   cells keep the one inset) */
@media (min-width: 721px) and (max-width: 1439px) {
  .tbl th, .tbl td { padding-left: 10px; padding-right: 10px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: var(--pad); }
  .tbl th:last-child, .tbl td:last-child { padding-right: var(--pad); }
}
/* a long table's least needed columns (an application's mount, hours and experience) wait for a wide screen, so the
   rest keep readable widths; a phone's stacked records and the record's own page show them */
@media (min-width: 721px) and (max-width: 1439px) { .tbl .col-more { display: none; } }
/* .col-wide: a column that waits for a laptop's width (1280px) the same way, where the table is otherwise wider than
   its panel on a tablet or beside the sidebar (a Kollector's country and joining date, a team's people's): the phone's
   records and the record's own page show it */
@media (min-width: 721px) and (max-width: 1279px) { .tbl .col-wide { display: none; } }
@media (max-width: 720px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px var(--pad); border-bottom: 1px solid var(--rule); }
  .tbl tr:last-child { border-bottom: 0; }
  /* each cell is "label ... value": the label floated left (a float, not flex, so a value made of words and a tag stays
     one run), the value on the right, wrapping anywhere rather than widening the record */
  .tbl td, .tbl td:first-child, .tbl td:last-child { display: flow-root; padding: 4px 0; border: 0; text-align: right; min-height: 28px; overflow-wrap: anywhere; }
  /* the label keeps the body face (a .num or .mono cell sets the mono one), plain numerals and whole words */
  .tbl td::before { content: attr(data-label); float: left; margin-right: 16px; font-family: var(--font-body); font-size: 12px; line-height: 20px; font-weight: 500; font-variant-numeric: normal; word-spacing: normal; color: var(--ink-2); text-align: left; overflow-wrap: normal; }
  .tbl td:not([data-label])::before, .tbl td[data-label='']::before { display: none; }
  .tbl tbody tr:hover td { background: none; }
  /* a line that says nothing (an empty cell, or only "—") is left out of a phone record */
  .tbl td:empty, .tbl td:has(> .nil:only-child), .tbl td:has(> div > .nil:only-child) { display: none; }
  /* .tbl--rec: the first cell names the record, so it is its heading line (no label, left, bold) */
  .tbl--rec td:first-child { text-align: left; font-weight: 700; padding-bottom: 6px; }
  .tbl--rec td:first-child::before { display: none; }
  .tbl--rec td:first-child .small { font-weight: 400; }
  .tbl tfoot { display: block; border-top: 3px double var(--rule-2); }
  .tbl tfoot tr { padding: 10px var(--pad); border: 0; }
  .tbl tfoot th, .tbl tfoot td, .tbl tfoot th:first-child, .tbl tfoot td:last-child { display: flow-root; padding: 4px 0; border: 0; }
  .tbl tfoot td { text-align: right; }
  .tbl tfoot td:empty { display: none; }
}
/* .tbl--long: the uploads table. Its columns do not fit beside a tablet's or a laptop's sidebar, so up to 1279px it
   stays a list of records, as on a phone (each upload's Withdraw in view, nothing to scroll sideways to); from 1280px it
   is a table whose file names, sizes and projects keep their words. What the review said (tr.upl__more) is a row of its
   own under its upload: the record's last line, or the table's whole width, so a long note never squeezes a column. */
@media (min-width: 721px) and (max-width: 1279px) {
  .tbl--long thead { display: none; }
  .tbl--long, .tbl--long tbody, .tbl--long tr, .tbl--long td { display: block; width: 100%; }
  .tbl--long tr { padding: 10px var(--pad); }
  .tbl--long td, .tbl--long td:first-child, .tbl--long td:last-child { display: flow-root; padding: 4px 0; border: 0; text-align: right; min-height: 28px; overflow-wrap: anywhere; }
  .tbl--long td::before { content: attr(data-label); float: left; margin-right: 16px; font-family: var(--font-body); font-size: 12px; line-height: 20px; font-weight: 500; font-variant-numeric: normal; word-spacing: normal; color: var(--ink-2); text-align: left; overflow-wrap: normal; }
  .tbl--long td:not([data-label])::before, .tbl--long td[data-label='']::before { display: none; }
  .tbl--long tbody tr:hover td { background: none; }
  .tbl--long td:empty, .tbl--long td:has(> .nil:only-child), .tbl--long td:has(> div > .nil:only-child) { display: none; }
  .tbl--long.tbl--rec td:first-child { text-align: left; font-weight: 700; padding-bottom: 6px; }
  .tbl--long.tbl--rec td:first-child::before { display: none; }
  .tbl--long.tbl--rec td:first-child .small { font-weight: 400; }
}
@media (max-width: 1279px) {
  /* a review line is the last line of the record above it: no rule between them */
  .tbl--long tr, .tbl--long tr:last-child { border-bottom: 0; }
  .tbl--long tr + tr:not(.upl__more) { border-top: 1px solid var(--rule); }
  .tbl--long tr:has(+ .upl__more) { padding-bottom: 0; }
  .tbl--long tr.upl__more { padding-top: 0; }
  .tbl--long.tbl--rec td.upl__review { text-align: right; font-weight: 400; padding-bottom: 4px; }
  .tbl--long.tbl--rec td.upl__review::before { display: block; }
}
@media (min-width: 1280px) {
  /* a project page's own uploads: room for a whole file name beside its note */
  .tbl td.upl__name { min-width: 22ch; }
  .tbl--long .upl__name { min-width: 16ch; }
  .tbl--long .upl__project { min-width: 11ch; }
  /* an upload and its review row read as one: the rule above each upload, none between it and its review */
  .tbl--long tbody td { border-bottom: 0; }
  .tbl--long tbody tr + tr:not(.upl__more) td { border-top: 1px solid var(--rule); }
  .tbl--long tr.upl__more td { padding-top: 0; }
  .tbl--long tbody tr:hover + .upl__more td, .tbl--long tbody tr:has(+ .upl__more:hover) td { background: var(--card-2); }
  /* the review row: its label, the words beside it at a reading width */
  .tbl--long td.upl__review::before { content: attr(data-label); float: left; margin-right: 16px; font-size: 12px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
  .tbl--long td.upl__review > div { display: flow-root; max-width: 88ch; }
}

/* ---------- Facts in a row (.bits), references (.ref) ----------
   .bits parts facts that belong together ("3.5 MB | 1 min") with a drawn hairline instead of a typed dot. Each fact
   is a child element; the hairline hangs in the gap to its left, and the one at the start of a line is clipped away,
   so a row that wraps never starts or ends with a stray mark. Keep padding off a .bits element itself. */
.bits { display: flex; flex-wrap: wrap; column-gap: 17px; overflow: hidden; }
span.bits { display: inline-flex; vertical-align: top; max-width: 100%; }
.bits > * { position: relative; min-width: 0; }
.bits > *::before { content: ''; position: absolute; left: -9px; top: 0.3em; bottom: 0.3em; width: 1px; background: currentColor; opacity: 0.32; }
/* an ID someone may quote to support: mono, quiet, never bold */
.ref { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums slashed-zero; overflow-wrap: anywhere; }

/* ---------- Facts, prose, lists, empty ---------- */
.facts { display: grid; }
.facts__row { display: grid; grid-template-columns: minmax(112px, 34%) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.facts__row:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .facts__row { grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 12px; } }
.prose { max-width: 68ch; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 4px; }
.list { padding-left: 20px; margin: 0; }
.list li + li { margin-top: 4px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li::before { content: ''; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--green-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1.5 4l2.4 2.3L8.5 1.6' fill='none' stroke='%231f6b35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat; }
.checklist--no li::before { background: var(--red-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 1.5l5 5M6.5 1.5l-5 5' fill='none' stroke='%23a3271f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat; }
/* a check nobody ticked (a review's saved checks): an empty ring (3.1:1), not a failure */
.checklist--off li { color: var(--ink-2); }
.checklist--off li::before { background: var(--card); box-shadow: inset 0 0 0 1px var(--rule-3); }
.area-public .checklist li::before { margin-top: 4px; }
/* nothing here yet: a real panel with a plain sentence, never a dashed placeholder */
.empty { text-align: left; padding: 24px var(--pad); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.empty__t { font-weight: 700; font-size: 14px; line-height: 20px; }
.empty__b { margin-top: 4px; color: var(--ink-2); max-width: 60ch; }
.empty__b > * + * { margin-top: 12px; }
/* a one-line "nothing yet" under a section heading gets the same panel */
.section > .between + .muted:last-child, .section > .h3 + .muted:last-child { margin: 0; padding: 16px var(--pad); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }

/* ---------- Progress ---------- */
.progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 2px; background: var(--bg-2); overflow: hidden; }
.progress::-webkit-progress-bar { background: var(--bg-2); border-radius: 2px; }
.progress::-webkit-progress-value { background: var(--forest); border-radius: 2px; transition: width 200ms linear; }
.progress::-moz-progress-bar { background: var(--forest); border-radius: 2px; }

/* ---------- The pipeline track (.steps): where you stand, with the timing cursor on now ----------
   Across the page it is a row of cells under one forest line. Beside the page (the home column) and on phones it
   is a rail: done steps are forest and ticked, the step you are on carries the lime cursor, the rest wait. */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 0; padding: 0; margin: 0; list-style: none; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.steps li { position: relative; display: grid; gap: 2px; align-content: start; padding: 18px var(--pad) 14px; background: var(--card); border-left: 1px solid var(--rule); margin-left: -1px; }
.steps li::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--bg-2); }
.steps li.is-done::before { background: var(--forest); }
.steps li.is-now { background: var(--selected); }
.steps li.is-now::before { background: linear-gradient(90deg, var(--forest) 0 var(--pad), var(--bg-2) var(--pad)); }
.steps li.is-now::after { content: ''; position: absolute; top: 0; left: var(--pad); width: 4px; height: 12px; border-radius: 0 0 2px 2px; background: var(--lime); box-shadow: 0 0 0 1px var(--forest); }
.steps__t { font-weight: 700; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.steps li.is-done .steps__t, .steps li.is-now .steps__t { color: var(--ink); }
.steps__b { color: var(--ink-2); font-size: 12px; line-height: 16px; }
.split > aside .steps { grid-template-columns: 1fr; }
.split > aside .steps li { padding: 12px var(--pad) 12px 48px; border-left: 0; margin-left: 0; border-top: 1px solid var(--rule); margin-top: -1px; }
.split > aside .steps li::before { left: 26px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: var(--rule-2); }
.split > aside .steps li:first-child::before { top: 20px; }
.split > aside .steps li:last-child::before { bottom: calc(100% - 20px); }
.split > aside .steps li.is-done::before { background: var(--forest); }
.split > aside .steps li.is-now::before { background: linear-gradient(180deg, var(--forest) 0 20px, var(--rule-2) 20px); }
.split > aside .steps li::after { content: ''; position: absolute; left: 20px; top: 14px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--rule-2); }
.split > aside .steps li.is-done::after { background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'%3E%3Cpath d='M1 3l2 2 4-4' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat; box-shadow: none; }
.split > aside .steps li.is-now::after { left: 18px; top: 19px; width: 18px; height: 4px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 1px var(--forest); }
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Project cards ---------- */
.pcard { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.pcard > * + * { margin-top: 0; }
.pcard__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 13px; color: var(--ink-2); }
.pcard__meta .num { color: var(--ink); }
/* label-and-value pairs ("Accepted 1 min 15 s", "In review 2 min 30 s"): a wider gap than a duration's own spaces, and
   a little more between a label and its value than inside the value */
.pcard__meta--pairs { column-gap: 18px; }
.pcard__meta--pairs .num { margin-left: 2px; }
.pcard__title { font-weight: 700; font-size: 16px; line-height: 24px; letter-spacing: -0.008em; }
.area-public .pcard__title { font-size: 18px; }
.pcard__foot { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------- Video and the uploader ---------- */
.player { background: var(--film); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--film); }
.player video { width: 100%; max-height: 70vh; background: #000; }
/* the player clips what is outside it: the video's focus ring is drawn inside the video, lime on the dark film */
.player video:focus-visible { outline-color: var(--lime); outline-offset: -3px; }
.player__bar { color: var(--film-text); font-family: var(--font-mono); font-size: 12px; line-height: 16px; padding: 10px var(--pad); display: flex; gap: 4px 20px; flex-wrap: wrap; font-variant-numeric: tabular-nums slashed-zero; word-spacing: -0.2em; }
/* the one dashed border in the portal: it means "drop here" */
.drop { border: 1px dashed var(--rule-3); border-radius: var(--radius); padding: 24px var(--pad); text-align: center; background: var(--card-2); transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.drop > * + * { margin-top: 4px; }
.drop.is-over { border-color: var(--forest); border-style: solid; background: var(--selected); }
.drop__t { display: block; font-weight: 700; font-size: 16px; line-height: 24px; cursor: pointer; }
.drop input[type='file'] { display: block; margin: 12px auto 4px; max-width: 100%; cursor: pointer; }
/* choosing files is this page's main action: the picker's own button is the lime one. The browser's "No file
   chosen" line stays, it is the only feedback when the script has not run. */
.drop input[type='file']::file-selector-button { background: var(--lime); border-color: var(--lime-edge); }
.drop input[type='file']::file-selector-button:hover { background: var(--lime-2); border-color: var(--lime-edge); }
/* until public/js/upload.js is ready the picker waits: a grey button, as any disabled one */
.drop input[type='file']:disabled { cursor: not-allowed; }
.drop input[type='file']:disabled::file-selector-button { background: var(--bg-2); border-color: var(--rule); color: var(--ink-2); cursor: not-allowed; }
@media (pointer: coarse), (max-width: 720px) {
  .drop { padding: 20px var(--pad); }
  .drop input[type='file'] { width: 100%; margin: 16px 0 4px; font-size: 14px; text-align: center; }
  .drop input[type='file']::file-selector-button { display: block; width: 100%; min-height: 48px; margin: 0 0 10px; font-size: 16px; }
}
/* nothing to drop on a touch screen */
@media (hover: none) { .drop__hint { display: none; } }
.uploads { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.uploads:empty { display: none; }
.upl { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 12px 16px; display: grid; gap: 8px; }
.upl__top { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.upl__name { font-weight: 700; overflow-wrap: anywhere; }
.upl__meta { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-2); font-variant-numeric: tabular-nums slashed-zero; word-spacing: -0.2em; }
.upl__state { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* a row's buttons go when all of them are hidden */
.upl .cluster:not(:has(> :not([hidden]))) { display: none; }
/* four states, each in words as well as colour: waiting (empty bar), sending (forest bar), failed, sent */
.upl.is-error { border-color: var(--red-edge); box-shadow: inset 3px 0 0 var(--red); }
.upl.is-error .upl__state { color: var(--red); font-weight: 500; }
.upl.is-error .progress::-webkit-progress-value { background: var(--red); }
.upl.is-error .progress::-moz-progress-bar { background: var(--red); }
/* and two ends that are not failures (public/js/upload.js keeps is-error on them, and adds these):
   closed: the upload was closed elsewhere (cancelled in another tab, cleared after 7 days, gone). Nothing broke on this
   line and nothing more is sent from it, so it is a warning, not an error: the amber edge, its words in amber ink */
.upl.is-closed { border-color: var(--amber-rule); box-shadow: inset 3px 0 0 var(--amber-edge); }
.upl.is-closed .upl__state { color: var(--amber-ink); }
/* carried: a failed line whose upload another line now carries on (the same file chosen again). It steps back, no edge
   and quiet words, so the eye goes to the line that sends; it ends with that line */
.upl.is-carried { border-color: var(--rule); box-shadow: none; }
.upl.is-carried .upl__state { color: var(--ink-2); font-weight: 400; }
.upl.is-done { box-shadow: inset 3px 0 0 var(--green); }
.upl.is-done .upl__state { color: var(--green); font-weight: 500; }
.upl.is-done .upl__state a { color: var(--ink); font-weight: 500; }
/* sent: the bar stays, full and green, and the line under it is ticked */
.upl.is-done .progress::-webkit-progress-value { background: var(--green); }
.upl.is-done .progress::-moz-progress-bar { background: var(--green); }
.upl.is-done .upl__state::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'%3E%3Cpath d='M1 3l2 2 4-4' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat; }
.upl__form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* ---------- Landing (pages.css lays out the hero, the terms and the sections) ---------- */
.hero { padding-block: clamp(32px, 6vw, 80px) clamp(24px, 4vw, 48px); }
.hero > * + * { margin-top: 16px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 28px; }
.how { counter-reset: how; }
.how__item { counter-increment: how; }
.how__item::before { content: counter(how, decimal-leading-zero); display: block; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-2); margin-bottom: 12px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0; }
.faq summary::-webkit-details-marker { display: none; }
/* a drawn plus that loses its upright when the answer is open (drawn, so nothing is read out) */
.faq summary::after { content: ''; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--ink-2), var(--ink-2)) center / 12px 1.5px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) center / 1.5px 12px no-repeat; }
.faq details[open] summary::after { background: linear-gradient(var(--ink-2), var(--ink-2)) center / 12px 1.5px no-repeat; }
.faq summary:hover { color: var(--forest); }
.faq details > :not(summary) { margin: -4px 0 16px; color: var(--ink-2); max-width: 64ch; }

/* ---------- Agreement ---------- */
.agree-part { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 24px); }
.agree-part + .agree-part { margin-top: 12px; }
.agree-part h2 { margin-bottom: 10px; }
.agree-part .prose { font-size: 14px; }
.agree-ticks { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 4px; }

/* ---------- Tabs and filters, the pages of a list, and the admin layouts ---------- */
/* tabs on a hairline, the current one underlined in forest exactly as wide as its word; 20px apart; each a 40px
   target (44px on a touch screen), its count apart in mono. flex-end: next to a taller search form the tabs still
   stand on the hairline, so the underline meets it */
.filters { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: flex-end; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
/* when tabs follow the page head, their hairline is the head's: one line, not two */
.page-head:has(+ .filters) { border-bottom: 0; padding-bottom: 0; margin-bottom: 12px; }
/* the tabs themselves run as a line of text, its rows balanced when they wrap, so no tab is left alone on the last
   one; a bar that also holds a search form groups its tabs in a nav */
nav.filters, .filters > nav.cluster { display: block; text-wrap: balance; }
/* the words sit 20px apart; each tab's target reaches halfway into the space on either side (10px of padding taken
   back by the margin), so the tabs touch and a narrow word ("All") is still a wide target */
.filters a { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; margin: 0 10px 0 -10px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); border: 0; background: none; white-space: nowrap; }
.filters a:last-child { margin-right: -10px; }
.filters a:hover { color: var(--ink); }
.filters a[aria-current='true'], .filters a[aria-current='page'] { color: var(--ink); font-weight: 700; }
.filters a[aria-current='true']::after, .filters a[aria-current='page']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--forest); }
/* the first tab starts on the page's edge (nothing hangs out of a row that scrolls) */
.filters a:first-child { margin-left: 0; padding-left: 0; }
.filters a:first-child::after { left: 0; }
.filters a:focus-visible { outline-offset: -2px; }
.filters a .num { font-size: 12px; color: var(--ink-2); font-weight: 400; }
@media (pointer: coarse), (max-width: 1023px) { .filters a { min-height: 44px; } }
.filters form { display: flex; gap: 8px; margin-left: auto; padding-bottom: 8px; }
/* wide enough for its placeholder ("Name, email, city or team") */
.filters .input { min-height: 32px; padding: 4px 10px; min-width: 16em; }
/* on a phone the tabs stay on one line and scroll sideways, with the same edge shade as the top bar: four background
   layers, two that travel with the tabs and cover the shades at each end, two shades that stay at the edges */
@media (max-width: 720px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-padding-inline: 16px; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--rule);
    background: linear-gradient(90deg, var(--bg) 40%, transparent) left / 40px 100% no-repeat local, linear-gradient(270deg, var(--bg) 40%, transparent) right / 40px 100% no-repeat local,
      linear-gradient(90deg, var(--rule-2), transparent) left / 16px 100% no-repeat scroll, linear-gradient(270deg, var(--rule-2), transparent) right / 16px 100% no-repeat scroll; }
  nav.filters, .filters > nav.cluster { white-space: nowrap; }
  .filters::-webkit-scrollbar { display: none; }
  .filters a, .filters > * { flex: none; }
  .filters a[aria-current='true']::after, .filters a[aria-current='page']::after { bottom: 0; }
  /* a tab row that also holds a search form: the tabs scroll, the form takes its own line under them */
  .filters:has(> form) { flex-wrap: wrap; overflow: visible; background: none; box-shadow: none; margin-bottom: 4px; }
  .filters:has(> form) > nav { flex: 1 0 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-padding-inline: 16px; box-shadow: inset 0 -1px 0 var(--rule); }
  .filters:has(> form) > nav::-webkit-scrollbar { display: none; }
  .filters > form { flex: 1 0 100%; margin-left: 0; padding: 12px 0; }
  .filters > form .input { flex: 1; min-width: 0; min-height: var(--ctl); }
}
/* the pages of a long list (.pager, under its table): where this page sits on the left, a count in mono as the tabs'
   counts are ("51–100 of 113", "Page 2 of 7"); the two ways on the right, together, each with a drawn chevron (no
   arrow typed into the words). On the first and the last page the one way left stays on the right, where the eye looks
   for it. */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.pager > :not(a) { order: -1; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-2); font-variant-numeric: tabular-nums slashed-zero; word-spacing: -0.2em; }
.pager > a:first-of-type { margin-left: auto; }
.pager > a[rel] { gap: 6px; }
.pager > a[rel='prev']::before, .pager > a[rel='next']::after { content: ''; flex: none; width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.pager > a[rel='prev']::before { margin-left: -1px; transform: rotate(45deg); }
.pager > a[rel='next']::after { margin-right: -1px; transform: rotate(-135deg); }
.split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); align-items: start; }
/* minmax(0, …): a wide table inside narrows to the screen (and scrolls in its panel) instead of widening the column */
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
/* a split whose main column holds wide tables (an admin's team page: its people and keys) is one column until 1440px,
   the side column under it, so no table is cut at its panel's edge */
@media (max-width: 1439px) { .split--tables { grid-template-columns: minmax(0, 1fr); } }
/* stacked, its side column's panels (the actions and their forms) sit two a row, each a readable width */
@media (min-width: 721px) and (max-width: 1439px) {
  .split--tables > :last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .split--tables > :last-child > * + * { margin-top: 0; }
}
.warn-text { color: var(--amber-ink); font-weight: 700; }
.bad-text { color: var(--red); font-weight: 700; }

/* ---------- Tap targets on touch screens and under 1024px wide (as --ctl) ---------- */
/* A link that stands alone (a project card's, a section head's) is a 40px target. A link alone in its paragraph, a
   fact's, a metric's and a table's get a 40px hit area without moving the lines around it (padding that leaves its line
   as it is), so a fact's, a figure's or a record's link stays level with its neighbours; such a link's focus ring is
   drawn inside that area, so a table's panel never cuts it. Links inside a sentence keep their line (WCAG 2.5.8's inline
   exception). */
@media (pointer: coarse), (max-width: 1023px) {
  :where(p > a:only-child:not(.btn)) { padding-block: 13px; }
  .tbl td a:not(.btn), .facts dd a, .stat__v a { padding-block: 13px; margin-block: -13px; }
  .tbl td a:not(.btn):focus-visible, .facts dd a:focus-visible, .stat__v a:focus-visible { outline-offset: -2px; }
  .pcard__title a, .pcard__foot a:not(.btn), .sec-row > a:not(.btn), .between > a:not(.btn), .cluster > a:not(.btn) { display: inline-flex; align-items: center; min-height: 40px; padding-block: 0; }
}

/* ---------- Dev outbox ---------- */
.outbox { display: grid; gap: 10px; }
/* anywhere: an invite link is one long run */
.outbox__body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 12px; background: var(--card-2); border: 1px solid var(--rule); padding: 10px; border-radius: var(--radius-s); margin-top: 6px; }

@media print {
  .hdr, .side, .ftr, .skip, .btn, form { display: none !important; }
  /* no sidebar column, and no forest stripe behind the page when background graphics are on */
  .shell { display: block; background: none; }
  .card, .agree-part { break-inside: avoid; }
}
