/* Typography and surface tokens match the deployed hq-library.css. */
#smart-hq .sc-workspace{--sc-panel:rgba(255,255,255,.78);--sc-ink:#173553;--sc-line:rgba(34,77,111,.14);--sc-muted:#627d90;--sc-soft:rgba(227,238,245,.65);padding:28px;color:var(--sc-ink);font:400 13px/1.5 Inter,system-ui,sans-serif}
#smart-hq .sc-workspace *{box-sizing:border-box}
#smart-hq .sc-top h2{margin:0;color:var(--sc-ink);font:600 clamp(28px,3.2vw,42px)/1.14 Manrope,Inter,sans-serif;letter-spacing:-.045em}
#smart-hq .sc-eyebrow{margin:0 0 10px;color:var(--sc-muted);font-size:9px;font-weight:650;letter-spacing:.18em}
#smart-hq .sc-description{margin:10px 0 0;color:var(--sc-muted);font-size:13px;line-height:1.5}
#smart-hq .sc-workspace[hidden]{display:none!important}
#smart-hq .sc-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
#smart-hq .sc-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr);gap:18px}
#smart-hq .sc-panel{background:var(--sc-panel);padding:24px;border:1px solid var(--sc-line);border-radius:18px;min-width:0;backdrop-filter:blur(20px);box-shadow:0 5px 16px rgba(25,63,93,.025)}
#smart-hq .sc-panel h2{color:var(--sc-ink);margin:0 0 18px;font:600 20px/1.38 Manrope,Inter,sans-serif;letter-spacing:-.015em}
#smart-hq .sc-workspace label{display:block;font-weight:500;font-size:12px;margin:12px 0 6px}
#smart-hq .sc-workspace input,#smart-hq .sc-workspace textarea,#smart-hq .sc-workspace select{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid var(--sc-line);background:var(--sc-panel);color:var(--sc-ink);border-radius:14px;font:400 13px/1.4 Inter,system-ui,sans-serif}
#smart-hq .sc-workspace textarea{resize:vertical;min-height:105px}
#smart-hq .sc-workspace input[type=checkbox]{width:auto;margin-right:8px;accent-color:#18385f}
#smart-hq .sc-workspace button{font:600 12px/1.3 Inter,system-ui,sans-serif;cursor:pointer;border-radius:10px;padding:10px 16px;background:#173f66;border:1px solid #173f66;color:#fff}
#smart-hq .sc-workspace button:disabled{opacity:.5;cursor:default}
#smart-hq .sc-workspace .sc-secondary{background:transparent;color:var(--sc-ink);border-color:var(--sc-line);font-weight:550}
#smart-hq .sc-actions{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0}
#smart-hq .sc-help{font-size:12px;color:var(--sc-muted);margin:7px 0}
#smart-hq .sc-card{border:1px solid var(--sc-line);border-radius:18px;padding:16px;margin:16px 0;background:var(--sc-soft)}
#smart-hq .sc-card summary{cursor:pointer;font-size:12px;color:var(--sc-muted)}
#smart-hq .sc-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px}
#smart-hq .sc-chip,#smart-hq .sc-workspace button.sc-chip{display:inline-block;background:#f0eaf9;color:#654593;border:1px solid #dfd1f0;padding:6px 10px;border-radius:8px;font-size:12px;margin:4px 6px 4px 0;text-decoration:none}
#smart-hq .sc-preview{border:1px solid var(--sc-line);border-radius:12px;background:var(--sc-panel);padding:22px;margin-top:18px;overflow-wrap:anywhere}
#smart-hq .sc-preview p{white-space:pre-wrap}
#smart-hq .sc-preview img{width:190px;max-width:80%;margin-bottom:16px}
#smart-hq .sc-notice{padding:10px 14px;border-radius:10px;background:#f4eddb;color:#735a1f;margin:12px 0}
#smart-hq .sc-review{position:fixed;inset:0;background:rgba(13,32,47,.5);backdrop-filter:blur(5px);z-index:999999;padding:30px;overflow:auto}
#smart-hq .sc-review>div{max-width:880px;margin:auto;background:var(--sc-panel);color:var(--sc-ink);border-radius:18px;padding:26px}
#smart-hq[data-theme=dark] .sc-workspace{--sc-panel:rgba(31,58,76,.86);--sc-ink:#eaf3f8;--sc-line:rgba(193,216,232,.17);--sc-muted:#a7bdcc;--sc-soft:rgba(37,66,85,.55)}
#smart-hq[data-theme=dark] .sc-chip{background:#392e50;color:#e3d1fa;border-color:#64527c}
#smart-hq[data-theme=dark] .sc-workspace button.sc-chip{background:#392e50;color:#e3d1fa;border-color:#64527c}
@media(max-width:950px){#smart-hq .sc-grid{grid-template-columns:1fr}#smart-hq .sc-workspace{padding:12px}#smart-hq .sc-panel{padding:18px}#smart-hq .sc-review{padding:12px}}

#smart-hq .sc-workspace :is(button,a,input,textarea,select):focus-visible{outline:2px solid #78a8ce;outline-offset:3px}
#smart-hq .sc-preview h3{font:600 16px/1.38 Manrope,Inter,sans-serif;letter-spacing:-.015em;color:var(--sc-ink)}
@media(max-width:800px){#smart-hq .sc-workspace{padding:22px}}
@media(max-width:520px){#smart-hq .sc-workspace{padding:19px 14px}#smart-hq .sc-panel{padding:16px}}

#smart-hq .sc-disclosure{max-width:760px;margin:12px 0 0;padding:10px 13px;border:1px solid #d8c9ee;border-radius:8px;background:#f3edf9;color:#594472;font:400 12px/1.55 Inter,sans-serif}
#smart-hq[data-theme="dark"] .sc-disclosure{background:#2b243b;border-color:#5c4777;color:#e2d5f3}
@media(max-width:600px){#smart-hq .sc-disclosure{font-size:12px;padding:9px 11px}}

#smart-hq .sc-workspace [hidden]{display:none!important}

/* Keep every existing destination, including the unchanged Accelerator logo, inside the HQ bar. */
#smart-hq .hq-nav.sc-nav-added{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px;width:max-content;max-width:calc(100vw - 8vw);left:50%;transform:translateX(-50%)}
#smart-hq .hq-nav.sc-nav-added>button{flex:0 0 auto;max-width:100%}

/* Authorized top-header refinement: crop only the wordmark from the existing logo asset. */
#smart-hq .smp-portal-nav .smp-login-brand-pair.sc-header-refined{justify-self:center!important;align-self:center!important;justify-content:center!important}
#smart-hq .smp-portal-nav .sc-header-refined .smp-login-smart-logo{width:60px!important;height:52px!important;max-height:52px!important;object-fit:cover!important;object-position:left center!important;flex:0 0 60px;clip-path:polygon(0 0,100% 0,100% 56%,94% 56%,94% 100%,0 100%);transform:none!important}
@media(max-width:600px){#smart-hq .smp-portal-nav .sc-header-refined .smp-login-smart-logo{width:46px!important;height:40px!important;max-height:40px!important;flex-basis:46px}}

#smart-hq .hq-nav.sc-nav-added{gap:4px}
#smart-hq .hq-nav.sc-nav-added>button:not(.hq-accelerator-nav){padding:12px 12px!important}

#smart-hq .hq-nav.sc-nav-added>.hq-accelerator-nav{position:sticky;right:0;z-index:2;margin-left:auto}

#smart-hq .sc-preview{background:#fff!important;color:#173553!important;box-shadow:0 5px 16px rgba(25,63,93,.025);min-height:240px}
#smart-hq .sc-preview h3{color:#173553!important}
#smart-hq .sc-preview p{color:#173553!important}
#smart-hq .sc-preview .sc-help{color:#627d90!important}
#smart-hq .sc-workspace input[readonly]{cursor:default;color:var(--sc-muted)}
#smart-hq .sc-directory-results{display:grid;gap:6px;margin-top:8px}
#smart-hq .sc-directory-choice{text-align:left;display:grid;gap:3px;width:100%}
#smart-hq .sc-directory-choice small{font-weight:400;overflow-wrap:anywhere}
#smart-hq .sc-cc-chips{margin:8px 0}

#smart-hq .sc-preview .sc-chip{background:#f0eaf9!important;color:#654593!important;border-color:#dfd1f0!important}

/* Shared bar sizing keeps header and section navigation edges aligned. */
#smart-hq{--sc-hq-bar-width:min(1480px,92vw)}
#smart-hq .smp-portal-nav:has(.sc-header-refined),#smart-hq .hq-nav.sc-nav-added{box-sizing:border-box!important;width:var(--sc-hq-bar-width)!important;max-width:var(--sc-hq-bar-width)!important;position:relative;left:50%;transform:translateX(-50%);margin-left:0!important;margin-right:0!important}

#smart-hq .sc-loan-results{display:grid;gap:7px;max-height:270px;overflow-y:auto;margin:8px 0 12px}
#smart-hq .sc-loan-results[hidden]{display:none!important}
#smart-hq .sc-loan-results .sc-directory-choice{width:100%;text-align:left}

#smart-hq .sc-intake-drop{margin:12px 0;padding:16px;border:1px dashed var(--sc-line);border-radius:14px;background:rgba(116,171,202,.06);cursor:pointer}
#smart-hq .sc-intake-drop p{margin:6px 0 0}#smart-hq .sc-intake-drop.sc-dragging{border-color:#739ec5;background:rgba(116,171,202,.17)}
#smart-hq .sc-supporting{margin:18px 0;padding-top:12px;border-top:1px solid var(--sc-line)}#smart-hq .sc-file-choices{display:grid;gap:6px;margin-top:10px}
#smart-hq .sc-file-choice{text-align:left;overflow-wrap:anywhere}#smart-hq .sc-file-choice[aria-pressed=true]{border-color:#789ac0;background:rgba(116,171,202,.16)}
#smart-hq .sc-preview .sc-email-card{width:100%;margin:10px 0;border:1px solid #dbe5ed!important;border-radius:10px;background:#f7fafc!important;color:#173553!important;border-collapse:separate}
#smart-hq .sc-preview .sc-email-card td{padding:12px;color:#173553!important;border:none!important;background:transparent!important;vertical-align:top}
#smart-hq .sc-preview .sc-email-card .sc-email-number{width:36px;padding-right:4px;color:#244f7c!important;font-weight:700}
#smart-hq .sc-preview .sc-email-card p{margin:5px 0 0;line-height:1.5}#smart-hq .sc-letter-dialog{width:min(700px,92vw);max-height:85vh;overflow:auto;background:var(--sc-panel);color:var(--sc-ink);border:1px solid var(--sc-line);border-radius:20px;padding:24px;font-family:Inter,sans-serif}#smart-hq .sc-letter-dialog::backdrop{background:rgba(7,22,36,.6)}

/* Compact review rows and email-local resource editing. */
#smart-hq details.sc-card{padding:0;margin:8px 0;border-radius:12px;overflow:hidden}
#smart-hq details.sc-card>summary{padding:14px 16px;color:var(--sc-ink);font-weight:600;font-size:13px;overflow-wrap:anywhere}
#smart-hq details.sc-card[open]{padding:0 16px 16px}
#smart-hq details.sc-card[open]>summary{margin:0 -16px 12px;border-bottom:1px solid var(--sc-line)}
#smart-hq .sc-directory-results{max-height:240px;overflow-y:auto}
#smart-hq .sc-preview .sc-resource-button{display:inline-block;background:#1763a5;color:white!important;border:1px solid #1763a5;border-radius:8px;padding:8px 12px;text-decoration:none;font-size:12px;margin:4px 6px 4px 0}
#smart-hq .sc-resource-controls{border-top:1px dashed #dbe5ed;margin-top:12px;padding-top:8px}
#smart-hq .sc-resource-controls label{color:#173553}
#smart-hq .sc-resource-controls select{background:white;color:#173553}
#smart-hq .sc-resource-controls button{color:#173553;border-color:#dbe5ed;font-size:11px;margin:4px 6px 0 0;padding:6px 8px}
#smart-hq .sc-workspace input[readonly]{background:var(--sc-soft);opacity:.8}
#smart-hq .hq-nav.sc-nav-added{justify-content:space-between;gap:5px}
#smart-hq .hq-nav.sc-nav-added>button{flex:1 0 auto}
#smart-hq .hq-nav.sc-nav-added>.sc-connect-icon{flex:0 0 42px!important;min-width:42px;padding:9px!important}
#smart-hq .sc-connect-icon svg{width:21px;height:21px;display:block}
#smart-hq .hq-nav.sc-nav-added>.hq-accelerator-nav{position:static;margin-left:0}
@media(max-width:800px){#smart-hq .hq-nav.sc-nav-added{justify-content:flex-start}#smart-hq .hq-nav.sc-nav-added>button{flex:0 0 auto}}
/* Email stays legible and visually consistent in every HQ theme. */
#smart-hq .sc-preview :is(strong,label){color:#173553!important}
#smart-hq .sc-preview .sc-resource-controls select{background:#fff!important;color:#173553!important;border-color:#dbe5ed!important}
#smart-hq .sc-preview .sc-resource-controls button{background:#f7fafc!important;color:#173553!important;border-color:#dbe5ed!important}

#smart-hq .sc-grid{align-items:start}

#smart-hq .sc-connect-icon .sc-nav-badge-slot:has(#hq-nav-count[hidden]){display:none!important}
#smart-hq .hq-nav.sc-nav-added>.sc-connect-icon:has(#hq-nav-count:not([hidden])){flex-basis:64px!important}

/* Desktop setup stays beside the complete email. */
#smart-hq .hq-view[data-hq-view="conditions"]{max-width:none!important;width:100%}
#smart-hq .sc-grid{grid-template-columns:minmax(0,28fr) minmax(0,24fr) minmax(0,48fr);gap:16px}
#smart-hq .sc-panel{padding:20px}
#smart-hq .sc-preview-panel .sc-preview{margin-top:0;padding:20px}
#smart-hq .sc-email-setup .sc-supporting h3{font-size:18px}
@media(min-width:1250px){#smart-hq .sc-workspace[aria-label="SMART Conditions"]{width:calc(100vw - 104px);max-width:1700px;position:relative;left:50%;transform:translateX(-50%);padding:28px 20px}}
@media(min-width:951px) and (max-width:1249px){#smart-hq .sc-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}#smart-hq .sc-preview-panel{grid-column:1/-1}}
@media(max-width:950px){#smart-hq .sc-grid{grid-template-columns:minmax(0,1fr)}#smart-hq .sc-preview-panel{grid-column:auto}}
