:root,:root[data-theme=light]{--ui-scheme:light;--ui-bg:#f7f8f5;--ui-surface:#ffffff;--ui-surface-alt:#eef2ed;--ui-text:#20332a;--ui-muted:#596b60;--ui-line:#ced8d0;--ui-accent:#286648;--ui-accent-soft:#e3efe7;--ui-accent-contrast:#ffffff;--ui-positive:#216841;--ui-negative:#ad3f38;--ui-warning:#835c18;--ui-shadow-ink:#13251c}
/* Language and access states share the member workspace's spacing and palette. */
.ap-workspace .language-card,.ap-workspace .access-message{max-width:720px;margin:16px auto}
.ap-workspace .language-orb{display:grid;place-items:center;width:56px;height:56px;margin:20px 0;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-accent-soft);color:var(--ui-accent);font-size:20px}
.ap-workspace .language-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:28px}
.ap-workspace .language-options button{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:20px;white-space:normal;text-align:left}
.ap-workspace .language-options strong{font-size:18px}.ap-workspace .language-options small{line-height:1.6}
.ap-workspace .access-glass-mark{display:none}.ap-workspace .access-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.ap-workspace .language-card>.button{margin:8px 8px 8px 0}.ap-workspace .language-card>form:not(.language-options){margin:16px 0}
@media(max-width:520px){.ap-workspace .language-options{grid-template-columns:1fr}.ap-workspace .access-actions .button{width:100%}}
:root[data-theme=dark]{--ui-scheme:dark;--ui-bg:#121a18;--ui-surface:#1a2521;--ui-surface-alt:#24332c;--ui-text:#e8f0ea;--ui-muted:#a7baae;--ui-line:#41564a;--ui-accent:#a4dfbc;--ui-accent-soft:#263f31;--ui-accent-contrast:#14271c;--ui-positive:#91ddb0;--ui-negative:#ffaaa1;--ui-warning:#e9c686;--ui-shadow-ink:#000000}
:root[data-theme]{color-scheme:var(--ui-scheme);--ui-border:var(--ui-line);--ui-surface-soft:var(--ui-surface-alt);--bg:var(--ui-bg);--panel:var(--ui-surface);--panel2:var(--ui-surface-alt);--text:var(--ui-text);--muted:var(--ui-muted);--line:var(--ui-line);--border:var(--ui-line);--mint:var(--ui-accent);--accent:var(--ui-accent);--positive:var(--ui-positive);--negative:var(--ui-negative);--graphic-ink:var(--ui-muted);--graphic-accent:var(--ui-accent);--graphic-line:var(--ui-line)}
html[data-theme] body.ap-workspace,html[data-theme] body.admin-workspace{background:var(--ui-bg)!important;color:var(--ui-text)!important}
html[data-theme] .ap-top{background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;position:relative!important;min-height:72px;height:auto!important;padding:14px max(22px,calc((100vw - 1280px)/2))!important}
html[data-theme] .ap-top-tag,html[data-theme] .ap-context{display:none!important}
html[data-theme] .ap-brand,html[data-theme] .ap-brand span,html[data-theme] .ap-brand small{color:var(--ui-text)!important}
html[data-theme] .ap-page{margin:0!important;padding-top:0!important;width:100%!important;max-width:none!important}
html[data-theme] .ap-page main{max-width:1280px;margin:0 auto!important;padding:30px 24px 60px!important;min-width:0}
html[data-theme] .ap-top-actions{gap:10px;flex-wrap:nowrap;align-items:center}
html[data-theme] .ui-theme-switch{flex:0 0 40px!important;display:inline-grid!important;place-items:center!important;width:40px!important;height:40px!important;min-height:40px!important;padding:8px!important;border:1px solid var(--ui-line)!important;border-radius:10px!important;color:var(--ui-text)!important;background:var(--ui-surface)!important;box-shadow:none!important;transform:none!important}
.ui-theme-switch svg{width:20px;height:20px}.ui-theme-switch [data-ui-sun]{display:none}html[data-theme=dark] .ui-theme-switch [data-ui-sun]{display:block}html[data-theme=dark] .ui-theme-switch [data-ui-moon]{display:none}
.ui-member-nav{display:flex;gap:10px;align-items:center;max-width:1280px;margin:auto;padding:12px 24px;border-bottom:1px solid var(--ui-line);position:relative;z-index:35}
.ui-member-nav>a,.ui-account-menu summary{display:block;padding:10px 14px;border-radius:8px;font-size:13px;color:var(--ui-muted);text-decoration:none;white-space:nowrap;cursor:pointer}.ui-member-nav>a[aria-current]{background:var(--ui-accent-soft);color:var(--ui-accent)}
.ui-account-menu{margin:0 0 0 auto;padding:0;border:0;position:relative}.ui-account-menu summary{list-style:none;border:0;display:flex;gap:14px}.ui-account-menu summary::-webkit-details-marker{display:none}.ui-account-menu>div{position:absolute;top:48px;right:0;min-width:240px;background:var(--ui-surface);border:1px solid var(--ui-line);padding:8px;border-radius:12px;box-shadow:0 15px 40px color-mix(in srgb,var(--ui-shadow-ink) 12%,transparent)}.ui-account-menu a{display:block;padding:12px;font-size:13px;color:var(--ui-text);border-radius:6px;text-decoration:none}.ui-account-menu a:hover{background:var(--ui-accent-soft)}
html[data-theme] .ap-workspace :is(h1,h2,h3,h4,strong){color:var(--ui-text)}
html[data-theme] .ap-workspace :is(p,small,label,dt,.eyebrow,.muted,.market-label){color:var(--ui-muted)}
html[data-theme] .ap-workspace :is(.card,.mm-card,.compounding-card,.signal-tile,.signal-card,.cr-panel,.cr-stat,.messenger-shell,.chat-panel,.subscription-card,.ad-menu-panel){background:var(--ui-surface)!important;border-color:var(--ui-line)!important;box-shadow:none!important;color:var(--ui-text)!important}
html[data-theme] .ap-workspace :is(.card,.mm-card,.compounding-card){border-radius:14px!important;padding:24px!important}
html[data-theme] .ap-workspace h1{font-size:clamp(26px,3vw,38px);line-height:1.4;letter-spacing:-.6px}
html[data-theme] .ap-workspace :is(button,.button):not(.rvp-play,.rvp-back,.rvp-speed){background:var(--ui-accent);color:var(--ui-accent-contrast);border-color:var(--ui-accent);border-radius:9px;min-height:42px;font-size:13px;box-shadow:none}
html[data-theme] .ap-workspace :is(button,.button) :is(small,strong,span){color:inherit}
html[data-theme] .ap-workspace :is(.quiet,.text-button,.ap-inbox-button){background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html[data-theme] .ap-workspace .danger{background:color-mix(in srgb,var(--ui-negative) 12%,var(--ui-surface))!important;color:var(--ui-negative)!important;border-color:var(--ui-negative)!important}
html[data-theme] .ap-workspace :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]){background:var(--ui-surface)!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important;border-radius:8px;min-height:42px}
html[data-theme] .ap-workspace :is(input,textarea)::placeholder{color:var(--ui-muted)!important;opacity:1}
html[data-theme] .ap-workspace :is(input[type=checkbox],input[type=radio],input[type=range],progress){accent-color:var(--ui-accent)}
html[data-theme] :focus-visible{outline:2px solid var(--ui-accent)!important;outline-offset:4px}
html[data-theme] .ap-workspace :is(th,td){border-color:var(--ui-line)!important;color:var(--ui-text)!important}html[data-theme] .ap-workspace th{background:var(--ui-surface-alt)!important}html[data-theme] .ap-workspace td{background:var(--ui-surface)!important}
html[data-theme] .ap-workspace .notice{color:var(--ui-text);background:var(--ui-accent-soft);border-color:var(--ui-line)}
html[data-theme] .ap-workspace :is(.chat-bubble,.chat-bubble p,.chat-bubble strong){color:var(--ui-text)!important}html[data-theme] .ap-workspace .chat-bubble{background:var(--ui-surface-alt)!important}html[data-theme] .ap-workspace .chat-bubble.chat-own{background:var(--ui-accent-soft)!important}
html[data-theme] .ap-workspace :is(.chat-tabs a[aria-current],.chat-contact.is-active){background:var(--ui-accent-soft)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html[data-theme] .ap-footer{max-width:1232px;margin:auto;padding:24px;color:var(--ui-muted);border-color:var(--ui-line)}
html[data-theme] .cr{--cr-line:var(--ui-line);--cr-muted:var(--ui-muted);--cr-ink:var(--ui-text);--cr-accent:var(--ui-accent)}
html[data-theme] .cr-hero{background:var(--ui-accent-soft);border-color:var(--ui-line)}html[data-theme] .cr-process span{background:var(--ui-surface-alt);color:var(--ui-text)}html[data-theme] .cr-process b{color:var(--ui-accent)}html[data-theme] .cr-nav a{background:var(--ui-surface);color:var(--ui-muted)}html[data-theme] .cr-nav a[aria-current=page]{background:var(--ui-accent-soft);color:var(--ui-accent)}
html[data-theme] .ad-nav :is(a,summary){color:var(--ui-muted)!important}html[data-theme] .ad-menu-panel strong{color:var(--ui-text)!important}html[data-theme] .ad-menu-panel a:hover{background:var(--ui-accent-soft)!important}
html[data-theme] .ap-workspace .result-win,html[data-theme] .ap-workspace .result-profit{background:color-mix(in srgb,var(--ui-positive) 12%,var(--ui-surface))!important;border-color:var(--ui-positive)!important}html[data-theme] .ap-workspace .result-win strong{color:var(--ui-positive)!important}
html[data-theme] .ap-workspace .result-loss{background:color-mix(in srgb,var(--ui-negative) 10%,var(--ui-surface))!important;border-color:var(--ui-negative)!important}html[data-theme] .ap-workspace .result-loss strong{color:var(--ui-negative)!important}
html[data-theme] .ap-workspace :is(.result-refund,.result-avoid){background:var(--ui-surface-alt)!important}html[data-theme] .ap-workspace :is(.result-refund,.result-avoid) strong{color:var(--ui-warning)!important}
/* Signal studio: palette only; every animation, path, timing and stage stays original. */
html[data-theme] .ap-workspace .rg-studio{--jade:var(--ui-accent);background:var(--ui-surface)!important;border-color:var(--ui-line)!important;color:var(--ui-text)}
html[data-theme] .rg-studio :is(.studio-rail,.studio-side,.studio-bottom){background:var(--ui-surface-alt);border-color:var(--ui-line);color:var(--ui-muted)}
html[data-theme] .rg-studio :is(.studio-header,.studio-rail li,.studio-focus>span,.studio-focus small,.asset-tape,.studio-chart-heading span,.studio-side li,.studio-side dt,.studio-note,.studio-bottom,.studio-readout small,.studio-readout p,.studio-final>small){color:var(--ui-muted)!important}
html[data-theme] .rg-studio :is(.studio-rail .active,.studio-focus>strong,.asset-tape .chosen,.studio-chart-heading strong,.studio-readout h3,.studio-side dd,.studio-final h3,.finalizer-rings strong,.studio-readout>span){color:var(--ui-text)!important}
html[data-theme] .studio-models>span{border-color:var(--ui-line);color:var(--ui-text)}html[data-theme] .studio-models :is(b){color:var(--ui-text)!important}html[data-theme=light] .studio-models [data-model=ChatGPT] img{filter:none}html[data-theme=dark] .studio-models [data-model=ChatGPT] img{filter:invert(1)}
html[data-theme] .signal-tile :is(.tile-timing time,.tile-timing strong,.tile-symbol){color:var(--ui-accent)}html[data-theme] .signal-tile.direction-put :is(.tile-timing strong,.tile-symbol){color:var(--ui-negative)}html[data-theme] .signal-tile :is(.market-label,.tile-footer,.result-banner span){color:var(--ui-muted)}
html[data-theme=dark] .ap-engine video{filter:none;opacity:.35}
/* Public page: hero dimensions and motion untouched. */
html[data-theme] .ui-home{background:var(--ui-bg);color:var(--ui-text)}html[data-theme] .ui-home>header{background:var(--ui-bg);border-color:var(--ui-line)}html[data-theme] .ui-home :is(.brand,.header-actions a,header nav a){color:var(--ui-text)}
html[data-theme] .ui-home .home-tool-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
html[data-theme] .ui-home .home-tool-links a,html[data-theme] .ui-home .rf-feedback>a,html[data-theme] .ui-home .home-feedback-empty>a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 16px;border:1px solid var(--ui-line)!important;border-radius:9px;background:var(--ui-surface);color:var(--ui-text);font-size:13px;font-weight:500;text-decoration:none!important;line-height:1.5}
html[data-theme] .ui-home .tool-card-actions a:first-child{background:var(--ui-accent);color:var(--ui-accent-contrast);border-color:var(--ui-accent)!important}
html[data-theme] .ui-home :is(.tool-card,.reason-grid article,.rf-feedback,.home-feedback-empty,.plans article,.calculator,.result-sample,dialog){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] .ui-home :is(.tool-card p,.tool-card small,.reason-grid p,.section-heading p,.split-heading p,.rf-feedback p,.rf-feedback small,.membership p,.faq p){color:var(--ui-muted)}
html[data-theme] .ui-home :is(input,select){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=dark] .ui-home :is(.compound-card,.community-art){background:#332a23;color:#efc5a8}html[data-theme=dark] .ui-home .compound-card :is(h3,p,small,span){color:#efc5a8}
html[data-theme=dark] .ui-home :is(.artifact,.artifact-core,.models button,.process-tabs button){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme=dark] .ui-home :is(.artifact p,.artifact small,.check-line,.hero-intro,.process-caption p,.process-tabs button,.core-caption,.stage-bottom-note){color:var(--ui-muted)}
html[data-theme=dark] .ui-home .hero :is(em,h1,h3){color:var(--ui-text)}html[data-theme=dark] .ui-home :is(.hero canvas,.hero .connections){filter:brightness(1.55)}
html[data-theme] .ui-home .button:not(.ghost){background:var(--ui-accent);color:var(--ui-accent-contrast);border-color:var(--ui-accent)}html[data-theme] .ui-home .button.ghost{color:var(--ui-text);border-color:var(--ui-line);background:var(--ui-surface)}
@media(max-width:800px){html[data-theme] .ap-top{padding:12px 16px!important}.ap-top .ap-brand img{width:28px;height:28px}.ap-top .ap-brand small{display:none}html[data-theme] .ap-top-actions{gap:7px}.ap-top .ap-inbox-label{display:none}html[data-theme] .ap-top .ap-logout{padding:9px 12px;font-size:11px!important}.ui-member-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 16px;gap:5px}.ui-member-nav>a{padding:10px;font-size:12px}.ui-account-menu{grid-column:1/-1;margin:0}.ui-account-menu summary{padding:8px 10px;font-size:12px}.ui-account-menu>div{left:0;right:0;top:40px;min-width:0}html[data-theme] .ap-page main{padding:24px 16px 40px!important}html[data-theme] .ap-workspace :is(.card,.mm-card){padding:18px!important}html[data-theme] .ui-home>header{padding:16px!important;gap:12px}.ui-home .header-actions{gap:7px}.ui-home .brand small{font-size:6px}.ui-home .home-logout{display:none}.ui-home header nav{background:var(--ui-surface)}.ui-home .home-tool-links a{flex:1;min-width:140px;text-align:center}}
@media(prefers-reduced-motion:reduce){.ui-member-nav *{transition:none!important}}

html[data-theme] .ap-workspace :is(button,.button):disabled{background:var(--ui-surface-alt)!important;color:var(--ui-muted)!important;border-color:var(--ui-line)!important;cursor:not-allowed;opacity:.65}
html[data-theme] .ui-home .indicator-row span{background:var(--ui-surface-alt);color:var(--ui-text)}
html[data-theme] :is(.ad-analytics,.admin-workspace .ac-group){background:var(--ui-surface)!important}
html[data-theme] .mm-results input[value=loss]:checked+span{color:var(--ui-negative)!important;border-color:var(--ui-negative)!important;background:color-mix(in srgb,var(--ui-negative) 10%,var(--ui-surface))!important}
html[data-theme] :is(.chart-scan,.studio-progress i){background:var(--ui-accent)!important}

html[data-theme] .ap-workspace .page-heading{margin:0 0 26px!important;padding:0!important;min-height:0;gap:20px}
html[data-theme] .ap-workspace .page-heading h1{margin:8px 0!important;font-size:32px!important;line-height:1.35!important}
html[data-theme] .ap-workspace .page-heading .eyebrow{font-size:10px;letter-spacing:1.2px}
html[data-theme] .feedback-gallery-header{padding:0!important;margin:0 0 28px!important}
html[data-theme] .feedback-gallery-header h1{font-size:32px!important;line-height:1.4!important;margin:12px 0!important}
html[data-theme] .feedback-invitation{display:flex;justify-content:space-between;align-items:center;gap:24px}
html[data-theme] .feedback-invitation p{max-width:620px;font-size:14px;line-height:1.8}
html[data-theme] .rg-feedback-grid article>a{display:inline-flex;align-items:center;min-height:42px;padding:10px 16px;margin-top:12px;border:1px solid var(--ui-line)!important;border-radius:9px;text-decoration:none!important;background:var(--ui-surface-alt)!important;color:var(--ui-text)!important;font-size:13px!important}
html[data-theme] .ui-compounding .journey-hero{padding:28px!important;margin:0 0 26px!important;min-height:0!important;grid-template-columns:minmax(0,1fr) minmax(150px,340px)}
html[data-theme] .ui-compounding .journey-hero h1{font-size:32px!important;margin:10px 0!important}
html[data-theme] .ui-compounding .journey-hero p{max-width:620px}
html[data-theme] .ui-compounding .journey-art{max-height:160px}
@media(max-width:700px){html[data-theme] .feedback-invitation{display:block}html[data-theme] .ap-workspace .page-heading{align-items:flex-start;flex-direction:column}html[data-theme] .ap-workspace .page-heading h1,html[data-theme] .feedback-gallery-header h1{font-size:26px!important}html[data-theme] .ui-compounding .journey-hero{display:block}html[data-theme] .ui-compounding .journey-hero>svg{display:none}}

html[data-theme] .ap-workspace .rg-voice-player .rvp-play{width:50px;height:50px;padding:0!important;border-radius:50%!important;background:var(--voice-accent)!important;color:var(--voice-on-accent)!important;border-color:var(--voice-accent)!important}
html[data-theme] .ap-workspace .rg-voice-player :is(.rvp-back,.rvp-speed){min-height:44px;background:transparent!important;color:var(--voice-text)!important;border:1px solid transparent!important;padding:0 7px!important;font-size:11px!important}
html[data-theme] .ap-workspace .rg-voice-player :is(.rvp-back,.rvp-speed):hover{background:var(--voice-soft)!important;border-color:var(--voice-line)!important}
@media(max-width:750px){html[data-theme] .ad-nav{gap:0;flex-wrap:wrap}html[data-theme] .ad-nav :is(a,summary){padding-left:8px!important;padding-right:8px!important}}

:root[data-theme=light]{--ui-control-line:#819487}
:root[data-theme=dark]{--ui-control-line:#718d7b}
html[data-theme] .ap-workspace :is(input,select,textarea):not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]){border-color:var(--ui-control-line)!important}
html[data-theme] .ui-home .balance-field{border-color:var(--ui-control-line)}
html[data-theme] .ap-workspace :is(.rvp-back,.rvp-speed,.ui-theme-switch){min-height:44px!important}
html[data-theme] .ui-home #community p{color:var(--ui-muted)} html[data-theme] .ap-workspace .member-dash .md-disable{background:transparent!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}

/* Shared state and control geometry: hidden content must never occupy a grid row. */
html [hidden]:not([hidden="until-found"]){display:none!important}
html[data-theme] .ap-workspace :is(input,select,textarea,button,.button){box-sizing:border-box}
html[data-theme] .ap-workspace :is(label,dt){line-height:1.6}
html[data-theme] .ap-workspace .button{display:inline-flex;align-items:center;justify-content:center;gap:9px;line-height:1.5;text-align:center}
html[data-theme] .ap-workspace :is(input,select,textarea){max-width:100%;min-width:0}
html[data-theme] .ap-workspace :is(.notice,.empty-state){overflow-wrap:anywhere}
html[data-theme] .ap-workspace .notice.error{background:color-mix(in srgb,var(--ui-negative) 10%,var(--ui-surface));border-color:var(--ui-negative);color:var(--ui-negative)}
html[data-theme] .ap-workspace .notice.error p{color:inherit}
html[data-theme] .ap-workspace progress{appearance:none;overflow:hidden;border:0;border-radius:99px;background:var(--ui-surface-alt);height:8px}
html[data-theme] .ap-workspace progress::-webkit-progress-bar{background:var(--ui-surface-alt);border-radius:99px}
html[data-theme] .ap-workspace progress::-webkit-progress-value{background:var(--ui-accent);border-radius:99px}
html[data-theme] .ap-workspace progress::-moz-progress-bar{background:var(--ui-accent);border-radius:99px}
@media(max-width:600px){html[data-theme] .ap-top-actions{min-width:0}html[data-theme] .ap-top-actions>a.button{font-size:11px;padding:8px 10px}html[data-theme] .ap-top-actions>a:not(.button,.ap-inbox-button){display:none}}

/* Keep inbox backgrounds and supporting text on the same semantic palette. */
html[data-theme] .messenger-shell{--chat-bg:var(--ui-surface);--chat-panel:var(--ui-surface-alt);--chat-line:var(--ui-line);--chat-muted:var(--ui-muted)}
html[data-theme] .messenger-shell .chat-list-panel{background:var(--ui-surface-alt);border-color:var(--ui-line)}
html[data-theme] .messenger-shell :is(.chat-room-heading,.chat-composer,.chat-tabs){background:var(--ui-surface-alt);border-color:var(--ui-line)}
html[data-theme] .messenger-shell :is(.chat-empty-list,.chat-list-heading .eyebrow){color:var(--ui-muted)!important}
html[data-theme] .ui-home :is(.hero-intro,.stage-meta,.core-caption small,.process-tabs button,.process-caption p,.home-feedback-empty p){color:var(--ui-muted)}
html[data-theme=light] .ui-home :is(.artifact-header,.artifact-header span,.signal-footer,.signal-footer b){color:var(--ui-muted)}
/* A printed journal stays neutral regardless of the saved screen theme. */
@media print{
 html[data-theme]{color-scheme:light;--ui-bg:#fff;--ui-surface:#fff;--ui-surface-alt:#f3f3f3;--ui-text:#111;--ui-muted:#333;--ui-line:#bbb;--ui-accent:#111;--ui-accent-contrast:#fff}
 html[data-theme] body.ap-workspace,html[data-theme] .ap-workspace :is(main,.ap-page,.card,.mm-card){background:#fff!important;color:#111!important;box-shadow:none!important}
 html[data-theme] .ap-workspace :is(.ap-top,.ui-member-nav,.ad-nav,.ap-footer,.hub-notifications){display:none!important}
 html[data-theme] .ap-workspace :is(h1,h2,h3,p,small,label,td,th){color:#111!important}
 html[data-theme] .ap-page main{padding:0!important;max-width:none}
}
