/* ==========================================================================
   Rentee pro - the v2 look for the Sales screens and the Dashboards.

   Everything is scoped under .rx, so the other pages of the system are not
   touched: a page opts in by wrapping its content in <div class="rx">. A
   drawer or toast that is moved to <body> carries .rx itself.

   Tokens first, then the parts in the order a page uses them: page head,
   sections, tabs, stage rail, tables and checklists, drawers, dashboards.
   ========================================================================== */

.rx {
  --rx-desk: #F2F5F6;
  --rx-sheet: #FFFFFF;
  --rx-ink: #14262C;
  --rx-ink-2: #4E636B;
  --rx-mute: #81959C;
  --rx-line: #DFE7EA;
  --rx-line-2: #EBF0F2;
  --rx-teal: #0B6E7C;
  --rx-teal-ink: #FFFFFF;
  --rx-teal-wash: #E6F2F4;
  --rx-good: #1F7A55;  --rx-good-wash: #E5F3EC;
  --rx-warn: #94600F;  --rx-warn-wash: #FBF1DE;
  --rx-crit: #B23A2E;  --rx-crit-wash: #FBE9E7;
  --rx-scrim: rgba(20, 38, 44, .38);
  --rx-r: 6px;
  --rx-R: 10px;
  --rx-focus: 0 0 0 2px var(--rx-teal);

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--rx-ink);
  -webkit-font-smoothing: antialiased;
}
html.dark .rx {
  --rx-desk: #0E1A1E;
  --rx-sheet: #15252A;
  --rx-ink: #E4EDEF;
  --rx-ink-2: #A9BCC2;
  --rx-mute: #7A9198;
  --rx-line: #26393F;
  --rx-line-2: #1E3035;
  --rx-teal: #4FB3C1;
  --rx-teal-ink: #06171C;
  --rx-teal-wash: #173B42;
  --rx-good: #5CC593;  --rx-good-wash: #173A2C;
  --rx-warn: #E3AE5A;  --rx-warn-wash: #3C2F17;
  --rx-crit: #F08A7E;  --rx-crit-wash: #42211E;
  --rx-scrim: rgba(0, 0, 0, .55);
}

.rx *, .rx *::before, .rx *::after { box-sizing: border-box; }
.rx a:not(.rl-btn) { color: var(--rx-teal); text-decoration: none; }
.rx a.rl-btn:hover { text-decoration: none; }
.rx a:hover { text-decoration: underline; }
.rx :focus-visible { outline: none; box-shadow: var(--rx-focus); border-radius: var(--rx-r); }
.rx h1, .rx h2, .rx h3, .rx h4 { margin: 0; color: var(--rx-ink); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.rx h1 { font-size: 20px; line-height: 28px; }
.rx h2 { font-size: 16px; line-height: 24px; }
.rx h3 { font-size: 14px; line-height: 20px; }
.rx p { margin: 0; }
.rx .rx-mute { color: var(--rx-mute); }
.rx .rx-ink2 { color: var(--rx-ink-2); }
.rx .rx-small { font-size: 12px; }
.rx .rx-num { text-align: right; white-space: nowrap; }
/* figures line up; kept off running text, where tabular hyphens look spaced out */
.rx .rx-num, .rx .rx-money-row dd, .rx .rx-fig strong, .rx .rx-count, .rx .rx-tab b, .rx .rx-step { font-variant-numeric: tabular-nums; }
.rx [hidden] { display: none !important; }
.rx .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the page: desk colour, 1280 wide, left aligned ---- */
.rx.rx-page, .rx .rx-page {
  background: var(--rx-desk);
  max-width: 1280px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.rx-crumbs { font-size: 13px; color: var(--rx-mute); display: flex; gap: 8px; align-items: center; }
.rx-crumbs a { color: var(--rx-ink-2); }

.rx-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.rx-head-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rx-head-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rx-head-meta { font-size: 13px; color: var(--rx-ink-2); }
.rx-head-purpose { font-size: 13px; color: var(--rx-ink-2); max-width: 70ch; }
.rx-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- buttons: the original .rl-btn family (rentee-list.css); a quiet text button for links that act ---- */
.rx-quiet { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--rx-teal); padding: 0 8px; font: inherit; cursor: pointer; }
.rx-quiet:hover { text-decoration: underline; }

/* an Edit ▾ style menu */
.rx-menu { position: relative; }
.rx-menu > summary { list-style: none; }
.rx-menu > summary::-webkit-details-marker { display: none; }
.rx-menu-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px;
  background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R);
  padding: 4px; box-shadow: 0 8px 24px rgba(20, 38, 44, .12);
}
.rx-menu-list a, .rx-menu-list button {
  display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none;
  color: var(--rx-ink); font: 400 14px/20px inherit; font-family: inherit; border-radius: var(--rx-r); cursor: pointer;
}
.rx-menu-list a:hover, .rx-menu-list button:hover { background: var(--rx-teal-wash); text-decoration: none; }
.rx-menu-list .is-danger { color: var(--rx-crit); }
.rx-menu-list hr { border: 0; border-top: 1px solid var(--rx-line); margin: 4px 0; }

/* ---- status pill: 22px, a dot and a word ---- */
.rx-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  border-radius: 11px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--rx-line-2); color: var(--rx-ink-2);
}
.rx-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rx-pill.is-good { background: var(--rx-good-wash); color: var(--rx-good); }
.rx-pill.is-warn { background: var(--rx-warn-wash); color: var(--rx-warn); }
.rx-pill.is-crit { background: var(--rx-crit-wash); color: var(--rx-crit); }
.rx-pill.is-teal { background: var(--rx-teal-wash); color: var(--rx-teal); }
.rx-good { color: var(--rx-good); } .rx-warn { color: var(--rx-warn); } .rx-crit { color: var(--rx-crit); }

/* ---- sections: white, 1px border, no shadow ---- */
.rx-sec { background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); min-width: 0; }
.rx-sec-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.rx-sec-head h2 { flex: 1; font-size: 16px; }
.rx-sec-hint { padding: 4px 20px 0; font-size: 13px; color: var(--rx-ink-2); }
.rx-sec-body { padding: 16px 20px 20px; }
.rx-sec-body.is-flush { padding: 12px 0 0; }
.rx-grid { display: grid; gap: 16px; }
.rx-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* read view: label over value */
.rx-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 24px; margin: 0; }
.rx-facts > div { min-width: 0; }
.rx-facts dt { font-size: 12px; color: var(--rx-mute); margin: 0 0 2px; }
.rx-facts dd { margin: 0; font-size: 14px; color: var(--rx-ink); overflow-wrap: anywhere; }
.rx-facts dd.is-unset { color: var(--rx-mute); }
.rx-facts .is-wide { grid-column: 1 / -1; }

.rx-money-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--rx-line); }
.rx-money-row > div { padding: 14px 20px; border-right: 1px solid var(--rx-line-2); }
.rx-money-row dt { font-size: 12px; color: var(--rx-mute); }
.rx-money-row dd { margin: 2px 0 0; font-size: 20px; font-weight: 600; line-height: 28px; }
.rx-money-row small { display: block; font-size: 12px; color: var(--rx-ink-2); font-weight: 400; }

.rx-empty { padding: 24px 20px; color: var(--rx-ink-2); font-size: 14px; }
.rx-empty b { display: block; color: var(--rx-ink); font-weight: 600; margin-bottom: 4px; }
.rx-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--rx-r); background: var(--rx-warn-wash); color: var(--rx-ink); font-size: 13px; }
.rx-note.is-crit { background: var(--rx-crit-wash); }
.rx-note.is-info { background: var(--rx-teal-wash); }

/* ---- tabs with count badges; scroll sideways on a phone ---- */
.rx-tabs { display: flex; flex-wrap: wrap; gap: 0 2px; border-bottom: 1px solid var(--rx-line); }
.rx-tabs::-webkit-scrollbar { display: none; }
.rx-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px;
  border: 0; background: none; color: var(--rx-ink-2); font: 500 14px/1 inherit; font-family: inherit; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.rx-tab:hover { color: var(--rx-ink); }
.rx-tab.is-on { color: var(--rx-ink); border-bottom-color: var(--rx-teal); font-weight: 600; }
.rx-tab b { font-weight: 500; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rx-line-2); color: var(--rx-ink-2); display: inline-flex; align-items: center; justify-content: center; }
.rx-tab b.is-crit { background: var(--rx-crit-wash); color: var(--rx-crit); }
.rx-tab b.is-warn { background: var(--rx-warn-wash); color: var(--rx-warn); }
.rx-panel { display: none; flex-direction: column; gap: 16px; }
.rx-panel.is-on { display: flex; }

/* ---- the record layout: sticky stage rail + content ---- */
.rx-record { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; align-items: start; }
.rx-rail { position: sticky; top: 16px; background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); padding: 12px 8px; }
.rx-rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rx-rail li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 6px 8px; border-radius: var(--rx-r); font-size: 13px; color: var(--rx-ink-2); }
.rx-rail li .rx-step { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rx-line); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--rx-mute); background: var(--rx-sheet); }
.rx-rail li.is-done .rx-step { background: var(--rx-teal); border-color: var(--rx-teal); color: var(--rx-teal-ink); }
.rx-rail li.is-done { color: var(--rx-ink); }
.rx-rail li.is-now { background: var(--rx-teal-wash); color: var(--rx-ink); font-weight: 600; }
.rx-rail li.is-now .rx-step { border-color: var(--rx-teal); color: var(--rx-teal); font-weight: 600; }
.rx-rail .rx-blockers { grid-column: 2; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-weight: 400; }
.rx-rail .rx-blockers a { font-size: 12px; color: var(--rx-crit); }
.rx-rail-cta { padding: 12px 8px 4px; border-top: 1px solid var(--rx-line); margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.rx-rail-cta .rl-btn { width: 100%; justify-content: center; }
.rx-progress { display: none; }
.rx-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---- tables: 44px rows, sticky header ---- */
.rx-table-wrap { overflow-x: auto; }
.rx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rx-table th { text-transform: none; letter-spacing: 0; position: sticky; top: 0; background: var(--rx-sheet); text-align: left; font-size: 12px; font-weight: 500; color: var(--rx-mute); padding: 8px 12px; border-bottom: 1px solid var(--rx-line); white-space: nowrap; }
.rx-table td { padding: 10px 12px; height: 44px; border-bottom: 1px solid var(--rx-line-2); vertical-align: middle; }
.rx-table tr:last-child td { border-bottom: 0; }
.rx-table th:first-child, .rx-table td:first-child { padding-left: 20px; }
.rx-table th:last-child, .rx-table td:last-child { padding-right: 20px; }
.rx-table tbody tr.is-link { cursor: pointer; }
.rx-table tbody tr.is-link:hover td { background: var(--rx-desk); }
.rx-table tfoot td { font-weight: 600; border-top: 1px solid var(--rx-line); }
.rx-table .rx-sub { display: block; font-size: 12px; color: var(--rx-mute); }
.rx-table tr.is-na td { color: var(--rx-mute); }

/* checklist chips: 28px */
.rx-chips { display: inline-flex; gap: 4px; }
.rx-chip {
  height: 28px; min-width: 44px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--rx-line);
  background: var(--rx-sheet); color: var(--rx-ink-2); font: 500 12px/1 inherit; font-family: inherit; cursor: pointer;
}
.rx-chip:hover { border-color: var(--rx-mute); }
.rx-chip.is-on { background: var(--rx-teal); border-color: var(--rx-teal); color: var(--rx-teal-ink); }
.rx-chip.is-on.is-no { background: var(--rx-crit); border-color: var(--rx-crit); color: #fff; }
.rx-chip[disabled] { cursor: default; opacity: .7; }
.rx-count { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--rx-ink-2); }
.rx-bar { flex: 0 0 120px; height: 6px; border-radius: 3px; background: var(--rx-line-2); overflow: hidden; }
.rx-bar > i { display: block; height: 100%; background: var(--rx-teal); border-radius: 3px; }
.rx-bar.is-good > i { background: var(--rx-good); }

/* 9-segment stage bar for lists */
.rx-stagebar { display: inline-grid; grid-template-columns: repeat(9, 8px); gap: 2px; vertical-align: middle; }
.rx-stagebar i { height: 6px; border-radius: 2px; background: var(--rx-line); }
.rx-stagebar i.is-on { background: var(--rx-teal); }

/* ---- forms ---- */
.rx-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rx-form .is-wide { grid-column: 1 / -1; }
/* fields are the original .rf-field / .rf-lbl / .rf-in (rentee-list.css). A field written
   without a class takes the same original values, so nothing on a .rx page looks different. */
.rx :is(select, textarea, input[type=text], input[type=date], input[type=number], input[type=tel], input[type=email], input[type=search]):not([class]) {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--rl-line); background: var(--rl-sunk); color: var(--rl-ink);
  font-family: inherit; font-size: 14px; line-height: 1.35;
}
.rx :is(select, textarea, input):not([class]):focus { outline: 0; border-color: var(--rl-brand); background: var(--rl-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rl-brand) 16%, transparent); }
.rx textarea.rf-in { resize: vertical; min-height: 84px; }
.rx-money-in { position: relative; }
.rx-money-in::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--rx-mute); }
.rx-money-in input { padding-left: 24px; text-align: right; }
.rx-err { color: var(--rx-crit); font-size: 13px; }

/* ---- drawer: 520px from the right, full screen on a phone ---- */
.rx-drawer-wrap { position: fixed; inset: 0; z-index: 1000; display: none; }
.rx-drawer-wrap.is-open { display: block; }
.rx-drawer-scrim { position: absolute; inset: 0; background: var(--rx-scrim); }
.rx-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100%;
  background: var(--rx-sheet); display: flex; flex-direction: column; border-left: 1px solid var(--rx-line);
  transform: translateX(0); transition: transform .2s ease;
}
.rx-drawer-wrap.is-entering .rx-drawer { transform: translateX(24px); }
.rx-drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rx-line); }
.rx-drawer-head h2 { flex: 1; }
.rx-drawer-x { width: 32px; height: 32px; border: 0; background: none; border-radius: var(--rx-r); color: var(--rx-ink-2); font-size: 20px; cursor: pointer; }
.rx-drawer-x:hover { background: var(--rx-line-2); }
.rx-drawer-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.rx-drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--rx-line); background: var(--rx-sheet); }
.rx-drawer-foot .rx-err { margin-right: auto; align-self: center; }
.rx-drawer .rx-form { grid-template-columns: 1fr 1fr; }

/* ---- toast ---- */
.rx-toasts { position: fixed; right: 24px; bottom: 24px; z-index: 1100; display: flex; flex-direction: column; gap: 8px; }
.rx-toast { background: var(--rx-ink); color: var(--rx-sheet); padding: 10px 16px; border-radius: var(--rx-r); font-size: 14px; animation: rx-in .2s ease; }
.rx-toast.is-crit { background: var(--rx-crit); color: #fff; }
@keyframes rx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- list pages ---- */
.rx-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--rx-line); }
.rx-toolbar input[type=search] { flex: 1 1 240px; max-width: 360px; }
.rx-toolbar select { width: auto; min-width: 150px; }
.rx-skel td::after { content: ""; display: block; height: 12px; border-radius: 4px; background: var(--rx-line-2); }
.rx-pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; font-size: 13px; color: var(--rx-ink-2); border-top: 1px solid var(--rx-line); }

/* ---- the start wizard: steps + aside ---- */
.rx-steps { display: flex; gap: 24px; font-size: 13px; color: var(--rx-mute); }
.rx-steps span { display: inline-flex; align-items: center; gap: 8px; }
.rx-steps span i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rx-line); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; }
.rx-steps .is-now { color: var(--rx-ink); font-weight: 600; }
.rx-steps .is-now i { border-color: var(--rx-teal); color: var(--rx-teal); }
.rx-steps .is-done i { background: var(--rx-teal); border-color: var(--rx-teal); color: var(--rx-teal-ink); }
.rx-wizard { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.rx-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.rx-choice label { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--rx-line); border-radius: var(--rx-R); cursor: pointer; background: var(--rx-sheet); }
.rx-choice label:hover { border-color: var(--rx-mute); }
.rx-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rx-choice label:has(input:checked) { border-color: var(--rx-teal); box-shadow: inset 0 0 0 1px var(--rx-teal); background: var(--rx-teal-wash); }
.rx-choice small { color: var(--rx-ink-2); font-size: 13px; }
.rx-stickyfoot { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px; background: var(--rx-sheet); border-top: 1px solid var(--rx-line); border-radius: 0 0 var(--rx-R) var(--rx-R); }

/* ---- project building view ---- */
.rx-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--rx-ink-2); }
.rx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rx-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.rx-floors { display: flex; flex-direction: column; gap: 8px; }
.rx-floor { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; }
.rx-floor > b { font-size: 12px; font-weight: 500; color: var(--rx-mute); padding-top: 14px; }
.rx-floor-units { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-unit {
  width: 84px; min-height: 52px; padding: 6px 8px; border-radius: var(--rx-r); border: 1px solid var(--rx-line);
  background: var(--rx-sheet); text-align: left; cursor: pointer; font-family: inherit; color: var(--rx-ink);
  display: flex; flex-direction: column; gap: 2px;
}
.rx-unit b { font-size: 13px; font-weight: 600; }
.rx-unit small { font-size: 11px; color: var(--rx-ink-2); }
.rx-unit:hover { border-color: var(--rx-mute); }
.rx-unit.u-available { background: var(--rx-sheet); }
.rx-unit.u-reserved  { background: var(--rx-warn-wash); border-color: transparent; }
.rx-unit.u-sold      { background: var(--rx-good-wash); border-color: transparent; }
.rx-unit.u-held      { background: var(--rx-line-2); border-color: transparent; color: var(--rx-mute); }
.rx-unit.is-dim { opacity: .25; }
.rx-legend .u-available { border: 1px solid var(--rx-line); background: var(--rx-sheet); }
.rx-legend .u-reserved { background: var(--rx-warn-wash); }
.rx-legend .u-sold { background: var(--rx-good-wash); }
.rx-legend .u-held { background: var(--rx-line-2); }
.rx-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- dashboards ---- */
.rx-period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rx-seg { display: inline-flex; border: 1px solid var(--rx-line); border-radius: var(--rx-r); overflow: hidden; background: var(--rx-sheet); }
.rx-seg a, .rx-seg button { padding: 0 12px; height: 34px; display: inline-flex; align-items: center; font-size: 13px; color: var(--rx-ink-2); border: 0; background: none; border-right: 1px solid var(--rx-line); cursor: pointer; font-family: inherit; }
.rx-seg a:last-child, .rx-seg button:last-child { border-right: 0; }
.rx-seg a:hover { text-decoration: none; color: var(--rx-ink); }
.rx-seg .is-on { background: var(--rx-teal-wash); color: var(--rx-teal); font-weight: 600; }
.rx-updated { font-size: 12px; color: var(--rx-mute); }
.rx-seg .rx-seg-s { display: none; }

.rx-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); }
.rx-fig { padding: 16px 20px; border-right: 1px solid var(--rx-line-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; color: inherit; }
.rx a.rx-fig { color: inherit; }
.rx a.rx-fig:hover { text-decoration: none; background: var(--rx-desk); }
.rx-fig:last-child { border-right: 0; }
.rx-fig dt, .rx-fig > span { font-size: 13px; color: var(--rx-ink-2); }
.rx-fig strong { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.02em; color: var(--rx-ink); }
.rx-fig small { font-size: 12px; color: var(--rx-mute); }
.rx-delta { font-size: 12px; font-weight: 500; }
.rx-delta.is-good { color: var(--rx-good); } .rx-delta.is-crit { color: var(--rx-crit); } .rx-delta.is-flat { color: var(--rx-mute); }

.rx-attn { list-style: none; margin: 0; padding: 0; }
.rx-attn li { display: grid; grid-template-columns: 8px 1fr auto; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--rx-line-2); }
.rx-attn li:first-child { border-top: 0; }
.rx-attn li > i { width: 8px; height: 8px; border-radius: 50%; background: var(--rx-mute); }
.rx-attn li.is-crit > i { background: var(--rx-crit); }
.rx-attn li.is-warn > i { background: var(--rx-warn); }
.rx-attn li b { font-weight: 600; }
.rx-attn li small { display: block; font-size: 12px; color: var(--rx-mute); }
.rx-attn-none { padding: 16px 20px; color: var(--rx-ink-2); }

.rx-chart { position: relative; height: 240px; }
.rx-chart-table { display: none; }
.rx-sec.is-table .rx-chart { display: none; }
.rx-sec.is-table .rx-chart-table { display: block; }

.rx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.rx-tile { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); color: inherit; }
.rx a.rx-tile:hover { text-decoration: none; border-color: var(--rx-mute); }
.rx-tile h3 { font-size: 14px; }
.rx-tile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--rx-ink-2); }
.rx-tile li { display: flex; justify-content: space-between; gap: 12px; }
.rx-tile li b { color: var(--rx-ink); font-weight: 600; }

/* ---- motion: drawers and toasts only, and none if asked ---- */
@media (prefers-reduced-motion: reduce) {
  .rx-drawer, .rx-toast { transition: none !important; animation: none !important; }
}

/* ---- tablet ---- */
@media (max-width: 1100px) {
  .rx-wizard { grid-template-columns: 1fr; }
  .rx-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- phone: rail becomes a progress bar, tables stack, drawers full screen ---- */
@media (max-width: 760px) {
  .rx.rx-page, .rx .rx-page { padding: 16px; }
  .rx-record { grid-template-columns: 1fr; gap: 16px; }
  .rx-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rx-rail { display: none; }
  .rx-progress { display: flex; flex-direction: column; gap: 8px; background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); padding: 12px 16px; }
  .rx-progress-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
  .rx-progress .rx-bar { flex: none; width: 100%; }
  .rx-grid-2, .rx-grid-3, .rx-form, .rx-drawer .rx-form { grid-template-columns: 1fr; }
  .rx-drawer { width: 100%; border-left: 0; }
  .rx-head-actions { width: 100%; }
  .rx-table.is-stack thead { display: none; }
  .rx-table.is-stack, .rx-table.is-stack tbody, .rx-table.is-stack tr, .rx-table.is-stack td { display: block; width: 100%; }
  .rx-table.is-stack tr { padding: 10px 16px; border-bottom: 1px solid var(--rx-line-2); }
  .rx-table.is-stack td { height: auto; padding: 2px 0 !important; border: 0; text-align: left; }
  .rx-table.is-stack td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--rx-mute); }
  .rx-table.is-stack td.rx-num { text-align: left; }
  .rx-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-fig { border-bottom: 1px solid var(--rx-line-2); }
  .rx-fig strong { font-size: 20px; line-height: 28px; }
  .rx-money-row dd { font-size: 16px; }
  .rx-floor { grid-template-columns: 1fr; gap: 4px; }
  .rx-floor > b { padding-top: 0; }
  .rx-toasts { left: 16px; right: 16px; bottom: 16px; }
  .rx-steps { gap: 12px; }
  .rx-stickyfoot { padding: 12px 16px; }
}

/* ---- sales record extras ---- */
.rx .rx-sub { display: block; font-size: 12px; color: var(--rx-mute); font-weight: 400; }
.rx-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.rx-photo { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rx-photo img, .rx-photo-doc { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rx-r); border: 1px solid var(--rx-line); display: flex; align-items: center; justify-content: center; background: var(--rx-desk); color: var(--rx-mute); font-weight: 600; }
.rx-photo figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.rx-photo figcaption span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-photo-act { display: flex; flex-wrap: wrap; gap: 2px; }
.rx-buyer-pick { position: relative; }
.rx-buyer-list { position: absolute; left: 0; right: 0; top: 66px; z-index: 5; background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-r); box-shadow: 0 8px 24px rgba(20, 38, 44, .12); max-height: 260px; overflow-y: auto; }
.rx-buyer-list button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; font: inherit; color: var(--rx-ink); cursor: pointer; }
.rx-buyer-list button:hover, .rx-buyer-list button.is-on { background: var(--rx-teal-wash); }
.rx-buyer-list small { color: var(--rx-mute); margin-left: 6px; }
.rx-chip-radio { display: inline-flex; align-items: center; position: relative; }
.rx-chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.rx-chip-radio:has(input:checked) { background: var(--rx-teal); border-color: var(--rx-teal); color: var(--rx-teal-ink); }
.rx-chip-radio:has(input:focus-visible) { box-shadow: var(--rx-focus); }
.rx-rail .js-stage[disabled] { opacity: .45; }
.rx-blockers-inline a { color: var(--rx-crit); }
.rx-record.is-removed { opacity: .4; pointer-events: none; }

/* ---- dashboard layout (Part B) ----
   Header, the figures row, then a main chart beside the attention list, then
   pairs of tables or charts. Everything collapses to one column on a tablet. */
.rx-dash-meta { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 12px; color: var(--rx-mute); }
.rx-dash-meta a { color: var(--rx-teal); }
.rx-dash-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rx-dash-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rx-dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rx-period-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rx .rx-period-form input[type=date], .rx .rx-period-form select { height: 34px; width: auto; min-width: 0; font-size: 13px; padding: 0 8px; }
.rx .rx-period-form select { max-width: 220px; }
.rx-sec-head .rx-sec-link { font-size: 13px; white-space: nowrap; }
.rx-sec-head .rx-sec-count { font-size: 13px; color: var(--rx-mute); }
.rx-sec-foot { padding: 10px 20px 14px; font-size: 13px; color: var(--rx-ink-2); border-top: 1px solid var(--rx-line-2); }
.rx-chart.is-tall { height: 300px; }
.rx-chart.is-short { height: 200px; }
.rx-attn li > div { min-width: 0; overflow-wrap: anywhere; }
.rx-attn li > a { font-size: 13px; white-space: nowrap; }
.rx-tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rx-tile-foot { margin-top: auto; padding-top: 4px; font-size: 13px; }
.rx-tile li b.is-crit { color: var(--rx-crit); } .rx-tile li b.is-warn { color: var(--rx-warn); }
.rx-strips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rx-strip { padding: 4px 0 8px; border-right: 1px solid var(--rx-line-2); min-width: 0; }
.rx-strip:last-child { border-right: 0; }
.rx-strip h3 { display: flex; align-items: center; gap: 8px; padding: 8px 20px; font-size: 13px; font-weight: 600; color: var(--rx-ink-2); }
.rx-strip h3 b { font-weight: 500; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rx-line-2); color: var(--rx-ink-2); display: inline-flex; align-items: center; justify-content: center; }
.rx-strip.is-crit h3 b { background: var(--rx-crit-wash); color: var(--rx-crit); }
.rx-strip.is-warn h3 b { background: var(--rx-warn-wash); color: var(--rx-warn); }
.rx-strip ul { list-style: none; margin: 0; padding: 0; }
.rx-strip li a { display: block; padding: 6px 20px; color: var(--rx-ink); font-size: 13px; }
.rx-strip li a:hover { background: var(--rx-desk); text-decoration: none; }
.rx-strip li small { display: block; font-size: 12px; color: var(--rx-mute); }
.rx-strip > p { padding: 4px 20px; font-size: 13px; color: var(--rx-mute); }
.rx-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 24px; margin: 0; }
.rx-dl dt { font-size: 12px; color: var(--rx-mute); }
.rx-dl dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; color: var(--rx-ink); }
.rx-band { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; background: var(--rx-line-2); color: var(--rx-ink-2); }
.rx-band.is-good { background: var(--rx-good-wash); color: var(--rx-good); }
.rx-band.is-crit { background: var(--rx-crit-wash); color: var(--rx-crit); }
.rx-prose { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--rx-ink-2); max-width: 90ch; }
.rx-prose b { color: var(--rx-ink); font-weight: 600; }
.rx-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .rx-dash-top, .rx-dash-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .rx-head-actions .rx-period { flex: 1 1 100%; min-width: 0; max-width: 100%; }
  .rx-seg { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .rx-seg::-webkit-scrollbar { display: none; }
  .rx-seg a, .rx-seg button { padding: 0 9px; font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
  .rx-seg .rx-seg-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rx-seg .rx-seg-s { display: inline; }
  .rx-strips { grid-template-columns: 1fr; }
  .rx-strip { border-right: 0; border-bottom: 1px solid var(--rx-line-2); }
  .rx-strip:last-child { border-bottom: 0; }
  .rx-sec-head, .rx-sec-hint { padding-left: 16px; padding-right: 16px; }
  .rx-sec-body { padding: 12px 16px 16px; }
  .rx-attn li { padding: 12px 16px; }
  .rx-chart { height: 220px; }
  /* stacked rows are tall: a phone shows the first five, "View all" has the rest */
  .rx-dash-tbl tbody tr:nth-child(n+6) { display: none; }
  .rx-sec.is-table .rx-dash-tbl tbody tr:nth-child(n+6) { display: block; }
}
.rx-check td:first-child { min-width: 220px; }
.rx-check .rx-remark { min-width: 160px; height: 32px; }
.rx-check tr.is-na td { color: var(--rx-mute); }
/* what is needed later (before listing) is information, not an alarm */
.rx-rail .rx-blockers.is-ahead a, .rx-blockers-inline.is-ahead a { color: var(--rx-ink-2); }

/* ---- list pages that opt in ('rx' in includes/list_defs.php) ----
   The list engine's own tokens are pointed at this palette, so every rule
   in rentee-list.css follows; the shapes are then tightened here. */
.rx-list .rl, html.dark .rx-list .rl { background: transparent; padding: 0; font-family: inherit; }
.rx-list .rl-head { align-items: flex-start; margin-bottom: 16px; }
.rx-list .rl-titlewrap { flex-direction: column; align-items: flex-start; gap: 4px; }
.rx-list .rl-title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; }
.rx-list .rl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); margin-bottom: 16px; }
.rx-list .rl-stat { background: none; border: 0; border-right: 1px solid var(--rx-line-2); border-radius: 0; box-shadow: none; padding: 14px 20px; }
.rx-list .rl-stat:last-child { border-right: 0; }
.rx-list .rl-stat::before, .rx-list .rl-stat::after { display: none; }
.rx-list .rl-stat .k { font-size: 13px; font-weight: 400; color: var(--rx-ink-2); }
.rx-list .rl-stat .v { font-size: 20px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rx-list .rl-card { border: 1px solid var(--rx-line); border-radius: var(--rx-R); box-shadow: none; overflow: visible; }
.rx-list .tn-bar { padding: 12px 20px; gap: 8px; border-bottom: 1px solid var(--rx-line); }
.rx-list .tn-tabs { padding: 0 12px; gap: 2px; border-bottom: 1px solid var(--rx-line); }
.rx-list .tn-tab { border-radius: 0; background: none; border: 0; border-bottom: 2px solid transparent; height: 42px; padding: 0 10px; font-weight: 500; color: var(--rx-ink-2); box-shadow: none; }
.rx-list .tn-tab.is-on { color: var(--rx-ink); border-bottom-color: var(--rx-teal); background: none; font-weight: 600; }
.rx-list .tn-tab b { font-weight: 500; font-size: 12px; padding: 1px 6px; border-radius: 10px; background: var(--rx-line-2); color: var(--rx-ink-2); }
.rx-list .tn-scroll { max-height: 70vh; overflow: auto; }
.rx-list .tn-table thead th { position: sticky; top: 0; z-index: 1; background: var(--rx-sheet); font-size: 12px; font-weight: 500; padding: 10px 12px; text-transform: none; letter-spacing: 0; }
.rx-list .tn-table tbody td { padding: 8px 12px; height: 44px; font-size: 14px; color: var(--rx-ink); }
.rx-list .tn-table th:first-child, .rx-list .tn-table td:first-child { padding-left: 20px; }
.rx-list .tn-table .tn-n { font-weight: 500; font-variant-numeric: tabular-nums; }
.rx-list .tn-av { display: none; }
.rx-list .tn-name { font-weight: 600; color: var(--rx-ink); }
.rx-list .tn-sub { font-size: 12px; color: var(--rx-mute); }
.rx-list .tn-pill { height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.rx-list .tn-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rx-list .tn-ok { background: var(--rx-good-wash); color: var(--rx-good); }
.rx-list .tn-warn { background: var(--rx-warn-wash); color: var(--rx-warn); }
.rx-list .tn-crit { background: var(--rx-crit-wash); color: var(--rx-crit); }
.rx-list .tn-neu { background: var(--rx-line-2); color: var(--rx-ink-2); }
.rx-list .tn-foot { padding: 12px 20px; border-top: 1px solid var(--rx-line); }
.rx-list .rx-stagebar { display: grid; margin-bottom: 4px; }
.rx-list .rx-skel td { height: 44px; }
@media (max-width: 760px) {
  .rx-list .rl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-list .rl-stat { border-bottom: 1px solid var(--rx-line-2); }
  .rx-list .tn-tabs { flex-wrap: nowrap; overflow-x: auto; }
}
.rx-list .rl-head { background: none; border: 0; box-shadow: none; padding: 0; }
.rx-list .rl-head::before, .rx-list .rl-head::after { display: none; }
.rx-list .tn-table td:first-child { min-width: 240px; }
.rx-list .tn-pill { white-space: nowrap; }
.rx-list .tn-id { min-width: 0; }
.rx-list .rl .rl-title { font-size: 20px; line-height: 28px; font-weight: 600; }
.rx-list .tn-sort { font-size: 12px; font-weight: 500; color: var(--rx-mute); letter-spacing: 0; text-transform: none; }
.rx-list .tn-sort i { font-size: 12px; opacity: .6; }
.rx-list .tn-count { font-size: 13px; color: var(--rx-ink-2); }
.rx-list .tn-table td.tn-muted { white-space: nowrap; }

/* ---- Roles & permissions ---- */
.rx-roles { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.rx-roles-list tr.is-on td { background: var(--rx-teal-wash); }
.rx-roles-who { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 13px; }
.rx-roles-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.rx-matrix-wrap { overflow-x: auto; border-top: 1px solid var(--rx-line); }
.rx-matrix th.rx-c, .rx-matrix td.rx-c { text-align: center; width: 72px; }
.rx-matrix td.rx-c input, .rx-matrix .rx-more input { width: 18px; height: 18px; accent-color: var(--rx-teal); }
.rx-matrix td:first-child { min-width: 240px; }
.rx-matrix tr.rx-matrix-g th { background: var(--rx-desk); color: var(--rx-ink); font-size: 13px; font-weight: 600; position: static; }
.rx-matrix .rx-more { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 180px; font-size: 13px; }
.rx-matrix .rx-more label { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.rx .rx-q { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--rx-line); font-size: 11px; font-weight: 600; color: var(--rx-ink-2); text-decoration: none; margin-left: 4px; }
.rx .rx-q:hover { border-color: var(--rx-teal); color: var(--rx-teal); text-decoration: none; }
.rx-preview-bar { position: sticky; top: 61px; z-index: 30; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 16px; margin: 0 0 12px; background: var(--rx-warn-wash); color: var(--rx-ink); border: 1px solid var(--rx-warn); border-radius: var(--rx-R); font-size: 14px; }
@media (max-width: 1023.98px) { .rx-roles { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .rx-matrix td.rx-c input, .rx-matrix .rx-more input { width: 24px; height: 24px; } }
.rx-roles-members { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; }
@media (max-width: 768px) { .rx-roles-who a { display: inline-flex; align-items: center; min-height: 40px; } }

/* ==========================================================================
   Help Center (v4): the pages, the "?" drawer, field hints, search, tours
   ========================================================================== */
.hc-page { gap: 16px; }
.hc-search { display: flex; gap: 8px; align-items: center; }
.hc-search input { flex: 1; min-width: 0; }
.hc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.hc-card { display: block; padding: 14px 16px; border: 1px solid var(--rx-line); border-radius: var(--rx-R); color: var(--rx-ink); background: var(--rx-sheet); }
.rx a.hc-card { color: var(--rx-ink); }
.rx a.hc-card:hover { border-color: var(--rx-teal); text-decoration: none; background: var(--rx-teal-wash); }
.hc-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 20px 24px; }
.hc-topic h3 { font-size: 14px; margin-bottom: 6px; }
.hc-topic ul, .hc-faqlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hc-topic li a, .hc-faqlist a { display: inline-block; padding: 3px 0; }
.hc-article.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.hc-article.has-toc .hc-toc { order: 2; position: sticky; top: 80px; background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); padding: 12px 16px; font-size: 13px; }
.hc-toc ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hc-body { font-size: 15px; line-height: 1.6; max-width: 78ch; color: var(--rx-ink); }
.hc-body h2 { font-size: 18px; margin: 24px 0 8px; }
.hc-body h2:first-child { margin-top: 0; }
.hc-body h3 { font-size: 15px; margin: 18px 0 6px; }
.hc-body p { margin: 0 0 10px; }
.hc-body ol, .hc-body ul { margin: 0 0 12px; padding-left: 22px; }
.hc-body ol { list-style: decimal; }
.hc-body ul { list-style: disc; }
.hc-body li { margin: 2px 0; }
.hc-body li::marker { color: var(--rx-mute, #64748b); font-weight: 600; }
.hc-body li { margin: 3px 0; }
.hc-body code { background: var(--rx-desk); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.hc-body .hc-note { background: var(--rx-teal-wash); border-radius: var(--rx-r); padding: 10px 14px; margin: 0 0 12px; }
.hc-body .hc-table { font-size: 14px; margin-bottom: 12px; }
.hc-shot { margin: 12px 0 16px; }
.hc-shot img { width: 100%; height: auto; border: 1px solid var(--rx-line); border-radius: var(--rx-R); }
.hc-shot figcaption { font-size: 12px; color: var(--rx-mute); margin-top: 4px; }
.hc-results { list-style: none; margin: 0; padding: 0; }
.hc-results li { padding: 14px 20px; border-top: 1px solid var(--rx-line-2); display: flex; flex-direction: column; gap: 2px; }
.hc-results li:first-child { border-top: 0; }
.hc-err.is-on { border-color: var(--rx-teal); box-shadow: 0 0 0 2px var(--rx-teal-wash); }
.hc-editor { font-family: ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.5; }
/* the "?" by each page title, and the ⓘ by field labels */
.hc-q, .hc-i { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid #C6D3D7; background: transparent; color: #4E636B; cursor: pointer; font-family: inherit; font-weight: 600; vertical-align: middle; }
.hc-q { width: 24px; height: 24px; font-size: 13px; margin-left: 10px; }
.hc-i { width: 16px; height: 16px; font-size: 10px; font-style: italic; margin-left: 6px; font-family: Georgia, serif; }
.hc-q:hover, .hc-i:hover, .hc-q:focus-visible, .hc-i:focus-visible { border-color: #0B6E7C; color: #0B6E7C; outline: none; }
html.dark .hc-q, html.dark .hc-i { border-color: #3A5158; color: #A9BCC2; }
@media (max-width: 768px) { .hc-q { width: 40px; height: 40px; } .hc-i { width: 24px; height: 24px; font-size: 12px; } }
.hc-pop { position: absolute; z-index: 1200; background: var(--rx-sheet); color: var(--rx-ink); border: 1px solid var(--rx-line); border-radius: var(--rx-R); padding: 12px 14px; box-shadow: 0 8px 24px rgba(20, 38, 44, .16); font-size: 13px; line-height: 1.5; }
.hc-pop p { margin: 6px 0 0; }
.hc-pop span { color: var(--rx-mute); }
.hc-fix { font-weight: 600; text-decoration: underline; white-space: nowrap; color: inherit; }
.rx-toast .hc-fix { color: #fff; }
.hc-first { display: inline-flex; align-items: center; min-height: 32px; margin-top: 6px; font-weight: 500; }
/* the "?" drawer */
.hc-drawer h2 { font-size: 16px; margin: 18px 0 8px; }
.hc-drawer .hc-drawer-title { font-size: 18px; margin-top: 0; }
.hc-drawer-top { display: flex; justify-content: flex-end; }
.hc-drawer ol, .hc-drawer ul { padding-left: 20px; }
.hc-drawer h3 { font-size: 14px; margin: 14px 0 4px; }
.hc-fields dt { font-weight: 600; margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hc-fields dd { margin: 2px 0 0; color: var(--rx-ink-2); font-size: 14px; }
.hc-drawer-search { margin: 16px 0; }
/* the explained confirm */
.hc-confirm { display: flex; align-items: center; justify-content: center; padding: 16px; }
.hc-confirm-box { position: relative; background: var(--rx-sheet); border-radius: var(--rx-R); padding: 20px 24px; width: min(460px, 100%); display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--rx-line); }
.hc-confirm-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
/* Ctrl+K */
.hc-k { position: fixed; inset: 0; z-index: 1300; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.hc-k-scrim { position: absolute; inset: 0; background: var(--rx-scrim); }
.hc-k-box { position: relative; width: min(640px, 100%); max-height: 75vh; overflow: auto; background: var(--rx-sheet); border: 1px solid var(--rx-line); border-radius: var(--rx-R); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hc-k-res h3 { font-size: 12px; color: var(--rx-mute); font-weight: 500; margin: 8px 0 4px; }
.hc-k-res ul { list-style: none; margin: 0; padding: 0; }
.hc-k-res a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--rx-r); color: var(--rx-ink); }
.hc-k-res a:hover, .hc-k-res a:focus { background: var(--rx-teal-wash); text-decoration: none; }
.hc-k-res a span { font-size: 12px; color: var(--rx-mute); }
@media (max-width: 639.98px) { .hc-k { padding: 0; } .hc-k-box { max-height: 100dvh; height: 100dvh; border-radius: 0; } }
/* tour */
.hc-tour { position: fixed; z-index: 1250; background: var(--rx-sheet); border: 1px solid var(--rx-teal); border-radius: var(--rx-R); padding: 14px 16px; box-shadow: 0 10px 30px rgba(20, 38, 44, .2); font-size: 14px; }
.hc-tour p { margin: 6px 0 10px; color: var(--rx-ink-2); }
.hc-tour-act { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.hc-tour-act span { margin-right: auto; }
.hc-tour-act .rl-btn { flex: 0 0 auto; }
.hc-tour-on { outline: 3px solid #0B6E7C !important; outline-offset: 3px; border-radius: 6px; position: relative; z-index: 1240; }
@media (prefers-reduced-motion: reduce) { .hc-tour, .hc-pop { transition: none; } }
/* help outside the app: before sign-in and for tenants */
body.hc-solo { margin: 0; background: #F2F5F6; font-family: Inter, system-ui, sans-serif; }
html.dark body.hc-solo { background: #0E1A1E; }
.hc-solo-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px var(--page-gutter, 24px); background: var(--rx-sheet); border-bottom: 1px solid var(--rx-line); }
.hc-solo-brand { display: flex; flex-direction: column; color: var(--rx-ink); }
.rx a.hc-solo-brand:hover { text-decoration: none; }
.hc-solo-brand span { font-size: 12px; color: var(--rx-mute); }
.hc-solo-nav { display: flex; gap: 8px; }
.rx.hc-solo-main { padding: 24px var(--page-gutter, 24px); max-width: none; }
/* inside the owner portal the same pages wear the portal's own colours */
body.hc-owner .rx { --rx-desk: var(--clr-bg); --rx-sheet: var(--clr-card); --rx-ink: var(--clr-text); --rx-ink-2: var(--clr-muted); --rx-mute: var(--clr-muted);
  --rx-line: var(--clr-border); --rx-line-2: var(--clr-border); --rx-teal: var(--clr-accent); --rx-teal-wash: color-mix(in srgb, var(--clr-accent) 16%, transparent); --rx-teal-ink: #fff; font-family: var(--font-sans, Poppins, sans-serif); }
body.hc-owner .rx.rx-page { background: transparent; padding: 24px 0; }
@media (max-width: 1023.98px) { .hc-article.has-toc { grid-template-columns: 1fr; } .hc-article.has-toc .hc-toc { order: 0; position: static; } }
.main-sidebar .nav-help { margin-top: 8px; }
@media (max-width: 768px) {
  .hc-page :is(.rx-seg a, .rx-seg button, .hc-topic li a, .hc-faqlist a, .rx-crumbs a, .rx-sec-link),
  .hc-solo-bar a:not(.rl-btn), .hc-first, .hc-drawer a:not(.rl-btn) { display: inline-flex; align-items: center; min-height: 40px; min-width: 40px; }
  .hc-page .hc-topic li a, .hc-page .hc-faqlist a { min-width: 0; }
}
@media (max-width: 768px) {
  .hc-body li > a:only-child, .hc-results a { display: inline-flex; align-items: center; min-height: 40px; }
}
@media (max-width: 768px) { .hc-page li > a, .hc-toc a { display: inline-flex; align-items: center; min-height: 40px; } }
