/* ApplyWell V4.18 recovery — owner's fictional connected walkthrough */
#demo-switcher[hidden],#demo-stage[hidden]{display:none!important}
#workspace.demo-persona-mode>:not(#demo-switcher):not(#demo-stage){display:none!important}
.demo-persona-switch{border:1px solid #cbdfe0;border-radius:13px;background:#f6fbfb;padding:14px 16px;margin:0 0 18px;display:flex;flex-wrap:wrap;gap:10px 20px;align-items:center}
.demo-switch-label,.demo-eyebrow{color:#075f65;font-weight:800;font-size:11px;letter-spacing:.085em}
.demo-persona-switch .demo-muted{font-size:12px;flex:1 1 100%;margin:0}
.demo-switch-buttons{display:flex;gap:5px;flex-wrap:wrap;background:#eaf2f3;padding:4px;border-radius:10px}
.demo-switch-choice{border:0;border-radius:8px;background:transparent;color:#22535b;font-size:14px;font-weight:750;padding:10px 15px;cursor:pointer}
.demo-switch-choice.active{background:#076b72;color:#fff;box-shadow:0 1px 3px #0002}
.demo-switch-choice:focus-visible,.demo-button:focus-visible,.demo-button-secondary:focus-visible{outline:3px solid #b87917;outline-offset:3px}
.demo-stage{max-width:1050px;margin:0 auto;padding:4px 0 50px;min-width:0}
.demo-stage h1{color:#153a48;font-size:clamp(26px,3.4vw,35px);line-height:1.17;margin:8px 0}
.demo-stage h2{color:#183e4b;font-size:19px;margin:0 0 12px}
.demo-stage .demo-greeting{font-size:23px;margin:18px 0}
.demo-stage>.demo-muted{margin:5px 0 12px}
.demo-muted{color:#5a7180;font-size:13px;line-height:1.5;margin:5px 0}
.demo-section{background:#fff;border:1px solid #d9e6e8;border-radius:12px;padding:18px 20px;margin:13px 0;box-shadow:0 1px 3px #15384b0a;min-width:0}
.demo-section .demo-section{border:0;border-top:1px solid #e2eded;box-shadow:none;border-radius:0;padding:17px 0 3px;margin:8px 0}
.demo-appointment-date{font-size:clamp(19px,2.5vw,26px);font-weight:750;letter-spacing:-.02em;color:#123d47;margin:8px 0}
.demo-row{border-top:1px solid #e1e9ed;padding:13px 0;display:flex;gap:10px 15px;flex-wrap:wrap;align-items:start;justify-content:space-between;min-width:0}
.demo-row:first-of-type{border-top:0}
.demo-row-text{min-width:0;flex:1 1 210px}
.demo-row-text strong{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.demo-row-text .demo-muted{overflow-wrap:anywhere}
.demo-row>.demo-small-actions,.demo-row>.demo-extra{flex:1 1 100%}
.demo-small-actions,.demo-contact-actions,.demo-inline-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:end}
.demo-contact-actions{margin:12px 0 4px}
.demo-button,.demo-button-secondary{border:1px solid #086e76;border-radius:9px;min-height:39px;padding:9px 13px;cursor:pointer;font:inherit;font-size:13px;font-weight:750;text-align:center;transition:background .15s ease,border-color .15s ease}
.demo-button{color:#fff;background:#086e76}.demo-button:hover{background:#045259}
.demo-button-secondary{color:#095d65;background:#fff;border-color:#b6d5da}.demo-button-secondary:hover{background:#f0f9fa}
.demo-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.demo-stat{border:1px solid #dce7e9;border-radius:10px;background:#f5fafb;display:flex;flex-direction:column;gap:4px;padding:13px;min-width:0}
.demo-stat strong{font-size:24px;color:#164858}.demo-stat span{font-size:12px;color:#4d6878}
.demo-status{font-size:11px;font-weight:750;border-radius:999px;border:1px solid #d0dce0;padding:4px 8px;max-width:100%;white-space:normal;flex:0 0 auto}
.demo-status-neutral{background:#f2f6f7;color:#47616c}.demo-status-amber{background:#fff4dc;border-color:#f2d1a5;color:#754a0a}.demo-status-red{background:#fceaea;border-color:#f1b7b7;color:#8e2a2a}.demo-status-green{background:#e6f5ed;border-color:#bae1c9;color:#226146}
.demo-explore{margin:14px 0;background:#fafcfd;border:1px solid #d4e4e8;border-radius:12px;padding:0 16px}.demo-explore>summary{padding:16px 0;color:#075c63;font-weight:750;cursor:pointer}.demo-explore-content{padding-bottom:16px}
.demo-extra{background:#f8fbfb;border:1px solid #d7e5e7;border-radius:10px;margin:12px 0;padding:0 12px;max-width:100%}.demo-extra>summary{padding:11px 0;color:#11616a;cursor:pointer;font-weight:700;font-size:13px}.demo-extra-content{padding:10px 0 13px;display:flex;flex-direction:column;align-items:stretch;gap:12px}
.demo-extra-content .demo-button,.demo-extra-content .demo-button-secondary{align-self:flex-start}
.demo-form,.demo-overlay{display:flex;flex-direction:column;align-items:stretch;gap:12px}.demo-overlay{border:2px solid #0d7b81;border-radius:12px;padding:18px;background:#f5fbfa;margin:10px 0 18px}.demo-overlay h2{margin:0!important}
.demo-label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:650;color:#214655;flex:1 1 175px;min-width:0}
.demo-label input,.demo-label select,.demo-label textarea{background:white;color:#1c3b4b;width:100%;max-width:100%;box-sizing:border-box;padding:10px 11px;border:1px solid #abc7ce;border-radius:8px;font:inherit;margin-top:3px}
.demo-label textarea{min-height:90px;resize:vertical}
.demo-person-selector{max-width:520px;margin:15px 0}.demo-feedback{background:#eaf8f0;color:#225b40;border:1px solid #b1dec2;border-radius:8px;padding:10px 12px;font-size:13px;line-height:1.4}.demo-feedback.demo-error{background:#fff4f0;color:#8e3b26;border-color:#e8c2b5}
.demo-adviser-alerts{margin:8px 0 16px}.demo-alerts-head{display:flex;gap:12px;align-items:start;justify-content:space-between;flex-wrap:wrap}.demo-alert-title h2{margin:0;font-size:18px}.demo-issue{border:1px solid #d8e5e6;border-radius:9px;padding:0 12px 12px;margin:12px 0;background:#fff}.demo-inline-controls{padding-top:2px}.demo-inline-controls .demo-label{max-width:340px}.demo-inline-controls .demo-button{margin-top:2px}
.demo-letter{white-space:pre-wrap;overflow-wrap:anywhere;font-family:Arial,sans-serif;font-size:14px;line-height:1.6;background:#fff;padding:20px;border:1px solid #d6e3e6}
@media(max-width:780px){.demo-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.demo-section{padding:15px}.demo-switch-buttons{width:100%}.demo-switch-choice{flex:1}.demo-persona-switch{gap:9px}}
@media(max-width:460px){.demo-stat-grid{gap:6px}.demo-stat{padding:11px 9px}.demo-stat strong{font-size:22px}.demo-contact-actions>.demo-button,.demo-contact-actions>.demo-button-secondary{flex:1 1 100%;text-align:center}.demo-row{flex-direction:column}.demo-row .demo-status{align-self:flex-start}.demo-switch-choice{padding:10px 8px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.demo-button,.demo-button-secondary{transition:none}}
@media print{body.demo-print-letter *{visibility:hidden!important}body.demo-print-letter .demo-letter,body.demo-print-letter .demo-letter *{visibility:visible!important}body.demo-print-letter .demo-letter{position:fixed;top:0;left:0;width:100%;border:0!important;padding:24px!important;white-space:pre-wrap;box-sizing:border-box}}
/* Narrow screens: prevent row flex-basis from creating tall empty gaps. */
@media(max-width:460px){.demo-row-text{flex:0 1 auto;width:100%}.demo-row>.demo-small-actions,.demo-row>.demo-extra{flex:0 1 auto;width:100%}.demo-row{gap:7px}.demo-row>.demo-status{margin:0}}

/* V4.27.1 ERM owner demo: expose the actual ERM panel, not just the switcher.
   The legacy persona rule hides all direct workspace children; this exception
   deliberately shows only the selected ERM section and hides adviser chrome. */
#workspace.demo-persona-mode.demo-erm-mode > #erm:not([hidden]){display:block!important;max-width:1100px;margin:0 auto 48px;min-width:0}
#workspace.demo-persona-mode.demo-erm-mode > #demo-stage{display:none!important}
#workspace.demo-persona-mode.demo-erm-mode > #demo-switcher{display:flex!important}
#workspace.demo-persona-mode.demo-erm-mode > #erm[hidden]{display:none!important}
