/* =====================================================================================
   Portal design system (approved mockup 2026-09-21). Plain CSS, no build step.
   Accent tokens (--px-accent, -hover, -soft, -ink, --px-on-accent, --px-accent-ring) are
   emitted per host by BrandingLib into <head>; everything here consumes them. Neutrals are
   fixed per colour mode below. Bootstrap 5.3 supplies grid/dropdown/modal/forms; the
   "bridge" section maps our tokens onto its components.
   ===================================================================================== */

:root {
  --px-bg: #f3f5f8; --px-surface: #ffffff; --px-surface-2: #f7f9fb; --px-border: #e1e7ee;
  --px-text: #3c4653; --px-muted: #6c7887; --px-heading: #1d2b3a;
  --px-success: #0da258; --px-success-soft: #e3f6ec; --px-danger: #d93838; --px-danger-soft: #fdeaea;
  --px-warning: #9a6b00; --px-warning-soft: #fff3d1; --px-info: #0b7fb8; --px-info-soft: #e2f2fb;
  --px-shadow: 0 4px 18px rgba(29,43,58,.07); --px-shadow-lg: 0 14px 40px rgba(29,43,58,.14);
  --px-radius: 14px; --px-radius-sm: 10px; --px-radius-pill: 999px;
  --px-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --px-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Bootstrap neutrals follow ours */
  --bs-body-bg: var(--px-bg); --bs-body-color: var(--px-text); --bs-border-color: var(--px-border);
  --bs-secondary-color: var(--px-muted); --bs-heading-color: var(--px-heading);
  --bs-body-font-family: var(--px-font); --bs-body-font-size: 15px;
}
[data-bs-theme="dark"] {
  --px-bg: #121419; --px-surface: #1a1d25; --px-surface-2: #20242e; --px-border: #2c313d;
  --px-text: #aab5c2; --px-muted: #7f8b9a; --px-heading: #e6edf5;
  --px-success: #22c072; --px-success-soft: #123524; --px-danger: #ff6060; --px-danger-soft: #3a1c1c;
  --px-warning: #f0c75e; --px-warning-soft: #33290f; --px-info: #4db4ea; --px-info-soft: #12303f;
  --px-shadow: 0 4px 18px rgba(0,0,0,.35); --px-shadow-lg: 0 14px 40px rgba(0,0,0,.5);
  --bs-body-bg: var(--px-bg); --bs-body-color: var(--px-text); --bs-border-color: var(--px-border);
  --bs-secondary-color: var(--px-muted); --bs-heading-color: var(--px-heading);
}

/* ---- base ------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body { background: var(--px-bg); color: var(--px-text); font-family: var(--px-font); font-size: 15px; line-height: 1.5; margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--px-accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--px-heading); margin: 0; letter-spacing: -.012em; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; } h4 { font-size: 14px; font-weight: 700; }
.muted { color: var(--px-muted); } .small { font-size: 13px; } .xs { font-size: 12px; } .mono { font-family: var(--px-mono); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--px-muted); }
main { flex: 1; }

/* ---- top bar ----------------------------------------------------------------------- */
.px-top { background: var(--px-surface); border-bottom: 1px solid var(--px-border); padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 12px; }
.px-top-spacer { flex: 1; }
.px-logo { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--px-heading); text-decoration: none !important; }
.px-logo-img { height: 38px; max-width: 180px; object-fit: contain; }
[data-bs-theme="dark"] .px-logo-plate { background: #fff; border-radius: 8px; padding: 3px 6px; }   /* no dark logo → white plate */
.px-logo-dark { display: none; } [data-bs-theme="dark"] .px-logo-dark { display: inline; } [data-bs-theme="dark"] .px-logo-light { display: none; }
.px-logo-tile { width: 38px; height: 38px; border-radius: 10px; background: var(--px-accent); color: var(--px-on-accent); font-weight: 800; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.px-logo-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--px-border); background: var(--px-surface); color: var(--px-heading); border-radius: var(--px-radius-pill); padding: 6px 11px; font-size: 12.5px; font-weight: 700; line-height: 1; white-space: nowrap; }
.px-pill.dropdown-toggle::after { margin-left: 2px; }
.px-flag { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; }
.px-icon { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--px-border); background: var(--px-surface); display: inline-flex; align-items: center; justify-content: center; color: var(--px-heading); font-size: 15px; cursor: pointer; }
.px-avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--px-accent-soft); color: var(--px-accent-ink); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.dropdown-menu { background: var(--px-surface); border-color: var(--px-border); border-radius: var(--px-radius-sm); box-shadow: var(--px-shadow-lg); --bs-dropdown-link-color: var(--px-heading); --bs-dropdown-link-hover-bg: var(--px-surface-2); --bs-dropdown-link-active-bg: var(--px-accent-soft); --bs-dropdown-link-active-color: var(--px-accent-ink); }
.dropdown-header { color: var(--px-heading); }

/* ---- breadcrumbs + page --------------------------------------------------------- */
.px-crumbs { padding: 0 0 12px; font-size: 13px; color: var(--px-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.px-crumbs a { font-weight: 600; } .px-crumbs .cur { color: var(--px-heading); font-weight: 600; } .px-crumbs .sep { opacity: .5; }
.px-body { padding: 16px 20px 28px; max-width: 1140px; margin: 0 auto; width: 100%; }
.px-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.px-hero { text-align: center; padding: 14px 0 18px; } .px-hero p { margin: 6px 0 0; }
/* Large home-page logo (host option). Same light/dark rules as the header logo; a bigger plate in dark mode. */
.px-hero-logo { margin: 4px 0 18px; line-height: 0; }
.px-hero-logo-img { height: 84px; max-width: min(100%, 300px); width: auto; object-fit: contain; }
[data-bs-theme="dark"] .px-hero-logo .px-logo-plate { border-radius: 14px; padding: 10px 16px; }
@media (min-width: 640px) { .px-hero-logo-img { height: 120px; max-width: min(100%, 440px); } }
.px-foot { text-align: center; padding: 22px 16px 28px; font-size: 12.5px; color: var(--px-muted); display: flex; gap: 8px; justify-content: center; }

/* ---- focus layout (sign-in, errors) --------------------------------------------- */
.px-focus { flex: 1; max-width: 460px; margin: 0 auto; width: 100%; padding: 28px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.px-focus-brand { display: flex; justify-content: center; }
.px-focus-foot { display: flex; justify-content: center; gap: 10px; align-items: center; }
.px-login .px-input { font-size: 16px; }
.px-code { text-align: center; font-family: var(--px-mono); font-size: 28px !important; font-weight: 800; letter-spacing: .35em; }
.px-profile { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid var(--px-border); border-radius: var(--px-radius-sm); padding: 12px 14px; margin-bottom: 8px; background: var(--px-surface); color: var(--px-heading); font: inherit; cursor: pointer; }
.px-profile:hover { border-color: var(--px-accent); }
.px-register { margin-top: 4px; }
.px-link { background: none; border: 0; padding: 0; color: var(--px-accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
.px-link:hover { text-decoration: underline; }

/* ---- buttons ---------------------------------------------------------------------- */
.px-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--px-radius-sm); font: inherit; font-size: 14px; font-weight: 700; border: 1px solid var(--px-border); background: var(--px-surface); color: var(--px-heading); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, box-shadow .12s; }
.px-btn:hover { background: var(--px-surface-2); color: var(--px-heading); }
.px-btn.primary { background: var(--px-accent); color: var(--px-on-accent); border-color: transparent; }
.px-btn.primary:hover { background: var(--px-accent-hover); color: var(--px-on-accent); }
.px-btn.outline { border-color: var(--px-accent); color: var(--px-accent-ink); background: transparent; }
.px-btn.outline:hover { background: var(--px-accent-soft); color: var(--px-accent-ink); }
.px-btn.ghost { border-color: transparent; background: transparent; color: var(--px-accent-ink); }
.px-btn.danger { background: var(--px-danger); color: #fff; border-color: transparent; }
.px-btn.lg { min-height: 50px; font-size: 16px; padding: 0 24px; border-radius: var(--px-radius); }
.px-btn.sm { min-height: 34px; font-size: 13px; padding: 0 12px; }
.px-btn.block { width: 100%; }
.px-btn:disabled { opacity: .55; cursor: default; }
.px-btn:focus-visible, .px-input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--px-accent-ring); }
.px-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- inputs ------------------------------------------------------------------------ */
.px-input, select.px-input, textarea.px-input { width: 100%; min-height: 44px; border: 1.5px solid var(--px-border); border-radius: var(--px-radius-sm); background: var(--px-surface); color: var(--px-heading); padding: 10px 14px; font: inherit; font-size: 15px; }
.px-input:focus { outline: none; border-color: var(--px-accent); box-shadow: 0 0 0 4px var(--px-accent-ring); }
.px-input.big { min-height: 54px; font-size: 20px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.px-input.input-validation-error { border-color: var(--px-danger); }
textarea.px-input { min-height: 120px; resize: vertical; }
.px-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.px-field label { font-size: 13px; font-weight: 700; color: var(--px-heading); }
.px-field .err, .field-validation-error { font-size: 12.5px; color: var(--px-danger); font-weight: 600; }
.px-search { display: flex; gap: 8px; } .px-search .px-input { flex: 1; }
.px-check-label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--px-text); }
.px-check-label input { width: 18px; height: 18px; accent-color: var(--px-accent); flex: none; margin-top: 2px; }
.px-or { display: flex; align-items: center; gap: 10px; color: var(--px-muted); font-size: 12px; font-weight: 700; margin: 14px 0; text-transform: uppercase; letter-spacing: .08em; }
.px-or::before, .px-or::after { content: ""; flex: 1; height: 1px; background: var(--px-border); }
.px-alert { border-radius: var(--px-radius-sm); padding: 10px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.px-alert.danger { background: var(--px-danger-soft); color: var(--px-danger); }
.px-alert.success { background: var(--px-success-soft); color: var(--px-success); }
.px-alert.warning { background: var(--px-warning-soft); color: var(--px-warning); }
.px-alert.info { background: var(--px-info-soft); color: var(--px-info); }
/* The late-cancel warning in the cancel dialog: what the customer will still be billed. */
.px-notice-box { background: var(--px-warning-soft); border: 1px solid var(--px-border); border-left: 5px solid var(--px-warning); border-radius: var(--px-radius-sm); padding: 12px 14px; margin-bottom: 12px; color: var(--px-heading); font-size: 13.5px; }
.px-notice-box p { margin: 0 0 6px; }
.px-notice-box p.mb-0 { margin-bottom: 0; }
.px-notice-box .lead { font-weight: 700; font-size: 15px; }

/* ---- cards / tiles / stats ----------------------------------------------------- */
.px-card { background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius); box-shadow: var(--px-shadow); padding: 18px; }
.px-card.tight { padding: 14px 16px; }
.px-card .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.px-card + .px-card, .px-grid + .px-card { margin-top: 14px; }
.px-row-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.px-tile { display: flex; flex-direction: column; gap: 10px; background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius); box-shadow: var(--px-shadow); padding: 20px; color: var(--px-text); text-decoration: none !important; transition: border-color .12s, box-shadow .12s; }
.px-tile:hover { border-color: var(--px-accent); box-shadow: var(--px-shadow-lg); color: var(--px-text); }
.px-tile .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--px-accent-soft); color: var(--px-accent-ink); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.px-tile p { margin: 0; color: var(--px-muted); font-size: 14px; }
.px-tile .go { margin-top: auto; font-weight: 700; color: var(--px-accent-ink); font-size: 14px; }
.px-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.px-grid.stats { grid-template-columns: repeat(2, 1fr); }
.px-stat { background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius); box-shadow: var(--px-shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; color: var(--px-text); text-decoration: none !important; }
.px-stat .n { font-size: 30px; font-weight: 800; color: var(--px-heading); line-height: 1; }
.px-stat .l { font-size: 13.5px; font-weight: 700; color: var(--px-heading); }
.px-stat .s { font-size: 12.5px; color: var(--px-muted); }
.px-stat .arrow { position: absolute; right: 16px; top: 16px; color: var(--px-muted); }
.px-stat.attn { border-color: var(--px-warning); } .px-stat.attn .n { color: var(--px-warning); }

/* ---- badges ------------------------------------------------------------------------ */
.px-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--px-radius-pill); padding: 3px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.px-badge.open { background: var(--px-warning-soft); color: var(--px-warning); }
.px-badge.paid, .px-badge.ok { background: var(--px-success-soft); color: var(--px-success); }
.px-badge.hold, .px-badge.info { background: var(--px-info-soft); color: var(--px-info); }
.px-badge.overdue, .px-badge.danger { background: var(--px-danger-soft); color: var(--px-danger); }
.px-badge.accent { background: var(--px-accent-soft); color: var(--px-accent-ink); }
.px-badge.neutral { background: var(--px-surface-2); color: var(--px-muted); border: 1px solid var(--px-border); }

/* ---- blocks (violations / invoices) ------------------------------------------------ */
.px-block { background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius); box-shadow: var(--px-shadow); padding: 16px 18px; display: grid; grid-template-columns: 1fr; gap: 12px; }
.px-block + .px-block { margin-top: 12px; }
.px-block.hit { border-color: var(--px-accent); box-shadow: 0 0 0 3px var(--px-accent-ring), var(--px-shadow); }
.px-block.done { opacity: .72; }
.px-block .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.px-block .tk { font-family: var(--px-mono); font-weight: 800; font-size: 16px; color: var(--px-heading); }
.px-block .meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; font-size: 13px; margin-top: 8px; }
.px-block .meta .k { color: var(--px-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: block; }
.px-block .meta .v { color: var(--px-heading); font-weight: 600; }
.px-block .amt { font-size: 24px; font-weight: 800; color: var(--px-heading); line-height: 1; }
.px-block .act { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.px-block .act .l { display: flex; gap: 14px; align-items: center; }
.px-block.masked { background: repeating-linear-gradient(135deg, var(--px-surface) 0 10px, var(--px-surface-2) 10px 20px); }
.px-check { width: 22px; height: 22px; border-radius: 50%; background: var(--px-success); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }

/* ---- rows / key-value ------------------------------------------------------------- */
.px-rows { display: flex; flex-direction: column; }
.px-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--px-border); font-size: 14px; }
.px-row:last-child { border-bottom: 0; }
.px-row .l { color: var(--px-muted); } .px-row .r { font-weight: 700; color: var(--px-heading); text-align: right; }
.px-row.tot { border-top: 2px solid var(--px-border); border-bottom: 0; margin-top: 4px; }
.px-row.tot .l, .px-row.tot .r { font-weight: 800; color: var(--px-heading); font-size: 15px; }
.px-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; font-size: 14px; }
.px-kv .k, .px-terms-agreed .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--px-muted); }
.px-kv .v { color: var(--px-heading); font-weight: 600; }
.px-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--px-border); font-size: 14px; }
.px-item:last-child { border-bottom: 0; }
.px-item .t { font-weight: 700; color: var(--px-heading); } .px-item .s { font-size: 12.5px; color: var(--px-muted); }
.px-item .act { margin-left: auto; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.px-plate { font-family: var(--px-mono); font-weight: 800; background: var(--px-surface-2); border: 1px solid var(--px-border); border-radius: 8px; padding: 5px 9px; color: var(--px-heading); letter-spacing: .06em; }

/* ---- choices (radio cards) ---------------------------------------------------- */
.px-choice { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--px-border); border-radius: var(--px-radius-sm); padding: 11px 13px; margin-bottom: 8px; cursor: pointer; background: var(--px-surface); }
.px-choice.on, .px-choice:has(input:checked) { border-color: var(--px-accent); background: var(--px-accent-soft); }
.px-choice input[type=radio] { width: 18px; height: 18px; accent-color: var(--px-accent); flex: none; }
.px-choice .t { font-weight: 700; color: var(--px-heading); font-size: 14px; } .px-choice .s { font-size: 12.5px; color: var(--px-muted); }
.px-seg { display: inline-flex; border: 1px solid var(--px-border); border-radius: var(--px-radius-sm); overflow: hidden; }
.px-seg > a, .px-seg > button, .px-seg > label { font: inherit; font-size: 13px; font-weight: 700; padding: 7px 12px; border: 0; background: var(--px-surface); color: var(--px-muted); cursor: pointer; text-decoration: none !important; }
.px-seg > .on, .px-seg > label:has(input:checked) { background: var(--px-accent-soft); color: var(--px-accent-ink); }
.px-seg input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }

/* ---- lists: table, pager, cards --------------------------------------------------- */
.px-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.px-table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--px-muted); padding: 10px 12px; border-bottom: 1px solid var(--px-border); white-space: nowrap; }
.px-table td { padding: 12px; border-bottom: 1px solid var(--px-border); color: var(--px-heading); vertical-align: middle; }
.px-table tr:last-child td { border-bottom: 0; }
.px-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.px-sort { color: var(--px-muted); } .px-sort.asc, .px-sort.desc { color: var(--px-accent-ink); }
.px-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; flex-wrap: wrap; }
.px-pager .pg { display: flex; gap: 4px; }
.px-pager .pg a, .px-pager .pg .ell { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--px-border); background: var(--px-surface); color: var(--px-heading); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; text-decoration: none !important; }
.px-pager .pg a.on { background: var(--px-accent); color: var(--px-on-accent); border-color: transparent; }
.px-pager .pg a.disabled { opacity: .4; pointer-events: none; }
.px-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
.px-inv { background: var(--px-surface-2); border: 1px solid var(--px-border); border-radius: var(--px-radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.px-inv .n { font-family: var(--px-mono); font-weight: 800; color: var(--px-heading); }
.px-inv .a { font-size: 20px; font-weight: 800; color: var(--px-heading); }
.hide-mobile { display: none; }

/* ---- modal (Bootstrap shell, our skin) ------------------------------------------- */
.modal-content { background: var(--px-surface); border: 1px solid var(--px-border); border-radius: 18px; box-shadow: var(--px-shadow-lg); color: var(--px-text); }
.modal-header, .modal-footer { border-color: var(--px-border); }
.modal-footer { background: var(--px-surface-2); border-radius: 0 0 18px 18px; }
.px-stripe { border: 1.5px dashed var(--px-border); border-radius: var(--px-radius-sm); padding: 14px; background: var(--px-surface-2); }

/* ---- steps ----------------------------------------------------------------------- */
.px-step { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.px-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--px-accent); color: var(--px-on-accent); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.px-step.done .n { background: var(--px-success); color: #fff; }
.px-step.todo .n { background: var(--px-surface-2); color: var(--px-muted); border: 1px solid var(--px-border); }
.px-verified { display: inline-flex; align-items: center; gap: 8px; background: var(--px-success-soft); color: var(--px-success); border-radius: var(--px-radius-pill); padding: 6px 12px; font-weight: 700; font-size: 13px; }

/* ---- Bootstrap bridge: stock components take the brand ----------------------------- */
.btn-primary { --bs-btn-bg: var(--px-accent); --bs-btn-border-color: var(--px-accent); --bs-btn-color: var(--px-on-accent); --bs-btn-hover-bg: var(--px-accent-hover); --bs-btn-hover-border-color: var(--px-accent-hover); --bs-btn-hover-color: var(--px-on-accent); --bs-btn-active-bg: var(--px-accent-hover); --bs-btn-active-border-color: var(--px-accent-hover); --bs-btn-active-color: var(--px-on-accent); --bs-btn-disabled-bg: var(--px-accent); --bs-btn-disabled-border-color: var(--px-accent); --bs-btn-disabled-color: var(--px-on-accent); --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb); }
.btn-outline-primary { --bs-btn-color: var(--px-accent-ink); --bs-btn-border-color: var(--px-accent); --bs-btn-hover-bg: var(--px-accent-soft); --bs-btn-hover-color: var(--px-accent-ink); --bs-btn-hover-border-color: var(--px-accent); --bs-btn-active-bg: var(--px-accent); --bs-btn-active-color: var(--px-on-accent); --bs-btn-active-border-color: var(--px-accent); }
.form-control, .form-select { background: var(--px-surface); color: var(--px-heading); border-color: var(--px-border); }
.form-control:focus, .form-select:focus { border-color: var(--px-accent); box-shadow: 0 0 0 4px var(--px-accent-ring); }
.form-check-input:checked { background-color: var(--px-accent); border-color: var(--px-accent); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--px-accent-ring); border-color: var(--px-accent); }
.text-bg-primary, .bg-primary { background-color: var(--px-accent) !important; color: var(--px-on-accent) !important; }
.text-primary { color: var(--px-accent-ink) !important; }
.border-primary { border-color: var(--px-accent) !important; }
.nav-link { color: var(--px-accent-ink); } .nav-link.active { color: var(--px-heading); }
.page-link { color: var(--px-accent-ink); } .page-item.active .page-link { background: var(--px-accent); border-color: var(--px-accent); color: var(--px-on-accent); }
.card { background: var(--px-surface); border-color: var(--px-border); border-radius: var(--px-radius); }

/* ---- responsive --------------------------------------------------------------------- */
@media (min-width: 640px) {
  .px-grid { grid-template-columns: repeat(2, 1fr); }
  .px-grid.stats { grid-template-columns: repeat(3, 1fr); }
  .px-block { grid-template-columns: 1fr auto; align-items: center; }
  .px-block .act { grid-column: 1 / -1; }
  .px-block .meta { grid-template-columns: repeat(4, 1fr); }
  .px-kv { grid-template-columns: repeat(4, 1fr); }
  .px-cards { grid-template-columns: repeat(2, 1fr); }
  .hide-mobile { display: table-cell; }
}
@media (min-width: 960px) {
  .px-grid { grid-template-columns: repeat(3, 1fr); }
  .px-grid.stats { grid-template-columns: repeat(5, 1fr); }
  .px-block { grid-template-columns: 1fr auto auto; }
  .px-block .act { grid-column: auto; flex-direction: column; align-items: flex-end; }
  .px-cards { grid-template-columns: repeat(3, 1fr); }
  .px-body { padding: 20px 28px 36px; }
}
@media (max-width: 480px) {
  .px-top { padding: 0 14px; height: 58px; }
  .px-logo-name { display: none; }
  .px-pill-label { display: none; }
  .px-body { padding: 14px 14px 24px; }
  .px-search { flex-direction: column; }
  .px-btn.lg { min-height: 48px; }
  /* Every dialog is a bottom sheet on a phone. Bootstrap's .modal-dialog-centered (all of ours) adds a near-full
     min-height and centres the content inside it, which kept the sheet floating mid-screen: undo both. It slides
     up from the bottom, a tall one scrolls (the whole sheet: some dialogs wrap body and footer in a form), and the
     footer clears the home indicator. */
  .modal-dialog, .modal-dialog-centered { margin: 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: none; min-height: 0; display: block; }
  .modal.fade .modal-dialog { transform: translateY(100%); }
  .modal.show .modal-dialog { transform: none; }
  .modal-content { border-radius: 18px 18px 0 0; border-bottom: 0; max-height: calc(100dvh - 24px - env(safe-area-inset-top)); overflow-y: auto; }
  .modal-footer { border-radius: 0; }
  /* The sheet's last block (a footer, or the body in dialogs without one, inside a form or not) clears the home indicator. */
  .modal-footer:last-child { padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
  .modal-body:last-child { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .modal-body.p-0:last-child { padding-bottom: env(safe-area-inset-bottom) !important; }
  /* Action buttons stack full width with the main action on top. A footer row writes it last (reversed here); a row
     inside the body (the plate, share, delegate, cancel and payment-method forms) already writes it first. */
  .modal-footer .px-actions { flex-direction: column-reverse; align-items: stretch; width: 100%; }
  .modal-body .px-actions { flex-direction: column; align-items: stretch; }
  .modal-footer .px-actions .px-btn, .modal-body .px-actions .px-btn, .modal-footer > .px-btn { width: 100%; min-height: 48px; }
}
@media print {
  .px-top, .px-foot, .px-crumbs, .px-actions, .px-btn, #topbar { display: none !important; }
  body { background: #fff; } .px-card { box-shadow: none; }
}

/* ---- account pages ---------------------------------------------------------------------- */
.px-split { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
.px-col { display: flex; flex-direction: column; gap: 14px; }
.px-col > .px-card + .px-card { margin-top: 0; }
.px-narrow { max-width: 560px; }
.px-cardvis { width: 40px; height: 26px; border-radius: 5px; background: linear-gradient(135deg, var(--px-accent), var(--px-accent-hover)); flex: none; }
.px-cardvis.bank { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 4l9 6'/%3E%3Cpath d='M5 10v8M9.5 10v8M14.5 10v8M19 10v8'/%3E%3Cpath d='M3 20h18'/%3E%3C/svg%3E") center / 18px 18px no-repeat, linear-gradient(135deg, var(--px-accent), var(--px-accent-hover)); }
.px-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; }
.px-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.px-toggle .sw { width: 42px; height: 24px; border-radius: 999px; background: var(--px-border); position: relative; flex: none; transition: background .15s; }
.px-toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.px-toggle input:checked + .sw { background: var(--px-accent); }
.px-toggle input:checked + .sw::after { left: 21px; }
.px-toggle input:focus-visible + .sw { box-shadow: 0 0 0 4px var(--px-accent-ring); }
.px-plate-add { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--px-border); }
.px-plate-add .px-input { min-height: 40px; }
.px-inline-qty { display: inline-flex; align-items: center; gap: 6px; }
.px-inline-qty .px-input { width: 70px; min-height: 36px; padding: 4px 8px; text-align: center; }
.px-doc-req { padding: 10px 0; border-top: 1px solid var(--px-border); }
.px-doc-req:first-of-type { border-top: 0; padding-top: 0; }
.px-doc-req .t { font-weight: 700; color: var(--px-heading); }
.px-doc-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--px-surface-2); flex: none; }
.px-item .text-truncate { min-width: 0; }
.px-filter { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
.px-addr-row { display: grid; grid-template-columns: 1fr; gap: 0 10px; }
.px-totals { max-width: 340px; margin-left: auto; margin-top: 8px; }
.hide-narrow { display: none; }
/* auto view: both layouts are in the DOM, width decides */
.px-auto .px-table-view { display: none; }
@media (min-width: 640px) {
  .px-auto .px-table-view { display: block; }
  .px-auto .px-cards-view { display: none; }
  .px-split { grid-template-columns: 3fr 2fr; }
  .px-plate-add { grid-template-columns: 1fr 1fr auto; }
  .px-filter { grid-template-columns: 2fr 1fr 1fr auto; }
  .px-addr-row { grid-template-columns: 2fr 1fr 1fr; }
  .hide-narrow { display: inline; }
}
.px-tile h3 { font-size: 15px; }
.px-list .px-tile p { font-size: 13.5px; }
a.px-inv:hover { border-color: var(--px-accent); text-decoration: none; }
@media print {
  #invoice-card { border: 0; padding: 0; }
  .px-pagehead .px-actions { display: none; }
  #invoice-ledger { break-inside: avoid; }
}

/* ---- find parking / zone / checkout ----------------------------------------------------- */
.px-radius { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.px-find { display: grid; gap: 14px; grid-template-columns: 1fr; }
.px-zonelist { display: flex; flex-direction: column; gap: 12px; }
.px-zonecard { display: flex; gap: 14px; align-items: flex-start; background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius); box-shadow: var(--px-shadow); padding: 16px 18px; }
.px-zonecard .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--px-accent-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.px-zonecard .b { flex: 1; min-width: 0; } .px-zonecard .r { text-align: right; flex: none; }
.px-zonecard h3 { font-size: 16px; }
/* The map has its own height, capped by the viewport: as a grid item it would otherwise stretch to the
   whole list's height, and fitBounds would frame the pins in a box mostly below the fold. */
.px-map { height: min(70vh, 560px); min-height: 320px; border-radius: var(--px-radius); overflow: hidden; border: 1px solid var(--px-border); background: var(--px-surface-2); }
.px-map #find-map { width: 100%; height: 100%; }
.px-find.view-list .px-map { display: none; } .px-find.view-map .px-zonelist { display: none; }
.px-plans { display: flex; flex-direction: column; gap: 12px; }
.px-plan { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius); box-shadow: var(--px-shadow); padding: 16px 18px; }
.px-plan.off { opacity: .7; }
.px-plan h3 { font-size: 16px; }
.px-plan .pr { text-align: right; } .px-plan .price { font-size: 22px; font-weight: 800; color: var(--px-heading); line-height: 1.1; } .px-plan .per { font-size: 12.5px; color: var(--px-muted); }
/* An operator's note (zone / plan / pass): Markdown rendered by _OfferNote. */
.px-note { border-left: 3px solid var(--px-accent); padding: 2px 0 2px 12px; font-size: 13.5px; color: var(--px-text); }
.px-note > :last-child { margin-bottom: 0; }
.px-plan .px-note { grid-column: 1 / -1; }
.px-plan .foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--px-border); padding-top: 12px; margin-top: 4px; }
/* Daily Parking card: title + stalls | centred tag | price. On a phone the tag (.d-tag-m) sits under the title inside
   the left column and the centre cell (.d-tag-c) is hidden; from 640px it is the other way round. */
.px-plan.daily { grid-template-columns: minmax(0, 1fr) auto; }
.px-plan.daily .d-main { grid-column: 1; }
.px-plan.daily .pr { grid-column: 2; }
.px-plan.daily .d-tag-m { margin: 4px 0; }
.px-plan.daily .d-tag-c { display: none; }
.px-plan.daily .d-stalls { font-size: 13px; font-weight: 600; color: var(--px-heading); margin-top: 2px; }
.d-nw { white-space: nowrap; }
.px-plan.daily .d-stalls .lbl { color: var(--px-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-right: 6px; }
@media (min-width: 640px) {
  .px-plan.daily { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .px-plan.daily .pr { grid-column: 3; justify-self: end; }
  .px-plan.daily .d-tag-m { display: none; }
  .px-plan.daily .d-tag-c { display: block; grid-column: 2; justify-self: center; padding-top: 1px; }
}
.d-stallbox { background: var(--px-surface-2); border: 1px solid var(--px-border); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-top: 6px; }
.d-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.d-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.d-steps .num { width: 32px; height: 32px; border-radius: 50%; background: var(--px-accent-soft); color: var(--px-accent-ink); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.d-steps .t { font-weight: 700; color: var(--px-heading); }
/* Step 3's ways to pay: one row each, the text row a link (whole row, 44px+) with a chevron. */
.d-ways { margin-top: 4px; }
.d-way { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--px-border); color: var(--px-text); font-size: 14.5px; text-decoration: none; }
.d-way:last-child { border-bottom: 0; }
a.d-way:hover { color: var(--px-text); text-decoration: none; }
a.d-way:hover .txt { text-decoration: underline; }
.d-way .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--px-surface-2); color: var(--px-heading); display: flex; align-items: center; justify-content: center; flex: none; }
.d-way .txt { flex: 1; min-width: 0; }
.d-way .code { font-weight: 800; color: var(--px-heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-way .chev { color: var(--px-accent-ink); flex: none; }
.px-qtyrow { display: inline-flex; align-items: center; gap: 8px; }
.px-qtyrow .px-input { width: 72px; min-height: 40px; padding: 4px 8px; text-align: center; }
.px-split.rev .px-summary { order: -1; }
@media (min-width: 640px) {
  .px-split.rev .px-summary { order: 0; }
}
@media (min-width: 960px) {
  .px-find { grid-template-columns: 3fr 2fr; }
  .px-find.view-list .px-map, .px-find.view-map .px-zonelist { display: block; }
  .px-find .px-zonelist { display: flex; }
  .px-view-toggle { display: none; }
  .px-map { position: sticky; top: 14px; align-self: start; height: min(calc(100vh - 28px), 720px); min-height: min(480px, calc(100vh - 28px)); }
}

/* ---- violations / pay ---------------------------------------------------------------------- */
.px-blocks { display: flex; flex-direction: column; gap: 12px; }
.px-block .meta { margin-top: 8px; }
.px-block .act .px-btn { min-width: 140px; }
@media (max-width: 639px) { .px-block .act .px-btn { width: 100%; } }

/* ---- disputes ---------------------------------------------------------------------------- */
.px-identity-slot { order: 1; }
#dispute-form { order: 2; }
.px-thread { display: flex; flex-direction: column; gap: 10px; }
.px-msg { background: var(--px-surface-2); border: 1px solid var(--px-border); border-radius: var(--px-radius-sm); padding: 10px 12px; max-width: 88%; }
.px-msg.mine { align-self: flex-end; background: var(--px-accent-soft); border-color: transparent; }
.px-msg .who { font-size: 12px; font-weight: 700; color: var(--px-heading); margin-bottom: 4px; }
.px-msg .body { white-space: pre-wrap; font-size: 14px; }
.px-attach { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; margin-right: 10px; font-size: 13px; }
textarea.px-input { min-height: 96px; resize: vertical; }

/* ---- disputes: intake rules, dashboard tile links, list, detail layout, photo viewer ---- */
.px-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--px-radius-pill); padding: 3px 9px; font-size: 11.5px; font-weight: 700; background: var(--px-surface-2); color: var(--px-muted); border: 1px solid var(--px-border); vertical-align: middle; }
.px-pill.req { background: var(--px-accent-soft); color: var(--px-accent-ink); border-color: transparent; }
.px-choice .px-pill { margin-left: auto; }
.px-prompt { background: var(--px-accent-soft); border-radius: var(--px-radius-sm); padding: 10px 12px; font-size: 13.5px; color: var(--px-heading); margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start; }
.px-dropzone-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.px-dropzone { position: relative; }
.px-drop { border: 2px dashed var(--px-border); border-radius: var(--px-radius); padding: 18px; text-align: center; color: var(--px-muted); font-size: 13.5px; background: var(--px-surface-2); cursor: pointer; }
.px-drop.req { border-color: var(--px-accent); }
.px-drop.over { border-color: var(--px-accent); background: var(--px-accent-soft); }
.px-drop.sm { padding: 10px 12px; }
.px-drop-browse { color: var(--px-accent-ink); font-weight: 700; text-decoration: underline; }
.px-drop-error { color: var(--px-danger); font-size: 12.5px; margin-top: 6px; }
.px-filelist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.px-file { display: flex; align-items: center; gap: 10px; background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius-sm); padding: 8px 10px; font-size: 13px; }
.px-file .th { width: 32px; height: 32px; border-radius: 8px; background: var(--px-accent-soft); flex: none; object-fit: cover; }
.px-file .rm { margin-left: auto; background: none; border: 0; color: var(--px-muted); cursor: pointer; font-size: 14px; }
.px-field-error { color: var(--px-danger); font-size: 12.5px; margin-top: 6px; }
.px-stat .links { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-top: 2px; }
.px-stat .links a { color: var(--px-accent-ink); font-weight: 700; text-decoration: none; }
.px-stat .links a:hover { text-decoration: underline; }
.px-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.px-toolbar .sp { flex: 1; }
.px-info2 { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 900px) { .px-info2 { grid-template-columns: 1fr 1fr; } }
.px-card .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.px-card .hd h3 { margin: 0; }
.px-photolink { display: inline-flex; align-items: center; gap: 8px; color: var(--px-accent-ink); font-weight: 700; text-decoration: none; font-size: 13.5px; }
.px-photolink:hover span:last-child { text-decoration: underline; }
.px-thumbs { display: inline-flex; gap: 6px; }
.px-thumbs .th { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; border: 1px solid var(--px-border); background: var(--px-surface-2); }
.px-decision { border-left: 5px solid var(--px-success); }
.px-decision.uphold { border-left-color: var(--px-muted); }
.px-decision.reduce { border-left-color: var(--px-accent); }
.px-decision.moot { border-left-color: var(--px-border); }
.px-timeline { display: flex; flex-direction: column; gap: 10px; }
.px-timeline .px-msg { max-width: none; }
.px-timeline .px-msg .who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--px-heading); margin-bottom: 5px; }
.px-timeline .px-msg .who .ic { color: var(--px-accent-ink); }
.px-timeline .px-msg .who .when { margin-left: auto; color: var(--px-muted); font-size: 11.5px; font-weight: 500; }
.px-timeline .px-msg .atts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.px-att { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-radius-sm); padding: 4px 8px; color: var(--px-heading); text-decoration: none; }
.px-compose { border-top: 1px solid var(--px-border); margin-top: 14px; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.px-replybar { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.px-replybar .px-dropzone { width: 220px; flex: none; }
.px-replybar .px-filelist { flex: 1; min-width: 200px; }
@media (max-width: 600px) { .px-replybar .px-dropzone { width: 100%; } }
.px-viewer { position: relative; background: #111; min-height: 320px; display: flex; align-items: center; justify-content: center; outline: none; }
.px-viewer:focus-visible { box-shadow: inset 0 0 0 3px var(--px-accent); }
.px-drop:focus-visible { outline: 3px solid var(--px-accent-ring); outline-offset: 2px; }
.px-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: var(--px-border); cursor: pointer; } .px-dots button.on { background: var(--px-accent); }
.px-viewer-stage img { display: none; max-width: 100%; max-height: 70vh; margin: 0 auto; }
.px-viewer-stage img.on { display: block; }
.px-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #111; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: var(--px-shadow); }
.px-viewer-nav.prev { left: 10px; } .px-viewer-nav.next { right: 10px; }
.px-viewer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--px-border); background: var(--px-surface-2); font-size: 12.5px; }
.px-dots { display: inline-flex; gap: 6px; } .px-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--px-border); display: inline-block; cursor: pointer; } .px-dots i.on { background: var(--px-accent); }

/* ---- home "Things to do" card: accent border, one row per permit / overdue invoice ------------- */
.px-todo { background: var(--px-surface); border: 2px solid var(--px-accent); border-radius: var(--px-radius); padding: 14px 16px; margin-bottom: 16px; }
.px-todo .hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.px-todo .hd h3 { font-size: 17px; margin: 0; }
.px-todo .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--px-border); }
.px-todo .what { flex: 1; min-width: 220px; }
.px-todo .need { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }

/* ---- terms & conditions: banner, agreement tabs, rendered text, public page ------------------- */
.px-terms-banner { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; background: var(--px-warning-soft); border: 1px solid var(--px-border); border-left: 5px solid var(--px-warning); border-radius: var(--px-radius-sm); padding: 14px 16px; margin-bottom: 16px; color: var(--px-heading); }
.px-terms-banner .ic { font-size: 22px; line-height: 1; }
.px-terms-banner .b { flex: 1; min-width: 220px; }
.px-terms-banner h3 { font-size: 16px; margin-bottom: 3px; }
.px-terms-banner p { margin: 0; font-size: 14px; }
.px-terms-banner ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.px-terms-banner .act { align-self: center; }
.px-terms-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--px-border); }
.px-terms-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--px-muted); cursor: pointer; }
.px-terms-tab.on { color: var(--px-heading); border-bottom-color: var(--px-accent); }
.px-terms-tab .chk { color: var(--px-success); }
.px-terms-tab:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--px-accent-ring); border-radius: 6px 6px 0 0; }
.px-terms-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; font-size: 13px; color: var(--px-muted); background: var(--px-surface-2); border-bottom: 1px solid var(--px-border); }
.px-terms-meta a { font-weight: 700; }
.px-terms-changes { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--px-radius-sm); background: var(--px-accent-soft); font-size: 13.5px; color: var(--px-text); }
.px-terms-changes b { color: var(--px-heading); }
.px-terms-doc { max-height: 50vh; overflow: auto; padding: 14px 4px 6px; font-size: 14px; }
.px-terms-doc:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--px-accent-ring); border-radius: 6px; }
.px-terms-ticks { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--px-border); margin-top: 8px; padding-top: 14px; }
.px-terms-ticks .px-check-label { font-size: 14px; }
.px-prose { overflow-wrap: anywhere; }
.px-prose h1, .px-prose h2, .px-prose h3, .px-prose h4 { margin: 16px 0 8px; }
.px-prose h1 { font-size: 20px; } .px-prose h2 { font-size: 17px; } .px-prose h3 { font-size: 15px; } .px-prose h4 { font-size: 14px; }
.px-prose > :first-child { margin-top: 0; }
.px-prose p, .px-prose ul, .px-prose ol, .px-prose table, .px-prose blockquote { margin: 0 0 10px; }
.px-prose ul, .px-prose ol { padding-left: 22px; }
.px-prose table { border-collapse: collapse; } .px-prose th, .px-prose td { border: 1px solid var(--px-border); padding: 4px 8px; }
.px-prose blockquote { border-left: 3px solid var(--px-border); padding-left: 12px; color: var(--px-muted); }
.px-terms-agreed { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--px-border); font-size: 14px; }
.px-terms-agreed ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.px-terms-agreed a { font-weight: 600; }
.px-terms-page { max-width: 820px; margin: 0 auto; }
.px-terms-body { font-size: 15px; }
@media print {
  .px-terms-page { max-width: none; }
  .px-terms-page .px-pagehead { margin-bottom: 8px; }
  .px-terms-body { border: 0; padding: 0; box-shadow: none; }
  .px-terms-body a { color: inherit; text-decoration: underline; }
  .px-body:has(> .px-terms-page) { padding: 0; max-width: none; }   /* the terms page only, never an invoice */
  #modal-host, .px-terms-banner { display: none !important; }
}

/* ---- setup checklist (a subscription / pass page) -------------------------------------------- */
.px-setup { border: 2px solid var(--px-accent); margin-bottom: 14px; }
.px-setup .hd { margin-bottom: 6px; }
.px-setup-bar { height: 6px; border-radius: var(--px-radius-pill); background: var(--px-surface-2); border: 1px solid var(--px-border); overflow: hidden; margin: 2px 0 4px; }
.px-setup-bar i { display: block; height: 100%; background: var(--px-success); }
.px-setup-steps { list-style: none; margin: 8px 0 0; padding: 0; }
.px-setup-step { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--px-border); font-size: 14px; }
.px-setup-step .t { flex: 1; min-width: 0; }
.px-setup-step .tick { width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.px-setup-step.done .tick { background: var(--px-success); color: #fff; }
.px-setup-step.done .t, .px-setup-step.unknown .t { color: var(--px-muted); }
.px-setup-step.todo .tick { border: 2px solid var(--px-accent); color: var(--px-accent-ink); }
.px-setup-step.locked .tick, .px-setup-step.waiting .tick { border: 2px solid var(--px-border); color: var(--px-muted); }
.px-setup-step b { color: var(--px-heading); }
.px-setup-done { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .px-setup-step { flex-wrap: wrap; } .px-setup-step .px-btn { margin-left: 34px; } }
/* "Show me": the target card is outlined and carries a callout on its top edge (above the card on narrow screens). The
   callout's text is the cue; the halo only adds to it. scroll-margin keeps the callout in view after the scroll. */
.px-spotlight { position: relative; border-color: var(--px-accent); box-shadow: 0 0 0 4px var(--px-accent-ring), var(--px-shadow-lg); scroll-margin-top: 34px; transition: box-shadow .2s, border-color .2s; }
.px-spotlight:focus { outline: none; }
.px-spot-tip { position: absolute; z-index: 5; top: 0; right: 16px; transform: translateY(-50%); max-width: min(340px, calc(100% - 32px)); padding: 7px 12px; border-radius: var(--px-radius-sm); background: var(--px-heading); color: var(--px-surface); font-size: 13.5px; font-weight: 700; line-height: 1.35; box-shadow: var(--px-shadow-lg); pointer-events: none; animation: px-spot-in .2s ease-out; }
.px-spot-tip::after { content: ""; position: absolute; top: 100%; right: 22px; border: 6px solid transparent; border-top-color: var(--px-heading); }
@keyframes px-spot-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  .px-spotlight { scroll-margin-top: 76px; }
  .px-spot-tip { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; transform: none; max-width: none; }
  .px-spot-tip::after { right: auto; left: 22px; }
}
@media (prefers-reduced-motion: reduce) { .px-spotlight { transition: none; } .px-spot-tip { animation: none; } }
@media print { .px-spot-tip { display: none; } .px-spotlight { box-shadow: none; } }

/* Older (external) violations in search results */
.px-ext-head{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:0 2px}
.px-ext-head>span:first-child{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--px-muted)}
.px-block.ext{background:var(--px-surface-2)}
.px-block .ext-amt{font-size:13px;font-weight:600;line-height:1.2}
