:is(body,body[data-app-scope]) input[type=checkbox]:not(#embedded-account input){
  appearance:none;-webkit-appearance:none;box-sizing:border-box;display:inline-block;vertical-align:middle;
  flex:0 0 auto;width:42px;height:25px;min-width:42px;max-width:42px;min-height:25px;margin:0;
  border:1px solid var(--color-border-strong,#CAC5B8);border-radius:20px;cursor:pointer;
  background:var(--color-border-strong,#CAC5B8);position:relative;transition:background-color .14s;
}
body input[type=checkbox]:not(#embedded-account input)::before{content:"";display:block;position:absolute;left:2px;top:2px;width:19px;height:19px;border-radius:50%;background:white;box-shadow:0 1px 3px #162a2638;transition:transform .14s}
:is(body,body[data-app-scope]) input[type=checkbox]:not(#embedded-account input):checked{background:var(--pine-600,#3a6b55);border-color:var(--pine-600,#3a6b55)}
body input[type=checkbox]:not(#embedded-account input):checked::before{transform:translateX(17px)}
body input[type=checkbox]:not(#embedded-account input):disabled{opacity:.5;cursor:not-allowed}
/* A switch that is on and cannot be turned off keeps the full green and shows a
   check in the knob; a dimmed green read as broken, not as locked. */
body input[type=checkbox]:not(#embedded-account input):checked:disabled{opacity:1}
body input[type=checkbox]:not(#embedded-account input):checked:disabled::after{content:"";position:absolute;left:25px;top:5px;width:5px;height:9px;border:solid var(--pine-600,#3a6b55);border-width:0 2px 2px 0;transform:rotate(45deg)}
body input[type=checkbox]:focus-visible{outline:2px solid var(--color-link,#3a6b55);outline-offset:3px}
.notification-matrix{width:100%;border-collapse:collapse;font:var(--weight-medium) var(--body-size)/1.3 var(--font-sans)}.notification-matrix th{text-align:left;font-weight:500}.notification-matrix thead th{text-align:center;font-size:var(--body-sm-size);color:var(--color-text-secondary);padding-bottom:4px}.notification-matrix .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.notification-matrix td{width:58px;text-align:center}.notification-matrix tbody tr{border-bottom:1px solid var(--color-border)}
/* A channel that does not apply: a muted dash centred in the switch column, the
   height of a switch row. Mark the cell .matrix-none (aria-label says why). */
.notification-matrix td.matrix-none,.notification-matrix td[aria-label="Not available"]{height:48px;vertical-align:middle;font:var(--weight-medium) 22px/1 var(--font-sans);color:var(--color-text-muted);user-select:none}
.matrix-hit{display:grid;place-items:center;min-height:48px;cursor:pointer}
.matrix-sheet{width:min(390px,calc(100% - 24px));max-height:90dvh;overflow:auto;border:1px solid var(--color-border);border-radius:14px;padding:20px;color:var(--color-text-primary);background:var(--color-surface,#fff)}
.matrix-sheet::backdrop{background:#12271c73}.matrix-sheet .actions{flex-wrap:wrap}.matrix-sheet h3{margin:0}.matrix-sheet .hint{font-size:var(--body-sm-size);line-height:1.5}
.matrix-note:empty{display:none}
@media(max-width:600px){.matrix-sheet{inset:auto 0 0;width:100%;max-width:500px;margin:0 auto;padding-bottom:max(20px,env(safe-area-inset-bottom));border-radius:16px 16px 0 0}}
@media(prefers-reduced-motion:reduce){body input[type=checkbox],body input[type=checkbox]::before{transition:none!important}}
@media(forced-colors:active){body input[type=checkbox]:not(#embedded-account input){appearance:auto}body input[type=checkbox]::before{display:none}}
/* The identity row: avatar, name and unit or role on one line, email under,
   a chevron. A native details whose panel holds the account controls. */
.profile-card{min-width:0;overflow:hidden;border:1px solid var(--color-border);border-radius:12px;background:var(--color-surface,#fff)}
.profile-card>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 14px}
.profile-card>summary::-webkit-details-marker{display:none}
.profile-card>summary>svg{flex:none;margin-left:auto;width:20px;height:20px;color:var(--color-link)}
.profile-card[open]>summary>svg{transform:rotate(180deg)}
.profile-face{background:var(--pine-800);color:white;border-radius:50%;width:40px;height:40px;flex:none;display:grid;place-items:center;overflow:hidden;font-weight:600;font-size:14px}
.profile-face img{width:100%;height:100%;object-fit:cover}
.profile-card__who{display:grid;gap:2px;min-width:0}
.profile-card__line{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 8px;min-width:0}
.profile-card__line strong{font:var(--font-row-title);overflow-wrap:anywhere}
/* No name on record: the email stands in for it, so it is shown as an email (regular weight), not as a bold name. */
.profile-card__who:has(> small[hidden]) strong{font-weight:var(--weight-regular);font-size:var(--body-size)}
.profile-card__context{font:var(--font-row-meta);color:var(--color-text-secondary)}
.profile-card__who small{font:var(--font-row-meta);color:var(--color-text-secondary);overflow-wrap:anywhere}
.profile-card__panel{border-top:1px solid var(--color-border)}
.profile-card__panel>.profile-rows{padding:10px 10px 0}
.profile-card__link{display:flex;align-items:center;min-height:48px;padding:0 14px;color:var(--color-link);font:var(--font-tertiary);text-decoration:none}
.profile-rows{display:grid;gap:8px}.profile-rows>details{min-width:0;border:1px solid var(--color-border);border-radius:10px;background:var(--color-surface,#fff)}
.profile-rows>details>summary{list-style:none;cursor:pointer;min-height:52px;padding:12px 15px;display:flex;align-items:center;gap:10px;font:var(--font-row-title)}
.profile-rows summary::-webkit-details-marker{display:none}.profile-rows>details>summary>svg{flex:none;width:20px;height:20px;color:var(--color-link)}
.profile-rows>details>summary>svg:last-child{margin-left:auto}
.profile-rows>details[open]>summary>svg:last-child{transform:rotate(180deg)}.profile-panel{padding:0 15px 12px}

[data-staff-notifications] .profile-panel>form.card{border:0;padding:0;box-shadow:none}

/* The embedded account is narrower than the viewport inside a profile row. */
.profile-panel #embedded-account{grid-template-columns:minmax(0,1fr)}
.profile-panel #embedded-account>.note{overflow-wrap:anywhere}
.profile-panel #embedded-account .cl-userProfile-root>.cl-cardBox{
  width:100%;max-width:100%;box-sizing:border-box;box-shadow:none
}
.profile-panel #embedded-account .cl-userProfile-root>.cl-cardBox>:is(.cl-navbar,.cl-navbarMobileMenuRow){display:none}
.profile-panel #embedded-account .cl-profileSectionHeader{max-width:100%;min-width:0}
[data-sms-enrollment] fieldset{border:0;padding:0;margin:12px 0}
[data-sms-enrollment] fieldset label{display:flex;align-items:center;gap:12px;min-height:44px}
[data-sms-enrollment] form + form{margin-top:8px}

.record-row { min-width: 0; }
.record-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.action-sheet { box-sizing: border-box; }
.action-sheet > form.card { margin: 0; padding: 0; border: 0; box-shadow: none; }
