/* Lucas Gill · V72 · Shared light/dark appearance system. SVG logos keep original colors. */
.lg-theme-toggle{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:40px;min-height:40px;padding:8px 12px;border:1px solid #cfdce8;border-radius:10px;background:#f3f8fc;color:#245b83;font:700 12px/1.25 "Segoe UI",Arial,sans-serif;letter-spacing:0;cursor:pointer;transition:background .18s,border-color .18s,color .18s;white-space:nowrap;flex:none;box-shadow:none}
.lg-theme-toggle:hover{background:#e4f0fa;border-color:#a2c6de}
.lg-theme-toggle:focus-visible{outline:3px solid #77b8ed;outline-offset:3px}
.lg-theme-toggle svg{width:18px;height:18px;flex:none}
.lg-theme-moon{display:block}.lg-theme-sun{display:none}
html[data-theme="dark"] .lg-theme-moon{display:none}html[data-theme="dark"] .lg-theme-sun{display:block}
.lg-theme-public{min-width:36px;min-height:34px;border-radius:8px;padding:6px 8px}
.lg-theme-public .lg-theme-label{display:none}
.lg-theme-krypt{min-height:38px;border-color:#68606b;background:#241e27;color:#f4d8d7}
.lg-theme-login{float:right;margin:-8px 0 14px 10px}
.lg-theme-header{min-height:37px;padding:6px 9px}
.lg-theme-header .lg-theme-label{display:none}
.lg-theme-sidebar{width:100%;justify-content:center;min-height:42px}
.portal-layout.nav-collapsed .lg-theme-sidebar{font-size:0;padding:8px 0}
.portal-layout.nav-collapsed .lg-theme-sidebar .lg-theme-label,.research-side-folded .lg-theme-sidebar .lg-theme-label{display:none}
.research-side-folded .lg-theme-sidebar{padding:10px 0}
@media(max-width:860px){.lg-theme-sidebar{font-size:12px}.portal-layout.nav-collapsed .lg-theme-sidebar .lg-theme-label{display:inline}}
@media(max-width:600px){.lg-theme-public{min-width:33px}.lg-theme-krypt .lg-theme-label{display:none}.lg-theme-header{padding:6px 8px}}
/* Palette: accessible foreground on dark surface, explicit white elements stay white only when purposeful. */
html[data-theme="dark"]{--paper:#0c1625;--canvas:#101f30;--white:#132238;--ink:#e8f1fc;--ink2:#c6d8ec;--blue:#77bef0;--blue2:#8dd1ff;--pine:#b4dcf7;--pine-deep:#10253b;--sage:#192b40;--accent:#83c5f5;--line:#29415b;--muted:#adc0d4;--light:#1a3046;--soft:#172b40;--shadow:0 18px 50px #030b1680;color-scheme:dark}
html[data-theme="dark"] body{background:#0c1625;color:#e8f1fc}
html[data-theme="dark"] .lg-theme-toggle{background:#192e45;border-color:#38536b;color:#b9e0ff}
html[data-theme="dark"] .lg-theme-toggle:hover{background:#264563;border-color:#6599bc}
/* Private dashboard + login + research */
html[data-theme="dark"] :is(.portal-layout,.research-layout){background:#0c1625;color:#e8f1fc}
html[data-theme="dark"] :is(.sidebar,.research-side,.research-mobile-header,.dash-top,.login-side){background:#101e2e!important;color:#e8f1fc;border-color:#2a425a}
html[data-theme="dark"] .dash-top{backdrop-filter:blur(14px)}
html[data-theme="dark"] :is(.hub-card,.hub-pinned,.hub-custom-card,.hub-pinned-card,.tile,.search-panel,.hub-universal-results,.research-card,.research-article,.login-form,.hub-quick-menu,.research-verification,.research-advanced,.research-verification .research-verify-link,.hub-catalog-tools>button){background:#132338!important;border-color:#2c445c!important;color:#e8f1fc!important;box-shadow:none}
html[data-theme="dark"] :is(.hub-overview,.research-hero,.login-story){background:linear-gradient(120deg,#132d4b,#154c72 73%,#184e75);color:#f3f8ff}
html[data-theme="dark"] :is(.hub-feature-route,.hub-proton-direct){border-color:#456687}
html[data-theme="dark"] :is(.sidebar-brand,.research-logo,.research-return,.portfolio-return,.research-nav a,.nav-item){color:#bed4e8}
html[data-theme="dark"] :is(.research-nav a.current,.nav-item.is-current,.research-nav a:hover,.nav-item:hover){background:#1d405e;color:#dff2ff}
html[data-theme="dark"] :is(.research-side-label,.nav-caption,.search-title,.research-muted,.hub-card-head p,.hub-card-description,.hub-empty,.hub-disclaimer,.hub-subnote,.hub-link-name small,.research-card-head p,.research-small-note,.research-evidence,.research-article-top time,.research-publisher,.hub-pinned-head span,.hub-field,.hub-overview-label,.lg-search-hint){color:#adc1d4!important}
html[data-theme="dark"] :is(.hub-card h2,.hub-card-head h2,.hub-pinned-head h2,.hub-card-title,.hub-pinned-title,.hub-catalog-tools h2,.hub-overview h2,.research-card h2,.research-article h3,.research-hero h1,.login-card h1,.tile-title,.search-title,.hub-link-name strong,.research-article-more,.lg-search-heading){color:#e8f4ff!important}
html[data-theme="dark"] :is(.tile-sub,.hub-link-name small,.research-controls label,.research-form label,.research-article-kind,.hub-news-foot,.hub-news-sources){color:#b3cce0!important}
html[data-theme="dark"] :is(.hub-form input,.hub-form select,.hub-form textarea,.hub-field input,.hub-field select,.research-controls input,.research-controls select,.research-input-action input,.password-input,.lg-search-bar,.lg-search-bar input,.hub-inline-edit input){background:#0d1b2d!important;border-color:#3a536d!important;color:#edf6ff!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#9ab0c5}
html[data-theme="dark"] :is(.hub-compose,.hub-reorder-controls button,.hub-universal-hit,.hub-link-favicon,.hub-card-icon,.hub-filter button.active,.hub-date-badge,.hub-vault-intro,.hub-disclaimer,.hub-secret,.hub-search-intro,.hub-news-tabs button,.research-article-kind,.research-verify-link,.research-mobile-toggle,.research-collapse,.sidebar-collapse,.hub-icon-button,.hub-quick-menu button,.hub-quick-menu a){background:#1a3046!important;border-color:#38506a!important;color:#dcefff!important}
html[data-theme="dark"] :is(.hub-task,.hub-agenda-item,.hub-vault-item){border-color:#29415b}
html[data-theme="dark"] :is(.hub-vault-unlocked,.hub-vault-lock){background:#513775!important;border-color:#7657a6;color:#fff}
html[data-theme="dark"] .hub-card-vault{border-color:#7a5ba7!important}
html[data-theme="dark"] :is(.research-article:hover,.hub-universal-hit:hover,.hub-quick-menu a:hover,.hub-quick-menu button:hover){background:#203c55!important}
html[data-theme="dark"] :is(.poll-comparison-table,.poll-comparison-table td,.poll-comparison-table th){color:#e6f2ff;border-color:#37516c}
html[data-theme="dark"] :is(.poll-archive-alert){background:#443123!important;color:#ffdaa6!important;border-color:#8e6036!important}
html[data-theme="dark"] :is(.login-card>p,.login-safety,.login-bottom,.story-copy){color:#b4c8dd}
html[data-theme="dark"] .login-side{background:#0f1d30!important}
html[data-theme="dark"] .login-card .form-message{background:#432e29;border-color:#795448;color:#ffe2da}
html[data-theme="dark"] .hub-news-tabs button.is-active{background:#235781!important;color:#fff!important}
html[data-theme="dark"] .private-badge{background:#17362e;border-color:#2e6854;color:#aff0cb}
html[data-theme="dark"] :is(.search-panel-google,.hub-proton-note,.hub-notes-list,.hub-card-body){color:#dce7f4}
html[data-theme="dark"] .research-tag{background:#24435d;color:#d3efff;border-color:#3e6685}
html[data-theme="dark"] .stat-card{background:#132338}
html[data-theme="dark"] :is(.stat-card span,.stat-card small){color:#b6cadb}
html[data-theme="dark"] .research-logout button,html[data-theme="dark"] .logout-btn{background:#21537b;color:#fff;border-color:#3776a7}
html[data-theme="dark"] .research-logout button:hover,html[data-theme="dark"] .logout-btn:hover{background:#2e688d}
/* Public portfolio in four languages: keep blue photographic/editorial identity. */
html[data-theme="dark"] :is(.site-header,.language-strip,.nav,.dialog-head){background:#0f1d30!important;border-color:#304960!important}
html[data-theme="dark"] :is(.nav a,.language-label,.language-switch a,.header-private-link,.site-header .brand){color:#d2e5f7!important}
html[data-theme="dark"] :is(.credentials,.research-zone,.engagement-zone,.recommendations-zone,.timeline-zone-v24,.krypt-zone){background:#111f33!important;color:#e7f2fc}
html[data-theme="dark"] :is(.proof-card,.proof-card-dark,.degree-feature,.degree-main,.education-card,.engagement-card:not(.engagement-lead),.article,.recommendation-card,.research-card,.portrait-stamp,.grades-details,.grade-grid>div,.contact-panel,.more-link,.interest-item,.personal-project,.contact-method,.legal-dialog,.cv-choice,.cv-chooser,.research-details .research-detail-body){background:#172a40!important;color:#ecf4fe!important;border-color:#345169!important;box-shadow:none}
html[data-theme="dark"] :is(.hero-lead,.hero-identite,.hero-meta,.degree-main>p,.degree-heading p,.engagement-card p,.research-content p,.research-note,.research-disclaimer,.recommendation-note,.article p,.research-detail-section p,.grade-grid span,.education-card p,.dialog-body p){color:#b9cee1!important}
html[data-theme="dark"] :is(.proof-card h3,.education-card h3,.degree-heading h3,.engagement-card h3,.article h3,.research-content h3,.grade-grid b,.grades-details summary,.research-detail-section h4){color:#eff8ff!important}
html[data-theme="dark"] :is(.button-plain,.button-light,.nav-cta-contact,.dialog-close,.research-trigger){background:#23496b;color:#e9f5ff;border-color:#467594}
html[data-theme="dark"] :is(.proof-card a,.research-content a,.education-card a,.engagement-card a,.more-link a){color:#9fd3ff}
html[data-theme="dark"] .photo-orbit{background:linear-gradient(145deg,#26496b,#417ca8,#192a3d)}
html[data-theme="dark"] .photo-frame{background:#203f5c;border-color:#cad8e4}
html[data-theme="dark"] .hero{background:#0c1625;color:#edf6ff}
html[data-theme="dark"] .hero h1 em{color:#84c5fb}
/* KRYPT retains its red identity and dark hero. Only light cards and sections respond. */
html[data-theme="dark"] :is(.krypt-card,.krypt-side,.krypt-activities,.krypt-content){background:#192232;color:#eaf1f8;border-color:#494b59}
html[data-theme="dark"] :is(.krypt-card p,.krypt-content p,.krypt-side p){color:#c7d0df}
html[data-theme="dark"] .top-strip{background:#100d13}
/* Responsive, touch targets and hidden-control safeguards */
.lg-unified-search{background:#fff;border:1px solid #dce7ef;padding:15px 17px;border-radius:13px;margin-bottom:16px}
.lg-search-heading{display:flex;justify-content:space-between;align-items:center;gap:9px;font-size:12px;font-weight:780;color:#245678;margin-bottom:9px}
.lg-search-bar{display:flex;align-items:center;gap:10px;background:#f7fafd;border:1px solid #ccdae7;border-radius:10px;min-height:49px;padding:5px 6px 5px 13px}
.lg-search-bar>.ui-icon{color:#477b9f;width:21px;height:21px;flex:none}
.lg-search-bar input{border:0;outline:0;flex:1;min-width:0;width:100%;background:transparent;color:#163c59;font-size:14px;min-height:36px;padding:3px 0}
.lg-search-bar:focus-within{outline:2px solid #7fb6da;outline-offset:1px}
.lg-search-bar kbd{padding:4px 6px;border:1px solid #d5e0e8;border-radius:5px;color:#859bb0;font-size:11px}
.lg-search-google{border:1px solid #ccdfea;background:#fff;color:#245579;border-radius:8px;padding:9px 11px;min-height:38px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;white-space:nowrap;flex:none}
.lg-search-google:hover{background:#e8f4fb}
.lg-search-google img{display:block;width:20px;height:20px;object-fit:contain}
.lg-search-hint{color:#738a9d;font-size:11px;margin:7px 0 0}
html[data-theme="dark"] .lg-unified-search{background:#132338;border-color:#2c455f}
html[data-theme="dark"] .lg-search-google{background:#1c344b;border-color:#41647e;color:#eaf5ff}
html[data-theme="dark"] .lg-search-google:hover{background:#274763}
/* Research saved topics and sidebar affordance */
.watch-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.watch-toolbar .r-outline{font-size:12px;min-height:36px;padding:7px 10px}
.watch-row-v72{display:flex;align-items:center;gap:8px;min-width:0}
.watch-row-v72 .watch-selection{width:18px;height:18px;accent-color:#2970a1;cursor:pointer;flex:none}
.watch-row-v72 .watch-label{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px;font-weight:650;color:#274e69;cursor:pointer}
.watch-row-v72.is-paused .watch-label{opacity:.65}
.watch-row-v72 .watch-open{flex:none;max-width:90px;padding:7px 8px;font-size:11px}
.watch-row-v72 .watch-delete{flex:none}
.watch-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:11px 0 8px}
.watch-actions .r-primary{min-height:39px;font-size:12px}
.watch-actions span{font-size:12px;color:#59788e}
html[data-theme="dark"] .watch-row-v72 .watch-label{color:#dcecff}
html[data-theme="dark"] .watch-row-v72 .watch-open{background:#244b6b;color:#e7f3ff}
html[data-theme="dark"] .watch-actions span{color:#b5cfe1}
.research-side-folded .research-collapse svg{transform:scaleX(-1)}
.research-collapse svg{transition:transform .17s}
.research-result-grid{gap:6px}
.research-news-list .research-article{padding:12px 14px}
.research-hero-compact{padding:18px 24px;margin-bottom:11px}
.research-hero-compact p{max-width:920px}
.research-card{margin-bottom:11px}
.research-main{padding-top:18px}
.research-optional{margin:8px 0;background:#f8fbfe}
.research-optional .research-chips{margin-top:10px}
.research-optional .research-verification{margin:8px 0;background:transparent;padding:8px;border:0}
@media(max-width:850px){.research-hero-compact{padding:15px 17px}.research-hero-compact h1{font-size:clamp(26px,7vw,32px)}.research-main{padding-top:10px}.research-optional{padding:9px}}
@media(max-width:620px){.lg-unified-search{padding:11px 12px}.lg-search-bar{gap:7px;padding:5px 5px 5px 8px}.lg-search-bar kbd{display:none}.lg-search-google{padding:8px;min-width:42px}.lg-search-google span{display:none}.lg-search-hint{font-size:11px}.watch-toolbar .r-outline{flex:1}.research-news-list .research-article{padding:12px 11px}.lg-theme-header .lg-theme-label{display:none}}
@media(prefers-reduced-motion:reduce){.lg-theme-toggle,.research-collapse svg{transition:none}}
/* V72 post-review: ensure dark mode never inherits light-only text or pale overview surfaces. */
html[data-theme="dark"] :is(.welcome h1,.welcome h1 .blue-dot,.hub-search-intro strong,.hub-search-intro span,.hub-pinned-head h2,.hub-overview-slim .hub-figures strong,.hub-overview-slim .hub-figures small,.hub-overview-slim .hub-overview-label,.hub-overview-slim .hub-overview-label span){color:#e8f4ff!important}
html[data-theme="dark"] .hub-overview-slim{background:linear-gradient(120deg,#18344e,#244c67)!important;border:1px solid #41637a!important;color:#e6f5ff!important}
html[data-theme="dark"] .hub-overview-slim :is(.hub-figures>div,.hub-figures>div strong,.hub-figures>div small){color:#e1f0ff!important;border-color:#51748b!important}
html[data-theme="dark"] :is(.hub-feature-route,.hub-feature-routes a){background:#19314a!important;color:#eaf5ff!important;border-color:#395976!important}
html[data-theme="dark"] .hub-feature-routes :is(strong,small,b){color:#d7eaff!important}
html[data-theme="dark"] .hub-feature-route-icon{background:#244767!important;color:#c0e4ff!important}
html[data-theme="dark"] .research-mobile-header a{color:#dcefff!important}
html[data-theme="dark"] .research-advanced>summary{color:#c5e6ff!important}
html[data-theme="dark"] :is(.r-outline,.research-actions .r-outline,.research-download-top button,.research-chips button,.research-watch button,.watch-toolbar .r-outline,.research-advanced .research-verify-link){background:#1c3852!important;border:1px solid #43647e!important;color:#dcefff!important}
html[data-theme="dark"] :is(.r-outline:hover,.research-chips button:hover,.watch-toolbar .r-outline:hover){background:#275576!important}
html[data-theme="dark"] :is(.watch-row-v72,.research-result-grid .research-empty,.research-evidence,.research-summary .summary-stat){background:#192f45!important;border-color:#35516a!important;color:#d9eaff!important}
html[data-theme="dark"] :is(.research-live,.research-tag,.research-small-note,.research-article-kind){color:#b9d8eb!important}
html[data-theme="dark"] :is(.hub-section-label,.hub-section-label span,.hub-section-label strong){color:#9dc1dc!important}
html[data-theme="dark"] .research-input-action input{color:#edf7ff!important}
html[data-theme="dark"] :is(.research-verification-links a,.research-article-more,.research-source-row a){color:#b0dcff!important}
html[data-theme="dark"] .hub-search-intro{background:transparent!important}
html[data-theme="dark"] .research-dataset,.research-muted{color:#b2cbdc}
.research-filter-disclosure{margin:8px 0 6px}
.research-filter-disclosure .research-controls{display:flex;gap:10px;flex-wrap:wrap;margin-top:11px}
.research-filter-disclosure .research-controls label{min-width:145px;flex:1}
@media(max-width:600px){.research-filter-disclosure .research-controls label{flex:1 1 135px;min-width:0}}
/* Desktop intelligence desk: article stream starts beside compact search controls.
   On smaller screens, preserve a single reading column. */
@media(min-width:1000px){
 .research-intel-layout{display:grid;grid-template-columns:minmax(285px,335px) minmax(0,1fr);grid-template-rows:auto 1fr auto;gap:0 14px;align-content:start;align-items:start;max-width:1560px;width:100%}
 .research-intel-layout>.research-hero{grid-column:1/-1;grid-row:1}
 .research-intel-layout>.research-main-grid{display:contents}
 .research-intel-layout>.research-main-grid>.research-card:first-child{grid-column:1;grid-row:2;margin-bottom:12px}
 .research-intel-layout>.research-main-grid>.research-watch{grid-column:1;grid-row:3}
 .research-intel-layout>.research-results{grid-column:2;grid-row:2/4;min-width:0}
 .research-intel-layout .research-input-action{flex-wrap:wrap}
 .research-intel-layout .research-input-action input{width:100%;min-width:0;flex-basis:100%}
 .research-intel-layout .research-input-action .r-primary{width:100%}
 .research-intel-layout .research-actions{gap:7px;flex-wrap:wrap}
 .research-intel-layout .research-card{padding:16px 17px}
}
.research-watch .research-watch-list{max-height:290px;overflow:auto;scrollbar-width:thin}
@media(max-width:999px){.research-watch .research-watch-list{max-height:200px}}
/* Preserve recognisable brand colours rather than applying invert() to logos. */
html[data-theme="dark"] :is(.tile-icon,.hub-link-favicon){background:#f4f8fc!important;border-radius:10px;color:#214567!important}
html[data-theme="dark"] .quick-brand-icon{background:#f6f9fd;border-radius:8px;padding:4px}
html[data-theme="dark"] :is(.hub-proton-visual,.hub-proton-visual img){filter:none}
