/* Comeback plan page (owner-retention.js), written for an owner who isn't confident with tech:
   plain sentences at 17px, one big labelled button per person, finer detail folded away.
   Design tokens from style.css only, square corners. Loads after x-staff.css. */

/* Grey status bar on avatars (on hold, no reply) */
.avatar.ring-grey { box-shadow: inset 0 -3px 0 var(--line-ctl); }

/* Wider laptops: a little less padding per tab so the extra 'Comeback' tab fits at 1366px */
@media (min-width: 1280px) {
  .tabs a { padding: 0 10px; }
  .tabs a.on::before { left: 10px; right: 10px; }
}

/* ---------- Sections ---------- */
.cb-sec .section-head { margin-bottom: 10px; }
.cb-lead { max-width: 46em; margin: 0 0 16px; font-size: 17px; line-height: 1.5; }
.cb-detail-line { margin-top: 14px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.cb-late { color: var(--accent-text); font-weight: 700; }

/* ---------- One person: name, why, what to do, one big button ---------- */
.cb-people { border-top: 2px solid var(--line-strong); }
.cb-person { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cb-person-body { display: grid; gap: 6px; min-width: 0; }
.cb-name { font: 700 21px/1.25 var(--sans); letter-spacing: -.01em; overflow-wrap: anywhere; }
.cb-name .link-btn { text-decoration-color: var(--line-ctl); text-underline-offset: 4px; }
.cb-name .link-btn:hover { text-decoration-color: var(--accent-text); }
.cb-why, .cb-todo { font-size: 17px; line-height: 1.5; }
.cb-why { color: var(--muted); }
.cb-todo strong { font-weight: 700; }
.cb-person-act { grid-column: 2; display: grid; gap: 4px; margin-top: 14px; min-width: 0; }
.cb-go { width: 100%; min-height: 54px; padding: 8px 16px; font-size: 16px; letter-spacing: .05em; line-height: 1.2; }
@media (min-width: 760px) {
  .cb-person { grid-template-columns: 48px minmax(0, 1fr) minmax(230px, 290px); gap: 0 20px; }
  .cb-person > .avatar { width: 48px; height: 48px; font-size: 18px; }
  .cb-person-act { grid-column: 3; margin-top: 0; }
}
.modal .cb-person { grid-template-columns: 40px minmax(0, 1fr); }
.modal .cb-person > .avatar { width: 40px; height: 40px; font-size: 16px; }
.modal .cb-person-act { grid-column: 2; margin-top: 14px; }

/* ---------- Folding sections: a plain "Show" / "Hide" word on the right ---------- */
.cb-fold { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cb-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; cursor: pointer; list-style: none; font: 700 17px/1.3 var(--sans); }
.cb-fold > summary::-webkit-details-marker { display: none; }
.cb-fold > summary::after { content: 'Show'; flex: none; min-width: 80px; padding: 14px 12px; border: 1px solid var(--line-ctl); background: var(--surface); text-align: center; font: 700 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text); transition: background-color .2s var(--ease-ui); }
.cb-fold > summary:hover::after { background: var(--surface-2); border-color: var(--text); }
.cb-fold[open] > summary::after { content: 'Hide'; }
.cb-fold-label .num { margin-left: 6px; color: var(--muted); }
.cb-fold-body { padding: 4px 0 20px; font-size: 16px; line-height: 1.5; }
.cb-fold-body > p + p { margin-top: 10px; }
.cb-names { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }

/* Small folds inside a row (More options, Change the offer, All three checks): no box lines, the word only */
.cb-more, .cb-fold-sm { border: 0; }
.cb-more > summary, .cb-fold-sm > summary { justify-content: center; min-height: 44px; padding: 0; font: 600 16px/1.2 var(--sans); color: var(--muted); }
.cb-more > summary::after, .cb-fold-sm > summary::after { content: ''; width: 7px; height: 7px; min-width: 0; padding: 0; border: 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); background: none; }
.cb-more > summary:hover, .cb-fold-sm > summary:hover { color: var(--text); }
.cb-more > summary:hover::after, .cb-fold-sm > summary:hover::after { background: none; }
.cb-more[open] > summary, .cb-fold-sm[open] > summary { color: var(--text); }
.cb-more[open] > summary::after, .cb-fold-sm[open] > summary::after { content: ''; transform: translateY(2px) rotate(-135deg); }
.cb-more > .cb-fold-body, .cb-fold-sm > .cb-fold-body { padding: 4px 0 0; }
.cb-fold-sm > summary { justify-content: flex-start; gap: 10px; }
.cb-more-btns { display: grid; gap: 8px; }
.cb-more-btns .btn { width: 100%; min-height: 50px; padding: 8px 14px; line-height: 1.2; }
.cb-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 16px; line-height: 1.45; text-align: left; }
.cb-checks li { display: flex; align-items: baseline; gap: 10px; }
.cb-checks .pill { flex: none; }

/* ---------- How the plan works: five numbered sentences, each with an On/Off switch ---------- */
.cb-steps { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line-strong); }
.cb-step { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 4px 18px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cb-step-n { font: 900 48px/.85 var(--display); color: var(--brand); }
.cb-step.is-off .cb-step-n { color: transparent; -webkit-text-stroke: 1.5px var(--line-ctl); }
.cb-step-body { display: grid; gap: 6px; min-width: 0; }
.cb-step-text { font-size: 18px; line-height: 1.45; }
.cb-step-who { font-size: 16px; line-height: 1.45; color: var(--muted); }
.cb-step.is-off .cb-step-text { color: var(--muted); }
.cb-step-count { display: inline-flex; align-items: center; justify-self: start; min-height: 40px; font-size: 16px; font-weight: 600; text-align: left; }
.cb-step-count.is-none { color: var(--muted); font-weight: 400; }
.cb-toggle { display: inline-flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font: 700 17px/1 var(--sans); }
.cb-onoff { min-width: 2em; }
.cb-step.is-off .cb-onoff { color: var(--muted); }
.cb-offer { gap: 6px; max-width: 360px; font-size: 16px; }
.cb-offer select { min-height: 48px; padding: 8px 36px 8px 12px; font-size: 16px; background-position: right 12px center; }
@media (max-width: 619px) {
  .cb-step { grid-template-columns: 34px minmax(0, 1fr); }
  .cb-step-n { font-size: 36px; }
  .cb-toggle { grid-column: 2; }
}

/* ---------- Did it work? Plain sentences; the numbers you can tap ---------- */
.cb-sentences { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line-strong); }
.cb-sentences li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 1.5; }
.cb-num {
  display: inline; padding: 2px 1px; border: 0; background: none; color: inherit; font: inherit; font-weight: 800; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--accent-text); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.cb-num:hover { color: var(--accent-text); }
.cb-rate { display: inline-block; width: 80px; height: 6px; background: var(--track); vertical-align: middle; margin-right: 8px; }
.cb-rate span { display: block; height: 100%; background: var(--brand); }
.cb-results-table td[data-label='Came back %'] { white-space: nowrap; }
.cb-results-table td, .cb-results-table th { font-size: 16px; }
.cb-worth .row { min-height: 0; }

/* ---------- Everyone else in the plan: named tabs ---------- */
.cb-segs .seg { font-size: 19px; }
/* Phones: the tabs wrap onto two lines instead of hiding "No reply" off the edge */
@media (max-width: 619px) {
  body[data-area='staff'] .segs.cb-segs, body[data-area='staff'] .segs.cb-tabs { flex-wrap: wrap; gap: 0 20px; overflow: visible; }
  .cb-segs .seg { font-size: 17px; }
}

/* ---------- Pop-ups ---------- */
.cb-pop .sheet-head h2 { margin-bottom: 4px; }
.cb-pop-why { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--muted); }
.cb-pop-note { margin-top: 10px; font-size: 16px; line-height: 1.5; }
.cb-pop-step { margin: 22px 0 8px; padding: 0; font: 700 13px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cb-pop label { font-size: 16px; }
.cb-pop input:not([type='radio']):not([type='checkbox']) { font-size: 16px; }
.cb-pop textarea { min-height: 160px; font: 16px/1.5 var(--sans); }
.cb-send-help { margin-top: 14px; font-size: 16px; line-height: 1.45; color: var(--muted); }
.cb-pop .modal-actions .btn { min-height: 54px; font-size: 16px; line-height: 1.2; }
.modal-actions.cb-actions-3 { grid-template-columns: 1fr; }
.cb-list-pop .cb-people, .cb-list-pop .list-card { margin-top: 16px; }
.cb-weeks { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.cb-weeks legend { margin: 0 0 8px; }
@media (min-width: 620px) { .cb-weeks .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cb-weeks .pick > span { padding: 12px 30px 12px 12px; }
.cb-weeks .pick > span strong { white-space: nowrap; }
.cb-weeks .pick input:checked + span::after { right: 12px; }

/* ---------- Perks: two short cards side by side on a laptop ---------- */
.cb-card { display: grid; gap: 12px; align-content: start; }
.cb-card h3 { font-size: 21px; }
.cb-card-text { font-size: 17px; line-height: 1.5; }
.cb-card .list-card .row { padding-left: 0; padding-right: 0; }
.cb-card .ticks { margin-top: 0; font-size: 16px; }
@media (min-width: 960px) { .cb-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
