/* public/lbox.css — v3.1193.0 (17 October 2026): THE HOUSE LISTBOX, THE SMALL MOTIONS, AND THE DARK-MODE LIFT
   (design brief A3, A7, A8; lane lb). Loaded after theme.css by every page that loads public/lbox.js.

   Darren, 17 Oct: "dropdowns shouldn't just be default and should be animated" · "Please adhere to this on all aspects".
   Darren, 3 Oct (v3.1137.0): every dropdown holds still — the field never changes its box. So: the trigger is a fixed
   height (--field-h) and a width that does not follow the choice; the list is a separate, position:fixed layer that
   fades and rises in (--dur-2, --ease-out) and leaves at 60% (--ease-in). ONLY opacity and transform animate here —
   nothing in this file transitions a height, width, padding, margin, top or left (test/v31193lb.test.mjs).
   Theme tokens only: no colour is typed in this file. */

/* ==== A3. THE LISTBOX ============================================================================================ */
/* The native select stays in the page as the value source, out of sight and out of the tab order. */
select.lb.lbx-native{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;
  padding:0!important;margin:0!important;border:0!important;opacity:0;pointer-events:none;overflow:hidden;clip-path:inset(50%)}

.lbx-trigger{display:inline-flex;align-items:center;gap:var(--sp-2);box-sizing:border-box;height:var(--field-h);max-width:100%;min-width:0;
  margin:0;padding:0 34px 0 11px;position:relative;vertical-align:middle;
  background:var(--s-raised,var(--panel-2));color:var(--ink);border:1px solid var(--line);border-radius:var(--rad-in);
  font-family:inherit;font-size:var(--field-size);font-weight:400;line-height:1.35;text-align:left;cursor:pointer;white-space:nowrap;
  transition:border-color var(--dur-1) var(--ease-out),box-shadow var(--dur-1) var(--ease-out)}
.lbx-trigger.lbx-block{display:flex;width:auto}
.lbx-trigger.lbx-sm{height:32px;font-size:var(--fs-sm);padding-right:30px}
.lbx-trigger:hover{border-color:var(--s-line-hover)}
.lbx-trigger:focus{outline:none}
.lbx-trigger:focus-visible,.lbx-trigger.lbx-open{border-color:var(--b-500);box-shadow:var(--s-focus)}
.lbx-trigger:disabled{opacity:.55;cursor:not-allowed}
.lbx-val{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:var(--sp-2);overflow:hidden}
.lbx-val .lbx-lab{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lbx-ph{color:var(--s-muted);overflow:hidden;text-overflow:ellipsis}
.lbx-chev{position:absolute;right:11px;top:50%;width:16px;height:16px;margin-top:-8px;fill:none;stroke:var(--s-muted);stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;transition:transform var(--dur-2) var(--ease-out)}
.lbx-trigger.lbx-open .lbx-chev{transform:rotate(180deg)}
/* Multi: the chosen ones as chips, on ONE line inside the same fixed box ("+2" when they do not fit). */
.lbx-chip{display:inline-flex;align-items:center;gap:4px;max-width:140px;height:24px;padding:0 4px 0 9px;border-radius:var(--rad-pill);
  background:var(--s-accent-soft);color:var(--blue-ink);font-size:var(--fs-xs);font-weight:600;flex:0 1 auto;min-width:0}
.lbx-chipt{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lbx-unchip{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:14px;line-height:1;
  color:var(--blue-ink);transition:background-color var(--dur-1) var(--ease-out)}
.lbx-unchip:hover{background:var(--s-panel)}
.lbx-more{font-size:var(--fs-xs);font-weight:700;color:var(--s-muted);flex:0 0 auto}

/* The panel: a separate layer over the page. */
.lbx-panel{position:fixed;z-index:10100;display:flex;flex-direction:column;box-sizing:border-box;min-width:160px;max-height:320px;
  background:var(--s-panel);color:var(--ink);border:1px solid var(--s-line);border-radius:var(--rad);box-shadow:var(--sh-3);
  padding:var(--sp-1);overflow:hidden;opacity:0;transform:translateY(var(--rise));transform-origin:top center;
  transition:opacity var(--dur-2) var(--ease-out),transform var(--dur-2) var(--ease-out)}
.lbx-panel.lbx-up{transform:translateY(calc(var(--rise) * -1));transform-origin:bottom center}
.lbx-panel.lbx-in{opacity:1;transform:none}
.lbx-panel.lbx-out{opacity:0;pointer-events:none;
  transition:opacity calc(var(--dur-2) * .6) var(--ease-in),transform calc(var(--dur-2) * .6) var(--ease-in)}
.lbx-filter{flex:0 0 auto;padding:var(--sp-1) var(--sp-1) var(--sp-2)}
.lbx-filter .search-field{width:100%;display:flex}
.lbx-list{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;outline:none;min-height:0}
.lbx-opt{display:flex;align-items:center;gap:var(--sp-2);min-height:36px;box-sizing:border-box;padding:0 10px;border-radius:var(--rad-sm);
  cursor:pointer;font-size:var(--field-size);color:var(--ink);white-space:nowrap;
  transition:background-color var(--dur-1) var(--ease-out)}
.lbx-opt[hidden],.lbx-group[hidden]{display:none}
.lbx-opt .lbx-lab{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;line-height:1.25;padding:5px 0}
.lbx-sub{font-size:var(--fs-xs);color:var(--s-muted);overflow:hidden;text-overflow:ellipsis}
.lbx-opt:hover,.lbx-opt.lbx-act{background:var(--s-sunk)}
.lbx-opt[aria-selected="true"]{background:var(--s-accent-soft)}
.lbx-opt[aria-selected="true"].lbx-act{background:color-mix(in srgb,var(--s-accent-soft) 90%,var(--b-500))}
.lbx-opt[aria-disabled="true"]{opacity:.5;cursor:not-allowed}
.lbx-tick{flex:0 0 auto;width:16px;height:16px;fill:none;stroke:var(--blue-ink);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:0;
  transition:opacity var(--dur-1) var(--ease-out)}
.lbx-opt[aria-selected="true"] .lbx-tick{opacity:1}
.lbx-opt[aria-selected="true"] .lbx-lab{font-weight:600}
.lbx-group{padding:var(--sp-3) 10px var(--sp-1);font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--s-muted)}
.lbx-group:first-child{padding-top:var(--sp-1)}
.lbx-opt .lbx-blank{color:var(--s-muted);font-style:italic}
/* The public event pages draw their fields at 42px and the page's own size: the trigger matches its neighbours. */
.evp .lbx-trigger{height:42px;font-size:inherit}
.lbx-none{margin:0;padding:10px 12px;color:var(--s-muted);font-size:var(--fs-sm)}
/* Rich options: a status with its dot, a person with initials. */
.lbx-dot{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--lbx-dot,var(--s-muted))}
.lbx-ini{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;
  background:var(--s-accent-soft);color:var(--blue-ink);font-size:10px;font-style:normal;font-weight:700;letter-spacing:.02em}
/* Multi: the tick box draws its tick (A7). */
.lbx-cb{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;box-sizing:border-box;
  border:1.5px solid var(--s-line-hover);border-radius:5px;background:var(--s-panel);
  transition:background-color var(--dur-1) var(--ease-out),border-color var(--dur-1) var(--ease-out)}
.lbx-cb svg{width:14px;height:14px;fill:none;stroke:var(--s-hero-ink);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:22;stroke-dashoffset:22;transition:stroke-dashoffset var(--dur-2) var(--ease-out)}
.lbx-opt[aria-selected="true"] .lbx-cb{background:var(--b-500);border-color:var(--b-500)}
.lbx-opt[aria-selected="true"] .lbx-cb svg{stroke-dashoffset:0}
.lbx-pmulti .lbx-opt[aria-selected="true"]{background:transparent}
.lbx-pmulti .lbx-opt[aria-selected="true"]:hover,.lbx-pmulti .lbx-opt[aria-selected="true"].lbx-act{background:var(--s-sunk)}
@media (max-width:700px){
  .lbx-opt{min-height:44px}
  /* The enquiry board's filters on a phone: two to a row at the full width, not four ragged widths. */
  .enq-filterbar>.lbx-trigger{flex:1 1 140px;width:auto!important;min-width:0}
  .lbx-trigger{font-size:16px}          /* under 16px an iPhone zooms in on focus */
}

/* ==== A7. THE SMALL MOTIONS ===================================================================================== */
/* Checkbox: the tick draws. The box is the house box (18px; 20px on a phone, as before) in the brand blue; the tick
   is drawn short leg first, then the long one, by a clip that opens across it (the tick is rotated, so the clip opening
   along its own axis traces the stroke). Nothing reflows; no cover layer, so a translucent dark panel cannot show a
   ghost tick through it. */
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb){-webkit-appearance:none;appearance:none;position:relative;
  display:inline-grid;place-content:center;box-sizing:border-box;width:18px!important;height:18px!important;min-width:18px!important;
  max-width:18px!important;min-height:0!important;padding:0!important;flex:0 0 auto;vertical-align:middle;cursor:pointer;
  background:var(--s-panel);border:1.5px solid var(--s-line-hover);border-radius:5px;
  transition:background-color var(--dur-1) var(--ease-out),border-color var(--dur-1) var(--ease-out),box-shadow var(--dur-1) var(--ease-out)}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb)::after{content:'';width:9px;height:5px;margin-top:-3px;
  border-left:2px solid var(--s-hero-ink);border-bottom:2px solid var(--s-hero-ink);transform:rotate(-45deg);
  opacity:0;clip-path:inset(0 100% 0 0);transition:clip-path var(--dur-2) var(--ease-out),opacity var(--dur-1) var(--ease-out)}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb):checked{background:var(--b-500);border-color:var(--b-500)}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb):checked::after{opacity:1;clip-path:inset(0 0 0 0)}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb):indeterminate{background:var(--b-500);border-color:var(--b-500)}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb):indeterminate::after{width:9px;height:0;margin-top:0;border-left:0;transform:none;opacity:1;clip-path:none}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb):hover{border-color:var(--b-500)}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb):focus-visible{outline:none;box-shadow:var(--s-focus)}
input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb):disabled{opacity:.5;cursor:not-allowed}
@media (max-width:600px){
  html body input[type=checkbox]:not([role=switch]):not([class*=switch]):not(.ag-emp-cb){width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important}
}
/* Toggle: the knob slides (a transform, --ease-move), the track takes the brand blue. */
.esf-cap input.esf-switch{transition:background-color var(--dur-1) var(--ease-out)}
.esf-cap input.esf-switch::after{left:3px;transition:transform var(--dur-1) var(--ease-move)}
.esf-cap input.esf-switch:checked{background:var(--b-500)}
.esf-cap input.esf-switch:checked::after{left:3px;transform:translateX(18px)}

/* Field focus: the ring fades in, the label over the field tints blue. */
input:where([type=text],[type=email],[type=password],[type=number],[type=search],[type=tel],[type=url],[type=date],[type=time],
  [type=datetime-local],[type=month],[type=week],:not([type])),textarea{
  transition:border-color var(--dur-1) var(--ease-out),box-shadow var(--dur-1) var(--ease-out)}
:is(.fld,.field,.bs-f,.bkg-sel)>span:first-child,label:has(>.lbx-trigger)>span:first-child{transition:color var(--dur-1) var(--ease-out)}
:is(.fld,.field,.bs-f,.bkg-sel):focus-within>span:first-child,label:has(>.lbx-trigger:focus-visible)>span:first-child,
label:has(>.lbx-trigger.lbx-open)>span:first-child{color:var(--blue-ink)}

/* Copy to clipboard: the button shows a tick for 1.5s (public/lbfx.js adds .lbx-copied). The box does not change —
   its own contents fade out and the tick sits over them. */
.lbx-copied{position:relative}
.lbx-copied>*{opacity:0;transition:opacity var(--dur-1) var(--ease-out)}
.lbx-copied::after{content:'';position:absolute;left:50%;top:50%;width:10px;height:5px;margin:-4px 0 0 -5px;
  border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);
  animation:lbx-pop var(--dur-2) var(--ease-out) both}
.lbx-copied.lbx-copied-text{color:transparent!important}
.lbx-copied.lbx-copied-text::after{border-color:var(--ok)}
@keyframes lbx-pop{from{opacity:0;transform:rotate(-45deg) scale(.4)}to{opacity:1;transform:rotate(-45deg) scale(1)}}

/* Sortable rows: the lifted row floats. */
tr.dragging,.dragging{box-shadow:var(--sh-3);transform:scale(1.02);opacity:1;position:relative;z-index:2}
tr.dragging td{background:var(--s-panel)}
[draggable="true"]{transition:transform var(--dur-1) var(--ease-out),box-shadow var(--dur-1) var(--ease-out)}

/* Upload: a progress bar in the brand blue on the sunk surface, not a spinner. */
progress{-webkit-appearance:none;appearance:none;height:8px;border:0;border-radius:var(--rad-pill);background:var(--s-sunk);overflow:hidden;
  vertical-align:middle;color:var(--b-500)}
progress::-webkit-progress-bar{background:var(--s-sunk);border-radius:var(--rad-pill)}
progress::-webkit-progress-value{background:var(--b-500);border-radius:var(--rad-pill)}
progress::-moz-progress-bar{background:var(--b-500);border-radius:var(--rad-pill)}
.lbx-upbar{display:block;height:6px;border-radius:var(--rad-pill);background:var(--s-sunk);overflow:hidden}
.lbx-upbar>i{display:block;height:100%;width:100%;background:var(--b-500);border-radius:inherit;transform-origin:left center;
  transform:scaleX(var(--lbx-up,0));transition:transform var(--dur-2) var(--ease-out)}

/* The membership tier hero: one slow sheen across it on first paint, then still (public/lbfx.js adds .lbx-sheen once). */
.edge-hero.lbx-sheen::after{content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 30%,color-mix(in srgb,var(--s-hero-ink) 16%,transparent) 50%,transparent 70%);
  transform:translateX(-100%);animation:lbx-sheen 2s var(--ease-out) .3s 1 both}
@keyframes lbx-sheen{from{transform:translateX(-100%)}to{transform:translateX(100%)}}

/* Table rows: a wash on hover, and the row's own actions fade in on the right — hidden until hover on a desktop (and
   shown whenever the row holds focus), always shown on a touch screen. */
.tbl tbody tr,table.list tbody tr{transition:background-color var(--dur-1) var(--ease-out)}
.tbl tbody tr:hover,table.list tbody tr:hover{background:var(--s-sunk)}
@media (hover:hover) and (pointer:fine){
  tr .row-acts,tr .doc-acts{opacity:0;transition:opacity var(--dur-2) var(--ease-out)}
  tr:hover .row-acts,tr:focus-within .row-acts,tr:hover .doc-acts,tr:focus-within .doc-acts{opacity:1}
}
td.row-acts{text-align:right;white-space:nowrap}

/* Empty states: the icon rises and fades in, the words 60ms behind it. */
.empty-state .es-ico{animation:lbx-rise var(--dur-3) var(--ease-out) both}
.empty-state .es-text{animation:lbx-rise var(--dur-3) var(--ease-out) calc(var(--dur-1) / 2) both}
@keyframes lbx-rise{from{opacity:0;transform:translateY(var(--rise))}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  .lbx-panel,.lbx-panel.lbx-out,.lbx-chev,.lbx-cb svg,.lbx-upbar>i{transition:none}
  .edge-hero.lbx-sheen::after{animation:none;display:none}
  .empty-state .es-ico,.empty-state .es-text,.lbx-copied::after{animation:none}
  input[type=checkbox]::after{transition:none}
}

/* ==== A8. THE DARK-MODE LIFT ==================================================================================== */
/* A card in dark carries the 1px top highlight by default (it was only on hover, inside --sh-2). The highlight is the
   ink at 3%, so it is a token mix, not a typed colour. */
html:where([data-theme="dark"]) :is(.panel,.card,.stat){box-shadow:inset 0 1px 0 color-mix(in srgb,var(--s-ink) 3%,transparent),var(--sh-1)}
html[data-theme="dark"] .lbx-panel{box-shadow:inset 0 1px 0 color-mix(in srgb,var(--s-ink) 4%,transparent),var(--sh-3);background:var(--s-raised)}
html[data-theme="dark"] .lbx-opt:hover,html[data-theme="dark"] .lbx-opt.lbx-act{background:var(--s-line-2)}
html[data-theme="dark"] .lbx-pmulti .lbx-opt[aria-selected="true"]:hover,html[data-theme="dark"] .lbx-pmulti .lbx-opt[aria-selected="true"].lbx-act{background:var(--s-line-2)}
/* <mark> and the text selection are tokens in both themes. */
mark{background:var(--o-soft);color:var(--s-ink);border-radius:3px;padding:0 2px}
::selection{background:var(--b-100);color:var(--ink-brand)}
html[data-theme="dark"] ::selection{background:var(--b-800);color:var(--s-ink)}
