/* ---- tokens.css ---- */
/* ============================================================================
   NAWTT portals - one stylesheet for login, employer, employee, platform.
   Palette, radii, type scale and motion come from the NAWTT brand tokens.
   No gradients, no frameworks, no images: flat brand fields + the Core mark.
   ========================================================================== */

/* --- 1. Typefaces: Manrope for Latin and figures, Baloo 2 for the wordmark -- */
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-latin-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Baloo 2';
  src: url('/fonts/baloo2-latin-var.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* --- 2. Tokens ------------------------------------------------------------- */
:root {
  --nawtt-burgundy: #8a1538;
  --nawtt-burgundy-deep: #6d1030;
  --nawtt-burgundy-soft: #f3e7ea;
  --nawtt-offwhite: #f7f3ed;
  --nawtt-surface: #fffdfa;
  --nawtt-green: #10513c;
  --nawtt-green-deep: #0b3c2c;
  --nawtt-green-soft: #e6efeb;
  --nawtt-neutral: #211f1d;
  --nawtt-neutral-soft: #ece8e2;
  --nawtt-gold: #b58b4c;
  --nawtt-ink: #000000;
  --nawtt-muted: #000000;
  --nawtt-line: #e2dbd1;
  --nawtt-control-line: #6d6660;
  --nawtt-focus: #8a1538;
  --nawtt-danger: #b3261e;
  --nawtt-warning: #8a6d3b;

  --nawtt-radius-control: 3px;
  --nawtt-radius-module: 12px;

  --nawtt-space-1: 0.25rem;
  --nawtt-space-2: 0.5rem;
  --nawtt-space-3: 0.75rem;
  --nawtt-space-4: 1rem;
  --nawtt-space-5: 1.25rem;
  --nawtt-space-6: 1.5rem;
  --nawtt-space-8: 2rem;

  --nawtt-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nawtt-font-wordmark: 'Baloo 2', var(--nawtt-font);

  --nawtt-title: 1.0625rem;
  --nawtt-row: 0.875rem;
  --nawtt-meta: 0.6875rem;
  --nawtt-hero: 2.625rem;
  --nawtt-button: 0.875rem;

  --nawtt-shadow: 0 1px 2px rgba(33, 31, 29, 0.05);
  --nawtt-shadow-lifted: 0 12px 32px rgba(33, 31, 29, 0.14);

  /* Motion is slow and settled, never snappy: state changes ease out of the way,
     entrances take their time, and nothing in a table animates on a redraw. */
  --nawtt-motion-fast: 180ms;
  --nawtt-motion-base: 320ms;
  --nawtt-motion-slow: 560ms;
  --nawtt-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --nawtt-z-sticky: 4;
  --nawtt-z-overlay: 5;
  --nawtt-z-dialog: 20;
}

@media (prefers-contrast: more) {
  :root {
    --nawtt-muted: var(--nawtt-neutral);
    --nawtt-line: var(--nawtt-neutral);
    --nawtt-control-line: var(--nawtt-neutral);
  }
}


/* ---- base.css ---- */
/* --- 3. Reset and base ----------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--nawtt-offwhite);
  color: var(--nawtt-ink);
  font-family: var(--nawtt-font);
  font-size: var(--nawtt-row);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p, dl, dd, dt, ul, ol { margin: 0; }
ul, ol { padding-inline-start: var(--nawtt-space-4); }
h1, h2, h3 { font-weight: 700; line-height: 1.25; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); }
h2 { font-size: 1.0625rem; }
h3 { font-size: 0.9375rem; }
a { color: var(--nawtt-burgundy); text-underline-offset: 0.15em; }
a:hover { color: var(--nawtt-burgundy-deep); }
img, svg { display: block; max-inline-size: 100%; }
[hidden] { display: none !important; }

::selection { background: var(--nawtt-burgundy-soft); color: var(--nawtt-ink); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--nawtt-focus);
  outline-offset: 2px;
}
:where(:focus:not(:focus-visible)) { outline: none; }

/* --- 4. Utilities ---------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: none;
}

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--nawtt-space-4);
  z-index: var(--nawtt-z-overlay);
  padding: var(--nawtt-space-2) var(--nawtt-space-4);
  background: var(--nawtt-surface);
  border: 1px solid var(--nawtt-burgundy);
  border-radius: var(--nawtt-radius-control);
  font-weight: 600;
  transition: inset-block-start var(--nawtt-motion-fast) var(--nawtt-motion-ease);
}
.skip-link:focus { inset-block-start: var(--nawtt-space-2); }

.wordmark {
  font-family: var(--nawtt-font-wordmark);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stack { display: grid; gap: var(--nawtt-space-6); }
.stack--tight { gap: var(--nawtt-space-4); }
.stack .kpi-grid { margin-block-end: 0; }

/* two cards side by side on a desktop screen, one above the other on a phone */
.cols { display: grid; gap: var(--nawtt-space-6); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.cols--wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
@media (max-width: 1024px) { .cols, .cols--wide-left { grid-template-columns: minmax(0, 1fr); } }

/* small caps voice used above figures, in table heads and on chips */
.eyebrow {
  font-size: var(--nawtt-meta);
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nawtt-muted);
}

/* U-14: the global reduced-motion reset lives in base.css (it was misfiled at the end of the automation section). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- components/accounting-fields.css ---- */
/* --- Accounting: field errors + phone-sized touch targets (U-4, U-12) ------ */
.field__error { display: block; color: var(--ink, #000); font-size: .82em; margin-block-start: 2px; }
@media (max-width: 480px) {
  .accounting-body .btn,
  .accounting-body .accounting-tabs .tab,
  .accounting-body .filter { min-height: 44px; }
  .accounting-body .topbar__inner,
  .accounting-body .topbar__end { flex-wrap: wrap; gap: 6px; }
  .accounting-body .shell { padding-inline: 12px; }
  .accounting-body .card__tools { gap: 6px; }
}


/* --- UIQ-1 (lane STYLES): the field error line at the 14 px floor on the books, desktop -------------------------- */
@media (min-width: 761px) {
  .accounting-body .field__error { font-size: var(--nawtt-row); margin-block-start: var(--nawtt-space-1); }
}

/* ---- components/accounting.css ---- */
/* --- Accounting portal (phase C) ------------------------------------------ */
.accounting-body { --accounting-gap: clamp(14px, 2vw, 22px); }
.accounting-tabs { overflow-x: auto; scrollbar-width: thin; }
.accounting-tabs .tab { white-space: nowrap; }
.card__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card__tools .input { width: auto; min-width: 9rem; }
.form-grid--three { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kv-list .kv { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line, rgba(0, 0, 0, .08)); padding-bottom: 6px; }
.amount-cell, .table td.amount-cell, .table th.amount-cell { text-align: end; font-variant-numeric: tabular-nums; }
.totals-line { margin: 10px 0 0; font-weight: 600; }
.state-box { border: 1px dashed var(--line, rgba(0, 0, 0, .2)); border-radius: 12px; padding: 18px; margin-block-start: 12px; background: rgba(0, 0, 0, .015); }
.state-box--error { border-color: var(--nawtt-danger); }
.state-box__title { margin: 0 0 4px; font-weight: 600; }
.state-box__text { margin: 0 0 8px; opacity: 1; }
.panel-state[data-state='loading'] { border-style: solid; }
.panel-state { min-block-size: 96px; }
.state-box--offline { border-color: var(--nawtt-warning); background: rgba(138, 109, 59, .06); }
.state-box--empty { border-style: dashed; }
.alert__details { display: block; margin-block-start: 4px; opacity: 1; font-size: .82em; }
.alert__details code { font: inherit; }
.state-box__details { margin: 0 0 8px; opacity: 1; font-size: .82em; }
.state-box__details code { font: inherit; }
.credit-history { margin-block-start: 14px; }
.credit-history .receipts { margin-block-start: 6px; }
.invoice-lines { margin-block-start: 8px; }
.table--nested { margin: 0; background: transparent; }
.table--nested th { font-size: .82em; }
.invoice-detail__state { margin: 0 0 6px; font-weight: 600; }
.empty[data-state='empty'] { opacity: 1; }
.skeleton { background: linear-gradient(90deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .12), rgba(0, 0, 0, .06)); background-size: 200% 100%; animation: skeleton-sweep 1.2s ease-in-out infinite; border-radius: 8px; }
.skeleton--line { height: 16px; margin-block: 8px; }
@keyframes skeleton-sweep { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line, rgba(0, 0, 0, .08)); border-radius: 10px; padding: 10px 12px; }
.check-item--done { border-color: rgba(20, 110, 60, .35); }
.check-item--blocking { border-color: rgba(179, 38, 30, .45); background: rgba(179, 38, 30, .04); }
.check-item__mark { font-weight: 700; min-width: 1ch; }
.check-item__copy { display: grid; gap: 2px; }
.check-item__title { font-weight: 600; }
.check-item__detail { opacity: 1; font-size: .92em; }
.integrity-list .check-item { align-items: center; }
/* UIQ-3: the integrity table is a pass/fail badge (fixed width, LEFT) then the check text (RIGHT), exactly one line a row;
   a long text ends in an ellipsis and keeps its full text in the title; the tick/cross mark stays for readers, off screen */
.integrity-summary { display: flex; flex-wrap: wrap; gap: var(--nawtt-space-2, 8px); padding: var(--nawtt-space-3) var(--nawtt-space-4) 0; }
.integrity-list { grid-template-columns: minmax(0, 1fr); }
.integrity-list .check-item { min-inline-size: 0; position: relative; gap: 12px; padding-block: 10px; min-block-size: 44px; }
.integrity-list .check-item > .chip { flex: 0 0 5.5rem; inline-size: 5.5rem; justify-content: center; text-align: center; white-space: nowrap; }
.integrity-list .check-item__copy { display: flex; flex: 1 1 auto; min-inline-size: 0; max-inline-size: none; overflow: hidden; white-space: nowrap; }
.integrity-list .check-item__title { flex: 0 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
.integrity-list .check-item__detail { flex: 1 1 0; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
.accounting-body .integrity-list .check-item:last-child { border-block-end: 1px solid transparent; }
.integrity-list .check-item__detail { margin-inline-start: .75em; }
.integrity-list .check-item__mark { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
.draft-list { display: grid; gap: 12px; }
.draft-card { border: 1px solid var(--line, rgba(0, 0, 0, .1)); border-radius: 12px; padding: 12px 14px; background: #fff; display: grid; gap: 8px; }
.draft-card__head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.draft-card__title { margin: 0; font-size: 1.02rem; }
.draft-card__meta { margin: 0; opacity: 1; font-size: .9em; }
.draft-card__reason { margin: 0; font-weight: 600; }
.draft-card__note { margin: 0; color: var(--nawtt-burgundy); }
.draft-card__totals { margin: 0; font-weight: 700; text-align: end; }
.draft-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.draft-card__readonly { opacity: 1; font-size: .9em; }
.draft-card .table { margin: 0; }
.line-row .input { width: 100%; min-width: 6rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block-start: 12px; }
.statement__head { display: grid; gap: 2px; margin-block-end: 8px; }
.statement__block { margin-block-start: 14px; display: grid; gap: 6px; }
.statement__title { margin: 0; }
[dir='rtl'] .amount-cell, [dir='rtl'] .draft-card__totals { text-align: end; }
[dir='rtl'] .check-item__mark { order: 2; }
.banner--warn { margin: 0; border-radius: 0; }

/* BOOKS-1 Q1: the mount points of the extra screens (accounting-extra.js) keep wide tables inside their card at tablet width */
.accounting-mount { min-width: 0; max-width: 100%; overflow-x: auto; }
.accounting-subtabs { margin-block-start: 6px; }

/* --- UIQ-1: table cells that must never break (figures, dates, periods, entry numbers) and long keys that clip --- */
.table td.cell-nowrap, .table th.cell-nowrap { white-space: nowrap; }
.table td.cell-clip { white-space: nowrap; max-inline-size: 18rem; }
.cell-clip__text { display: block; max-inline-size: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .table td.cell-clip, .cell-clip__text { max-inline-size: 12rem; } }

/* --- UIQ-1 (lane STYLES): the accounting desk's design rules (AUDIT.md "Design rules" 1, 3, 5, 6, 7) ------------------
   EVERY rule below is scoped to body.accounting-body (only accounting.html carries it), so the employer, platform and
   employee pages cannot change. The layout rules apply from 761 px (desktop and tablet); phones keep the MOB-1 layer
   (mobile.css, imported last) exactly as it was, and every size that is a TOUCH TARGET (tabs 40/36 px, compact 32 px
   buttons) is set only for a fine pointer, so a touch screen keeps MOB-1's 44 px whatever its width. One spacing scale: 4 / 8 / 12 / 16 / 24 (--nawtt-space-1..6). */
.accounting-body .amount-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }   /* UIQ-11: a figure never breaks */
@media (min-width: 761px) {
  /* UIQ-39 (owner approved): the page cap is 1440 px for the books (9-column tables), topbar aligned with it */
  .accounting-body .shell { max-inline-size: 1440px; padding-block-start: var(--nawtt-space-4); }
  .accounting-body .topbar__inner { max-inline-size: 1440px; }
  /* UIQ-32 (owner approved): the page head is ONE line — eyebrow, title, subtitle (ellipsis if it must), the demo mark */
  .accounting-body .page-head { flex-wrap: nowrap; align-items: center; margin-block-end: var(--nawtt-space-3); }
  .accounting-body .page-head__copy { display: flex; align-items: baseline; gap: var(--nawtt-space-3); min-inline-size: 0; }
  .accounting-body .page-head h1 { font-size: 1.375rem; line-height: 1.25; white-space: nowrap; }
  .accounting-body .page-head .eyebrow { font-size: var(--nawtt-row); letter-spacing: 0.04em; white-space: nowrap; }
  .accounting-body .page-head__sub { margin: 0; font-size: var(--nawtt-row); max-inline-size: none; min-inline-size: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .accounting-body .page-head__aside { flex: 0 0 auto; }
  .accounting-body .live-dot { font-size: var(--nawtt-row); letter-spacing: 0.04em; }
  /* UIQ-41 (owner approved): the section tabs are a 40 px bar; the screens of a section a 36 px segmented row under it */
  .accounting-body .accounting-tabs { margin-block-end: var(--nawtt-space-3); }
  .accounting-body .accounting-tabs .tab { padding: var(--nawtt-space-2) var(--nawtt-space-4); font-size: var(--nawtt-row); }
  .accounting-body .accounting-subtabs { margin-block: calc(-1 * var(--nawtt-space-1)) var(--nawtt-space-4); gap: var(--nawtt-space-1); border-block-end: none; }
  .accounting-body .accounting-subtabs .tab { padding: var(--nawtt-space-1) var(--nawtt-space-3); border-radius: var(--nawtt-radius-control); }
  .accounting-body .accounting-subtabs .tab[aria-selected='true'] { background: var(--nawtt-burgundy-soft); }
  .accounting-body .accounting-subtabs .tab[aria-selected='true']::after { content: none; }
  .accounting-body .tab__badge { font-size: var(--nawtt-row); min-inline-size: 22px; block-size: 22px; }
  /* UIQ-38: one 16 px stack between the blocks of a panel; an empty mount takes no slot (no doubled gap) */
  .accounting-body .panel { gap: var(--nawtt-space-4); }
  .accounting-body .accounting-mount:empty { display: none; }
  .accounting-body .panel > .kpi-grid { margin-block-end: 0; gap: var(--nawtt-space-3); }
  /* cards: head 12/16, body 16 (rule 1) */
  .accounting-body .card__head { padding: var(--nawtt-space-3) var(--nawtt-space-4); }
  .accounting-body .card__hint { font-size: var(--nawtt-row); line-height: 1.45; }
  /* UIQ-31: a KPI reserves no empty second line; KPI label and note at the 14 px floor, sentence case */
  .accounting-body .kpi { padding: var(--nawtt-space-3) var(--nawtt-space-4); }
  .accounting-body .kpi__label { font-size: var(--nawtt-row); letter-spacing: 0; text-transform: none; font-weight: 600; }
  .accounting-body .kpi__note { font-size: var(--nawtt-row); line-height: 1.45; min-block-size: 0; }
  /* 7 KPIs: columns wide enough for "October 2026" (never clipped), the label clear of the corner icon */
  .accounting-body .panel > .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
  .accounting-body .kpi { align-content: start; }   /* a short note is not stretched to the row height (UIQ-31) */
  .accounting-body .kpi__value { font-size: 1.5rem; white-space: normal; }   /* "October 2026 — Open" wraps at its dash, never clipped */
  .accounting-body .kpi__label { padding-inline-end: 2.5rem; }
  .accounting-body .topbar .identity { font-size: var(--nawtt-row); }

  /* rule 3 / UIQ-26/27: TWO button sizes. Regular 44 px (forms, tool rows, card heads, actions) and compact 32 px (inside
     a table, and the topbar's Sign out); 14 px text on both, no 11 px button anywhere. */
  .accounting-body .btn,
  .accounting-body .btn--sm { min-block-size: 44px; padding: 0 var(--nawtt-space-4); font-size: var(--nawtt-button); letter-spacing: 0; line-height: 1.2; }
  .accounting-body .btn--sm svg { inline-size: 16px; block-size: 16px; }
  .accounting-body .btn--icon { inline-size: 44px; padding: 0; }
  /* UIQ-29: "not yet", not "broken": a disabled button is neutral grey at full opacity */
  .accounting-body .btn[disabled] { opacity: 1; background: var(--nawtt-neutral-soft); border-color: var(--nawtt-line); color: var(--nawtt-muted); }

  /* rule 5/6/7, UIQ-28/30/33: table cells 8/12, 14 px text and headings (sentence case), compact chips */
  .accounting-body .table th { padding: var(--nawtt-space-2) var(--nawtt-space-3); font-size: var(--nawtt-row); font-weight: 600; letter-spacing: 0; text-transform: none; }
  .accounting-body .table td { padding: var(--nawtt-space-2) var(--nawtt-space-3); font-size: var(--nawtt-row); }
  .accounting-body .table .chip { line-height: 1.3; padding-block: 1px; }
  .accounting-body .table th.amount-cell, .accounting-body .table td.amount-cell { text-align: end; white-space: nowrap; }
  .accounting-body .table tfoot td { font-weight: 700; }
  /* the 14 px floor for chips, figure-list labels and the details lines (UIQ-28) */
  .accounting-body .chip { font-size: var(--nawtt-row); letter-spacing: 0.02em; text-transform: none; font-weight: 600; }
  .accounting-body .kv-list .kv__label { font-size: var(--nawtt-row); letter-spacing: 0; text-transform: none; font-weight: 600; }
  .accounting-body .alert__details, .accounting-body .state-box__details { font-size: var(--nawtt-row); }

  /* UIQ-36/37: on-scale spacing for the books' own blocks */
  .accounting-body { --accounting-gap: var(--nawtt-space-4); }
  .accounting-body .kv-list { gap: var(--nawtt-space-2); }
  .accounting-body .kv-list .kv { padding-block: 0 var(--nawtt-space-2); }
  .accounting-body .totals-line { margin: var(--nawtt-space-3) 0 0; }
  .accounting-body .state-box { padding: var(--nawtt-space-4); margin-block-start: 0; border-radius: var(--nawtt-radius-control); }
  .accounting-body * + .state-box { margin-block-start: var(--nawtt-space-3); }
  .accounting-body .panel > .state-box { margin-block-start: 0; }   /* the panel's 16 px gap is the only space above it */
  .accounting-body .form-actions { gap: var(--nawtt-space-3); margin-block-start: var(--nawtt-space-3); }
  .accounting-body .statement__head { gap: var(--nawtt-space-1); margin-block-end: var(--nawtt-space-2); }
  .accounting-body .statement__block { margin-block-start: var(--nawtt-space-4); gap: var(--nawtt-space-2); }

  /* UIQ-34: no padded box inside a padded card body — check items and drafts are ROWS separated by a 1 px rule */
  .accounting-body .checklist { gap: 0; }
  .accounting-body .check-item { gap: var(--nawtt-space-3); border: none; border-block-end: 1px solid var(--nawtt-line); border-radius: 0; padding: var(--nawtt-space-2) 0; }
  .accounting-body .check-item:last-child { border-block-end: none; }
  .accounting-body .check-item--done { border-color: var(--nawtt-line); }
  .accounting-body .check-item--done .check-item__mark { color: var(--ink, #000); }
  .accounting-body .check-item--blocking { border-color: var(--nawtt-line); background: rgba(179, 38, 30, .04); }
  .accounting-body .check-item--blocking .check-item__mark,
  .accounting-body .check-item--blocking .check-item__title { color: var(--ink, #000); }
  .accounting-body .check-item__copy { gap: var(--nawtt-space-1); }
  .accounting-body .check-item__detail { font-size: var(--nawtt-row); }
  .accounting-body .draft-list { gap: 0; }
  .accounting-body .draft-card { border: none; border-block-end: 1px solid var(--nawtt-line); border-radius: 0; padding: var(--nawtt-space-3) 0; background: transparent; gap: var(--nawtt-space-2); }
  .accounting-body .draft-card:last-child { border-block-end: none; }
  .accounting-body .draft-card__title { font-size: 1rem; }
  .accounting-body .draft-card__meta, .accounting-body .draft-card__readonly { font-size: var(--nawtt-row); }
  .accounting-body .draft-card__actions { gap: var(--nawtt-space-2); }
  .accounting-body .accounting-subtabs + .ledger-period-card,
  .accounting-body .ledger-period-card { margin-block-end: var(--nawtt-space-4); }
}
/* compact buttons (32 px) only where a real pointer is: a touch screen keeps the MOB-1 44 px target whatever its width */
@media (min-width: 761px) and (pointer: fine) {
  .accounting-body .accounting-tabs .tab { min-block-size: 40px; }
  .accounting-body .accounting-subtabs .tab { min-block-size: 36px; }
  .accounting-body .table .btn,
  .accounting-body .table .btn--sm,
  .accounting-body .topbar .btn { min-block-size: 32px; block-size: 32px; padding: 0 var(--nawtt-space-3); font-size: var(--nawtt-button); }
  .accounting-body .table .btn--icon { inline-size: 32px; padding: 0; }
  /* an EDITABLE row (New journal lines, statement entry) keeps its buttons at the 44 px of its inputs: one row, one height */
  .accounting-body .table tr:has(.input) .btn { min-block-size: 44px; block-size: 44px; }
  .accounting-body .table tr:has(.input) .btn--icon { inline-size: 44px; }
}
/* UIQ-1 rule 5: free text (memo, account name, detail) wraps to at most 2 lines; the span keeps the full text in title */
@media (min-width: 761px) {
  .accounting-body .table .cell-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere; min-inline-size: 12rem; }
}
/* UIQ-1 addition (owner 2026-10-24T04:55:55Z "make the journal table fit without scrolling"): the journal register's 9
   columns fit the card at 1280 and 1440 — the source key clips at 10 rem (full text in its title), the memo takes the
   remaining width (2-line clamp), a person's login name may break instead of widening its column. Figures, dates,
   periods, entry numbers and kinds stay one line (cell-nowrap / amount-cell). No heading is shortened. */
@media (min-width: 761px) {
  .accounting-body #journalStatus .table td.cell-clip,
  .accounting-body #journalStatus .table .cell-clip__text { max-inline-size: 10rem; }
  .accounting-body #journalStatus .table .cell-text { min-inline-size: 10rem; }
  .accounting-body #journalStatus .table td:nth-child(n+8) { overflow-wrap: anywhere; }
}
/* UIQ-1 (order lane finding, n.101 P360/P390 after an invoice is published): a statement block is a grid whose ONE column
   used to take the table's min-content (394 px), so the title and the table pushed the phone page sideways. The column
   is now capped at the block's width: the title wraps, the table scrolls inside its own .table-wrap. All widths. */
.accounting-body .statement__block { grid-template-columns: minmax(0, 1fr); min-inline-size: 0; }
.accounting-body .statement__title { overflow-wrap: anywhere; }
/* UIQ-1 (n.114 at 1280): a waiting count must not move the desktop layout — a screen tab that can carry a badge
   (Approvals, Periods, Reconciliation) keeps ONE fixed badge slot in its end padding, shown or not; the badge (fixed
   width, 1 to 3 digits) is placed in that slot without changing the tab's box. Phones keep the badge in the flow. */
@media (min-width: 761px) {
  .accounting-body .accounting-tabs .tab:has(> .tab__badge) { padding-inline-end: calc(var(--nawtt-space-3) + 30px + var(--nawtt-space-2)); }
  .accounting-body .accounting-tabs .tab > .tab__badge { position: absolute; inset-inline-end: var(--nawtt-space-3); inset-block-start: 50%;
    transform: translateY(-50%); inline-size: 30px; min-inline-size: 30px; padding-inline: 2px; }
}

/* --- UIQ4 (owner 2026-10-24): Accounting > Employers, the chosen employer in four sub-tabs (Balance, Invoices, Receipts,
   Ledger Lines). The row is the shared .tabs underline bar (phones: mobile.css scrolls it sideways inside itself, 44 px
   targets); one panel shows at a time; the tab already names the block, so the block's own title is kept for screen
   readers only. */
.employer-tabs { margin-block: 0 var(--nawtt-space-4); }
.employer-pane[hidden] { display: none; }
.employer-pane > .statement__block:first-child { margin-block-start: 0; }
.employer-pane > .statement__block > .statement__title {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- components/automation.css ---- */
/* --- 24. Automation switch bar -------------------------------------------- */
.auto-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nawtt-space-3);
  padding: var(--nawtt-space-3) var(--nawtt-space-4);
  background: var(--nawtt-surface);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius-module);
  box-shadow: var(--nawtt-shadow);
}
.auto-bar--on { border-color: rgba(16, 81, 60, 0.38); }
.auto-bar__copy { display: grid; gap: 2px; min-inline-size: 0; }
.auto-bar__title { font-size: var(--nawtt-row); font-weight: 700; }
.auto-bar__hint { font-size: var(--nawtt-meta); line-height: 1.6; color: var(--nawtt-muted); max-inline-size: 72ch; }
.auto-bar__end { display: flex; align-items: center; gap: var(--nawtt-space-2); margin-inline-start: auto; }
.auto-bar .btn { min-inline-size: 96px; }
@media (max-width: 520px) {
  .auto-bar { align-items: flex-start; }
  .auto-bar__end { inline-size: 100%; justify-content: space-between; }
}


/* QUEUE-1: the Super User's payout pause switch is marked while payouts are paused. */
.auto-bar--paused { border-color: rgba(138, 21, 56, 0.45); }

/* ---- components/buttons.css ---- */
/* --- 10. Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--nawtt-space-2);
  min-block-size: 44px;
  padding: 0.625rem var(--nawtt-space-4);
  border: 1px solid transparent;
  border-radius: var(--nawtt-radius-control);
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: var(--nawtt-button);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              border-color var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              color var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              transform var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              box-shadow var(--nawtt-motion-fast) var(--nawtt-motion-ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { inline-size: 16px; block-size: 16px; flex: 0 0 auto; }

.btn--primary {
  background: var(--nawtt-burgundy);
  border-color: var(--nawtt-burgundy);
  color: var(--nawtt-offwhite);
}
.btn--primary:hover { background: var(--nawtt-burgundy-deep); border-color: var(--nawtt-burgundy-deep); color: var(--nawtt-offwhite); }
.btn--outline { background: transparent; border-color: var(--nawtt-burgundy); color: var(--nawtt-burgundy); }
.btn--outline:hover { background: var(--nawtt-burgundy); color: var(--nawtt-offwhite); }
.btn--ghost { background: var(--nawtt-surface); border-color: var(--nawtt-control-line); color: var(--nawtt-ink); }
.btn--ghost:hover { background: var(--nawtt-neutral-soft); }
.btn--danger { background: transparent; border-color: var(--nawtt-burgundy-deep); color: var(--nawtt-burgundy-deep); }
.btn--danger:hover { background: var(--nawtt-burgundy-deep); color: var(--nawtt-offwhite); }
.btn--quiet { border-color: transparent; color: var(--nawtt-muted); }
.btn--quiet:hover { background: var(--nawtt-neutral-soft); color: var(--nawtt-ink); }
.btn--sm { min-block-size: 34px; padding: 0.375rem var(--nawtt-space-3); font-size: var(--nawtt-meta); letter-spacing: 0.03em; }
.btn--sm svg { inline-size: 14px; block-size: 14px; }
.btn--block { inline-size: 100%; }
.btn--icon { inline-size: 40px; min-block-size: 40px; padding: 0; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.is-busy { pointer-events: none; opacity: 0.85; }
.btn.is-busy .btn__label { visibility: hidden; }
.btn.is-busy::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 16px;
  block-size: 16px;
  margin-block-start: -8px;
  margin-inline-start: -8px;
  border: 2px solid rgba(247, 243, 237, 0.35);
  border-block-start-color: currentColor;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn { position: relative; overflow: hidden; }
/* The tap ripple: one soft circle that grows out of the middle on press. */
.btn::before {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 120%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(247, 243, 237, 0.3);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}
.btn--ghost::before, .btn--quiet::before, .btn--secondary::before { background: rgba(33, 31, 29, 0.12); }
.btn:active::before { animation: ripple 560ms var(--nawtt-motion-ease); }
.btn svg { transition: transform var(--nawtt-motion-fast) var(--nawtt-motion-ease); }
@media (hover: hover) {
  .btn:hover svg { transform: translateX(2px); }
  .btn--icon:hover svg { transform: none; }
}


/* ---- components/cards.css ---- */
/* --- 7. Cards and KPIs ----------------------------------------------------- */
.card {
  background: var(--nawtt-surface);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius-module);
  box-shadow: var(--nawtt-shadow);
  overflow: hidden;
}
.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nawtt-space-2);
  padding: var(--nawtt-space-4) var(--nawtt-space-4) var(--nawtt-space-3);
  border-block-end: 1px solid var(--nawtt-line);
}
.card__head--plain { border-block-end: none; padding-block-end: 0; }
.card__title { margin: 0; font-size: 1rem; font-weight: 700; }
.card__hint { color: var(--nawtt-muted); font-size: var(--nawtt-meta); line-height: 1.6; }
.card__body { padding: var(--nawtt-space-4); }
.card__body--tight { padding: var(--nawtt-space-3) var(--nawtt-space-4); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--nawtt-space-4);
  margin-block-end: var(--nawtt-space-6);
}
.kpi {
  background: var(--nawtt-surface);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius-module);
  box-shadow: var(--nawtt-shadow);
  padding: var(--nawtt-space-4);
  display: grid;
  gap: var(--nawtt-space-1);
  position: relative;
  overflow: hidden;
  transition: transform var(--nawtt-motion-base) var(--nawtt-motion-ease),
              box-shadow var(--nawtt-motion-base) var(--nawtt-motion-ease);
}
@media (hover: hover) {
  .kpi:hover { transform: translateY(-3px); box-shadow: var(--nawtt-shadow-lifted); }
  .kpi:hover .kpi__icon { transform: rotate(-8deg) scale(1.08); }
}
.kpi__icon { transition: transform var(--nawtt-motion-base) var(--nawtt-motion-ease); }
.kpi__label {
  font-size: var(--nawtt-meta);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nawtt-muted);
}
.kpi__value {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi__note {
  font-size: var(--nawtt-meta);
  color: var(--nawtt-muted);
  line-height: 1.6;
  /* two lines are always reserved, so a note that wraps before the webfont
     applies and does not wrap after cannot resize the KPI row on load */
  min-block-size: calc(2 * 1.6em);
}
.kpi__icon {
  position: absolute;
  inset-block-start: var(--nawtt-space-3);
  inset-inline-end: var(--nawtt-space-3);
  inline-size: 30px;
  block-size: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--nawtt-radius-control);
  background: var(--nawtt-burgundy-soft);
  color: var(--nawtt-burgundy);
}
.kpi__icon svg { inline-size: 17px; block-size: 17px; }
.kpi--green .kpi__icon { background: var(--nawtt-green-soft); color: var(--ink, #000); }

/* --- 8. Numeric hierarchy -------------------------------------------------- */
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.amount__currency {
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-inline-start: 0.4em;
  color: var(--nawtt-muted);
}
.balance {
  font-size: var(--nawtt-hero);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance .amount__currency {
  font-size: 0.34em;
  color: rgba(247, 243, 237, 0.8);
}


/* ---- components/chips.css ---- */
/* --- 12. Status chips: colour plus a word, never colour alone -------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 3px var(--nawtt-space-2);
  border: 1px solid transparent;
  border-radius: var(--nawtt-radius-control);
  font-size: var(--nawtt-meta);
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip::before {
  content: '';
  inline-size: 6px;
  block-size: 6px;
  border-radius: 2px;
  background: currentColor;
  flex: 0 0 auto;
}
.chip--pending { background: var(--nawtt-burgundy-soft); border-color: rgba(138, 21, 56, 0.28); color: var(--nawtt-burgundy); }
.chip--active { background: var(--nawtt-green-soft); border-color: rgba(16, 81, 60, 0.3); color: var(--ink, #000); }
.chip--settled { background: var(--nawtt-green); border-color: var(--nawtt-green); color: var(--nawtt-offwhite); }
.chip--closed { background: var(--nawtt-neutral-soft); border-color: var(--nawtt-line); color: var(--nawtt-muted); }
.chip--bank { background: var(--nawtt-burgundy-soft); border-color: rgba(138, 21, 56, 0.28); color: var(--nawtt-burgundy-deep); }


/* ---- components/dialogs.css ---- */
/* --- 16. Alerts, toasts, dialog ------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--nawtt-space-2);
  padding: var(--nawtt-space-3) var(--nawtt-space-4);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius-control);
  background: var(--nawtt-surface);
  color: var(--nawtt-ink);
  font-size: var(--nawtt-row);
  animation: fade-up var(--nawtt-motion-base) var(--nawtt-motion-ease) both;
}
.alert svg { inline-size: 17px; block-size: 17px; margin-block-start: 1px; flex: 0 0 auto; }
.alert--success { background: var(--nawtt-green-soft); border-color: rgba(16, 81, 60, 0.3); color: var(--ink, #000); }
.alert--error { background: var(--nawtt-burgundy-soft); border-color: rgba(138, 21, 56, 0.32); color: var(--nawtt-burgundy-deep); }
.alert--info { background: var(--nawtt-neutral-soft); border-color: var(--nawtt-line); }
.alert__text { min-width: 0; }
.alert-slot:empty { display: none; }
.alert-slot { margin-block-end: var(--nawtt-space-4); }

.toasts {
  position: fixed;
  inset-block-end: var(--nawtt-space-4);
  inset-inline-end: var(--nawtt-space-4);
  z-index: var(--nawtt-z-overlay);
  display: grid;
  gap: var(--nawtt-space-2);
  max-inline-size: min(380px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--nawtt-space-2);
  padding: var(--nawtt-space-3) var(--nawtt-space-4);
  background: var(--nawtt-surface);
  border: 1px solid var(--nawtt-line);
  border-inline-start: 3px solid var(--nawtt-green);
  border-radius: var(--nawtt-radius-module);
  box-shadow: var(--nawtt-shadow-lifted);
  font-size: var(--nawtt-row);
  animation: toast-in var(--nawtt-motion-base) var(--nawtt-motion-ease) both;
}
.toast--error { border-inline-start-color: var(--nawtt-burgundy); }
.toast--info { border-inline-start-color: var(--nawtt-muted); }
.toast.is-leaving { animation: toast-out var(--nawtt-motion-base) var(--nawtt-motion-ease) both; }
.toast svg { inline-size: 17px; block-size: 17px; margin-block-start: 1px; flex: 0 0 auto; }

dialog.confirm {
  border: none;
  padding: 0;
  inline-size: min(440px, calc(100vw - 2rem));
  border-radius: var(--nawtt-radius-module);
  background: var(--nawtt-surface);
  color: var(--nawtt-ink);
  box-shadow: var(--nawtt-shadow-lifted);
}
dialog.confirm::backdrop { background: rgba(33, 31, 29, 0.45); }
dialog.confirm[open] { animation: pop var(--nawtt-motion-base) var(--nawtt-motion-ease) both; }
.confirm__body { padding: var(--nawtt-space-5); display: grid; gap: var(--nawtt-space-2); }
.confirm__title { font-size: 1.125rem; }
.confirm__text { color: var(--nawtt-muted); font-size: var(--nawtt-row); }
.confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--nawtt-space-2);
  padding: var(--nawtt-space-3) var(--nawtt-space-5) var(--nawtt-space-5);
}


/* ---- components/employee.css ---- */
/* --- 20. Employee reading scale (this portal is read at arm's length) ------ */
.employee-shell { font-size: 1.0625rem; }
.employee-shell .eyebrow,
.employee-shell .field__label,
.employee-shell .kpi__label,
.employee-shell .kv__label,
.employee-shell .chip { letter-spacing: 0.04em; }
.employee-shell .field__label { font-size: 0.8125rem; text-transform: none; letter-spacing: 0; font-weight: 700; }
.employee-shell .input { font-size: 1.25rem; min-block-size: 52px; }
.employee-shell .input--money { font-size: 1.5rem; }
.employee-shell .btn { min-block-size: 50px; font-size: 1rem; }
.employee-shell .card__title { font-size: 1.125rem; }
.employee-shell .list-row__amount { font-size: 1.375rem; }


/* --- EMP-1: the greeting by name, the employer's name on the line below --- */
.employee-shell .greeting { overflow-wrap: anywhere; }
.employee-shell .greeting__employer { font-weight: 600; }

/* --- PAYUI: how the person is paid (step on the New request tab, section on the Overview tab) --- */
.pay-step__title { font-size: 1rem; font-weight: 600; margin: 0 0 var(--nawtt-space-2); }
.pay-step__summary { margin: 0 0 var(--nawtt-space-2); }
.pay-options, .pay-list { display: grid; gap: var(--nawtt-space-2); margin-block-end: var(--nawtt-space-3); }
.pay-opt, .pay-item, .pay-check { display: flex; align-items: center; gap: var(--nawtt-space-3); min-block-size: 44px; }
.pay-opt { padding: var(--nawtt-space-2) var(--nawtt-space-3); border: 1px solid #e2dbd1; border-radius: 8px; background: #fff; cursor: pointer; flex-wrap: wrap; }
.pay-opt input, .pay-check input { inline-size: 20px; block-size: 20px; flex: 0 0 auto; accent-color: var(--nawtt-brand, #8a1538); }
.pay-opt:has(input:checked) { border-color: var(--nawtt-brand, #8a1538); }
.pay-opt:has(input:focus-visible) { outline: 2px solid var(--nawtt-brand, #8a1538); outline-offset: 2px; }
.pay-item { flex-wrap: wrap; justify-content: space-between; }
.pay-item__actions { display: inline-flex; gap: var(--nawtt-space-2); margin-inline-start: auto; }
.pay-mask { overflow-wrap: anywhere; font-weight: 600; }
.pay-tag { color: var(--ink, #000); font-size: .875rem; font-weight: 600; }
.pay-check { margin-block-end: var(--nawtt-space-3); cursor: pointer; }
.pay-profile { margin-block-start: var(--nawtt-space-6, 24px); }
.pay-profile__title { font-size: 1rem; font-weight: 600; margin: 0 0 var(--nawtt-space-2); }
.pay-profile__add { display: grid; gap: var(--nawtt-space-2); grid-template-columns: minmax(0, 1fr); max-inline-size: 28rem; }
.employee-shell .pay-profile__add .btn { justify-self: start; }
.employee-shell .pay-value { font-size: 1rem; }
.employee-shell .pay-new .input, .employee-shell .pay-profile__add .input { font-size: 1rem; }

/* ---- components/filters.css ---- */
/* --- 15. Filter chips and search row --------------------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nawtt-space-2);
  padding: var(--nawtt-space-3) var(--nawtt-space-4);
  border-block-end: 1px solid var(--nawtt-line);
}
.filters { display: flex; flex-wrap: wrap; gap: var(--nawtt-space-2); }
.filter {
  min-block-size: 32px;
  padding: 0.25rem var(--nawtt-space-3);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius-control);
  background: var(--nawtt-surface);
  color: var(--nawtt-muted);
  font-family: inherit;
  font-size: var(--nawtt-meta);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              color var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              border-color var(--nawtt-motion-fast) var(--nawtt-motion-ease);
}
.filter:hover { background: var(--nawtt-neutral-soft); color: var(--nawtt-ink); }
.filter[aria-pressed='true'] {
  background: var(--nawtt-burgundy-soft);
  border-color: rgba(138, 21, 56, 0.35);
  color: var(--nawtt-burgundy);
}
.toolbar__count {
  margin-inline-start: auto;
  font-size: var(--nawtt-meta);
  color: var(--nawtt-muted);
  white-space: nowrap;
}
.search { max-inline-size: 260px; }
.search .input { min-block-size: 38px; font-size: var(--nawtt-row); }


/* --- UIQ-1: the aligned search grid (first used by Ledger > General ledger "Search the general ledger") -----
   A form laid out like a table: equal columns, each label above its own control on the control's left edge,
   ONE control height (44 px, the touch target) for inputs, selects, month pickers and the action button alike,
   ONE gap (--nawtt-space-3) both ways, the action in the next cell on the controls' line, the card's own 16 px
   inline padding (no second inset). Labels are 14 px sentence case, never wrapped (ellipsis), so every row of
   labels has one top edge. Six columns on a desktop, three on a tablet, two on a large phone, one on a phone. */
.search-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--nawtt-space-3);
  align-items: end;
  margin: 0;
  padding: var(--nawtt-space-3) var(--nawtt-space-4);
  border-block-end: 1px solid var(--nawtt-line);
}
.search-grid__field { display: grid; gap: var(--nawtt-space-1); min-inline-size: 0; }
.search-grid__label {
  font-size: var(--nawtt-row);
  font-weight: 600;
  line-height: 1.4;
  color: var(--nawtt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-grid .input {
  inline-size: 100%;
  min-inline-size: 0;
  block-size: 44px;
  min-block-size: 44px;
  padding-block: 0;
  font-size: 1rem;
}
.search-grid__actions { display: flex; align-items: flex-end; min-inline-size: 0; }
.search-grid .search-grid__button {
  block-size: 44px;
  min-block-size: 44px;
  padding-inline: var(--nawtt-space-5);
  font-size: var(--nawtt-row);
  letter-spacing: 0;
}
@media (max-width: 1100px) { .search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .search-grid { grid-template-columns: minmax(0, 1fr); }
  .search-grid .search-grid__button { inline-size: 100%; }
}

/* --- UIQ-1 (lane STYLES): accounting page only (body.accounting-body), desktop and tablet >= 761 px ------------------------- */
/* the actions cell may hold 2-3 buttons (Load, Soft close, Close month; Load, CSV): one 8 px gap, they wrap, never stretch */
.accounting-body .search-grid__actions { gap: var(--nawtt-space-2); flex-wrap: wrap; }
@media (min-width: 481px) { .accounting-body .search-grid__actions:has(> .btn + .btn) { grid-column: span 2; } }
.accounting-body .ledger-period-card .search-grid { border-block-end: 0; }
@media (min-width: 761px) {
  /* UIQ-35: a toolbar or search grid that sits INSIDE a padded card body takes no second inset (one 16 px edge) */
  .accounting-body .card__body > .toolbar,
  .accounting-body .card__body > .search-grid { padding-inline: 0; padding-block-start: 0; margin-block-end: var(--nawtt-space-3); }
  .accounting-body .toolbar { padding: var(--nawtt-space-3) var(--nawtt-space-4); gap: var(--nawtt-space-3); }
  /* UIQ-15: a filter row written as a .form-grid is a grid with ONE gap; the label-less Apply button sits on the
     controls' line instead of stretching to the row height */
  .accounting-body .toolbar .form-grid { gap: var(--nawtt-space-3); align-items: end; inline-size: 100%; }
  .accounting-body .toolbar .field { margin-block-end: 0; }
  .accounting-body .toolbar .form-grid > .btn { align-self: end; justify-self: start; }
  /* the old in-head tool rows (label beside control): one 44 px line, labels at the 14 px floor */
  .accounting-body .card__tools { gap: var(--nawtt-space-2) var(--nawtt-space-3); }
  .accounting-body .filter { font-size: var(--nawtt-row); letter-spacing: 0; text-transform: none; }
  .accounting-body .toolbar__count { font-size: var(--nawtt-row); }
}

/* QUEUE-1: the Cancelled tab's Clear row (Clear hides the rows shown now from this person's view; nothing is deleted)
   and its "Show cleared" link. Text at the 14 px floor; the row wraps on a phone. */
.queue-clear { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nawtt-space-2) var(--nawtt-space-3); padding-block: var(--nawtt-space-2); }
.queue-clear__note { font-size: var(--nawtt-row); color: var(--nawtt-muted); min-inline-size: 0; }
.link-button { font: inherit; font-size: var(--nawtt-row); color: var(--nawtt-burgundy); background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-block-size: 24px; }
.link-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.table tbody tr.is-cleared td { color: var(--nawtt-muted); }

/* QUEUE-1: the platform Advance queue's column widths per tab (data-view set by platform.js): read-only tabs have six
   columns, Paid and Cancelled eight, With platform keeps the seven of tables.css. Desktop only; the phone cards ignore them. */
.table--advances-platform[data-view='read'] th:nth-child(1) { inline-size: 18%; }
.table--advances-platform[data-view='read'] th:nth-child(2) { inline-size: 18%; }
.table--advances-platform[data-view='read'] th:nth-child(3) { inline-size: 22%; }
.table--advances-platform[data-view='read'] th:nth-child(4) { inline-size: 13%; }
.table--advances-platform[data-view='read'] th:nth-child(5) { inline-size: 11%; }
.table--advances-platform[data-view='read'] th:nth-child(6) { inline-size: 18%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(1),
.table--advances-platform[data-view='paid'] th:nth-child(1) { inline-size: 12%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(2),
.table--advances-platform[data-view='paid'] th:nth-child(2) { inline-size: 12%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(3),
.table--advances-platform[data-view='paid'] th:nth-child(3) { inline-size: 16%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(4),
.table--advances-platform[data-view='paid'] th:nth-child(4) { inline-size: 10%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(5),
.table--advances-platform[data-view='paid'] th:nth-child(5) { inline-size: 8%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(6),
.table--advances-platform[data-view='paid'] th:nth-child(6) { inline-size: 13%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(7),
.table--advances-platform[data-view='paid'] th:nth-child(7) { inline-size: 16%; }
.table--advances-platform[data-view='cancelled'] th:nth-child(8),
.table--advances-platform[data-view='paid'] th:nth-child(8) { inline-size: 13%; }

/* QUEUE-1: the accounting portal's Settlement tab (accounting-settlement.js): air above each sub-heading of the card. */
.accounting-body #acSettlementCard .card__body h3.card__title { margin-block-start: var(--nawtt-space-4, 1rem); }
.accounting-body #acSettlementCard .settlement-form { margin-block-start: var(--nawtt-space-3); }

/* owner 08:04:46Z: the Employers drill-down (read-only employer detail, its employees, one employee's requests). */
.table tbody tr.is-openable { cursor: pointer; }
.table tbody tr.is-openable:hover td { background: var(--nawtt-burgundy-soft); }
.table tbody tr.is-selected td { background: var(--nawtt-burgundy-soft); }
.employer-open.link-button { text-align: start; font-weight: 600; max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--nawtt-space-3); margin: 0; }
.detail-grid__item { display: grid; gap: 2px; min-inline-size: 0; padding: var(--nawtt-space-2) var(--nawtt-space-3);
  border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 8px; }
.detail-grid dt { font-size: var(--nawtt-row); color: var(--nawtt-muted); }
.detail-grid dd { margin: 0; font-size: var(--nawtt-row); font-weight: 600; overflow-wrap: anywhere; }
.employer-view__sub { margin-block: var(--nawtt-space-4, 1rem) var(--nawtt-space-2); }
.table td.cell-wrap { white-space: normal; overflow-wrap: anywhere; min-inline-size: 14rem; }
.employer-view .table-wrap { overflow-x: auto; }

/* owner (2026-10-24): the platform's New employer form, re-laid on one aligned grid (UIQ-1 rules 1, 2, 4, 7):
   four logical sections, a 4-column grid with one 12 px gap, each label (14 px, one line) right above its own control,
   one 44 px control height, controls side by side share their top, the fee ratio box small and right-aligned.
   Scoped to #registerCompanyForm, so no other form moves. */
#registerCompanyForm .reg-section { padding-block: var(--nawtt-space-3); border-block-end: 1px solid rgba(0, 0, 0, 0.08); min-inline-size: 0; }
#registerCompanyForm .reg-section:first-child { padding-block-start: 0; }
#registerCompanyForm .reg-section__title { margin: 0 0 var(--nawtt-space-3); font-size: var(--nawtt-row); font-weight: 700; color: var(--nawtt-ink); }
#registerCompanyForm .reg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--nawtt-space-3); align-items: start; }
#registerCompanyForm .reg-grid + .reg-grid { margin-block-start: var(--nawtt-space-3); }
#registerCompanyForm .reg-grid[hidden] { display: none; }
#registerCompanyForm .reg-field { margin: 0; align-content: start; grid-template-rows: auto auto; }
#registerCompanyForm .reg-field--2 { grid-column: span 2; }
#registerCompanyForm .field__label { font-size: var(--nawtt-row); line-height: 1.4; font-weight: 600; letter-spacing: 0; text-transform: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#registerCompanyForm .field__hint, #registerCompanyForm .field__error { font-size: var(--nawtt-row); line-height: 1.45; }
#registerCompanyForm .input { block-size: 44px; min-block-size: 44px; padding-block: 0; font-size: 1rem; }
#registerCompanyForm .reg-input--ratio { inline-size: 8rem; max-inline-size: 100%; text-align: end; font-variant-numeric: tabular-nums; }
#registerCompanyForm .reg-input--money { inline-size: 16rem; max-inline-size: 100%; text-align: end; font-size: 1rem; font-weight: 600; }
#registerCompanyForm .reg-actions { margin-block-start: var(--nawtt-space-3); }
#registerCompanyForm .form-actions { padding-block-start: var(--nawtt-space-4, 1rem); }
@media (max-width: 1100px) {
  #registerCompanyForm .reg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  #registerCompanyForm .reg-grid { grid-template-columns: minmax(0, 1fr); }
  #registerCompanyForm .reg-field--2 { grid-column: auto; }
  #registerCompanyForm .field__label { white-space: normal; }
}
#registerCompanyForm .form-actions__note { font-size: var(--nawtt-row); }
/* MOB-102: the employer name opens the detail, so it is a full 44 px target at every width. */
#companyRows .employer-open.link-button { min-block-size: 44px; min-inline-size: 44px; display: flex; align-items: center; }
/* UIQ-1 rule 5 on the drill-down tables: nothing is squeezed into breaking; when the columns do not fit, the wrapper scrolls. */
.table--employer-people { min-inline-size: 76rem; }
.table--employer-people td, .table--employer-people .table__main, .table--employer-people .table__meta { white-space: nowrap; }
.table--employee-requests { min-inline-size: 60rem; }
@media (max-width: 760px) {
  .table--employer-people, .table--employee-requests { min-inline-size: 0; }
  .table--employer-people td, .table--employer-people .table__main, .table--employer-people .table__meta { white-space: normal; }
}

/* ---- components/forms.css ---- */
/* --- 11. Forms ------------------------------------------------------------- */
.field { display: grid; gap: var(--nawtt-space-1); min-width: 0; margin-block-end: var(--nawtt-space-3); }
.field__label {
  font-size: var(--nawtt-meta);
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nawtt-muted);
}
.field__hint { font-size: var(--nawtt-meta); line-height: 1.5; color: var(--nawtt-muted); }
.field__row { display: flex; align-items: center; gap: var(--nawtt-space-2); }
.input {
  inline-size: 100%;
  min-block-size: 44px;
  padding: 0.625rem var(--nawtt-space-3);
  border: 1px solid var(--nawtt-control-line);
  border-radius: var(--nawtt-radius-control);
  background: var(--nawtt-surface);
  color: var(--nawtt-ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              box-shadow var(--nawtt-motion-fast) var(--nawtt-motion-ease);
}
.input::placeholder { color: var(--nawtt-muted); opacity: 1; }
.input:hover { border-color: var(--nawtt-muted); }
.input:focus {
  outline: none;
  border-color: var(--nawtt-burgundy);
  box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.16);
}
.input--money { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-inline-end: 2.75rem; }
.input-wrap__action {
  position: absolute;
  inset-inline-end: 4px;
  inline-size: 36px;
  min-block-size: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--nawtt-radius-control);
  background: transparent;
  color: var(--nawtt-muted);
  cursor: pointer;
}
.input-wrap__action:hover { background: var(--nawtt-neutral-soft); color: var(--nawtt-ink); }
.input-wrap__action svg { inline-size: 18px; block-size: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--nawtt-space-3); }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .field--full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nawtt-space-2); margin-block-start: var(--nawtt-space-1); }
.form-actions__note { font-size: var(--nawtt-meta); color: var(--nawtt-muted); }

/* the computed fee under the amount field: one quiet line, never wraps */
.fee-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--nawtt-space-4);
  margin: 0 0 var(--nawtt-space-3);
  padding: var(--nawtt-space-2) var(--nawtt-space-3);
  background: var(--nawtt-neutral-soft);
  border-radius: var(--nawtt-radius-control);
  font-size: var(--nawtt-row);
  font-weight: 600;
  white-space: nowrap;
}
.fee-line__value { font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.employee-shell .fee-line { font-size: 1rem; }
.shake { animation: shake 320ms var(--nawtt-motion-ease); }


/* --- UIQ-1 (lane STYLES): accounting page only (body.accounting-body), desktop and tablet >= 761 px ------------------------------
   Rule 2: ONE control height (44 px) for every input, select, month and date picker — the native date/month picker no
   longer adds its 2 px and the 20 px money input no longer grows to 52 px. Rule 7: labels and hints at the 14 px floor,
   sentence case. UIQ-16: a field's hint row never stretches its neighbours (align-content: start). */
@media (min-width: 761px) {
  .accounting-body .input:not(textarea) { block-size: 44px; min-block-size: 44px; padding-block: 0; }
  .accounting-body .input--money { font-size: 1rem; }
  .accounting-body .field { align-content: start; }
  .accounting-body .field__label { font-size: var(--nawtt-row); line-height: 1.4; font-weight: 600; letter-spacing: 0; text-transform: none; }
  .accounting-body .field__hint, .accounting-body .form-actions__note { font-size: var(--nawtt-row); line-height: 1.45; }
  .accounting-body .form-grid { gap: 0 var(--nawtt-space-3); align-items: start; }
  /* UIQ-16: the accounting forms use the card's full width (no 780 px cap); New journal is ONE 3-column row */
  .accounting-body .panel .card__body > form { max-inline-size: none; }
  .accounting-body #nuForm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- components/hero.css ---- */
/* --- 9. The employee hero: the one burgundy moment of the screen ----------- */
.hero {
  background: var(--nawtt-burgundy);
  border: 1px solid var(--nawtt-burgundy);
  border-radius: var(--nawtt-radius-module);
  color: var(--nawtt-offwhite);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  display: grid;
  gap: var(--nawtt-space-3);
  position: relative;
  overflow: hidden;
  box-shadow: var(--nawtt-shadow-lifted);
}
.hero::after {
  content: '';
  position: absolute;
  inset-block-start: -60px;
  inset-inline-end: -60px;
  inline-size: 220px;
  block-size: 220px;
  border: 1px solid rgba(247, 243, 237, 0.16);
  border-radius: 24px;
  transform: rotate(12deg);
  pointer-events: none;
  animation: slow-turn 48s linear infinite;
}
.hero__label {
  font-size: var(--nawtt-meta);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 243, 237, 0.75);
}
.hero__balance { position: relative; z-index: 1; }
.hero__rows { display: grid; gap: 0; position: relative; z-index: 1; }
.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--nawtt-space-3);
  padding-block: var(--nawtt-space-2);
  border-block-start: 1px solid rgba(247, 243, 237, 0.2);
}
.kv:first-child { border-block-start: none; }
.kv__label { font-size: var(--nawtt-meta); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: rgba(247, 243, 237, 0.75); }
.kv__value { font-size: 0.9375rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv--ink .kv__label { color: var(--nawtt-muted); }
.kv--ink { border-block-start-color: var(--nawtt-line); }
.kv--ink .kv__value { color: var(--nawtt-ink); }

.meter {
  position: relative;
  z-index: 1;
  block-size: 8px;
  border-radius: 99px;
  background: rgba(247, 243, 237, 0.22);
  overflow: hidden;
}
.meter__fill {
  block-size: 100%;
  inline-size: 100%;
  background: var(--nawtt-offwhite);
  border-radius: inherit;
  transform: scaleX(var(--fill, 0));
  transform-origin: 0 50%;
  transition: transform 900ms var(--nawtt-motion-ease) 80ms;
  will-change: transform;
}
.meter__caption {
  display: flex;
  justify-content: space-between;
  gap: var(--nawtt-space-2);
  font-size: var(--nawtt-meta);
  color: rgba(247, 243, 237, 0.72);
  position: relative;
  z-index: 1;
}

/* MOB-1 3.2: the "Request an advance" shortcut inside the hero is the light button on the burgundy field (a burgundy
   primary button on the burgundy hero had no visible edge); its focus ring is off-white (mobile.css section 9). */
.hero .hero__action { background: var(--nawtt-offwhite); border-color: var(--nawtt-offwhite); color: var(--nawtt-burgundy); position: relative; z-index: 1; }
.hero .hero__action:hover { background: var(--nawtt-surface); border-color: var(--nawtt-surface); color: var(--nawtt-burgundy-deep); }
.hero .hero__action::before { background: rgba(138, 21, 56, 0.16); }

/* ---- components/invoices.css ---- */
/* --- F-01 invoice life cycle: suspension banner, summaries, receipts ---- */
.banner {
  display: flex;
  align-items: flex-start;
  gap: var(--nawtt-space-2);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius);
  padding: var(--nawtt-space-3) var(--nawtt-space-4);
  margin-block-end: var(--nawtt-space-4);
  line-height: 1.6;
}
.banner--warn { background: var(--nawtt-burgundy-soft); border-color: rgba(138, 21, 56, 0.32); color: var(--nawtt-burgundy-deep); }
.banner__title { font-weight: 700; margin-inline-end: 0.35rem; }
.banner svg { inline-size: 17px; block-size: 17px; margin-block-start: 2px; flex: 0 0 auto; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--nawtt-space-3);
  margin-block-end: var(--nawtt-space-4);
}
.summary-item {
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius);
  padding: var(--nawtt-space-3);
  display: grid;
  gap: 2px;
  background: var(--nawtt-offwhite);
}
.summary-item__label { font-size: var(--nawtt-meta); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--nawtt-muted); }
.summary-item__value { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-item--green .summary-item__value { color: var(--ink, #000); }
.summary-item--warn .summary-item__value { color: var(--nawtt-burgundy); }
.invoice-detail { padding: var(--nawtt-space-2) var(--nawtt-space-4) var(--nawtt-space-3); display: grid; gap: var(--nawtt-space-1); background: var(--nawtt-neutral-soft); }
.receipts { display: grid; gap: 2px; }
.receipt { display: flex; flex-wrap: wrap; gap: var(--nawtt-space-2); font-size: var(--nawtt-meta); color: var(--nawtt-muted); }
.receipt__amount { font-weight: 700; color: var(--nawtt-ink); font-variant-numeric: tabular-nums; }
.write-off-note { font-size: var(--nawtt-meta); color: var(--nawtt-muted); }
.list-row__reason { font-size: var(--nawtt-meta); color: var(--nawtt-burgundy-deep); line-height: 1.5; }
.table--invoices { min-inline-size: 900px; }
.table--invoices th { overflow: hidden; text-overflow: ellipsis; }
.table--settlements { min-inline-size: 860px; }
.table__group td { background: var(--nawtt-neutral-soft); }
.form-actions + .form-actions { margin-block-start: var(--nawtt-space-2); }


/* ---- components/login.css ---- */
/* --- 18. Login ------------------------------------------------------------- */
.login-body { display: grid; min-height: 100vh; }
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100vh;
}
.login-brandside {
  position: relative;
  overflow: hidden;
  background: var(--nawtt-burgundy);
  color: var(--nawtt-offwhite);
  padding: clamp(2rem, 6vh, 4.5rem) clamp(1.5rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--nawtt-space-8);
}
.login-brandside .core-art {
  position: absolute;
  inset-block-end: -120px;
  inset-inline-end: -120px;
  color: var(--nawtt-offwhite);
  opacity: 0.14;
  pointer-events: none;
}
.login-brandlockup { display: flex; align-items: center; gap: var(--nawtt-space-3); position: relative; z-index: 1; }
.login-brandlockup .core { color: var(--nawtt-offwhite); }
.login-brandlockup__wordmark { font-size: 1.5rem; }
.login-story { position: relative; z-index: 1; display: grid; gap: var(--nawtt-space-3); max-inline-size: 34ch; }
.login-brandside .eyebrow { color: rgba(247, 243, 237, 0.72); }
.login-story h1 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; }
.login-story p { color: rgba(247, 243, 237, 0.82); font-size: 1rem; }
.login-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--nawtt-space-2); position: relative; z-index: 1; }
.login-point { display: flex; align-items: center; gap: var(--nawtt-space-2); font-size: var(--nawtt-row); color: rgba(247, 243, 237, 0.9); }
.login-point svg { inline-size: 17px; block-size: 17px; color: var(--nawtt-offwhite); opacity: 0.85; flex: 0 0 auto; }

.login-panelside {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) var(--nawtt-space-4);
  background: var(--nawtt-offwhite);
}
.login-card {
  inline-size: 100%;
  max-inline-size: 430px;
  background: var(--nawtt-surface);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius-module);
  box-shadow: var(--nawtt-shadow-lifted);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: grid;
  gap: var(--nawtt-space-2);
}
.login-card__head { display: grid; gap: var(--nawtt-space-1); margin-block-end: var(--nawtt-space-3); }
.login-card__eyebrow { color: var(--nawtt-burgundy); }
.login-card h2 { font-size: 1.5rem; }
.login-card__sub { color: var(--nawtt-muted); font-size: var(--nawtt-row); }
.login-card__foot { margin-block-start: var(--nawtt-space-4); font-size: var(--nawtt-meta); color: var(--nawtt-muted); line-height: 1.7; }
.login-card__foot strong { color: var(--nawtt-ink); }
.login-mobile-brand { display: none; }

/* --- 19. Footer ------------------------------------------------------------ */
.footer {
  margin-block-start: var(--nawtt-space-8);
  padding-block-start: var(--nawtt-space-4);
  border-block-start: 1px solid var(--nawtt-line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--nawtt-space-2) var(--nawtt-space-4);
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--nawtt-meta);
  color: var(--nawtt-muted);
  line-height: 1.7;
}


/* ---- components/motion.css ---- */
/* --- 22. Motion: entrances, feedback; nothing loops except a quiet pulse --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Page and card entrances: one slow, soft rise on a real page load only. */
.reveal { animation: fade-up var(--nawtt-motion-slow) var(--nawtt-motion-ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
/* U-2: the reveal order lives here, not in inline style attributes. */
.reveal--i1 { --i: 1; }
.reveal--i2 { --i: 2; }
.reveal-fast { animation: fade-in var(--nawtt-motion-base) var(--nawtt-motion-ease) both; }
.stagger > * { animation: fade-up var(--nawtt-motion-slow) var(--nawtt-motion-ease) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 70ms; }
.stagger > *:nth-child(3) { animation-delay: 140ms; }
.stagger > *:nth-child(4) { animation-delay: 210ms; }
.stagger > *:nth-child(5) { animation-delay: 280ms; }
.stagger > *:nth-child(6) { animation-delay: 350ms; }

/* NO ENTRANCE ANIMATION ON TABLE ROWS: a table is redrawn on every filter,
   search and refresh, so animating each row made the table flicker and jump.
   A row animates only when it is genuinely new, or its standing just moved:
   one slow tint on the row itself that fades back to the normal ground. It uses
   background-color only, so it never moves a column or a border. */
.table tbody tr.is-new { animation: row-flash 1700ms var(--nawtt-motion-ease); }
.table tbody tr.is-changed { animation: row-flash-green 1700ms var(--nawtt-motion-ease); }
.list-row.is-new { animation: card-flash 1700ms var(--nawtt-motion-ease); }
.list-row.is-changed { animation: card-flash-green 1700ms var(--nawtt-motion-ease); }

/* The Core assembles itself, module by module, on every page load. */
.core--assemble rect {
  transform-box: fill-box;
  transform-origin: center;
  animation: core-in 560ms var(--nawtt-motion-ease) both;
  animation-delay: calc(var(--m, 0) * 24ms);
}

/* The brand mark on the sign-in screen drifts, very slowly, like a watermark. */
.login-brandside .core-art { animation: core-drift 20s var(--nawtt-motion-ease) infinite alternate; }

@keyframes ripple {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.42; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
@keyframes row-flash {
  0% { background-color: var(--nawtt-burgundy-soft); }
  100% { background-color: transparent; }
}
@keyframes row-flash-green {
  0% { background-color: var(--nawtt-green-soft); }
  100% { background-color: transparent; }
}
@keyframes card-flash {
  0% { background-color: var(--nawtt-burgundy-soft); border-color: rgba(138, 21, 56, 0.35); }
  100% { background-color: var(--nawtt-surface); border-color: var(--nawtt-line); }
}
@keyframes card-flash-green {
  0% { background-color: var(--nawtt-green-soft); border-color: rgba(16, 81, 60, 0.35); }
  100% { background-color: var(--nawtt-surface); border-color: var(--nawtt-line); }
}
@keyframes core-in {
  from { opacity: 0; transform: scale(0.35); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slow-turn {
  from { transform: rotate(12deg); }
  to { transform: rotate(372deg); }
}
@keyframes core-drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(-14px, -10px) rotate(3deg); }
}



/* ---- components/reconciliation.css ---- */
/* --- Accounting portal: bank reconciliation (phase D) --------------------- */
.recon-figures { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); display: grid; gap: 8px; }
.recon-entry, .recon-import { margin-block-start: var(--nawtt-space-4); padding-block-start: var(--nawtt-space-3); border-block-start: 1px solid var(--nawtt-line); display: grid; gap: 6px; }
.recon-entry-head { margin-block-start: 6px; }
.recon-entry-table { min-inline-size: 760px; }
.recon-entry-table td, .recon-entry-table th { vertical-align: top; }
.recon-entry-table .input { inline-size: 100%; min-inline-size: 5.5rem; }
.recon-entry-table td:first-child .input { min-inline-size: 9rem; }
.recon-balanced { color: var(--ink, #000); }
.recon-unbalanced { color: var(--nawtt-burgundy); }
.recon-matcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--nawtt-space-5); align-items: start; }
.recon-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--nawtt-space-5); align-items: start; margin-block-start: var(--nawtt-space-5); }
.recon-column, .recon-block { display: grid; gap: 4px; min-inline-size: 0; }
.recon-block { margin-block-start: var(--nawtt-space-4); }
.recon-table { min-inline-size: 480px; }
.recon-check { inline-size: 2.5rem; text-align: center; }
.recon-checkbox { inline-size: 1.1rem; block-size: 1.1rem; accent-color: var(--nawtt-burgundy); cursor: pointer; }
.recon-checkbox[disabled] { cursor: default; opacity: 0.45; }
.recon-line { transition: background-color var(--nawtt-motion-fast) var(--nawtt-motion-ease); }
.recon-line--proposed { background: var(--nawtt-green-soft); box-shadow: inset 3px 0 0 var(--nawtt-green); }
.recon-proposal .chip { white-space: normal; text-align: start; }
.recon-to-enter { border-inline-start: 3px solid var(--nawtt-burgundy); }
[dir='rtl'] .recon-line--proposed { box-shadow: inset -3px 0 0 var(--nawtt-green); }
[dir='rtl'] .recon-to-enter { border-inline-start: none; border-inline-end: 3px solid var(--nawtt-burgundy); }
[dir='rtl'] .amount-cell { text-align: end; }
@media (max-width: 1100px) {
  .recon-matcher, .recon-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .recon-figures { grid-template-columns: minmax(0, 1fr); }
  .recon-entry-table { min-inline-size: 620px; }
}


/* --- UIQ-1 (lane STYLES): accounting page only (body.accounting-body) ---------------------------------------------- */
/* UIQ-9: a statement figure never draws over its neighbour — wider tracks, and a long value wraps under its label */
.accounting-body .recon-figures { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--nawtt-space-2) var(--nawtt-space-6); }
.accounting-body .recon-figures .kv { flex-wrap: wrap; min-inline-size: 0; column-gap: var(--nawtt-space-3); }
.accounting-body .recon-figures .kv__value { white-space: normal; overflow-wrap: anywhere; margin-inline-start: auto; text-align: end; }
/* UIQ-25: the statement-entry rows line up on their middles (every control is one height) */
.accounting-body .recon-entry-table td, .accounting-body .recon-entry-table th { vertical-align: middle; }
.accounting-body .recon-entry, .accounting-body .recon-import { gap: var(--nawtt-space-2); }
.accounting-body .recon-entry-head { margin-block-start: var(--nawtt-space-2); }
/* UIQ-4/5: the matcher's two tables get the full width under 1400 px (stacked) instead of two squeezed halves */
@media (max-width: 1399px) {
  .accounting-body .recon-matcher, .accounting-body .recon-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 761px) {
  .accounting-body .recon-matcher, .accounting-body .recon-columns { gap: var(--nawtt-space-4); }
  .accounting-body .recon-columns { margin-block-start: var(--nawtt-space-4); }
  .accounting-body .recon-column, .accounting-body .recon-block { gap: var(--nawtt-space-2); }
}

/* --- UIQ2 (owner 2026-10-24T07:11:26Z): the matcher fits its card, reads as two bordered lists, money in / money out ------
   Cause of the sideways scroll: from 1400 px the matcher splits into two ~679 px halves, while the statement-lines table
   needed ~911 px (auto layout: the Reference clip held its 18 rem cap as its minimum, the Text column its longest
   unbroken token, plus the one-line date, amount and state) — so its .table-wrap scrolled. Now every matcher list is a
   FIXED layout table: check, date, entry, amount and state get fixed widths (figures and dates never wrap or clip), the
   reference and the free text share the rest (the reference ends in an ellipsis with its full text in the title, the
   text keeps its 2-line clamp). Desktop and tablet only (>= 761 px); phones keep the MOB-1 card layout. */
@media (min-width: 761px) {
  /* owner: "Any 2 tables sitting next each other, draw a table border" — each list is one bordered box */
  .accounting-body .recon-pane { border: 1px solid var(--nawtt-line); border-radius: var(--nawtt-radius-control); background: var(--nawtt-surface); }
  .accounting-body .recon-pane .table { table-layout: fixed; inline-size: 100%; min-inline-size: 0; }
  .accounting-body .recon-pane .recon-col--check { inline-size: 2.75rem; }
  .accounting-body .recon-pane .recon-col--date,
  .accounting-body .recon-pane .recon-col--entry { inline-size: 7rem; }
  .accounting-body .recon-pane .recon-col--amount { inline-size: 9rem; }
  .accounting-body .recon-pane .recon-col--state { inline-size: 9rem; }
  .accounting-body .recon-pane td.cell-clip,
  .accounting-body .recon-pane .cell-clip__text { max-inline-size: none; }
  .accounting-body .recon-pane .cell-text { min-inline-size: 0; }
  .accounting-body .recon-pane .recon-check { inline-size: auto; }
  /* the group head (Money in / Money out, count, subtotal): its subtotal sits under the Amount column */
  .accounting-body .recon-table--statement { --recon-lead: 9.75rem; }
  .accounting-body .recon-table--ledger { --recon-lead: 16.75rem; }
  .accounting-body .recon-group__head { display: grid; grid-template-columns: var(--recon-lead) 9rem minmax(0, 1fr); align-items: center;
    min-block-size: 36px; background: var(--nawtt-neutral-soft); border-block: 1px solid var(--nawtt-line); }
  .accounting-body .recon-group__name { padding-inline: var(--nawtt-space-3); }
  .accounting-body .recon-group__total { padding-inline: var(--nawtt-space-3); text-align: end; }
  /* side by side (>= 1400 px): statement lines left, ledger lines right, their headings, hints and column names on one line */
  @supports (grid-template-rows: subgrid) {
    @media (min-width: 1400px) {
      .accounting-body .recon-matcher .recon-column { grid-row: span 3; grid-template-rows: subgrid; }
    }
  }
}
/* the group head on every width: the group name, its count and its subtotal (a figure: one line, tabular) */
.accounting-body .recon-group__caption { caption-side: top; text-align: start; padding: 0; }
.accounting-body .recon-group__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--nawtt-space-2);
  padding-block: var(--nawtt-space-2); font-size: var(--nawtt-row); font-weight: 700; color: var(--nawtt-ink); }
.accounting-body .recon-group__name { display: inline-flex; gap: var(--nawtt-space-2); white-space: nowrap; }
.accounting-body .recon-group__count { font-weight: 400; color: var(--nawtt-muted); font-variant-numeric: tabular-nums; }
.accounting-body .recon-group__total { white-space: nowrap; font-variant-numeric: tabular-nums; }
.accounting-body .recon-group--out .recon-group__title { color: var(--nawtt-burgundy); }
.accounting-body .recon-group--in .recon-group__title { color: var(--ink, #000); }
/* the selected pair: the statement line you selected and the ledger line(s) you checked for it share ONE highlight
   (burgundy tint + edge bar); a proposal not yet checked keeps the green tint. Cells are painted, so no hover hides it. */
.accounting-body .table tbody tr.recon-line--proposed > td { background: var(--nawtt-green-soft); }
.accounting-body .table tbody tr.recon-line--proposed > td:first-child { box-shadow: inset 3px 0 0 var(--nawtt-green); }
.accounting-body .table tbody tr.recon-line--selected > td,
.accounting-body .table tbody tr.recon-line--chosen > td { background: var(--nawtt-burgundy-soft); }
.accounting-body .table tbody tr.recon-line--selected > td:first-child,
.accounting-body .table tbody tr.recon-line--chosen > td:first-child { box-shadow: inset 3px 0 0 var(--nawtt-burgundy); }
[dir='rtl'] .accounting-body .table tbody tr.recon-line--proposed > td:first-child { box-shadow: inset -3px 0 0 var(--nawtt-green); }
[dir='rtl'] .accounting-body .table tbody tr.recon-line--selected > td:first-child,
[dir='rtl'] .accounting-body .table tbody tr.recon-line--chosen > td:first-child { box-shadow: inset -3px 0 0 var(--nawtt-burgundy); }
/* the match action sits directly under the two lists, with the status (what is left on the selected line) beside it */
.accounting-body .recon-actionbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--nawtt-space-3) var(--nawtt-space-4);
  margin-block-start: var(--nawtt-space-3); }
.accounting-body .recon-actionbar__status { margin-inline-end: auto; min-inline-size: 0; }
.accounting-body .recon-actionbar__status:empty { display: none; }

/* ---- components/responsive.css ---- */
/* --- 21. Responsive -------------------------------------------------------- */
@media (max-width: 1024px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-brandside { display: none; }
  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: var(--nawtt-space-2);
    background: var(--nawtt-burgundy);
    color: var(--nawtt-offwhite);
    padding: var(--nawtt-space-3) var(--nawtt-space-4);
  }
  .login-mobile-brand .core { color: var(--nawtt-offwhite); }
  .login-mobile-brand__wordmark { font-family: var(--nawtt-font-wordmark); font-weight: 700; font-size: 1.125rem; }
  .login-panelside { padding-block: var(--nawtt-space-6); align-items: flex-start; }
}

@media (max-width: 860px) {
  .form-grid, .form-grid--three { grid-template-columns: minmax(0, 1fr); }
  .topbar__inner { padding-inline: var(--nawtt-space-3); }
  .shell { padding: var(--nawtt-space-5) var(--nawtt-space-3) var(--nawtt-space-6); }
  .page-head { margin-block-end: var(--nawtt-space-4); }
  .identity { display: none; }
  .brand__portal { border-inline-start: none; padding-inline-start: 0; font-size: 0.625rem; }
}

@media (max-width: 760px) {
  .table-wrap { overflow: visible; }
  .table thead { display: none; }
  .table--advances { min-inline-size: 0; table-layout: auto; }
  .table, .table tbody, .table tr, .table td { display: block; inline-size: 100%; }
  .table tbody tr {
    background: var(--nawtt-surface);
    border: 1px solid var(--nawtt-line);
    border-radius: var(--nawtt-radius-module);
    box-shadow: var(--nawtt-shadow);
    margin-block-end: var(--nawtt-space-3);
    padding: var(--nawtt-space-2) var(--nawtt-space-3);
  }
  .table tbody tr:hover { background: var(--nawtt-surface); }
  .table tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--nawtt-space-3);
    padding: var(--nawtt-space-2) 0;
    border-block-end: 1px solid var(--nawtt-line);
    text-align: end;
  }
  .table tbody td::before {
    content: attr(data-label);
    font-size: var(--nawtt-meta);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nawtt-muted);
    text-align: start;
    flex: 0 0 auto;
  }
  .table tbody td:last-child { border-block-end: none; }
  .table tbody td.actions { justify-content: flex-end; flex-wrap: wrap; }
  .table tbody td.actions .row-actions { margin-inline-start: auto; flex-wrap: wrap; }
  .table__empty td { display: block; }
  .table__empty td::before { content: none; }
  .card__body { padding: var(--nawtt-space-3); }
  .card__head { padding: var(--nawtt-space-3); }
  .toolbar { padding: var(--nawtt-space-3); }
  .search { max-inline-size: none; flex: 1 1 100%; }
  .toolbar__count { margin-inline-start: 0; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--nawtt-space-3); }
  .kpi { padding: var(--nawtt-space-3); }
  .kpi__value { font-size: 1.5rem; }
  .toasts { inset-inline: var(--nawtt-space-3); inset-block-end: var(--nawtt-space-3); max-inline-size: none; }
}

@media (max-width: 520px) {
  /* A phone leaves ~150px per KPI card: the icon steps aside and the figure
     steps down so a salary total never clips at the card edge. */
  .kpi__icon { display: none; }
  .kpi__value { font-size: 1.125rem; }
  .kpi__label { font-size: 0.625rem; }
  .list-row { grid-template-columns: minmax(0, 1fr); }
  .list-row__side { justify-content: flex-start; }
  .fee-line { white-space: normal; flex-wrap: wrap; }
  .fee-line__value { white-space: nowrap; }
  .card__head { align-items: flex-start; }
}

@media (max-width: 420px) {
  .topbar__inner { gap: var(--nawtt-space-2); }
  .brand__portal { display: none; }
  .page-head h1 { font-size: 1.5rem; }
  .list-row { padding: var(--nawtt-space-3); }
  .kpi__value { font-size: 1rem; }
}


/* ---- components/rtl.css ---- */
/* --- U-7: right-to-left (Arabic texts are DRAFTS awaiting the owner) ------ */
[dir='rtl'] body { font-family: 'Segoe UI', 'Noto Naskh Arabic', 'Noto Sans Arabic', Tahoma, sans-serif; }
[dir='rtl'] .icon--direction { transform: scaleX(-1); }
[dir='rtl'] .amount, [dir='rtl'] .num { direction: ltr; unicode-bidi: isolate; text-align: end; }
[dir='rtl'] .amount { display: inline-flex; }
[dir='rtl'] .amount__currency { margin-inline-start: .35em; }
[dir='rtl'] .topbar__inner, [dir='rtl'] .topbar__end { direction: rtl; }
[dir='rtl'] .skip-link { inset-inline-start: var(--nawtt-space-2, 8px); inset-inline-end: auto; }
[dir='rtl'] .card__head, [dir='rtl'] .page-head, [dir='rtl'] .form-actions { direction: rtl; }
[dir='rtl'] .login-card__langrow { justify-content: flex-start; }


/* ---- components/shell.css ---- */
/* --- 6. Shell and page head ------------------------------------------------ */
.shell {
  max-inline-size: 1200px;
  margin-inline: auto;
  padding: var(--nawtt-space-6) var(--nawtt-space-4) var(--nawtt-space-8);
}
.shell--reading { max-inline-size: 960px; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--nawtt-space-3);
  margin-block-end: var(--nawtt-space-5);
}
.page-head__copy { display: grid; gap: var(--nawtt-space-1); min-width: 0; }
.page-head h1 { margin: 0; }
.page-head__sub {
  color: var(--nawtt-muted);
  font-size: 0.9375rem;
  max-inline-size: 60ch;
}
.page-head__aside { display: flex; align-items: center; gap: var(--nawtt-space-2); }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: var(--nawtt-space-2);
  font-size: var(--nawtt-meta);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink, #000);
  white-space: nowrap;
}
.live-dot::before {
  content: '';
  inline-size: 7px;
  block-size: 7px;
  border-radius: 2px;
  background: var(--nawtt-green);
  animation: pulse 2.4s var(--nawtt-motion-ease) infinite;
}


/* ---- components/states.css ---- */
/* --- 17. Empty state, skeleton, spinner ----------------------------------- */
.empty {
  display: grid;
  justify-items: center;
  gap: var(--nawtt-space-2);
  padding: var(--nawtt-space-8) var(--nawtt-space-4);
  text-align: center;
  color: var(--nawtt-muted);
}
.empty__icon {
  inline-size: 44px;
  block-size: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--nawtt-radius-module);
  background: var(--nawtt-neutral-soft);
  color: var(--nawtt-muted);
}
.empty__icon svg { inline-size: 22px; block-size: 22px; }
.empty__title { font-size: var(--nawtt-row); font-weight: 700; color: var(--nawtt-ink); }
.empty__text { font-size: var(--nawtt-meta); line-height: 1.6; }

.skeleton {
  display: block;
  min-block-size: 14px;
  border-radius: var(--nawtt-radius-control);
  background: var(--nawtt-neutral-soft);
  animation: pulse 1.4s var(--nawtt-motion-ease) infinite;
}
.skeleton--line { inline-size: 100%; }
.skeleton--row { min-block-size: 44px; }


/* ---- components/tables-phone.css ---- */
/* --- U-12 · PHONE TABLES AND AMOUNT COLUMNS (lane-55 fold-in) --------------- */
/* 44x44 TOUCH TARGETS IN A TABLE: the base .btn is 44 px, but the small (34 px) and icon (40 px) variants are what the
   action columns and the accounting tools use. On a phone every action inside a table is a real finger target. */
@media (max-width: 760px) {
  .table .btn,
  .table .btn--sm,
  .table .btn--icon { min-block-size: 44px; }
  .table .btn--sm,
  .table .btn--icon { min-inline-size: 44px; }
  .table tbody td { min-inline-size: 0; overflow-wrap: anywhere; }
  .table tbody td::before { flex: 0 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
  .table tbody td.num,
  .table tbody td.amount-cell { white-space: normal; }
  .table tbody td:not([data-label])::before { content: none; }
}

/* AMOUNT COLUMNS ARE END-ALIGNED IN BOTH DIRECTIONS: right in LTR and left in RTL, header and value. */
.table th.num,
.table th.amount-cell,
.table td.num,
.table td.amount-cell,
.table .amount { text-align: end; }

/* A TABLE BUILT INSIDE A CARD/STATEMENT/NESTED BLOCK SCROLLS INSIDE ITS CONTAINER, NOT THE PAGE. */
.statement__block,
.draft-card,
.panel-card,
.invoice-lines { overflow-x: auto; }

/* ---- components/tables.css ---- */
/* --- 13. Tables, with a card layout under 760px ---------------------------- */
.table-wrap { overflow-x: auto; }
.table { inline-size: 100%; border-collapse: collapse; }
.table th {
  padding: var(--nawtt-space-3);
  border-block-end: 1px solid var(--nawtt-line);
  font-size: var(--nawtt-meta);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nawtt-muted);
  text-align: start;
  white-space: nowrap;
}
.table td {
  padding: var(--nawtt-space-3);
  border-block-end: 1px solid var(--nawtt-line);
  vertical-align: middle;
}
.table tbody tr { transition: background-color var(--nawtt-motion-fast) var(--nawtt-motion-ease); }
.table tbody tr:hover { background: rgba(236, 232, 226, 0.55); }
.table tbody tr:last-child td { border-block-end: none; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The last column stays a real table cell: the buttons live in an inner row so the
   cell keeps its table-cell layout, its right padding and its row border. */
.table th.actions, .table td.actions { text-align: end; white-space: nowrap; }
.table .row-actions { display: flex; flex-wrap: nowrap; gap: var(--nawtt-space-1); justify-content: flex-end; }
.table td.actions .row-actions { margin-inline-start: auto; }

/* THE ADVANCE TABLES HAVE FIXED COLUMN WIDTHS. With auto layout, a standing
   chip getting shorter (or a button set changing) redistributed every column and
   the table jumped on each action. Fixed widths make every column immovable; the
   wrapper scrolls sideways on a narrow desktop, and phones use the card layout. */
.table--advances { table-layout: fixed; min-inline-size: 1080px; }
.table--advances th { overflow: hidden; text-overflow: ellipsis; }
/* Every text cell is one line, ellipsised: no wrapping, so all rows in the queue
   are the same height and a longer name can never jog the table. */
.table--advances td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table--advances .table__main,
.table--advances .table__meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table--advances-employer th:nth-child(1) { inline-size: 20%; }
.table--advances-employer th:nth-child(2) { inline-size: 16%; }
.table--advances-employer th:nth-child(3) { inline-size: 11%; }
.table--advances-employer th:nth-child(4) { inline-size: 8%; }
.table--advances-employer th:nth-child(5) { inline-size: 15%; }
.table--advances-employer th:nth-child(6) { inline-size: 30%; }
.table--advances-platform th:nth-child(1) { inline-size: 18%; }
.table--advances-platform th:nth-child(2) { inline-size: 11%; }
.table--advances-platform th:nth-child(3) { inline-size: 15%; }
.table--advances-platform th:nth-child(4) { inline-size: 10%; }
.table--advances-platform th:nth-child(5) { inline-size: 8%; }
.table--advances-platform th:nth-child(6) { inline-size: 14%; }
.table--advances-platform th:nth-child(7) { inline-size: 24%; }
.table__empty td { padding: var(--nawtt-space-6); }
.table__id { font-family: var(--nawtt-font); font-size: var(--nawtt-meta); color: var(--nawtt-muted); }
.table__main { font-weight: 600; }
.table__meta { display: block; font-size: var(--nawtt-meta); color: var(--nawtt-muted); font-weight: 400; }

/* --- 14. The employee's advances: a list of rows, not a grid of numbers ---- */
.list { display: grid; gap: var(--nawtt-space-3); }
.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--nawtt-space-2) var(--nawtt-space-4);
  align-items: center;
  padding: var(--nawtt-space-4);
  background: var(--nawtt-surface);
  border: 1px solid var(--nawtt-line);
  border-radius: var(--nawtt-radius-module);
  box-shadow: var(--nawtt-shadow);
  transition: box-shadow var(--nawtt-motion-base) var(--nawtt-motion-ease),
              transform var(--nawtt-motion-base) var(--nawtt-motion-ease);
}
/* MOB-106: the lift is for a real pointer only (a finger leaves a sticky hover behind) */
@media (hover: hover) {
  .list-row:hover { box-shadow: var(--nawtt-shadow-lifted); transform: translateY(-1px); }
}
.list-row__main { min-width: 0; display: grid; gap: 2px; }
.list-row__amount { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: end; }
.list-row__meta { font-size: var(--nawtt-meta); color: var(--nawtt-muted); overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.list-row__side { display: flex; align-items: center; gap: var(--nawtt-space-2); justify-content: flex-end; flex-wrap: wrap; }


/* ---- components/tabs.css ---- */
/* --- 23. Section tabs (employer and platform portals) --------------------- */
.tabs {
  display: flex;
  gap: var(--nawtt-space-1);
  margin-block-end: var(--nawtt-space-5);
  border-block-end: 1px solid var(--nawtt-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--nawtt-space-2);
  min-block-size: 44px;
  padding: var(--nawtt-space-3) var(--nawtt-space-4);
  border: none;
  border-radius: var(--nawtt-radius-control) var(--nawtt-radius-control) 0 0;
  background: transparent;
  color: var(--nawtt-muted);
  font: inherit;
  font-size: var(--nawtt-row);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--nawtt-motion-fast) var(--nawtt-motion-ease),
              background-color var(--nawtt-motion-fast) var(--nawtt-motion-ease);
}
.tab:hover { color: var(--nawtt-ink); background: rgba(236, 232, 226, 0.55); }
.tab[aria-selected='true'] { color: var(--nawtt-burgundy); }
.tab[aria-selected='true']::after {
  content: '';
  position: absolute;
  inset-inline: var(--nawtt-space-3);
  inset-block-end: -1px;
  block-size: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--nawtt-burgundy);
  animation: tab-underline var(--nawtt-motion-base) var(--nawtt-motion-ease) both;
}
.tab__badge {
  display: inline-grid;
  place-items: center;
  min-inline-size: 20px;
  block-size: 20px;
  padding-inline: 6px;
  border-radius: 99px;
  background: var(--nawtt-burgundy);
  color: var(--nawtt-offwhite);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}
.tab__badge[hidden] { display: none; }
.panel { display: grid; gap: var(--nawtt-space-6); }
.panel .card__body > form { max-inline-size: 780px; }
.panel.is-entering { animation: panel-in var(--nawtt-motion-base) var(--nawtt-motion-ease) both; }

@media (max-width: 760px) {
  .tabs {
    margin-inline: calc(-1 * var(--nawtt-space-3));
    padding-inline: var(--nawtt-space-3);
  }
  .tab { padding-inline: var(--nawtt-space-3); font-size: var(--nawtt-meta); letter-spacing: 0.02em; }
}

@keyframes tab-underline {
  from { transform: scaleX(0.4); opacity: 0.5; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* The employees table on the employer portal: fixed columns for the same reason
   the advance tables are fixed — a redraw must never jog the table. */
.table--employees { table-layout: fixed; min-inline-size: 1000px; }
.table--employees th { overflow: hidden; text-overflow: ellipsis; }
.table--employees td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table--employees .table__main,
.table--employees .table__meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* TERM-1: the people table has NINE columns; sizing seven of them at 100 % left Bank and Actions 0 px wide (the Advance
   button was cut). The nine now share the width, and the action buttons wrap instead of squeezing. */
.table--employees th:nth-child(1) { inline-size: 16%; }
.table--employees th:nth-child(2) { inline-size: 9%; }
.table--employees th:nth-child(3) { inline-size: 9%; }
.table--employees th:nth-child(4) { inline-size: 9%; }
.table--employees th:nth-child(5) { inline-size: 8%; }
.table--employees th:nth-child(6) { inline-size: 9%; }
.table--employees th:nth-child(7) { inline-size: 9%; }
.table--employees th:nth-child(8) { inline-size: 14%; }
.table--employees th:nth-child(9) { inline-size: 17%; }
.table--employees .row-actions { flex-wrap: wrap; }
@media (max-width: 760px) {
  .table--employees { min-inline-size: 0; table-layout: auto; }
}


/* ---- components/topbar.css ---- */
/* --- 5. Topbar ------------------------------------------------------------- */
.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--nawtt-z-sticky);
  background: var(--nawtt-burgundy);
  color: var(--nawtt-offwhite);
  border-block-end: 1px solid var(--nawtt-burgundy-deep);
}
.topbar__inner {
  max-inline-size: 1200px;
  margin-inline: auto;
  padding: var(--nawtt-space-2) var(--nawtt-space-4);
  display: flex;
  align-items: center;
  gap: var(--nawtt-space-3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--nawtt-space-2);
  color: var(--nawtt-offwhite);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand .core { color: var(--nawtt-offwhite); }
.brand__wordmark {
  font-family: var(--nawtt-font-wordmark);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}
.brand__portal {
  font-size: var(--nawtt-meta);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 243, 237, 0.78);
  border-inline-start: 1px solid rgba(247, 243, 237, 0.3);
  padding-inline-start: var(--nawtt-space-3);
  white-space: nowrap;
}
.topbar__end {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: var(--nawtt-space-3);
  min-width: 0;
}
.identity {
  font-size: var(--nawtt-meta);
  color: rgba(247, 243, 237, 0.72);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* reserved once, so filling in the signed-in id does not move the topbar */
  min-inline-size: 240px;
  text-align: end;
}
.topbar .btn--on-brand {
  background: transparent;
  border: 1px solid rgba(247, 243, 237, 0.45);
  color: var(--nawtt-offwhite);
}
.topbar .btn--on-brand:hover {
  background: rgba(247, 243, 237, 0.14);
  border-color: var(--nawtt-offwhite);
}
.topbar :focus-visible { outline-color: var(--nawtt-offwhite); }


/* ---- components/investor.css ---- */
/* KPI-1 · the investor dashboard. Every rule is scoped to body.inv (the manifest app.css imports this part like every
   other component, and it changes nothing on any other page). DESIGN-1 compact rules (lanes/design/DESIGN-RULES.md): one surface, sections = space
   + one heading, lines only in tables, 14 px minimum, figures right-aligned with tabular numbers, burgundy sparingly.
   Standalone: the page links tokens.css (fonts) and this file only. Charts are inline SVG coloured by classes here.
   INVUX: plain-language tiles with one explaining line each, the daily "money in use" charts, a hover/tap read-out,
   the month column held in place when a table scrolls sideways on a phone. Series colours: the validated reference
   categorical order (blue, orange, aqua, yellow; dataviz validator). */
body.inv {
  --inv-brand: #8a1538; --inv-brand-soft: #f3e7ea; --inv-bg: #f7f3ed; --inv-surface: #fffdfa;
  --inv-ink: #000000; --inv-muted: #000000; --inv-line: #e2dbd1; --inv-row: #ece8e2;
  --inv-green: #10513c; --inv-danger: #b3261e; --inv-warn: #8a6d3b; --inv-warn-soft: #fbefd9; --inv-warn-ink: #5c3d00;
  --inv-series-1: #2a78d6; --inv-series-2: #eb6834; --inv-series-3: #1baf7a; --inv-series-4: #eda100;
  --inv-grid: #ece6dc;
  --inv-s1: 4px; --inv-s2: 8px; --inv-s3: 12px; --inv-s4: 16px; --inv-s6: 24px;
  --inv-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
body.inv, body.inv * { box-sizing: border-box; }
body.inv { margin: 0; }
body.inv { background: var(--inv-bg); color: var(--inv-ink); font: 14px/20px var(--inv-font); font-feature-settings: 'tnum'; }
.inv h1, .inv h2, .inv h3, .inv p { margin: 0; }
.inv h1 { font-size: 22px; line-height: 28px; font-weight: 700; }
.inv h2 { font-size: 18px; line-height: 24px; font-weight: 700; margin: 32px 0 var(--inv-s2); }
.inv h3.sub { font-size: 15px; font-weight: 600; margin: var(--inv-s6) 0 var(--inv-s2); }
.inv .muted { color: var(--inv-muted); }
.inv .lead { color: var(--inv-muted); max-width: 72ch; margin-bottom: var(--inv-s3); }
.inv .lead b { color: var(--inv-ink); }
.inv .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv .neg { color: var(--ink, #000); }
.inv [hidden] { display: none !important; }
.inv .skip { position: absolute; left: -999px; }
.inv .skip:focus { left: var(--inv-s4); top: var(--inv-s2); background: var(--inv-surface); padding: var(--inv-s2); }

.inv .top { display: flex; align-items: center; gap: var(--inv-s4); height: 48px; padding: 0 var(--inv-s6); background: var(--inv-surface); border-bottom: 1px solid var(--inv-line); }
.inv .top .mark { font: 700 20px/1 'Baloo 2', var(--inv-font); color: var(--inv-brand); letter-spacing: .5px; }
.inv .top .portal { color: var(--inv-muted); }
.inv .top .end { margin-inline-start: auto; display: flex; gap: var(--inv-s4); align-items: center; color: var(--inv-muted); }

.inv .page { padding: var(--inv-s4) var(--inv-s6) var(--inv-s6); max-width: 1280px; }
.inv .head { display: flex; align-items: center; gap: var(--inv-s2) var(--inv-s4); flex-wrap: wrap; }
.inv .head .end { margin-inline-start: auto; display: flex; gap: var(--inv-s2); }
.inv .head .asat { flex-basis: 100%; }

/* summary tiles: a plain name, the figure, one sentence */
.inv .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--inv-s3); margin-top: var(--inv-s4); }
.inv .tile { background: var(--inv-surface); border: 1px solid var(--inv-line); border-radius: 8px; padding: var(--inv-s3) var(--inv-s4); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv .tile .label { color: var(--inv-muted); font-weight: 600; }
.inv .tile b { font-size: 22px; line-height: 30px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.inv .tile.big { grid-column: span 2; }
.inv .tile.big b { font-size: 26px; line-height: 34px; color: var(--inv-brand); }
.inv .tile small { color: var(--inv-muted); font-size: 14px; line-height: 19px; }
.inv .tiles.small .tile b { font-size: 18px; line-height: 26px; }

.inv .banner { margin: var(--inv-s3) 0 0; padding: var(--inv-s3) var(--inv-s4); background: var(--inv-warn-soft); color: var(--ink, #000); border: 1px solid #e7c58a; border-inline-start: 4px solid var(--inv-danger); font-weight: 600; border-radius: 8px; }
.inv .note { margin-top: var(--inv-s3); color: var(--inv-muted); }
.inv .state { margin-top: var(--inv-s6); color: var(--inv-muted); min-height: 20px; }
.inv .state.bad { color: var(--ink, #000); }

.inv .box { background: var(--inv-surface); border: 1px solid var(--inv-line); border-radius: 8px; overflow-x: auto; }
.inv table { width: 100%; border-collapse: separate; border-spacing: 0; }
.inv th { text-align: start; font-weight: 600; color: var(--inv-muted); height: 36px; padding: var(--inv-s1) var(--inv-s3); border-bottom: 1px solid var(--inv-line); white-space: normal; vertical-align: bottom; min-width: 96px; }
.inv th.num { text-align: right; }
.inv td { height: 36px; padding: 0 var(--inv-s3); border-bottom: 1px solid var(--inv-row); white-space: nowrap; }
.inv th:first-child, .inv td:first-child { position: sticky; left: 0; background: var(--inv-surface); z-index: 1; min-width: 0; }
.inv tbody tr:last-child td { border-bottom: 0; }
.inv tfoot td { font-weight: 700; border-top: 1px solid var(--inv-line); border-bottom: 0; }

.inv details.explain { margin-top: var(--inv-s2); color: var(--inv-muted); }
.inv details.explain summary { cursor: pointer; color: var(--inv-brand); font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.inv details.explain dl { margin: var(--inv-s1) 0 0; display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: var(--inv-s1) var(--inv-s4); max-width: 900px; }
.inv details.explain dt { font-weight: 600; color: var(--inv-ink); }
.inv details.explain dd { margin: 0; }

.inv .btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 var(--inv-s4); border-radius: 4px; border: 1px solid var(--inv-muted); background: var(--inv-surface); color: var(--inv-ink); font: 600 14px/1 var(--inv-font); white-space: nowrap; cursor: pointer; }
.inv .btn.primary { background: var(--inv-brand); border-color: var(--inv-brand); color: #fff; }
.inv .btn.text { border: 0; background: none; color: var(--inv-brand); padding: 0 var(--inv-s2); }
.inv .btn:focus-visible, .inv a:focus-visible, .inv .f input:focus-visible, .inv summary:focus-visible { outline: 2px solid var(--inv-brand); outline-offset: 2px; }

.inv .form { display: grid; grid-template-columns: minmax(0, 320px); gap: var(--inv-s3); margin-top: var(--inv-s4); }
.inv .f { display: flex; flex-direction: column; gap: var(--inv-s1); }
.inv .f label { font-weight: 600; }
.inv .f input { height: 36px; border: 1px solid var(--inv-muted); border-radius: 4px; padding: 0 var(--inv-s3); font: 14px var(--inv-font); background: #fff; color: var(--inv-ink); }

/* charts: the box keeps its height before the drawing arrives, so nothing below jumps */
.inv .charts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--inv-s6); margin-bottom: var(--inv-s3); }
.inv .chart { min-width: 0; background: var(--inv-surface); border: 1px solid var(--inv-line); border-radius: 8px; padding: var(--inv-s3); min-height: 270px; }
.inv .chart.wide { margin-bottom: var(--inv-s3); }
.inv .chart h3 { font-size: 14px; font-weight: 600; margin: 0 0 var(--inv-s1); }
.inv .chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.inv .legend { display: flex; flex-wrap: wrap; gap: var(--inv-s1) var(--inv-s4); margin-top: var(--inv-s1); color: var(--inv-muted); }
.inv .legend span { display: inline-flex; align-items: center; gap: 6px; }
.inv .legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.inv .legend i.s1 { background: var(--inv-series-1); }
.inv .legend i.s2 { background: var(--inv-series-2); }
.inv .legend i.s3 { background: var(--inv-series-3); }
.inv .legend i.s4 { background: var(--inv-series-4); }

.inv svg .grid { stroke: var(--inv-grid); stroke-width: 1; }
.inv svg .zero { stroke: var(--inv-muted); stroke-width: 1; }
.inv svg .month { stroke: var(--inv-line); stroke-width: 1; stroke-dasharray: 3 3; }
.inv svg .tick { fill: var(--inv-muted); font: 12px var(--inv-font); }
.inv svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.inv svg .dot { stroke: var(--inv-surface); stroke-width: 2; }
.inv svg .line.s1 { stroke: var(--inv-series-1); }
.inv svg .line.s2 { stroke: var(--inv-series-2); }
.inv svg .line.s3 { stroke: var(--inv-series-3); }
.inv svg .line.s4 { stroke: var(--inv-series-4); }
.inv svg .dot.s1, .inv svg .bar.s1 { fill: var(--inv-series-1); }
.inv svg .dot.s2, .inv svg .bar.s2 { fill: var(--inv-series-2); }
.inv svg .dot.s3, .inv svg .bar.s3 { fill: var(--inv-series-3); }
.inv svg .dot.s4, .inv svg .bar.s4 { fill: var(--inv-series-4); }
.inv svg .bar { stroke: none; }
.inv svg .bar.neg { fill: var(--inv-danger); }
.inv svg .hitlayer { fill: transparent; stroke: none; cursor: crosshair; }
.inv svg .readout { pointer-events: none; }
.inv svg .cross { stroke: var(--inv-ink); stroke-width: 1; stroke-opacity: .35; }
.inv svg .tipbox { fill: var(--inv-surface); stroke: var(--inv-line); }
.inv svg .tiptitle { fill: var(--inv-ink); font: 600 13px var(--inv-font); }
.inv svg .tiptext { fill: var(--inv-ink); font: 13px var(--inv-font); }

@media (max-width: 760px) {
  .inv .charts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .inv .top { padding: 0 var(--inv-s4); }
  .inv .top .portal, .inv .top .who { display: none; }
  .inv .page { padding: var(--inv-s4); }
  .inv .btn { height: 44px; }
  .inv .f input { height: 44px; }
  .inv .form { grid-template-columns: 1fr; }
  .inv .head .end { margin-inline-start: 0; }
  .inv .tiles { grid-template-columns: 1fr 1fr; gap: var(--inv-s2); }
  .inv .tile { padding: var(--inv-s2) var(--inv-s3); }
  .inv .tile.big { grid-column: 1 / -1; }
  .inv .tile b { font-size: 18px; line-height: 26px; }
  .inv .tile.big b { font-size: 24px; line-height: 32px; }
  .inv .chart { padding: var(--inv-s2); min-height: 250px; }
  .inv td, .inv th { padding-left: var(--inv-s2); padding-right: var(--inv-s2); }
  .inv th { min-width: 84px; }
  .inv details.explain dl { grid-template-columns: 1fr; }
  .inv details.explain dd { margin-bottom: var(--inv-s2); }
}
@media print {
  .inv .top .end, .inv .head .end, .inv .skip { display: none; }
  body.inv { background: #fff; }
  .inv .box { overflow: visible; }
  .inv details.explain dl { display: grid; }
}

/* ---- components/mobile.css ---- */
/* Revision 2 — 2026-10-22: one app only (owner 524a30ae) */
/* DRAFT for MOB-1/2 — merge by the worker.
   mobile.css — the mobile-first layer, appended AFTER the last component in app.css (one more @import, same ?v).
   Uses only class names and tokens that exist in web/ today (tokens.css, components/*.css) plus the few NEW hooks
   marked "NEW HOOK" (they need the HTML of lane C). No product figure is typed here: sizes are the --mob-* tokens.
   Media queries cannot read variables, so the three breakpoints are written out and are the ONLY ones this file uses:
     PHONE   = (max-width: 760px), (pointer: coarse) and (max-height: 500px)   <- phones, and phones turned sideways
     TABLET  = (min-width: 761px) and (max-width: 1024px)
     TOUCH   = (pointer: coarse), (max-width: 760px)
   Revision 2 note: the employer rules below are RESPONSIVE WEB layout for the employer web pages in a phone/tablet browser. There is no employer app;
   the bottom bar there is page layout, not an app shell. Only the employee pages are the installable app (Nawtt).
   Split map for parallel lanes (see MOB-1-SPEC.md section 6): sections 1-2 shell, 3 nav+dialogs, 4 tables,
   5 forms+targets, 6 tablet, 7 RTL (Arabic), 8 motion, 9 contrast. Each section may become components/mobile-<name>.css. */

/* ===== 1. Tokens: every mobile size lives here, tests override the safe-area ones =============================== */
:root {
  --mob-touch: 44px;                 /* smallest finger target, both sides */
  --mob-nav-h: 56px;                 /* bottom navigation bar height (without the safe area) */
  --mob-nav-h-short: 48px;           /* the same bar on a phone turned sideways */
  --mob-text-min: 0.75rem;           /* nothing smaller than this on a phone */
  --mob-input-text: 1rem;            /* inputs below this make iOS zoom the page on focus */
  /* Safe areas (notch, home indicator, rounded corners). The fallback keeps desktop unchanged. A test sets these
     inline on :root to prove every edge honours them (Playwright cannot fake env()). */
  --mob-safe-top: env(safe-area-inset-top, 0px);
  --mob-safe-right: env(safe-area-inset-right, 0px);
  --mob-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mob-safe-left: env(safe-area-inset-left, 0px);
  --mob-gutter: var(--nawtt-space-3);
}

/* ===== 2. Shell, topbar, safe areas (phone) ===================================================================== */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-wrap: anywhere; }             /* a long name or IBAN wraps, it never widens the page */
  .topbar { padding-block-start: var(--mob-safe-top); }
  .topbar__inner {
    padding-inline-start: max(var(--mob-gutter), var(--mob-safe-left));
    padding-inline-end: max(var(--mob-gutter), var(--mob-safe-right));
  }
  .topbar .btn, .topbar .btn--sm { min-block-size: var(--mob-touch); min-inline-size: var(--mob-touch); }
  .shell {
    padding-inline-start: max(var(--mob-gutter), var(--mob-safe-left));
    padding-inline-end: max(var(--mob-gutter), var(--mob-safe-right));
  }
  /* room for the fixed bottom bar so the footer and last card are never hidden behind it */
  body:has(#employeeTabs, #employerTabs) .shell {
    padding-block-end: calc(var(--mob-nav-h) + var(--mob-safe-bottom) + var(--nawtt-space-6));
  }
  .toasts {
    inset-inline: max(var(--mob-gutter), var(--mob-safe-left)) max(var(--mob-gutter), var(--mob-safe-right));
    inset-block-end: calc(var(--mob-safe-bottom) + var(--nawtt-space-3));
  }
  body:has(#employeeTabs, #employerTabs) .toasts {
    inset-block-end: calc(var(--mob-nav-h) + var(--mob-safe-bottom) + var(--nawtt-space-3));
  }
  .page-head__sub { max-inline-size: none; }
  /* big numbers shrink with the screen instead of clipping (200 % text still fits: see section 8) */
  .balance { font-size: min(var(--nawtt-hero), 10.5vw); }
  .kpi__label, .kpi__note, .card__hint, .field__hint, .field__label, .eyebrow, .chip, .filter,
  .table th, .table tbody td::before, .toolbar__count, .list-row__meta, .meter__caption, .kv__label {
    font-size: max(var(--mob-text-min), 1em);
  }
  .kpi__label { font-size: var(--mob-text-min); }            /* beats the 0.625rem set at 520px in responsive.css */
  .kv { flex-wrap: wrap; }                                   /* large text: label above value rather than clipping */
  .kv__value { white-space: normal; }
  /* 200 % text: the topbar takes a second line instead of squeezing its buttons until their labels clip (MOB-107);
     at normal size everything still fits on one line, so nothing moves */
  .topbar__inner { flex-wrap: wrap; row-gap: var(--nawtt-space-2); }
  .topbar__end { flex-wrap: wrap; justify-content: flex-end; }
  .topbar__end > * { flex-shrink: 0; }
}

/* ===== 2b. MOB-107 at tablet width: 200 % text wraps the topbar =================================================
   The phone block above already wraps the topbar at 200 % text, but T768 (768 px) is OUTSIDE (max-width: 760px).
   With the shared PWD-1 "Change password" button now in the employee topbar, at 200 % text the language button was
   squeezed below its label (clipped: 91 px of text in a 74 px button). The same wrap rule applies here; at normal text
   everything still fits on one line, so nothing moves. */
@media (min-width: 761px) and (max-width: 1024px) {
  .topbar__inner { flex-wrap: wrap; row-gap: var(--nawtt-space-2); }
  .topbar__end { flex-wrap: wrap; justify-content: flex-end; }
  .topbar__end > * { flex-shrink: 0; }
}

/* ===== 3. Bottom navigation + sheets (phone) ==================================================================== */
/* The EXISTING tab bars become the bottom bar. No second control, no new JS for employee: the same .tab buttons,
   the same show()/keyboard/hash code in app.js. Employee: 3 tabs. Employer: 4 tabs + More (NEW HOOK, lane C). */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  #employeeTabs, #employerTabs {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: var(--nawtt-z-overlay);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding-block-end: var(--mob-safe-bottom);
    padding-inline-start: var(--mob-safe-left);
    padding-inline-end: var(--mob-safe-right);
    overflow: visible;
    background: var(--nawtt-surface);
    border-block-start: 1px solid var(--nawtt-line);
    border-block-end: none;
    box-shadow: 0 -2px 8px rgba(33, 31, 29, 0.06);
  }
  #employeeTabs .tab, #employerTabs .tab {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-block-size: var(--mob-nav-h);
    min-inline-size: var(--mob-touch);
    padding: var(--nawtt-space-1) var(--nawtt-space-1);
    border-radius: 0;
    font-size: var(--mob-text-min);
    letter-spacing: 0;
    line-height: 1.2;
    white-space: normal;                 /* "New request" may use two lines; the bar never grows sideways */
    text-align: center;
  }
  #employeeTabs .tab[aria-selected='true']::after, #employerTabs .tab[aria-selected='true']::after {
    inset-block-start: 0;
    inset-block-end: auto;
    inset-inline: var(--nawtt-space-4);
    border-radius: 0 0 2px 2px;
  }
  #employeeTabs .tab[aria-selected='true'], #employerTabs .tab[aria-selected='true'] { background: var(--nawtt-burgundy-soft); }
  /* NEW HOOK: the badge moves INSIDE the Approvals button (employer.html), so it can sit on the corner */
  #employerTabs .tab > .tab__badge {
    position: absolute;
    inset-block-start: 4px;
    inset-inline-end: calc(50% - 22px);
  }
  #employerTabs > .tab__badge { display: none; }           /* the old sibling badge, until lane C moves it */
  /* NEW HOOK: the "More" sheet (a <dialog class="sheet"> opened by #employerMoreTab) */
  dialog.sheet {
    margin: auto 0 0;
    inline-size: 100%;
    max-inline-size: none;
    max-block-size: 85dvh;
    overflow: auto;
    border: none;
    border-radius: var(--nawtt-radius-module) var(--nawtt-radius-module) 0 0;
    padding: 0 max(var(--nawtt-space-4), var(--mob-safe-right)) calc(var(--nawtt-space-4) + var(--mob-safe-bottom)) max(var(--nawtt-space-4), var(--mob-safe-left));
    background: var(--nawtt-surface);
    color: var(--nawtt-ink);
    box-shadow: var(--nawtt-shadow-lifted);
  }
  dialog.sheet::backdrop { background: rgba(33, 31, 29, 0.45); }
  .sheet__item { display: flex; align-items: center; min-block-size: var(--mob-touch); inline-size: 100%; padding-inline: var(--nawtt-space-2); }

  /* The confirm dialog (existing dialog.confirm) becomes a bottom sheet: thumb reach, full-width buttons. */
  dialog.confirm {
    margin: auto 0 0;
    inline-size: 100%;
    max-inline-size: none;
    max-block-size: 90dvh;
    overflow: auto;
    border-radius: var(--nawtt-radius-module) var(--nawtt-radius-module) 0 0;
  }
  /* a sheet sits ON the bottom edge from its first frame: it fades in instead of the centred dialog's scale "pop",
     which shrinks it away from the edges (374 of 390 px, 2 px below the screen) while it plays */
  dialog.confirm[open], dialog.sheet[open] { animation-name: fade-in; }
  .confirm__body { padding: var(--nawtt-space-4); }
  .confirm__actions {
    flex-direction: column-reverse;               /* the safe choice reads last in DOM order, sits on top visually */
    align-items: stretch;
    padding: var(--nawtt-space-3) var(--nawtt-space-4) calc(var(--nawtt-space-4) + var(--mob-safe-bottom));
  }
  .confirm__actions .btn { inline-size: 100%; min-block-size: var(--mob-touch); }

  /* The main act within one-handed reach (employee "Request advance"): the action row sticks above the bar. */
  #panel-advance .form-actions {
    position: sticky;
    inset-block-end: calc(var(--mob-nav-h) + var(--mob-safe-bottom) + var(--nawtt-space-2));
    z-index: var(--nawtt-z-sticky);
    padding-block: var(--nawtt-space-2);
    background: var(--nawtt-surface);
  }
  /* .card is overflow:hidden, which makes the card the sticky row's scroll box: the row then never sticks and sits
     behind the bar. clip keeps the rounded clipping without being a scroll box, so the row sticks to the screen. */
  #panel-advance .card { overflow: clip; }
}
/* Phone turned sideways: a slimmer bar and a compact hero, because the screen is short. */
@media (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  #employeeTabs .tab, #employerTabs .tab { min-block-size: var(--mob-nav-h-short); flex-direction: row; gap: var(--nawtt-space-2); }
  body:has(#employeeTabs, #employerTabs) .shell { padding-block-end: calc(var(--mob-nav-h-short) + var(--mob-safe-bottom) + var(--nawtt-space-4)); }
  .hero { padding: var(--nawtt-space-3); gap: var(--nawtt-space-2); }
  .hero::after { display: none; }
  .balance { font-size: min(var(--nawtt-hero), 8vh); }
  .topbar { position: static; }                  /* a sticky topbar would eat a third of a 390 px screen */
  /* the sticky action row cannot rise above its form, which starts under the bar on a 390 px high screen: there it
     sat behind the bar. Sideways, the row stays in the form and is reached by scrolling (MOB-113). */
  #panel-advance .form-actions { position: static; }
  /* the on-screen keyboard fills a short screen: while a field has focus the bar steps aside */
  body:has(input:focus, select:focus, textarea:focus) :is(#employeeTabs, #employerTabs) { display: none; }
}
/* Filter chips: one scrollable row of 44 px chips instead of three wrapped rows (employee "My requests", lists). */
@media (max-width: 760px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--mob-gutter)); padding-inline: var(--mob-gutter); }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; white-space: nowrap; }
}

/* ===== 4. Tables: cards on phones (existing 760 rule), no leftover minimum widths =============================== */
/* responsive.css turns .table into cards at 760 and clears min-inline-size for .table--advances/.table--employees
   only. These four keep a minimum width on a block-level table and push the PAGE sideways on a phone. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .table--invoices, .table--settlements, .recon-table, .recon-entry-table { min-inline-size: 0; table-layout: auto; }
  /* the advance and people tables: tables.css/tabs.css (imported AFTER responsive.css) put back min 1080/1000 px on a
     phone, so the cards were 1080 px wide; and their one-line ellipsis becomes wrapping text inside a card */
  .table--advances, .table--employees { min-inline-size: 0; table-layout: auto; }
  .table--advances td, .table--employees td,
  .table--advances .table__main, .table--advances .table__meta,
  .table--employees .table__main, .table--employees .table__meta { white-space: normal; overflow: visible; text-overflow: clip; }
  /* a header row written without <thead> (<tr><th>..</th></tr>, accounting statements): hidden like thead is; every
     card cell carries its own data-label. A row header (<th> next to <td>s) wraps instead of widening the card. */
  .table tbody tr:not(:has(td)) { display: none; }
  .table tbody th { white-space: normal; overflow-wrap: anywhere; }
  .table-wrap { overflow-x: visible; }
  .table td .input, .recon-entry-table .input { inline-size: 100%; min-inline-size: 0; }
  .card__tools { inline-size: 100%; }
  .card__tools .input, .card__tools .btn { inline-size: 100%; min-inline-size: 0; }
  .recon-matcher, .recon-columns, .form-grid--three { grid-template-columns: minmax(0, 1fr); }
  /* a long IBAN, reference or account name wraps inside its card row */
  .table tbody td { overflow-wrap: anywhere; word-break: normal; }
  .statement__block, .draft-card, .panel-card, .invoice-lines { overflow-x: visible; }
}
/* A phone turned sideways (844 x 390) is wider than 760, so the card layout of responsive.css + tables-phone.css
   (max-width: 760px) is repeated here for it, with the same final values; nothing below 761 px is touched. */
@media (pointer: coarse) and (max-height: 500px) and (min-width: 761px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; inline-size: 100%; }
  .table tbody tr {
    background: var(--nawtt-surface);
    border: 1px solid var(--nawtt-line);
    border-radius: var(--nawtt-radius-module);
    box-shadow: var(--nawtt-shadow);
    margin-block-end: var(--nawtt-space-3);
    padding: var(--nawtt-space-2) var(--nawtt-space-3);
  }
  .table tbody tr:hover { background: var(--nawtt-surface); }
  .table tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--nawtt-space-3);
    padding: var(--nawtt-space-2) 0;
    border-block-end: 1px solid var(--nawtt-line);
    text-align: end;
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nawtt-muted);
    text-align: start;
    flex: 0 1 auto;
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }
  .table tbody td:not([data-label])::before { content: none; }
  .table tbody td:last-child { border-block-end: none; }
  .table tbody td.num, .table tbody td.amount-cell { white-space: normal; }
  .table tbody td.actions { justify-content: flex-end; flex-wrap: wrap; }
  .table tbody td.actions .row-actions { margin-inline-start: auto; flex-wrap: wrap; }
  .table .btn, .table .btn--sm, .table .btn--icon { min-block-size: var(--mob-touch); }
  .table .btn--sm, .table .btn--icon { min-inline-size: var(--mob-touch); }
  .table__empty td { display: block; }
  .table__empty td::before { content: none; }
}

/* ===== 5. Touch targets, forms, hover (every touch device, any width) ========================================== */
@media (pointer: coarse), (max-width: 760px) {
  .filter, .btn--sm, .btn--icon, .input-wrap__action, .search .input, .tab, .btn { min-block-size: var(--mob-touch); }
  .btn--icon, .input-wrap__action, .btn--sm { min-inline-size: var(--mob-touch); }
  .journal-entry-link { display: inline-flex; align-items: center; min-block-size: var(--mob-touch); min-inline-size: var(--mob-touch); white-space: nowrap; } /* PAGE-1: the journal row opener */
  .filter { padding-inline: var(--nawtt-space-4); }
  .filters { gap: var(--nawtt-space-2); }
  .input, select.input, textarea.input, .search .input { min-block-size: var(--mob-touch); font-size: var(--mob-input-text); }
  .input::placeholder { opacity: 1; }                     /* contrast gate: the placeholder keeps the full muted colour */
  /* the field focus ring: forms.css draws a 16 % burgundy halo (1.34:1 on the card, MOB-103 focus); a solid 3 px
     burgundy ring is >= 3:1 on every light ground. Desk left as recorded (MOB-114). */
  .input:focus-visible { box-shadow: 0 0 0 3px var(--nawtt-focus); }
  /* check boxes and radios: the visible box stays small, the hit area is a 44 px cell (the box sits in a <label>) */
  .recon-check { inline-size: var(--mob-touch); min-inline-size: var(--mob-touch); }
  .recon-checkbox { inline-size: 1.5rem; block-size: 1.5rem; }
  .recon-check, .recon-check label { display: grid; place-items: center; min-block-size: var(--mob-touch); }
  .recon-check label { min-inline-size: var(--mob-touch); cursor: pointer; }   /* label.recon-check__hit: the 44 x 44 hit area */
  .row-actions { gap: var(--nawtt-space-2); }             /* targets must not touch each other */
  .skip-link { min-block-size: var(--mob-touch); display: inline-flex; align-items: center; }
  /* the brand link (home) and the link chips of the books head (period, integrity) are targets too */
  .brand { min-block-size: var(--mob-touch); min-inline-size: var(--mob-touch); }
  a.chip[href] { min-block-size: var(--mob-touch); }
}
/* NO HOVER-ONLY CONTROL: today every :hover rule only tints or lifts; this removes the sticky "hover" a finger leaves
   behind and keeps the lift effects to devices that really hover. Nothing may be shown only on :hover. */
@media (hover: none) {
  .tab:hover { background: transparent; color: var(--nawtt-muted); }
  .tab[aria-selected='true']:hover { color: var(--nawtt-burgundy); }
  .filter:hover { background: var(--nawtt-surface); color: var(--nawtt-muted); }
  .filter[aria-pressed='true']:hover { background: var(--nawtt-burgundy-soft); color: var(--nawtt-burgundy); }
  .btn--ghost:hover { background: var(--nawtt-surface); }
  .btn--quiet:hover, .input-wrap__action:hover { background: transparent; color: var(--nawtt-muted); }
  .table tbody tr:hover { background: transparent; }
  .list-row:hover, .kpi:hover { transform: none; box-shadow: var(--nawtt-shadow); }
  .kpi:hover .kpi__icon { transform: none; }
  .btn:hover svg { transform: none; }
}

/* ===== 6. Tablets: 768 and 1024, portrait and landscape (employee, employer, platform, books) =================== */
/* A phone turned sideways (844 x 390, coarse pointer, at most 500 px high) is a PHONE, not a tablet: it is left out
   here, otherwise these later rules beat the phone ones (480 px dialog instead of the sheet, desk tables). */
@media (min-width: 761px) and (max-width: 1024px) and (min-height: 501px), (min-width: 761px) and (max-width: 1024px) and (pointer: fine) {
  .shell { padding-inline-start: max(var(--nawtt-space-5), var(--mob-safe-left)); padding-inline-end: max(var(--nawtt-space-5), var(--mob-safe-right)); }
  /* two columns of fields survive on a tablet (responsive.css folds them at 860) */
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid--three { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  /* the section tabs stay on top and scroll sideways with a snap and an edge fade; the active one is scrolled into view */
  .tabs { scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--nawtt-space-4), #000 calc(100% - var(--nawtt-space-4)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--nawtt-space-4), #000 calc(100% - var(--nawtt-space-4)), transparent 100%); }
  .tab { scroll-snap-align: center; }
  /* wide tables scroll INSIDE their wrapper, never the page; the first column stays in view */
  .table-wrap { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .table-wrap .table th:first-child, .table-wrap .table td:first-child {
    position: sticky; inset-inline-start: 0; z-index: 1; background: var(--nawtt-surface);
  }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }   /* 200 px at normal text */
  .toasts { inset-block-end: calc(var(--mob-safe-bottom) + var(--nawtt-space-4)); inset-inline-end: max(var(--nawtt-space-4), var(--mob-safe-right)); }
  dialog.confirm { inline-size: min(480px, calc(100vw - 2rem)); }
  .balance { font-size: min(var(--nawtt-hero), 8vw); }   /* = the hero size at normal text; caps it at 200 % */
  /* the desk's fixed-column tables (min 1080 / 1000 px) grow with the text, so at 200 % the action buttons keep their
     room inside the sideways-scrolling wrapper; at normal text 67.5rem = 1080 px and 62.5rem = 1000 px, as before */
  .table--advances { min-inline-size: 67.5rem; }
  .table--employees { min-inline-size: 62.5rem; }
  /* the people table has NINE columns but tabs.css sizes seven (= 100 %), so Bank and Actions were 0 px wide and the
     Advance button was cut (also on the desk; the desk is left as recorded). On a tablet the nine share the width: */
  .table--employees th:nth-child(1) { inline-size: 17%; }
  .table--employees th:nth-child(2) { inline-size: 10%; }
  .table--employees th:nth-child(3) { inline-size: 9%; }
  .table--employees th:nth-child(4) { inline-size: 9%; }
  .table--employees th:nth-child(5) { inline-size: 8%; }
  .table--employees th:nth-child(6) { inline-size: 9%; }
  .table--employees th:nth-child(7) { inline-size: 10%; }
  .table--employees th:nth-child(8) { inline-size: 16%; }
  .table--employees th:nth-child(9) { inline-size: 12%; }
}
/* Tablet landscape is short: keep the topbar from taking the top of a 768 px high screen. */
@media (min-width: 761px) and (max-width: 1024px) and (orientation: landscape) and (max-height: 800px) {
  .topbar { position: static; }
  .hero::after { display: none; }
}

/* ===== 7. Arabic (employee portal only; html[lang=ar][dir=rtl] is set by app.js) ================================ */
/* Letter-spacing and upper-casing break Arabic: letters must join. Larger line height for the Naskh/Sans Arabic faces. */
html[lang='ar'] body { line-height: 1.75; }
html[lang='ar'] .eyebrow, html[lang='ar'] .field__label, html[lang='ar'] .kpi__label, html[lang='ar'] .kv__label,
html[lang='ar'] .chip, html[lang='ar'] .filter, html[lang='ar'] .hero__label, html[lang='ar'] .table th,
html[lang='ar'] .tab, html[lang='ar'] .btn, html[lang='ar'] .live-dot, html[lang='ar'] .brand__portal,
html[lang='ar'] .summary-item__label, html[lang='ar'] .meter__caption {
  letter-spacing: 0;
  text-transform: none;
}
html[lang='ar'] .tab, html[lang='ar'] .btn { line-height: 1.5; }
/* figures stay left-to-right inside the right-to-left line (rtl.css already isolates .amount and .num) */
html[lang='ar'] .kv__value, html[lang='ar'] .list-row__amount, html[lang='ar'] .fee-line__value,
html[lang='ar'] .summary-item__value, html[lang='ar'] .balance { unicode-bidi: isolate; }
html[lang='ar'] .kv__value, html[lang='ar'] .fee-line__value { direction: ltr; text-align: end; }
html[lang='ar'] .balance > :not(.amount__currency) { direction: ltr; unicode-bidi: isolate; }   /* the hero figure */
/* running text, hints and rows keep the Arabic line height (several components set 1.5 for Latin) */
html[lang='ar'] :is(p, .page-head__sub, .field__hint, .list-row, .list-row__meta, .card__text, .card__hint, .kpi__note) { line-height: 1.75; }
/* the bottom bar, sheets and sticky action row use only logical properties above, so they mirror by themselves;
   the selected-tab bar and the badge corner mirror with inset-inline. A back/next arrow carries .icon--direction. */
html[lang='ar'] #employeeTabs .tab { font-size: max(var(--mob-text-min), 0.8125rem); }   /* Arabic reads smaller at the same size */

/* ===== 8. Motion and large text ================================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::after, .login-brandside .core-art, .core--assemble rect, .live-dot::before, .skeleton { animation: none !important; }
  .reveal, .reveal-fast, .stagger > *, .panel.is-entering, .tab[aria-selected='true']::after, dialog.confirm[open], .toast { animation: none !important; }
  .meter__fill, .btn, .tab, .filter, .list-row, .kpi { transition: none !important; }
  .btn::before { display: none; }                         /* the tap ripple */
  .table tbody tr.is-new, .table tbody tr.is-changed, .list-row.is-new, .list-row.is-changed { animation: none; outline: 2px solid var(--nawtt-burgundy-soft); }
}
/* LARGE TEXT: nothing is fixed in px except borders and targets, so the person's own text size (browser or OS
   setting, up to twice) reflows. These only stop the few nowrap spots from forcing a sideways scroll. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .brand__wordmark { font-size: 1.125rem; }
  .fee-line { flex-wrap: wrap; white-space: normal; }
  .kpi__value { white-space: normal; overflow-wrap: anywhere; font-size: clamp(1rem, 6vw, 1.5rem); }
  .list-row__amount { white-space: normal; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.375rem), 1fr)); }   /* 150 px at normal text */
}
/* Phones AND tablets: the stacks never grow wider than the screen (a grid column sized by its widest child pushed
   the employer page to 552 px at 200 % text), and the one-line spots wrap when the text is large. */
@media (max-width: 1024px), (pointer: coarse) and (max-height: 500px) {
  .stack, .panel, .list { grid-template-columns: minmax(0, 1fr); }
  .kpi { grid-template-columns: minmax(0, 1fr); }
  .kpi__value { white-space: normal; overflow-wrap: anywhere; }
  .kv { flex-wrap: wrap; }
  .kv__value { white-space: normal; }
  .fee-line { flex-wrap: wrap; white-space: normal; }
  .fee-line__value { white-space: normal; overflow-wrap: anywhere; }
  .btn { white-space: normal; line-height: 1.25; }        /* a label that does not fit takes two lines, it is never cut */
  .field { grid-template-columns: minmax(0, 1fr); }       /* a month/date input's own width never widens its field */
  .field > .input { min-inline-size: 0; }
  .chip { white-space: normal; }
  .balance { white-space: normal; }                        /* the figure and its currency may take two lines */
  .balance > * { white-space: nowrap; }
  /* the desk's fixed-column tables keep their columns but wrap a long name instead of cutting it with an ellipsis */
  .table--advances th, .table--advances td, .table--employees th, .table--employees td,
  .table--advances .table__main, .table--advances .table__meta,
  .table--employees .table__main, .table--employees .table__meta { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
}

/* ===== 9. Contrast (suspects; MOB-103 decides, the numbers are measured, not typed here) ======================== */
/* These use opacity or alpha over the ground and are the first places the gate may fail. The fix, if it does, is a
   solid token instead of opacity; leave this section empty if MOB-103 is green without it. */
.chip--closed { color: var(--nawtt-ink); }
/* the books' figure lists (.kv-list, accounting.js) reuse .kv__label, whose colour is the hero's off-white at 75 %:
   1.07:1 on the light card. On a light card the label takes the muted ink, as .kv--ink does (>= 4.5:1). */
.kv-list .kv__label { color: var(--nawtt-muted); }
/* focus rings inside the burgundy hero: the burgundy ring was 1.00:1 on the hero; off-white is the topbar's answer */
.hero :focus-visible { outline-color: var(--nawtt-offwhite); }
.alert__details, .state-box__details, .draft-card__meta, .draft-card__readonly { opacity: 1; color: var(--nawtt-muted); }
.state-box__text { opacity: 1; color: var(--nawtt-muted); }


/* =================================================================================================================
   OPS-2 item 8 (patch-c): forms read as fields everywhere.
   Inputs/selects keep the existing border but get a surface distinct from the page (off-white on light, dark panel in
   dark mode) and size to their content instead of stretching across the page. Full-width controls (textareas, boxed
   FormKit fields, wraps) opt back in below / via their existing more specific rules.
   ================================================================================================================= */
:root { --ops2-field-bg: #F6F7F2; }


.input, select.input, textarea.input { background: var(--ops2-field-bg); }
.field .input { justify-self: start; inline-size: auto; min-inline-size: min(100%, 7rem); max-inline-size: 100%; }
.field .input[type='month'], .field .input[type='date'], .field .input[type='number'], .field select.input { min-inline-size: 0; }
.field textarea.input, .field--full .input, .fk-col .input, .fk-box .input, .input-wrap .input { inline-size: 100%; max-inline-size: 100%; }
#expMonth, #costMonth, #pubMonth, #invMonth { inline-size: 12rem; max-inline-size: 100%; }
#pubSearch { inline-size: min(100%, 22rem); max-inline-size: 100%; }
.search .input { inline-size: min(100%, 22rem); }
.card .input:not(textarea) { inline-size: auto; max-inline-size: 100%; }
.card textarea.input { inline-size: min(100%, 34rem); max-inline-size: 100%; }

/* PULL-1 (owner 2026-11-15): the app's pull-down refresh indicator (common.js pullInit) */
.pull-ind{position:fixed;left:50%;top:0;z-index:2147483000;width:40px;height:40px;margin-left:-20px;border-radius:50%;background:#fff;color:#8B1538;box-shadow:0 2px 8px rgba(0,0,0,.25);display:flex;align-items:center;justify-content:center;pointer-events:none}
.pull-ind[hidden]{display:none}.pull-ind svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.pull-ind--ready{background:#8B1538;color:#fff}.pull-ind--busy{background:#fff;color:#8B1538}
@media (prefers-reduced-motion:no-preference){.pull-ind--busy svg{animation:pullspin .8s linear infinite}}@keyframes pullspin{to{transform:rotate(360deg)}}
.pull-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
