/* portal/assets/safety.css
   #519 The family list, the family code word card and the safety switches (Settings and the safety
   setup), built toward the design canvas: the product's tokens, 17px text on phones, 44px targets. */
/* The colour tokens, on every container that holds safety components: the cards, the whole setup page (its Next and
   Finish buttons and its status line sit outside the card, and without the tokens Next was white on the page), and
   Settings' "Run the safety setup again" link, which sits under the cards. */
.sf-card,.sf-setup,#safety-setup-again{--sf-green:#006da6;--sf-deep:#102c4c;--sf-mint:#e7f2fa;--sf-ink:#21313e;--sf-muted:#405765;--sf-line:#dce5ea}
.sf-card{color:var(--sf-ink);font-size:16px;line-height:1.45}
.sf-card h2.sf-title{margin:0 0 4px;font-size:20px;line-height:1.3;font-weight:800;color:var(--sf-deep)}
.sf-card .sf-lead{margin:0 0 14px;color:var(--sf-muted)}
.sf-people{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:10px}
.sf-person{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--sf-line);border-radius:16px;padding:12px 14px}
.sf-avatar{flex:0 0 44px;width:44px;height:44px;border-radius:22px;background:var(--sf-mint);color:var(--sf-deep);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px}
.sf-person-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.sf-person-text strong{font-size:17px;color:var(--sf-deep);overflow-wrap:anywhere}
.sf-person-text span{color:var(--sf-muted);overflow-wrap:anywhere}
.sf-person-text .sf-alerts{font-size:15px;font-weight:600;color:var(--sf-green)}
.sf-person-text .sf-alerts[data-on=false]{color:var(--sf-muted);font-weight:500}
.sf-empty{color:var(--sf-muted);padding:6px 0}
.sf-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 18px;border-radius:14px;border:2px solid var(--sf-green);background:var(--sf-green);color:#fff;font:inherit;font-size:17px;font-weight:800;cursor:pointer}
.sf-button:hover{background:#005482;border-color:#005482}
.sf-button.sf-secondary{background:#fff;color:var(--sf-green)}
.sf-button.sf-secondary:hover{background:var(--sf-mint)}
.sf-button.sf-ghost{background:transparent;border-color:transparent;color:var(--sf-muted);font-weight:600}
.sf-link{min-height:44px;min-width:44px;padding:8px 10px;border:0;background:transparent;color:var(--sf-green);font:inherit;font-weight:700;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.sf-link.sf-danger{color:#9b1c14}
.sf-add{width:100%}
.sf-form{display:flex;flex-direction:column;gap:6px;background:#f5f8fa;border:1px solid var(--sf-line);border-radius:16px;padding:16px;margin:4px 0 8px}
.sf-form-title{margin:0 0 6px;font-size:18px;font-weight:800;color:var(--sf-deep)}
.sf-label{font-weight:700;color:var(--sf-ink);margin-top:6px}
.sf-card select.sf-input,.sf-card input.sf-input{min-height:48px;height:auto}
/* reference-system.css sizes every field and button on .ref-page pages (Settings, Care Plan) with rules
   specific enough to beat the ones above; these keep the safety components at their designed sizes. */
body.ref-page .sf-card :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select).sf-input{min-height:48px}
body.ref-page .sf-card .sf-button{font-size:17px;border-radius:14px}
body.ref-page .sf-card .sf-link{font-size:inherit}
.sf-input{min-height:48px;width:100%;box-sizing:border-box;border:1px solid #b8c6cf;border-radius:12px;padding:10px 12px;font:inherit;font-size:17px;color:var(--sf-ink);background:#fff}
.sf-input:focus-visible,.sf-button:focus-visible,.sf-link:focus-visible,.sw:focus-visible{outline:3px solid #7fb8a8;outline-offset:2px}
.sf-input[aria-invalid=true]{border-color:#9b1c14}
.sf-field-error{margin:0;min-height:0;color:#9b1c14;font-weight:600}
.sf-field-error:empty{display:none}
.sf-inline{display:flex;gap:8px;align-items:stretch;flex-wrap:wrap}
.sf-inline .sf-input{flex:1 1 180px}
.sf-hint,.sf-text{margin:4px 0;color:var(--sf-muted)}
.sf-note{margin:8px 0 4px;padding:12px 14px;border-radius:12px;background:#fff8e8;border:1px solid #e5d4aa;color:#55431f}
.sf-warning{margin:0 0 8px;padding:12px 14px;border-radius:12px;background:#fff1f0;border:1px solid #f0c6c2;color:#7a1c14;font-weight:700}
.sf-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}
.sf-set{display:flex;align-items:flex-start;gap:10px;margin:0 0 6px}
.sf-pill{display:inline-block;padding:4px 12px;border-radius:999px;background:var(--sf-mint);color:var(--sf-deep);font-weight:800;font-size:15px;white-space:nowrap}
.sf-feature{border-top:1px solid var(--sf-line);padding:14px 0}
.sf-feature:first-child{border-top:0;padding-top:0}
.sf-switch-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:6px}
.sf-switch-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.sf-switch-text strong{font-size:17px;color:var(--sf-deep)}
.sf-switch-text span{color:var(--sf-muted)}
.sf-switch-text span b{color:var(--sf-deep);font-weight:700}
.sf-detail{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;margin-top:10px;max-width:360px}
.sf-feature-link{display:inline-flex;align-items:center;margin-top:6px;padding:8px 0}
.sf-detail .sf-label{margin:0}
/* #692 One menu per kind of place, its label above it: beside it a long label squeezes the menu and cuts off the choice. */
.sf-detail.sf-choice{grid-template-columns:1fr;gap:4px}
.sw{appearance:none;-webkit-appearance:none;width:52px;height:32px;min-width:52px;border-radius:16px;background:#b8c6cf;position:relative;margin:0;flex-shrink:0;cursor:pointer;transition:background .15s}
.sw:checked{background:var(--sf-green)}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:left .15s}
.sw:checked::after{left:23px}
.sw:disabled{opacity:.55;cursor:not-allowed}
.sf-status{margin:8px 0 0;min-height:1.4em;font-weight:700;color:var(--sf-muted)}
.sf-status[data-tone=ok]{color:var(--sf-green)}
.sf-status[data-tone=error]{color:#9b1c14}
.sf-summary{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.sf-summary li{display:flex;align-items:center;gap:10px;color:var(--sf-ink)}
@media (max-width:767px){.sf-card{font-size:17px}.sf-button{width:100%}.sf-actions .sf-button{flex:1 1 140px}.sf-inline .sf-suggest{flex:1 1 100%}}
@media (prefers-reduced-motion:reduce){.sw,.sw::after{transition:none}}
/* #519 review: whether each person's alert texts are really on, a note on a number that shouldn't be
   on the list, and a confirmation before anything is removed. */
.sf-person-text .sf-alerts[data-tone=todo]{color:#8a5a00;font-weight:600}
/* #684 A neutral note with the fix, not a red error: nothing is wrong with what the family did. */
.sf-person-text .sf-row-note{display:block;margin-top:8px;padding:8px 10px;border-radius:8px;background:#f1f5f9;border-left:3px solid #64748b;font-size:15px;line-height:22px;color:#20313e;font-weight:400}
.sf-confirm{display:flex;flex-direction:column;gap:8px;margin-top:8px;padding:12px 14px;border:1px solid #f0c6c2;border-radius:14px;background:#fff8f7}
.sf-confirm .sf-text{margin:0;color:var(--sf-ink)}
.sf-danger-button{background:#9b1c14;border-color:#9b1c14;color:#fff}
.sf-danger-button:hover{background:#7a1c14;border-color:#7a1c14}
.sf-hint .sf-link{padding:0 4px;min-height:44px}
/* #519 The safety setup page (portal/safety-setup.html), from the canvas screens Setup 1-4 */
body.sf-setup-page{background:#f5f8fa}
.sf-setup{max-width:560px;margin:0 auto;padding:20px 16px 40px;display:flex;flex-direction:column;gap:16px;color:#21313e}
.sf-setup-top{display:flex;flex-direction:column;gap:8px}
.sf-step-pill{margin:0;font-size:15px;font-weight:600;color:#405765}
.sf-progress{height:6px;background:#dce5ea;border-radius:3px;overflow:hidden}
.sf-progress-fill{height:6px;width:0;background:#006da6;border-radius:3px;transition:width .2s}
.sf-setup-title{margin:0;font-size:26px;line-height:32px;font-weight:800;color:#102c4c}
.sf-setup-title:focus{outline:none}
.sf-setup-lead{margin:0;font-size:17px;line-height:25px;color:#405765}
.sf-setup-lead:empty{display:none}
.sf-setup-body{display:flex;flex-direction:column;gap:12px}
.sf-setup-actions{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.sf-setup-actions .sf-button{width:100%;min-height:52px}
.sf-setup-skip,.sf-setup-back{align-self:center;color:#405765;text-decoration:none;font-weight:600}
.sf-explain{display:flex;flex-direction:column;gap:4px;background:#e7f2fa;border-radius:14px;padding:12px 14px;color:#102c4c}
.sf-summary li{justify-content:space-between;background:#fff;border:1px solid #dce5ea;border-radius:14px;padding:12px 14px}
.sf-summary li strong{color:#006da6;text-align:right}
.sf-only-you{background:#fff8e8;border:1px solid #e5d4aa;border-radius:14px;padding:14px 16px;color:#55431f}
.sf-only-you h2{margin:0 0 4px;font-size:18px;color:#55431f}
.sf-only-you p{margin:0}
.sf-suggest-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#e7f2fa;border-radius:14px;padding:12px 14px;color:#102c4c}
.sf-limits{margin:12px 0 0;text-align:center;font-size:15px;color:#405765}
@media (prefers-reduced-motion:reduce){.sf-progress-fill{transition:none}}
/* The setup page's own buttons sit outside .sf-card; keep them at their designed size too. */
body.ref-page .sf-setup .sf-button{font-size:17px;border-radius:14px}
body.ref-page .sf-setup .sf-link{font-size:17px}
/* Links styled as sf-link keep the 44px tap target. */
a.sf-link{display:inline-flex;align-items:center}
/* #684 Under the place alerts switch while their phone isn't connected. */
.sf-warn{margin:8px 0 0;padding:10px 12px;border-radius:10px;background:#fffbeb;border:1px solid #fcd34d;color:#78350f;font-size:15px;line-height:22px}
.sf-warn .sf-link{color:#7c2d12;font-weight:700}
/* #684 round 2: phone numbers in sentences never break mid-number */
.sf-nowrap { white-space: nowrap; }
