/* Aegora — blue depth, clear evidence. Shared semantic palette for every surface. */
:root{color-scheme:light;--canvas:#f3f6fb;--surface:#fff;--surface-soft:#eaf0f8;--ink:#15263f;--muted:#52647c;--line:#d5deeb;--line-strong:#71839e;--accent:#245acb;--accent-soft:#dceaff;--strong:#10233e;--on-strong:#f5f9ff;--shadow-color:#07172e;--success:#176444;--success-soft:#e5f4ec;--success-line:#87b99d;--warning:#78500e;--warning-soft:#fff2d9;--warning-line:#c49b49;--danger:#a12d3f;--danger-soft:#ffebef;--danger-line:#d7929c;--focus:#2465d7;--rail:#142036;--rail-text:#c8d5e8;--hero-start:#ecf3ff;--hero-end:#e3f6fa;--cyan:#086e89;--navy:var(--ink);--blue:var(--accent);--paper:var(--surface);--gold:var(--cyan);--pub-ink:var(--ink);--pub-muted:var(--muted);--pub-paper:var(--canvas);--pub-dark:var(--strong);--pub-green:var(--accent);--shadow:0 12px 36px #18385e0a;font-family:'Segoe UI',ui-sans-serif,system-ui,sans-serif;background:var(--canvas);color:var(--ink)}
:root[data-theme=dark]{color-scheme:dark;--canvas:#0a1220;--surface:#142238;--surface-soft:#1b2d46;--ink:#eef4ff;--muted:#b0c0d6;--line:#354960;--line-strong:#7e94b1;--accent:#87b8ff;--accent-soft:#233f66;--strong:#0b192c;--success:#83dfb2;--success-soft:#143a30;--success-line:#397d60;--warning:#f3cc82;--warning-soft:#3b301d;--warning-line:#9c7e45;--danger:#ffa4b1;--danger-soft:#40232e;--danger-line:#a76070;--focus:#82d9ff;--rail:#08111f;--rail-text:#c8d5e8;--hero-start:#102440;--hero-end:#123347;--cyan:#70d9ee;--shadow:0 16px 40px #0002}
body{background:var(--canvas);color:var(--ink)}
button,input,textarea,select,summary,a{-webkit-tap-highlight-color:transparent}
:is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--focus);outline-offset:4px}
button{border-radius:12px;transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s}
button:hover{background:var(--surface-soft);border-color:var(--line-strong)}
button:active:not(:disabled),.public-button:active{transform:translateY(1px)}
button.primary,.public-button.primary{background:#245acb;color:#fff;border-color:#245acb;box-shadow:0 4px 12px #245acb22}
button.primary:hover,.public-button.primary:hover{background:#1749af;border-color:#1749af}
button:disabled{background:var(--surface-soft)!important;color:var(--muted)!important;border-color:var(--line)!important}
input,select,textarea{background:var(--surface);color:var(--ink);border-color:var(--line-strong);border-radius:11px}
input::placeholder,textarea::placeholder{color:var(--muted)}
a{color:var(--accent)}
h1,h2,h3{font-weight:650}h1{letter-spacing:-1.15px}h2{letter-spacing:-.45px}
.card,.metric,dialog{border-radius:22px;box-shadow:var(--shadow);background:var(--surface);color:var(--ink)}
.metric{padding:24px;border-color:var(--line)}.metric strong{font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:-1.8px}.metric:after{background:var(--accent)}
.metrics .metric:first-child{background:linear-gradient(125deg,var(--hero-start),var(--hero-end))}
.cardhead{padding-bottom:14px;border-bottom:1px solid var(--line)}
.tag{border-radius:7px}.tag.green{color:var(--success);background:var(--success-soft);border-color:var(--success-line)}
.tag.amber{color:var(--warning);background:var(--warning-soft);border-color:var(--warning-line)}
.tag.red{color:var(--danger);background:var(--danger-soft);border-color:var(--danger-line)}
.notice{border-radius:13px}.notice.success,.feedback.success{background:var(--success-soft);color:var(--success);border-color:var(--success-line)}
.notice.warn{background:var(--warning-soft);color:var(--warning);border-color:var(--warning-line)}
.notice.error,.feedback.error{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-line)}
dialog{padding:28px;border-color:var(--line)}dialog::backdrop{background:#071322a8;backdrop-filter:blur(5px)}
dialog[open]{animation:panel-enter .18s ease-out}#toast{background:var(--strong);color:var(--on-strong);border-radius:16px}
#toast button{color:var(--on-strong);background:transparent}
table{font-variant-numeric:tabular-nums}th{color:var(--muted);font-size:12px}td{font-size:13px}tbody tr:hover{background:var(--surface-soft)}
.theme-control{display:inline-flex;align-items:center;gap:7px;flex-shrink:0;margin:0;color:var(--muted);font-size:12px;font-weight:600}
.theme-control svg{width:20px;height:20px;flex-shrink:0;color:var(--accent)}
.theme-control select{width:auto;max-width:130px;min-height:44px;margin:0;padding:8px 26px 8px 10px;font-size:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink)}
.theme-control.theme-floating{position:fixed;right:20px;top:12px;z-index:5;background:var(--surface);padding:4px 8px;border:1px solid var(--line);border-radius:15px}
[data-surface=login] .login{padding-top:90px}
[data-surface=workspace] .workspace-shell{background:var(--canvas);padding:12px 18px 12px 12px;gap:14px;grid-template-columns:232px minmax(0,1fr)}
[data-surface=workspace] .workspace-shell .sidebar{background:var(--rail);color:var(--rail-text);padding:28px 18px 20px;border-radius:23px;height:calc(100dvh - 24px);top:12px;gap:28px}
[data-surface=workspace] .workspace-shell .sidebar .brand img{filter:brightness(0) invert(1);width:143px;height:38px}
[data-surface=workspace] .workspace-shell .sidebar-caption,[data-surface=workspace] .workspace-shell .sidebar .bottom p{color:#9cb0cc}
[data-surface=workspace] .workspace-shell .sidebar nav button{color:var(--rail-text);border-radius:12px;min-height:48px}
[data-surface=workspace] .workspace-shell .sidebar nav button:hover{background:#21354f;color:#fff}
[data-surface=workspace] .workspace-shell .sidebar nav button.active{background:#285ccc;border-color:#4278e6;color:#fff;box-shadow:0 5px 18px #0002}
[data-surface=workspace] .workspace-shell .sidebar .bottom{border-color:#33435a}
[data-surface=workspace] .workspace-shell .sidebar .bottom button,[data-surface=workspace] .navigation-toggle{background:#1e3049;color:#eaf3ff;border-color:#465c79}
[data-surface=workspace] .workspace{background:transparent;border:0;box-shadow:none;min-width:0}
[data-surface=workspace] .topbar{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px 25px;gap:18px;box-shadow:var(--shadow)}
[data-surface=workspace] .topbar-actions{flex-wrap:wrap;gap:12px}
[data-surface=workspace] .content{background:transparent;padding:32px 12px;min-width:0}
[data-surface=workspace] .settings-menu{background:var(--surface);border-color:var(--line)}
[data-surface=workspace] .settings-panel{background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:0 18px 55px #0003;border-radius:18px}
[data-surface=workspace] .workspace-context{background:transparent}
[data-surface=workspace] .workspace-footer{color:var(--muted);border-color:var(--line)}
.dossier-tabs button.active,.tabs button[aria-current]{background:#245acb;color:#fff;border-color:#245acb}
.process-panel{background:linear-gradient(125deg,var(--surface-soft),var(--surface));border-color:var(--line)}
.signature-fill{background:linear-gradient(90deg,#245acb,#178dbb,#58d5e6)}
.public-site{background:var(--canvas);color:var(--ink);--pub-muted:var(--muted);--pub-ink:var(--ink)}
.public-header{background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);max-width:none;padding-block:20px}
.public-header a,.public-header .public-brand,.public-mobile-nav summary{color:var(--ink)}
.public-header .public-desktop-nav{background:var(--surface-soft);border:1px solid var(--line);border-radius:16px;padding:5px}
.public-desktop-nav a{color:var(--muted);border-radius:11px}.public-desktop-nav a[aria-current]{background:var(--surface);color:var(--accent);box-shadow:var(--shadow)}
.public-header-login{background:#245acb!important;color:#fff!important;border-color:#245acb;border-radius:12px}
.public-header-actions{flex-wrap:wrap;gap:12px}
[data-surface=public] .public-header #localeToolbar label{color:var(--muted)}
.public-hero{background:radial-gradient(ellipse at 75% 25%,var(--hero-end),transparent 65%),linear-gradient(130deg,var(--hero-start),var(--canvas));color:var(--ink);padding-top:74px;border-bottom:1px solid var(--line)}
.public-hero h1{font-size:clamp(42px,5.1vw,70px);font-weight:650;letter-spacing:-2.6px;max-width:900px;margin-inline:auto}
.public-hero h1 em{color:var(--accent);font-style:normal}
.public-hero .public-lead,.public-invitation,.diligence-illustration figcaption{color:var(--muted)}
.public-kicker{color:var(--cyan);font-weight:700}
.public-button{border-radius:13px;background:#245acb;color:white;border-color:#245acb}
.public-button.secondary{background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
.illustrated-workspace{background:var(--surface);border:1px solid var(--line);box-shadow:0 28px 65px #0b305e26;border-radius:24px;transform:perspective(1200px) rotateX(3deg)}
.illustrated-rail{background:var(--rail);border-radius:23px 0 0 23px}
.illustrated-main{color:var(--ink);background:var(--surface)}
.illustrated-heading,.illustrated-top,.illustrated-finding,.illustrated-finding strong{color:var(--ink)}
.illustrated-step{background:var(--surface-soft);color:var(--ink);border-color:var(--line);border-radius:13px}
.illustrated-step svg{color:var(--accent)}.illustrated-finding small{color:var(--muted)}
.public-section{padding-block:80px}.public-steps{gap:24px}.public-steps article{border:1px solid var(--line);padding:28px;border-radius:22px;background:var(--surface);box-shadow:var(--shadow)}
.public-step-number,.public-steps svg,.public-feature-grid svg{color:var(--accent)}
.public-feature-grid article{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:30px;box-shadow:var(--shadow)}
.public-proof-art,.public-about-statement,.public-editorial-hero,.public-scope{background:linear-gradient(135deg,var(--hero-start),var(--hero-end));border-color:var(--line);border-radius:24px}
.public-editorial-hero{border-radius:0}.public-editorial-hero .public-lead,.public-about-statement p,.proof-note{color:var(--muted)}
.public-next{background:linear-gradient(125deg,#10233e,#173d6d);color:#f5f9ff;border:1px solid #365b86;border-radius:26px}
.public-next .public-kicker{color:#74dded}.public-next p:not(.public-kicker){color:#c8d9ef}
.public-next .public-button{background:#fff;color:#183964;border-color:#fff}
.public-features-workflow [data-feature-step="5"]{background:var(--strong);color:var(--on-strong)}
.public-features-workflow [data-feature-step="5"] :is(p,svg,.public-step-number){color:#c5d9ef}
.public-footer{border-top:1px solid var(--line);padding-top:32px}.public-footer>div p,.public-footer .public-disclaimer,.public-footer nav>span{color:var(--muted)}
.public-mobile-nav{border-color:var(--line)}.public-mobile-nav a[aria-current]{background:var(--accent-soft)}
[data-theme=dark] .brand img{filter:brightness(0) invert(1)}
.login .card{border-top:3px solid var(--accent)}.login h1 em{color:var(--accent)}
@keyframes panel-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:no-preference){.public-hero h1,.public-hero .public-lead{animation:panel-enter .35s ease-out}.card{animation:panel-enter .2s ease-out}}
@media(max-width:1100px){[data-surface=workspace] .workspace-shell{grid-template-columns:205px minmax(0,1fr);gap:10px;padding:10px}.public-header-actions{gap:9px}.theme-control select{max-width:115px}}
@media(max-width:760px){[data-surface=workspace] .workspace-shell{display:block;padding:10px}[data-surface=workspace] .workspace-shell .sidebar{position:relative;top:0;height:auto;padding:17px 18px;border-radius:19px;margin-bottom:12px}[data-surface=workspace] .topbar{padding:16px;border-radius:18px}[data-surface=workspace] .content{padding:25px 2px}.card,.metric{border-radius:18px}.card{padding:21px 18px}.metric{padding:17px 13px}.theme-control select{max-width:125px}.public-header-actions{justify-content:flex-start}.public-header-actions [data-locale-slot]{flex:1}.public-header-login{flex-basis:100%;justify-content:center}.public-hero{padding-top:44px}.public-hero h1{letter-spacing:-1.6px;font-size:43px}.public-section{padding-block:54px}.public-steps article{padding:23px}.illustrated-workspace{transform:none;border-radius:17px}.public-next{border-radius:22px}.theme-floating{max-width:calc(100vw - 32px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{:root[data-theme]{color-scheme:light;--canvas:#fff;--surface:#fff;--surface-soft:#f5f5f5;--ink:#111;--muted:#444;--line:#ccc;--accent:#174ec8}.theme-control{display:none!important}}

/* Match the existing workspace selector specificity, including nested commercial pages. */
[data-surface=workspace] .workspace-shell .workspace{padding-top:0}
[data-surface=workspace] .workspace-shell .topbar{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px 24px;min-height:80px}
[data-surface=workspace] .workspace-shell .workspace-body{background:transparent;border:0;box-shadow:none}
[data-surface=workspace] .workspace-shell .content{padding:28px 10px}
[data-surface=workspace] .workspace-shell .content .content{padding:0}
[data-surface=workspace] .workspace-shell .card{border-radius:22px;box-shadow:var(--shadow)}
[data-surface=workspace] .workspace-shell .metric{border-radius:20px;padding:24px;background:var(--surface)}
[data-surface=workspace] .workspace-shell .metric strong{font-weight:650;font-size:40px}
[data-surface=workspace] .workspace-shell .metrics .metric:first-child{background:linear-gradient(130deg,var(--hero-start),var(--hero-end))}
#stripePackCards>article{position:relative;padding-top:28px;border-top:4px solid var(--accent);overflow:hidden}
#stripePackCards>article h2{font-size:24px;letter-spacing:-.5px}
#stripePackCards>article>p:nth-of-type(2){font-size:19px;font-weight:650;font-variant-numeric:tabular-nums}
#stripePackCards [data-sync]{display:inline-flex;border-radius:7px;background:var(--surface-soft);padding:5px 9px;font-size:12px;color:var(--muted)}
#stripePackCards form{margin-top:14px}
#stripeDiscountEditor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 20px}
#stripeDiscountEditor>label:first-child,#stripeDiscountEditor>label:has([name=reason]),#discountPreview{grid-column:1/-1}
#stripeDiscountEditor>button{justify-self:start}
#stripeFinance{background:linear-gradient(120deg,var(--hero-start),var(--hero-end));border-color:var(--line);border-top:4px solid var(--accent)}
.content dl>div{padding:22px!important;border-radius:18px!important;background:var(--surface);box-shadow:var(--shadow)}
.content dl dt{font-size:12px;color:var(--muted)}.content dl dd{margin:12px 0 0;font-size:30px;font-weight:650;letter-spacing:-.8px;font-variant-numeric:tabular-nums}
.public-site{font-family:'Segoe UI',ui-sans-serif,system-ui,sans-serif}
.public-site .public-hero .public-kicker{color:var(--cyan)}
.public-site .public-hero .public-kicker:before{background:var(--accent)}
.public-site .public-hero .public-button:first-child{background:#245acb;color:#fff;border-color:#245acb;box-shadow:0 6px 20px #245acb22}
.public-site .public-hero h1{font-weight:650}
.public-site .public-header{grid-template-columns:auto minmax(0,1fr) auto;padding-inline:clamp(20px,4vw,64px)}
.public-site .public-header-actions{flex-wrap:nowrap}
[data-surface=public] .public-header #localeToolbar select{background:var(--surface);color:var(--ink);border-color:var(--line);border-radius:12px;min-height:44px}
.brand>span{color:var(--ink);font-size:27px;font-weight:650;letter-spacing:-1px}
.brand img,[data-theme=dark] .brand img,[data-surface=workspace] .workspace-shell .sidebar .brand img{width:40px;height:40px;filter:none}
[data-surface=workspace] .workspace-shell .sidebar .brand>span{color:#fff}
.proof-badge{box-shadow:0 0 0 8px var(--surface-soft)}
@media(max-width:1000px){.public-site .public-header{grid-template-columns:auto 1fr}.public-site .public-header-actions{flex-wrap:wrap}}
@media(max-width:760px){[data-surface=workspace] .workspace-shell .content{padding:24px 2px}[data-surface=workspace] .workspace-shell .topbar{padding:16px}[data-surface=workspace] .workspace-shell .card{border-radius:18px}[data-surface=workspace] .workspace-shell .metric{padding:17px 13px}[data-surface=workspace] .workspace-shell .metric strong{font-size:32px}#stripeDiscountEditor{grid-template-columns:1fr}#stripeDiscountEditor>button{width:100%}.content dl>div{padding:18px!important}.content dl dd{font-size:26px}}
@media(max-width:700px){.public-site .public-header{grid-template-columns:1fr}.public-site .public-header-actions{flex-wrap:wrap}}
.illustrated-step strong,.illustrated-finding strong{color:var(--ink)}
/* Keep the visible language label outside the header control alignment row. */
[data-surface=public] .public-header #localeToolbar{position:relative;display:block}
[data-surface=public] .public-header #localeToolbar label{position:absolute;left:0;bottom:calc(100% + 2px);margin:0;white-space:nowrap}
[data-surface=public] .public-header :is(#localeToolbar select,.theme-control select,.public-header-login){box-sizing:border-box;height:44px;min-height:44px}

.settings-panel .settings-group{border-top:1px solid var(--line);padding-top:10px;margin-top:10px}
.settings-panel .settings-group>.eyebrow{margin:0 8px 5px}
[data-surface=workspace] .settings-panel [data-locale-slot]{border-bottom:0;margin-bottom:0}

/* Platform administration has its own accent; role checks remain server-owned. */
body[data-surface=workspace][data-workspace-space=platform]{--canvas:#f5f3fb;--surface-soft:#eee8fa;--accent:#6842bd;--accent-soft:#ece2ff;--focus:#7750d2;--rail:#211a3a;--rail-text:#dfd5f5;--hero-start:#eee5ff;--hero-end:#e9ebff;--cyan:#6341ab;--blue:var(--accent);--gold:var(--cyan)}
[data-theme=dark] body[data-surface=workspace][data-workspace-space=platform]{--canvas:#120e21;--surface:#211b35;--surface-soft:#302645;--line:#4b3c65;--line-strong:#9c87b6;--accent:#c5a9ff;--accent-soft:#41305e;--focus:#d4bbff;--rail:#181125;--hero-start:#2a1c42;--hero-end:#252145;--cyan:#c3adf0}
body[data-surface=workspace][data-workspace-space=platform] .workspace-shell .sidebar nav button.active{background:#6842bd;border-color:#9973ec}
body[data-surface=workspace][data-workspace-space=platform] .workspace-shell .sidebar nav button:hover{background:#3b2c59;color:#fff}
body[data-surface=workspace][data-workspace-space=platform] .workspace-shell .sidebar nav button.active:hover{background:#7952cb}
body[data-surface=workspace][data-workspace-space=platform] :is(button.primary,.navigation-toggle){background:#6842bd;color:#fff;border-color:#9973ec}
body[data-surface=workspace][data-workspace-space=platform] .workspace-shell .sidebar-caption{color:#cbbce6}
body[data-surface=workspace][data-workspace-space=platform] .workspace-shell .topbar{border-top:3px solid var(--accent)}
[data-surface=workspace] .workspace-shell .sidebar .navigation-toggle{background:#1e3049;color:#eaf3ff;border-color:#465c79}
body[data-surface=workspace][data-workspace-space=platform] .workspace-shell .sidebar .navigation-toggle{background:#6842bd;color:#fff;border-color:#9973ec}

/* Each bar is a measured stage, never an overall completion estimate. */
.analysis-pipeline{margin-block:16px;min-width:0;overflow-wrap:anywhere}
.pipeline-stage{display:flex;flex-wrap:wrap;gap:6px;align-items:baseline;border-left:3px solid var(--accent);padding:8px 12px;background:var(--surface-soft);border-radius:0 8px 8px 0}
.pipeline-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-block:16px}
.pipeline-metric{min-width:0;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.pipeline-metric-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px;font-size:.9rem}
.pipeline-metric-heading strong{flex-shrink:0;font-variant-numeric:tabular-nums;color:var(--ink)}
.pipeline-track{height:10px;overflow:hidden;border-radius:6px;background:var(--surface-soft);border:1px solid var(--line-strong)}
.pipeline-track>span{display:block;height:100%;background:var(--accent);border-radius:4px}
.pipeline-track.unknown{border-style:dashed;background:transparent}
.pipeline-metric small,.pipeline-secondary{color:var(--muted);font-size:.85rem}.pipeline-metric small{display:block;margin-top:8px}
@media(max-width:600px){.pipeline-grid{grid-template-columns:1fr;gap:8px}.pipeline-metric{padding:12px}.pipeline-metric-heading{flex-wrap:wrap;gap:4px 12px}}
@media(forced-colors:active){.pipeline-track>span{background:Highlight;forced-color-adjust:none}.pipeline-track{border-color:CanvasText}}
.pipeline-times{display:flex;flex-wrap:wrap;gap:6px 20px;color:var(--muted);font-size:.85rem;margin-block:12px}.pipeline-times p{margin:0}
.analysis-pipeline>p{margin-block:10px}
