/* =============================================================================
   PASSMYLISTING — BRAND LAYER  (broker-brand.css)
   -----------------------------------------------------------------------------
   Identity: "Sightline". A stand's rake, cut by the sightline from one lit
   seat. Every seat accounted for.

   Load order (base.html):  broker-kit.css → main.css → broker-brand.css
   The shared kit (broker-kit.css, upstream PassMyTicket) stays untouched.
   This file only re-points kit tokens at the PassMyListing palette and adds the
   brand components (bos-*). Never put raw colours in page CSS — use tokens.

   Sections
     0. Fonts (self-hosted, OFL)      4. Shell: sidebar + top bar brand
     1. Brand primitives (--bos-*)    5. Auth (sign-in, sign-up, reset)
     2. Kit tokens → light            6. Brand components (bos-*)
     3. Kit tokens → dark             7. Component refinements
   ========================================================================== */


/* ============================================================== 0. FONTS */
@font-face {
  font-family: 'Archivo';
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url('../fonts/archivo-latin.woff2') format('woff2-variations'), url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2-variations'), url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Martian Mono, pinned at its condensed width (75) so seat numbers and
   order ids keep the density of a ledger. Weight stays variable. */
@font-face {
  font-family: 'Martian Mono';
  font-style: normal; font-display: swap;
  font-weight: 100 800;
  src: url('../fonts/martian-mono-latin.woff2') format('woff2');
}


/* ============================================================== 1. BRAND PRIMITIVES */
:root {
  /* Ink & Plaster — the two materials of the house */
  --bos-ink:        #141110;   /* Stand Ink: the mark, headings, primary buttons */
  --bos-ink-2:      #1F1B19;   /* body text */
  --bos-plaster:    #F2F1EF;   /* the frame behind everything */
  --bos-paper:      #FBFAF9;   /* the working sheet */
  --bos-white:      #FFFFFF;

  /* House Claret — the lit seat. Brand moments, active state, focus. */
  --bos-claret-50:  #FBF0F3;
  --bos-claret-100: #F5DDE4;
  --bos-claret-200: #EAB8C6;
  --bos-claret-400: #E35A7F;   /* the seat on dark grounds */
  --bos-claret-500: #B92A55;
  --bos-claret:     #9E1F45;   /* the seat on light grounds — the brand colour */
  --bos-claret-700: #7A1836;
  --bos-claret-900: #3D0B1B;

  /* Concrete — warm-neutral greys, biased a hair toward claret */
  --bos-concrete-50:  #F7F6F4;
  --bos-concrete-100: #EFEDEA;
  --bos-concrete-200: #E5E2DE;
  --bos-concrete-300: #D2CDC8;
  --bos-concrete-400: #A39C96;
  --bos-concrete-500: #706963;
  --bos-concrete-700: #4A4440;
  --bos-concrete-900: #2B2826;

  /* Secondary — used in marketing & charts, never as a second UI accent */
  --bos-floodlight: #F4E9C9;   /* warm wash for highlights in print/marketing */
  --bos-pitch:      #1E3A2F;   /* deep turf, secondary chart series */

  --bos-font-display: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bos-font-ui:      'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Figures and ids use the UI face with tabular digits (Martian Mono retired 2026-10-20). */
  --bos-font-mono:    'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bos-stretch-display: 112%;   /* semi-expanded: stand signage */
  --bos-stretch-hero:    125%;   /* expanded: wordmark & marketing heads only */

  /* The sightline: every diagonal in the system runs at 45° */
  --bos-sightline: 45deg;
}


/* The mark reads its colours from tokens so it flips with the theme */
:root { --bos-seat: var(--bos-claret); }
:root.dark { --bos-seat: var(--bos-claret-400); }
.bos-symbol__stand { fill: var(--tx-ink); }
.bos-symbol__seat  { fill: var(--bos-seat); }
.bos-wordmark path { fill: var(--tx-ink); }
.bos-auth .auth__aside .bos-symbol__stand { fill: #F2F1EF; }


/* ============================================================== 2. KIT TOKENS → LIGHT */
:root {
  --c-canvas: var(--bos-paper);
  --c-wash:   #F8F2F3;
  --c-ink:    var(--bos-ink);
  --c-graphite: var(--bos-ink-2);
  --c-slate:  var(--bos-concrete-700);
  --c-ash:    var(--bos-concrete-500);
  --c-stone:  var(--bos-concrete-200);
  --c-fog:    var(--bos-concrete-100);
  --c-royal:  var(--bos-claret);
  --c-cobalt: #4C86CC;
  --c-mint:   #2BA866;
  --c-coral:  #EB5A3C;
  --c-amber:  #E9A23B;
  --c-azure:  var(--bos-claret-500);

  --bg-app:      var(--bos-plaster);
  --bg-canvas:   var(--bos-paper);
  --bg-surface:  var(--bos-white);
  --bg-subtle:   var(--bos-concrete-50);
  --bg-muted:    var(--bos-concrete-100);
  --bg-wash:     #F8F2F3;
  --bg-hover:    rgba(20, 17, 16, 0.045);
  --bg-press:    rgba(20, 17, 16, 0.075);
  --bg-selected: rgba(158, 31, 69, 0.07);
  --bg-inverse:  var(--bos-ink);

  --tx-ink:  var(--bos-ink);
  --tx:      var(--bos-ink-2);
  --tx-2:    var(--bos-concrete-700);
  --tx-3:    var(--bos-concrete-500);
  --tx-4:    var(--bos-concrete-400);
  --tx-inverse: #FFFFFF;
  --tx-link: var(--bos-claret);

  --ln:        var(--bos-concrete-200);
  --ln-soft:   #EEEBE8;
  --ln-strong: var(--bos-concrete-300);
  --ln-focus:  var(--bos-claret-500);

  --ac:       var(--bos-claret);
  --ac-hover: #8A1A3C;
  --ac-press: #74152F;
  --ac-tx:    var(--bos-claret);
  --ac-soft:   rgba(158, 31, 69, 0.08);
  --ac-soft-2: rgba(158, 31, 69, 0.14);
  --ac-line:   rgba(158, 31, 69, 0.32);
  --ring:       0 0 0 3px rgba(185, 42, 85, 0.22);
  --ring-tight: 0 0 0 2px var(--bg-surface), 0 0 0 4px rgba(158, 31, 69, 0.62);

  /* Semantic — status only; none of these is the brand colour */
  --ok-tx:   #18794A; --ok:   #1F9157; --ok-dot:   var(--c-mint);  --ok-soft:   rgba(43, 168, 102, 0.11); --ok-line:   rgba(31, 145, 87, 0.30);
  --warn-tx: #9A6200; --warn: #D98E1F; --warn-dot: var(--c-amber); --warn-soft: rgba(233, 162, 59, 0.15); --warn-line: rgba(217, 142, 31, 0.36);
  --bad-tx:  #C2341F; --bad:  #D9452A; --bad-dot:  var(--c-coral); --bad-soft:  rgba(235, 90, 60, 0.11);  --bad-line:  rgba(217, 69, 42, 0.30);
  --info-tx: #2D65A8; --info: #3C78BF; --info-dot: var(--c-cobalt); --info-soft: rgba(76, 134, 204, 0.11); --info-line: rgba(60, 120, 191, 0.30);
  --neu-tx:  var(--bos-concrete-700); --neu-dot: var(--bos-concrete-400); --neu-soft: var(--bos-concrete-100); --neu-line: var(--bos-concrete-200);

  --font:      var(--bos-font-ui);
  --font-mono: var(--bos-font-mono);
  --tr-display: -0.028em; --tr-title: -0.018em; --tr-head: -0.008em; --tr-caps: 0.08em;

  /* Radii: tighter than the kit — precision over softness */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 14px; --r-2xl: 18px;

  --sh-hair:  0 0 0 1px rgba(20, 17, 16, 0.04);
  --sh-xs:    0 1px 2px rgba(20, 17, 16, 0.05);
  --sh-sm:    0 0 0 1px rgba(20, 17, 16, 0.04), 0 1px 3px -1px rgba(20, 17, 16, 0.08);
  --sh-md:    0 0 0 1px rgba(20, 17, 16, 0.04), 0 2px 6px -2px rgba(20, 17, 16, 0.08), 0 10px 28px -10px rgba(20, 17, 16, 0.10);
  --sh-pop:   0 0 0 1px rgba(20, 17, 16, 0.07), 0 14px 34px -10px rgba(20, 17, 16, 0.20), 0 2px 6px -2px rgba(20, 17, 16, 0.07);
  --sh-modal: 0 0 0 1px rgba(20, 17, 16, 0.07), 0 32px 72px -18px rgba(20, 17, 16, 0.32), 0 6px 16px -6px rgba(20, 17, 16, 0.10);
  --sh-glow:  0 0 0 1px rgba(20, 17, 16, 0.035);
  --sh-glow-2: 0 0 0 1px rgba(20, 17, 16, 0.05);
  --sh-btn:   0 1px 0 rgba(20, 17, 16, 0.04), inset 0 -1px 0 rgba(20, 17, 16, 0.05);
  --sh-btn-ac: 0 1px 2px rgba(122, 24, 54, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --scrim: rgba(20, 17, 16, 0.42);

  /* main.css legacy aliases that carried their own colours */
  --signal: var(--bos-claret);
  --signal-ink: #FFFFFF;
}


/* ============================================================== 3. KIT TOKENS → DARK */
/* :root.dark (0,2,0) so it wins over the kit's html.dark and main.css's
   :root[data-theme="dark"] blocks, which load earlier. */
:root.dark {
  color-scheme: dark;
  --c-canvas: #131211; --c-wash: #241318; --c-ink: #F4F2F0; --c-graphite: #E6E2DF;
  --c-slate: #BDB6B0; --c-ash: #8F8781; --c-stone: #2B2826; --c-fog: #22201E;
  --c-royal: var(--bos-claret-400); --c-azure: var(--bos-claret-400);
  --c-cobalt: #6E9FDB; --c-mint: #44C27F; --c-coral: #F2704F; --c-amber: #EFB24F;

  --bg-app:      #0D0C0B;
  --bg-canvas:   #131211;
  --bg-surface:  #1A1817;
  --bg-subtle:   #161514;
  --bg-muted:    #22201E;
  --bg-wash:     #241318;
  --bg-hover:    rgba(242, 241, 239, 0.05);
  --bg-press:    rgba(242, 241, 239, 0.085);
  --bg-selected: rgba(227, 90, 127, 0.13);
  --bg-inverse:  #F2F1EF;

  --tx-ink:  #F4F2F0;
  --tx:      #E6E2DF;
  --tx-2:    #BDB6B0;
  --tx-3:    #8F8781;
  --tx-4:    #625B56;
  --tx-inverse: #131211;
  --tx-link: #F07898;

  --ln:        #2B2826;
  --ln-soft:   #221F1E;
  --ln-strong: #3A3633;
  --ln-focus:  var(--bos-claret-400);

  --ac:       #C23A62;
  --ac-hover: #CF4A71;
  --ac-press: #A93257;
  --ac-tx:    #F07898;
  --ac-soft:   rgba(227, 90, 127, 0.13);
  --ac-soft-2: rgba(227, 90, 127, 0.22);
  --ac-line:   rgba(227, 90, 127, 0.42);
  --ring:       0 0 0 3px rgba(227, 90, 127, 0.30);
  --ring-tight: 0 0 0 2px var(--bg-surface), 0 0 0 4px rgba(227, 90, 127, 0.70);

  --ok-tx: #5ED198;   --ok: #3FB77A;   --ok-soft: rgba(68, 194, 127, 0.13);  --ok-line: rgba(68, 194, 127, 0.32);
  --warn-tx: #F2BC63; --warn: #E9A23B; --warn-soft: rgba(239, 178, 79, 0.13); --warn-line: rgba(239, 178, 79, 0.34);
  --bad-tx: #FF8A6E;  --bad: #F2704F;  --bad-soft: rgba(242, 112, 79, 0.14);  --bad-line: rgba(242, 112, 79, 0.36);
  --info-tx: #8DB7EE; --info: #6E9FDB; --info-soft: rgba(110, 159, 219, 0.14); --info-line: rgba(110, 159, 219, 0.36);
  --neu-tx: #BDB6B0;  --neu-soft: #22201E; --neu-line: #34302D; --neu-dot: #6F6863;

  --sh-hair:  0 0 0 1px rgba(255, 255, 255, 0.025);
  --sh-xs:    0 1px 2px rgba(0, 0, 0, 0.45);
  --sh-sm:    0 0 0 1px rgba(255, 255, 255, 0.03), 0 1px 3px rgba(0, 0, 0, 0.5);
  --sh-md:    0 0 0 1px rgba(255, 255, 255, 0.035), 0 10px 28px -8px rgba(0, 0, 0, 0.6);
  --sh-pop:   0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 40px -8px rgba(0, 0, 0, 0.72);
  --sh-modal: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 32px 80px -16px rgba(0, 0, 0, 0.82);
  --sh-glow:  0 0 0 1px rgba(255, 255, 255, 0.03);
  --sh-glow-2: 0 0 0 1px rgba(255, 255, 255, 0.03);
  --sh-btn:   0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --sh-btn-ac: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --scrim: rgba(0, 0, 0, 0.6);
  --signal: var(--bos-claret-400);
}


/* ============================================================== 3b. BASE */
body {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;     /* every digit lines up, sheet-wide */
  font-feature-settings: normal;          /* the kit's cv/ss sets were Inter's */
  font-optical-sizing: auto;
}
::selection { background: rgba(158, 31, 69, 0.16); }
:root.dark ::selection { background: rgba(227, 90, 127, 0.28); }

/* Display voice: titles go semi-expanded — the stand's signage */
h1, .pm-page-title, .pm-t-title, .page-head__title, .os-title, .ov-hello, .ev-hero__title, .auth__title,
.empty__title, .pm-empty-title, .error__title, .pm-modal-title {
  font-stretch: var(--bos-stretch-display);
  font-weight: 600;
  letter-spacing: var(--tr-title);
}

/* Numbers are money: tabular, never proportional */
.pm-num, td.pm-num, .pm-metric-value, .wchart__value, [data-num], .num, .money { font-variant-numeric: tabular-nums; }

/* Coordinate labels — small caps in mono, the voice of a seat map
   ("SEC 112 · ROW H"). Used for section labels and caps meta. */
.pm-t-caps, .sb-label, .bos-coord {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: var(--tr-caps); text-transform: uppercase;
  color: var(--tx-3);
}
.sb-label { padding: 0 10px 7px; }

/* IDs, seats and order numbers in mono read a touch smaller than the UI face */
code, kbd, .pm-mono, .pm-kbd, .kbd { font-family: var(--font-mono); }


/* ============================================================== 4. SHELL */
.sb-head { margin-bottom: 16px; }
.sb-brand { gap: 9px; padding: 3px 2px; }
.sb-mark, .sb-mark--bos { width: 22px; height: 22px; filter: none; }
.sb-brand:hover .sb-mark { transform: none; }
.sb-word { display: inline-flex; align-items: center; height: 22px; }
.sb-word .bos-wordmark { height: 14.5px; width: auto; display: block; }
.sb-word .bos-wordmark path { fill: var(--tx-ink); }

/* Active nav: a lit seat, not a pill of colour */
.sb-link[aria-current="page"] { box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); }
.sb-link[aria-current="page"] > i { color: var(--tx-ink); }
.sb-link[aria-current="page"]::before {
  left: auto; right: 10px; top: 50%; bottom: auto;
  width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--ac);
}
.sb-link[aria-current="page"] .sb-badge { margin-right: 12px; }
html.sb-collapsed .sb-link[aria-current="page"]::before { right: 5px; top: 7px; margin-top: 0; }

.topbar .sb-word .bos-wordmark { height: 13px; }


/* ============================================================== 5. AUTH */
/* Two halves: the form on paper, the house on ink. */
.auth-shell .app-main, .auth-shell .app-sheet { background: var(--bg-canvas); }
.auth-shell .auth.bos-auth {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: 100vh; max-width: none; padding: 0; gap: 0;
}
.auth-shell .bos-auth .auth__panel {
  align-self: center; justify-self: center;
  width: 100%; max-width: 400px; margin: 0; padding: 48px 24px;
  background: transparent; box-shadow: none; border: 0;
}
.auth-shell .bos-auth .auth__brand { justify-content: flex-start; margin-bottom: 44px; gap: 10px; }
.auth-shell .bos-auth .auth__mark, .auth-shell .bos-auth .auth__mark svg { width: 26px; height: 26px; }
.auth-shell .bos-auth .auth__wordmark { display: inline-flex; }
.auth-shell .bos-auth .auth__wordmark .bos-wordmark { height: 17px; width: auto; }
.auth-shell .bos-auth .auth__wordmark .bos-wordmark path { fill: var(--tx-ink); }
.auth-shell .bos-auth .auth__title { font-size: 30px; line-height: 1.1; letter-spacing: var(--tr-display); }
.auth-shell .bos-auth .auth__title em { color: var(--ac-tx); font-style: normal; font-weight: 600; }
.auth-shell .bos-auth .auth__subtitle { color: var(--tx-3); margin-top: 10px; }

.auth-shell .bos-auth .auth__aside {
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; isolation: isolate;
  margin: 8px; padding: 40px 44px; border-radius: var(--r-2xl);
  background: #141110; color: #F2F1EF;
}
.bos-auth .auth__aside-top { display: flex; justify-content: space-between; gap: 16px; }
.bos-auth .auth__aside .bos-coord { color: rgba(242, 241, 239, 0.55); }
.bos-auth .auth__aside .bos-coord b { color: #F2F1EF; font-weight: 500; }
.bos-auth .auth__aside-title {
  font-family: var(--bos-font-display); font-stretch: var(--bos-stretch-hero);
  font-weight: 600; font-size: clamp(28px, 3vw, 40px); line-height: 1.04; letter-spacing: -0.03em;
  color: #F2F1EF; max-width: 13ch; margin: 0;
}
.bos-auth .auth__aside-title i { font-style: normal; color: var(--bos-claret-400); }
.bos-auth .auth__aside-sub { margin-top: 14px; color: rgba(242, 241, 239, 0.62); max-width: 42ch; font-size: 14px; }
.bos-auth .bos-house { position: absolute; inset: auto 0 0 0; height: 62%; z-index: -1; }
.bos-auth .bos-house svg { width: 100%; height: 100%; display: block; }
.bos-auth .auth__stages { margin-top: 22px; }
.bos-auth .auth__stage { background: rgba(242, 241, 239, 0.06); border-color: rgba(242, 241, 239, 0.12); color: rgba(242, 241, 239, 0.85); }

.auth-shell .auth.bos-auth { align-items: stretch; }
.auth-shell .bos-auth .auth__aside { min-height: calc(100vh - 16px); justify-content: space-between; }
.bos-auth .bos-house { inset: 14% 0 auto 0; height: 56%; }
.bos-auth .auth__aside-body { position: relative; }
.bos-auth .auth__aside-body::before {   /* keeps the copy clear of the seats behind it */
  content: ''; position: absolute; inset: -48px -44px -40px; z-index: -1;
  background: linear-gradient(0deg, #141110 62%, rgba(20, 17, 16, 0));
}
.auth-shell .bos-auth .auth__heading, .auth-shell .bos-auth .auth__footnote { text-align: left; }

@media (max-width: 899.98px) {
  .auth-shell .auth.bos-auth { grid-template-columns: 1fr; }
  .auth-shell .bos-auth .auth__aside { display: none; }
  .auth-shell .bos-auth .auth__panel { padding: 40px 20px; }
}

/* Primary actions on auth pages are full-weight ink */
.auth-shell .btn--primary, .auth-shell .btn--primary:hover { background: var(--tx-ink); color: var(--tx-inverse); border-color: var(--tx-ink); }


/* ============================================================== 6. BRAND COMPONENTS */

/* bos-coord — coordinate label: SEC 112 · ROW H · SEATS 4–7 */
.bos-coord { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.bos-coord b { color: var(--tx-ink); font-weight: 500; }
.bos-coord .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* bos-loader — house lights: the three rows light, then the seat */
.bos-loader { --s: 20px; display: inline-block; width: var(--s); height: var(--s); color: var(--tx-ink); }
.bos-loader svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bos-loader .r { fill: currentColor; opacity: .14; animation: bos-lights 1.4s var(--ease) infinite; }
.bos-loader .r2 { animation-delay: .14s; } .bos-loader .r3 { animation-delay: .28s; }
.bos-loader .seat { fill: var(--ac); opacity: .2; animation: bos-seat 1.4s var(--ease) infinite; animation-delay: .42s; }
@keyframes bos-lights { 0%, 100% { opacity: .14; } 30%, 70% { opacity: 1; } }
@keyframes bos-seat { 0%, 100% { opacity: .2; transform: scale(.8); } 35%, 70% { opacity: 1; transform: scale(1); } }
.bos-loader .seat { transform-box: fill-box; transform-origin: center; }
.bos-loading { display: grid; place-items: center; gap: 12px; padding: 48px 16px; color: var(--tx-3); font-size: var(--fs-sm); text-align: center; }

/* bos-seats — the seat matrix: inventory drawn as seats */
.bos-seats { display: inline-grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 3), 8px); gap: 4px; }
.bos-seats > i { width: 8px; height: 8px; border-radius: 2.5px; box-shadow: inset 0 0 0 1.25px var(--ln-strong); }
.bos-seats > i.is-listed { box-shadow: inset 0 0 0 1.5px var(--info); }
.bos-seats > i.is-sold { background: var(--tx-ink); box-shadow: none; }
.bos-seats > i.is-lit { background: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }

/* Empty states carry an empty block of seats above the title */
.pm-empty-icon, .empty__icon {
  background: var(--bg-subtle); color: var(--tx-3);
  box-shadow: inset 0 0 0 1px var(--ln);
}
.pm-empty::before, .empty::before {
  content: ''; display: block; width: 92px; height: 36px; margin: 0 auto 18px;
  background:
    radial-gradient(circle at 4px 4px, var(--ac) 3.2px, transparent 3.6px) 84px 0 / 8px 8px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Crect x='1.6' y='1.6' width='6.8' height='6.8' rx='2' fill='none' stroke='%23A39C96' stroke-width='1.2'/%3E%3C/svg%3E") 0 0 / 12px 12px;
  -webkit-mask: linear-gradient(90deg, #000 70%, transparent);
          mask: linear-gradient(90deg, #000 70%, transparent);
  opacity: .9;
}
:root.dark .pm-empty::before, :root.dark .empty::before { opacity: .55; }
.nf-empty::before, .pm-empty--plain::before, .pm-empty.bos-no-seats::before { display: none; }

/* Skeletons sweep like house lights coming up */
.skel::after, .pm-skel::after { background: linear-gradient(90deg, transparent, rgba(242, 241, 239, 0.55), transparent); }
:root.dark .skel::after, :root.dark .pm-skel::after { background: linear-gradient(90deg, transparent, rgba(242, 241, 239, 0.05), transparent); }

/* The sightline rule — a 45° hairline divider used for brand moments */
.bos-sightline { height: 1px; background: var(--ln); position: relative; }
.bos-sightline::after { content: ''; position: absolute; right: 0; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--ac); }


/* ============================================================== 7. REFINEMENTS */
/* Buttons: the primary action is ink. Claret is the lit seat, not a paint. */
.pm-btn--primary { background: var(--tx-ink); border-color: var(--tx-ink); color: var(--tx-inverse); box-shadow: var(--sh-btn); }
.pm-btn--primary:hover { background: color-mix(in oklab, var(--tx-ink) 86%, var(--ac)); border-color: color-mix(in oklab, var(--tx-ink) 86%, var(--ac)); color: var(--tx-inverse); }
.pm-btn--primary:active { background: var(--tx-ink); }
.pm-btn--primary[disabled], .pm-btn--primary.is-disabled,
html:not(.dark) .pm-btn--primary[disabled], html:not(.dark) .pm-btn--primary.is-disabled { background: var(--bg-muted); border-color: var(--ln); color: var(--tx-4); }
.pm-btn--accent { background: var(--ac); border-color: var(--ac); color: #fff; box-shadow: var(--sh-btn-ac); }
.pm-btn--accent:hover { background: var(--ac-hover); border-color: var(--ac-hover); color: #fff; }
.pm-btn, .btn { letter-spacing: -0.005em; }

/* Badges & dots: accent badge reads as the lit seat */
.pm-badge--ac { background: var(--ac-soft); color: var(--ac-tx); box-shadow: inset 0 0 0 1px var(--ac-line); }
.pm-dot--ac { background: var(--ac); }

/* Toasts: a seat-coloured stub on the left edge, not a filled card */
.pm-toast { border-radius: var(--r-lg); }
.toast-stack .toast, .flash { border-radius: var(--r-lg); }

/* Focus: claret ring on every control */
.pm-input:focus, .pm-select:focus, .pm-textarea:focus, .field__input:focus { border-color: var(--ln-focus); box-shadow: var(--ring); }

/* Charts: the brand series is ink; claret marks "now / yours" */
.ychart, .wchart { --bar: var(--tx-ink); --bar-hi: var(--ac); }

@media (prefers-reduced-motion: reduce) {
  .bos-loader .r, .bos-loader .seat { animation: none; opacity: 1; }
}


/* ---- Charts: past periods are ink at low weight; claret marks "now" */
.wchart__bar span { background: color-mix(in oklab, var(--tx-ink) 18%, transparent); }
.wchart__bar:hover span, .wchart__bar:focus-visible span { background: color-mix(in oklab, var(--tx-ink) 42%, transparent); }
.wchart__bar.is-on span { background: var(--ac); }
.ychart__bar { background: color-mix(in oklab, var(--tx-ink) 22%, transparent); opacity: 1; }
.ychart__col:hover .ychart__bar, .ychart__col.is-on .ychart__bar { background: color-mix(in oklab, var(--tx-ink) 45%, transparent); }
.ychart__col.is-current .ychart__bar { background: var(--ac); }
.ychart__col.is-future .ychart__bar { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--tx-ink) 30%, transparent) 0 1.5px, transparent 1.5px 6px); }

/* ---- Avatars: ink discs, plaster initials */
.pm-avatar { background: var(--tx-ink); color: var(--tx-inverse); box-shadow: none; }

/* ---- Wash bands: no blue haze — a plain paper fade */
.pm-wash-band::before, :root.dark .pm-wash-band::before { background: linear-gradient(180deg, var(--bg-subtle) 0%, transparent 100%); }

/* ---- Error page: the mark and the code, set like stand signage */
.bos-error { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.bos-error__mark { width: 44px; height: 44px; }
.bos-error__code {
  font-family: var(--bos-font-display); font-stretch: var(--bos-stretch-hero);
  font-weight: 600; font-size: 88px; line-height: .9; letter-spacing: -0.04em;
  color: var(--tx-ink); font-variant-numeric: tabular-nums;
}


/* ---- Figures: money and counts set in Archivo tabular, not mono.
   Mono is for coordinates and identifiers (seats, order ids). */
.kpi__value, .pipe__value, .wchart__value, .metric-cell__value, .stage-btn__seats,
.listing-modal__money, .lm__cur, .mkx-stat__n, .lmx__cur, .hub-sum__n, .mx-kpi__v,
.adm-kpi__value, .adm-chart__value, .adm-group__n, .adm-stat__v, .adm-access__n {
  font-family: var(--font); font-weight: 600; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---- Inline figures in sentences and chips: Archivo tabular, not mono
   ("78 events · 329/1167 seats sold · £140,706 spent"). */
.ev-summary strong, .undeliv-chip strong, .unpaid-chip strong, .inhand-chip strong,
.inv-bar__key strong, .pmt-note strong, .lm__preview strong, .adm-tip strong,
.os-lede strong, .page-head__lede strong, .dt__group-sub {
  font-family: var(--font); font-weight: 600; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ============================================================== 8. LINK EVENTS PANEL (bos-mx) */
/* One row per marketplace: mark · name · state, then its box and matches.
   Searches run in parallel; each row's state pill says where it's at. */
.ev-mkts__form.bos-mx {
  width: min(600px, calc(100vw - 32px)); max-height: min(78vh, 720px);
  padding: 0; gap: 0; overflow: hidden;
  border-radius: var(--r-xl); border-color: var(--ln); box-shadow: var(--sh-pop);
  font-size: var(--fs-sm);
}
.bos-mx__head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px 18px; }
.bos-mx__headtext { flex: 1; min-width: 0; }
.bos-mx__title { margin: 0; font-size: 15px; font-weight: 600; font-stretch: var(--bos-stretch-display); letter-spacing: var(--tr-title); color: var(--tx-ink); }
.bos-mx__sub { margin: 4px 0 0; color: var(--tx-3); font-size: var(--fs-xs); line-height: 1.45; max-width: 52ch; }
.bos-mx .ev-mkts__close { position: static; flex-shrink: 0; border-radius: var(--r-sm); }

.bos-mx__search { display: flex; gap: 8px; align-items: center; padding: 0 16px 12px 18px; }
.bos-mx__search[hidden] { display: none; }
.bos-mx__searchbox {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px; border-radius: var(--r-md);
  background: var(--bg-muted); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln-soft);
}
.bos-mx__searchbox:focus-within { background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln-focus), var(--ring); }
.bos-mx__q { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--tx-ink); font: inherit; font-size: var(--fs-sm); }

.bos-mx__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-top: 1px solid var(--ln); flex: 1; min-height: 0; }
.bos-mx__row { padding: 12px 16px 12px 18px; border-bottom: 1px solid var(--ln-soft); display: flex; flex-direction: column; gap: 8px; }
.bos-mx__row:last-child { border-bottom: 0; }
.bos-mx__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bos-mx__mark { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; }
.bos-mx__name { flex: 1; min-width: 0; font-weight: 500; color: var(--tx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bos-mx__state {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px;
  border-radius: var(--r-pill); font-size: 11px; font-weight: 500; color: var(--tx-3); background: var(--bg-muted);
}
.bos-mx__state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.bos-mx__state.is-ok   { color: var(--ok-tx);   background: var(--ok-soft); }
.bos-mx__state.is-warn { color: var(--warn-tx); background: var(--warn-soft); }
.bos-mx__state.is-bad  { color: var(--bad-tx);  background: var(--bad-soft); }
.bos-mx__state.is-busy { color: var(--tx-2); }
.bos-mx__state.is-busy::before { animation: bos-pulse 1s var(--ease) infinite; }
@keyframes bos-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.bos-mx__body { padding-left: 32px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bos-mx__linked { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.bos-mx__id { display: inline-flex; align-items: center; gap: 4px; color: var(--tx-2); font-variant-numeric: tabular-nums; text-decoration: none; }
a.bos-mx__id:hover { color: var(--tx-ink); text-decoration: underline; text-underline-offset: 3px; }
.bos-mx__note { color: var(--tx-3); font-size: var(--fs-xs); }
.bos-mx__linked .ev-mkts__unlink { margin-left: auto; height: 26px; color: var(--tx-3); }
.bos-mx__linked .ev-mkts__unlink:hover { color: var(--bad-tx); }
.bos-mx__input { height: 32px; font-size: var(--fs-sm); }
.bos-mx .ev-mkts__found { margin-left: 0; gap: 6px; }
.bos-mx .ev-mkts__cand { border-radius: var(--r-md); padding: 8px 10px; background: var(--bg-surface); transition: border-color var(--d-1) var(--ease), background var(--d-1) var(--ease); }
.bos-mx .ev-mkts__cand:hover { border-color: var(--ln-strong); background: var(--bg-subtle); }
.bos-mx .ev-mkts__cand.is-picked { border-color: var(--ac); box-shadow: inset 0 0 0 1px var(--ac); background: var(--bg-selected); }
.bos-mx .ev-mkts__cand .ev-mkts__id { margin-left: 0; color: var(--tx-3); font-family: var(--font); }
.bos-mx__empty { padding: 16px 18px; color: var(--tx-3); }

.bos-mx__foot {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 18px;
  border-top: 1px solid var(--ln); background: var(--bg-subtle);
}
.bos-mx__foot[hidden] { display: none; }
.bos-mx__count { flex: 1; color: var(--tx-3); font-size: var(--fs-xs); }
.bos-mx__foot .btn[disabled] { opacity: .45; cursor: default; }

/* The form is a flex column so the list scrolls between a fixed head and foot */
.ev-mkts__form.bos-mx { display: flex; flex-direction: column; }
@media (max-width: 640px) {
  .ev-mkts__form.bos-mx { max-height: 72vh; }
  .bos-mx__body { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .bos-mx__state.is-busy::before { animation: none; } }

/* ============================================================== 9. LOT HISTORY (lhx) */
/* A timeline, newest first. Each action is one event on the rail: a node
   (icon + tone), a header line (time · what · marketplaces · who), and one
   line per marketplace. Any line opens to its raw data. */
.modal.lhx {
  --lhx-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --lhx-rail: 30px;
  width: min(780px, calc(100vw - 32px)); max-width: none;
  height: min(86vh, 880px); max-height: none;
  padding: 0; overflow: hidden;
  border: 1px solid var(--ln); border-radius: var(--r-2xl);
  background: var(--bg-canvas); color: var(--tx); box-shadow: var(--sh-modal);
}
.lhx .lhx__frame { width: 100%; height: 100%; max-height: none; display: flex; flex-direction: column; min-height: 0; }

/* Header */
.lhx__head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 18px 14px 24px; }
.lhx__headtext { flex: 1; min-width: 0; }
.lhx__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3);
}
.lhx__eyebrow i { font-size: 13px; }
.lhx__title {
  margin: 6px 0 0; font-size: 21px; line-height: 1.2; font-weight: 600;
  font-stretch: var(--bos-stretch-display); letter-spacing: var(--tr-title); color: var(--tx-ink);
  overflow-wrap: anywhere;
}
.lhx__stats { margin: 6px 0 0; min-height: 18px; font-size: 12.5px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.lhx__stat-bad { color: var(--bad-tx); font-weight: 500; }
.lhx__close {
  flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; margin-top: -2px;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--tx-3); cursor: pointer;
  transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease);
}
.lhx__close i { font-size: 19px; line-height: 1; }
.lhx__close:hover { background: var(--bg-hover); color: var(--tx-ink); }
.lhx__close:active { background: var(--bg-press); }
.lhx__close:focus-visible { outline: none; box-shadow: var(--ring-tight); }
.lhx__frame:focus, .lhx__close:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.lhx__ev.is-ok .lhx__card .lhx__row.is-bad, .lhx__ev:not(.is-bad) .lhx__row.is-bad { background: color-mix(in oklab, var(--bad-soft) 55%, transparent); }

/* Filters + search */
.lhx__bar { display: flex; align-items: center; gap: 10px; padding: 0 18px 14px 24px; border-bottom: 1px solid var(--ln); }
.lhx__seg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-lg);
  background: var(--bg-muted); box-shadow: inset 0 0 0 1px var(--ln-soft);
  overflow-x: auto; scrollbar-width: none; flex-shrink: 1; min-width: 0;
}
.lhx__seg::-webkit-scrollbar { display: none; }
.lhx__f {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 0; border-radius: var(--r-md); background: transparent;
  font: 500 12.5px/1 var(--font); color: var(--tx-2); white-space: nowrap; cursor: pointer;
  transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease), box-shadow var(--d-1) var(--ease);
}
.lhx__f:hover { color: var(--tx-ink); }
.lhx__f.is-on { background: var(--bg-surface); color: var(--tx-ink); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); }
.lhx__f:focus-visible { box-shadow: var(--ring-tight); }
.lhx__n { font-size: 11px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.lhx__n:empty { display: none; }
.lhx__f--bad .lhx__n { color: var(--bad-tx); font-weight: 600; }
.lhx__f--bad.is-on { color: var(--bad-tx); }
.lhx__search {
  flex: 1 1 180px; min-width: 140px; display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 10px; border-radius: var(--r-lg);
  background: var(--bg-muted); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln-soft);
  transition: background var(--d-1) var(--ease), box-shadow var(--d-1) var(--ease);
}
.lhx__search:focus-within { background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln-focus), var(--ring); }
.lhx__search i { font-size: 14px; }
.lhx__search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: 400 13px var(--font); color: var(--tx-ink); }
.lhx__search input::-webkit-search-cancel-button { cursor: pointer; }
.lhx__kbd {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px;
  font: 500 10.5px var(--lhx-mono); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln);
}
.lhx__search:focus-within .lhx__kbd { display: none; }

/* Scroll area */
.lhx__scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 18px 24px 24px; scroll-padding-top: 40px;
  scrollbar-width: thin; scrollbar-color: var(--ln-strong) transparent;
}
.lhx__scroll::-webkit-scrollbar { width: 10px; }
.lhx__scroll::-webkit-scrollbar-thumb { background: var(--ln-strong); border-radius: 10px; border: 3px solid var(--bg-canvas); }
.lhx__scroll::-webkit-scrollbar-thumb:hover { background: var(--tx-4); }
.lhx__scroll::-webkit-scrollbar-track { background: transparent; }

/* Day: sticky label, then a rail running through its events */
.lhx__day { position: relative; padding-bottom: 6px; }
.lhx__dayhead {
  position: sticky; top: 0; z-index: 2; margin: 0 0 4px; padding: 14px 0 8px;
  background: linear-gradient(var(--bg-canvas) 78%, transparent);
  font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3);
}
.lhx__ev { position: relative; display: grid; grid-template-columns: var(--lhx-rail) minmax(0, 1fr); gap: 0 10px; padding-bottom: 12px; }
.lhx__ev::before {   /* the rail */
  content: ''; position: absolute; left: calc(var(--lhx-rail) / 2 - .5px); top: 30px; bottom: -2px; width: 1px; background: var(--ln);
}
.lhx__day .lhx__ev:last-child::before { display: none; }
.lhx__node {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: var(--lhx-rail); height: var(--lhx-rail); margin-top: 6px; border-radius: 50%;
  background: var(--bg-surface); color: var(--tx-3); box-shadow: 0 0 0 1px var(--ln), 0 0 0 4px var(--bg-canvas);
}
.lhx__node i { font-size: 14px; line-height: 1; }
.lhx__ev.is-ok   .lhx__node { color: var(--ok-tx);   background: var(--ok-soft);   box-shadow: 0 0 0 1px var(--ok-line), 0 0 0 4px var(--bg-canvas); }
.lhx__ev.is-bad  .lhx__node { color: var(--bad-tx);  background: var(--bad-soft);  box-shadow: 0 0 0 1px var(--bad-line), 0 0 0 4px var(--bg-canvas); }
.lhx__ev.is-warn .lhx__node { color: var(--warn-tx); background: var(--warn-soft); box-shadow: 0 0 0 1px var(--warn-line), 0 0 0 4px var(--bg-canvas); }
.lhx__ev.is-info .lhx__node { color: var(--info-tx); background: var(--info-soft); box-shadow: 0 0 0 1px var(--info-line), 0 0 0 4px var(--bg-canvas); }
.lhx__ev.is-ac   .lhx__node { color: var(--ac-tx);   background: var(--ac-soft);   box-shadow: 0 0 0 1px var(--ac-line), 0 0 0 4px var(--bg-canvas); }

/* The event card */
.lhx__card {
  min-width: 0; border-radius: var(--r-lg); background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--ln), var(--sh-xs);
  transition: box-shadow var(--d-2) var(--ease);
}
.lhx__card:hover { box-shadow: 0 0 0 1px var(--ln-strong), var(--sh-xs); }
.lhx__ev.is-bad .lhx__card { box-shadow: 0 0 0 1px var(--bad-line), var(--sh-xs); }
.lhx__top { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 6px 6px 14px; }
.lhx__time { flex-shrink: 0; font-size: 12px; font-weight: 500; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.lhx__ttl { min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--tx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lhx__dots { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.lhx__dots .lhx__mkdot { margin-right: 0; }
.lhx__dotsn { margin-left: 4px; font-size: 11.5px; color: var(--tx-3); }
.lhx__who {
  margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--tx-2); white-space: nowrap;
}
.lhx__who i { font-size: 13px; color: var(--tx-3); }
.lhx__who.is-auto { color: var(--tx-3); }
.lhx__tog {
  flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--tx-3); cursor: pointer;
  transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease);
}
.lhx__tog i { font-size: 15px; }
.lhx__tog:hover { background: var(--bg-hover); color: var(--tx-ink); }
.lhx__tog[aria-expanded="true"] { background: var(--bg-selected); color: var(--ac-tx); }
.lhx__tog:focus-visible { box-shadow: var(--ring-tight); }

.lhx__tag {
  flex-shrink: 0; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
.lhx__tag.is-bad  { background: var(--bad-soft);  color: var(--bad-tx); }
.lhx__tag.is-warn { background: var(--warn-soft); color: var(--warn-tx); font-family: var(--lhx-mono); font-size: 10.5px; }

/* Lines: one per marketplace / message */
.lhx__rows { border-top: 1px solid var(--ln-soft); }
.lhx__row + .lhx__row { border-top: 1px solid var(--ln-soft); }
.lhx__line {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: baseline; gap: 12px;
  width: 100%; padding: 9px 10px 9px 14px; border: 0; background: transparent; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  transition: background var(--d-1) var(--ease);
}
.lhx__row:last-child .lhx__line { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.lhx__row.is-open:last-child .lhx__line { border-radius: 0; }
.lhx__line:hover { background: var(--bg-hover); }
.lhx__line:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ac-line); }
.lhx__mk { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--tx-2); white-space: nowrap; }
.lhx__mkname { overflow: hidden; text-overflow: ellipsis; }
.lhx__mkdot { flex-shrink: 0; display: inline-block; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg-surface); }
.lhx__text { min-width: 0; font-size: 13px; line-height: 1.5; color: var(--tx); overflow-wrap: anywhere; }
.lhx__row.k-sale .lhx__text, .lhx__row.k-fixed .lhx__text { color: var(--tx-ink); font-weight: 500; }
.lhx__row.k-check .lhx__text, .lhx__row.k-note .lhx__text { color: var(--tx-2); }
.lhx__row.is-bad .lhx__text { color: var(--bad-tx); }
.lhx__row.is-bad .lhx__line { box-shadow: inset 2px 0 0 var(--bad); }
.lhx__meta { display: inline-flex; align-items: center; gap: 8px; justify-self: end; white-space: nowrap; }
.lhx__id { font: 400 11.5px var(--lhx-mono); color: var(--tx-3); letter-spacing: -0.01em; }
.lhx__sec { display: none; font: 400 11px var(--lhx-mono); color: var(--tx-4); }
.lhx__chev { font-size: 15px; color: var(--tx-4); transition: transform var(--d-2) var(--ease), color var(--d-1) var(--ease); }
.lhx__line:hover .lhx__chev { color: var(--tx-2); }
.lhx__line:hover .lhx__sec, .lhx__row.is-open .lhx__sec { display: inline; }
.lhx__row.is-open .lhx__chev { transform: rotate(180deg); color: var(--ac-tx); }
.lhx__hit { background: var(--ac-soft-2); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Technical detail (opened line) */
.lhx__detail {
  margin: 0; padding: 12px 14px 14px; background: var(--bg-subtle); border-top: 1px dashed var(--ln);
  display: flex; flex-direction: column; gap: 10px;
  animation: lhx-open var(--d-2) var(--ease-out) both;
}
.lhx__row:last-child .lhx__detail { border-radius: 0 0 var(--r-lg) var(--r-lg); }
@keyframes lhx-open { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.lhx__kv { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 12px; }
.lhx__kv dt { color: var(--tx-3); }
.lhx__kv dd { margin: 0; min-width: 0; color: var(--tx-ink); overflow-wrap: anywhere; }
.lhx__kv dd.is-mono { font: 400 11.5px/1.5 var(--lhx-mono); }
.lhx__raw { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lhx__rawlabel { font-size: 10.5px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); }
.lhx__pre {
  margin: 0; max-height: 220px; overflow: auto; padding: 9px 11px; border-radius: var(--r-md);
  background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln);
  font: 400 11.5px/1.55 var(--lhx-mono); color: var(--tx); white-space: pre-wrap; overflow-wrap: anywhere;
  tab-size: 2; user-select: text;
}
.lhx__detail-act { display: flex; justify-content: flex-end; }
.lhx__mini {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--tx-2); font: 500 12px var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--ln);
}
.lhx__mini:hover { background: var(--bg-surface); color: var(--tx-ink); }
.lhx__mini i { font-size: 13px; }

/* Empty / loading */
.lhx__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 16px; text-align: center; color: var(--tx-3); font-size: 13px; }
.lhx__empty i { font-size: 22px; margin-bottom: 4px; color: var(--tx-4); }
.lhx__empty strong { color: var(--tx-ink); font-weight: 600; font-size: 14px; }
.lhx__empty.is-bad i, .lhx__empty.is-bad strong { color: var(--bad-tx); }
.lhx__loading { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.lhx__skel { display: grid; grid-template-columns: var(--lhx-rail) 1fr; gap: 10px; align-items: start; }
.lhx__skel span { display: block; border-radius: var(--r-md); background: var(--bg-muted); animation: lhx-pulse 1.2s var(--ease) infinite; }
.lhx__skel span:nth-child(1) { width: var(--lhx-rail); height: var(--lhx-rail); border-radius: 50%; }
.lhx__skel span:nth-child(2) { height: 74px; }
.lhx__skel span:nth-child(3) { display: none; }
@keyframes lhx-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* Footer */
.lhx__foot {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 24px;
  border-top: 1px solid var(--ln); background: var(--bg-subtle);
}
.lhx__copy {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--tx-2);
  font: 500 13px var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--ln);
  transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease);
}
.lhx__copy i { font-size: 15px; }
.lhx__copy:hover { background: var(--bg-surface); color: var(--tx-ink); }
.lhx__copy:focus-visible { box-shadow: var(--ring-tight); }
.lhx__foot-meta { flex: 1; min-width: 0; font-size: 12px; color: var(--tx-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lhx__done { min-width: 76px; }

/* Phones: a full-height sheet; marketplace on its own line */
@media (max-width: 640px) {
  .modal.lhx { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .lhx__head { padding: max(16px, env(safe-area-inset-top)) 12px 12px 16px; }
  .lhx__bar { flex-wrap: wrap; padding: 0 12px 12px 16px; }
  .lhx__seg { width: 100%; }
  .lhx__search { flex-basis: 100%; }
  .lhx__kbd { display: none; }
  .lhx__scroll { padding: 2px 12px 20px 12px; }
  .lhx__line { grid-template-columns: minmax(0, 1fr) auto; row-gap: 3px; }
  .lhx__mk { grid-column: 1 / -1; }
  .lhx__who { font-size: 11.5px; }
  .lhx__dotsn { display: none; }
  .lhx__kv { grid-template-columns: 88px minmax(0, 1fr); }
  .lhx__foot { padding: 10px 12px max(10px, env(safe-area-inset-bottom)) 16px; }
  .lhx__foot-meta { display: none; }
  .lhx__done { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .lhx__detail, .lhx__skel span { animation: none; }
}


/* ============================================================== 10. TEAM & ACCESS (tm) */
/* The list is a quiet table; the drawer does the work. Access is set per
   area on a None / View / Manage scale — the view_* / manage_* pairs. */
.tm { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.tm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tm-head__text { min-width: 0; max-width: 60ch; }
.tm-eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); }
.tm-title { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 600; font-stretch: var(--bos-stretch-display); letter-spacing: var(--tr-display); color: var(--tx-ink); }
.tm-lede { margin: 8px 0 0; color: var(--tx-3); font-size: var(--fs-md); line-height: 1.5; }
.tm-head__actions { display: flex; gap: 8px; align-items: center; }
.tm-add { height: 36px; padding: 0 14px; }

/* Summary strip: one line of figures, not a row of tiles */
.tm-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0;
  border-radius: var(--r-xl); background: var(--bg-surface); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs);
}
.tm-strip__item { padding: 14px 18px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: baseline; min-width: 0; }
.tm-strip__item + .tm-strip__item { box-shadow: inset 1px 0 0 var(--ln-soft); }
.tm-strip__item dt { grid-column: 1 / -1; font-size: 12px; color: var(--tx-3); margin-bottom: 4px; }
.tm-strip__item dd { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--tx-ink); font-variant-numeric: tabular-nums; }
.tm-strip__item dd.is-sens { color: var(--warn-tx); }
.tm-strip__item span { font-size: 12px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-strip__item a { color: var(--ac-tx); font-weight: 500; }

/* Members panel */
.tm-panel { border-radius: var(--r-xl); background: var(--bg-surface); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); overflow: hidden; }
.tm-tools { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--ln); flex-wrap: wrap; }
.tm-search {
  flex: 1 1 240px; max-width: 360px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px;
  border-radius: var(--r-md); background: var(--bg-muted); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln-soft);
}
.tm-search:focus-within { background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln-focus), var(--ring); }
.tm-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 13px var(--font); color: var(--tx-ink); }
.tm-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-lg); background: var(--bg-muted); box-shadow: inset 0 0 0 1px var(--ln-soft); margin-left: auto; }
.tm-seg__b { height: 28px; padding: 0 11px; border: 0; border-radius: var(--r-md); background: transparent; font: 500 12.5px var(--font); color: var(--tx-2); cursor: pointer; transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease); }
.tm-seg__b:hover { color: var(--tx-ink); }
.tm-seg__b.is-on { background: var(--bg-surface); color: var(--tx-ink); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); }

.tm-table { display: flex; flex-direction: column; }
.tm-row {
  display: grid; grid-template-columns: minmax(220px, 2.2fr) minmax(150px, 1.3fr) 184px 92px 96px 40px;
  align-items: center; gap: 16px; padding: 12px 14px 12px 18px; min-height: 64px;
  border-bottom: 1px solid var(--ln-soft);
}
.tm-row:last-child { border-bottom: 0; }
.tm-row--head { min-height: 0; padding-top: 10px; padding-bottom: 10px; background: var(--bg-subtle); font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); }
.tm-row--user { cursor: pointer; transition: background var(--d-1) var(--ease); outline: none; }
.tm-row--user:hover { background: var(--bg-hover); }
.tm-row--user:focus-visible { box-shadow: inset 0 0 0 2px var(--ac-line); }
.tm-row--user.is-disabled .tm-member, .tm-row--user.is-disabled .tm-areas { opacity: .55; }
.tm-row--owner { background: color-mix(in oklab, var(--bg-subtle) 60%, transparent); }
.tm-row.is-flash { animation: tm-flash 2.2s var(--ease) both; }
@keyframes tm-flash { 0%, 30% { background: var(--bg-selected); } 100% { background: transparent; } }
.tm-row[hidden] { display: none; }

.tm-member { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-avatar {
  flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-muted); color: var(--tx-2); font-size: 12px; font-weight: 600; letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px var(--ln);
}
.tm-avatar--owner { background: var(--tx-ink); color: var(--tx-inverse); box-shadow: none; }
.tm-avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.tm-avatar--lg i { font-size: 20px; color: var(--tx-3); }
.tm-avatar.is-user { background: var(--tx-ink); color: var(--tx-inverse); box-shadow: none; }
.tm-member__text { display: flex; flex-direction: column; min-width: 0; }
.tm-member__name { font-size: 14px; font-weight: 500; color: var(--tx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-member__sub { font-size: 12.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-you { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; margin-left: 6px; border-radius: 4px; font-size: 10.5px; font-weight: 500; color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln); vertical-align: 1px; }

.tm-access { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tm-level { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; color: var(--tx-2); background: var(--bg-muted); white-space: nowrap; }
.tm-level i { font-size: 13px; }
.tm-level--owner { background: var(--tx-ink); color: var(--tx-inverse); }
.tm-level--manager { color: var(--tx-ink); box-shadow: inset 0 0 0 1px var(--ln-strong); background: transparent; }
.tm-level--no-access { color: var(--tx-4); background: transparent; border: 1px dashed var(--ln-strong); }
.tm-sens { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; color: var(--warn-tx); background: var(--warn-soft); white-space: nowrap; }
.tm-sens i { font-size: 12px; }

/* Access meters: one per area, two segments = view, manage */
.tm-col-areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tm-row--head .tm-col-areas span { font-size: 10px; text-align: center; letter-spacing: .04em; white-space: nowrap; }
.tm-meter { display: inline-flex; gap: 2px; justify-self: center; }
.tm-meter i { display: block; width: 12px; height: 6px; border-radius: 2px; background: var(--bg-muted); box-shadow: inset 0 0 0 1px var(--ln); }
.tm-meter.is-view i:first-child, .tm-meter.is-manage i { background: var(--tx-2); box-shadow: none; }
.tm-meter.is-manage i { background: var(--tx-ink); }

.tm-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--tx-3); white-space: nowrap; }
.tm-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tx-4); }
.tm-status.is-on { color: var(--tx-2); }
.tm-status.is-on::before { background: var(--ok-dot); box-shadow: 0 0 0 3px var(--ok-soft); }
.tm-seen { font-size: 12.5px; color: var(--tx-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-rowact { display: flex; justify-content: flex-end; }
.tm-icon {
  display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--r-md);
  background: transparent; color: var(--tx-3); cursor: pointer; transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease), transform var(--d-2) var(--ease);
}
.tm-icon i { font-size: 18px; }
.tm-icon:hover { background: var(--bg-hover); color: var(--tx-ink); }
.tm-icon:focus-visible { outline: none; box-shadow: var(--ring-tight); }
.tm-row--user:hover .tm-icon { color: var(--tx-ink); transform: translateX(2px); }

.tm-none { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 32px; color: var(--tx-3); font-size: 13px; }
.tm-none[hidden] { display: none; }
.tm-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px 56px; border-top: 1px solid var(--ln-soft); }
.tm-empty__seats { display: grid; grid-template-columns: repeat(6, 10px); gap: 5px; margin-bottom: 20px; }
.tm-empty__seats i { width: 10px; height: 8px; border-radius: 2px; box-shadow: inset 0 0 0 1.2px var(--ln-strong); }
.tm-empty__seats i.is-lit { background: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.tm-empty__title { margin: 0; font-size: 17px; font-weight: 600; color: var(--tx-ink); }
.tm-empty__text { margin: 8px 0 20px; max-width: 46ch; color: var(--tx-3); font-size: 13.5px; line-height: 1.55; }

/* ---------------- Drawer */
html.tm-lock { overflow: hidden; }
.tm-drawer { position: fixed; inset: 0; z-index: 80; }
.tm-drawer[hidden] { display: none; }
.tm-drawer__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--d-3) var(--ease); }
.tm-drawer.is-in .tm-drawer__scrim { opacity: 1; }
.tm-drawer__form {
  position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(560px, calc(100vw - 16px));
  display: flex; flex-direction: column; margin: 0;
  border-radius: var(--r-2xl); background: var(--bg-canvas); box-shadow: var(--sh-modal);
  transform: translateX(24px); opacity: 0;
  transition: transform var(--d-4) var(--ease-out), opacity var(--d-3) var(--ease);
}
.tm-drawer.is-in .tm-drawer__form { transform: none; opacity: 1; }
.tm-drawer__head { display: flex; align-items: center; gap: 14px; padding: 18px 16px 16px 22px; border-bottom: 1px solid var(--ln); }
.tm-drawer__headtext { flex: 1; min-width: 0; }
.tm-drawer__title { margin: 0; font-size: 18px; font-weight: 600; font-stretch: var(--bos-stretch-display); letter-spacing: var(--tr-title); color: var(--tx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-drawer__sub { margin: 3px 0 0; font-size: 12.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-drawer__x { align-self: flex-start; }
.tm-drawer__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 22px 28px; scrollbar-width: thin; scrollbar-color: var(--ln-strong) transparent; }
.tm-drawer__body::-webkit-scrollbar { width: 10px; }
.tm-drawer__body::-webkit-scrollbar-thumb { background: var(--ln-strong); border-radius: 10px; border: 3px solid var(--bg-canvas); }
.tm-drawer__foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px 22px; border-top: 1px solid var(--ln); background: var(--bg-subtle); border-radius: 0 0 var(--r-2xl) var(--r-2xl); }
.tm-drawer__meta { flex: 1; min-width: 0; font-size: 12px; color: var(--tx-3); }
.tm-drawer.is-dirty .tm-drawer__meta { color: var(--warn-tx); }

.tm-sec { padding: 18px 0; display: flex; flex-direction: column; gap: 14px; }
.tm-sec + .tm-sec { border-top: 1px solid var(--ln-soft); }
.tm-sec[hidden] { display: none; }
.tm-sec__headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tm-sec__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--tx-ink); }
.tm-step { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 600; color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln-strong); }
.tm-count { font-size: 12px; color: var(--tx-3); font-variant-numeric: tabular-nums; }

/* Fields */
.tm-field { display: flex; flex-direction: column; gap: 6px; }
.tm-field[hidden] { display: none; }
.tm-field--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--ln); background: var(--bg-surface); }
.tm-field--row .tm-help { margin-top: 2px; }
.tm-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.tm-label { font-size: 13px; font-weight: 500; color: var(--tx-ink); }
.tm-opt { margin-left: 4px; font-weight: 400; color: var(--tx-4); }
.tm-input {
  width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-md);
  background: var(--bg-surface); color: var(--tx-ink); font: 400 14px var(--font);
  box-shadow: inset 0 0 0 1px var(--ln-strong); transition: box-shadow var(--d-1) var(--ease);
}
.tm-input::placeholder { color: var(--tx-4); }
.tm-input:hover { box-shadow: inset 0 0 0 1px var(--tx-4); }
.tm-input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ln-focus), var(--ring); }
.tm-field.is-err .tm-input { box-shadow: inset 0 0 0 1px var(--bad), 0 0 0 3px var(--bad-soft); }
.tm-help { margin: 0; font-size: 12px; line-height: 1.45; color: var(--tx-3); }
.tm-error { margin: 0; font-size: 12px; color: var(--bad-tx); }
.tm-error:empty { display: none; }
.tm-link { border: 0; background: none; padding: 0; font: 500 12px var(--font); color: var(--ac-tx); cursor: pointer; }
.tm-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tm-pw { position: relative; display: flex; align-items: center; }
.tm-input--pw { padding-right: 76px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tm-pw__btn { position: absolute; top: 5px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--tx-3); cursor: pointer; }
.tm-pw__btn:nth-of-type(1) { right: 36px; } .tm-pw__btn:nth-of-type(2) { right: 5px; }
.tm-pw__btn:hover { background: var(--bg-hover); color: var(--tx-ink); }
.tm-pw__btn i { font-size: 15px; }
.tm-meterbar { height: 3px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.tm-meterbar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--tx-4); transition: width var(--d-3) var(--ease), background var(--d-2) var(--ease); }
.tm-meterbar i[data-s="weak"] { background: var(--bad); }
.tm-meterbar i[data-s="ok"] { background: var(--warn); }
.tm-meterbar i[data-s="strong"] { background: var(--ok); }

/* Presets */
.tm-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tm-preset {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; text-align: left; border: 0; border-radius: var(--r-lg);
  background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln); cursor: pointer; min-width: 0;
  transition: box-shadow var(--d-1) var(--ease), background var(--d-1) var(--ease);
}
.tm-preset:hover { box-shadow: inset 0 0 0 1px var(--ln-strong); }
.tm-preset.is-on { box-shadow: inset 0 0 0 1.5px var(--tx-ink); }
.tm-preset:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--ln-strong), var(--ring); }
.tm-preset__name { font-size: 13px; font-weight: 600; color: var(--tx-ink); }
.tm-preset__desc { font-size: 11.5px; line-height: 1.4; color: var(--tx-3); }

/* Area matrix */
.tm-matrix { border-radius: var(--r-lg); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln); }
.tm-area { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; }
.tm-area + .tm-area { border-top: 1px solid var(--ln-soft); }
.tm-area__icon, .tm-switchrow__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-md); background: var(--bg-muted); color: var(--tx-3); transition: background var(--d-2) var(--ease), color var(--d-2) var(--ease); }
.tm-area__icon i, .tm-switchrow__icon i { font-size: 16px; }
.tm-area[data-state="view"] .tm-area__icon, .tm-area[data-state="manage"] .tm-area__icon, .tm-switchrow.is-on .tm-switchrow__icon { background: var(--tx-ink); color: var(--tx-inverse); }
.tm-area__text, .tm-switchrow__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-area__name, .tm-switchrow__name { font-size: 13.5px; font-weight: 500; color: var(--tx-ink); }
.tm-area__desc, .tm-switchrow__desc { font-size: 12px; line-height: 1.45; color: var(--tx-3); }
.tm-area__dep { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11.5px; color: var(--info-tx); }
.tm-area__dep::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tm-area__dep[hidden] { display: none; }
.tm-lvl { display: inline-flex; padding: 2px; border-radius: var(--r-md); background: var(--bg-muted); box-shadow: inset 0 0 0 1px var(--ln-soft); }
.tm-lvl__b { height: 26px; min-width: 58px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; font: 500 12px var(--font); color: var(--tx-3); cursor: pointer; transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease), box-shadow var(--d-1) var(--ease); }
.tm-lvl__b:hover { color: var(--tx-ink); }
.tm-lvl__b.is-on { background: var(--bg-surface); color: var(--tx-ink); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); }
.tm-lvl__b[data-lvl="manage"].is-on { background: var(--tx-ink); color: var(--tx-inverse); box-shadow: none; }
.tm-lvl__b:focus-visible { outline: none; box-shadow: var(--ring-tight); }

/* Switch groups */
.tm-group { border-radius: var(--r-lg); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln); overflow: hidden; }
.tm-group__head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); border-bottom: 1px solid var(--ln-soft); background: var(--bg-subtle); }
.tm-group__head i { font-size: 14px; }
.tm-group__note { margin-left: auto; font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--warn-tx); }
.tm-group--sens { box-shadow: inset 0 0 0 1px var(--warn-line); }
.tm-group--sens .tm-group__head { background: color-mix(in oklab, var(--warn-soft) 60%, var(--bg-subtle)); color: var(--warn-tx); border-bottom-color: var(--warn-line); }
.tm-group--sens .tm-switchrow.is-on .tm-switchrow__icon { background: var(--warn-soft); color: var(--warn-tx); }
.tm-switchrow { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; transition: background var(--d-1) var(--ease); }
.tm-switchrow + .tm-switchrow { border-top: 1px solid var(--ln-soft); }
.tm-switchrow:hover { background: var(--bg-hover); }
.tm-switchrow .pm-switch { flex-shrink: 0; }
.tm-group--sens .pm-switch:checked { background: var(--warn); }

/* Summary */
.tm-summary { padding: 14px; border-radius: var(--r-lg); background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--ln-soft); }
.tm-summary__title { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 500; color: var(--tx-2); }
.tm-summary__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-summary__list li { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; color: var(--tx-ink); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln); }
.tm-summary__list li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--ok-dot); }
.tm-summary__list li.is-sens { color: var(--warn-tx); box-shadow: inset 0 0 0 1px var(--warn-line); }
.tm-summary__list li.is-sens::before { background: var(--warn-dot); }
.tm-summary__list li.is-none { height: auto; padding: 0; background: none; box-shadow: none; color: var(--tx-3); }
.tm-summary__list li.is-none::before { display: none; }

.tm-danger { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.tm-danger .tm-help { margin-top: 2px; max-width: 40ch; }

/* ---------------- Responsive */
@media (max-width: 1080px) {
  .tm-row { grid-template-columns: minmax(200px, 2fr) minmax(140px, 1.2fr) 92px 96px 40px; }
  .tm-col-areas { display: none; }
}
@media (max-width: 760px) {
  .tm-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-strip__item:nth-child(3) { box-shadow: inset 0 1px 0 var(--ln-soft); }
  .tm-strip__item:nth-child(4) { box-shadow: inset 1px 0 0 var(--ln-soft), inset 0 1px 0 var(--ln-soft); }
  .tm-row--head { display: none; }
  .tm-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m a" "x s"; gap: 8px 12px; padding: 14px 14px 14px 16px; }
  .tm-row > :nth-child(1) { grid-area: m; } .tm-row > :nth-child(2) { grid-area: x; padding-left: 46px; }
  .tm-row > :nth-child(4) { grid-area: s; justify-self: end; } .tm-row > :nth-child(6) { grid-area: a; }
  .tm-col-seen { display: none; }
  .tm-seg { margin-left: 0; }
  .tm-search { max-width: none; }
  .tm-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-drawer__form { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 94dvh; border-radius: var(--r-2xl) var(--r-2xl) 0 0; transform: translateY(32px); }
  .tm-drawer__foot { border-radius: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .tm-area { grid-template-columns: 32px minmax(0, 1fr); }
  .tm-lvl { grid-column: 1 / -1; width: 100%; } .tm-lvl__b { flex: 1; }
  .tm-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-drawer__form, .tm-drawer__scrim { transition: none; }
  .tm-row.is-flash { animation: none; }
}


/* No View analytics: the Profit column never shows (values are blanked server-side too) */
body.no-analytics .sheet [data-col="profit"] { display: none; }


/* ============================================================== 11. PASSMYTICKET ACTIVITY (pa) */
/* One status language for tasks, history and the drawer:
   ok = green · bad = red · live = claret (in flight) · otp = amber (verification)
   neutral = lookups / refreshes. Colour is a dot or an icon tint, never a fill. */
.pa { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.pa-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pa-head__text { max-width: 62ch; }
.pa-eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); }
.pa-title { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 600; font-stretch: var(--bos-stretch-display); letter-spacing: var(--tr-display); color: var(--tx-ink); }
.pa-lede { margin: 8px 0 0; color: var(--tx-3); line-height: 1.5; }
.pa-conn { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 13px; color: var(--tx-2); text-align: right; }
.pa-conn__row { display: inline-flex; align-items: center; gap: 8px; }
.pa-conn__row b { color: var(--tx-ink); font-weight: 500; }
.pa-conn__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tx-4); }
.pa-conn__dot.is-set { background: var(--ok-dot); box-shadow: 0 0 0 3px var(--ok-soft); }
.pa-conn__sub { font-size: 12px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.pa-conn__sub .is-bad { color: var(--bad-tx); }
.pa-conn__sub a { color: var(--ac-tx); }

.pa-panel { border-radius: var(--r-xl); background: var(--bg-surface); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); overflow: hidden; }
.pa-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--ln); flex-wrap: wrap; }
.pa-panel__title { display: flex; align-items: center; gap: 10px; }
.pa-panel__title h2 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--tx-ink); letter-spacing: -0.01em; }
.pa-count { font-size: 12.5px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.pa-panel__note { font-size: 12px; color: var(--tx-3); max-width: 56ch; }
.pa-livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--tx-4); transition: background var(--d-3) var(--ease); }
.pa-livedot.is-live { background: var(--ac); animation: pa-breathe 2.4s var(--ease) infinite; }
@keyframes pa-breathe { 0%, 100% { box-shadow: 0 0 0 0 var(--ac-soft-2); } 50% { box-shadow: 0 0 0 5px transparent; } }
.pa-live.is-down .pa-livedot { background: var(--bad-dot); }

/* ---- Nodes + status words (shared) */
.pa-node { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-muted); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln); }
.pa-node i { font-size: 14px; line-height: 1; }
.pa-node--ok   { background: var(--ok-soft);   color: var(--ok-tx);   box-shadow: inset 0 0 0 1px var(--ok-line); }
.pa-node--bad  { background: var(--bad-soft);  color: var(--bad-tx);  box-shadow: inset 0 0 0 1px var(--bad-line); }
.pa-node--live { background: var(--ac-soft);   color: var(--ac-tx);   box-shadow: inset 0 0 0 1px var(--ac-line); }
.pa-node--otp  { background: var(--warn-soft); color: var(--warn-tx); box-shadow: inset 0 0 0 1px var(--warn-line); }
.pa-node--xs { width: 22px; height: 22px; } .pa-node--xs i { font-size: 12px; }
.pa-task.is-active .pa-node i.ri-loader-4-line { animation: pa-spin 1.4s linear infinite; }
@keyframes pa-spin { to { transform: rotate(360deg); } }

.pa-status { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px 0 7px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; white-space: nowrap; color: var(--tx-2); box-shadow: inset 0 0 0 1px var(--ln); background: var(--bg-surface); }
.pa-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tx-4); }
.pa-status--ok::before { background: var(--ok-dot); }   .pa-status--ok { color: var(--ok-tx); }
.pa-status--bad::before { background: var(--bad-dot); } .pa-status--bad { color: var(--bad-tx); box-shadow: inset 0 0 0 1px var(--bad-line); }
.pa-status--live::before { background: var(--ac); }     .pa-status--live { color: var(--ac-tx); }
.pa-status--otp::before { background: var(--warn-dot); } .pa-status--otp { color: var(--warn-tx); }
.pa-status--warn::before { background: var(--warn-dot); } .pa-status--warn { color: var(--warn-tx); }

/* ---- Live tasks */
.pa-tasks { display: flex; flex-direction: column; }
.pa-task { border-bottom: 1px solid var(--ln-soft); transition: background var(--d-2) var(--ease); }
.pa-task:last-child { border-bottom: 0; }
.pa-task.is-active { background: color-mix(in oklab, var(--ac-soft) 35%, transparent); }
.pa-task__row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 150px auto; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; cursor: pointer; outline: none; }
.pa-task__row:hover { background: var(--bg-hover); }
.pa-task__row:focus-visible { box-shadow: inset 0 0 0 2px var(--ac-line); }
.pa-task__main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.pa-task__title { font-size: 13.5px; font-weight: 500; color: var(--tx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-task__sub { display: flex; gap: 10px; min-width: 0; font-size: 12px; color: var(--tx-3); }
.pa-task__sub > * + *::before { content: '·'; margin-right: 10px; color: var(--tx-4); }
.pa-task__time { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.pa-clock { font-size: 13px; font-weight: 500; color: var(--tx-ink); }
.pa-clock.is-long { color: var(--warn-tx); }
.pa-task__acts { display: flex; align-items: center; gap: 6px; }
.pa-task__chev { font-size: 17px; color: var(--tx-4); transition: transform var(--d-2) var(--ease); }
.pa-task.is-open .pa-task__chev { transform: rotate(180deg); color: var(--tx-2); }
.pa-task__warn, .pa-task__msg { display: flex; align-items: flex-start; gap: 6px; margin: -4px 18px 10px 60px; font-size: 12.5px; line-height: 1.45; color: var(--tx-2); overflow-wrap: anywhere; }
.pa-task__warn { color: var(--warn-tx); }
.pa-task__msg.is-bad { color: var(--bad-tx); }
.pa-task__detail { margin: 0 18px 14px 60px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--ln-soft); }
.pa-task__detail[hidden] { display: none; }

.pa-idle { display: flex; align-items: center; gap: 14px; padding: 18px 18px; color: var(--tx-3); font-size: 13px; }
.pa-idle > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.pa-idle strong { color: var(--tx-ink); font-weight: 500; }
.pa-idle__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-muted); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln); }
.pa-idle__icon i { font-size: 17px; }
.pa-idle.is-bad .pa-idle__icon { background: var(--bad-soft); color: var(--bad-tx); box-shadow: inset 0 0 0 1px var(--bad-line); }
.pa-idle.is-bad strong { color: var(--bad-tx); }
.pa-off { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--tx-3); font-size: 13px; }
.pa-off > i { font-size: 20px; }
.pa-off > div { display: flex; flex-direction: column; gap: 2px; }
.pa-off strong { color: var(--tx-ink); font-weight: 500; }
.pa-off a { color: var(--ac-tx); }

.pa-skel { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.pa-skel span { height: 14px; border-radius: 6px; background: var(--bg-muted); animation: lhx-pulse 1.2s var(--ease) infinite; }
.pa-skel span:first-child { width: 42%; } .pa-skel span:last-child { width: 68%; }
.pa-skel--sm { padding: 4px 0; }

/* ---- History toolbar */
.pa-new { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 500; color: var(--ac-tx); background: var(--ac-soft); box-shadow: inset 0 0 0 1px var(--ac-line); }
.pa-new[hidden] { display: none; }
.pa-tools { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--ln); flex-wrap: wrap; }
.pa-types { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.pa-type {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-md);
  font-size: 12.5px; font-weight: 500; color: var(--tx-2); white-space: nowrap;
  transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease), box-shadow var(--d-1) var(--ease);
}
.pa-type i { font-size: 14px; color: var(--tx-3); }
.pa-type:hover { background: var(--bg-hover); color: var(--tx-ink); }
.pa-type.is-on { background: var(--bg-surface); color: var(--tx-ink); box-shadow: inset 0 0 0 1px var(--ln-strong), var(--sh-xs); }
.pa-type.is-zero { color: var(--tx-4); }
.pa-type__n { font-size: 11px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.pa-type--ok i { color: var(--ok-tx); } .pa-type--bad i { color: var(--bad-tx); }
.pa-type--live i { color: var(--ac-tx); } .pa-type--otp i { color: var(--warn-tx); }
.pa-type--bad .pa-type__n { color: var(--bad-tx); }
.pa-search { flex: 0 1 280px; min-width: 180px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; border-radius: var(--r-md); background: var(--bg-muted); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln-soft); margin: 0; }
.pa-search:focus-within { background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln-focus), var(--ring); }
.pa-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 13px var(--font); color: var(--tx-ink); }
.pa-kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; font-size: 10.5px; color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--ln); }
.pa-search:focus-within .pa-kbd { display: none; }
.pa-reset, .pa-clear { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: transparent; font: 500 12.5px var(--font); color: var(--tx-2); cursor: pointer; }
.pa-reset:hover { background: var(--bg-hover); color: var(--tx-ink); }
.pa-clear { color: var(--tx-3); }
.pa-clear:hover { background: var(--bad-soft); color: var(--bad-tx); }

/* ---- History table */
.pa-table-wrap { overflow-x: auto; }
.pa-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; min-width: 860px; }
.pa-table thead th {
  position: sticky; top: var(--sticky-top, 0); z-index: 1; padding: 9px 12px; text-align: left; background: var(--bg-subtle);
  font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3);
  border-bottom: 1px solid var(--ln);
}
.pa-table thead th:first-child { padding-left: 18px; }
.pa-table td { padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid var(--ln-soft); color: var(--tx); }
.pa-table td:first-child { padding-left: 18px; }
.pa-table tr:last-child td { border-bottom: 0; }
.pa-c-when { width: 100px; } .pa-c-act { width: 178px; } .pa-c-order { width: auto; } .pa-c-to { width: 17%; }
.pa-c-out { width: 23%; } .pa-c-user { width: 92px; } .pa-c-go { width: 30px; text-align: right; }
.pa-cell2 .pa-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-row { cursor: pointer; outline: none; transition: background var(--d-1) var(--ease); }
.pa-row:hover td { background: var(--bg-hover); }
.pa-row:focus-visible td { background: var(--bg-hover); box-shadow: inset 0 1px 0 var(--ac-line), inset 0 -1px 0 var(--ac-line); }
.pa-row.is-selected td { background: var(--bg-selected); }
.pa-row.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--ac); }
.pa-row.has-problem td:first-child { box-shadow: inset 2px 0 0 var(--bad); }
.pa-row .pa-c-go i { font-size: 16px; color: var(--tx-4); transition: transform var(--d-2) var(--ease), color var(--d-1) var(--ease); }
.pa-row:hover .pa-c-go i { color: var(--tx-ink); transform: translateX(2px); }
time[data-dt] { display: flex; flex-direction: column; line-height: 1.3; font-variant-numeric: tabular-nums; }
.pa-when__t { font-size: 13px; color: var(--tx-ink); font-weight: 500; }
.pa-when__d { font-size: 11.5px; color: var(--tx-3); }
.pa-act { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--tx-ink); white-space: nowrap; }
.pa-act i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 13px; color: var(--tx-3); background: var(--bg-muted); }
.pa-act--ok i { color: var(--ok-tx); background: var(--ok-soft); }
.pa-act--bad i { color: var(--bad-tx); background: var(--bad-soft); }
.pa-act--live i { color: var(--ac-tx); background: var(--ac-soft); }
.pa-act--otp i { color: var(--warn-tx); background: var(--warn-soft); }
.pa-cell2 { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.pa-event { font-weight: 500; color: var(--tx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-sub { font-size: 12px; color: var(--tx-3); }
.pa-mono { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; letter-spacing: -0.01em; }
.pa-trunc { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-c-to .pa-trunc { color: var(--tx-2); }
.pa-out { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pa-msg { min-width: 0; flex: 1; font-size: 12px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-row.has-problem .pa-msg { color: var(--bad-tx); }
.pa-proof { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: var(--ok-tx); background: var(--ok-soft); }
.pa-proof:hover { box-shadow: inset 0 0 0 1px var(--ok-line); }
.pa-user { font-size: 12.5px; color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.pa-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 18px; border-top: 1px solid var(--ln); background: var(--bg-subtle); }
.pa-page { font-size: 12.5px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.pa-page b { color: var(--tx-ink); font-weight: 500; }
.pa-pagebtn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-md); font-size: 12.5px; font-weight: 500; color: var(--tx-2); box-shadow: inset 0 0 0 1px var(--ln); background: var(--bg-surface); }
.pa-pagebtn:hover { color: var(--tx-ink); box-shadow: inset 0 0 0 1px var(--ln-strong); }
.pa-pagebtn.is-off { opacity: .4; pointer-events: none; }

.pa-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 52px 20px; text-align: center; color: var(--tx-3); font-size: 13px; }
.pa-empty i { font-size: 22px; color: var(--tx-4); margin-bottom: 4px; }
.pa-empty strong { color: var(--tx-ink); font-weight: 600; font-size: 14px; }
.pa-empty a { color: var(--ac-tx); }

/* ---- Buttons & bits */
.pa-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 0; border-radius: var(--r-md); background: var(--bg-surface); color: var(--tx-2); font: 500 12.5px var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--ln); white-space: nowrap; transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease); }
.pa-btn:hover { color: var(--tx-ink); box-shadow: inset 0 0 0 1px var(--ln-strong); }
.pa-btn[disabled] { opacity: .4; cursor: default; }
.pa-btn i { font-size: 14px; }
.pa-btn--sm { height: 26px; padding: 0 8px; font-size: 12px; }
.pa-iconbtn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--tx-3); cursor: pointer; }
.pa-iconbtn i { font-size: 18px; }
.pa-iconbtn:hover { background: var(--bg-hover); color: var(--tx-ink); }
.pa-iconbtn:focus-visible, .pa-btn:focus-visible { outline: none; box-shadow: var(--ring-tight); }
.pa-copy { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 6px; border: 0; border-radius: 5px; background: transparent; color: var(--tx-4); cursor: pointer; vertical-align: -5px; }
.pa-copy:hover { background: var(--bg-hover); color: var(--tx-ink); }
.pa-copy i { font-size: 13px; }
.pa-grow { flex: 1; }
.pa-kv { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 13px; }
.pa-kv dt { color: var(--tx-3); }
.pa-kv dd { margin: 0; min-width: 0; color: var(--tx-ink); overflow-wrap: anywhere; }

/* ---- Drawer */
html.pa-lock { overflow: hidden; }
.pa-drawer { position: fixed; inset: 0; z-index: 80; }
.pa-drawer[hidden] { display: none; }
.pa-drawer__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--d-3) var(--ease); }
.pa-drawer.is-in .pa-drawer__scrim { opacity: .55; }
.pa-drawer__panel {
  position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(520px, calc(100vw - 16px));
  display: flex; flex-direction: column; border-radius: var(--r-2xl); background: var(--bg-canvas); box-shadow: var(--sh-modal);
  transform: translateX(24px); opacity: 0; transition: transform var(--d-4) var(--ease-out), opacity var(--d-3) var(--ease);
}
.pa-drawer.is-in .pa-drawer__panel { transform: none; opacity: 1; }
.pa-drawer__head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 14px 20px; border-bottom: 1px solid var(--ln); }
.pa-drawer__head .pa-node { width: 34px; height: 34px; } .pa-drawer__head .pa-node i { font-size: 16px; }
.pa-drawer__headtext { flex: 1; min-width: 0; }
.pa-drawer__headtext h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--tx-ink); font-stretch: var(--bos-stretch-display); letter-spacing: var(--tr-title); }
.pa-drawer__headtext p { margin: 2px 0 0; font-size: 12.5px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.pa-drawer__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 24px; scrollbar-width: thin; scrollbar-color: var(--ln-strong) transparent; }
.pa-drawer__foot { display: flex; align-items: center; gap: 6px; padding: 12px 14px 12px 20px; border-top: 1px solid var(--ln); background: var(--bg-subtle); border-radius: 0 0 var(--r-2xl) var(--r-2xl); }
.pa-sec { padding: 16px 0; border-bottom: 1px solid var(--ln-soft); }
.pa-sec:last-child { border-bottom: 0; }
.pa-sec h3 { margin: 0 0 10px; font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); }
.pa-sec--out { margin: 16px 0 0; padding: 14px; border-radius: var(--r-lg); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln); border-bottom: 0; }
.pa-sec--out.is-ok { box-shadow: inset 0 0 0 1px var(--ok-line); }
.pa-sec--out.is-bad { box-shadow: inset 0 0 0 1px var(--bad-line); background: color-mix(in oklab, var(--bad-soft) 45%, var(--bg-surface)); }
.pa-sec--out.is-warn { box-shadow: inset 0 0 0 1px var(--warn-line); }
.pa-out-big { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pa-out-msg { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--tx-ink); overflow-wrap: anywhere; }
.pa-err { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-canvas); box-shadow: inset 0 0 0 1px var(--bad-line); color: var(--bad-tx); font: 400 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.pa-flag { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--warn-tx); }
.pa-mini { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12.5px; }
.pa-mini th { padding: 6px 8px; text-align: left; font-size: 10.5px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); border-bottom: 1px solid var(--ln); }
.pa-mini td { padding: 7px 8px; border-bottom: 1px solid var(--ln-soft); color: var(--tx-ink); }
.pa-steps, .pa-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pa-steps li { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); align-items: baseline; gap: 8px; font-size: 12.5px; }
.pa-steps li i { font-size: 14px; } .pa-steps li.is-ok i { color: var(--ok-tx); } .pa-steps li.is-bad i { color: var(--bad-tx); }
.pa-steps .pa-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-notes li { font-size: 12.5px; color: var(--tx-2); padding-left: 12px; position: relative; }
.pa-notes li::before { content: ''; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--tx-4); }
.pa-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.pa-timeline::before { content: ''; position: absolute; left: 10.5px; top: 12px; bottom: 12px; width: 1px; background: var(--ln); }
.pa-timeline li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 6px 0; }
.pa-timeline .pa-node { box-shadow: inset 0 0 0 1px var(--ln), 0 0 0 3px var(--bg-canvas); }
.pa-timeline li.is-here .pa-tl__top b { color: var(--ac-tx); }
.pa-tl__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pa-tl__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--tx-ink); }
.pa-tl__top b { font-weight: 500; }
.pa-tl__main .pa-sub { overflow-wrap: anywhere; }
.pa-here { font-size: 11px; color: var(--ac-tx); }
.pa-rel__note { margin: 8px 0 0; }
.pa-tech summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 500; color: var(--tx-2); }
.pa-tech summary::-webkit-details-marker { display: none; }
.pa-tech summary i { font-size: 15px; color: var(--tx-3); }
.pa-tech[open] summary { color: var(--tx-ink); }
.pa-json { margin: 10px 0 0; max-height: 360px; overflow: auto; padding: 12px; border-radius: var(--r-md); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln); font: 400 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--tx); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Small screens */
@media (max-width: 900px) {
  .pa-conn { align-items: flex-start; text-align: left; }
  .pa-task__row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .pa-task__row > .pa-status { grid-column: 2; justify-self: start; }
  .pa-task__time { grid-column: 3; grid-row: 1; }
  .pa-task__acts { grid-column: 2 / -1; }
  .pa-task__warn, .pa-task__msg, .pa-task__detail { margin-left: 18px; }
  .pa-search { flex: 1 1 100%; }
  .pa-task__chev { display: none; }
  .pa-task__acts:not(:has(.pa-btn)) { display: none; }
}
@media (max-width: 640px) {
  .pa-title { font-size: 24px; }
  .pa-drawer__panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92dvh; border-radius: var(--r-2xl) var(--r-2xl) 0 0; transform: translateY(32px); }
  .pa-drawer__foot { border-radius: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .pa-kv { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pa-livedot.is-live, .pa-task.is-active .pa-node i.ri-loader-4-line { animation: none; }
  .pa-drawer__panel, .pa-drawer__scrim { transition: none; }
}

/* pa: spacing fixes — row arrow gets the same 18px edge as the first column;
   toolbar = types on one line, search + reset + clear on the next. */
.pa-table thead th:last-child, .pa-table td:last-child { padding-right: 18px; }
.pa-table .pa-c-go { width: 48px; padding-left: 0; text-align: right; }
.pa-row .pa-c-go i { display: inline-block; vertical-align: middle; }
.pa-tools { row-gap: 10px; padding: 12px 18px; }
.pa-types { flex: 1 1 100%; }
.pa-search { flex: 0 1 320px; }
.pa-clear { margin-left: auto; }
.pa-panel__head, .pa-pager { padding-left: 18px; padding-right: 18px; }

/* ============================================================== 12. SETTINGS (st) — refinement */
/* Same layout; tighter rhythm. Rows: 36px icon · name / description / meta ·
   right-aligned control column. Status = small dot pill, one height. */
.st { max-width: 860px; gap: 26px; }
.st-group__title { margin: 0 0 8px 2px; font-size: 11px; font-weight: 500; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--tx-3); }
.st-card { background: var(--bg-surface); border: 0; border-radius: var(--r-xl); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); }
.st-row { gap: 14px; min-height: 68px; padding: 14px 16px 14px 18px; border-bottom: 1px solid var(--ln-soft); color: var(--tx-ink); transition: background var(--d-1) var(--ease); }
.st-row__text { gap: 2px; }
.st-row__name { font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; color: var(--tx-ink); }
.st-row__desc { font-size: 12.5px; line-height: 1.45; color: var(--tx-3); max-width: 58ch; }
.st-row__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 4px; min-width: 0;
  font-size: 12px; color: var(--tx-2); font-variant-numeric: tabular-nums;
}
.st-row__meta b { font-weight: 500; color: var(--tx-ink); }
.st-row__meta > * + *::before { content: '·'; margin-right: 8px; color: var(--tx-4); }
.st-row__meta.is-bad { display: block; color: var(--bad-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60ch; }
.st-row__control { gap: 10px; }

.st-ico { width: 34px; height: 34px; border-radius: var(--r-md); background: var(--bg-muted); color: var(--tx-2); box-shadow: inset 0 0 0 1px var(--ln-soft); transition: color var(--d-1) var(--ease), background var(--d-1) var(--ease); }
.st-ico i { font-size: 17px; line-height: 1; }

/* Clickable rows: whole row highlights; arrow nudges; Manage lifts */
.st-row--link:hover, .st-int > summary:hover { background: var(--bg-hover); }
.st-row--link:hover .st-ico, .st-int > summary:hover .st-ico { color: var(--tx-ink); }
.st-row--link:focus-visible, .st-int > summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ac-line); }
.st-go { display: grid; place-items: center; width: 28px; height: 28px; color: var(--tx-4); transition: transform var(--d-2) var(--ease), color var(--d-1) var(--ease); }
.st-go i { font-size: 18px; }
.st-row--link:hover .st-go { color: var(--tx-ink); transform: translateX(2px); }

/* Status pills: one size everywhere */
.st-pill { height: 22px; padding: 0 9px 0 8px; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--tx-3); background: transparent; box-shadow: inset 0 0 0 1px var(--ln); }
.st-pill::before { width: 6px; height: 6px; opacity: 1; background: var(--tx-4); }
.st-pill--ok { color: var(--ok-tx); background: transparent; box-shadow: inset 0 0 0 1px var(--ok-line); }
.st-pill--ok::before { background: var(--ok-dot); }
.st-pill--warn { color: var(--warn-tx); background: transparent; box-shadow: inset 0 0 0 1px var(--warn-line); }
.st-pill--warn::before { background: var(--warn-dot); }
.st-pill--bad { color: var(--bad-tx); background: transparent; box-shadow: inset 0 0 0 1px var(--bad-line); }
.st-pill--bad::before { background: var(--bad-dot); }

/* Manage / Connect */
.st-manage {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px 0 11px; border: 0; border-radius: var(--r-md);
  font-size: 12.5px; font-weight: 500; color: var(--tx-2); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--ln);
  transition: color var(--d-1) var(--ease), box-shadow var(--d-1) var(--ease), background var(--d-1) var(--ease);
}
.st-manage i { font-size: 15px; color: var(--tx-3); transition: transform var(--d-2) var(--ease); }
.st-int > summary:hover .st-manage { color: var(--tx-ink); box-shadow: inset 0 0 0 1px var(--ln-strong); }
.st-int[open] .st-manage { background: var(--bg-muted); color: var(--tx-ink); box-shadow: inset 0 0 0 1px var(--ln-strong); }
.st-int[open] .st-manage i { transform: rotate(180deg); }
.st-int[open] > summary { background: var(--bg-subtle); }

/* Expanded body: aligned to the text column, on a quiet sunk surface */
.st-int__body { padding: 16px 18px 16px 66px; gap: 14px; background: var(--bg-subtle); border-top: 1px solid var(--ln-soft); animation: st-open var(--d-3) var(--ease-out) both; }
@keyframes st-open { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.st-int[open] > summary { border-bottom: 0 !important; }
.st-fields { gap: 12px 14px; }
.st-int__body .field__label { font-size: 12.5px; font-weight: 500; color: var(--tx-2); }
.st-int__body .field__input { background: var(--bg-surface); }
.st-int__body .field__hint { font-size: 11.5px; color: var(--tx-3); }
.st-note { font-size: 12px; line-height: 1.5; color: var(--tx-3); }
.st-actions { gap: 8px; padding-top: 12px; border-top: 1px solid var(--ln-soft); }
.st-danger { color: var(--bad-tx) !important; }
.st-danger:hover { background: var(--bad-soft) !important; }

/* Currency: custom select with its own chevron */
.st-selwrap { position: relative; display: inline-flex; align-items: center; }
.st-selwrap i { position: absolute; right: 10px; pointer-events: none; font-size: 16px; color: var(--tx-3); }
.st-select {
  appearance: none; -webkit-appearance: none; min-width: 236px; height: 34px; padding: 0 34px 0 12px;
  border: 0; border-radius: var(--r-md); background: var(--bg-surface); color: var(--tx-ink); font: 500 13px var(--font);
  box-shadow: inset 0 0 0 1px var(--ln-strong); cursor: pointer; transition: box-shadow var(--d-1) var(--ease);
}
.st-select:hover { box-shadow: inset 0 0 0 1px var(--tx-4); }
.st-select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ln-focus), var(--ring); }

/* Inventory style: segmented control */
.st-seg { padding: 3px; gap: 2px; border: 0; border-radius: var(--r-lg); background: var(--bg-muted); box-shadow: inset 0 0 0 1px var(--ln-soft); }
.st-seg__opt span { display: block; height: 28px; line-height: 28px; padding: 0 14px; border-radius: var(--r-md); font-size: 12.5px; font-weight: 500; color: var(--tx-2); transition: background var(--d-1) var(--ease), color var(--d-1) var(--ease), box-shadow var(--d-1) var(--ease); }
.st-seg__opt:hover span { color: var(--tx-ink); }
.st-seg__opt input:checked + span { background: var(--bg-surface); color: var(--tx-ink); box-shadow: 0 0 0 1px var(--ln), var(--sh-xs); }
.st-seg__opt input:focus-visible + span { outline: none; box-shadow: var(--ring-tight); }

/* Toggles: match the kit switch (claret when on) */
.st-toggles { gap: 2px; margin-top: 0; }
.st-int__body .st-hint + .st-toggles,
.st-int__body .st-toggles { margin-top: 6px; }
.st-toggle { gap: 10px; min-height: 36px; padding: 4px 8px; margin: 0 -8px; border-radius: var(--r-md); font-size: 13px; color: var(--tx); transition: background var(--d-1) var(--ease); }
.st-toggle:hover { background: var(--bg-hover); }
.st-toggle__ui { width: 32px; height: 18px; border-radius: 99px; background: var(--ln-strong); position: relative; flex-shrink: 0; transition: background var(--d-2) var(--ease); }
.st-toggle__ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--d-2) var(--ease-out); }
.st-toggle input:checked + .st-toggle__ui { background: var(--ac); }
.st-toggle input:checked + .st-toggle__ui::after { transform: translateX(14px); }
.st-toggle input:focus-visible + .st-toggle__ui { outline: none; box-shadow: var(--ring-tight); }
.st-hour { min-height: 30px; height: 30px; padding: 0 26px 0 10px; border-radius: var(--r-sm); font-size: 12.5px; }

@media (max-width: 640px) {
  .st-row { min-height: 0; padding: 14px; }
  .st-int__body { padding: 14px; }
  .st-select { min-width: 0; width: 100%; }
  .st-selwrap { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .st-int__body { animation: none; } }
