/* ==========================================================================
   Tap-Pay Agent Portal — the recruiting CRM (docs/crm/RECRUITING-CRM.md).

   One small layer, loaded AFTER the desktop layers (css/app.css, css/onsight.css)
   and AFTER the phone layer (css/mobile.css, css/mobile-onsight.css), so it serves
   js/views/recruiting.js (the .rc- classes) and js/mobile/screens/recruiting.js
   (the .rcm- classes) from one file. It defines NO token: every colour, size and
   radius below is one the other layers already carry (--ink, --steel, --hair,
   --fs-body ...), so a white-label ISO's brand flows through untouched.

   WHERE EVERY GAP COMES FROM (checking-spacing)
     8px   between buttons, chips and pills on one line
     12px  inside a row, between its text and its buttons
     14px  between blocks: tabs -> chips -> panel -> panel (the portal's own rule)
   A block that follows another gets its space from a SIBLING rule here, never from
   a margin put on the screen. A pill row spaces what comes AFTER it, never before.

   Greg's rules for a screen (apple-ease): 17px body, 44px targets, one primary
   action, words as well as colour.
   ========================================================================== */

/* ---- Desktop: the screens ------------------------------------------------- */

/* Sales Pipeline found missing space between stage controls, search and cards.
   The shared layer gives all three shells 14px between blocks, 8px controls. */
.sp-controls, .sp-search, .sp-stages { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; margin-bottom: 14px; }
.sp-controls { justify-content: space-between; }
.sp-search label { width: 100%; font-size: var(--fs-label, .9375rem); color: var(--steel); }
.sp-search .input, .sp-search .m-input { flex: 1 1 220px; min-width: 0; min-height: 44px; font-size: var(--fs-body, 1.0625rem); }
.sp-search button, .sp-stages button, .sp-controls button { min-height: 44px; }
.sp-stages .rc-seg__btn { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--hair); border-radius: var(--r-sm, 10px); }
/* Sales Pipeline: keep every stage count bold at the right edge. */
.sp-stage-count { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-board .lane__head { display: flex; align-items: center; gap: 12px; }
.rc-board .lane__count { font-weight: 700; }
.sp-stages .rc-seg__btn.is-on { background: var(--ui-raised, var(--ink)); color: var(--ui-text, var(--surface)); }
.sp-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.sp-list .rc-card { margin: 0; min-width: 0; }
/* Pipeline's single-column cards must contain long merchant names, including
   names without spaces; found by the desktop long-name browser fixture. */
.sp-list .rc-card__name { max-width: 100%; overflow-wrap: anywhere; }
/* Pipeline quick actions stay visible and evenly spaced in list and board cards. */
.sp-quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; min-width: 0; }
.sp-quick-actions .btn, .sp-quick-actions .m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; width: auto; margin: 0; }
.sp-quick-actions a:focus-visible, .sp-quick-actions button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sp-native-list .sp-quick-actions { margin: 0; padding: 14px 22px; }
.sp-details { min-width: 0; }
.sp-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.sp-details p { margin: 0 0 8px; }
.sp-native-list { display: flex; flex-direction: column; gap: 14px; border: 0; border-radius: 0; background: transparent; }
.sp-native-list .sp-details { padding: 0 22px; }
.sp-native-list .rcm-item { border: 1px solid var(--hair); border-radius: var(--r, 14px); overflow: hidden; }
.sp-native-list .rcm-item:last-child { border-bottom: 1px solid var(--hair); }
.sp-native-list .m-lrow__primary { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.sp-native-list .m-lrow__secondary, .sp-native-list .m-lrow__third { white-space: normal; overflow-wrap: anywhere; }
.sp-headline { margin: 0 22px 14px; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.sp-native-filter { grid-template-columns: minmax(0, 1fr); }
.sp-modal .btn, .sp-modal .select { min-height: 44px; font-size: var(--fs-body, 1.0625rem); }
.sp-modal .btn--icon { min-width: 44px; }
.sp-controls button:focus-visible, .sp-stages button:focus-visible, .sp-search button:focus-visible, .sp-details summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 899px) {
  .sp-list { grid-template-columns: minmax(0, 1fr); }
  .rcm-body .sp-controls, .rcm-body .sp-search { margin-left: 22px; margin-right: 22px; }
  .sp-controls .m-tabs { padding: 0; }
  .sp-search .m-input { flex-basis: 100%; width: 100%; }
  .sp-search .m-btn { flex: 1 1 0; width: auto; }
}

/* Reports: 14px between blocks and cards, 8px between sibling controls.
   Shared by desktop and phone; scoped rules avoid desktop table geometry on phones. */
.rc-report { display: flex; flex-direction: column; gap: 14px; min-width: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.rc-report p, .rc-report h2 { margin: 0; }
.rc-report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rc-report-number { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r, 14px); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.rc-report-number span { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-report-number strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.rc-report-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-report-button, .rc-report-select { min-height: 44px; padding: 10px 16px; border: 1px solid var(--hair); border-radius: var(--r-sm, 10px); color: var(--ink); background: var(--surface); font: inherit; cursor: pointer; }
.rc-report-button[aria-pressed="true"] { background: var(--ui-raised, var(--ink)); color: var(--ui-text, var(--surface)); border-color: var(--ink); }
.rc-report-button:focus-visible, .rc-report-select:focus-visible, .rc-report summary:focus-visible, .rc-report-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.rc-report-button:hover { border-color: var(--steel); }
.rc-report-body, .rc-report-content, .rc-report-person, .rc-report-goals, .rc-report-secondary, .rc-report-people { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rc-report-person:empty, .rc-report-goals:empty { display: none; }
.rc-report-card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r, 14px); overflow: hidden; min-width: 0; }
.rc-report-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--hair); }
.rc-report-head h2 { font-size: 1.125rem; font-weight: 600; }
.rc-report-content { padding: 20px; }
.rc-report-note { color: var(--steel); line-height: 1.5; }
.rc-report-table { overflow-x: auto; max-width: 100%; }
.rc-report-table table { width: 100%; border-collapse: collapse; font: inherit; }
.rc-report-table th, .rc-report-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--hair); vertical-align: top; }
.rc-report-table th { color: var(--steel); font-weight: 600; }
.rc-report-definitions { margin: 0; display: grid; gap: 14px; }
.rc-report-definitions > div { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr); gap: 14px; }
.rc-report-definitions dt { font-weight: 600; }
.rc-report-definitions dd { margin: 0; overflow-wrap: anywhere; }
.rc-report-help summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--steel); }
.rc-report-help[open] .rc-report-definitions { margin-top: 14px; }
.rc-report-link { color: var(--ui-link, var(--accent)); min-height: 44px; display: flex; align-items: center; }
.rc-report-person-card { border: 1px solid var(--hair); border-radius: var(--r-sm, 10px); padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.rc-report--phone { padding: 0 20px 20px; }
.rc-report-select { width: 100%; }
@media (max-width: 700px) {
  .rc-report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-report-number { padding: 14px; }
  .rc-report-content, .rc-report-head { padding: 14px; }
  .rc-report-definitions > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* The record's stage chips (the one door): 44px chips, 8px apart, and 14px of air under
   the row, like .tabs. */
.rc-chips { gap: 8px; margin-bottom: 14px; }
.rc-chips .chip { min-height: 44px; padding: 0 16px; font-size: var(--fs-label, .9375rem); }
.panel__body > .rc-chips { margin-bottom: 0; }

/* The filter bar above a screen: ONE row of labelled dropdowns (Show, When, Whose, Stage,
   and the search box on Candidates). The row wraps only when the screen is too narrow;
   its one gap rule is here: 14px between fields, 8px if it wraps, 14px under the row. */
.rc-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; margin-bottom: 14px; }
.rc-filter { flex: 0 1 210px; min-width: 150px; }
.rc-filter--search { flex: 1 1 260px; max-width: 380px; }
.rc-filter > label { font-size: var(--fs-label, .9375rem); letter-spacing: 0; text-transform: none; }
.rc-filter .select, .rc-filter .input { min-height: 44px; font-size: var(--fs-body, 1.0625rem); }
/* The pipeline's Month: a label over a native select, 44px tall, 17px, the portal's own
   .select look. It follows the owner chips, which space what comes AFTER them, and it
   spaces what comes after it (the board) with the same 14px. */
.rc-month { max-width: 280px; margin-bottom: 14px; }
/* Inside the one-row filter bar the Month field is a column like the others: no extra bottom
   margin, or the row (aligned to the bottom edge) lifts it 14px above Whose. */
.rc-filters .rc-month { margin-bottom: 0; }
.rc-month .select { min-height: 44px; font-size: var(--fs-body, 1.0625rem); }

/* Candidates clear rows: the desktop directory uses the same 14px section rhythm,
   8px inner reading gap, 17px body copy and a wrapped 44px+ keyboard target. */
.rc-candidates-list { display:flex; flex-direction:column; gap:14px; }
.rc .rc-candidates-row { min-height:64px; border:1px solid var(--hair); border-radius:var(--r-sm,10px); padding:14px 16px; }
.rc-candidates-row__who { display:flex; flex-direction:column; gap:8px; }
.rc-candidates-row__name { overflow-wrap:anywhere; }
.rc-candidates-row__next, .rc-candidates-row__quiet { display:block; margin:0; font-size:var(--fs-body,1.0625rem); line-height:1.4; overflow-wrap:anywhere; }
.rc-candidates-row__meta { display:block; margin:0; overflow-wrap:anywhere; }
.rc-candidates-row:focus-visible, .rc-candidates-previous:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.rc-candidates-row .badge { min-height:28px; display:inline-flex; align-items:center; }
.rc-candidates-error { display:flex; flex-direction:column; gap:14px; }
.rc-candidates-error p { margin:0; }

/* The candidates controls: the search box and the stage chips on one wrapping line. */

/* A list of people inside a panel: name and line on the left, a word, then the
   buttons. 64px at least, so a finger or a mouse lands. */
.rc-list { display: flex; flex-direction: column; }
.rc-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 20px;
  border-bottom: 1px solid var(--hair);
}
.rc-row:last-child { border-bottom: 0; }
.rc-row--link { color: inherit; text-decoration: none; }
.rc-row--link:hover { background: var(--band, var(--press)); }
.rc-row__who { flex: 1 1 auto; min-width: 0; }
.rc-row__name {
  display: block; color: var(--ink); text-decoration: none;
  font-size: var(--fs-body, 1.0625rem); font-weight: 600;
}
a.rc-row__name:hover { text-decoration: underline; }
.rc-row__line { margin-top: 2px; font-size: var(--fs-label, .9375rem); color: var(--steel); }
.rc-row__acts { flex: none; gap: 8px; }
.rc-row .badge { flex: none; }

/* A narrow window: the buttons drop under the name and share the width. */
@media (max-width: 700px) {
  .rc-row { flex-wrap: wrap; }
  .rc-row__who { flex-basis: 100%; }
  .rc-row__acts { flex: 1 1 100%; }
  .rc-row__acts .btn { flex: 1 1 0; }
  /* A Sales reminder row can carry Call, Not today, Done and Use template: the buttons wrap two to a line. With three,
     the first (the main one) takes the line and the other two share the next, so no button is left alone. Recruiting's
     rows do not carry this class and lay out exactly as they did. */
  .rc-row__acts--sales { flex-wrap: wrap; }
  .rc-row__acts--sales .btn { flex: 1 1 calc(50% - 4px); min-height: 44px; }
  .rc-row__acts--sales .btn:first-child:nth-last-child(3) { flex-basis: 100%; }
}

/* The pager under the candidates. */
.rc-pager { justify-content: space-between; gap: 12px; }
.rc-pager__says { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-pager__acts { gap: 8px; }

/* ---- Stats and Activity (docs/crm/RECRUITING-CRM-STATS.md) ------------------------ */

/* A panel head that may carry a button: the same height with or without one. */
.rc-panelhead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 76px; box-sizing: border-box;
}

/* The line under the filter bar saying what is on screen: the range, its dates, whose numbers. */
.rc-summary { margin: 0 0 14px; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }

/* "What do these mean?": a native disclosure. The summary is a 44px button; what it opens is
   plain 17px text in a column with one gap between its parts. */
.rc-help { margin: 0 0 14px; }
.rc-help__sum { min-height: 44px; box-sizing: border-box; cursor: pointer; list-style: none; }
.rc-help__sum::-webkit-details-marker { display: none; }
.rc-help__body { display: flex; flex-direction: column; gap: 16px; padding: 14px 4px 4px; }
.rc-help__group { display: flex; flex-direction: column; gap: 8px; }
.rc-help__title { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 700; }
.rc-help__list { margin: 0; display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 6px 16px; }
.rc-help__term { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-help__says { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
@media (max-width: 560px) { .rc-help__list { grid-template-columns: 1fr; gap: 2px; } .rc-help__says { margin-bottom: 8px; } }

/* A goal: who it is for (only when it is everyone's), the sentence, the bar. The
   sentence is the answer; the bar is the picture of it. */
.rc-goals { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--hair); }
.panel > .rc-goals:last-child { border-bottom: 0; }
.rc-goal { display: flex; flex-direction: column; gap: 8px; }
.rc-goal__who { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-goal__says { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
/* Edit and Delete under a goal you may change (the Sales tab's own goals); the column's gap
   above sets them apart, so there is no margin here. */
.rc-goal__acts { flex-wrap: wrap; gap: 8px; }
/* "Set a goal" under Today's headline when there is none: one 44px button, not a full-width bar. */
.rc-goals__set { align-self: flex-start; }

/* The bar: a track in the hairline colour, a fill in ink. A goal that is met turns
   green AND says "Reached", so colour is never the only word. */
.rc-bar { display: block; height: 10px; border-radius: 5px; background: var(--hair); overflow: hidden; }
.rc-bar__fill { display: block; height: 100%; border-radius: 5px; background: var(--ui-secondary, var(--ink)); }
.rc-bar--done .rc-bar__fill { background: var(--green, #1C7A56); }
.rc-bar--thin { width: 88px; height: 8px; flex: none; }
/* Behind pace: the fill is amber. The word "Behind" is always beside it, so colour is never the only signal. */
.rc-bar--behind .rc-bar__fill { background: var(--amber, #A8761B); }

/* A number with its small bar, in a table cell. */
.rc-entered { display: inline-flex; align-items: center; justify-content: flex-end; gap: 12px; }
.rc-entered__n { min-width: 3ch; text-align: right; }

/* An Activity row: when, who, what, and the candidate it is about. */
.rc-act { flex-wrap: wrap; }
.rc-act__when { flex: 0 0 176px; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-act__who { flex: 0 0 150px; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-act__line { flex: 1 1 220px; min-width: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.rc-act__cand { flex: 0 1 auto; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; text-decoration: none; }
.rc-act__cand:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .rc-act__when, .rc-act__who { flex: 0 1 auto; }
  .rc-act__line, .rc-act__cand { flex: 1 1 100%; }
}

/* ---- The sheets (after-call, lost reason, add) ---------------------------- */

.rc-sheet__ask { margin: 0 0 14px; font-size: 1.125rem; font-weight: 600; color: var(--ink); }
/* Done logs the touch: which account and reminder the question is about, above the question. */
.rc-sheet__who { margin: 0 0 6px; font-size: var(--fs-label, .9375rem); color: var(--steel); }
.rc-choices { display: flex; flex-direction: column; gap: 8px; }
.rc-choice {
  width: 100%; justify-content: flex-start; min-height: 48px;
  font-size: var(--fs-body, 1.0625rem);
}
.rc-sheet .input, .rc-sheet .select, .rc-sheet .textarea { width: 100%; }
/* Goal reset sheet on phones exposed clipped Delete: shared sheet actions wrap with their gap. */
.rc-sheet__foot { margin-top: 14px; gap: 8px; flex-wrap: wrap; }
.rc-sheet__err { margin: 12px 0 0; color: var(--danger); font-size: var(--fs-label, .9375rem); }
.rc-sheet__err:empty { display: none; }
.rc-form { display: flex; flex-direction: column; gap: 14px; }

/* ---- The pipeline ---------------------------------------------------------- */

.rc { min-width: 0; }
/* Recruiting Pipeline controls: grouped controls use 8px gaps; each block keeps the
   screen's 14px rhythm. These rules apply only to the Recruiting Pipeline. */
.rc-pipeline-groups, .rc-pipeline-layout, .rc-pipeline-stages { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; min-width:0; }
.rc-pipeline-groups .btn, .rc-pipeline-layout .btn, .rc-pipeline-stages .btn { min-height:44px; }
.rc-pipeline-group.is-on, .rc-pipeline-layout-choice[aria-pressed="true"], .rc-pipeline-stage.is-on { border-color:var(--accent); background:var(--accent-tint); color:var(--ink); }
.rc-pipeline-list { display:flex; flex-direction:column; gap:14px; min-width:0; }
.rc-pipeline-list__title { margin:0; }
.rc-pipeline-count, .rc-pipeline-cap, .rc-pipeline-empty-count { margin:0; color:var(--steel); font-size:var(--fs-label,.9375rem); overflow-wrap:anywhere; }
.rc-card { min-width:0; overflow-wrap:anywhere; }
.rc-card__name { display:flex; align-items:center; min-height:44px; max-width:100%; overflow-wrap:anywhere; }
.rc-card__open, .rc-card__move { min-height:44px; }
.rc-card__owner { color:var(--steel); font-size:var(--fs-label,.9375rem); overflow-wrap:anywhere; }
.rc-card__foot { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; padding-top:8px; }
.rc-card__foot .btn { flex:1 1 160px; min-height:44px; }
.rc-pipeline-lane .rc-card { min-width:0; }
.rc-pipeline-board { min-width:0; }
.rc-pipeline-empty { margin-bottom:14px; }
.rc-pipeline-recovery { display:flex; flex-direction:column; gap:14px; }
/* Stretch the lanes to one height: the whole column is a place to drop a card. */
.rc-board { grid-auto-columns: minmax(230px, 1fr); align-items: stretch; }
.rc-boardwrap { min-width: 0; }  /* the board inside scrolls on its own */
.rc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
.rc-card__name {
  color: var(--ink); text-decoration: none;
  font-size: var(--fs-body, 1.0625rem); font-weight: 600;
}
.rc-card__name:hover { text-decoration: underline; }
.rc-card__line, .rc-card__next { font-size: var(--fs-label, .9375rem); color: var(--steel); }
.rc-card__next { color: var(--ink); }
.rc-card__foot {
  align-self: stretch; margin-top: 2px; padding-top: 6px;
  border-top: 1px solid var(--hair);
}
.rc-card__foot .btn, .rc-more { width: 100%; }

/* ---- One candidate ----------------------------------------------------------- */

.rc-head { display: flex; flex-direction: column; gap: 14px; }
.rc-head__who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
/* Candidate identity must shrink and wrap complete unbroken names on narrow records. */
.rc-name { flex: 1 1 100%; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rc-head__facts { color: var(--steel); font-size: var(--fs-body, 1.0625rem); min-width: 0; overflow-wrap: anywhere; }
.rc-acts { gap: 8px; }
.rc-hint { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.panel__body > .rc-hint { margin: 0; }
.rc-record-context { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; margin: 14px 0; }
.rc-record-context > .panel { min-width: 0; margin: 0; }
.rc-history { min-width: 0; }
.rc-history__summary { min-height: 44px; cursor: pointer; }
.rc-history__summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* These summaries inherit flex heads, so supply the disclosure cue they suppress. */
.rc-history__summary::after, .rcm-history__summary::after {
  content: ''; width: 8px; height: 8px; flex: 0 0 auto; align-self: center; margin-left: auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.rc-history[open] > .rc-history__summary::after, .rcm-history[open] > .rcm-history__summary::after { transform: rotate(225deg); }
.rc-addstep { gap: 8px; align-items: center; }
.rc-addstep .grow { flex: 1 1 220px; }
.rc-addstep .input { width: auto; }
.rc-addstep .grow .input { width: 100%; }
.rc-done { display: flex; flex-direction: column; gap: 4px; }
.rc-done__label { color: var(--steel); font-size: var(--fs-label, .9375rem); font-weight: 600; }
.rc-done__row { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-tl { padding: 4px 20px; }
.rc-tl__item { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.rc-tl__item:last-child { border-bottom: 0; }
.rc-tl__what { font-size: var(--fs-body, 1.0625rem); font-weight: 600; color: var(--ink); }
.rc-tl__body { margin-top: 4px; white-space: pre-wrap; font-size: var(--fs-body, 1.0625rem); }
.rc-tl__meta { margin-top: 4px; color: var(--steel); font-size: var(--fs-badge, .875rem); }
.rc-danger { display: flex; }
.panel + .rc-danger { margin-top: 14px; }
@media (min-width: 1100px) {
  .rc-record-context { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}

/* ---- The phone ------------------------------------------------------------------ */

/* The screen's body sits under the in-screen tabs, which carry their own 24px. */
.rcm-body { padding-bottom: 8px; }
.rcm-loading { padding: 24px var(--gutter, 22px); font-size: var(--fs-body, 1.0625rem); }
.rcm-headline { padding-top: 16px; padding-bottom: 12px; }
/* The line saying what is on screen (range, dates, whose numbers), under the phone's filters. */
.rcm-summary { margin: 0; padding-top: 4px; padding-bottom: 12px; }
.rcm-stagetabs .m-tabs { margin-top: 14px; }
/* A pill row spaces what comes AFTER it: the cards under the stage tabs. */
.rcm-stagetabs + * { margin-top: 14px; }
.rcm-search { margin: 14px var(--gutter, 22px) 0; }
.rcm-rows { margin-top: 0; }
.rcm-candidates .rcm-search { min-height:44px; }
.rcm-candidates .rcm-search + .rcm-filters { padding-top:14px; }
.rcm-candidates .rcm-filters { row-gap:8px; column-gap:8px; }
.rcm-candidates .rcm-filters + * { margin-top:14px; }
.rcm-candidates .rcm-pager { gap:14px; }
.rcm-candidates .m-lrow { min-height:64px; }
.rcm-candidates .m-lrow__primary { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; font-size:var(--fs-body,1.0625rem); }
.rcm-candidates .m-lrow__secondary { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; font-size:var(--fs-body,1.0625rem); line-height:1.4; }
.rcm-candidates .m-lrow__secondary.m-num { color:var(--steel); }
.rcm-candidates .m-search .m-grow { min-height:44px; font-size:var(--fs-body,1.0625rem); }
.rcm-candidates .m-lrow:focus-visible, .rcm-candidates .m-btn:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.rcm-pager { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.rcm-pager .rcm-acts { padding: 0; }

/* The filters on the phone (Show, When, Whose, Stage): native selects in a two-column
   grid that wraps (three 17px selects do not fit 390px). One gap rule: 8px between
   rows, 12px between columns; 12px before whatever follows, the usual. A lone last
   filter takes the full width. */
.rcm-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px var(--gutter, 22px) 2px; }
.rcm-search + .rcm-filters { padding-top: 12px; }
.rcm-filters + * { margin-top: 12px; }
.rcm-filter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rcm-filter:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rcm-filter__label { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rcm-filter .m-input { height: 44px; font-size: var(--fs-body, 1.0625rem); text-overflow: ellipsis; }
/* The pipeline's Month on the phone: label over the native picker, 46px, 17px, above
   the stage tabs (which bring their own 14px). */
.rcm-month { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.rcm-month__label { font-size: var(--fs-label, .9375rem); color: var(--steel); }
.rcm-month .m-input { min-height: 44px; font-size: var(--fs-body, 1.0625rem); }

/* Stats and Activity on the phone. The rails (range, whose, what) stack 8px apart
   under the tabs; whatever follows them gets the usual 12px. */
/* A goal: the sentence, then its bar. The sentence is the answer. */
.rcm-goals { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; padding-bottom: 4px; }
/* Under Today's headline the goals sit 12px above the list, like the headline above them. */
.m-pad.rcm-goals { padding-bottom: 12px; }
.rcm-goal { display: flex; flex-direction: column; gap: 8px; }
.rcm-goal__who { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rcm-goal__says { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-goal .m-bar { height: 10px; border-radius: 5px; }
.rcm-goal .m-bar__fill { border-radius: 5px; }

/* A person with the buttons that act on them, in one list card. */
.rcm-item { border-bottom: 1px solid var(--hair); }
.rcm-item:last-child { border-bottom: 0; }
.rcm-item .m-lrow { border-bottom: 0; }
.rcm-acts { display: flex; gap: 8px; padding: 0 16px 14px; }
.rcm-acts .m-btn { flex: 1 1 calc(50% - 4px); height: 48px; min-width: 0; box-sizing: border-box; padding: 0; }
/* A Sales Today row can carry Call, Not today, Done and Use template: two to a line. With three, the first takes the line and the
   other two share the next, so no button is left alone. Recruiting's rows do not carry this class. */
.rcm-acts--sales { flex-wrap: wrap; }
.rcm-acts--sales .m-btn:first-child:nth-last-child(3) { flex-basis: 100%; }
/* A Done in its ten seconds: the row is out of the list until the Undo runs out (the call has not been made). */
.rc-row--held { display: none; }
/* "Some details are missing: my phone." under an email in Pick a message, 17px. */
.rcm-pickitem { display: flex; flex-direction: column; gap: 6px; }
.rcm-pick__warn { margin: 0; padding: 0 16px; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
/* A link drawn as a button (Call, Text, Email) is not underlined. */
a.m-btn { text-decoration: none; }
/* The sentence on a row is the point of the row: let it wrap, never cut it. */
.rcm-item .m-lrow__secondary, .rcm-today .m-lrow__secondary, .rcm-log .m-lrow__secondary { white-space: normal; overflow: visible; text-overflow: clip; }
.rcm-pipeline-page { display:flex; flex-direction:column; gap:14px; min-width:0; }
/* Native Pipeline's shared filters already have a general following-block margin.
   Clear it here so the page's 14px column gap remains the single measured gap. */
.rcm-pipeline-page .rcm-filters + * { margin-top:0; }
.rcm-pipeline-page .rcm-stagetabs .m-tabs { margin-top:0; }
.rcm-pipeline-groups { display:flex; gap:8px; margin:0; }
.rcm-pipeline-groups .m-btn { flex:1 1 0; min-height:44px; min-width:0; padding:8px; white-space:normal; }
.rcm-pipeline-groups .m-btn.is-on { border-color:var(--accent); background:var(--accent-tint); color:var(--ink); }
.rcm-pipeline-count { margin:0 16px; color:var(--steel); font-size:var(--fs-label,.9375rem); overflow-wrap:anywhere; }
.rcm-item .m-lrow__secondary.m-num { white-space:normal; overflow-wrap:anywhere; }
.rcm-gap { margin-top: 12px; }
.rcm-gap .m-list { margin: 0; }
.rcm-today .m-lrow, .rcm-log .m-lrow { min-height: 64px; }

/* One candidate. */
.rcm-who { padding-top: 4px; }
/* A long candidate name on the native record must wrap within the screen. */
.rcm-record-name { min-width: 0; overflow-wrap: anywhere; }
.rcm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rcm-tags:not(:empty) { margin-top: 10px; }
.rcm-reach { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.rcm-reach .m-btn { height: 48px; min-width: 0; box-sizing: border-box; padding: 0; }
.rcm-hint { margin-top: 12px; font-size: var(--fs-body, 1.0625rem); }
.rcm-form { display: flex; flex-direction: column; gap: 14px; }
/* What comes under a section head gets the same 12px as the stage and steps blocks. */
.m-sectionhead + .rcm-form, .m-sectionhead + .rcm-tl { margin-top: 12px; }
.rcm-form .m-btn { height: 48px; }
.rcm-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rcm-saved { color: var(--green, #1C7A56); font-size: var(--fs-badge, .875rem); }
.rcm-saved:empty { display: none; }
.rcm-addstep { margin-top: 14px; }
.rcm-step { padding: 12px 0; border-top: 1px solid var(--hair); }
.rcm-step__what { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rcm-step__title { font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-step .rcm-acts { padding: 12px 0 0; }
.rcm-done { margin-top: 12px; }
.rcm-completed { display: flex; flex-direction: column; gap: 4px; }
.rcm-done__label { color: var(--steel); font-size: var(--fs-label, .9375rem); font-weight: 600; }
.rcm-tl__item { padding: 12px 0; border-top: 1px solid var(--hair); }
.rcm-tl__what { font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-tl__body { margin-top: 4px; white-space: pre-wrap; font-size: var(--fs-body, 1.0625rem); }
.rcm-history { display: block; }
.rcm-history__summary { min-height: 44px; cursor: pointer; }
.rcm-history__summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.rcm-danger { margin-top: 24px; }

/* The bottom sheets: 44px-plus rows, 8px apart. */
.rcm-sheetbody { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.rcm-ask { margin: 0 0 6px; font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.rcm-choice { min-height: 56px; font-size: var(--fs-body, 1.0625rem); }
.rcm-save { height: 48px; }
.rcm-err { margin: 4px 0 0; color: var(--danger); font-size: var(--fs-label, .9375rem); }

/* The Undo on the phone's toast. */
.m-toast__undo {
  flex: none; align-self: center; min-height: 44px; padding: 0 14px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .5);
  background: transparent; color: #fff; font-size: var(--fs-label, .9375rem); font-weight: 600;
}
.m-toast__undo:active { background: var(--ui-surface, rgba(255, 255, 255, .14)); }

@media (prefers-reduced-motion: reduce) {
  .rc-row--link, .rc-card, .rcm-item { transition: none; }
}

/* ---- Templates and the follow-up schedule (docs/crm/RECRUITING-CRM-TEMPLATES.md) ---- */

/* A template or a step: the same row as every other list, with a kind word and a
   Shared / Yours word beside the name (words, never a colour alone). */
.rc-tpl { flex-wrap: wrap; }
/* October 9 answered Templates list: major groups 14px, controls 8px. Both
   programs and native pickers share these rules; long email text must wrap. */
.tpl-browser, .tpl-preview, .tpl-message, .tpl-native { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tpl-library > .tpl-browser { padding: 14px; }
.tpl-library > .tpl-settings { margin: 0 14px 14px; align-self: flex-start; }
.tpl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tpl-tools > .input { flex: 1 1 240px; min-width: 0; }
.tpl-scopes, .tpl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tpl-scopes [aria-pressed="true"] { background: var(--band); border-color: var(--ink); color: var(--ink); }
.tpl-scopes .btn, .tpl-actions .btn { min-height: 44px; }
/* Desktop Pick a message keeps the manual choice separate even with no search results. */
.rc-sheet[data-sheet="pick"] > .tpl-browser + .rc-choice { margin-top: 8px; }
.tpl-count { margin: 0; color: var(--steel); font-size: var(--fs-label, .9375rem); }
.tpl-results { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tpl-results .rc-row { margin: 0; }
.tpl-results .rc-row__who { min-width: 0; flex: 1 1 240px; }
.tpl-results .rc-row__name, .tpl-results .rc-row__line, .tpl-preview .rc-preview__subject,
.tpl-native .m-lrow__primary, .tpl-native .m-lrow__secondary { white-space: normal; overflow-wrap: anywhere; }
.tpl-results .rc-pick__line { white-space: normal; overflow-wrap: anywhere; }
.tpl-native .tpl-browser { margin-top: 14px; }
.tpl-native .m-lrow { width: 100%; min-height: 64px; }
/* Templates picker details/warnings must fit the hit area, beyond the preset's fixed one-line height. */
.tpl-pick { flex-wrap: wrap; text-align: left; min-width: 0; height: auto; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.tpl-pick .m-preset__label { min-width: 0; overflow-wrap: anywhere; }
.tpl-pick-detail { flex-basis: 100%; color: var(--steel); font-size: var(--fs-label, .9375rem); overflow-wrap: anywhere; }
.tpl-pick .rcm-pick__warn { flex-basis: 100%; }
.tpl-message { overflow-wrap: anywhere; }

/* "Pick a message": a name over the first line of the message, 44px or more. */
.rc-pick { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
.rc-pick__name { font-weight: 600; color: var(--ink); max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.rc-pick__warn { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; white-space: normal; text-align: left; }
.rc-pick__line { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--steel); font-size: var(--fs-label, .9375rem); }

/* The Lost sheet with a reason already picked: the pick says "Selected" in words. */
.rc-choice { justify-content: space-between; }
.rc-choice.is-on { border-color: var(--ink); font-weight: 600; }
.rc-choice__name { text-align: left; }
.rc-choice__on { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-choice__on:empty { display: none; }

/* "Nobody has answered after 3 tries. Close them?" over What's next: its own block,
   with the same 14px under it as every other block in the sheet. */
.rc-askclose { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.rc-askclose .rc-sheet__ask { margin: 0; }

/* The template editor: the buttons that put a detail in the message, 8px apart and
   44px high, then a preview that keeps its line breaks. */
.rc-fieldsask { display: flex; flex-direction: column; gap: 8px; }
.rc-fields { gap: 8px; }
.rc-fieldbtn { min-height: 44px; }
.rc-check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: var(--fs-body, 1.0625rem); color: var(--ink); }
.rc-check input { width: 24px; height: 24px; flex: none; }
.rc-preview { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--band, var(--press)); }
.rc-preview__label { color: var(--steel); font-size: var(--fs-label, .9375rem); font-weight: 600; }
.rc-preview__subject { font-size: var(--fs-body, 1.0625rem); font-weight: 600; color: var(--ink); }
.rc-preview__text { white-space: pre-wrap; font-size: var(--fs-body, 1.0625rem); color: var(--ink); overflow-wrap: anywhere; }

/* The phone: "Nobody has answered after 3 tries. Close them?" above What's next. */
.rcm-askclose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.rcm-askclose .rcm-ask { margin: 0; }
.rcm-askclose .m-btn { min-height: 48px; }


/* ---- Sales (docs/crm/SALES-CRM.md): the Recruiting screens, over merchants ------------ */

/* The Sales board's Month reads "Closed & Lost · October 2026 (this month)": wider than
   Recruiting's "October 2026", so the field gets room for the whole sentence (a select
   cuts what does not fit, and the month is the one thing it must say). The row still wraps
   only when the window is too narrow. Inside the filter row the row gives the 14px under
   it, so this field carries none of its own: the Whose dropdown beside it then sits level
   with it (found on the Sales board, 2026-10-07; Recruiting's Month has the same offset). */
.rc-month.rc-month--wide { flex-basis: 440px; max-width: 480px; margin-bottom: 0; }

/* The phone account's own touches (Text, Email, Meeting, Note), under the actions row the
   screen already has: the same 8px between buttons, the screen's gutter at the sides, and
   14px above them like every block. They wrap to two to a row. */
.rcm-touch { flex-wrap: wrap; padding: 14px var(--gutter, 22px) 0; }


/* ---- Goals and Settings (docs/crm/CRM-GOALS-SETTINGS.md) -------------------------------- */

/* "Set by Greg" / "Set by you", under a goal's bar: small, muted, a word and never a colour. The
   goal column's 8px gap above it sets it apart, so there is no margin here. */
.rc-goal__by { color: var(--steel); font-size: var(--fs-label, .9375rem); }

/* The team grid: a person down the side, a goal type across the top. A cell is the words, the bar,
   and the period, 6px apart; a second goal of the same type in the same cell sits 10px under the first. */
.rc-grid { width: 100%; }
.rc-grid td { vertical-align: top; min-width: 150px; }
.rc-grid__who { font-size: var(--fs-body, 1.0625rem); font-weight: 600; color: var(--ink); white-space: nowrap; min-width: 0; }
.rc-grid__none { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-cell { display: flex; flex-direction: column; gap: 6px; }
.rc-cell + .rc-cell { margin-top: 10px; }
.rc-cell__says { color: var(--ink); font-size: var(--fs-label, .9375rem); font-weight: 600; }
.rc-cell__per { color: var(--steel); font-size: var(--fs-badge, .875rem); }
.rc-cell .rc-bar--thin { width: 100%; max-width: 160px; }

/* The segmented choice (Goals are set by …): two or three 44px segments that share one border; the
   chosen one is filled and says so with aria-checked, and its words never change. */
.rc-seg { align-self: flex-start; display: inline-flex; flex-wrap: wrap; border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; background: var(--paper, #fff); }
.rc-seg__btn {
  min-height: 44px; padding: 0 18px; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: var(--fs-body, 1.0625rem); cursor: pointer;
}
.rc-seg__btn + .rc-seg__btn { border-left: 1px solid var(--hair); }
.rc-seg__btn.is-on { background: var(--ui-raised, var(--ink)); color: #fff; font-weight: 600; }
.rc-seg__btn:focus-visible { outline: 2px solid var(--accent, #C8102E); outline-offset: -2px; }

/* In a person's Access panel the choice sits under the switches, with a hairline above it. */
.rc-goalsby { border-top: 1px solid var(--hair); }

/* ---- People: "Sales and goals" at the top of the Agents and Team forms, and the Edit on every row ------
   (docs/crm/CRM-TRACKING.md D13)

   WHERE EVERY GAP COMES FROM (checking-spacing)
     8px   between the buttons in a row's last cell (Edit, then the menu) and between "Set goals" buttons
     12px  between a switch and its words, and between a block's parts in the phone sheet
     4px   between the two switch rows (each is a 44px target with its own air)
   The section is an ordinary .panel: panels space themselves, so the form's `col gap-16` gives the 16px
   between it and the form under it. Found on the Agents and Team build, 2026-10-08. */
.rc-people { min-width: 0; }
.rc-people__acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
/* Reset sign-in made the owner action menu interactive: keep every People
   action trigger at the same 44px touch size, with its placeholder aligned. */
.rc-people__acts .btn--icon { min-width: 44px; min-height: 44px; }
.rc-people__nomenu { flex: none; width: 44px; }
.rc-people__switches { display: flex; flex-direction: column; gap: 4px; }
.rc-people__switch { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.rc-people__switch input { flex: none; width: 22px; height: 22px; margin: 0; }
.rc-people__words { display: flex; flex-direction: column; gap: 2px; }
.rc-people__label { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-people__hint { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-people__foot { border-top: 1px solid var(--hair); }
.rc-people__goals { display: flex; flex-direction: column; gap: 10px; }
.rc-people__goals > .rc-hint { margin: 0; }
.rc-people__goalacts { display: flex; flex-wrap: wrap; gap: 8px; }

/* The phone's Edit button and its "Sales and goals" block. Edit is a real 44px button with its word on it, on
   the right of a person's row; the block sits first in the Edit sheet and in the new-person composer. */
.m-btn--edit {
  width: auto; height: 44px; min-width: 64px; margin-top: 7px; padding: 0 18px;
  background: var(--surface, #fff); border: 1px solid var(--mist); color: var(--ink);
  box-shadow: none; font-size: var(--fs-body, 1.0625rem); font-weight: 600;
}
.m-btn--edit:active { background: var(--press); }
.rcm-people { display: flex; flex-direction: column; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--hair); }
.rcm-people--inline { padding: 0 0 16px; }
.rcm-people__line { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; }
.rcm-people__line .m-toggle { position: relative; }
.rcm-people__line .m-toggle::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%); }
.rcm-people__words { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rcm-people__label { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-people__hint { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rcm-people__choice { display: flex; flex-direction: column; gap: 8px; }
.rcm-people__seg { align-self: stretch; }
.rcm-people__seg .rc-seg__btn { flex: 1 1 auto; padding: 0 12px; }
.rcm-people__says { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); line-height: 1.4; }
.rcm-people__says--pad { padding: 0 22px 16px; }
/* The "Edit <name>" card of Agents & Team: the name (17px, 4px under the eyebrow), the title and address under it, and the
   blocks of rows below it, each with its own 4px of air and one hairline. */
.rcm-people__editname { margin: 4px 0 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-people__editsub { margin: 4px 0 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rcm-people__block { padding: 4px 0; border-bottom: 1px solid var(--hair); }

/* The goal-type sheet's preview: a quiet box saying what the type will count. */
.rc-preview--type { margin: 0; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--band, var(--press)); color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.rc-starter { flex-wrap: wrap; }


/* ---- Stats and Reports (docs/crm/CRM-STATS-REDESIGN.md) ------------------------------------ */

/* WHERE EVERY GAP ON THE STATS TAB COMES FROM (checking-spacing)
     14px  between blocks: tabs -> header -> hero -> goals -> done -> link (the portal's own rule)
     8px   between the parts of one block's head, and the 8px gap in a segmented control's wrap
     20px  inside a band (its padding), 12px between a row's columns, 6px between a bar and its words
   A block that follows another gets its space from a SIBLING rule here, never from a margin put on
   the screen. Found on the Stats redesign, 2026-10-07. */

/* The header: ONE row (Team | Me or Back to team on the left, the period switch on the right), then, in
   Me view, whose page this is. */
.rc-statshead { display: flex; flex-direction: column; gap: 14px; }
.rc-statshead__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rc-statshead__period { margin-left: auto; }
.rc-statshead + .panel, .rc-statshead + .tiles { margin-top: 14px; }
.rc-back { align-self: flex-start; }
.rc-who { display: flex; flex-direction: column; gap: 4px; }
.rc-who__name { margin: 0; font-size: 1.5rem; }
.rc-crumb { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-seg--view, .rc-seg--period { align-self: auto; }

/* Band 1: ONE headline, the status, the coaching line. */
.rc-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 20px; }
.rc-hero__big { margin: 0; color: var(--ink); font-size: 2.125rem; font-weight: 700; line-height: 1.15; }
.rc-hero__status { margin: 0; color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.rc-hero__coach { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-hero__act { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-hero .rc-hero__how { margin: 0; }
/* "How is this figured?": a quiet disclosure, not a button; the 44px target is the summary. */
.rc-how__sum { display: inline-flex; align-items: center; min-height: 44px; color: var(--steel); font-size: var(--fs-body, 1.0625rem); text-decoration: underline; cursor: pointer; list-style: none; }
.rc-how__sum::-webkit-details-marker { display: none; }
.rc-how__sum:hover { color: var(--ink); }
.rc-how__body { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; max-width: 60ch; }
.rc-how__says { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-setby { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-hero .rc-setby { color: var(--ink); }

/* Band 2: a goal is a row: its name and who set it, a bar and its words, a status word. */
.rc-goalrows { display: flex; flex-direction: column; }
.rc-goalrow {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr) auto; align-items: center; gap: 12px 24px;
  min-height: 76px; padding: 16px 20px; border-bottom: 1px solid var(--hair);
}
.rc-goalrow:last-child { border-bottom: 0; }
.rc-goalrow__name, .rc-goalrow__prog { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rc-goalrow__what { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-goalrow__says { color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.rc-goalrow__note { color: var(--steel); font-size: var(--fs-label, .9375rem); }
.rc-goalrow__pill { display: flex; justify-content: flex-end; min-width: 104px; }
/* The status as a pill: the WORD is the point, the colour only helps. A little larger than a plain badge. */
.rc-status { padding: 6px 14px; font-size: var(--fs-label, .9375rem); font-weight: 600; white-space: nowrap; }
.rc-band__foot { padding: 16px 20px; border-top: 1px solid var(--hair); }
.rc-goalsact { min-height: 44px; }
@media (max-width: 700px) {
  .rc-goalrow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rc-goalrow__pill { justify-content: flex-start; min-width: 0; }
}

/* The goals sheet: a short list of the goals you may change, a row each. */
.rc-goalsheet { margin-bottom: 14px; border: 1px solid var(--hair); border-radius: 10px; }
.rc-goalsheet .rc-row { padding: 12px 16px; }

/* Band 3: four equal columns, one per period: a big number with its word under it, then the small counts. */
.rc-done { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rc-donecol { display: flex; flex-direction: column; gap: 12px; padding: 20px; min-width: 0; }
.rc-donecol + .rc-donecol { border-left: 1px solid var(--hair); }
.rc-donecol__title { margin: 0; color: var(--steel); font-size: var(--fs-label, .9375rem); font-weight: 600; }
.rc-donecol__big { display: flex; flex-direction: column; gap: 2px; }
.rc-donecol__n { color: var(--ink); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.rc-donecol__label { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-donecol__list { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rc-donecol__line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rc-donecol__line dt { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-donecol__line dd { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-donecol__money { margin: 0; color: var(--steel); font-size: var(--fs-label, .9375rem); }
@media (max-width: 900px) {
  .rc-done { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-donecol:nth-child(odd) { border-left: 0; }
  .rc-donecol:nth-child(n+3) { border-top: 1px solid var(--hair); }
}
@media (max-width: 520px) {
  .rc-done { grid-template-columns: minmax(0, 1fr); }
  .rc-donecol + .rc-donecol { border-top: 1px solid var(--hair); }
}

/* The one quiet link under the bands. */
.panel + .rc-quiet { margin-top: 14px; }
.rc-quiet { margin-bottom: 0; }
.rc-quiet__link { display: inline-flex; align-items: center; min-height: 44px; color: var(--steel); font-size: var(--fs-body, 1.0625rem); text-decoration: underline; }
.rc-quiet__link:hover { color: var(--ink); }

/* Team: four summary tiles, then one row per person. */
.rc-teamtiles + .panel { margin-top: 14px; }
.rc-teamhead { flex-wrap: wrap; }
.rc-teamhead__tools { display: flex; flex: none; flex-wrap: nowrap; align-items: flex-end; gap: 8px 14px; margin-left: auto; }
@media (max-width: 700px) { .rc-teamhead__tools { flex-wrap: wrap; flex: 1 1 100%; } }
.rc-sort { flex: 0 1 220px; min-width: 150px; }
.rc-team { width: 100%; }
.rc-teamrow { cursor: pointer; }
.rc-teamrow:hover { background: var(--band, var(--press)); }
.rc-team__who { min-width: 0; }
.rc-person {
  min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--ink); text-align: left;
  font: inherit; font-size: var(--fs-body, 1.0625rem); font-weight: 600; cursor: pointer;
}
.rc-person:hover { text-decoration: underline; }
.rc-person:focus-visible { outline: 2px solid var(--accent, #C8102E); outline-offset: 2px; border-radius: 4px; }
.rc-team__prog { min-width: 220px; }
.rc-prog { display: flex; align-items: center; gap: 12px; }
.rc-prog .rc-bar { width: 120px; flex: none; }
.rc-prog__says { color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.rc-prog__none { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-setgoals { min-height: 44px; }

/* ---- The Stats tab on the phone (docs/crm/CRM-STATS-REDESIGN.md, answer 9) ----------------------- */

/* One column, read-only. Gaps: 12px between the header's controls, 12px before whatever follows (the
   usual), 14px between goals, 8px inside a goal. */
.rcm-statshead { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.rcm-statshead + * { margin-top: 12px; }
.rcm-seg { display: flex; border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; background: var(--paper, #fff); }
.rcm-seg__btn {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: var(--fs-body, 1.0625rem); cursor: pointer;
}
.rcm-seg__btn + .rcm-seg__btn { border-left: 1px solid var(--hair); }
.rcm-seg__btn.is-on { background: var(--ui-raised, var(--ink)); color: #fff; font-weight: 600; }
.rcm-back { align-self: flex-start; min-height: 44px; }
.rcm-hero { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; padding-bottom: 12px; }
.rcm-hero p { margin: 0; }
.rcm-hero__big { color: var(--ink); font-size: 1.75rem; font-weight: 700; line-height: 1.15; }
.rcm-hero__status { color: var(--ink); font-size: 1.125rem; font-weight: 600; }
.rcm-goalrow__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rcm-goalrow__says { color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.rcm-done { display: flex; flex-direction: column; gap: 14px; }
.rcm-donecol { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--hair); }
.rcm-donecol:first-child { border-top: 0; }
.rcm-donecol__title { color: var(--steel); font-size: var(--fs-label, .9375rem); font-weight: 600; }
.rcm-donecol__big { display: flex; align-items: baseline; gap: 10px; }
.rcm-donecol__n { color: var(--ink); font-size: 2rem; font-weight: 700; line-height: 1; }
.rcm-donecol__lines { display: flex; flex-direction: column; gap: 4px; }
.rcm-donecol__line { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-body, 1.0625rem); color: var(--steel); }
.rcm-donecol__v { color: var(--ink); font-weight: 600; }
.rcm-team .m-lrow { min-height: 64px; }
/* The numbers the tab carried before the redesign, under their own heading. */
.rcm-morewrap { margin-top: 24px; }
.rc-prog--none { flex-wrap: wrap; gap: 8px 12px; }
.rc-goalsheet__row { min-height: 64px; }
.rcm-crumb { color: var(--steel); }
.rcm-hero__coach { color: var(--steel); }
.rcm-goalrow { gap: 8px; }
.rc-how { margin: 0; }

/* ---- The CRM tab strip: up to eight tabs (docs/crm/CRM-STATS-REDESIGN.md) ---------------------------------
   On a wide window the pills sit on one line (eight need about 780px of content: the dock and the page's padding take 160px of the window, so from about 960px). Below that the strip
   wraps into TWO EVEN ROWS of equal pills, never one long row and a lone straggler: every tab stays a visible 44px
   button, nothing scrolls sideways and nothing hides behind a "More". `data-count` is how many tabs there are. */
@media (max-width: 960px) {
  .tabs--crm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tabs--crm[data-count="6"], .tabs--crm[data-count="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tabs--crm .tab { min-width: 0; padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 560px) {
  .tabs--crm, .tabs--crm[data-count="6"], .tabs--crm[data-count="5"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The four team tiles share one row (never three and a straggler), two by two on a narrow window; a name stays on one line. */
.rc-teamtiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .rc-teamtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rc-team__who { white-space: nowrap; }
.rc-person { white-space: nowrap; }


/* ---- Sales tracking (docs/crm/CRM-TRACKING.md) ----------------------------------------------------------
   Today's goals, the Log it row, the quick-log sheet, and the Activity rows that can be changed.

   WHERE EVERY GAP COMES FROM (checking-spacing)
     14px  between panels on Today (the portal's .panel + .panel)
     20px  inside a band (its padding); a goal row is 16px above and below its content, 8px between its lines
     12px  between the four Log it buttons, and between a button's name and its count
     16px  between the parts of the quick-log sheet; 8px between the buttons and chips inside a part
   A block that follows another gets its space from the parent's gap or a sibling rule here, never from a margin
   put on the screen. */

/* Today's goals: a row each (name and status word, bar, "3 of 5 · 60%", and the coach line only when behind). */
.rc-tgoals { display: flex; flex-direction: column; }
.rc-tgoal { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--hair); }
.rc-tgoal:last-child { border-bottom: 0; }
.rc-tgoal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rc-tgoal__name { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-tgoal__right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; }
.rc-tgoal__says { color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
/* The Today panels' heads are one line, not the 76px a head with a button needs elsewhere. */
.rc-panelhead--short { min-height: 60px; }
.rc-tgoal__coach { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
/* One calm line of praise under the goals, only when nothing is behind. */
.rc-ahead { margin: 0; padding: 16px 20px; border-top: 1px solid var(--hair); color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-panelhead .rc-setby { text-align: right; }

/* Log it: four equal buttons that name themselves, with this week's count under the name. The whole card is the
   button (its ::after covers it), so the count is part of what is pressed. */
.rc-logrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 20px; }
.rc-logbtn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 88px; box-sizing: border-box; padding: 8px 12px; text-align: center;
  border: 1px solid var(--hair); border-radius: 12px; background: var(--paper, #fff);
}
.rc-logbtn:hover { background: var(--band, var(--press)); }
.rc-logbtn__btn {
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  font: inherit; font-size: 1.125rem; font-weight: 700; line-height: 1.25; min-height: 44px;
}
.rc-logbtn__btn::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 12px; }
.rc-logbtn__btn:focus-visible { outline: none; }
.rc-logbtn__btn:focus-visible::after { outline: 2px solid var(--accent, #C8102E); outline-offset: 2px; }
.rc-logbtn__n { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-logbtn__n:empty { display: none; }
.rc-sofar { margin: 0; padding: 0 20px 20px; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
@media (max-width: 900px) { .rc-logrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The quick-log sheet: Who?, how it went, a note, when. 16px between parts, 8px inside a part. */
.rc-log { display: flex; flex-direction: column; gap: 16px; }
.rc-log__sec { display: flex; flex-direction: column; gap: 8px; }
.rc-log__label { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-log__hint { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-log__hint:empty { display: none; }
.rc-log__picked {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; box-sizing: border-box;
  padding: 4px 8px 4px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--band, var(--press));
}
.rc-log__name { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rc-log__found:empty { display: none; }
.rc-log__account { justify-content: space-between; gap: 12px; }
.rc-choices--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rc-choices--grid .rc-choice { min-height: 52px; }
/* An odd one out takes the whole row, so three results do not leave a gap beside the third. */
.rc-choices--grid .rc-choice:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 520px) { .rc-choices--grid { grid-template-columns: minmax(0, 1fr); } }
.rc-log__when { align-self: flex-start; }
.rc-log__timerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.rc-sheet .rc-log__time { width: auto; min-width: 160px; min-height: 44px; }
.rc-log .rc-sheet__foot { margin-top: 0; }
.rc-log .rc-sheet__err { margin: 0; }

/* An Activity row you may change: what it was (bold), the note and where it came from under it, and the buttons
   on their own line below. */
.rc-act__line { display: flex; flex-direction: column; gap: 2px; }
.rc-act__main { color: var(--ink); }
.rc-act__note, .rc-act__src { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-act__cand--none { color: var(--steel); font-weight: 400; }
.rc-act__acts { flex: 1 1 100%; flex-wrap: wrap; gap: 8px; }

/* ---- Sales tracking on the phone (docs/crm/CRM-TRACKING.md) ------------------------------------------------
   Today's goals, the Log it grid, and the quick-log bottom sheet. 8px between buttons, 12px before a block that
   follows another (the screen's usual), 16px between the parts of the sheet. */
.rcm-goalrow__coach { margin: 0; }
.rcm-ahead { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-setgoal { min-height: 44px; }
.rcm-logrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rcm-logbtn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 84px; box-sizing: border-box; padding: 10px; text-align: center;
  border: 1px solid var(--hair); border-radius: 14px; background: var(--paper, #fff);
}
.rcm-logbtn__btn {
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit;
  font-size: 1.0625rem; font-weight: 700; line-height: 1.25; min-height: 44px;
}
.rcm-logbtn__btn::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 14px; }
.rcm-logbtn__n { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rcm-logbtn__n:empty { display: none; }
.rcm-sofar { margin: 12px 0 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }

.rcm-log { display: flex; flex-direction: column; gap: 16px; }
.rcm-logsec { display: flex; flex-direction: column; gap: 8px; }
.rcm-log__label { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-log__hint { margin: 0; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rcm-log__picked {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; box-sizing: border-box;
  padding: 4px 8px 4px 14px; border: 1px solid var(--hair); border-radius: 12px; background: var(--band, var(--press));
}
.rcm-log__name { color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.rcm-log__change { flex: none; min-height: 44px; padding: 0 16px; }
.rcm-log .m-btn { height: 48px; }
.rcm-pick { justify-content: space-between; }
.rcm-pick.is-on { border-color: var(--ink); font-weight: 600; }
.rcm-pick__on { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rcm-pick__on:empty { display: none; }
.rcm-log__when { align-self: stretch; }
.rcm-log__when .rcm-seg__btn { flex: 1 1 0; min-width: 0; padding: 0 6px; }
.rcm-acts--wrap { flex-wrap: wrap; }
.rcm-acts--wrap .m-btn { flex: 1 1 calc(50% - 4px); }

/* ---- Cost analysis: the account is the first step (docs/crm/CRM-TRACKING.md, Greg 2026-10-08) -------------
   Which account? is a panel at the top of the builder (14px under it like every block); the field and the
   Add a new account link share one row, 12px apart; the plain message and the account it is for sit under
   the row, 8px apart. The result under the buttons says what was logged, with its Undo, and offers I sent it. */
.ca-acct__body { display: flex; flex-direction: column; gap: 8px; }
.ca-acct__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ca-acct__field { flex: 1 1 320px; min-width: 0; }
.ca-acct__add { flex: none; min-height: 44px; }
.cost-analysis-builder, .cost-analysis-builder > *, .cost-analysis-builder .panel,
.cost-analysis-builder .field { min-width: 0; }
.cost-analysis-builder .ca-repeat-row { align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.cost-analysis-builder .ca-repeat-row > .grow { flex: 1 1 160px; min-width: 140px; }
.cost-analysis-builder .ca-repeat-row > .btn--icon { min-height: 36px; }
@media (max-width: 560px) {
  .cost-analysis-builder .btn { max-width: 100%; min-width: 0; height: auto; min-height: 44px; white-space: normal; padding-top: 8px; padding-bottom: 8px; }
  .cost-analysis-builder .panel__head { flex-wrap: wrap; }
  .cost-analysis-builder .panel__head > .grow { flex-basis: 100%; }
  .cost-analysis-builder .ca-repeat-row { flex-wrap: wrap; }
  .cost-analysis-builder .ca-repeat-row > .grow { flex-basis: 100%; }
  .cost-analysis-builder .ca-repeat-row > div { max-width: 100%; }
}
.ca-acct__now { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.ca-acct__now:empty, .ca-acct__msg:empty { display: none; }
.ca-acct__msg { margin: 0; color: var(--danger); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.ca-acct.is-need { border-color: var(--danger); }
.ca-acct__hint { margin: 0; }
/* Cost Analysis: root measured an empty validation slot adding a second 16px gap before actions. */
.ca-validation-slot:empty { display: none; }
/* Cost Analysis: the side grid's 16px gap owns panel spacing; cancel the shared panel sibling margin. */
.cost-analysis-builder > .grid-2 > .panel + .panel { margin-top: 0; }
.ca-result-slot:empty { display: none; }
.ca-result { margin: 0; }
.ca-logged__text { color: var(--ink); }
.ca-logged { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.ca-result__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ca-result__why { color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.ca-rowacts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
/* ---- Cost analysis: read the figures from a statement (ISO360 step 5C) ---------------------------------
   Inside "The figures", between the contact fields and the volume row, which the panel body spaces 12px apart.
   The block's own pieces are 8px apart: the picker row (button and hint, 12px across, wrapping on a phone),
   the result sentence, the figure pills (6px, the pill row's own gap), the check against the statement, and
   the statement's fee lines folded under a summary. Hidden entirely when the page does not offer it. */
.ca-stmt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ca-stmt[hidden] { display: none; }
.ca-stmt__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.ca-stmt__pick { flex: none; min-height: 44px; }
.ca-stmt__hint { flex: 1 1 280px; min-width: 0; margin: 0; }
.ca-stmt__note { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); }
.ca-stmt__note.is-err { color: var(--danger); }
.ca-stmt__chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ca-stmt__check { margin: 0; color: var(--ink); font-size: var(--fs-body, 1.0625rem); font-weight: 600; }
.ca-stmt__check:empty { display: none; }
.ca-stmt__lines { min-width: 0; }
.ca-stmt__lines > summary { cursor: pointer; color: var(--steel); font-size: var(--fs-label, .9375rem); min-height: 32px; display: flex; align-items: center; }
.ca-stmt__lines > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ca-stmt__list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.ca-stmt__line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; font-size: var(--fs-label, .9375rem); }
.ca-stmt__line-label { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.ca-stmt__line-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 0 1 auto; max-width: 100%; }
.ca-stmt__bucket { width: auto; max-width: 210px; min-height: 36px; }
.ca-stmt__savefile { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: var(--fs-label, .9375rem); color: var(--steel); cursor: pointer; }
.ca-stmt__savefile > input { flex: none; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.ca-stmt__file-status { margin: 0; font-size: var(--fs-label, .9375rem); color: var(--steel); }
.ca-stmt__file-status.is-err { color: var(--danger); }
.ca-stmt__reconcile {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  padding: 10px 12px; border-radius: var(--r-sm, 10px);
  border: 1px solid var(--hair, var(--line)); background: var(--paper);
}
.ca-stmt__reconcile.is-match { border-color: var(--green, #1C7A56); background: var(--green-lt, rgba(28, 122, 86, .08)); }
.ca-stmt__reconcile.is-warn { border-color: var(--amber, #A8761B); background: var(--amber-lt, rgba(168, 118, 27, .1)); }
.ca-stmt__reconcile-main { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; min-width: 0; }
.ca-stmt__reconcile-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.ca-stmt__summary { font-size: 0.8125rem; color: var(--steel); font-variant-numeric: tabular-nums; }
.ca-stmt__pinned {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px;
  border-radius: 999px; border: 1px solid var(--hair, var(--line));
  background: var(--paper); color: var(--steel);
  font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ca-stmt__copied {
  display: inline-flex; align-items: center; margin-top: 4px; width: fit-content;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--green, #1C7A56); background: var(--green-lt, rgba(28, 122, 86, .08));
  color: var(--green, #1C7A56); font-size: 0.75rem; font-weight: 600;
}
.ca-stmt__copied.is-est {
  border-color: var(--blue, #1D4F7A); background: var(--blue-lt, rgba(29, 79, 122, .10));
  color: var(--blue, #1D4F7A);
}
.ca-stmt__loc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ca-stmt__loc-label { font-size: var(--fs-label, .9375rem); font-weight: 600; color: var(--steel); }
.ca-stmt__loc-select { width: auto; max-width: 100%; min-height: 36px; }
.ca-stmt__loc-toggle { flex: none; min-height: 36px; }
.ca-stmt__loc-hint { font-size: 0.8125rem; color: var(--steel); }
.ca-stmt__loc-select:focus-visible,
.ca-stmt__loc-toggle:focus-visible,
.ca-stmt__filter:focus-visible,
.ca-stmt__rate-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html[data-theme="dark"] .ca-stmt__loc-select:focus-visible,
html[data-theme="dark"] .ca-stmt__loc-toggle:focus-visible,
html[data-theme="dark"] .ca-stmt__filter:focus-visible,
html[data-theme="dark"] .ca-stmt__rate-in:focus-visible { outline-color: var(--ui-focus, #FFC073); }
.ca-stmt__pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 780px) { .ca-stmt__pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .ca-stmt__pillars { grid-template-columns: minmax(0, 1fr); } }
.ca-stmt__pillar {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 8px 10px; border-radius: var(--r-sm, 10px);
  border: 1px solid var(--hair, var(--line)); background: var(--paper);
}
.ca-stmt__pillar.is-ic { border-color: var(--green, #1C7A56); background: var(--green-lt, rgba(28, 122, 86, .07)); }
.ca-stmt__pillar.is-as { border-color: var(--blue, #1D4F7A); background: var(--blue-lt, rgba(29, 79, 122, .07)); }
.ca-stmt__pillar.is-flag { border-color: var(--danger, #B42318); background: var(--danger-lt, rgba(180, 35, 24, .08)); }
.ca-stmt__pillar-k { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--steel); }
.ca-stmt__pillar-v { font-size: 0.95rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ca-stmt__pillar-s { font-size: 0.75rem; color: var(--steel); }
.ca-stmt__audit {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; border-radius: var(--r-sm, 10px);
  border: 1px solid var(--hair, var(--line)); background: var(--paper);
}
.ca-stmt__audit.is-ok { border-color: var(--green, #1C7A56); background: var(--green-lt, rgba(28, 122, 86, .08)); }
.ca-stmt__audit.is-warn { border-color: var(--amber, #A8761B); background: var(--amber-lt, rgba(168, 118, 27, .1)); }
.ca-stmt__audit.is-opt { border-color: var(--blue, #1D4F7A); background: var(--blue-lt, rgba(29, 79, 122, .08)); }
.ca-stmt__audit-msg { margin: 0; color: var(--ink); font-size: var(--fs-label, .9375rem); font-weight: 600; }
.ca-stmt__strip-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: var(--fs-label, .9375rem); color: var(--steel); cursor: pointer; }
.ca-stmt__strip-toggle > input { flex: none; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.ca-stmt__filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ca-stmt__filter {
  border: 1px solid var(--hair, var(--line)); background: var(--paper); color: var(--steel);
  border-radius: 999px; padding: 4px 10px; min-height: 30px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.ca-stmt__filter.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ca-stmt__list { max-width: 100%; }
.ca-stmt__line-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ca-stmt__line-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ca-stmt__tag {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
  background: var(--band, rgba(19, 41, 75, .07)); color: var(--steel);
}
.ca-stmt__tag.is-red { background: var(--danger-lt, rgba(180, 35, 24, .12)); color: var(--danger, #B42318); }
.ca-stmt__tag.is-ok { background: var(--green-lt, rgba(28, 122, 86, .12)); color: var(--green, #1C7A56); }
.ca-stmt__tag.is-blue { background: var(--blue-lt, rgba(29, 79, 122, .12)); color: var(--blue, #1D4F7A); }
.ca-stmt__tag.is-warn { background: var(--amber-lt, rgba(168, 118, 27, .14)); color: var(--amber, #8A6100); }
.ca-stmt__line-sub { font-size: 0.8125rem; color: var(--steel); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ca-stmt__rate-in { width: 88px; min-height: 36px; font-size: 0.8125rem; padding: 4px 8px; }

/* ---- Cost analysis: bps helper & Application pricing terms (2026-11-23) ------------------------ */
.ca-rate-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 104px; flex: 0 0 auto; }
.ca-rate-cell > .input { width: 104px; flex: 0 0 auto; }
.ca-bps {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px;
  border-radius: 999px; border: 1px solid var(--hair, var(--line));
  background: var(--paper); color: var(--steel);
  font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ca-bps[hidden] { display: none; }
.ca-app-terms {
  border: 1px solid var(--hair, var(--line)); border-radius: var(--r-sm, 10px);
  background: var(--paper); padding: 0 12px; min-width: 0;
}
.ca-app-terms[open] { padding-bottom: 12px; }
.ca-app-terms__summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  min-height: 44px; padding: 6px 0; cursor: pointer; list-style: none;
}
.ca-app-terms__summary::-webkit-details-marker { display: none; }
.ca-app-terms__summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ca-app-terms__title { font-weight: 650; font-size: var(--fs-label, .9375rem); color: var(--ink); }
.ca-app-terms__hint { font-size: 0.8125rem; color: var(--steel); }
.ca-app-terms__body { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; border-top: 1px solid var(--hair, var(--line)); min-width: 0; }
.ca-app-terms__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.ca-app-terms__sub { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--hair, var(--line)); min-width: 0; }
@media (max-width: 720px) {
  .ca-app-terms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .ca-app-terms__grid { grid-template-columns: minmax(0, 1fr); }
}
html[data-theme="dark"] .ca-bps {
  border-color: var(--ui-line, #4A4E58); background: var(--ui-raised, #2C3037); color: var(--ui-secondary, #BEC1C8);
}
html[data-theme="dark"] .ca-app-terms {
  border-color: var(--ui-line, #4A4E58); background: var(--ui-surface, #22252B);
}
html[data-theme="dark"] .ca-app-terms__title { color: var(--ui-text, #ECEEF2); }
html[data-theme="dark"] .ca-app-terms__hint { color: var(--ui-secondary, #BEC1C8); }
html[data-theme="dark"] .ca-app-terms__body,
html[data-theme="dark"] .ca-app-terms__sub { border-color: var(--ui-line, #4A4E58); }

/* ---- Settings cleanup (docs/crm/CRM-SETTINGS-CLEANUP.md) ----------------------------------- */
/* The Settings tab of both CRMs, and the sheets it opens (.rcs-modal). Greg's rule for this page, answer 10:
   EVERY piece of text is 17px (1.0625rem) or larger and EVERY control is 44px or taller, the tab strip and the
   close buttons included. The rules below say so literally (no --fs-label, which is 15px), so a test can read
   them (tests/crm_settings_cleanup_client.mjs).

   WHERE EVERY GAP COMES FROM (checking-spacing)
     20px   between the list of sections and the section; inside a row between its words and its control
     14px   between the tab strip, the one-line intro and the section
     16px   above and below a row's words (a row is at least 76px; a two-line row is 84px)
     12px   between a word and the button beside it; 8px between two buttons or pills on one line
   A row's gap above and below it is its own padding and one hairline, never a margin put on a screen. */

.rcs { display: block; }
.rcs .tabs { margin-bottom: 14px; }
.rcs .tab { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 1.0625rem; }
.rcs-intro { margin: 0 0 14px; color: var(--steel); font-size: 1.0625rem; }
.rcs-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 20px; align-items: start; }

/* The list of sections: one button each, the chosen one filled and marked aria-current. */
.rcs-nav { display: flex; flex-direction: column; gap: 8px; }
.rcs-nav__btn {
  display: flex; align-items: center; min-height: 48px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: var(--ink); font: inherit; font-size: 1.0625rem; font-weight: 600; text-align: left; cursor: pointer;
}
.rcs-nav__btn:hover { background: var(--band, var(--press)); }
.rcs-nav__btn.is-on { background: var(--ui-raised, var(--ink)); color: #fff; }
.rcs-nav__btn:focus-visible { outline: 2px solid var(--accent, #C8102E); outline-offset: 2px; }
.rcs-main { min-width: 0; }

/* Narrow (a tablet held upright, a small window): the list becomes a row of equal pills above the section, so the
   section keeps the whole width. Greg's number was 820px of window; the portal's own rail and gutters take about
   300px of that, so the pills start at 1023px, where the section would otherwise have under 650px. */
@media (max-width: 1023px) {
  .rcs-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rcs-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
  .rcs-nav__btn { justify-content: center; text-align: center; border-color: var(--hair); border-radius: 999px; background: var(--ui-surface, #fff); }
  .rcs-nav__btn.is-on { border-color: var(--ink); }
}

/* One section: its name, one sentence about it, Use recommended; then its rows; then its one primary button. */
.rcs-head { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-bottom: 1px solid var(--hair); }
.rcs-head__title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.rcs-head__title:focus { outline: none; }
.rcs-head__says { margin: 0; color: var(--steel); font-size: 1.0625rem; }
.rcs-head__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; }
.rcs-head__acts .rcs-saved { order: 2; }
.rcs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 16px 20px; border-top: 1px solid var(--hair); }
.rcs-foot:empty { display: none; }
.rcs-subhead { margin: 0; padding: 16px 20px 0; font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.rcs-empty { margin: 0; padding: 16px 20px; color: var(--steel); font-size: 1.0625rem; }
.rcs-note { padding: 16px 20px; }
.rcs-now { margin: 0; color: var(--ink); font-size: 1.0625rem; }

/* A setting: name, one sentence, the control; "Saved" sits just before the control so the control never moves. */
.rcs-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; min-height: 76px; box-sizing: border-box;
  padding: 16px 20px; border-bottom: 1px solid var(--hair-soft);
}
.rcs-row:last-child { border-bottom: 0; }
.rcs-row[hidden], .rcs-row.is-hidden { display: none; }
.rcs-row__text { flex: 1 1 260px; min-width: 0; }
.rcs-row__name { color: var(--ink); font-size: 1.0625rem; font-weight: 700; }
.rcs-row__says { margin: 2px 0 0; color: var(--steel); font-size: 1.0625rem; }
.rcs-row__ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin-left: auto; }
.rcs-row--stack { align-items: flex-start; }
.rcs-row--stack .rcs-row__ctl { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
.rcs-row__ctl .select { max-width: 280px; }
.rcs-fixed { color: var(--ink); font-size: 1.0625rem; font-weight: 600; }
.rcs-unit { color: var(--steel); font-size: 1.0625rem; }
.rcs-number { width: 104px; text-align: right; }
.rcs-name { width: 260px; max-width: 100%; }
@media (max-width: 699px) {
  .rcs-row__ctl { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
  .rcs-row__ctl .btn { flex: 1 1 0; }
  .rcs-row__ctl .select, .rcs-name { max-width: none; width: 100%; }
}

/* A goal type: the switch, its name with a Standard / Added by you word, what it counts and where, then Change.
   Off shades the whole row and greys its name (the words stay at full contrast, 4.5:1 or better; the switch and Change
   stay as strong as ever) and the periods are no longer said. */
.rcs-type { flex-wrap: nowrap; }
.rcs-type .rcs-row__text { flex: 1 1 200px; }
.rcs-type.is-off { background: var(--band, var(--press)); }
.rcs-type.is-off .rcs-row__name { color: var(--steel); }
.rcs-type.is-new { animation: rcs-new 2s ease-out; }
.rcs-badge { margin-left: 10px; height: auto; min-height: 28px; padding: 2px 12px; font-size: 1.0625rem; font-weight: 600; letter-spacing: 0; }
.rcs-periods { color: var(--ink); font-weight: 600; }
@media (max-width: 699px) { .rcs-type { flex-wrap: wrap; } }
@keyframes rcs-new { from { background: var(--tint, #FBE9EC); } to { background: transparent; } }

/* The word that says what happened to the control beside it: "Saved" fades by itself after 3 seconds (the words
   stay for a screen reader), "Saving…" holds, and the server's own sentence stays in red. */
.rcs-saved { color: var(--green, #1C7A56); font-size: 1.0625rem; font-weight: 600; }
/* Empty, the word stays in the page for a screen reader (so its first "Saved" is announced) but takes no room. */
.rcs-saved:empty, .rcs-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rcs-saved.is-ok { animation: rcs-saved-fade 3s ease-in forwards; }
.rcs-saved.is-err { color: var(--danger); font-weight: 500; max-width: 30ch; }
@keyframes rcs-saved-fade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

/* The On/Off switch: 44px tall, the word beside it, never color alone. */
.rcs-switch {
  display: inline-flex; align-items: center; gap: 10px; flex: none; min-width: 44px; min-height: 44px; padding: 0 4px;
  border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer;
}
.rcs-switch__track { position: relative; flex: none; width: 52px; height: 30px; border-radius: 15px; background: var(--steel); transition: background-color .14s ease; }
.rcs-switch__knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .14s ease; }
.rcs-switch.is-on .rcs-switch__track { background: var(--green, #1C7A56); }
.rcs-switch.is-on .rcs-switch__knob { transform: translateX(22px); }
.rcs-switch__word { min-width: 2.2em; }
.rcs-switch:focus-visible, .rcs-chip:focus-visible { outline: 2px solid var(--accent, #C8102E); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .rcs-switch__track, .rcs-switch__knob { transition: none; } }

/* Pills you turn on and off (the periods a goal can use): the chosen ones are filled and carry a check. */
.rcs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rcs-chip {
  min-height: 44px; padding: 0 18px; border: 1px solid var(--hair-strong, var(--hair)); border-radius: 999px; background: var(--ui-surface, #fff); color: var(--ink);
  font: inherit; font-size: 1.0625rem; font-weight: 600; cursor: pointer;
}
.rcs-chip.is-on { background: var(--ui-raised, var(--ink)); border-color: var(--ink); color: #fff; }
.rcs-chip.is-on::before { content: "\2713\00a0"; }

/* A tick with its words (and, for the Reached results, what each one means in a few plain words). */
.rcs-ticks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.rcs-ticks--says { flex-direction: column; gap: 4px; }
.rcs-tick { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); font-size: 1.0625rem; cursor: pointer; }
.rcs-tick input { width: 24px; height: 24px; flex: none; }
.rcs-tick__words { display: flex; flex-direction: column; }
.rcs-tick__name { font-weight: 600; }
.rcs-tick__says { color: var(--steel); font-size: 1.0625rem; }

/* More options: folded until opened, 56px to press. */
.rcs-more { border-top: 1px solid var(--hair); }
.rcs-body > .rcs-note + .rcs-more { margin-top: 0; }
.rcs-more__sum { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px; color: var(--ink); font-size: 1.0625rem; font-weight: 700; cursor: pointer; list-style: none; }
.rcs-more__sum::-webkit-details-marker { display: none; }
.rcs-more__sum::before { content: "+"; width: 24px; text-align: center; font-size: 1.25rem; }
.rcs-more[open] > .rcs-more__sum::before { content: "\2212"; }
.rcs-more__sum:focus-visible { outline: 2px solid var(--accent, #C8102E); outline-offset: -2px; }

/* The sheets: this screen's sizes, and a 44px close. */
.rcs-modal { font-size: 1.0625rem; }
.rcs-modal .modal__head .h2 { font-size: 1.25rem; }
.rcs-modal .field > label { font-size: 1.0625rem; }
.rcs-sheet { display: flex; flex-direction: column; }
/* In a sheet (about 480px wide) every row stacks: its words, then its control the full width under them. */
.rcs-sheet .rcs-row { align-items: flex-start; padding-left: 0; padding-right: 0; }
.rcs-sheet .rcs-row__ctl { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
.rcs-sheet .rcs-row__ctl .select, .rcs-sheet .rcs-row__ctl .input:not(.rcs-number) { flex: 1 1 auto; width: 100%; max-width: none; }
.rcs-sheet__group { display: flex; flex-direction: column; }
.rcs-sheet__foot { display: flex; flex-wrap: wrap; gap: 8px 12px; padding-top: 16px; }
.rcs-sheet__err { margin: 12px 0 0; color: var(--danger); font-size: 1.0625rem; }
.rcs-sheet__err:empty { display: none; }
.rcs-preview { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--band, var(--press)); color: var(--ink); font-size: 1.0625rem; }
.rcs-who { padding: 14px 0; border-bottom: 1px solid var(--hair-soft); }
.rcs-who:last-child { border-bottom: 0; }
.rcs-preview-list__sum { padding-bottom: 14px; border-bottom: 1px solid var(--hair-soft); }

/* Every button, box and tab on this screen and in its sheets is at least 44px tall and reads at 17px. */
.rcs .btn, .rcs-modal .btn { min-height: 44px; height: auto; padding: 0 18px; font-size: 1.0625rem; }
.rcs .btn--icon, .rcs-modal .btn--icon { width: 44px; padding: 0; }
.rcs .input, .rcs .select, .rcs-modal .input, .rcs-modal .select { min-height: 44px; font-size: 1.0625rem; }
.rcs .badge, .rcs-modal .badge { font-size: 1.0625rem; }
.rcs-modal .select, .rcs-modal .input { max-width: 100%; }
.toast.rcs-toast { font-size: 1.0625rem; }
.rcs-toast .toast__sub { font-size: 1.0625rem; }
.rcs-toast .toast__undo { min-width: 44px; min-height: 44px; font-size: 1.0625rem; }

/* The wrappers the Settings code names (each is the structure its comment above describes). */
.rcs-section { display: block; }
.rcs-list { display: flex; flex-direction: column; }
.rcs-starter, .rcs-step { flex-wrap: wrap; }
.rcs-more__body { display: block; }
.rcs-starter.is-gone .rcs-row__name { color: var(--steel); }
.rcs-preview-list { display: flex; flex-direction: column; }
.rcs-row__note { margin: 4px 0 0; color: var(--steel); font-size: 1.0625rem; font-weight: 600; }

/* Independent progress forms share the portal spacing and tokens on every device. */
.rc-goal-entry { display:grid; gap:8px; min-width:0; }
.rc-goal-entry__body { display:grid; gap:14px; min-width:0; }
.rc-goal-entry__body:empty { display:none; }
.rc-goal-entry__field { display:grid; gap:8px; min-width:0; }
.rc-goal-entry__field .input { width:100%; min-width:0; box-sizing:border-box; min-height:44px; padding:10px 12px; border:1px solid var(--hair); border-radius:var(--r-sm,10px); background:var(--surface); color:var(--ink); font:inherit; }
.rc-goal-entry__field textarea.input { min-height:88px; resize:vertical; }
.rc-goal-entry__field .input:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.rc-goal-entry__save { background:var(--ui-raised, var(--ink)); color:var(--ui-text, var(--surface)); justify-self:start; }
.rc-goal-entry__history { display:grid; gap:14px; }
.rc-goal-entry__item { display:grid; gap:8px; border-top:1px solid var(--hair); padding-top:14px; overflow-wrap:anywhere; }

.rc-goalrow > .rc-goal-entry { grid-column:1 / -1; }
.rc-goal-entry > button { justify-self:start; }

/* Phone breakdown cards keep each label beside its value to shorten stage lists. */
.rc-report--phone .rc-report-person-card .rc-report-definitions > div { grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); }
.rc-report--phone .rc-report-person-card .rc-report-definitions dd { text-align:right; }

/* Recruiting Today focus: 14px between blocks, 8px between controls. Keep these
   gaps in the shared stylesheet so desktop and native queue wrapping agree. */
.rc-today-focus { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 14px; padding: 14px; align-items: start; }
.rc-today-queue { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.rc-today-pick { box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; width: 100%; min-height: 44px; border: 1px solid var(--hair); border-radius: var(--r-sm, 10px); padding: 14px; color: var(--ink); background: var(--surface); text-align: left; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.rc-today-pick span { font-size: var(--fs-body, 1.0625rem); color: var(--steel); }
.rc-today-pick.is-on { border-color: var(--ink); background: var(--press); }
.rc-today-pick:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.rc-today-controls .btn:focus-visible, .rc-today-controls .m-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rc-today-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; border: 1px solid var(--hair); border-radius: var(--r-sm, 10px); padding: 14px; }
.rc-today-detail .rc-row { flex-direction: column; align-items: stretch; gap: 14px; padding: 0; }
/* Today browser audit: the clickable name was only 26.34px tall at 1440/768/390px. */
.rc-today-detail .rc-row__name { min-height: 44px; overflow-wrap: anywhere; }
.rc-today-detail .rc-row__acts.row { flex-wrap: wrap; }
.rc-today-detail .btn, .rc-today-controls .btn { min-height: 44px; white-space: normal; }
.rc-today-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rc-today-count { margin: 0; padding: 14px; color: var(--steel); font-size: var(--fs-body, 1.0625rem); }
.rc-today-goals { margin-bottom: 14px; }
.rc-today-focus--phone { padding: 14px; }
.rc-today-detail .rcm-acts { flex-wrap: wrap; padding: 0; }
.rc-today-detail .rcm-acts .m-btn { height: auto; min-height: 44px; padding: 8px; }
.rc-today-detail .m-lrow { padding: 0; }
.rc-today-detail .m-lrow__primary { overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 700px) { .rc-today-focus { grid-template-columns: minmax(0, 1fr); } }
.rc-today-error { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.rc-today-error p { margin: 0; }
/* Long queues keep the selected action card close while retaining every item. */
.rc-today-queue { max-height: 32rem; overflow-y: auto; scroll-padding: 8px; }
@media (min-width: 701px) { .rc-today-detail { position: sticky; top: 14px; } }
/* Compact native Today resolves owner context from the authorized owner rows. */
.rc-today-detail .rcm-item { display: flex; flex-direction: column; gap: 14px; }
.rc-today-owner { margin: 0; padding: 0; }

/* Sales Today uses the selected card first on phones, in matching DOM order.
   Reuse the shared 14px blocks / 8px controls rather than view-local margins. */
.rc-today-focus--sales .rc-today-queue { grid-column: 1; grid-row: 1; }
.rc-today-focus--sales .rc-today-detail { grid-column: 2; grid-row: 1; }
.rc-today-focus--sales .rc-row__name { background: transparent; border: 0; color: inherit; text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 700px) {
  .rc-today-focus--sales .rc-today-detail { grid-column: 1; grid-row: 1; }
  .rc-today-focus--sales .rc-today-queue { grid-column: 1; grid-row: 2; }
}

/* Soft Touch Accounts: shared desktop/phone rhythm, including wrapped actions. */
/* Guided Add Account found stacked controls with no shared spacing rule.
   Keep 14px between blocks, 8px inside fields/actions, 44px touch targets. */
.account-entry { display:grid; gap:14px; min-width:0; max-width:900px; color:var(--ink); font-size:var(--fs-body, 1.0625rem); }
.account-entry--native { padding:20px 22px; }
.account-entry p, .account-entry h2 { margin:0; overflow-wrap:anywhere; }
.account-entry__title { font-size:var(--fs-title, 1.5rem); }
.account-entry__choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; min-width:0; }
.account-entry__choice { display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:20px; border:1px solid var(--hair); border-radius:var(--r, 14px); background:var(--surface); color:var(--ink); font:inherit; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.account-entry__choice span { color:var(--steel); }
.account-entry__field, .account-entry__matches { display:grid; gap:8px; min-width:0; }
.account-entry__matches:empty { display:none; }
.account-entry__field > input, .account-entry__field > select, .account-entry__field > textarea { width:100%; min-width:0; box-sizing:border-box; font:inherit; }
.account-entry__actions { display:flex; flex-wrap:wrap; gap:8px; }
.account-entry button, .account-entry select, .account-entry input { min-height:44px; }
.account-entry button { white-space:normal; overflow-wrap:anywhere; height:auto; }
.account-entry .m-btn { width:auto; }
.account-entry button:focus-visible, .account-entry input:focus-visible, .account-entry select:focus-visible, .account-entry textarea:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
@media (max-width:600px) { .account-entry__choices { grid-template-columns:minmax(0,1fr); } }
.sp-soft { display:grid; gap:16px; min-width:0; }
.sp-soft p, .sp-soft h3 { margin:0; }
.sp-soft__filters, .sp-soft__actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.sp-soft__filters > input { flex:1 1 220px; min-width:0; }
.sp-soft__filters > select { flex:1 1 180px; min-width:0; }
.sp-soft__card { display:grid; gap:12px; padding:20px; border:1px solid var(--hair, #dce1e8); border-radius:var(--r-sm, 10px); background:var(--surface, #fff); min-width:0; overflow-wrap:anywhere; }
.sp-soft__form { display:grid; gap:16px; }
.sp-soft__field { display:grid; gap:8px; min-width:0; }
.sp-soft__field > input, .sp-soft__field > select { width:100%; min-width:0; box-sizing:border-box; }
.sp-soft__note { white-space:pre-wrap; }
.sp-soft__meta, .sp-soft__intro, .sp-soft__count { color:var(--steel); }
.sp-soft a { text-decoration:underline; }
.sp-soft__saved { color:var(--ink); }
.sp-soft button:focus-visible, .sp-soft a:focus-visible, .sp-soft input:focus-visible, .sp-soft select:focus-visible { outline:2px solid var(--accent, #315fca); outline-offset:3px; }
@media(max-width:600px) { .sp-soft__card { padding:16px; } .sp-soft__actions > button { min-height:44px; } }

/* Person Edit: saved targets stay separate and readable on every device. */
.rc-assigned-goals-group { display:flex; flex-direction:column; gap:12px; min-width:0; }
.rc-assigned-goals { display:flex; flex-direction:column; gap:8px; min-width:0; }
.rc-assigned-goals__title { font-weight:600; }
.rc-assigned-goals__list { display:flex; flex-direction:column; gap:8px; }
.rc-assigned-goals__item { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; }
.rc-assigned-goals__label { overflow-wrap:anywhere; min-width:0; }

/* Sales team filter keeps two readable choices, including the longer external label. */
.rc-seg--agents { align-self:flex-start; max-width:100%; }
.rc-seg--agents .rc-seg__btn { white-space:normal; }
/* Soft Touch history uses the same 12px rhythm as its business cards. */
.sp-soft__history { display:grid; gap:8px; padding:12px; border:1px solid var(--hair); border-radius:var(--r-sm,10px); }
.sp-soft__field > textarea { width:100%; min-width:0; min-height:96px; box-sizing:border-box; }
.sp-soft__filters button, .sp-soft__actions button { min-height:44px; }

/* Goal reset sheet: shared form gaps survive narrow date controls and wrapped labels. */
.rc-goal-reset { display:flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; }
.rc-goal-reset input { appearance:none; width:38px; height:22px; border:1px solid var(--hair); border-radius:999px; background:var(--steel); flex-shrink:0; position:relative; cursor:pointer; }
.rc-goal-reset input::before { content:''; position:absolute; width:16px; height:16px; left:2px; top:2px; border-radius:50%; background:var(--card); }
.rc-goal-reset input:checked { background:var(--accent); }
.rc-goal-reset input:checked::before { transform:translateX(16px); }
.rc-goal-reset input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.rc-goal-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.rc-goal-dates[hidden], .rc-goal-period[hidden] { display:none; }
.rc-goal-dates .input { min-width:0; width:100%; box-sizing:border-box; }
@media(max-width:480px) { .rc-goal-dates { grid-template-columns:minmax(0,1fr); } }

/* Goal performance hides raw Reports controls and gives its own filter labels room. */
.rc-report [hidden], .rc-filters[hidden], .rc-summary[hidden], .rcm-summary[hidden], .rcm-filters[hidden] { display: none !important; }
.rc-report-switch > label { display: flex; flex-direction: column; gap: 8px; flex: 1 1 160px; }

/* Three headline measures on the Sales goal performance scorecard. */
.rc-report-performance-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .rc-report-performance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Goal performance disclosures span the card. Keep history groups separated, and
   stack their labels on phones so nested period cards cannot squeeze words. */
.rc-report--phone .rc-report-person-card > .rc-report-help > .rc-report-people { margin-top:14px; }
@media (max-width: 600px) {
  .rc-report--phone .rc-report-help .rc-report-person-card .rc-report-definitions > div { grid-template-columns:minmax(0,1fr); gap:8px; }
  .rc-report--phone .rc-report-help .rc-report-person-card .rc-report-definitions dd { text-align:left; }
}

/* Compact Goal performance found these shared gaps: 14px between sections,
   groups and rows; 8px within controls. Calendar marks remain touch targets. */
.gp-entry, .gp-person, .gp-group, .gp-inspection { display:flex; flex-direction:column; gap:14px; min-width:0; }
.gp-entry > .tabs { margin-bottom:0; }
.gp-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.gp-controls > label { display:flex; flex-direction:column; gap:8px; min-width:0; }
.gp-controls .rc-report-select { min-width:0; max-width:100%; }
.gp-period { grid-column:1 / -1; }
.gp-navigation { display:flex; flex-wrap:wrap; gap:8px; grid-column:1 / -1; }
.gp-navigation > button { flex:1 1 140px; }
.gp-report-head, .gp-person-head, .gp-goal-head { display:flex; align-items:center; justify-content:space-between; gap:14px; min-width:0; }
.gp-report-head { flex-wrap:wrap; }
.gp-report-head > div, .gp-goal-head > div { min-width:0; }
.gp-report h3, .gp-report h4, .gp-report h5 { margin:0; line-height:1.4; }
.gp-person { background:var(--surface); border:1px solid var(--hair); border-radius:var(--r,14px); padding:20px; overflow-wrap:anywhere; }
.gp-person-head { flex-wrap:wrap; }
.gp-person h3 { font-size:1.25rem; }
.gp-group-title { color:var(--steel); font-size:var(--fs-label,.9375rem); }
.gp-list { display:flex; flex-direction:column; gap:14px; min-width:0; }
.gp-goal { border:1px solid var(--hair); border-radius:var(--r-sm,10px); padding:14px; display:flex; flex-direction:column; gap:14px; min-width:0; }
.gp-once .gp-goal-head { align-items:flex-start; }
.gp-goal h4 { font-size:var(--fs-body,1.0625rem); }
.gp-rate { flex:none; display:flex; flex-direction:column; align-items:flex-end; }
.gp-rate strong { font-size:1.5rem; font-variant-numeric:tabular-nums; }
.gp-rate span { color:var(--steel); font-size:var(--fs-label,.9375rem); }
.gp-current { border-left:3px solid var(--accent); padding-left:14px; }
.gp-history > .gp-calendar, .gp-history > .gp-inspection, .gp-history > .rc-report-note { margin-top:14px; }
.gp-history summary { display:flex; align-items:center; min-height:44px; cursor:pointer; color:var(--ui-link, var(--accent)); }
.gp-history summary::before { content:'▸'; margin-right:8px; }
.gp-history[open] summary::before { content:'▾'; }
.gp-calendar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.gp-month { display:flex; flex-direction:column; gap:14px; min-width:0; }
.gp-cells { display:flex; flex-wrap:wrap; gap:8px; }
.gp-cell { min-height:76px; min-width:54px; flex:0 1 92px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:8px; border:1px solid var(--hair); border-radius:var(--r-sm,10px); font:inherit; color:var(--ink); background:var(--surface); cursor:pointer; }
.gp-cell > span { font-weight:700; font-size:1.25rem; }
.gp-cell small { font-size:var(--fs-label,.9375rem); line-height:1.3; }
.gp-cell[data-status='met'] > span { color:var(--green); }
.gp-cell[data-status='missed'] > span { color:var(--danger,var(--ink)); }
.gp-cell[aria-pressed='true'] { border:2px solid var(--accent); }
.gp-cell:focus-visible, .gp-history summary:focus-visible, .gp-sales-tabs .m-tab:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.gp-inspection { background:var(--bg,var(--surface)); border:1px solid var(--hair); border-radius:var(--r-sm,10px); padding:14px; }
/* Seven Sales destinations wrap into readable 44px targets on native phones
   and tablets. Other native tab strips retain their existing behavior. */
.gp-sales-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; overflow:visible; }
.gp-sales-tabs .m-tab, .tabs--crm[data-count='7'] .tab { min-height:44px; min-width:0; white-space:normal; line-height:1.3; overflow-wrap:normal; }
.gp-sales-tabs .m-tab { padding:8px; }
@media (max-width:960px) { .tabs--crm[data-count='7'] { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:800px) { .gp-calendar { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) {
  .gp-controls, .gp-calendar { grid-template-columns:minmax(0,1fr); }
  .gp-person { padding:14px; }
  .gp-report-head { align-items:stretch; }
  .gp-report-head > button { width:100%; }
  .gp-goal-head { align-items:flex-start; }
  .gp-goal-head > div:first-child { flex:1; }
  .gp-goal { padding:14px; }
  .gp-sales-tabs, .tabs--crm[data-count='7'] { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:380px) {
  /* The desktop dock leaves a narrower content rail than the native shell. */
  .tabs--crm[data-count='7'] { grid-template-columns:minmax(0,1fr); }
}

/* Soft Touch board and record: a real name button keeps keyboard access and
   wraps long business names within the existing card spacing. */
.sp-soft__name { display:block; text-align:left; padding:0; border:0; background:transparent; color:var(--ink); font:inherit; font-weight:600; cursor:pointer; text-decoration:underline; overflow-wrap:anywhere; min-height:44px; }
.sp-soft__name:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }

/* Unified Sales Reports: 20px between sections, 14px within a section.
   Keep every control at the shared 48px touch target, including desktop. */
.sr-workspace { display:flex; flex-direction:column; gap:20px; min-width:0; font-size:var(--fs-body,1.0625rem); color:var(--ink); }
.sr-workspace p, .sr-workspace h2, .sr-workspace h3 { margin:0; }
.sr-workspace [hidden] { display:none!important; }
.sr-tabs, .sr-pager { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.sr-tabs { padding-bottom:14px; border-bottom:1px solid var(--hair); }
.sr-tabs > button { flex:0 1 auto; }
.sr-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.sr-controls:empty { display:none; }
.sr-controls label { display:flex; flex-direction:column; gap:14px; min-width:0; }
.sr-workspace select, .sr-workspace input, .sr-workspace button, .sr-workspace summary, .sr-workspace .rc-report-link { min-height:48px; }
.sr-workspace button, .sr-workspace select, .sr-workspace input { max-width:100%; }
.sr-workspace button { white-space:normal; }
.sr-workspace :is(button,select,input,summary,a):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.sr-body, .sr-disclosure-body, .sr-records { display:flex; flex-direction:column; gap:20px; min-width:0; }
.sr-body > .rc-report-card { display:flex; flex-direction:column; gap:14px; padding:20px; overflow:visible; }
.sr-body > .rc-report-card > .rc-report-head { padding:0 0 14px; }
.sr-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.sr-metric { appearance:none; background:var(--surface,#fff); border:1px solid var(--hair); border-radius:var(--r,14px); box-shadow:var(--shadow-card,0 1px 3px rgba(16,24,32,.06)); padding:20px; text-align:left; color:var(--ink); display:flex; flex-direction:column; gap:14px; cursor:pointer; font:inherit; min-width:0; }
.sr-metric span, .sr-metric small { color:var(--steel); }
.sr-metric strong { font-size:1.8rem; line-height:1.2; font-variant-numeric:tabular-nums; }
.sr-metric:hover { border-color:var(--accent); }
.sr-disclosure, .gp-person-fold { background:var(--surface,#fff); border:1px solid var(--hair); border-radius:var(--r,14px); padding:0 20px; min-width:0; }
.sr-disclosure > summary, .gp-person-fold > summary { cursor:pointer; padding:14px 0; overflow-wrap:anywhere; font-weight:600; }
.sr-disclosure[open] > .sr-disclosure-body { padding:0 0 20px; }
/* Goal performance keeps the person card’s shared inset inside its disclosure. */
.gp-person-fold[open] { padding-bottom:20px; }
.sr-record { display:flex; flex-direction:column; gap:14px; padding:20px; border:1px solid var(--hair); border-radius:var(--r,14px); background:var(--surface,#fff); min-width:0; }
.sr-workspace--phone .rc-report--phone { padding:0; }
.sr-sales-tabs { overflow-x:auto; }
.sr-workspace .gp-navigation { gap:14px; }
@media(max-width:900px) { .sr-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .sr-controls { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) { .sr-controls { grid-template-columns:minmax(0,1fr); } .sr-metric { padding:14px; } .sr-workspace .rc-report-definitions > div { grid-template-columns:minmax(0,1fr) minmax(0,1.3fr); } .sr-workspace .gp-controls { grid-template-columns:minmax(0,1fr); } }

/* Shared selects.css loads last; this scoped selector preserves its look at 48px. */
.sr-workspace select:not([multiple]):not([size]), .sr-workspace select[size="1"]:not([multiple]) { min-height:48px; }
body:has(.sr-workspace select[aria-expanded="true"]) .selmenu [role="option"] { min-height:48px; }

/* Native Sales bands own their gutters; the shared workspace owns its own. */
.sr-workspace--phone { padding:0 20px 20px; }

/* Keep the three Reports subtabs one coherent group on a narrow phone. */
@media(max-width:520px) {
  .sr-tabs { display:grid; grid-template-columns:minmax(0,1.2fr) repeat(2,minmax(0,.9fr)); align-items:stretch; }
  .sr-workspace .sr-tabs > button { min-width:0; padding:10px 2px; font-size:var(--fs-label,.9375rem); }
}
@media(max-width:360px) { .sr-workspace .sr-tabs > button { font-size:var(--fs-badge,.875rem); } }
