/* Shared palette and responsive finishing layer for the staged client app. */
:root{--client-ink:#162e39;--client-muted:#627984;--client-page:#f6f8f9;--client-canvas:#edf2f4;--client-surface:#fff;--client-line:#e0e8ed;--client-soft:#edf6f4;--client-note:#fffdf7;--client-nav:#fffffff2}
body.client-brand-preview:not(.client-light-mode){--client-ink:#e7f0f4;--client-muted:#adc1cb;--client-page:#14222b;--client-canvas:#0e1921;--client-surface:#1d303b;--client-line:#344a57;--client-soft:#203c40;--client-note:#30352d;--client-nav:#1d303bf5;color-scheme:dark}
body:has(.client-foundation){background:var(--client-canvas)!important;background-image:none!important;color:var(--client-ink)!important}
body:has(.client-foundation) #app,body:has(.client-foundation) .client-shell.client-foundation{color:var(--client-ink)!important;background:var(--client-page)!important}
body:has(.client-foundation) .client-foundation .foundation-tabs{background:var(--client-nav)!important;border-color:var(--client-line)!important}
body:has(.client-foundation) .client-foundation .foundation-tabs button{color:var(--client-muted)!important}
body:has(.client-foundation) .client-foundation .foundation-tabs button.active{color:#18aeb2!important}
body:has(.client-foundation) .foundation-profile h1,body:has(.client-foundation) .foundation-profile h2{color:var(--client-ink)!important}
body .client-foundation .client-xp-card{background:var(--client-surface);border-color:var(--client-line);color:var(--client-ink)}
body .client-foundation .xp-heading>strong{background:var(--client-soft);color:var(--client-ink)}
body .client-foundation .xp-progress{background:var(--client-line)}
body .client-foundation .xp-heading>span,body .client-foundation .xp-numbers>span,body .client-foundation .xp-foot{color:var(--client-muted)}
body .client-foundation .foundation-header>a,body .client-foundation .foundation-kicker,body .client-foundation .client-privacy-footer button{color:var(--client-muted)}
body .client-foundation :is(.t2-card,.w3-row,.s4-card) button{min-height:44px}
body .client-foundation :is(.t2-section-title,.w3-section-title,.s4-section-title)>button{min-height:44px}
body .client-foundation .foundation-header button,body .client-foundation .w3-heading button{width:44px;height:44px}
body .client-foundation :is(.t2-activity,.w3-details,.s4-details)>summary{min-height:44px;align-items:center}
body .client-foundation button,body .client-foundation input,body .client-foundation select{touch-action:manipulation}
body .client-foundation input,body .client-foundation select,body .client-foundation textarea{font-size:16px}
body .client-foundation :is(.t2-hero-copy,.w3-hero-copy,.s4-hero-copy) h2{overflow-wrap:anywhere}
body .client-foundation .t2-note strong{color:var(--client-ink)}
body:has(.client-foundation) #chat-launcher,body:has(.session-shell) #chat-launcher{display:none!important}
body:has(.client-foundation) #toast:empty{display:none!important}
body.client-brand-preview:not(.client-light-mode) .client-foundation :is(.w3-library-dialog,.s4-weight-tools .panel,.s4-weight-tools .weight-summary>div,.client-activity-card){background:var(--client-surface)!important;color:var(--client-ink)!important;border-color:var(--client-line)!important}
body .client-foundation .w3-library-dialog .w3-library-head{background:var(--client-page)}
body .client-foundation .w3-library-dialog .movement-card,body .client-foundation .w3-library-dialog input,body .client-foundation .w3-library-dialog select{background:var(--client-surface);color:var(--client-ink);border-color:var(--client-line)}
body.client-brand-preview:not(.client-light-mode) .client-foundation :is(.s4-weight-tools,.client-activity-card) :is(input,select,textarea){background:var(--client-page)!important;color:var(--client-ink)!important;border-color:var(--client-line)!important}
@media(max-width:380px){body .client-shell.client-foundation{padding-left:14px;padding-right:14px}.t2-checkin,.s4-checkin{flex-wrap:wrap}.t2-checkin>div,.s4-checkin>div{flex-basis:100%}.s4-macros{gap:5px}.s4-stats>div{padding:12px 8px}.s4-stats strong{font-size:18px}.xp-heading>span{letter-spacing:.05em}.w3-next{gap:8px;padding:14px 12px}.w3-library-dialog{padding-left:12px;padding-right:12px}.s4-weight-tools .weight-summary{grid-template-columns:1fr}.s4-weight-tools .form-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.client-foundation *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
body.client-brand-preview:has(.client-foundation) .s4-weight-tools .weight-heading h3{color:var(--client-ink)!important}
body.client-brand-preview:has(.client-foundation) .s4-weight-tools .weight-heading .muted{color:var(--client-muted)!important}
body .client-foundation .w3-library-dialog .movement-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:380px){body .client-foundation .w3-library-dialog .movement-filters{grid-template-columns:1fr}}
