/* =====================================================================
   OneBloc UI Kit - shared control styles (LOCKED v1.1 - modern refresh).
   Framework-agnostic. Drops into WebForms, React, or static pages exactly
   like datagrid.css. Everything is scoped under .ob-* so it never collides
   with an app's own global styles. Themed by the OneBloc brand tokens
   (--ob-*) with self-contained fallbacks.

   v1.1 look: soft-tinted icon badges (not loud fills), hairline borders,
   generous rounding, quiet shadows. Controls: OBNotify (toasts + confirm/
   alert dialogs) - OBValidate (forms).
   v1.2 (2026-07-13) adds: drawer, skeleton/busy loading, empty states,
   switch, field/input conventions, money input alignment.
   v1.3 (2026-08-08) adds: OBTip tooltip + the .ob-help field-help icon.
   v1.4 (2026-08-19, css-only ERP sync) adds: card fold (.ob-fold/.obf-*,
   for ob-fold.js), long-table collapse (.lt-*, for ob-longtable.js),
   files-card rows (.ob-files/.of-*, wired to OBViewer by ob-longtable.js),
   and the line-editor picker cell (.obl-acc, OBLines v1.1 + OBPicker).
   ===================================================================== */

:root {
  --_ob-font: var(--ob-font, "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  --_ob-card: var(--ob-card, #ffffff);
  --_ob-ink: var(--ob-ink, #14161F);
  --_ob-muted: var(--ob-muted, #6B7180);
  --_ob-faint: var(--ob-faint, #A6ABBA);
  --_ob-line: var(--ob-line, #EDEEF3);
  --_ob-ok: var(--ob-success, #0E9F6E);
  --_ob-ok-soft: var(--ob-success-soft, #E9F8F1);
  --_ob-bad: var(--ob-danger, #E5484D);
  --_ob-bad-soft: var(--ob-danger-soft, #FDECEC);
  --_ob-warn: var(--ob-warning, #C4841D);
  --_ob-warn-soft: var(--ob-warning-soft, #FCF3E4);
  --_ob-info: var(--ob-billing, #2563EB);
  --_ob-info-soft: #EAF1FF;
  --_ob-accent: var(--ob-accent, #6366F1);
  --_ob-r: var(--ob-r-control, 14px);
  --_ob-shadow: var(--ob-shadow-float, 0 12px 32px -8px rgba(20,22,31,.16), 0 4px 10px -4px rgba(20,22,31,.08));
}

/* ============================ NOTIFY: toasts ============================ */
.ob-toastwrap {
  position: fixed; top: 20px; right: 20px; z-index: 2147483000;
  display: flex; flex-direction: column; gap: 12px;
  width: min(392px, calc(100vw - 32px)); pointer-events: none;
  font-family: var(--_ob-font);
}
.ob-toastwrap.tl { right: auto; left: 20px; }
.ob-toastwrap.bl { top: auto; bottom: 20px; right: auto; left: 20px; }
.ob-toastwrap.br { top: auto; bottom: 20px; }
.ob-toastwrap.tc { left: 50%; right: auto; transform: translateX(-50%); align-items: center; }

.ob-toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--_ob-card); color: var(--_ob-ink);
  border: 1px solid var(--_ob-line);
  border-radius: 16px; box-shadow: var(--_ob-shadow);
  padding: 14px 15px 15px 14px;
  transform: translateX(24px); opacity: 0;
  transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .3s;
}
.ob-toastwrap.tl .ob-toast, .ob-toastwrap.bl .ob-toast { transform: translateX(-24px); }
.ob-toast.in { transform: none; opacity: 1; }
.ob-toast.out { opacity: 0; transform: translateY(-6px) scale(.98); transition: opacity .18s, transform .18s; }

/* soft-tinted icon badge (the modern accent — carries the semantic colour) */
.ob-toast .ic { flex: 0 0 auto; width: 34px; height: 34px; padding: 7px; border-radius: 11px; }
.ob-toast .bd { flex: 1; min-width: 0; padding-top: 1px; }
.ob-toast .tt { font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; margin: 0 0 2px; }
.ob-toast .ms { font-size: 12.5px; line-height: 1.5; color: var(--_ob-muted); overflow-wrap: anywhere; }
.ob-toast .ms strong { color: var(--_ob-ink); font-weight: 600; }
.ob-toast .act { margin-top: 10px; display: flex; gap: 8px; }
.ob-toast .act button {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 6px 12px; border-radius: 9px; border: 1px solid var(--_ob-line); background: #fff; color: var(--_ob-ink);
}
.ob-toast .act button.primary { background: var(--_ob-ink); color: #fff; border-color: var(--_ob-ink); }
.ob-toast .x {
  flex: 0 0 auto; cursor: pointer; border: 0; background: transparent; color: var(--_ob-faint);
  width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; margin: 1px -2px 0 0;
}
.ob-toast .x:hover { background: rgba(20,22,31,.05); color: var(--_ob-muted); }
.ob-toast .bar { position: absolute; left: 14px; right: 14px; bottom: 9px; height: 3px; border-radius: 3px; transform-origin: left; opacity: .55; }

.ob-toast.ob-success .ic { color: var(--_ob-ok); background: var(--_ob-ok-soft); }
.ob-toast.ob-success .bar { background: var(--_ob-ok); }
.ob-toast.ob-error .ic { color: var(--_ob-bad); background: var(--_ob-bad-soft); }
.ob-toast.ob-error .bar { background: var(--_ob-bad); }
.ob-toast.ob-warn .ic { color: var(--_ob-warn); background: var(--_ob-warn-soft); }
.ob-toast.ob-warn .bar { background: var(--_ob-warn); }
.ob-toast.ob-info .ic { color: var(--_ob-info); background: var(--_ob-info-soft); }
.ob-toast.ob-info .bar { background: var(--_ob-info); }

/* ============================ NOTIFY: dialogs ============================ */
.ob-modal-scrim {
  position: fixed; inset: 0; z-index: 2147483200; display: flex; align-items: center; justify-content: center;
  background: rgba(20,22,31,.42); backdrop-filter: blur(3px); padding: 20px;
  opacity: 0; transition: opacity .18s; font-family: var(--_ob-font);
}
.ob-modal-scrim.in { opacity: 1; }
.ob-modal {
  background: var(--_ob-card); color: var(--_ob-ink); width: min(448px, 100%);
  border-radius: 20px; box-shadow: var(--_ob-shadow); overflow: hidden;
  transform: translateY(10px) scale(.975); transition: transform .22s cubic-bezier(.22,1,.36,1);
}
.ob-modal-scrim.in .ob-modal { transform: none; }
.ob-modal .hd { display: flex; gap: 14px; align-items: flex-start; padding: 24px 24px 4px; }
.ob-modal .hd .ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; }
.ob-modal .hd .ic svg { width: 22px; height: 22px; }
.ob-modal.danger .hd .ic { background: var(--_ob-bad-soft); color: var(--_ob-bad); }
.ob-modal.warn .hd .ic { background: var(--_ob-warn-soft); color: var(--_ob-warn); }
.ob-modal.info .hd .ic, .ob-modal.confirm .hd .ic { background: var(--_ob-info-soft); color: var(--_ob-info); }
.ob-modal.success .hd .ic { background: var(--_ob-ok-soft); color: var(--_ob-ok); }
.ob-modal .hd h3 { margin: 5px 0 0; font-size: 16.5px; font-weight: 720; letter-spacing: -.02em; }
.ob-modal .bd { padding: 10px 24px 4px 82px; font-size: 13.5px; line-height: 1.6; color: var(--_ob-muted); }
.ob-modal .bd.nohd { padding-left: 24px; }
.ob-modal .ft { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 24px 22px; }
.ob-modal .ft button { font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 11px 19px; border-radius: 11px; border: 1px solid var(--_ob-line); background: #fff; color: var(--_ob-ink); transition: filter .12s, border-color .12s, background .12s; }
.ob-modal .ft button:hover { border-color: #DADCE7; background: #FAFAFC; }
.ob-modal .ft button.primary { border: 0; background: var(--_ob-accent); color: #fff; }
.ob-modal.danger .ft button.primary { background: var(--_ob-bad); }
.ob-modal .ft button.primary:hover { filter: brightness(.95); background: var(--_ob-accent); }
.ob-modal.danger .ft button.primary:hover { background: var(--_ob-bad); }

/* ============================ VALIDATE ============================ */
.ob-field-err {
  display: none; align-items: center; gap: 5px;
  font-family: var(--_ob-font); font-size: 11.5px; font-weight: 500; color: var(--_ob-bad);
  margin-top: 6px;
}
.ob-field-err.show { display: flex; }
.ob-field-err svg { flex: 0 0 auto; width: 13px; height: 13px; }
.ob-invalid,
.ob-invalid:focus {
  border-color: var(--_ob-bad) !important;
  box-shadow: 0 0 0 3px var(--_ob-bad-soft) !important;
}

/* ============================ LINE EDITOR (OBLines) ============================ */
.obl { width: 100%; border-collapse: collapse; font-family: var(--_ob-font); font-size: 13px; }
.obl th { text-align: left; font-size: 11px; font-weight: 600; color: var(--_ob-faint); padding: 0 8px 8px; border-bottom: 1px solid var(--_ob-line); }
.obl th.obl-num, .obl td.obl-num { text-align: right; }
.obl td { padding: 5px 8px; border-bottom: 1px solid var(--_ob-line); vertical-align: middle; }
.obl .obl-in { width: 100%; padding: 8px 9px; border: 1px solid var(--_ob-line); border-radius: 8px; font: inherit; font-size: 12.5px; color: var(--_ob-ink); background: #fff; outline: none; }
.obl .obl-in:focus { border-color: var(--_ob-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_ob-accent) 14%, transparent); }
.obl input.obl-num { text-align: right; }
.obl td.obl-amt { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--_ob-ink); white-space: nowrap; }
.obl .obl-x { border: 0; background: transparent; color: var(--_ob-faint); font-size: 18px; line-height: 1; cursor: pointer; width: 26px; height: 26px; border-radius: 7px; }
.obl .obl-x:hover { background: var(--_ob-bad-soft); color: var(--_ob-bad); }
.obl-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.obl-add { border: 1px dashed #CBD0DC; background: #fff; color: var(--_ob-muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.obl-add:hover { border-color: var(--_ob-accent); color: var(--_ob-accent); }
.obl-tot { display: flex; gap: 18px; align-items: center; font-size: 12.5px; color: var(--_ob-muted); }
.obl-tot b { color: var(--_ob-ink); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 4px; }
.obl-tot .obl-ok { color: var(--_ob-ok); font-weight: 700; }
.obl-tot .obl-bad { color: var(--_ob-bad); font-weight: 700; }

/* ============================ DRAWER (v1.2) ============================ */
.ob-drawer-scrim {
  position: fixed; inset: 0; z-index: 2147483200;
  background: rgba(20,22,31,.42); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s; font-family: var(--_ob-font);
}
.ob-drawer-scrim.in { opacity: 1; }
.ob-drawer {
  position: absolute; top: 0; bottom: 0; max-width: calc(100vw - 40px);
  background: var(--_ob-card); color: var(--_ob-ink); box-shadow: var(--_ob-shadow);
  display: flex; flex-direction: column;
  transition: transform .26s cubic-bezier(.22,1,.36,1);
}
.ob-drawer.right { right: 0; border-radius: 18px 0 0 18px; transform: translateX(24px); }
.ob-drawer.left { left: 0; border-radius: 0 18px 18px 0; transform: translateX(-24px); }
.ob-drawer-scrim.in .ob-drawer { transform: none; }
.ob-drawer .hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--_ob-line); }
.ob-drawer .hd h3 { margin: 0; font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.ob-drawer .hd .x { cursor: pointer; border: 0; background: transparent; color: var(--_ob-faint); width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.ob-drawer .hd .x:hover { background: rgba(20,22,31,.05); color: var(--_ob-muted); }
.ob-drawer .bd { flex: 1; overflow-y: auto; padding: 18px 22px; font-size: 13.5px; line-height: 1.6; }
.ob-drawer .ft { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--_ob-line); }
.ob-drawer .ft button { font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 10px 17px; border-radius: 11px; border: 1px solid var(--_ob-line); background: #fff; color: var(--_ob-ink); }
.ob-drawer .ft button.primary { border: 0; background: var(--_ob-accent); color: #fff; }

/* ============================ LOAD (v1.2) ============================ */
.ob-skel { display: flex; flex-direction: column; gap: 10px; }
.ob-skel-line {
  height: 13px; border-radius: 7px;
  background: linear-gradient(90deg, var(--_ob-line) 25%, #F7F7FA 42%, var(--_ob-line) 60%);
  background-size: 220% 100%; animation: ob-shimmer 1.3s ease-in-out infinite;
}
@keyframes ob-shimmer { from { background-position: 130% 0; } to { background-position: -90% 0; } }
.ob-busy { position: relative; color: transparent !important; pointer-events: none; }
.ob-spin {
  position: absolute; inset: 0; margin: auto; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
  animation: ob-rotate .7s linear infinite;
}
@keyframes ob-rotate { to { transform: rotate(360deg); } }

/* ============================ EMPTY (v1.2) ============================ */
.ob-empty { font-family: var(--_ob-font); text-align: center; padding: 40px 20px; color: var(--_ob-muted); }
.ob-empty .art {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--_ob-line); color: var(--_ob-muted);
  display: flex; align-items: center; justify-content: center;
}
.ob-empty .art svg { width: 24px; height: 24px; }
.ob-empty.err .art { background: var(--_ob-bad-soft); color: var(--_ob-bad); }
.ob-empty .tt { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; color: var(--_ob-ink); }
.ob-empty .ms { margin: 0; font-size: 12.5px; line-height: 1.55; max-width: 340px; margin-inline: auto; }
.ob-empty .act {
  margin-top: 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--_ob-line); background: #fff; color: var(--_ob-ink);
}
.ob-empty .act:hover { border-color: #DADCE7; background: #FAFAFC; }

/* ============================ SWITCH (v1.2, CSS-only) ============================
   <label class="ob-switch"><input type="checkbox" /><span class="tr"></span> Label</label> */
.ob-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--_ob-font); font-size: 13.5px; color: var(--_ob-ink); user-select: none; }
.ob-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ob-switch .tr { flex: 0 0 auto; width: 40px; height: 23px; border-radius: 999px; background: #D6D9E4; position: relative; transition: background .16s; }
.ob-switch .tr::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20,22,31,.25); transition: transform .16s; }
.ob-switch input:checked + .tr { background: var(--_ob-accent); }
.ob-switch input:checked + .tr::after { transform: translateX(17px); }
.ob-switch input:focus-visible + .tr { box-shadow: 0 0 0 3px color-mix(in srgb, var(--_ob-accent) 22%, transparent); }
.ob-switch input:disabled + .tr { opacity: .5; }

/* ============================ FIELD (v1.2, CSS-only convention) ============================
   <div class="ob-field"><label for=...>Label</label><input class="ob-input" .../><p class="hint">...</p></div> */
.ob-field { font-family: var(--_ob-font); margin-bottom: 16px; }
.ob-field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--_ob-muted); margin-bottom: 6px; }
.ob-field .hint { margin: 6px 0 0; font-size: 11.5px; color: var(--_ob-faint); }
.ob-input {
  display: block; width: 100%; font: inherit; font-size: 13.5px; padding: 9px 12px;
  border: 1px solid var(--_ob-line); border-radius: 9px; background: #fff; color: var(--_ob-ink);
}
.ob-input:focus { outline: none; border-color: var(--_ob-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_ob-accent) 14%, transparent); }
input.ob-input[data-ob-money] { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================ TIP + FIELD HELP (v1.3) ============================
   The standard "explain a technical field" pattern: a .ob-help info icon beside the
   label, carrying data-ob-tip="…". OBTip shows the bubble on hover / focus / tap. */
.ob-help {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: -.18em;
  width: 15px; height: 15px; margin-left: 4px; padding: 0; cursor: help;
  border: 0; background: transparent; color: var(--_ob-faint, #A6ABBA);
  -webkit-appearance: none; appearance: none;
}
.ob-help::before {
  content: ""; width: 100%; height: 100%; background: currentColor;
  -webkit-mask: var(--_ob-help-i) center / contain no-repeat;
          mask: var(--_ob-help-i) center / contain no-repeat;
}
.ob-help:hover, .ob-help:focus-visible { color: var(--_ob-accent, #6366F1); outline: none; }
:root {
  /* clean outlined info glyph (Feather "info") — the simple ⓘ, tinted via currentColor mask */
  --_ob-help-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
}

.ob-tip {
  position: absolute; z-index: 2147483400; max-width: 260px; pointer-events: none;
  opacity: 0; transform: translateY(3px); transition: opacity .13s, transform .13s;
  font-family: var(--_ob-font); filter: drop-shadow(0 8px 20px rgba(20,22,31,.22));
}
.ob-tip.show { opacity: 1; transform: none; }
.ob-tip-in {
  background: var(--_ob-ink, #14161F); color: #fff; font-size: 12.5px; line-height: 1.5;
  padding: 9px 12px; border-radius: 10px; font-weight: 500;
}
.ob-tip-in strong { font-weight: 700; }
.ob-tip-in code { background: rgba(255,255,255,.16); padding: 1px 5px; border-radius: 5px; font-size: 11.5px; }
.ob-tip-arrow { position: absolute; bottom: -5px; width: 10px; height: 10px; background: var(--_ob-ink, #14161F); transform: rotate(45deg); border-radius: 0 0 3px 0; }
.ob-tip.below .ob-tip-arrow { bottom: auto; top: -5px; border-radius: 3px 0 0 0; }

@media (prefers-reduced-motion: reduce) {
  .ob-toast, .ob-toast.out, .ob-modal, .ob-modal-scrim, .ob-drawer, .ob-drawer-scrim { transition: opacity .01s !important; transform: none !important; }
  .ob-toast .bar { display: none; }
  .ob-skel-line { animation: none; }
  .ob-tip { transition: opacity .01s !important; transform: none !important; }
}

/* ══════════════════════════ v1.4 — document-page furniture (ERP sync) ══════════════════════════ */

/* ── Long-table collapse (ob-longtable.js) ────────────────────────────────────────────────────────
   A document's Lines table collapses to its first few rows past a threshold, so a 32-line renovation
   invoice opens at the same readable height as a 5-line one and the totals stay near the fold.
   The toggle row lives INSIDE the tbody so it inherits the table's own column widths and borders.
   `table.inv-tbl` is the opt-in class the script binds to. */
.inv-tbl .lt-toggle td { padding: 0; border-bottom: 1px solid var(--_ob-line); background: #FCFCFD; }
.lt-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--_ob-muted);
  transition: color .12s ease, background .12s ease;
}
.lt-btn:hover { color: var(--_ob-ink); background: #F6F8F7; }
.lt-btn .cv { font-size: 9px; line-height: 1; }
/* The hidden count, so "Show all" says how much is actually behind it. */
.lt-btn .lt-more {
  font-weight: 500; font-size: 11.5px; color: var(--_ob-muted);
  background: #F1F3F7; border-radius: 100px; padding: 2px 8px;
}

/* A printed financial document shows EVERY line — a collapsed table on paper would be a document that
   silently omits what it is billing for. */
@media print {
  .inv-tbl tbody tr[hidden] { display: table-row !important; }
  .inv-tbl .lt-toggle { display: none !important; }
}

/* ── Files card rows (host markup + OBViewer, wired by ob-longtable.js) ───────────────────────────
   The name is the viewer trigger; the two icons are the explicit alternatives. Kept ALWAYS VISIBLE
   rather than revealed on hover: the point of the icons is to offer a choice, and a choice you have to
   discover by hovering is not much of one. A document carries a handful of files, not a dense grid, so
   the extra ink costs little. */
.ob-files { display: flex; flex-direction: column; gap: 8px; }
.inv-file.ob-file { padding: 0; overflow: hidden; }
.of-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: none; border: 0; font: inherit; font-size: 13px;
  color: var(--_ob-ink); text-align: left; cursor: pointer;
}
.of-open .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-open .sz, .of-open .dt {
  color: var(--_ob-muted); font-size: 12px; white-space: nowrap;
  font-family: var(--ob-mono, ui-monospace, SFMono-Regular, Consolas, monospace); font-variant-numeric: tabular-nums;
}
.of-open:focus-visible { outline: 2px solid var(--_ob-accent); outline-offset: -2px; border-radius: 8px; }
.of-acts { display: flex; gap: 2px; flex: none; padding: 0 8px 0 4px; }
.of-ico {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 7px; color: var(--_ob-muted); text-decoration: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.of-ico:hover { background: #F1F3F7; border-color: #E1E4EA; color: var(--_ob-ink); }
.of-ico:focus-visible { outline: 2px solid var(--_ob-accent); outline-offset: 1px; }

/* ── Card fold (ob-fold.js) ───────────────────────────────────────────────────────────────────────
   A document section collapses by clicking its heading. Open by default — see the script for why that
   is not configurable. The chevron sits at the far right of the heading row, so it reads as belonging
   to the whole section rather than to the words. */
.ob-fold > .obf-head {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px;
  border-radius: 8px; margin: -4px -6px 12px; padding: 4px 6px;
  transition: background .12s ease;
}
.ob-fold > .obf-head:hover { background: #F6F8F7; }
.ob-fold > .obf-head:focus-visible { outline: 2px solid var(--_ob-accent); outline-offset: 1px; }
/* h3 carries its own bottom margin in the card; inside the fold header the flex gap does the spacing. */
.ob-fold > .obf-head > h3 { margin: 0 !important; }
.ob-fold > .obf-head > .obf-chev {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; color: var(--_ob-muted);
  transition: transform .16s ease, color .12s ease, background .12s ease;
}
.ob-fold > .obf-head:hover > .obf-chev { color: var(--_ob-ink); background: #EEF1F0; }
.ob-fold.obf-closed > .obf-head { margin-bottom: 0; }
.ob-fold.obf-closed > .obf-head > .obf-chev { transform: rotate(-90deg); }
.ob-fold.obf-closed > .obf-body { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ob-fold > .obf-head, .ob-fold > .obf-head > .obf-chev { transition: none; }
}

/* A printed financial document shows every section — a fold is a screen convenience, not an edit. */
@media print {
  .ob-fold.obf-closed > .obf-body { display: block !important; }
  .ob-fold > .obf-head > .obf-chev { display: none !important; }
}

/* The line editor's account cell hosts a searchable picker rather than a native <select>. Sized to the
   column so a long account name truncates instead of widening the table. */
.obl-acc { min-width: 190px; }
.obl-acc .obp-trigger { height: 34px; font-size: 13px; }
