/* =========================================================================
   Legal redesign (terms2.html → /terms-conditions/, privacy2.html → /privacy-policy/).
   Loaded after gable.css + home2.css, only on these pages. Wrapper: .gbl.gbl-home2.lg (+ .lg-terms / .lg-privacy).
   Prefix: lg-. Markup: tools/legal2.mjs; behaviour: gable/legal2.js; decisions: docs/legal-redesign.md.
   Legal text rules: nothing collapsed or hidden, no text-transform on the document, capitals stay capitals.
   ========================================================================= */

.lg { --lg-head: 80px; --lg-bar: 0px; --lg-read: var(--ink); --lg-measure: 720px; }
/* ship: pages 86 / 3 become one BB row holding the shortcode; BB's cached node CSS can be stale, so spacing is pinned */
body:is(.page-id-86, .page-id-3) .fl-builder-content-primary .fl-col { width: 100%; }
body:is(.page-id-86, .page-id-3) .fl-builder-content-primary > .fl-row > .fl-row-content-wrap { padding: 0; }
body:is(.page-id-86, .page-id-3) .fl-builder-content-primary .fl-module-html > .fl-module-content { margin: 0; }

.lg [hidden] { display: none !important; }
.lg :is([id], a, button, select) { scroll-margin-top: calc(var(--lg-head) + var(--lg-bar) + 24px); }
.lg :is(a, button, select):focus-visible { outline: 3px solid var(--pb-600); outline-offset: 2px; border-radius: 6px; }
.lg svg { flex: none; }

/* ---------- hero (the light feature/solutions hero card) ---------- */
.lg-hero .hx-hero-card { color: var(--ink); padding: 0; background: linear-gradient(160deg, #f5f9ff 0%, var(--pb-50) 45%, var(--pb-100) 100%); box-shadow: inset 0 0 0 1px var(--pb-100); }
.lg-hero .hx-hero-glow { background: radial-gradient(42% 60% at 82% 8%, rgba(42, 107, 230, .16), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(255, 255, 255, .9), transparent 70%); }
.lg-hero .hx-hero-glow::after { background-image: radial-gradient(rgba(34, 86, 211, .16) 1px, transparent 1px); }
.lg-hero-grid { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 440px); justify-content: space-between; align-items: center; gap: 48px; padding: 56px 64px 56px 72px; }
.lg-hero-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.gbl.lg .lg-hero .hx-h1 { color: var(--ink); margin-top: 28px; font-size: clamp(38px, 3.4vw, 52px); }

/* the page's own label above the H1 (V1, Earl 2026-10-19): a static pill like the other heroes' eyebrows, not a link */
.lg-label { display: inline-flex; align-items: center; gap: 8px; padding: 5px 16px 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--pb-100); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.2; }
.lg-label svg { width: 18px; height: 18px; fill: var(--pb-600); }

.lg-updated { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 18px; line-height: 1.4; color: var(--ink); font-weight: 600; }
.lg-updated em { font-style: normal; }
.lg-updated svg { width: 22px; height: 22px; fill: var(--pb-600); }
.lg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.gbl .lg-actions .gbl-btn { min-height: 48px; padding: 0 20px; border-radius: 12px; background: #fff; color: var(--ink); border: 1px solid var(--pb-100); font-size: 16px; }
.gbl .lg-actions .gbl-btn:hover { border-color: var(--pb-200); color: var(--pb-700); }
.lg-actions svg { width: 20px; height: 20px; fill: var(--pb-600); }
.lg-actions .is-done svg { fill: #1a7f4b; }

/* "Jump to" card */
.lg-quick { padding: 24px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--pb-100), 0 40px 80px -44px rgba(24, 50, 140, .5); }
.lg-quick-h { margin: 0 0 8px; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.lg-quick ul { display: grid; gap: 2px; }
.gbl .lg-quick li a { display: grid; grid-template-columns: 32px minmax(0, 1fr) 18px; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; margin: 0 -12px; border-radius: 12px; font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: .02em; color: var(--ink); transition: background .2s, color .2s; }
.gbl.lg-privacy .lg-quick li a { grid-template-columns: minmax(0, 1fr) 18px; font-size: 16px; letter-spacing: 0; }
.gbl .lg-quick li a:hover { background: var(--pb-50); color: var(--pb-700); }
.lg-q-arr { width: 18px; height: 18px; fill: var(--pb-600); transition: transform .2s var(--ease); }
.lg-quick li a:hover .lg-q-arr { transform: translateX(3px); }
.gbl a.lg-quick-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 0; font-size: 15px; font-weight: 600; color: var(--pb-700); }
.gbl a.lg-quick-all:hover { color: var(--pb-900); }
.lg-quick-all svg { width: 16px; height: 16px; fill: currentColor; }

/* section numbers (contents, jump card, headings) */
.lg-toc-n, .lg-num { display: inline-grid; place-items: center; min-width: 32px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--pb-50); color: var(--pb-700); font-size: 13px; font-weight: 600; letter-spacing: 0; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- document ---------- */
.lg-body { display: grid; grid-template-columns: 300px minmax(0, var(--lg-measure)); justify-content: center; gap: 72px; align-items: start; padding-top: 64px; padding-bottom: 120px; }
.lg-side { position: sticky; top: calc(var(--lg-head) + 24px); max-height: calc(100vh - var(--lg-head) - 48px); overflow: auto; overscroll-behavior: contain; padding: 4px 4px 24px; margin: -4px; scrollbar-width: thin; }
.lg-side-h { margin: 0 12px 10px; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.lg-progress { height: 3px; margin: 0 12px 12px; border-radius: 3px; background: var(--line); overflow: hidden; }
.lg-progress i { display: block; height: 100%; width: 100%; background: var(--pb-600); border-radius: inherit; transform-origin: 0 50%; transform: scaleX(var(--lg-p, 0)); }
.lg-side ol { display: grid; gap: 2px; }
.gbl .lg-side a { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 10px; padding: 7px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; font-weight: 600; letter-spacing: .02em; color: var(--body); transition: background .2s, color .2s; }
.gbl.lg-privacy .lg-side a { grid-template-columns: minmax(0, 1fr); font-size: 15px; letter-spacing: 0; }
.lg-side .lg-toc-n { height: 22px; min-width: 30px; margin-top: -1px; background: #edf1f7; color: var(--body); font-size: 12px; }
.gbl .lg-side a:hover { background: #fff; color: var(--pb-700); }
.gbl .lg-side a[aria-current="true"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--pb-100), 0 1px 3px rgba(24, 50, 140, .14); }
.lg-side a[aria-current="true"] .lg-toc-n { background: var(--pb-600); color: #fff; }
.lg-bar { display: none; }

.lg-doc { min-width: 0; color: var(--lg-read); }
.lg-doc p, .lg-doc li, .lg-doc dd, .lg-doc dt { font-size: 18px; line-height: 1.75; color: var(--lg-read); }
.lg-doc p + p, .lg-doc p + ul, .lg-doc ul + p, .lg-doc ul + ul { margin-top: 18px; }
.lg-doc strong, .lg-doc b { font-weight: 600; color: var(--ink); }
.lg-doc em { font-style: italic; }
.gbl .lg-doc a:not(.lg-end-card):not(.lg-top) { color: var(--pb-700); font-weight: 600; overflow-wrap: anywhere; }
.gbl .lg-doc a:not(.lg-end-card):not(.lg-top):hover { color: var(--pb-900); }
.lg-doc ul { display: grid; gap: 10px; }
.lg-doc ul > li { position: relative; padding-left: 28px; }
.lg-doc ul > li::before { content: ""; position: absolute; left: 8px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--pb-600); }

.lg-intro { padding-bottom: 8px; }
.lg-intro > p:first-child { font-size: 20px; line-height: 1.7; }

.lg-sec { position: relative; padding-top: 48px; margin-top: 48px; border-top: 1px solid var(--line); }
.lg-alias { position: absolute; top: 0; }
.lg-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.gbl .lg-h2 { display: flex; align-items: flex-start; gap: 14px; margin: 0; font-size: 22px; line-height: 1.35; letter-spacing: .02em; color: var(--ink); text-wrap: pretty; }
.gbl.lg-privacy .lg-h2 { font-size: 28px; letter-spacing: 0; }
.lg-h2 .lg-num { height: 30px; min-width: 38px; margin-top: 0; font-size: 15px; }
.gbl .lg-h3 { margin: 32px 0 12px; font-size: 20px; line-height: 1.4; color: var(--ink); }
.lg-sec-head + .lg-h3 { margin-top: 0; }
.gbl .lg-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--body); opacity: 0; transition: opacity .2s, background .2s, color .2s; }
.lg-copy svg { width: 16px; height: 16px; fill: currentColor; }
.lg-sec:hover .lg-copy, .lg-copy:focus-visible, .lg-copy.is-done { opacity: 1; }
.gbl .lg-copy:hover { background: #fff; color: var(--pb-700); box-shadow: inset 0 0 0 1px var(--line); }
.gbl .lg-copy.is-done { color: #1a7f4b; }

/* conspicuous clauses (all capitals in the source): framed, a little tracking so capitals read easier */
.lg-doc p.lg-caps { padding: 20px 24px; border-radius: 14px; background: #f7f9fc; box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--ink); font-size: 16px; line-height: 1.75; letter-spacing: .02em; }
.lg-doc p.lg-caps + p.lg-caps { margin-top: 12px; }

/* CONTACT US: the dl as a card */
.lg-contact { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px 20px; padding: 24px 28px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.lg-contact dt { display: inline-flex; align-items: flex-start; gap: 10px; font-weight: 600; color: var(--ink); }
.lg-contact dt svg { width: 20px; height: 20px; margin-top: .3em; fill: var(--pb-600); }
.lg-contact dd { margin: 0; }

/* end of the document */
.lg-end { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 24px; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.lg-end-h { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.lg-end-h svg { width: 18px; height: 18px; fill: var(--pb-600); }
.gbl a.lg-end-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--pb-100), 0 30px 60px -44px rgba(24, 50, 140, .5); transition: transform .3s var(--ease), box-shadow .3s; }
.gbl a.lg-end-card:hover { transform: translateY(-2px); color: var(--ink); box-shadow: 0 0 0 1px var(--pb-200), 0 30px 60px -36px rgba(24, 50, 140, .55); }
.lg-end-card b { display: block; font-size: 20px; line-height: 1.3; font-weight: 600; }
.lg-end-card small { display: block; margin-top: 2px; font-size: 15px; color: var(--body); }
.lg-end-card > svg { width: 22px; height: 22px; fill: var(--pb-600); }
.gbl a.lg-top { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 16px; font-weight: 600; color: var(--pb-700); }
.gbl a.lg-top:hover { background: #fff; color: var(--pb-900); }
.lg-top svg { width: 18px; height: 18px; fill: currentColor; }

/* back-to-top button (after the first screen) */
.gbl a.lg-fab { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--pb-700); box-shadow: 0 0 0 1px var(--pb-100), 0 12px 28px -10px rgba(24, 50, 140, .45); transition: transform .2s var(--ease), color .2s; }
.gbl a.lg-fab:hover { transform: translateY(-2px); color: var(--pb-900); }
.lg-fab svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .lg-body { grid-template-columns: 260px minmax(0, 1fr); gap: 48px; }
  .lg-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); padding: 48px 48px 48px 56px; }
}
@media (max-width: 1100px) {
  .lg-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lg-quick { max-width: 640px; }
  .lg-body { grid-template-columns: minmax(0, var(--lg-measure)); padding-top: 32px; }
  .lg-side { display: none; }
  .lg-bar { position: sticky; top: var(--lg-head); z-index: 40; display: block; margin: 0 -8px 8px; padding: 12px 8px 0; background: rgba(245, 247, 250, .94); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
  .lg-bar .lg-progress { margin: 12px 0 0; border-radius: 0; height: 3px; }
  .lg-jump { position: relative; display: block; }
  .lg-jump-ico { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: var(--pb-600); pointer-events: none; }
  .lg-jump-car { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: var(--body); pointer-events: none; }
  .gbl .lg-jump select { width: 100%; height: 48px; margin: 0; padding: 0 44px 0 48px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; -webkit-appearance: none; appearance: none; }
  .lg-copy { opacity: 1; }
  .gbl .lg-copy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gbl .lg-copy { width: 40px; height: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 768px) {
  .lg-hero-grid { padding: 32px 20px 24px; }
  .gbl.lg .lg-hero .hx-h1 { margin-top: 22px; font-size: 36px; }
  .lg-updated { font-size: 17px; }
  .lg-actions { width: 100%; }
  .gbl .lg-actions .gbl-btn { flex: 1 1 auto; }
  .lg-quick { padding: 20px; }
  .lg-bar { margin: 0 -20px 4px; padding: 12px 20px 0; }
  .lg-bar .lg-progress { margin: 12px -20px 0; }
  .lg-doc p, .lg-doc li, .lg-doc dd, .lg-doc dt { font-size: 17px; line-height: 1.7; }
  .lg-intro > p:first-child { font-size: 18px; }
  .lg-sec { padding-top: 36px; margin-top: 36px; }
  .lg-body { padding-bottom: 72px; }
  .gbl .lg-h2 { font-size: 19px; gap: 12px; }
  .gbl.lg-privacy .lg-h2 { font-size: 24px; }
  .lg-h2 .lg-num { height: 28px; min-width: 34px; font-size: 14px; }
  .lg-doc p.lg-caps { padding: 16px 18px; font-size: 15px; letter-spacing: .01em; }
  .lg-contact { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 20px; }
  .lg-contact dd + dt { margin-top: 12px; }
  .lg-end { grid-template-columns: minmax(0, 1fr); }
  .gbl a.lg-top { justify-self: start; padding: 0; }
  .gbl a.lg-fab { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg *, .lg *::before { transition: none !important; }
}

/* ---------- print: the document only, in full ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  /* the theme's Bootstrap print rules set body { min-width: 992px }, which crops a Letter/A4 page */
  body.lg2, body.lg2 .fl-page, body.lg2 .container { min-width: 0 !important; width: auto !important; }
  body.lg2 :is(.ph-header, header[data-type="header"], footer, .fl-builder-content-2882, #ph-foot, .ph-footer) { display: none !important; }
  .lg .hx-hero-card { background: none !important; box-shadow: none !important; overflow: visible; border-radius: 0; }
  .lg .hx-hero-glow, .lg-label, .lg-actions, .lg-quick, .lg-side, .lg-bar, .lg-copy, .lg-end, .lg-fab, .lg-updated svg { display: none !important; }
  .lg-hero-grid { display: block; padding: 0; }
  .gbl.lg .lg-hero .hx-h1 { margin: 0; font-size: 24pt; }
  .lg-updated { margin-top: 6pt; font-size: 11pt; }
  .gbl-wrap, .gbl-wrap-hero { padding: 0 !important; max-width: none !important; }
  .lg-body { display: block; padding-top: 18pt; }
  .lg-doc p, .lg-doc li, .lg-doc dd, .lg-doc dt { font-size: 10.5pt; line-height: 1.5; color: #000; }
  .lg-intro > p:first-child { font-size: 10.5pt; }
  .lg-sec { margin-top: 16pt; padding-top: 0; border: 0; }
  .gbl .lg-h2 { font-size: 12pt; break-after: avoid; }
  .gbl .lg-h3 { font-size: 11pt; margin: 10pt 0 4pt; break-after: avoid; }
  .gbl .lg-h2 { gap: 6pt; }
  .lg-num { display: inline; background: none; padding: 0; min-width: 0; height: auto; color: #000; font-size: 12pt; white-space: nowrap; }
  .lg-num::after { content: "."; }
  .lg-doc p.lg-caps { background: none; box-shadow: none; border: 1px solid #000; padding: 8pt 10pt; font-size: 10pt; break-inside: avoid; }
  .lg-contact { box-shadow: none; padding: 0; }
  .lg-contact dt svg { display: none; }
  .gbl .lg-doc a { color: #000 !important; text-decoration: none !important; }
  .lg-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-weight: 400; }
  .lg-doc a[href^="https://www.payhoa.com"]::after, .lg-doc a[href^="terms2"]::after, .lg-doc a[href^="privacy2"]::after { content: ""; }
}
