/* TableSpark app theme — the one palette.
 *
 * Every app page used to declare its own :root. Sixteen pages, 14–24 colour
 * variables each, and they had drifted into five different page backgrounds:
 *
 *   #F3F4F6 x12   the de-facto app grey
 *   #FBF8F3 x1    Dashboard — warm cream, the odd one out
 *   #FAFAF8 x1    #F6F7F9 x1    #F6F5F1 x1
 *
 * Eight more tokens (--surface, --accent, --ink-50, --sage-tint, --sage-600,
 * --paper-2, --hc, --p) were used by pages that never declared them anywhere,
 * so those var() calls resolved to nothing. They are defined here.
 *
 * A page may still declare tokens that are genuinely its own. What it may not
 * do is redeclare anything in the CORE block below — test/app-theme.test.mjs
 * fails if it does.
 */

/* The app typeface — Albert Sans, the brand face from the design system.
   Loaded here so every app page gets it from the one stylesheet they all
   already link; Georgia is the editorial serif accent and needs no download. */
@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,500;1,600&display=swap');
/* The neutral palette and control states (TS-NEUTRAL-UI-20261113): the CORE tokens below are mapped onto it. */
@import url('./neutral-ui.css');

:root {
  /* ── CORE: surfaces ───────────────────────────────────────────────────────
     The page is white now. It was #F3F4F6 on most pages and warm cream on the
     Dashboard, which is what read as yellow-green next to everything else. */
  --paper: #FFFFFF;
  --surface: #FFFFFF;
  --paper-2: #F7F7F8;   /* recessed wells, table stripes */
  --white: #fff;
  --line: #E5E7EB;

  /* ── CORE: ink ────────────────────────────────────────────────────────────
     Neutral greys. The Dashboard's ramp was warm brown (#4A4238, #8E877B,
     #B6AFA2), so even its borders and muted labels carried the cream cast. */
  --ink-900: #1A1A1A;
  --ink-800: #1A1A1A;
  --ink-700: #1A1A1A;
  --ink-600: #1A1A1A;
  --ink-500: #6B7280;
  --ink-400: #6B7280;
  --ink-300: #9CA3AF;
  --ink-200: #E5E7EB;
  --ink-100: #F7F7F8;
  --ink-50:  #F7F7F8;

  /* TS-NEUTRAL-UI-20261113: every tinted token below now resolves to the neutral palette, so every themed
     app page inherits it. The names stay so existing var() calls keep working; "ember" and "sage" are black now.
  */
  /* ── CORE: brand ──────────────────────────────────────────────────────────
     Sage, the real brand primary. --ember-* is the historical name and stays
     so the existing pages keep working; --sage-* are the aliases pages were
     already reaching for without anything defining them. */
  --ember-600: #1A1A1A;
  --ember-500: #1A1A1A;
  --ember-300: #E5E7EB;
  --ember-50:  #F7F7F8;
  --sage-600: var(--ember-600);
  --sage-tint: var(--ember-50);
  --accent: var(--ember-500);

  /* ── CORE: status ─────────────────────────────────────────────────────── */
  /* Foreground/background pairs stay above WCAG AA (4.5:1) for normal text. */
  --ok: #1A1A1A;      --ok-bg: #F7F7F8;
  --warn: #1A1A1A;    --warn-bg: #F7F7F8;
  --danger: #D92D20;  --danger-bg: #F7F7F8;
  --info: #1A1A1A;    --info-bg: #F7F7F8;

  /* ── CORE: geometry ───────────────────────────────────────────────────── */
  --r-sm: 8px;
  --r-md: 8px;
  --r-lg: 8px;
  --side: 236px;

  /* ── CORE: glass ──────────────────────────────────────────────────────────
     Glass needs something behind it to be glass. On a flat white page a
     translucent white panel is just a white panel with extra cost, so the
     blur is reserved for chrome that content actually scrolls under — sticky
     headers, the sidebar, modal scrims. Flat panels use --surface + --shadow-*
     instead, which is what makes them read as raised rather than smudged. */
  --glass: #FFFFFF;
  --glass-2: #FFFFFF;
  --glass-brd: #E5E7EB;
  --glass-blur: none;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.05);
  --edge: 0 0 0 0 transparent;

  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Legacy single-letter token some pages read; kept so those var() calls
     resolve rather than silently collapsing. */
  --p: var(--paper);
  --hc: var(--ink-900);
}

/* ── recipes ────────────────────────────────────────────────────────────────
   Two panel treatments, so a page picks an intent instead of restating a
   border and a shadow it half-remembers from another page. */

/* A raised panel on the white page. This is the default for cards. */
.ts-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* Real glass: only where content passes underneath. */
.ts-glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  box-shadow: var(--edge), var(--shadow-soft);
}
.ts-glass-solid { background: var(--glass-2); }

/* Without backdrop-filter, translucency over moving content is unreadable —
   fall back to opaque rather than to a grey wash. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ts-glass, .ts-glass-solid { background: #fff; }
}

@media (prefers-reduced-transparency: reduce) {
  .ts-glass, .ts-glass-solid {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ── table QR codes (Dashboard → Tables) ───────────────────────────────────
   The cards mirror what gets printed, so the grid is sized by the code rather
   than by the column: a QR that is pretty on screen and unscannable at 25mm
   helps nobody. */
.tsqr-grid {
  display: grid;
  /* auto-fill needs a container with a real width. Inside a flex row it gets
     min-content and silently collapses to one column, which is what happened
     when this sat in the chip row. */
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.tsqr-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 8px 8px;
  text-align: center;
  background: var(--surface);
}
.tsqr-art { line-height: 0; }
.tsqr-art svg { width: 100%; height: auto; max-width: 112px; }
.tsqr-label { font-size: 13px; font-weight: 800; margin-top: 8px; letter-spacing: -.01em; color: var(--ink-900); }
.tsqr-hint { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); margin-top: 2px; }

/* Disclosure headings for the QR block. A marker that says which way it opens,
   because the row is otherwise indistinguishable from a label. */
.tsqr-summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.tsqr-summary::-webkit-details-marker { display: none; }
.tsqr-summary::before {
  content: "";
  width: 0; height: 0;
  border-left: 4px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform .15s var(--ease);
}
details[open] > .tsqr-summary::before { transform: rotate(90deg); }
.tsqr-summary:hover { color: var(--ink-900); }

/* ── table picker (Bookings → choose on the plan) ──────────────────────────
   Read-only mini floor plan. Occupied is a HARD block (the RPC would reject
   it); a seats mismatch is a SOFT amber warning — staff may still assign. */
.tpk { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.tpk-plan {
  width: 100%; max-height: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.tpk-t { cursor: pointer; }
.tpk-t:focus { outline: none; }
.tpk-t rect, .tpk-t ellipse { fill: #fff; stroke: var(--ink-300); stroke-width: 1.5; }
/* Labels sized to survive the whole-floor viewBox squeeze — 12px read as
   smudges once 1000 floor units compressed into ~700 css px. */
.tpk-t text { font: 700 16px 'Inter', system-ui, sans-serif; fill: var(--ink-700); pointer-events: none; }
.tpk-t .tpk-sub { font-size: 11.5px; font-weight: 500; fill: var(--ink-400); }
.tpk-free rect, .tpk-free ellipse { fill: var(--ok-bg); stroke: var(--ok); }
.tpk-occupied { cursor: not-allowed; }
.tpk-occupied rect, .tpk-occupied ellipse { fill: var(--ink-100); stroke: var(--ink-200); stroke-dasharray: 4 3; }
.tpk-occupied text { fill: var(--ink-300); }
.tpk-mismatch rect, .tpk-mismatch ellipse { fill: var(--warn-bg); stroke: var(--warn); }
.tpk-ring { fill: none; stroke: var(--ember-500); stroke-width: 2.2; stroke-dasharray: 5 3; pointer-events: none; }
.tpk-t:focus-visible rect, .tpk-t:focus-visible ellipse { stroke: var(--ember-600); stroke-width: 2.4; }
.tpk-area { fill: var(--ember-50); fill-opacity: .45; stroke: var(--ember-300); stroke-dasharray: 6 4; stroke-width: 1.2; pointer-events: none; }
.tpk-areatext { font: 700 13px 'Inter', system-ui, sans-serif; fill: var(--ember-600); pointer-events: none; }
.tpk-legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-500); flex-wrap: wrap; }
.tpk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tpk-k { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1.5px solid; }
.tpk-k-free { background: var(--ok-bg); border-color: var(--ok); }
.tpk-k-occ { background: var(--ink-100); border-color: var(--ink-200); }
.tpk-k-mis { background: var(--warn-bg); border-color: var(--warn); }
.tpk-note { font-size: 12px; color: var(--ink-400); min-height: 15px; }
.tpk-note.tpk-warn { color: var(--warn); }
.tpk-err { color: var(--danger); }
.tpk-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tpk-combine.on { background: var(--ember-50); color: var(--ember-600); border: 1px solid var(--ember-300); }

/* ── V3 · the editorial language (Claude Design, 2026-07-31) ────────────────
   Shared surface for the whole app, single-sourced here after the Dashboard
   led the way: Albert Sans + a Georgia serif accent, warm-ink hairlines, and
   ONE sidebar skin. Pages keep their own layout; they must not redeclare the
   sidebar — its per-page copies were deleted when this block landed. */
:root {
  --serif: Georgia, 'Times New Roman', serif;
  --band: #1A1A1A;
  --lime: #1A1A1A;
  --hairline: #E5E7EB;
  --hairline-subtle: #E5E7EB;
}

/* the one sidebar. Neutral (TS-NEUTRAL-BACKOFFICE-20261113): white panel, 1px divider, grey labels, the current page in semibold black with a 2px black indicator on its left edge (no fill). One treatment for the owner app and the admin console (TS-NEUTRAL-INTEGRATION-20261113).
   The wordmark image is cream on the old dark band; invert(1) draws it near-black here so every page that still ships the reversed file reads.
   PR v2 E1 (docs/design/app/colour-rules.md): every colour below reads a --ui-side-* variable whose fallback is the neutral value, so with no
   direction set nothing changes. The variables are declared on the document root in app/neutral-ui.css, which every page loads (the floor
   directly), and custom properties inherit through a shadow host: the sidebar the shell frame draws in a shadow root follows them too. */
.side{background:var(--ui-side-bg,#FFFFFF);color:var(--ui-side-ink-strong,#1A1A1A);border-right:1px solid var(--ui-side-line,#E5E7EB);display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.side .logo{display:flex;align-items:center;gap:10px;padding:24px 22px 24px;flex:none;color:var(--ui-side-ink-strong,#1A1A1A);text-decoration:none}
.side .logo img{filter:var(--ui-side-logo-filter,grayscale(1) invert(1))}
.side .logo svg{fill:var(--ui-side-mark,#1A1A1A)}
.side .logo b{font-weight:600;letter-spacing:.22em;font-size:13px;text-transform:uppercase}
.nav{flex:1;display:flex;flex-direction:column;gap:1px;padding:0 12px 14px;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:var(--ui-side-line,#E5E7EB) transparent}
.nav .nav-grp{flex:none;padding:18px 12px 6px;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--ui-side-label,#6B7280)}
.nav .nav-grp:first-child{padding-top:2px}
.nav a,.side .foot-nav a{display:flex;align-items:center;gap:12px;flex:none;height:34px;padding:0 12px;border-radius:6px;color:var(--ui-side-ink,#6B7280);font-size:13.5px;font-weight:500;letter-spacing:-.005em;text-decoration:none}
.nav a:hover,.side .foot-nav a:hover{background:var(--ui-side-hover,#F7F7F8);color:var(--ui-side-ink-strong,#1A1A1A)}
.nav a.on,.side .foot-nav a.on{background:var(--ui-side-on-bg,transparent);color:var(--ui-side-on-ink,#1A1A1A);font-weight:600;border-radius:var(--ui-side-on-radius,0);box-shadow:inset 2px 0 0 var(--ui-side-on-bar,#1A1A1A)}
.nav a.on .ic,.side .foot-nav a.on .ic{color:var(--ui-side-on-icon,#1A1A1A)}
.nav a .cnt{margin-left:auto;font-size:11px;font-weight:600;color:var(--ui-side-count-ink,#FFFFFF);background:var(--ui-side-count-bg,#1A1A1A);border-radius:6px;padding:1px 7px;min-width:19px;text-align:center}
.side .foot{padding:10px 12px 16px;border-top:1px solid var(--ui-side-line,#E5E7EB);flex:none}
.side .foot-nav{display:flex;flex-direction:column;gap:1px;margin-bottom:10px}
.side .foot .u-card{padding:0 4px 0 6px}
.nav .grp-items{display:flex;flex-direction:column;gap:1px;flex:none}
/* D5: the tabs of the highlighted row (the pages folded into it), under the row's label; a dot marks the page on screen */
.side .nav-tabs{display:flex;flex-direction:column;gap:1px;flex:none;margin:1px 0 4px}
.side .nav-tabs a,.side .foot-nav .nav-tabs a{position:relative;display:flex;align-items:center;flex:none;height:30px;padding:0 12px 0 42px;border-radius:6px;color:var(--ui-side-ink,#6B7280);font-size:13px;font-weight:500;text-decoration:none;background:none;box-shadow:none}
.side .nav-tabs a:hover{background:var(--ui-side-hover,#F7F7F8);color:var(--ui-side-ink-strong,#1A1A1A)}
.side .nav-tabs a.on{color:var(--ui-side-ink-strong,#1A1A1A);font-weight:600;background:none;box-shadow:none}
.side .nav-tabs a.on::before{content:"";position:absolute;left:28px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:var(--ui-side-on-bar,#1A1A1A)}
.side .nav-tabs a:focus-visible{outline:2px solid var(--ui-side-focus,#2563EB);outline-offset:-2px}
.nav .grp-pin{color:var(--ui-side-ink-strong,#1A1A1A)}
.side .foot-nav .cust{display:flex;align-items:center;gap:12px;height:34px;padding:0 12px;border:0;border-radius:6px;background:none;color:var(--ui-side-ink,#6B7280);font:inherit;font-size:13px;font-weight:500;cursor:pointer;text-align:left}
.side .foot-nav .cust:hover{background:var(--ui-side-hover,#F7F7F8);color:var(--ui-side-ink-strong,#1A1A1A)}
.nav.editing a.edit-row{cursor:default;padding-left:4px;gap:8px;background:var(--ui-side-hover,#F7F7F8)}
.nav.editing a.edit-row.on{background:var(--ui-side-strong-bg,#1A1A1A);color:var(--ui-side-strong-ink,#FFFFFF)}   /* E1: the word was #1A1A1A on #1A1A1A in edit mode */
.nav.editing a.edit-row.on .drag,.nav.editing a.edit-row.on .pin,.nav.editing a.edit-row.on .ic{color:var(--ui-side-strong-ink,#FFFFFF)}
.nav.editing a.edit-row.dragging{background:var(--ui-side-raised,#FFFFFF);color:var(--ui-side-ink-strong,#1A1A1A);border:1px solid var(--ui-side-line,#E5E7EB);box-shadow:0 1px 2px rgba(0,0,0,.05)}
.nav.editing .grp-items{gap:3px}
.nav .drag{display:inline-flex;align-items:center;justify-content:center;width:22px;height:28px;border:0;background:none;color:var(--ui-side-ink,#6B7280);cursor:grab;touch-action:none;padding:0;border-radius:6px;flex:none}
.nav .drag:active{cursor:grabbing}
.nav .drag:hover,.nav .drag:focus-visible{color:var(--ui-side-ink-strong,#1A1A1A);background:var(--ui-side-hover,#F7F7F8)}
.nav .pin{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:0;border-radius:6px;background:none;color:var(--ui-side-ink,#6B7280);cursor:pointer;padding:0;flex:none}
.nav .pin:hover{color:var(--ui-side-ink-strong,#1A1A1A);background:var(--ui-side-hover,#F7F7F8)}
.nav .pin.pinned{color:var(--ui-side-ink-strong,#1A1A1A)}
.nav .pin.pinned svg{fill:currentColor}
.nav a.on .pin.pinned{color:var(--ui-side-strong-ink,#FFFFFF)}
.side .edit-hint{margin:0 0 10px;padding:0 4px;font-size:12px;line-height:1.45;color:var(--ui-side-ink,#6B7280)}
.side .edit-bar{display:flex;gap:8px}
.side .edit-bar button{flex:1;height:34px;border-radius:6px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.side .edit-reset{background:var(--ui-side-raised,#FFFFFF);border:1px solid var(--ui-side-line,#E5E7EB);color:var(--ui-side-ink-strong,#1A1A1A)}
.side .edit-reset:hover{background:var(--ui-side-hover,#F7F7F8)}
.side .edit-done{background:var(--ui-side-strong-bg,#1A1A1A);border:0;color:var(--ui-side-strong-ink,#FFFFFF)}
.side .foot-nav .admin-back{display:flex;align-items:center;gap:12px;height:34px;padding:0 12px;margin-bottom:4px;border-radius:6px;border:1px solid var(--ui-side-line,#E5E7EB);color:var(--ui-side-ink-strong,#1A1A1A);font-size:13px;font-weight:600;text-decoration:none}
.side .foot-nav .admin-back:hover{background:var(--ui-side-hover,#F7F7F8);color:var(--ui-side-ink-strong,#1A1A1A)}
@media (min-width:861px){body:has(.side .admin-back) #ts-admin-back{display:none!important}}
.side .u-card{display:flex;align-items:center;gap:11px}
.side .u-av{width:30px;height:30px;border-radius:999px;background:var(--ui-side-hover,#F7F7F8);border:1px solid var(--ui-side-line,#E5E7EB);color:var(--ui-side-ink-strong,#1A1A1A);display:grid;place-items:center;font-size:11.5px;font-weight:700;flex:none}
.side .u-info{flex:1;min-width:0}
.side .u-name{display:block;font-size:12.5px;font-weight:600;color:var(--ui-side-ink-strong,#1A1A1A);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side .u-sub{display:block;font-size:11px;color:var(--ui-side-ink,#6B7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side .u-out{background:none;border:0;cursor:pointer;color:var(--ui-side-ink,#6B7280);display:inline-flex;padding:4px;flex:none}
.side .u-out:hover{color:var(--ui-side-ink-strong,#1A1A1A)}
.side :focus-visible{outline-color:var(--ui-side-focus,#2563EB)}
/* the shell frame's own rule (#ts-shell a:focus-visible, an id rule in app/shell/shell.css) would win inside its shadow root:
   restate the sidebar's ring there, the frame's colour as the fallback (E1 review) */
#ts-shell .side :focus-visible{outline:2px solid var(--ui-side-focus,var(--ink-900,#1A1A1A));outline-offset:2px}   /* the fallback #1A1A1A also restores the ring on the floor, whose document does not define --ink-900 */

/* ── neutral icon chips ─────────────────────────────────────────────────────
   A decorative icon container states nothing, so it carries no colour: light
   grey ground, ink line-work. Colour in this app means STATUS (a live dot, an
   error), and spending it on ornament is what made the settings list read as
   a wall of green. */
.ts-ic-chip{background:var(--ink-50);color:var(--ink-800);display:flex;align-items:center;justify-content:center;flex:none}

/* ── footer editor (app/footer-editor.mjs) ──────────────────────────────────
   One editor, two hosts: the Builder's ~300px inspector and the Settings
   column. Everything is single-column and fluid so neither needs its own
   copy of these rules. */
.fe{display:block}
.fe-sec{padding:16px 0;border-top:1px solid var(--ink-100)}
.fe-sec:first-child{padding-top:0;border-top:none}
.fe-sec-h{font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-400);margin-bottom:4px}
.fe-sec-s{font-size:12px;line-height:1.5;color:var(--ink-400);margin-bottom:12px}
.fe-f{margin-bottom:12px}
.fe-l{display:block;font-size:12.5px;font-weight:600;color:var(--ink-600);margin-bottom:6px}
.fe-inp{width:100%;height:38px;padding:0 11px;border:1px solid var(--ink-200);border-radius:8px;
  font:inherit;font-size:13.5px;color:var(--ink-800);background:#fff;outline:none}
.fe-inp:focus{border-color:var(--ember-500)}
.fe-hint{font-size:12px;color:var(--ink-400);margin-bottom:10px}
.fe-note{font-size:12.5px;line-height:1.5;color:var(--ink-600);background:var(--ink-50);
  border:1px solid var(--ink-100);border-radius:8px;padding:9px 11px;margin-bottom:12px}
.fe-off{opacity:.45;pointer-events:none}
.fe-btn{height:34px;padding:0 13px;border:1px solid var(--ink-200);border-radius:8px;background:#fff;
  font:inherit;font-size:12.5px;font-weight:600;color:var(--ink-700);cursor:pointer}
.fe-btn:hover{border-color:var(--ink-400)}
.fe-x{width:32px;height:32px;flex:none;border:1px solid var(--ink-200);border-radius:8px;background:#fff;
  color:var(--ink-400);cursor:pointer;font-size:16px;line-height:1}
.fe-x:hover{border-color:var(--danger);color:var(--danger)}
/* segmented + toggle */
.fe-seg{display:flex;flex-wrap:wrap;gap:5px}
.fe-seg button{flex:1 1 auto;min-width:64px;height:32px;padding:0 10px;border:1px solid var(--ink-200);
  border-radius:8px;background:#fff;font:inherit;font-size:12px;font-weight:600;color:var(--ink-500);cursor:pointer}
.fe-seg button:hover{border-color:var(--ink-400)}
.fe-seg button.on{background:var(--ember-50);border-color:var(--ember-500);color:var(--ember-600)}
.fe-tog-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0}
.fe-tog{width:42px;height:24px;flex:none;border-radius:999px;border:0;background:var(--ink-200);
  cursor:pointer;position:relative;transition:background .15s}
.fe-tog span{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:999px;background:#fff;transition:transform .15s}
.fe-tog.on{background:var(--ember-500)}
.fe-tog.on span{transform:translateX(18px)}
/* logo */
.fe-logo{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.fe-logo img{height:34px;max-width:130px;object-fit:contain;background:var(--ink-50);
  border:1px solid var(--ink-100);border-radius:7px;padding:4px 8px}
.fe-logo-ph{height:34px;padding:0 12px;display:flex;align-items:center;border:1px dashed var(--ink-200);
  border-radius:7px;background:var(--ink-50);font-size:12px;color:var(--ink-400)}
/* link groups */
/* link groups, the parts list and the hygiene badge sit inside the Settings panel: rows with 1px dividers, not cards in a card */
.fe-grp{border:0;border-top:1px solid var(--line);border-radius:0;padding:12px 0;margin:0;background:none}
.fe-grp:first-of-type{border-top:0;padding-top:0}
.fe-grp-h{display:flex;gap:7px;align-items:center;margin-bottom:9px}
.fe-pg-row{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-bottom:9px}
.fe-pg-l{font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-400);margin-right:2px}
.fe-pg{padding:5px 10px;border:1px solid var(--ink-200);border-radius:999px;background:#fff;cursor:pointer;
  font:inherit;font-size:12px;font-weight:600;color:var(--ink-600)}
.fe-pg:hover{border-color:var(--ink-400);color:var(--ink-900)}
.fe-pg.on{background:#fff;border:2px solid #1A1A1A;padding:4px 9px;color:#1A1A1A}
.fe-g-row{display:flex;gap:7px;align-items:center;margin-top:7px}
.fe-g-row .fe-g-label{flex:0 0 38%}
.fe-g-row .fe-g-url{flex:1;min-width:0}
.fe-g-ladd{margin-top:9px}
/* badges */
/* Trust badges in the footer editor (2026-11-11) */
.fe-sub{font-size:12px;font-weight:700;color:var(--ink-700,#1A1A1A);margin:14px 0 8px}
.fe-sub:first-of-type{margin-top:6px}
.fe-row2{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:8px;margin-bottom:8px}
.fe-row2 .fe-btn{white-space:nowrap}
.fe-ta{height:auto;min-height:64px;padding:8px 10px;font:12px/1.4 ui-monospace,Menlo,monospace;resize:vertical;width:100%}
.fe-ok{color:#6B7280;margin:4px 0 0}
.fe-bad{color:#D92D20;margin:4px 0 0}
.fe-more{margin:8px 0 10px;font-size:12.5px}
.fe-more summary{cursor:pointer;color:var(--ink-600)}
.fe-more .fe-row2{margin-top:8px}
.fe-hyg-res{display:grid;gap:6px;margin:8px 0 10px}
.fe-hyg-pick{display:grid;gap:2px;text-align:left;border:1px solid var(--ink-200);border-radius:8px;background:#fff;padding:9px 11px;cursor:pointer;font:inherit}
.fe-hyg-pick:hover{border-color:var(--ember-300,#E5E7EB)}
.fe-hyg-pick strong{font-size:13px;color:var(--ink-900)}
.fe-hyg-pick span{font-size:12px;color:var(--ink-500,#6B7280)}
.fe-hyg-pick .fe-hyg-v{color:#6B7280;font-weight:600}
/* Ratings and reviews in the footer editor (TS-R2-RATINGS-20261116) */
.fe-rates{margin-bottom:6px}
.fe-rate{display:grid;gap:8px;border-bottom:1px solid var(--line);padding:11px 0}
.fe-rate-t{display:grid;gap:3px;font-size:12.5px;color:var(--ink-600)}
.fe-rate-t strong{color:var(--ink-900);font-size:13px}
.fe-rate-t a{color:var(--ink-600);text-decoration:underline;text-underline-offset:2px;justify-self:start}
.fe-rate-warn{color:#B54708;font-weight:600}
.fe-rate-a{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.fe-rate-lead{display:inline-flex;gap:6px;align-items:center;font-size:12.5px;color:var(--ink-700,#1A1A1A);margin-right:6px;cursor:pointer}
.fe-rate-draft{display:grid;gap:8px;border:1px solid var(--ink-200);border-radius:10px;background:#fff;padding:12px;margin:10px 0;font-size:12.5px;color:var(--ink-600)}
.fe-rate-draft strong{color:var(--ink-900);font-size:13px}
.fe-rate-draft .fe-row2{grid-template-columns:1fr 1fr;margin:0}
.fe-btn.fe-btn-pri{background:var(--ink-900,#111);border-color:var(--ink-900,#111);color:#fff}
.fe-trust-on{display:flex;flex-wrap:wrap;gap:10px;align-items:center;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:10px 0;margin-bottom:8px}
.fe-trust-on .fe-fhrs{height:40px;width:auto;display:block;flex:none}
.fe-trust-t{flex:1;min-width:140px;display:grid;gap:2px;font-size:12.5px;color:var(--ink-600)}
.fe-trust-t strong{color:var(--ink-900);font-size:13px}
.fe-badge{display:flex;gap:10px;align-items:center;padding:10px 0;border-top:1px solid var(--ink-100)}
.fe-badge:first-of-type{border-top:none}
.fe-badge-img{width:52px;height:40px;flex:none;display:flex;align-items:center;justify-content:center;
  background:#fff;border:1px solid var(--ink-100);border-radius:6px}
.fe-badge-img img{max-width:42px;max-height:30px;object-fit:contain;display:block}
.fe-badge-f{flex:1;min-width:0;display:grid;gap:6px}
/* social */
.fe-soc{display:flex;gap:9px;align-items:center;padding:7px 0;border-top:1px solid var(--ink-100)}
.fe-soc:first-of-type{border-top:none}
.fe-soc-ic{color:var(--ink-500);display:flex;flex:none}
.fe-soc-n{flex:0 0 84px;font-size:12.5px;font-weight:600;color:var(--ink-600);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fe-soc .fe-s-id{flex:1;min-width:0}
@media(max-width:420px){.fe-soc-n{display:none}}

/* ── Footer editor: layout thumbnails and the parts list (TS-FOOTER-FREEFORM-20261111) ── */
.fe-lays{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px;margin:10px 0 4px}
.fe-lay{display:flex;flex-direction:column;gap:6px;padding:7px;border:1px solid var(--ink-200,#E5E7EB);border-radius:8px;background:#fff;cursor:pointer;text-align:left;font:inherit;color:var(--ink-700,#1A1A1A);transition:border-color .15s}
.fe-lay:hover{border-color:var(--ink-400,#E5E7EB)}
.fe-lay.on{border:2px solid #1A1A1A;padding:6px;box-shadow:none}
.fe-lay-pic{display:block;aspect-ratio:5/3;border-radius:6px;background:#1A1A1A;color:#FFFFFF;overflow:hidden}
.fe-lay-pic svg{display:block;width:100%;height:100%}
.fe-lay-n{font-size:12px;font-weight:600;line-height:1.25}
.fe-lay-n em{display:block;font-style:normal;font-weight:600;font-size:10.5px;color:var(--brand,#6B7280);margin-top:2px}
.fe-parts{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:0;border-top:1px solid var(--line)}
.fe-part{border:0;border-bottom:1px solid var(--line);border-radius:0;background:#fff}
.fe-part.off .fe-part-n{color:var(--ink-400,#6B7280)}
.fe-part-h{display:flex;align-items:center;gap:6px;padding:8px 0}
.fe-part-mv{display:flex;flex-direction:column}
.fe-part-mv button{width:22px;height:16px;border:0;background:none;color:var(--ink-500,#6B7280);cursor:pointer;font-size:11px;line-height:1;border-radius:4px}
.fe-part-mv button:hover:not(:disabled){background:var(--ink-100,#F7F7F8);color:var(--ink-900,#1A1A1A)}
.fe-part-mv button:disabled{opacity:.25;cursor:default}
.fe-part-n{flex:1;min-width:0;border:0;background:none;text-align:left;font:600 13px/1.3 inherit;color:var(--ink-800,#1A1A1A);cursor:pointer;padding:4px 2px}
.fe-part-n small{display:block;font-weight:400;font-size:11.5px;color:var(--ink-500,#6B7280);margin-top:2px}
.fe-part-b{padding:4px 0 12px 28px;border-top:0}
.fe-venue{display:grid;gap:6px;padding:10px 0;border-bottom:1px solid var(--ink-100,#E5E7EB)}

/* === area: backoffice (TS-NEUTRAL-BACKOFFICE-20261113): shared chrome every themed app page inherits ===
   Toasts: white, 1px border, black text (red text for an error, no fill). Banners: white rows with a divider. Mobile top bar: white with a divider.
   Tooltips: #1A1A1A with white text. Modals: white, 1px border, the one quiet shadow, a neutral scrim. The selectors carry one more element
   than the pages' own rules (body ...) so they win without !important. */
body .toast, body #toast, body #bo-toast, body .ord-toast, body .crm-toast {
  background: #FFFFFF; color: #1A1A1A; border: 1px solid #E5E7EB; border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-weight: 500;
}
body .toast .bar, body .crm-toast .bar { display: none; }
body .toast.err, body .toast.error, body .toast.bad, body .toast.danger, body #toast.err, body #toast.bad, body #toast.error,
body .toast.err *, body .toast.error *, body .toast.bad *, body #toast.err *, body #toast.bad * { color: #D92D20; background: transparent; }
body .banner, body .notebanner, body .crm-banner, body .imp-banner, body .gd-banner, body .mo-banner, body .prt-d-banner {
  background: #FFFFFF; color: #1A1A1A; border: 0; border-bottom: 1px solid #E5E7EB; border-radius: 0; box-shadow: none;
}
body .mtop { background: #FFFFFF; color: #1A1A1A; border-bottom: 1px solid #E5E7EB; }
body .mtop .mtitle { color: #1A1A1A; }
body .mburger span { background: #1A1A1A; }
body [role="tooltip"], body .tooltip, body .tip-pop { background: #1A1A1A; color: #FFFFFF; border-radius: 6px; box-shadow: none; }
body .mscrim, body .ov-scrim { background: rgba(26, 26, 26, 0.4); }
/* Native controls and links that no page styles draw in the user agent's black and blue; they take the palette (zero specificity, so any page rule still wins). */
:where(input, select, textarea, button) { color: #1A1A1A; }
:where(a) { color: #1A1A1A; }
:where(input, textarea)::placeholder { color: #9CA3AF; }
:where(input[type="checkbox"], input[type="radio"], input[type="range"], progress) { accent-color: #1A1A1A; }
/* === end === */

/* === area: colour rules (PR v2 E1; docs/design/app/colour-rules.md has the rules, ratios and history) ===
   New variables (--ui-*) and classes (.ui-*). No attribute: the neutral values below, nothing changes. <html data-ts-brand="vtsk">
   (set before first paint by app/brand.mjs BRAND_EARLY_SCRIPT, the only writer): the owner's choice. The appendix variants live in
   docs/design/app/colour-rules/variants.css (docs only). No pale tint with a same-hue foreground; text 4.5:1, marks 3:1; no pink. */
:root {
  --ui-primary: #1A1A1A;        --ui-on-primary: #FFFFFF;
  --ui-primary-hover: #1A1A1A;  --ui-primary-active: #1A1A1A;
  --ui-focus: #2563EB;
  --ui-ink: #1A1A1A;            /* body text, secondary button text */
  --ui-ink-2: #1A1A1A;          /* text buttons */
  --ui-muted: #6B7280;          /* labels and secondary text */
  --ui-line: #E5E7EB;           /* secondary button border */
  --ui-line-hover: #E5E7EB;
  --ui-hover: #F7F7F8;          --ui-pressed: #E5E7EB;
  --ui-selected: #1A1A1A;       /* the 2px ring of a chosen option */
  --ui-num: #1A1A1A;            /* key figures */
  --ui-num-weight: 600;
  --ui-count: #1A1A1A;          --ui-on-count: #FFFFFF;   /* the count of things waiting */
  --ui-danger: #D92D20;         --ui-danger-hover: #B42318;   --ui-on-danger: #FFFFFF;
  /* surfaces */
  --ui-canvas: #F7F7F8;         --ui-card: #FFFFFF;
  --ui-card-border: #E5E7EB;    --ui-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --ui-radius-card: 8px;
  /* emphasis that is not an action, and deltas */
  --ui-accent: #1A1A1A;         --ui-accent-ink: #1A1A1A;
  --ui-highlight: #1A1A1A;      /* the one emphasised mark in a chart (busiest cell, latest bar, value pill) */
  --ui-up: #1A1A1A;             --ui-down: #1A1A1A;
  /* the feature panel: at most one per page (neutral: a white card) */
  --ui-feature-bg: #FFFFFF;     --ui-feature-ink: #1A1A1A;    --ui-feature-muted: #6B7280;
  --ui-feature-mark: #1A1A1A;   --ui-feature-btn-bg: #1A1A1A; --ui-feature-btn-ink: #FFFFFF;
  --ui-dark: #1A1A1A;           --ui-on-dark: #FFFFFF;        --ui-on-dark-muted: #E5E7EB;
  --ui-badge-bg: #F7F7F8;       --ui-badge-fg: #6B7280;
  --ui-track: #E5E7EB;
  /* status: the four states and danger. Neutral: the plain words of 2026-11-13 */
  --ui-pending: #2F55D4;        --ui-on-pending: #FFFFFF;
  --ui-ok: #1F7A4D;             --ui-on-ok: #FFFFFF;
  --ui-warn: #F5A524;           --ui-on-warn: #1A1A1A;
  --ui-done: #6B7280;           --ui-on-done: #FFFFFF;
  --ui-st-pending-bg: transparent;  --ui-st-pending-ink: #1A1A1A;
  --ui-st-ok-bg: transparent;       --ui-st-ok-ink: #1A1A1A;
  --ui-st-warn-bg: transparent;     --ui-st-warn-ink: #1A1A1A;
  --ui-st-done-bg: transparent;     --ui-st-done-ink: #6B7280;
  --ui-st-pad: 0;
  --ui-dot: 0px;                    /* direction A's confirmed dot; 0 = none */
  --ui-dot-gap: -6px;               /* cancels the 6px gap when there is no dot */
  /* icon tiles (neutral: the grey square of .db-ico; B: a solid fill with a white icon) */
  --ui-tile-olive-bg: #F7F7F8;  --ui-tile-olive-fg: #6B7280;
  --ui-tile-blue-bg: #F7F7F8;   --ui-tile-blue-fg: #6B7280;
  --ui-tile-accent-bg: #F7F7F8; --ui-tile-accent-fg: #6B7280;
  --ui-tile-teal-bg: #F7F7F8;   --ui-tile-teal-fg: #6B7280;
  --ui-tile-violet-bg: #F7F7F8; --ui-tile-violet-fg: #6B7280;
  --ui-tile-red-bg: #F7F7F8;    --ui-tile-red-fg: #6B7280;
  /* data: six categorical series in fixed order, and a sequential ramp r0 (empty) to r5 */
  --ui-d1: #1A1A1A; --ui-d2: #6B7280; --ui-d3: #9CA3AF; --ui-d4: #E5E7EB; --ui-d5: #6B7280; --ui-d6: #9CA3AF;
  --ui-r0: #F7F7F8; --ui-r1: #E5E7EB; --ui-r2: #E5E7EB; --ui-r3: #9CA3AF; --ui-r4: #6B7280; --ui-r5: #1A1A1A;
}

/* Buttons: four levels. One .is-primary per screen; rows of a list never carry one. */
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--ui-ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .14s, border-color .14s, color .14s; }
.ui-btn.is-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.ui-btn:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.ui-btn:disabled, .ui-btn[aria-disabled="true"] { cursor: default; opacity: 1; color: #6B7280; background: #F7F7F8; border-color: #E5E7EB; }
.ui-btn.is-primary { background: var(--ui-primary); border-color: var(--ui-primary); color: var(--ui-on-primary); }
.ui-btn.is-primary:hover { background: var(--ui-primary-hover); border-color: var(--ui-primary-hover); }
.ui-btn.is-primary:active { background: var(--ui-primary-active); border-color: var(--ui-primary-active); }
.ui-btn.is-secondary { background: #FFFFFF; border-color: var(--ui-line); color: var(--ui-ink); }
.ui-btn.is-secondary:hover { background: var(--ui-hover); border-color: var(--ui-line-hover); }
.ui-btn.is-secondary:active { background: var(--ui-pressed); }
.ui-btn.is-text { color: var(--ui-ink-2); padding-left: 10px; padding-right: 10px; }
.ui-btn.is-text:hover { background: var(--ui-hover); color: var(--ui-ink); }
.ui-btn.is-text:active { background: var(--ui-pressed); }
.ui-btn.is-danger { color: var(--ui-danger); padding-left: 10px; padding-right: 10px; }
.ui-btn.is-danger:hover { background: var(--ui-hover); color: var(--ui-danger-hover); }
.ui-btn.is-danger-solid { background: var(--ui-danger); border-color: var(--ui-danger); color: var(--ui-on-danger); }
.ui-btn.is-danger-solid:hover { background: var(--ui-danger-hover); border-color: var(--ui-danger-hover); }

/* A chosen option (segments, pills, picture choices): white, 2px ring in --ui-selected. */
.ui-choice[aria-pressed="true"], .ui-choice[aria-checked="true"], .ui-choice[aria-selected="true"], .ui-choice.on { border-color: var(--ui-selected) !important; box-shadow: inset 0 0 0 1px var(--ui-selected); }

/* Status chips. Every state has its word. Under B: a pale fill with NO border, at chip size only (a card or a
   panel is never tinted). Danger is the solid signal chip (a pale red would read as pink). */
.ui-chip, .ui-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; border-radius: 6px; padding: var(--ui-st-pad); }
.ui-chip.is-pending, .ui-status.is-pending { background: var(--ui-st-pending-bg); color: var(--ui-st-pending-ink); }
.ui-chip.is-ok, .ui-status.is-ok { background: var(--ui-st-ok-bg); color: var(--ui-st-ok-ink); }
.ui-chip.is-ok::before, .ui-status.is-ok::before { content: ''; width: var(--ui-dot); height: var(--ui-dot); margin-right: var(--ui-dot-gap); border-radius: 50%; background: var(--ui-ok); flex: none; }
.ui-chip.is-warn, .ui-status.is-warn { background: var(--ui-st-warn-bg); color: var(--ui-st-warn-ink); }
.ui-chip.is-done, .ui-status.is-done { background: var(--ui-st-done-bg); color: var(--ui-st-done-ink); font-weight: 500; }
.ui-chip.is-danger, .ui-status.is-danger { background: var(--signal-danger); color: var(--signal-danger-ink); padding: 2px 8px; font-weight: 700; }

/* Key figures and their labels. */
.ui-figure { font-size: 32px; line-height: 1.05; letter-spacing: -.03em; font-weight: var(--ui-num-weight); color: var(--ui-num); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.ui-figure.is-xl { font-size: 48px; } .ui-figure.is-sm { font-size: 22px; }
.ui-label { font-size: 12.5px; font-weight: 500; color: var(--ui-muted); letter-spacing: 0; }
.ui-num { color: var(--ui-num); font-variant-numeric: tabular-nums; }
.ui-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px;
  background: var(--ui-count); color: var(--ui-on-count); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
/* A change against the last period: colour AND an arrow, never colour alone. */
.ui-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ui-delta.is-up { color: var(--ui-up); } .ui-delta.is-up::before { content: '\2191'; }
.ui-delta.is-down { color: var(--ui-down); } .ui-delta.is-down::before { content: '\2193'; }

/* Icon tiles: 36px, a SOLID fill with a white line icon, in KPI cards only (elsewhere a plain ink icon, no tile).
   The fill is the panel type's hue (docs/design/app/colour-rules.md, panel accents). */
.ui-tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 10px;
  background: var(--ui-tile-olive-bg); color: var(--ui-tile-olive-fg); }
.ui-tile svg { width: 18px; height: 18px; display: block; }
.ui-tile.is-blue { background: var(--ui-tile-blue-bg); color: var(--ui-tile-blue-fg); }
.ui-tile.is-accent { background: var(--ui-tile-accent-bg); color: var(--ui-tile-accent-fg); }
.ui-tile.is-teal { background: var(--ui-tile-teal-bg); color: var(--ui-tile-teal-fg); }
.ui-tile.is-violet { background: var(--ui-tile-violet-bg); color: var(--ui-tile-violet-fg); }
.ui-tile.is-red { background: var(--ui-tile-red-bg); color: var(--ui-tile-red-fg); }

/* The feature panel: at most ONE per page, the block the page most wants acted on. Solid deep olive, white words,
   a 3px lime rule on top, an inverse (white) button. Under B only; neutral it is a white card. */
.ui-feature { background: var(--ui-feature-bg); color: var(--ui-feature-ink); border-radius: var(--ui-radius-card); box-shadow: var(--ui-card-shadow); }
.ui-feature .ui-label { color: var(--ui-feature-muted); }
.ui-feature .ui-btn { background: var(--ui-feature-btn-bg); color: var(--ui-feature-btn-ink); border-color: var(--ui-feature-btn-bg); }

/* Surfaces: a grey canvas, white cards with the soft shadow (B) or the hairline (neutral), one radius. */
.ui-canvas { background: var(--ui-canvas); }
.ui-card { background: var(--ui-card); border: 1px solid var(--ui-card-border); border-radius: var(--ui-radius-card); box-shadow: var(--ui-card-shadow); }

/* the heat-map ramp (app/charts/charts.mjs reads --tsc-r0..r5 at draw time) */
:root[data-ts-brand] {
  --tsc-r0: var(--ui-r0); --tsc-r1: var(--ui-r1); --tsc-r2: var(--ui-r2); --tsc-r3: var(--ui-r3); --tsc-r4: var(--ui-r4); --tsc-r5: var(--ui-r5);
}
/* vtsk (owner, 2026-11-19): AVOCADO = action and volume, KLEIN BLUE = insight and trend; each is the other's highlight. */
:root[data-ts-brand="vtsk"] {
  /* from rounds 3-5, flattened (E1 integration) */
  --ui-ink-2: #374151;  --ui-muted: #5B6474;  --ui-line: #D7DCE4;
  --ui-line-hover: #9CA3AF;  --ui-num: #172033;  --ui-num-weight: 650;
  --ui-canvas: #F6F8FB;  --ui-card: #FFFFFF;  --ui-card-border: transparent;
  --ui-card-shadow: 0 1px 2px rgba(23, 32, 51, 0.05), 0 1px 1px rgba(23, 32, 51, 0.03);  --ui-radius-card: 14px;  --ui-dark: #1E2711;
  --ui-on-dark: #FFFFFF;  --ui-on-dark-muted: #C9D2BE;  --ui-track: repeating-linear-gradient(135deg, #D0D5DD 0 1.5px, #F3F4F6 1.5px 5px);
  --ui-up: #15803D;  --ui-down: #B42318;  --ui-st-pending-bg: #2F55D4;
  --ui-st-pending-ink: #FFFFFF;  --ui-st-ok-bg: transparent;  --ui-st-ok-ink: #1A1A1A;
  --ui-st-warn-bg: #F5A524;  --ui-st-warn-ink: #1A1A1A;  --ui-st-done-bg: #EEF0F2;
  --ui-st-done-ink: #374151;  --ui-st-pad: 2px 8px;  --ui-dot: 8px;
  --ui-dot-gap: 0px;  --ui-d1: #5A9E1F;  --ui-d2: #1A44D6;
  --ui-d3: #059669;  --ui-d4: #8B5CF6;  --ui-d5: #0891B2;
  --ui-d6: #6B7280;  --ui-r0: #F1F4F8;  --ui-r1: #94C455;
  --ui-r2: #76B03A;  --ui-r3: #5A9E1F;  --ui-r4: #437C14;
  --ui-r5: #2E5A0C;  --ui-ink: #172033;  --ui-pill-line: #D7DCE4;
  /* vtsk's own */
  --ui-primary: #7CC242;        --ui-on-primary: #172033;     /* 7.48:1 */
  --ui-primary-hover: #6AAF2E;  --ui-primary-active: #5A9E1F; /* ink 6.03, 4.92 */
  --ui-selected: #5A9E1F;       /* ring on white 3.31:1 */
  --ui-count: #7CC242;          --ui-on-count: #172033;
  --ui-klein: #002FA7;          --ui-on-klein: #FFFFFF;       /* 10.69:1 */
  --ui-accent: #002FA7;         --ui-accent-ink: #002FA7;     --ui-highlight: #002FA7;
  --ui-pill: #002FA7;
  --ui-bar: #5A9E1F;            --ui-meter: #5A9E1F;          /* avocado volume, 3.31:1 on white */
  --ui-trend: #002FA7;          /* trend lines */
  --ui-line-highlight: #5A9E1F; --ui-line-pill: #3F7E12;      /* the avocado point and its value pill on a Klein line: white 4.99:1 */
  --ui-seg-on: #7CC242;         --ui-on-seg: #172033;         /* top-level tabs */
  --ui-seg-in-card: #002FA7;    --ui-on-seg-in-card: #FFFFFF; /* chart switches inside a card */
  --ui-tip-bg: #172033;         --ui-on-tip: #FFFFFF;         --ui-on-tip-muted: #C9D1DE;
  --ui-badge-bg: #7CC242;       --ui-badge-fg: #172033;       /* the lead card and today's counts: 7.48:1 */
  --ui-badge-period-bg: #002FA7; --ui-badge-period-fg: #FFFFFF; /* period figures on Analytics: 10.69:1 */
  --ui-tile-olive-bg: #7CC242;  --ui-tile-olive-fg: #172033;  --ui-tile-blue-bg: #002FA7;  --ui-tile-blue-fg: #FFFFFF;
  --ui-tile-accent-bg: #7CC242; --ui-tile-accent-fg: #172033; --ui-tile-teal-bg: #7CC242;  --ui-tile-teal-fg: #172033;
  --ui-tile-violet-bg: #002FA7; --ui-tile-violet-fg: #FFFFFF; --ui-tile-red-bg: #7CC242;   --ui-tile-red-fg: #172033;
  --ui-feature-bg: #002FA7;     --ui-feature-ink: #FFFFFF;    --ui-feature-muted: #D6E0FF;   /* 10.69, 8.13 */
  --ui-feature-mark: #FFFFFF;   --ui-feature-btn-bg: #FFFFFF; --ui-feature-btn-ink: #002FA7;
}
/* Sweep readiness (E1 integration): pages not yet swept to .ui-* read as vtsk, not half-done. Under vtsk only; the kitchen
   (the only page with #app>header.top) keeps its dark functional colours; the floor and till do not load this sheet.
   The legacy main actions (rules doc 7, mapping table) take the avocado primary with ink words; row-sized ones the outline
   secondary; checkboxes and radios the avocado mark; the page ground the cool white canvas. */
:root[data-ts-brand="vtsk"] { --nu-page: var(--ui-canvas); }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) { background-color: var(--ui-canvas); }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(.btn-pri,.btn-primary,.btn.primary,.db-btn.is-dark,.fe-btn.fe-btn-pri,.crm-btn.pri,.crm-btn.accent,.bt.pri,.btn.accent,.btn.dark,.wz-primary,.fsp button.go,.fsp .empty a.btn):not(:disabled,[aria-disabled="true"],.btn-sm,.btn-xs,[role="switch"],.db-card.is-accent *) {
  background: var(--ui-primary); border-color: var(--ui-primary); color: var(--ui-on-primary); box-shadow: none; }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(.btn-pri,.btn-primary,.btn.primary,.db-btn.is-dark,.fe-btn.fe-btn-pri,.crm-btn.pri,.crm-btn.accent,.bt.pri,.btn.accent,.btn.dark,.wz-primary,.fsp button.go,.fsp .empty a.btn):not(:disabled,[aria-disabled="true"],.btn-sm,.btn-xs,[role="switch"],.db-card.is-accent *):hover {
  background: var(--ui-primary-hover); border-color: var(--ui-primary-hover); color: var(--ui-on-primary); }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(.btn-pri,.btn-primary):is(.btn-sm,.btn-xs):not(:disabled,[aria-disabled="true"]) {
  background: #FFFFFF; border-color: transparent; box-shadow: inset 0 0 0 1px var(--ui-line); color: var(--ui-ink); }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(.btn-pri,.btn-primary):is(.btn-sm,.btn-xs):not(:disabled,[aria-disabled="true"]):hover { background: var(--ui-hover); }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :where(input[type="checkbox"], input[type="radio"], input[type="range"], progress) { accent-color: var(--ui-primary-active); }
/* selected top-level tabs take the avocado switch; step and count marks the badge */
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) .tab.on { background: var(--ui-seg-on); border-color: var(--ui-seg-on); color: var(--ui-on-seg); }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(.step h2 .n, .is-open>.wz-head .wz-mark, .iv-tabs button.on .n) { background: var(--ui-badge-bg); color: var(--ui-badge-fg); }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(.mo-on input:checked, .fe-tog.on) { background: var(--ui-primary-active); }
/* E2 colour sweep, batch 1 (TS-PRV2-E2-COLOUR-SWEEP-1-20261120), still under vtsk only:
   - a disabled legacy main action is the rules' disabled state (#F7F7F8, #E5E7EB line, #6B7280 words, full opacity),
     never a faded black or grey fill;
   - an on/off switch drawn as a button (role="switch", aria-checked) is a state, not an action: on is the avocado mark
     with ink words, so it is not read as a second primary;
   - the checks tablet's main action (app/safety/pad.mjs .go, its "Choose a plan" link) is a legacy main action, mapped
     above; the tablet's second save (.acc) is the secondary;
   - the count inside a selected filter pill reads in the pill's ink (it was grey on avocado). */
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(.btn-pri,.btn-primary,.btn.primary,.db-btn.is-dark,.fe-btn.fe-btn-pri,.crm-btn.pri,.crm-btn.accent,.bt.pri,.btn.accent,.btn.dark,.wz-primary,.fsp button.go):is(:disabled,[aria-disabled="true"]):not(.db-card.is-accent *) {
  background: #F7F7F8; border-color: #E5E7EB; color: #6B7280; box-shadow: none; opacity: 1; }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) .db-btn.is-dark[role="switch"][aria-checked="true"]:not(:disabled) {
  background: var(--ui-primary-active); color: var(--ui-on-primary); box-shadow: none; }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) .fsp button.acc:not(:disabled) {
  background: #FFFFFF; border-color: var(--ui-line); color: var(--ui-ink); box-shadow: none; }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) .tab.on .n:not(.n-wait) { color: inherit; }
/* Page rules of the E2 sweep for pages whose <head> must stay byte-for-byte production's (the shell-frame pages, compared
   with the base commit by test/shell-frame-pages-browser.test.mjs), so they live here. Settings: */
/* PR v2 E2 colour sweep (docs/design/app/colour-rules.md rule 1 and its definition of a screen), under the brand switch
   only: each Settings section is its own screen, and its first main action (Save changes, Save profile, Connect, Add,
   Choose …) is that screen's one primary. Every later one in the same section takes the outline secondary. CSS only,
   so the sections a module draws later (texts, card terminals) follow too. With no attribute nothing here applies. */
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :has(:is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan])) ~ :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]),
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :has(:is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan])) ~ * :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]),
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]) ~ :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]),
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]) ~ * :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]) {
  background: #FFFFFF; border-color: var(--ui-line); color: var(--ui-ink); box-shadow: none; }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :has(:is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan])) ~ :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]):hover,
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :has(:is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan])) ~ * :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]):hover,
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]) ~ :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]):hover,
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]) ~ * :is(.btn-primary,.btn-pri):not(:disabled,.btn-sm,[data-checkout],[data-change-plan]):hover {
  background: var(--ui-hover); border-color: var(--ui-line-hover); }
/* Settings > Plan & billing (E2 integration ruling, TS-PRV2-INTEG-E2-20261120): the grid has no recommended or target
   plan (it marks only the current one), so no plan choice is the section's primary: every Choose / Upgrade to /
   Downgrade to / Switch to takes the outline secondary and is left out of the section's first-main-action rule above. */
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :is(.btn-primary,.btn-pri):is([data-checkout],[data-change-plan]):not(:disabled) {
  background: #FFFFFF; border-color: var(--ui-line); color: var(--ui-ink); box-shadow: none; }
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #ts-content :is(.btn-primary,.btn-pri):is([data-checkout],[data-change-plan]):not(:disabled):hover {
  background: var(--ui-hover); border-color: var(--ui-line-hover); }
/* Prep list: */
/* PR v2 E2 colour sweep (colour-rules.md rules 1 and 3), brand switch only: Start this list is the one primary; adding a line is the outline */
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) #pp .add .btn.dark:not(:disabled){background:#FFFFFF;border-color:var(--ui-line);box-shadow:none;color:var(--ui-ink)}
/* Reorder and Tips records (E5, TS-PRV2-E5-COLOUR-SWEEP-2-20261121): the E2 sweep's two rules, which 9337dd006 took out of the
   page modules (their CSS must stay production's) to move here but never added, so both pages showed two primaries again.
   Send to the supplier / Publish as a new version stay the one primary; the drafts Save / Log the request take the outline. */
:root[data-ts-brand="vtsk"] body:not(:has(>#app>header.top)) :is(#sSave,#lgSave):not(:disabled){background:#FFFFFF;border-color:transparent;box-shadow:inset 0 0 0 1px var(--ui-line);color:var(--ui-ink)}
/* === end colour rules === */
/* "How a day is counted here" (I-22, app/day-basis.mjs), on Analytics, End of day and Accounts: a disclosure in plain words,
   no fill. The label is ink, the sentences muted (var(--ui-muted): #6B7280 neutral, #5B6474 vtsk, 4.5:1 on either canvas
   and on white); the focus ring is the focus colour. Both looks through the variables, so nothing here is brand-gated. */
.ts-daynote{font-size:12.5px;line-height:1.5;color:var(--ui-muted);margin:12px 0;max-width:760px}
.ts-daynote>summary{display:inline-flex;align-items:center;gap:6px;min-height:24px;cursor:pointer;list-style:none;font-weight:600;color:var(--ui-ink);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px;text-decoration-thickness:1px;border-radius:4px}
.ts-daynote>summary::-webkit-details-marker{display:none}
.ts-daynote>summary svg{flex:none}
.ts-daynote>summary:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
.ts-daynote p{margin:6px 0 0}
@media print{.ts-daynote{display:none}}
/* The one-time notice on Analytics after the business-day change (1074, app/day-basis.mjs dayChangeNode): a white card
   (rule 10), the title in ink, the sentence muted, one solid dot in the accent (ink in the neutral look, Klein in vtsk:
   insight, rule 6), the button the page's outline button. No tint; both looks through the variables. */
.ts-daychange{display:flex;align-items:flex-start;gap:12px;max-width:760px;margin:12px 0;padding:14px 16px;background:var(--ui-card);border-radius:var(--ui-radius-card);box-shadow:var(--ui-card-shadow),inset 0 0 0 1px var(--ui-line);color:var(--ui-ink);font-size:13px;line-height:1.5}
.ts-daychange-dot{flex:none;width:8px;height:8px;margin-top:6px;border-radius:50%;background:var(--ui-accent)}
.ts-daychange b{font-weight:600}
.ts-daychange p{margin:2px 0 0;color:var(--ui-muted)}
.ts-daychange>button{flex:none;margin-left:auto}
@media(max-width:700px){.ts-daychange{flex-wrap:wrap}.ts-daychange>div{flex:1 1 calc(100% - 20px)}.ts-daychange>button{margin-left:20px}}
@media print{.ts-daychange{display:none}}
