/*
 * Connections V1 (/my-connections/). Layered on the Sneaky Line base (brand/assets/sl-base.css, family "account");
 * every rule is scoped to body.sh-cx and uses the base tokens (--sl-*). Mobile first. Motion only under
 * prefers-reduced-motion: no-preference. The one !important is the focus ring (it must beat the site-wide amber ring,
 * HK-084, which is 2.1:1 on white).
 */

body.sh-cx .scx { --scx-radius: 22px; --scx-danger: #a3263f; --scx-danger-wash: #fbeef1; color: var(--sl-copy); }
body.sh-cx .scx :focus-visible { outline: 2px solid var(--sl-ink) !important; outline-offset: 3px !important; box-shadow: 0 0 0 6px #fff !important; border-radius: 10px; }

/* ---------- masthead ---------- */
body.sh-cx .scx-mast-inner { display: grid; gap: 14px; justify-items: start; padding-block: clamp(22px, 4vw, 56px) clamp(28px, 4.5vw, 60px); max-width: 960px; /* = .scx-body, so hero and body share one left edge (brand refinement) */ margin-inline: auto; width: min(var(--sl-max), 100% - 2 * var(--sl-gutter)); }
body.sh-cx .scx-lede { max-width: 62ch; font-size: clamp(17px, 1rem + .3vw, 19px); line-height: 1.55; color: var(--sl-copy); }
body.sh-cx .scx-mast .sl-crumbs a { gap: 8px; font-weight: 700; }
body.sh-cx .scx-back { transform: scaleX(-1); width: 16px; height: 16px; }

/* ---------- layout ---------- */
body.sh-cx .scx-body { display: grid; gap: clamp(36px, 5vw, 56px); padding-block: clamp(20px, 3vw, 36px) clamp(56px, 7vw, 96px); max-width: 960px; }
body.sh-cx .scx-sec { display: grid; gap: 18px; min-width: 0; }
body.sh-cx .scx-head { margin: 0; gap: 6px; }
body.sh-cx .scx-subhead { margin-top: 10px; }
body.sh-cx .scx-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
body.sh-cx .scx-list--tight { gap: 8px; }
body.sh-cx .scx-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin: 0; padding: 0; list-style: none; }
body.sh-cx .scx-grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
body.sh-cx .scx-two { display: grid; gap: 12px; }
@media (min-width: 720px) { body.sh-cx .scx-two { grid-template-columns: 1fr 1fr; } }

/* ---------- cards ---------- */
body.sh-cx .scx-card { position: relative; display: grid; gap: 12px; min-width: 0; padding: clamp(18px, 3vw, 26px); background: #fff; border: 1px solid var(--sl-line-soft); border-radius: var(--scx-radius); box-shadow: var(--sl-shadow-card); }
body.sh-cx .scx-card--sky { background: linear-gradient(180deg, #fbfeff, var(--sl-sky-soft)); border-color: #cfe9f5; }
body.sh-cx .scx-card .sl-h3 { margin: 0; }
body.sh-cx .scx-sub { margin: 0; color: var(--sl-copy); }
body.sh-cx .scx-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 16px; background: #fff; border: 1px solid var(--sl-line-soft); border-radius: 16px; }
body.sh-cx .scx-row strong { color: var(--sl-ink); }
body.sh-cx .scx-empty { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border: 1.5px dashed var(--sl-line); border-radius: var(--scx-radius); background: #fbfdfe; }
body.sh-cx .scx-empty .sl-i { width: 28px; height: 28px; color: var(--sl-teal); flex: none; }
body.sh-cx .scx-empty p { margin: 0; }
body.sh-cx .scx-empty strong { color: var(--sl-ink); }

/* people */
body.sh-cx .scx-person-head, body.sh-cx .scx-request { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
body.sh-cx .scx-request-body { display: grid; gap: 10px; min-width: 0; }
body.sh-cx .scx-request-body > * { margin: 0; }
body.sh-cx .scx-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font: 800 18px/1 var(--sl-display); letter-spacing: -.02em; color: #fff; background: linear-gradient(140deg, #3fb39d, #246b5f); box-shadow: 0 0 0 4px #e7f2ef; }
body.sh-cx .scx-avatar--pink { background: linear-gradient(140deg, #ec6a98, #b0285a); box-shadow: 0 0 0 4px var(--sl-ring); }
body.sh-cx .scx-typeicon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--sl-sky-soft); color: var(--sl-teal); }
body.sh-cx .scx-typeicon .sl-i { width: 26px; height: 26px; }
body.sh-cx .scx-person-head > div { display: grid; gap: 4px; min-width: 0; }
body.sh-cx .scx-person-head p { margin: 0; }
body.sh-cx .scx-person-foot { padding-top: 6px; border-top: 1px solid var(--sl-line-soft); }
body.sh-cx .scx-verify { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14.5px; font-weight: 650; }
body.sh-cx .scx-verify .sl-i { width: 17px; height: 17px; }
body.sh-cx .scx-verify--yes { color: var(--sl-teal); }
body.sh-cx .scx-verify--no { color: var(--sl-muted); }
body.sh-cx .scx-sharing { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 14px; border-radius: 14px; background: #f6fbfd; color: var(--sl-ink); font-weight: 600; font-size: 15px; }
body.sh-cx .scx-sharing .sl-i { width: 18px; height: 18px; margin-top: 2px; color: var(--sl-teal); flex: none; }
body.sh-cx .scx-quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--sl-sky); background: #f6fbfd; border-radius: 0 12px 12px 0; color: var(--sl-ink); font-style: italic; }

/* chips */
body.sh-cx .scx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
body.sh-cx .scx-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 11px; border-radius: 999px; background: #eef3f6; color: var(--sl-ink); font: 700 13px/1.2 var(--sl-text); }
body.sh-cx .scx-chip--sky { background: #e3f3fa; color: #155a7c; }
body.sh-cx .scx-chip--green { background: #e3f2ec; color: #1d5c51; }
body.sh-cx .scx-chip--pink { background: var(--sl-ring); color: var(--sl-helpers-ink); }
body.sh-cx .scx-chip--muted { background: #f1f4f6; color: var(--sl-muted); }
body.sh-cx .scx-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--sl-helpers-ink); color: #fff; font-size: 12px; font-weight: 800; }

/* ---------- forms ---------- */
body.sh-cx .scx-form { display: grid; gap: 12px; margin: 0; min-width: 0; }
body.sh-cx .scx-inline { display: inline-flex; }
body.sh-cx .scx-field { display: grid; gap: 6px; margin: 0; font-weight: 700; color: var(--sl-ink); font-size: 15px; }
body.sh-cx .scx-field em { font-style: normal; font-weight: 500; color: var(--sl-muted); }
body.sh-cx .scx-field :is(input[type=text], input[type=email], select, textarea) { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--sl-line); border-radius: 14px; background: #fff; color: var(--sl-ink); font: 500 16px/1.4 var(--sl-text); }
body.sh-cx .scx-field textarea { min-height: 96px; resize: vertical; }
body.sh-cx .scx-field :is(input, select, textarea):hover { border-color: #9fc4d6; }
body.sh-cx .scx-invite-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { body.sh-cx .scx-invite-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
body.sh-cx .scx-btn--danger, body.sh-cx .scx-btn--danger:is(:hover, :focus, :active, :visited) { --sl-btn-bg: var(--scx-danger); --sl-btn-fg: #fff; --sl-btn-bd: transparent; --sl-btn-bg-on: #7f1c30; --sl-btn-fg-on: #fff; --sl-btn-bd-on: transparent; }
body.sh-cx .scx-btn--quiet { --sl-btn-fg: var(--sl-copy); }
body.sh-cx summary.sl-btn { list-style: none; }
body.sh-cx summary.sl-btn::-webkit-details-marker { display: none; }

/* destructive confirmation */
body.sh-cx .scx-confirm { position: relative; }
body.sh-cx .scx-confirm[open] > summary { background: var(--scx-danger-wash); border-color: #e4b3bf; }
body.sh-cx .scx-confirm-body { display: grid; gap: 10px; margin-top: 10px; padding: 14px 16px; max-width: 420px; border: 1px solid #ecc5cf; border-radius: 16px; background: var(--scx-danger-wash); }
body.sh-cx .scx-confirm-body p { margin: 0; color: var(--sl-ink); font-size: 15px; }

/* permissions */
body.sh-cx .scx-perms, body.sh-cx .scx-msgs, body.sh-cx .scx-preview, body.sh-cx .scx-compare, body.sh-cx .scx-edit, body.sh-cx .scx-history, body.sh-cx .scx-blocked { border: 1px solid var(--sl-line-soft); border-radius: 18px; background: #fcfeff; }
body.sh-cx :is(.scx-perms, .scx-msgs, .scx-preview, .scx-compare, .scx-edit, .scx-history, .scx-blocked) > summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 18px; cursor: pointer; font-weight: 750; color: var(--sl-ink); list-style: none; }
body.sh-cx :is(.scx-perms, .scx-msgs, .scx-preview, .scx-compare, .scx-edit, .scx-history, .scx-blocked) > summary::-webkit-details-marker { display: none; }
body.sh-cx :is(.scx-perms, .scx-msgs, .scx-preview, .scx-compare, .scx-edit, .scx-history, .scx-blocked) > summary::after { content: ""; width: 9px; height: 9px; margin-left: auto; border-right: 2.5px solid var(--sl-teal); border-bottom: 2.5px solid var(--sl-teal); transform: rotate(45deg) translate(-2px, -2px); flex: none; }
body.sh-cx :is(.scx-perms, .scx-msgs, .scx-preview, .scx-compare, .scx-edit, .scx-history, .scx-blocked)[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
body.sh-cx :is(.scx-perms, .scx-msgs, .scx-preview, .scx-compare, .scx-edit, .scx-history, .scx-blocked) > :not(summary) { padding: 0 18px 18px; }
body.sh-cx .scx-perm-form { gap: 18px; }
body.sh-cx .scx-fieldset { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
body.sh-cx .scx-fieldset legend { padding: 0; margin-bottom: 8px; font: 800 12.5px/1.2 var(--sl-text); letter-spacing: .12em; text-transform: uppercase; color: var(--sl-muted); }
body.sh-cx .scx-scope { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--sl-line-soft); }
body.sh-cx .scx-scope .sl-note { margin: 0 0 0 64px; font-size: 14px; }
body.sh-cx .scx-scope.is-unavailable { opacity: .72; }
body.sh-cx .scx-switch { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--sl-ink); }
body.sh-cx .scx-switch input { position: absolute; left: 0; top: 50%; width: 52px; height: 32px; margin: -16px 0 0; opacity: 0; cursor: pointer; }
body.sh-cx .scx-switch-ui { position: relative; flex: none; width: 52px; height: 32px; border-radius: 999px; background: #d5e2ea; box-shadow: inset 0 0 0 1.5px #b8cbd6; }
body.sh-cx .scx-switch-ui::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(18, 44, 58, .3); }
body.sh-cx .scx-switch input:checked + .scx-switch-ui { background: var(--sl-teal); box-shadow: none; }
body.sh-cx .scx-switch input:checked + .scx-switch-ui::after { transform: translateX(20px); }
body.sh-cx .scx-switch input:focus-visible + .scx-switch-ui { outline: 2px solid var(--sl-ink); outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
body.sh-cx .scx-switch input:disabled + .scx-switch-ui { background: #eef3f6; }
body.sh-cx .scx-switch input:disabled { cursor: not-allowed; }
body.sh-cx .scx-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 2px 14px; margin: 6px 0 0 64px; padding: 0; border: 0; min-width: 0; }
body.sh-cx .scx-scope:has(.scx-switch input:not(:checked)) .scx-opts { display: none; }
body.sh-cx .scx-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; color: var(--sl-ink); cursor: pointer; }
body.sh-cx .scx-check input { width: 22px; height: 22px; accent-color: var(--sl-teal); flex: none; }
body.sh-cx .scx-check em { font-style: normal; color: var(--sl-helpers-ink); font-size: 13px; font-weight: 700; }
@media (max-width: 479px) { body.sh-cx .scx-scope .sl-note, body.sh-cx .scx-opts { margin-left: 0; } }

/* messages */
body.sh-cx .scx-msgs-body { display: grid; gap: 12px; }
body.sh-cx .scx-thread { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
body.sh-cx .scx-thread li { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: #f1f6f9; }
body.sh-cx .scx-thread li.is-mine { justify-self: end; background: #e3f2ec; }
body.sh-cx .scx-thread p { margin: 0; color: var(--sl-ink); }
body.sh-cx .scx-thread .scx-thread-who { font-size: 12.5px; font-weight: 700; color: var(--sl-muted); }

/* flash and callouts */
body.sh-cx .scx-flash-wrap { max-width: 960px; }
body.sh-cx .scx-flash { display: grid; gap: 12px; }
body.sh-cx .scx-flash:empty { display: none; }
body.sh-cx .scx-flash.is-ok, body.sh-cx .scx-flash.is-error { grid-template-columns: auto minmax(0, 1fr); align-items: start; margin-top: 18px; padding: 14px 18px; border-radius: 18px; font-weight: 650; color: var(--sl-ink); }
body.sh-cx .scx-flash.is-ok { background: #e7f2ef; border: 1px solid #bfdcd4; }
body.sh-cx .scx-flash.is-error { background: var(--scx-danger-wash); border: 1px solid #ecc5cf; }
body.sh-cx .scx-flash .sl-i { width: 20px; height: 20px; margin-top: 2px; color: var(--sl-teal); }
body.sh-cx .scx-flash.is-error .sl-i { color: var(--scx-danger); }
body.sh-cx .scx-linkbox { grid-column: 1 / -1; display: grid; gap: 8px; }
body.sh-cx .scx-linkbox label { font-weight: 750; }
body.sh-cx .scx-linkrow { display: flex; flex-wrap: wrap; gap: 8px; }
body.sh-cx .scx-linkrow input { flex: 1 1 240px; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--sl-line); border-radius: 12px; font: 500 14px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--sl-ink); background: #fff; }
body.sh-cx .scx-linkbox .sl-note { margin: 0; font-weight: 500; }
body.sh-cx .scx-callout { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px 16px; border-radius: 16px; background: #f4f8fa; color: var(--sl-ink); }
body.sh-cx .scx-callout .sl-i { width: 20px; height: 20px; margin-top: 2px; color: var(--sl-teal); flex: none; }
/* "Confirm your email" (owner decision A, 16 Nov 2026): one neutral line and a real button; the focus ring is the module's */
body.sh-cx .scx-ec { border: 1px solid var(--sl-line-soft); }
body.sh-cx .scx-ec-body { display: grid; gap: 10px; min-width: 0; }
body.sh-cx .scx-ec-body p { margin: 0; overflow-wrap: anywhere; }
body.sh-cx .scx-ec-body strong { color: var(--sl-ink); }
body.sh-cx .scx-ec-form { justify-self: start; }

/* trainer area */
/* Brand & UX refinement (16 Oct 2026): trainers belong to Train, so these wear Train blue, not the Helpers/AI pink. */
body.sh-cx .scx-trainer-band { display: grid; gap: 18px; padding: clamp(20px, 3.4vw, 34px); border-radius: 28px; background: var(--sl-train-wash); border: 1px solid var(--sl-line-soft); }
body.sh-cx .scx-become { grid-template-columns: auto minmax(0, 1fr); align-items: start; background: var(--sl-train-wash); border-color: var(--sl-line-soft); }
body.sh-cx .scx-become > div { display: grid; gap: 12px; }
body.sh-cx .scx-become p { margin: 0; }
body.sh-cx .scx-become-icon { width: 40px; height: 40px; color: var(--sl-train); }
/* "Your request is waiting" under an empty "Your trainers" (brand refinement, 16 Oct 2026). */
body.sh-cx .scx-waiting { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--sl-train-wash); color: var(--sl-ink); }
body.sh-cx .scx-waiting .sl-i { width: 20px; height: 20px; margin-top: 2px; color: var(--sl-train-ink); flex: none; }
body.sh-cx .scx-become .sl-btn { justify-self: start; width: auto; }
body.sh-cx .scx-profile .scx-inline { justify-self: start; }

/* client view */
body.sh-cx .scx-shared.is-off { background: #fafcfd; box-shadow: none; }
body.sh-cx .scx-off { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--sl-muted); font-weight: 600; }
body.sh-cx .scx-off .sl-i { width: 18px; height: 18px; }
body.sh-cx .scx-mini { margin: 6px 0 0; font: 800 15px/1.3 var(--sl-text); color: var(--sl-ink); }
body.sh-cx .scx-mini .sl-note { font-weight: 600; font-size: 13.5px; }
body.sh-cx .scx-dl { display: grid; gap: 0; margin: 0; }
body.sh-cx .scx-dl > div { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--sl-line-soft); }
body.sh-cx .scx-dl dt { font-weight: 700; color: var(--sl-muted); font-size: 14.5px; }
body.sh-cx .scx-dl dd { margin: 0; color: var(--sl-ink); overflow-wrap: anywhere; }
body.sh-cx .scx-items, body.sh-cx .scx-ex { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
body.sh-cx .scx-items li, body.sh-cx .scx-ex li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #f7fafc; }
body.sh-cx .scx-items strong, body.sh-cx .scx-ex strong { color: var(--sl-ink); }
body.sh-cx .scx-ex { counter-reset: ex; }
body.sh-cx ol.scx-ex li { grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; }
body.sh-cx ol.scx-ex li::before { counter-increment: ex; content: counter(ex); grid-row: span 3; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e3f3fa; color: #155a7c; font: 800 13px/1 var(--sl-text); }
body.sh-cx .scx-proj { display: grid; gap: 12px; }
body.sh-cx .scx-proj p { margin: 0; }
body.sh-cx .scx-proj-sec { display: grid; gap: 8px; }

/* tables */
body.sh-cx .scx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
body.sh-cx .scx-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
body.sh-cx .scx-table th, body.sh-cx .scx-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sl-line-soft); color: var(--sl-ink); }
body.sh-cx .scx-table thead th { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--sl-muted); }
body.sh-cx .scx-diff { min-width: 560px; }
body.sh-cx .scx-diff tbody th { font-weight: 700; }
body.sh-cx .scx-kind { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: #eef3f6; color: var(--sl-muted); }
body.sh-cx .scx-diff tr.is-conflict .scx-kind { background: var(--sl-ring); color: var(--sl-helpers-ink); }
body.sh-cx .scx-diff tr.is-update .scx-kind, body.sh-cx .scx-diff tr.is-added .scx-kind { background: #e3f3fa; color: #155a7c; }
body.sh-cx .scx-diff tr.is-mine .scx-kind { background: #e3f2ec; color: #1d5c51; }
body.sh-cx .scx-strategies { display: grid; gap: 12px; }
@media (min-width: 760px) { body.sh-cx .scx-strategies { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.sh-cx .scx-strategy { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--sl-line-soft); }
body.sh-cx .scx-strategy .scx-mini { margin: 0; }
body.sh-cx .scx-strategy .sl-note { margin: 0; font-size: 14px; }
body.sh-cx .scx-strategy .sl-btn { white-space: normal; }

/* promises */
body.sh-cx .scx-promises { padding: clamp(18px, 3vw, 28px); border-radius: var(--scx-radius); background: linear-gradient(180deg, #f6fbfd, #eef7fb); }
body.sh-cx .scx-promises .sl-i { color: var(--sl-teal); }

/* ---------- motion (finite, state only) ---------- */
@media (prefers-reduced-motion: no-preference) {
	body.sh-cx .scx-switch-ui, body.sh-cx .scx-switch-ui::after { transition: background-color .18s var(--sl-ease), transform .22s var(--sl-spring); }
	body.sh-cx .scx-flash.is-ok, body.sh-cx .scx-flash.is-error { animation: scx-in .32s var(--sl-ease) both; }
	@keyframes scx-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
body.sh-cx .scx[aria-busy="true"] { opacity: .65; pointer-events: none; }

@media print { body.sh-cx .scx-form, body.sh-cx .scx-confirm { display: none; } }

/* wide content (compare tables) scrolls inside its own box, never the page */
body.sh-cx .scx-card > *, body.sh-cx .scx-sec > *, body.sh-cx :is(.scx-compare, .scx-edit, .scx-history, .scx-perms, .scx-msgs, .scx-preview) { min-width: 0; max-width: 100%; }
body.sh-cx .scx-table-wrap { max-width: 100%; }
body.sh-cx .scx .sl-btn { white-space: normal; text-align: center; }
@media (max-width: 479px) { body.sh-cx .scx-become { grid-template-columns: minmax(0, 1fr); } body.sh-cx .scx-become-icon { width: 32px; height: 32px; } }
body.sh-cx .scx-card { align-content: start; }
body.sh-cx .scx-dl > div:first-child { border-top: 0; }

/* ---------- mobile UX sprint (2 Nov 2026): My Trainers on a phone ---------- */
/* long names, pasted links and long words wrap inside their card instead of pushing the page sideways */
body.sh-cx :is(.scx-person-head .sl-h3, .scx-request .sl-h3, .scx-kept .sl-h3, .scx-thread p, .scx-row strong, .scx-quote, .scx-sharing) { overflow-wrap: anywhere; }
body.sh-cx .scx-perms-label { min-width: 0; overflow-wrap: anywhere; }
body.sh-cx .scx-sub .sl-in-text, body.sh-cx .scx-rec-link { display: inline-flex; align-items: center; min-height: 44px; }
body.sh-cx .scx-person[id] { scroll-margin-top: 88px; }

/* what a trainer can see, then what they can do; a client record's areas as chips, Health information first */
body.sh-cx .scx-sharing-line { display: block; }
body.sh-cx .scx-sharing-line + .scx-sharing-line { margin-top: 4px; }
body.sh-cx .scx-record-areas { margin-top: 8px; }

/* permissions that can't be used yet: one line per group instead of switches that can't move */
body.sh-cx .scx-later { margin: 0; padding-top: 12px; border-top: 1px solid var(--sl-line-soft); font-size: 14px; }

/* unsaved choices (cx.js): "Not saved yet" beside Save; on phones the bar stays in view at the bottom of the screen until
   the form ends. "Ask a Helper" and "Help Me" stay visible on phones (owner rule, hub.css), so the bar's own padding keeps
   the button above them (--shl-launcher-clearance, hub.js); wider screens keep data-shc-keep-clear, where they step aside */
body.sh-cx .scx-unsaved { margin: 0; font: 650 14.5px/1.3 var(--sl-text); color: var(--sl-plum-deep); }
body.sh-cx .scx-unsaved:empty { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* stays a live region while empty, takes no room */
@media (max-width: 719px) {
	body.sh-cx .scx-perm-form.is-dirty > .scx-save {
		position: sticky; bottom: 0; z-index: 3; gap: 6px 12px;
		margin-inline: -18px;
		padding: 10px 18px max(calc(10px + env(safe-area-inset-bottom, 0px)), var(--shl-launcher-clearance, 0px));
		background: #fff; border-top: 1px solid var(--sl-line-soft); box-shadow: 0 -14px 24px -22px rgba(18, 44, 58, .5);
	}
	body.sh-cx .scx-perm-form.is-dirty > .scx-save > .sl-btn { flex: 1 1 auto; } /* "Not saved yet" shares the row where it fits */
}

/* the card foot: "Make everything private" on its own line, then Disconnect and Block */
body.sh-cx .scx-private { flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
body.sh-cx .scx-private .sl-note { flex: 1 1 180px; margin: 0; font-size: 14px; }

/* confirmations: Cancel beside the red button, shown only where cx.js runs (it closes the disclosure) */
body.sh-cx .scx-confirm-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.sh-cx .scx .scx-cancel { display: none; }
html.scx-js body.sh-cx .scx .scx-cancel { display: inline-flex; }

/* after a command: the way back to the card the member was on */
body.sh-cx .scx-flash .scx-flash-back { grid-column: 2; margin: 0; font-weight: 500; }
