:root{
 --spro-accent:#00a8e8;
 --spro-accent-hover:#22b9ef;
 --spro-dark-page:#0b0f12;
 --spro-dark-panel:#12181d;
 --spro-dark-panel-2:#182127;
 --spro-dark-line:#29343c;
 --spro-dark-text:#f5f7f8;
 --spro-dark-muted:#98a2b3;
}
.spro-theme-toggle{width:100%;min-height:44px;margin:0 0 16px;padding:7px 7px 7px 9px;display:flex;align-items:center;justify-content:flex-start;gap:10px;border:1px solid var(--line,#e4e7ec);border-radius:11px;background:#fff;color:#344054;font-size:12px;font-weight:650}
.spro-theme-toggle:hover{border-color:#9dddf5;background:#f4fbfe;color:#007fae}
.spro-theme-icons{position:relative;width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#eef7fa;color:#007fae;flex:0 0 25px}
.spro-theme-icons>span{position:absolute;display:grid;place-items:center;transition:opacity .16s,transform .16s}
.spro-theme-icons svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.spro-theme-sun{opacity:0;transform:scale(.7)}
.spro-theme-toggle.is-dark .spro-theme-moon{opacity:0;transform:scale(.7)}
.spro-theme-toggle.is-dark .spro-theme-sun{opacity:1;transform:scale(1)}
.spro-theme-label{flex:1;text-align:left}
.spro-theme-switch{width:35px;height:20px;border-radius:999px;padding:2px;background:#cdd5db;display:flex;align-items:center;flex:0 0 35px;transition:background .16s}
.spro-theme-switch i{width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transform:translateX(0);transition:transform .16s}
.spro-theme-toggle.is-dark .spro-theme-switch{background:var(--spro-accent)}
.spro-theme-toggle.is-dark .spro-theme-switch i{transform:translateX(15px)}
.spro-theme-toggle-compact{display:none;width:42px;min-width:42px;height:42px;min-height:42px;margin:0 0 0 auto;padding:0;justify-content:center;border-radius:50%}
.spro-theme-toggle-compact .spro-theme-switch{display:none}
.spro-theme-toggle-header{display:inline-flex;width:38px;min-width:38px;height:38px;min-height:38px;margin:0 6px 0 0}
.spro-theme-toggle-header .spro-theme-icons{width:23px;height:23px;flex-basis:23px}

html[data-spro-theme="dark"]{--line:var(--spro-dark-line);--muted:var(--spro-dark-muted);background:var(--spro-dark-page);color:var(--spro-dark-text)}
html[data-spro-theme="dark"] body{background:var(--spro-dark-page)!important;color:var(--spro-dark-text)!important}
html[data-spro-theme="dark"] body :where(h1,h2,h3,h4,h5,h6,strong,label,summary,legend){color:var(--spro-dark-text)}
html[data-spro-theme="dark"] body :where(p,small,.muted,.hint){color:var(--spro-dark-muted)}
html[data-spro-theme="dark"] a{color:inherit}
html[data-spro-theme="dark"] a:hover,html[data-spro-theme="dark"] button:hover{color:var(--spro-accent-hover)}
html[data-spro-theme="dark"] ::selection{background:#006b94;color:#fff}
html[data-spro-theme="dark"] *{scrollbar-color:#3b4a54 #10161a}

/* Desktop frame and the approved three-column Home layout. */
html[data-spro-theme="dark"] .layout{background:var(--spro-dark-page)}
html[data-spro-theme="dark"] .left{color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .brand-tag,html[data-spro-theme="dark"] .footer-links{color:var(--spro-dark-muted)}
html[data-spro-theme="dark"] .nav-item{color:#d8e0e5}
html[data-spro-theme="dark"] .nav-item:hover{background:var(--spro-dark-panel-2);color:#fff}
html[data-spro-theme="dark"] .nav-item.active{background:#082d3d;color:#29baf0;box-shadow:inset 3px 0 0 var(--spro-accent)}
html[data-spro-theme="dark"] .create-button{box-shadow:0 8px 22px #00a8e824}
html[data-spro-theme="dark"] main{background:var(--spro-dark-page);border-color:var(--spro-dark-line);color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .page-heading,html[data-spro-theme="dark"] .tabs{background:var(--spro-dark-panel);border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .tabs button{color:var(--spro-dark-muted)}
html[data-spro-theme="dark"] .tabs button.selected{color:#32bdf2;border-bottom-color:var(--spro-accent)}
html[data-spro-theme="dark"] .composer-teaser{margin:16px 16px 12px;padding:18px;background:var(--spro-dark-panel);border:1px solid var(--spro-dark-line);border-radius:13px}
html[data-spro-theme="dark"] .composer-placeholder{color:var(--spro-dark-muted)}
html[data-spro-theme="dark"] .composer-tools{border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .composer-tools>button:not(.primary){color:#c2ccd2}
html[data-spro-theme="dark"] .feed{padding:0 16px 20px}
html[data-spro-theme="dark"] .post,html[data-spro-theme="dark"] .social-post-card{margin:12px 0;padding:20px;background:var(--spro-dark-panel)!important;border:1px solid var(--spro-dark-line)!important;border-radius:13px;box-shadow:0 10px 28px #0000001f}
html[data-spro-theme="dark"] .post-copy{color:#d7dfe4}
html[data-spro-theme="dark"] .post-kind{color:#38bff2;background:#082d3d}
html[data-spro-theme="dark"] .post-image,html[data-spro-theme="dark"] .selected-post-image{background:#0d1317;border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .post-actions{color:var(--spro-dark-muted);border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .post-actions button:hover,html[data-spro-theme="dark"] .post-actions a:hover{background:var(--spro-dark-panel-2);color:#dff7ff}
html[data-spro-theme="dark"] .dropdown{background:var(--spro-dark-panel-2);border-color:#35434d;box-shadow:0 14px 35px #0008}
html[data-spro-theme="dark"] .right{color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .right>.side-section{padding:17px 16px;margin-bottom:14px;background:var(--spro-dark-panel);border:1px solid var(--spro-dark-line);border-radius:12px;box-shadow:0 10px 28px #0000001a}
html[data-spro-theme="dark"] .side-heading{margin-bottom:13px}
html[data-spro-theme="dark"] .side-heading h2{font-size:15px;color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .topic,html[data-spro-theme="dark"] .person{margin:12px 0;padding:5px;border-radius:8px}
html[data-spro-theme="dark"] .topic:hover,html[data-spro-theme="dark"] .person:hover{background:var(--spro-dark-panel-2)}
html[data-spro-theme="dark"] .topic>span{color:#6f7e87}
html[data-spro-theme="dark"] .follow{border-color:var(--spro-accent);color:#2dc0f5;background:#071e28}
html[data-spro-theme="dark"] .follow:hover{background:var(--spro-accent);color:#04151c}
html[data-spro-theme="dark"] .follow.following{border-color:#43515b;color:var(--spro-dark-muted);background:transparent}
html[data-spro-theme="dark"] .space-icon,html[data-spro-theme="dark"] .avatar.fallback{background:#0d3343;color:#43c6f6}
html[data-spro-theme="dark"] .right>.footer-links{padding:0 5px}

/* Shared surfaces, forms and content pages. */
html[data-spro-theme="dark"] :where(.section-card,.profile-card,.space-card,.app-card,.link-card,.build-note,.saved-article,.notification-card,.answer,.request-row,.moderation-row,.article-discussion,.article-aside-inner,.reader,.auth-form,.info-content,.info-nav,.explore-hero,.explore-trending,.settings-panel,.settings-v2-nav,.management-requests-panel){background:var(--spro-dark-panel)!important;border-color:var(--spro-dark-line)!important;color:var(--spro-dark-text)!important}
html[data-spro-theme="dark"] :where(input,textarea,select,.search-box,.home-search,.explore-search,.live-search-box){background:var(--spro-dark-panel-2)!important;border-color:#35434d!important;color:var(--spro-dark-text)!important}
html[data-spro-theme="dark"] :where(input,textarea)::placeholder{color:#74828b!important}
html[data-spro-theme="dark"] option{background:var(--spro-dark-panel-2);color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .outline{background:var(--spro-dark-panel-2);border-color:#3a4852;color:#e2e8ec}
html[data-spro-theme="dark"] .outline:hover{background:#20303a;border-color:#4a5b66;color:#fff}
html[data-spro-theme="dark"] .pill{background:#14303b;border-color:#245164;color:#a9e7fb}
html[data-spro-theme="dark"] .toolbar{background:#10171b;border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .editor,html[data-spro-theme="dark"] .comment,html[data-spro-theme="dark"] .answer{border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .modal,html[data-spro-theme="dark"] dialog{background:var(--spro-dark-panel);border-color:#35434d;color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .modal>header,html[data-spro-theme="dark"] .settings-dialog-head{background:var(--spro-dark-panel-2);border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .profile-top .avatar{border-color:var(--spro-dark-panel)}
html[data-spro-theme="dark"] .profile-counts strong,html[data-spro-theme="dark"] .empty h3{color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .empty>svg{background:#0c3141;color:#2dc0f5}
html[data-spro-theme="dark"] .notification.unread{background:#0d2a36!important}
html[data-spro-theme="dark"] .error{background:#32191b;border-color:#643034;color:#ffb4b4}
html[data-spro-theme="dark"] .answer.accepted{background:#112b21!important;border-color:#28583f!important}
html[data-spro-theme="dark"] pre{background:#080c0f;color:#d8e7ef;border:1px solid #27343c}

/* Chat carries the same charcoal treatment. */
html[data-spro-theme="dark"] .chat-feature-root{background:var(--spro-dark-panel);border-color:var(--spro-dark-line);box-shadow:0 16px 40px #0006}
html[data-spro-theme="dark"] .chat-feature-list{background:#0f1519;border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .chat-feature-thread:hover{background:var(--spro-dark-panel-2)}
html[data-spro-theme="dark"] .chat-feature-thread.active{background:#0a3040}
html[data-spro-theme="dark"] .chat-feature-pane-head,html[data-spro-theme="dark"] .chat-feature-composer{background:var(--spro-dark-panel);border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .chat-feature-messages{background:var(--spro-dark-page)}
html[data-spro-theme="dark"] .chat-feature-bubble{background:var(--spro-dark-panel-2);border-color:#34424b;color:#eef4f6;box-shadow:none}
html[data-spro-theme="dark"] .chat-feature-message-row.mine .chat-feature-bubble{background:#0d3545;border-color:#17617f}
html[data-spro-theme="dark"] .chat-feature-quote{background:#101b20;color:#dce7ec}
html[data-spro-theme="dark"] .chat-feature-file,html[data-spro-theme="dark"] .chat-feature-typing{background:#10181c;border-color:#34424b;color:#dfe7eb}
html[data-spro-theme="dark"] .chat-feature-reply,html[data-spro-theme="dark"] .chat-feature-file-draft,html[data-spro-theme="dark"] .chat-feature-blocked{background:#10171b;border-color:var(--spro-dark-line);color:var(--spro-dark-muted)}
html[data-spro-theme="dark"] .chat-feature-dropdown,html[data-spro-theme="dark"] .chat-feature-react-picker,html[data-spro-theme="dark"] .chat-feature-picker-dialog{background:var(--spro-dark-panel-2);border-color:#3b4952;color:var(--spro-dark-text)}
html[data-spro-theme="dark"] .chat-feature-picker-results>button{border-color:var(--spro-dark-line)}
html[data-spro-theme="dark"] .chat-feature-picker-results>button:hover{background:#20303a;border-color:#365b6c}
html[data-spro-theme="dark"] .chat-online-dot{border-color:var(--spro-dark-panel)}

/* Existing PHP/legacy surfaces use the same palette when the same toggle is present. */
html[data-spro-theme="dark"] :where(.site-header,.mobile-bottom-nav,.site-footer,.simple-page,.not-found,.admin-login,.admin-editor,.admin-table,.article-detail,.hero-panel,.course-curriculum,.contact-form,.social-panel,.social-profile-card,.article-reference-detail,.article-sidebar-card,.live-search-result,.settings-card,.settings-hub-card){background-color:var(--spro-dark-panel)!important;border-color:var(--spro-dark-line)!important;color:var(--spro-dark-text)!important}
html[data-spro-theme="dark"] :where(.site-nav a,.nav-wordmark,.article-content,.article-content strong,.feed-author,.card-body h3 a,.public-activity-card h2 a){color:var(--spro-dark-text)!important}
html[data-spro-theme="dark"] :where(.article-content p,.article-content li,.card-body p,.social-biography,.social-username){color:var(--spro-dark-muted)!important}
html[data-spro-theme="dark"] :where(.text-link,.article-content a,.notification-card a){color:#34bff2!important}

html[data-spro-theme="dark"] .spro-theme-toggle{background:var(--spro-dark-panel-2);border-color:#35434d;color:#e7edf0}
html[data-spro-theme="dark"] .spro-theme-toggle:hover{background:#20303a;border-color:#3f6a7d;color:#fff}
html[data-spro-theme="dark"] .spro-theme-icons{background:#0a3040;color:#3bc3f5}

@media(max-width:740px){
 .spro-theme-toggle-compact{display:inline-flex}
 html[data-spro-theme="dark"] .mobile-header,html[data-spro-theme="dark"] .bottom-nav,html[data-spro-theme="dark"] .left.open{background:rgba(18,24,29,.98);border-color:var(--spro-dark-line);color:var(--spro-dark-text)}
 html[data-spro-theme="dark"] .composer-teaser{margin:10px;border-radius:12px}
 html[data-spro-theme="dark"] .feed{padding:0 10px 90px}
 html[data-spro-theme="dark"] .post,html[data-spro-theme="dark"] .social-post-card{margin:10px 0;padding:16px}
 html[data-spro-theme="dark"] .right>.side-section{border-radius:10px}
}
@media(prefers-reduced-motion:reduce){.spro-theme-icons>span,.spro-theme-switch,.spro-theme-switch i{transition:none}}

/* v40 contrast: override the white navigation and hard-coded author colors. */
/* v41: screenshot-specific surfaces, spacing and icon contrast. */
body .page-heading,body .reader,body .reader-header,body .article-detail-layout{box-shadow:none!important;background:transparent!important}
body .page-heading::before,body .page-heading::after,body .reader::before,body .reader::after{box-shadow:none!important;background:none!important}
body main>.composer-teaser{margin:16px auto 18px!important;width:100%;max-width:690px;box-sizing:border-box}
body .right>.side-section{padding:17px 16px;margin-bottom:14px;background:#fff;border:1px solid #e4e7ec;border-radius:12px;box-shadow:none}
body .right .side-heading{margin-bottom:13px}
body .right .side-heading h2{font-size:15px}
body .right .topic,body .right .person{margin:12px 0;padding:5px;border-radius:8px}
body .spro-legal-links{display:flex!important;flex-wrap:wrap;gap:8px 12px;margin-top:12px;padding:0!important;border:0!important;background:transparent!important}
body .spro-legal-links a{font-size:12px;color:#52616e}
body .home-search button{background:#00a8e8!important;color:#062330!important}
body .home-search button svg{stroke:currentColor!important}
html[data-spro-theme="dark"] body :is(.space-profile,.space-profile-content,.profile-details){background:#12181d!important;border-color:#29343c!important;color:#f5f7f8!important}
html[data-spro-theme="dark"] body :is(.profile-details,.space-profile-content) :is(h1,h2,h3,strong,a){color:#f5f7f8!important}
html[data-spro-theme="dark"] body :is(.profile-details,.space-profile-content) p{color:#bac6d1!important}
html[data-spro-theme="dark"] body :is(.chat-feature-search,.chat-feature-composer){background:#182127!important;border:1px solid #35434d!important;color:#c9d7e1!important}
html[data-spro-theme="dark"] body :is(.chat-feature-search input,.chat-feature-composer textarea){background:transparent!important;color:#f5f7f8!important}
html[data-spro-theme="dark"] body :is(.chat-feature-search,.chat-feature-composer) svg{stroke:currentColor!important}
html[data-spro-theme="dark"] body .settings-nav-item{color:#cbd7e2!important}
html[data-spro-theme="dark"] body .settings-nav-item.active{background:#0b384b!important;color:#53d0ff!important}
html[data-spro-theme="dark"] body .settings-nav-icon{background:#24343e!important;color:#c9deeb!important}
html[data-spro-theme="dark"] body :is(.notification-type-icon,.notification-mini-icon,.notification-settings,.notification-read,.chat-mobile-alert-link){background:#19313f!important;color:#63d4ff!important}
html[data-spro-theme="dark"] body :is(.notification-type-icon,.notification-mini-icon,.notification-read,.chat-mobile-alert-link) svg{stroke:currentColor!important;opacity:1!important}
@media(max-width:740px){body main>.composer-teaser{width:calc(100% - 20px)!important;margin:10px auto!important}}
html[data-spro-theme="dark"] body .post-head :is(a,strong,span){color:#edf4f8!important}
html[data-spro-theme="dark"] body .post-head small{color:#acbac6!important}
html[data-spro-theme="dark"] body .left nav{background:#12181d!important;border-color:#29343c!important}
html[data-spro-theme="dark"] body .left nav a{color:#dce5ed!important}
html[data-spro-theme="dark"] body .left nav a.active{background:#083447!important;color:#38caff!important}
html[data-spro-theme="dark"] body :is(.post-author,.post-author a,.post-author strong,.author-name,.post header strong,.post header a,.post-name,.profile-name,.settings-v2-title){color:#f5f7f8!important}
html[data-spro-theme="dark"] body :is(.settings-v2-root,.settings-v2-content,.settings-v2-head,.settings-section,.settings-field,.settings-summary,.settings-v2-card){background:#12181d!important;color:#f5f7f8!important;border-color:#29343c!important}
html[data-spro-theme="dark"] body :is(.post,.right,.left,.settings-v2-root) small{color:#acbac6!important}
html[data-spro-theme="dark"] body :is(.primary,.create-button,.mobile-create){background:#00a8e8!important;color:#031b25!important}
html[data-spro-theme="dark"] body :is(.post,.right,.left) :is(a,strong){color:inherit}
.settings-v2-head>.spro-theme-toggle{max-width:300px;margin-top:16px}
:is(button,a,input,textarea,select):focus-visible{outline:2px solid #00a8e8;outline-offset:3px}

/* Three independent header capsules, retaining all existing chat actions. */
body .chat-feature-pane-head{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;padding:10px!important;background:transparent!important;border:0!important;flex-shrink:0;z-index:10}
body .chat-feature-pane-head .chat-feature-back,
body .chat-feature-pane-head .chat-feature-head-more>button{display:flex!important;width:44px;height:44px;min-width:44px;border:1px solid #d6dee5;border-radius:50%!important;background:#fff;color:#172b3a;align-items:center;justify-content:center;box-shadow:0 4px 14px #0000000c}
body .chat-feature-pane-head .chat-feature-person{display:flex;align-items:center;gap:10px;min-width:0;min-height:52px;padding:6px 14px;border:1px solid #d6dee5;border-radius:30px;background:#fff;color:#172b3a;box-shadow:0 4px 14px #0000000c}
body .chat-feature-person>span:last-child{min-width:0}
body .chat-feature-person :is(strong,small){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .chat-feature-head-more{position:relative;align-self:center}
body .chat-feature-pane-head .chat-feature-dropdown{right:0;min-width:180px;z-index:30}
html[data-spro-theme="dark"] body .chat-feature-pane-head :is(.chat-feature-back,.chat-feature-person,.chat-feature-head-more>button){background:#182127!important;border-color:#35434d!important;color:#f5f7f8!important}
html[data-spro-theme="dark"] body .chat-feature-person strong{color:#f5f7f8!important}
html[data-spro-theme="dark"] body .chat-feature-person small{color:#abbcca!important}
@media(max-width:740px){
 body .mobile-header{display:flex;align-items:center;gap:8px;padding:10px 12px;min-height:64px}
 body .mobile-header .brand{flex:1;min-width:0;font-size:16px;white-space:nowrap}
 body .mobile-header .brand-logo{width:30px;height:30px}
 body .mobile-header :is(.mobile-create,.chat-mobile-alert-link,.mobile-profile){display:flex;flex:none;align-items:center;justify-content:center;width:38px!important;height:38px!important;min-width:38px;padding:0!important;margin:0!important;border-radius:50%;color:#152b38}
 body .mobile-header .mobile-create{order:1;background:#00a8e8!important;color:#042330!important}
 body .mobile-header .chat-mobile-alert-link{order:2}
 body .mobile-header .mobile-profile{order:3;overflow:hidden;border:1px solid #b9c9d5}
 body .mobile-profile :is(img,.avatar){width:36px!important;height:36px!important;object-fit:cover;border-radius:50%}
 body .mobile-profile small{display:none}
 body .bottom-nav{left:12px!important;right:12px!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:520px;margin:auto;padding:7px!important;height:66px!important;border:1px solid #dbe4ea!important;border-radius:24px!important;background:#fff!important;box-shadow:0 8px 32px #11233324;gap:4px}
 body .bottom-nav>a{display:flex;flex-direction:column;justify-content:center;gap:4px;border-radius:18px;min-height:50px;color:#526676!important;transition:background .2s,color .2s,transform .2s}
 body .bottom-nav>a small{font-size:10px!important;color:inherit!important}
 body .bottom-nav>a.active,body .bottom-nav>a[aria-current="page"]{background:#daf4ff!important;color:#00749f!important;transform:translateY(-2px)}
 body .bottom-nav>a:active{transform:scale(.94)}
 html[data-spro-theme="dark"] body .bottom-nav{background:#12181d!important;border-color:#35434d!important}
 html[data-spro-theme="dark"] body .bottom-nav>a{color:#b5c5d1!important}
 html[data-spro-theme="dark"] body .bottom-nav>a.active{background:#0b384b!important;color:#38caff!important}
 html[data-spro-theme="dark"] body .mobile-header :is(.chat-mobile-alert-link,.mobile-profile){color:#edf5fa}
 body .chat-feature-pane-head{gap:7px;padding:8px!important;grid-template-columns:42px minmax(0,1fr) 42px}
 body .chat-feature-pane-head .chat-feature-person{padding:5px 10px}
}
@media(prefers-reduced-motion:reduce){body .bottom-nav>a{transition:none;transform:none!important}}
/* Explore publishers: preserve readable spacing in both themes. */
.explore-users-v42 .person { padding: 18px 4px; gap: 16px; }
.explore-users-v42 .person + .person { border-top: 1px solid var(--border, #64748b66); }
.explore-users-v42 .identity { min-width: 0; }
.explore-users-v42 .identity span { min-width: 0; overflow-wrap: anywhere; }
