/* Lucas Gill V73 — shared design tokens, night-mode accessibility, dense private workspace and native-feeling PWA. */
:root{--lg-ui-brand:#1b527c;--lg-ui-brand-strong:#153f62;--lg-ui-ink:#19344c;--lg-ui-ink-muted:#516d84;--lg-ui-surface:#fff;--lg-ui-surface-alt:#f0f5fa;--lg-ui-border:#d6e3ed;--lg-ui-focus:#3a87c1}
:where(.portal-layout,.portal-research) :is(button,a,summary,input,select,textarea){-webkit-tap-highlight-color:transparent}
:where(.portal-layout,.portal-research) :is(a,button,summary,input,select,textarea):focus-visible{outline:3px solid var(--lg-ui-focus);outline-offset:3px}
:where(.portal-layout,.portal-research) :is(button,select,summary){touch-action:manipulation}
:where(.portal-layout,.portal-research) :is(input,select,textarea){accent-color:var(--lg-ui-brand)}
:where(.portal-layout,.portal-research) [hidden]{display:none!important}
:where(.portal-layout,.portal-research) :is(.hub-card,.research-card,.dashboard-section){scroll-margin-top:96px}
/* Shared left sidebar/navigation, also for research modules. */
.portal-research .research-workspace{display:block;min-width:0;max-width:1650px;padding-bottom:34px}
.portal-research .research-main{padding:18px 0 25px;width:100%;max-width:none}
.portal-research .research-shared-top{position:sticky;top:0;z-index:24;background:var(--paper);backdrop-filter:blur(15px)}
.portal-research .research-back-link{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid var(--lg-ui-border);border-radius:9px;background:#fff;font-weight:700;font-size:12px;color:#235a7c}
.portal-research .research-back-link .ui-icon{width:16px;height:16px}
.portal-research .research-footer{padding:16px 0}
.portal-layout .nav-item:focus-visible{border-radius:9px}
/* Compact introductory block: 51 services belong to one small badge, not a giant number. */
.portal-layout .welcome{gap:14px;padding:21px 0 17px;align-items:center}
.portal-layout .welcome h1{font-size:clamp(26px,3vw,39px);margin:5px 0 5px;letter-spacing:-.04em}
.portal-layout .welcome-kicker{font-size:10px;letter-spacing:.11em;font-weight:850;color:#366b96}
.portal-layout .welcome .dash-intro{max-width:740px;font-size:12px;line-height:1.55;color:#547086}
.portal-layout .welcome-number{width:auto;height:auto;min-width:84px;display:inline-flex;gap:6px;align-items:baseline;justify-content:center;padding:9px 12px;border:1px solid #cfe0ed;border-radius:11px;background:#e9f3fa;white-space:nowrap;color:#174b76}
.portal-layout .welcome-number strong{font:750 23px/1.1 Inter,'Segoe UI',sans-serif;letter-spacing:-.045em}
.portal-layout .welcome-number small{font-size:11px;color:#366788;font-weight:720}
.portal-layout .hub-search-intro{margin-top:0}
/* Research controls: compact, tap-friendly disclosures, clear source taxonomy. */
.intel-control-grid{gap:12px;align-items:start}
.intel-control-grid .research-card{min-width:0}
.intel-panel{margin:0}
.intel-panel-title{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:9px;min-height:44px;cursor:pointer;color:#19486d}
.intel-panel-title::-webkit-details-marker{display:none}
.intel-panel-title strong{font-size:15px;letter-spacing:-.01em}
.intel-panel-title>span{font-size:11px;color:#617d93;display:inline-flex;gap:5px;align-items:center;text-align:right}
.intel-panel-title:after{content:'⌄';font-size:22px;color:#437a9f;transition:transform .15s}
.intel-panel[open]>.intel-panel-title:after{transform:rotate(180deg)}
.intel-panel-body{padding-top:11px;border-top:1px solid #e1eaf1}
.intel-panel:not([open]) .intel-panel-body{display:none}
.intel-search-panel .research-form label{font-size:12px}
.intel-control-grid .research-actions{margin-top:10px}
.intel-curation{border-left:3px solid #327aa8!important}
.intel-curation-topics{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:11px}
.intel-topic-pill,.intel-article-topic{font-size:10.5px;color:#245c82;background:#e9f3fa;border:1px solid #d3e6f3;border-radius:999px;padding:3px 8px}
.intel-article-topic{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.intel-highlights{display:flex;flex-direction:column;gap:8px}
.intel-highlights .research-article{border-left-color:#3c86b4;background:#f6fafd}
.intel-result-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:2px 0 13px}
.intel-tabs{display:inline-flex;align-items:center;padding:3px;border:1px solid #d4e5f0;background:#eff5fa;border-radius:9px;gap:2px}
.intel-tabs button{padding:9px 12px;border-radius:7px;border:0;background:transparent;color:#4c6b83;font-size:12px;font-weight:750;cursor:pointer}
.intel-tabs button.is-active{background:#1b527d;color:#fff}
.intel-topic-label{display:inline-flex;align-items:center;gap:8px;color:#526e83;font-size:12px;font-weight:700}
.intel-topic-label select{min-width:130px;max-width:220px;min-height:40px;border:1px solid #d5e3ed;border-radius:8px;background:#fff;padding:8px;color:#183b57}
.intel-curated-article h3{font-size:13px}
/* Poll charts are descriptive observations, not generated forecasting. */
.poll-charts{margin-bottom:28px!important}
.poll-timeline-card{margin-top:5px!important}
.poll-timeline-card .poll-timeline svg{min-height:145px}
.poll-method-grid{margin:5px 0 16px;gap:13px}
.poll-method-grid .research-card{margin-bottom:0}
.poll-mini-bars{display:flex;flex-direction:column;gap:9px;margin:14px 0 0}
.poll-mini-row{display:grid;grid-template-columns:minmax(74px,115px) minmax(0,1fr) 25px;align-items:center;gap:10px;font-size:12px;color:#41627b}
.poll-mini-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.poll-mini-row strong{text-align:right;font-variant-numeric:tabular-nums;color:#1d4d73}
.poll-mini-rail{height:10px;background:#e9f0f6;border-radius:6px;overflow:hidden}
.poll-mini-fill{height:100%;background:linear-gradient(90deg,#357dab,#79aaca);border-radius:6px}
.poll-method-grid .research-small-note{margin-top:8px;font-size:11px}
/* Applications: a useful integrated but low-friction recruitment tracker. */
.hub-application-bar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:14px 0;font-size:12px;color:#526e83;font-weight:700}
.hub-applications-list{display:flex;flex-direction:column;gap:8px}
.hub-application{border:1px solid #d9e4ee;border-radius:10px;background:#f9fbfe;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:center}
.hub-application-head{display:flex;flex-direction:column;gap:3px;min-width:0;color:#24465f}
.hub-application-head strong{font-size:13px}
.hub-application-head span{font-size:12px;color:#577086}
.hub-application-tools{display:flex;gap:7px;align-items:center}
.hub-application-tools select{max-width:132px;min-height:37px;padding:7px;border:1px solid #d1e0e9;border-radius:8px;background:#fff;color:#1e4d6f;font-size:12px}
.hub-application-tools .hub-link-action{min-height:37px}
.hub-application>small{grid-column:1/-1;color:#607b90;line-height:1.6;overflow-wrap:anywhere}
.vault-device-option{margin:11px 0 3px}
.vault-device-option span small{display:block;font-size:11px;color:#6d8296;line-height:1.4}
/* Mobile installed app: sticky headers + persistent four-tab navigation with safe areas. */
.lg-mobile-dock{display:none}
@media(min-width:1300px){
 /* Balanced reading column and compact settings column; avoid empty CSS-grid rows. */
 .research-intel-layout{display:grid!important;grid-template-columns:minmax(300px,.8fr) minmax(0,1.55fr);align-items:start;gap:12px}
 .research-intel-layout>.research-hero{grid-column:1/-1}
 .research-intel-layout>.intel-control-grid{grid-column:1;grid-row:2/span 2;display:flex;flex-direction:column;gap:12px}
 .research-intel-layout>.intel-control-grid>.research-card{width:100%;margin:0}
 .research-intel-layout>.intel-curation{grid-column:2;grid-row:2;margin:0}
 .research-intel-layout>.research-results{grid-column:2;grid-row:3;margin:0}
}
@media(min-width:1000px) and (max-width:1299px){
 .research-intel-layout{display:block!important}
 .research-intel-layout>.research-main-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .research-intel-layout>.research-main-grid>.research-card{grid-column:auto!important;grid-row:auto!important}
 .research-intel-layout>.research-results{grid-column:auto!important;grid-row:auto!important}
}
@media(max-width:860px){
 .portal-layout .welcome-number{display:inline-flex;min-width:0}
 .portal-research .research-shared-top{margin-inline:-24px;padding-inline:24px;min-height:64px}
 .portal-research .research-back-link{display:none}
 .portal-research .research-main{padding-top:12px}
 .portal-layout .lg-mobile-dock{position:fixed;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));inset:auto 0 0;z-index:55;padding:5px max(7px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left));min-height:calc(61px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #d9e5ed;box-shadow:0 -4px 18px #132f4814}
 .lg-mobile-dock a{min-height:51px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;border-radius:8px;color:#58748b;font-size:10px;font-weight:750;text-align:center;padding:3px 1px;white-space:nowrap}
 .lg-mobile-dock a svg{width:20px;height:20px}
 .lg-mobile-dock a.is-active{color:#175381;background:#eaf4fa}
 .portal-layout .dash-main{padding-bottom:calc(89px + env(safe-area-inset-bottom))}
 .portal-layout .dash-top{padding-top:env(safe-area-inset-top)}
 .portal-layout .welcome{padding:16px 0 12px}
 .portal-layout .welcome h1{font-size:30px}
 .portal-research .research-main-grid,.poll-method-grid{grid-template-columns:1fr}
 .hub-application{grid-template-columns:1fr}
 .hub-application-tools{justify-content:flex-start;flex-wrap:wrap}
}
@media(max-width:620px){
 .portal-layout .welcome{align-items:flex-start}
 .portal-layout .welcome h1{font-size:clamp(25px,7.4vw,31px)}
 .portal-layout .welcome .dash-intro{font-size:11.5px}
 .portal-layout .welcome-number{font-size:10px;padding:7px 8px;align-self:flex-start}
 .portal-layout .welcome-number strong{font-size:19px}
 .portal-layout .welcome-number small{font-size:10px}
 .portal-research .research-shared-top{margin-inline:-16px;padding-inline:16px}
 .portal-research .research-shared-top .eyebrow{font-size:9px;max-width:60vw;overflow:hidden;text-overflow:ellipsis}
 .portal-layout .private-badge{display:none}
 .portal-research .research-card{padding:13px}
 .portal-research .research-hero{padding:16px}
 .portal-research .research-hero h1{font-size:clamp(25px,8vw,33px)}
 .portal-research .research-hero p{font-size:12px}
 .portal-research .research-controls select,.research-input-action input{font-size:16px}
 .intel-control-grid{display:flex;flex-direction:column;gap:8px}
 .intel-control-grid>.research-card{width:100%;margin-bottom:0}
 .intel-curation{margin-top:11px}
 .intel-panel-title strong{font-size:14px}
 .intel-tabs{width:100%;display:grid;grid-template-columns:1fr 1fr}
 .intel-tabs button{padding:10px 6px}
 .intel-topic-label{width:100%;justify-content:space-between}
 .intel-topic-label select{max-width:70%}
 .poll-charts{margin-bottom:25px!important}
 .poll-mini-row{grid-template-columns:82px minmax(0,1fr) 21px;gap:7px}
 .research-article-top{gap:5px 7px;flex-wrap:wrap}
 .hub-application-tools select{max-width:60vw}
}
/* Deliberate, consistent dark palette. No unreadable pastel text or invisible brand marks. */
html[data-theme="dark"]{--lg-ui-brand:#88c8f4;--lg-ui-brand-strong:#b0dfff;--lg-ui-ink:#edf6ff;--lg-ui-ink-muted:#b5ccdf;--lg-ui-surface:#14283b;--lg-ui-surface-alt:#1c354b;--lg-ui-border:#3d5971;--lg-ui-focus:#8ac7f3}
html[data-theme="dark"] :is(.portal-layout .welcome .dash-intro,.portal-layout .welcome-kicker,.portal-layout .eyebrow,.research-hero-compact .hero-sub,.research-article-top time,.intel-panel-title>span){color:#bed5e7!important}
html[data-theme="dark"] :is(.sidebar-brand .brand-text strong,.sidebar-brand .brand-text small,.portal-layout .welcome-number strong,.portal-layout .welcome-number small,.portal-layout .welcome h1,.portal-layout .welcome .blue-dot){color:#e8f4ff!important}
html[data-theme="dark"] :is(.portal-layout .welcome-number,.portal-research .research-back-link,.portal-research .research-shared-top,.intel-tabs,.intel-topic-label select,.hub-application,.hub-application-tools select,.poll-mini-rail){background:#182e45!important;border-color:#3b5a74!important;color:#e6f4ff!important}
html[data-theme="dark"] .intel-tabs button{color:#bbd5e7}
html[data-theme="dark"] .intel-tabs button.is-active{background:#33769d;color:#fff}
html[data-theme="dark"] :is(.intel-panel-title,.hub-application-head,.hub-application-head strong,.hub-application-tools select,.poll-mini-row strong){color:#e3f2ff!important}
html[data-theme="dark"] :is(.hub-application-head span,.hub-application>small,.hub-application-bar,.poll-mini-row,.vault-device-option span small){color:#b5cddd!important}
html[data-theme="dark"] :is(.intel-panel-body,.hub-application){border-color:#37556e!important}
html[data-theme="dark"] :is(.intel-topic-pill,.intel-article-topic,.intel-highlights .research-article,.poll-mini-rail){background:#213c53!important;color:#dbecfa!important;border-color:#3c6079!important}
html[data-theme="dark"] .poll-mini-fill{background:linear-gradient(90deg,#4b9bc9,#a2d9f2)}
html[data-theme="dark"] .portal-layout .lg-mobile-dock{background:#12243a;border-color:#39536a;box-shadow:0 -4px 25px #0005}
html[data-theme="dark"] .lg-mobile-dock a{color:#acc5d9}
html[data-theme="dark"] .lg-mobile-dock a.is-active{color:#d4efff;background:#244a6a}
html[data-theme="dark"] :is(.hub-feature-route,.hub-search-intro,.hub-catalog-tools,.hub-applications-list,.hub-application-bar,.hub-application>small,.watch-toolbar){color:#e4effb}
html[data-theme="dark"] :is(.research-card .r-primary,.portal-layout .hub-primary,.portal-layout .primary-action){background:#286c97!important;color:#fff!important;border-color:#3d86af!important}
html[data-theme="dark"] :is(.poll-comparison-table th,.poll-comparison-notice,.poll-compare-label select,.hub-vault-actions button){background:#19364c!important;color:#e2f3ff!important;border-color:#45627a!important}
html[data-theme="dark"] :is(.poll-comparison-table caption,.poll-compare-label,.poll-comparison-head,.research-source-row,.research-evidence){color:#bfd4e6!important}
html[data-theme="dark"] :is(.hub-pinned-card,.hub-feature-route,.hub-overview,.hub-notes-list,.hub-vault-item,.hub-agenda-item,.hub-task,.hub-news-item,.hub-application,.hub-quick-menu){border-color:#37546c!important}
/* Light-coloured logo plates preserve the original branding of transparent marks. */
html[data-theme="dark"] :is(.timeline-item img,.education-card>img,.extra-grid img,.degree-heading img,.proof-top img,.engagement-icon img){background:#f8fafc!important;border-radius:8px;padding:5px;filter:none!important;box-shadow:0 0 0 1px #dce8f2}
html[data-theme="dark"] :is(.quick-brand-icon,.tile-icon img,.hub-link-favicon img,.hub-proton-visual img,.tool-chip img,.ai-tool img){filter:none!important}
html[data-theme="dark"] :is(.toolband,.tool-group,.tool-chip,.ai-tool,.more-articles-enhanced .more-links a,.icn-new-field,.icn-new-score,.cpge-certificate,.research-v23-focus,.degree-tags span,.grades-details,.grade-grid>div,.extra-grid article,.approach-v24-step,.v24-team-impact){background:#172c40!important;border-color:#37566e!important;color:#eaf5ff!important;box-shadow:none}
html[data-theme="dark"] :is(.toolband strong,.tool-group h3,.tool-chip,.ai-tool,.icn-new-score strong,.icn-new-score p,.icn-new-score span,.icn-new-field h4,.icn-new-field p,.cpge-certificate summary,.cpge-certificate p,.more-articles-enhanced .more-links a h3,.more-articles-enhanced .more-links a,.extra-grid h3,.extra-grid span,.timeline-item h3,.timeline-item h3 span,.timeline-date,.timeline-date small,.toolband p,.proof-card .evidence-list,.approach-v24-step strong){color:#e7f2ff!important}
html[data-theme="dark"] :is(.timeline-item p,.proof-card .evidence-list li,.extra-grid p,.icn-new-lead,.icn-new-footer p,.engagement-example,.recommendation-card p,.interest-item p,.research-detail-body p,.contact-panel p,.timeline-item small){color:#b6cce0!important}
html[data-theme="dark"] :is(.research-v23-focus,.degree-feature,.recommendation-card,.experience-detail-body,.grades-inner){border-color:#385870;color:#d9eaf8}
html[data-theme="dark"] .site-header .brand,html[data-theme="dark"] .site-header .brand-dot{color:#f1f8ff!important}
html[data-theme="dark"] :is(.education-outbound,.engagement-link,.icn-source,.krypt-site-link,.research-detail-body a,.contact-panel a){color:#a7d9ff}
html[data-theme="dark"] .button-primary,html[data-theme="dark"] .nav-cta{background:#2f759e!important;border-color:#4d95c0!important;color:#fff!important}
html[data-theme="dark"] .button-plain{background:#1d3b56!important;color:#eaf5ff!important;border-color:#4c7491!important}
html[data-theme="dark"] :is(.language-item-toeic,.krypt-highlights span,.cv-choice-icon,.photo-orbit){border-color:#4b667e!important}
html[data-theme="dark"] :is(.icn-new-scores,.credentials-grid,.credentials-grid strong,.credentials-grid span,.grade-grid,.education-grid){color:#e5f0ff}
@media(prefers-reduced-motion:reduce){.intel-panel-title:after,.portal-layout .lg-mobile-dock a{transition:none}}

/* V0.77 · discreet release badge on the public portfolio */
.site-build-version{display:inline-flex;align-items:center;max-width:max-content;padding:3px 8px;border:1px solid var(--line,#cbd6e3);border-radius:99px;font:650 10px/1.5 system-ui,sans-serif;letter-spacing:.05em;color:var(--ink,#31465d);background:transparent;white-space:nowrap}
.footer-bottom{gap:10px;flex-wrap:wrap}
@media(max-width:640px){.footer-bottom .site-build-version{order:3;margin-top:4px}}

/* V0.77 · stronger public dark mode: clearer contrast, better cards, more legible navigation. */
html[data-theme="dark"] body{background:#0a1420;color:#edf5ff}
html[data-theme="dark"] :is(.site-header,.language-strip,.nav,.dialog-head,.footer){background:#102031!important;border-color:#355169!important}
html[data-theme="dark"] .hero{background:radial-gradient(circle at top,#16314f 0,#0d1a2a 58%,#09131f 100%)!important}
html[data-theme="dark"] :is(.credentials,.research-zone,.engagement-zone,.recommendations-zone,.timeline-zone-v24,.krypt-zone){background:#0f1d2f!important}
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:#15293f!important;border-color:#3d5c75!important;box-shadow:0 12px 32px rgba(0,0,0,.16)!important}
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,.footer p,.footer a,.language-switch a,.nav a){color:#c7d5e4!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,.hero h1,.footer .brand,.site-header .brand){color:#f5f9ff!important}
html[data-theme="dark"] :is(.button-primary,.nav-cta,.nav-cta-contact){background:#2c78ad!important;border-color:#4595cc!important;color:#fff!important}
html[data-theme="dark"] :is(.button-plain,.button-light,.dialog-close,.research-trigger){background:#1b3651!important;border-color:#4d6f8d!important;color:#edf5ff!important}
html[data-theme="dark"] :is(.proof-card a,.research-content a,.education-card a,.engagement-card a,.more-link a,.contact-panel a,.education-outbound,.engagement-link,.icn-source,.research-detail-body a){color:#9ed8ff!important}
html[data-theme="dark"] :is(.timeline-item img,.education-card>img,.extra-grid img,.degree-heading img,.proof-top img,.engagement-icon img){background:#f8fbff!important;border-radius:10px;padding:6px;box-shadow:0 0 0 1px #dae6f0}
html[data-theme="dark"] .site-build-version{border-color:#4c6b85;color:#d9ecff}
