/* Shared semantic surfaces. Loaded last to replace historical literal colours. */
html body.warm-modern[data-theme]{
 --ap-bg:#e8e2d8;--ap-card:#f8f4ed;--ap-input:#fffdf9;--ap-ink:#342d25;--ap-muted:#675b4c;
 --ap-button:#76543c;--ap-button-ink:#fff;--ap-secondary:#e9dfd1;--ap-line:#b7a793;
 --ap-sidebar:#6d533e;--ap-side-ink:#fff8ed;--ap-side-active:#443629;--ap-accent:#825733;
 --ap-link:#76451d;--ap-danger:#a02724;--ap-good:#276534;--ap-radius:14px;
 --warm-text:var(--ap-ink);--psk-paper:var(--ap-card)!important;--psk-button:var(--ap-secondary)!important;
 background:var(--ap-bg)!important;color:var(--ap-ink)!important;color-scheme:light;
}
html body.warm-modern[data-theme=olive]{--ap-bg:#e4e7da;--ap-card:#f6f7ef;--ap-input:#fdfef8;--ap-ink:#2c3526;--ap-muted:#536047;--ap-button:#536538;--ap-secondary:#e0e6d3;--ap-line:#9aa889;--ap-sidebar:#3e4d32;--ap-side-ink:#f5f9e9;--ap-side-active:#25331b;--ap-accent:#607637;--ap-link:#3e5b21;--ap-radius:12px}
html body.warm-modern[data-theme=light]{--ap-bg:#eef1f5;--ap-card:#fff;--ap-input:#fff;--ap-ink:#23303c;--ap-muted:#516172;--ap-button:#345d82;--ap-secondary:#e5edf5;--ap-line:#a4b3c2;--ap-sidebar:#fafbfe;--ap-side-ink:#293c50;--ap-side-active:#dce8f4;--ap-accent:#345d82;--ap-link:#235782;--ap-radius:12px}
html body.warm-modern[data-theme=graphite]{--ap-bg:#1e2227;--ap-card:#2a3037;--ap-input:#21272e;--ap-ink:#f2f4f7;--ap-muted:#c0cad5;--ap-button:#bed1e4;--ap-button-ink:#17232f;--ap-secondary:#394450;--ap-line:#718092;--ap-sidebar:#191e24;--ap-side-ink:#e7edf5;--ap-side-active:#354554;--ap-accent:#a7c9e9;--ap-link:#b4dcff;--ap-danger:#ffaba7;--ap-good:#9dd9ae;--ap-radius:10px;color-scheme:dark}
html body.warm-modern[data-theme=architecture]{--ap-bg:#dce1e5;--ap-card:#fff;--ap-input:#fff;--ap-ink:#223444;--ap-muted:#4b6071;--ap-button:#28617e;--ap-secondary:#e7eef3;--ap-line:#97a9b7;--ap-sidebar:#edf1f4;--ap-side-ink:#203747;--ap-side-active:#cbdfea;--ap-accent:#28617e;--ap-link:#205c7d;--ap-radius:3px}
html body.warm-modern[data-theme=engineering]{--ap-bg:#d8dee6;--ap-card:#f8fafc;--ap-input:#fff;--ap-ink:#203147;--ap-muted:#485c73;--ap-button:#245f9e;--ap-secondary:#e2eaf4;--ap-line:#95a7bc;--ap-sidebar:#e6eaf0;--ap-side-ink:#203147;--ap-side-active:#c5d9f0;--ap-accent:#245f9e;--ap-link:#1e578f;--ap-radius:2px}

/* Flat lettering everywhere, including legacy engraved navigation. */
html body.warm-modern[data-theme] *,html body.warm-modern[data-theme] *::before,html body.warm-modern[data-theme] *::after{text-shadow:none!important;-webkit-text-stroke:0!important}
html body.warm-modern[data-theme][data-relief] :is(#nav,#view,#composer,main,aside,dialog) *{text-shadow:none!important}
html body.warm-modern[data-theme] :is(.card,.bubble,.message,.chat-scroll,.composer,#composer,dialog,.work-dialog,.finance-editor,.login,.alice-dock,.ai-review,.proposal,.read-mail,.mail-draft,.psk-context-menu,.project-engineer-feed article,.project-engineer-compose,.cc-card,.vz-panel,.survey-panel,.capture-panel){background:var(--ap-card)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important;border-radius:var(--ap-radius)!important;box-shadow:none!important}
html body.warm-modern[data-theme] #view :is(.chat-scroll,.bubble.assistant,.bubble.user,.composer,.composer textarea){background:var(--ap-card)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important}
html body.warm-modern[data-theme] #view .bubble.user{background:var(--ap-secondary)!important}
html body.warm-modern[data-theme] :is(.message-body,.markdown-body,.project-message,.bubble)>*{color:inherit}
html body.warm-modern[data-theme] :is(h1,h2,h3,h4,.warm-account,.project-folder-title){color:var(--ap-ink)!important}
html body.warm-modern[data-theme] :is(.muted,.hint,.help,.warm-account small,.warm-context small,.bubble .role,.bubble .label,header small,.project-folder-properties,#connection){color:var(--ap-muted)!important}
html body.warm-modern[data-theme] :is(.hint,.badge,code,pre,blockquote,th,.cabinet-folder,.warm-project-preview,.send-status,.unified-file,.warm-empty){background:var(--ap-secondary)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important}
html body.warm-modern[data-theme] :is(table,td,th,hr,.warm-update,.cabinet-tabs,.chat-toolbar){border-color:var(--ap-line)!important}
html body.warm-modern[data-theme] :is(input,textarea,select){background:var(--ap-input)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important;border-radius:calc(var(--ap-radius) / 2)!important;caret-color:var(--ap-ink);accent-color:var(--ap-accent)}
html body.warm-modern[data-theme] :is(input,textarea)::placeholder{color:var(--ap-muted)!important;opacity:1}
html body.warm-modern[data-theme] :is(button,.fileLabel){background:var(--ap-button)!important;color:var(--ap-button-ink)!important;border-color:var(--ap-line)!important;border-radius:calc(var(--ap-radius) / 2)!important;box-shadow:none!important;font-weight:600}
html body.warm-modern[data-theme] :is(button,.fileLabel) :is(span,strong,small){color:inherit!important}
html body.warm-modern[data-theme] :is(button.secondary,button.active,button[aria-selected=true],button[aria-pressed=true],.shortcuts>button,.chat-toolbar>button,.page-tools>button,.cabinet-tabs>button,.copy-message,.psk-context-menu button){background:var(--ap-secondary)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important}
html body.warm-modern[data-theme] button:hover{filter:brightness(.97);outline-color:var(--ap-accent)}
html body.warm-modern[data-theme] button[aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--ap-accent)!important}
html body.warm-modern[data-theme] :is(button.danger,button.destructive){background:var(--ap-card)!important;color:var(--ap-danger)!important;border-color:var(--ap-danger)!important}
html body.warm-modern[data-theme] :is(.offline,.norm-error,.cabinet-error,#editError,[role=alert]){color:var(--ap-danger)!important}
html body.warm-modern[data-theme] #notice:not(:empty){background:var(--ap-secondary)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important}
html body.warm-modern[data-theme] a{color:var(--ap-link)!important;text-decoration:underline;text-underline-offset:3px}
html body.warm-modern[data-theme] #quickForm,html body.warm-modern[data-theme] :is(.mobile-topbar,.compact-sidebar-bar,.warm-account){background:var(--ap-bg)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important}
html body.warm-modern[data-theme] #quickForm input{background:var(--ap-input)!important}
html body.warm-modern[data-theme] >aside{background:var(--ap-sidebar)!important;background-image:none!important;color:var(--ap-side-ink)!important;border-right:1px solid var(--ap-line)!important}
html body.warm-modern[data-theme] aside :is(.company-brand strong,.company-brand strong span,.company-engraving,.company-engraving span,.company-engraving strong,.company-engraving small){color:var(--ap-side-ink)!important}
html body.warm-modern[data-theme] aside #nav button,html body.warm-modern[data-theme] aside #nav button .nav-label{background:transparent!important;color:var(--ap-side-ink)!important}
html body.warm-modern[data-theme] aside #nav :is(button.active,button:hover){background:var(--ap-side-active)!important;color:var(--ap-side-ink)!important}
html body.warm-modern[data-theme] aside #nav button.active::before{background:var(--ap-side-ink)!important}
html body.warm-modern[data-theme] aside .personal-logo img{filter:none!important}
html body.warm-modern[data-theme] :is(.nav-symbol,.nav-icon){color:inherit!important;filter:none!important}
html body.warm-modern[data-theme] aside #nav button :is(.nav-symbol,.nav-icon){color:var(--ap-side-ink)!important;filter:none!important}
html body.warm-modern[data-theme] :is(.cp-controls,.cp-settings,.cp-brief,.cp-welcome,.vz-controls,.vz-settings,.vz-history,.survey-controls,.capture-controls,.norm-search,.access-panel){background:var(--ap-card)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important;border-radius:var(--ap-radius)!important}
html body.warm-modern[data-theme] :is(.project-folder-open,.project-cover-open,.cabinet-folder){background:var(--ap-card)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important;border-radius:var(--ap-radius)!important}
html body.warm-modern[data-theme] :is(.project-folder-open,.project-cover-open) :is(strong,.project-folder-name){color:var(--ap-ink)!important}
html body.warm-modern[data-theme] :is(.project-folder-open,.project-cover-open) :is(small,.muted){color:var(--ap-muted)!important}
html body.warm-modern[data-theme] .project-folder-open .plain-folder,html body.warm-modern[data-theme] .project-folder-open .plain-folder::before{background:var(--ap-secondary)!important;border-color:var(--ap-line)!important}
/* Printed sheets keep their own paper and artwork; the surrounding tools follow the theme. */
html body.warm-modern[data-theme] .cp-slide{color:#242424!important}
html body.warm-modern[data-theme] .cp-slide :is(h1,h2,h3,p,small,strong,span){color:inherit!important}
html body.warm-modern[data-theme] :is(#nav,#view,.context-rail,.chat-scroll,dialog){scrollbar-color:var(--ap-line) var(--ap-bg)}
html body.warm-modern[data-theme] :is(button,input,textarea,select,a,[tabindex]):focus-visible{outline:3px solid var(--ap-accent)!important;outline-offset:3px!important}
html body.warm-modern[data-theme] ::selection{background:var(--ap-button);color:var(--ap-button-ink)}

/* CAD-inspired geometry across the shell, forms, cards, and tool panels. */
html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]){font-family:'Segoe UI',Arial,sans-serif!important}
html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) :is(.card,dialog,.cabinet-inline,.composer,.command-bar,.warm-project-tile,.project-folder-tile){border:1px solid var(--ap-line)!important;box-shadow:none!important}
html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) .card>h2{padding-bottom:10px;border-bottom:2px solid var(--ap-accent);letter-spacing:.015em}
html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) :is(.cabinet-tabs,.chat-toolbar,.page-tools){background:var(--ap-secondary)!important;padding:8px!important;gap:4px;border:1px solid var(--ap-line)}
html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) .nav-icon{stroke-width:1.5!important;stroke-linejoin:miter!important;stroke-linecap:square!important;width:21px!important;height:21px!important}
html body.warm-modern[data-theme=engineering] .nav-symbol{border-left:2px solid var(--ap-accent)!important;padding-left:3px}
html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) aside #nav button{border-radius:2px!important}
@media(pointer:fine){
 html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) #view{cursor:crosshair}
 html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) :is(button,a,summary,label.fileLabel){cursor:pointer}
 html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) :is(input,textarea,[contenteditable=true]){cursor:text}
 html body.warm-modern:is([data-theme=architecture],[data-theme=engineering]) :is(select,input[type=checkbox],input[type=radio]){cursor:default}
}

/* Accessible theme picker: immediate preview, explicit save/cancel. */
.theme-chooser{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 20px}
html body.warm-modern[data-theme] .theme-chooser .theme-choice{display:grid;grid-template-columns:36px minmax(0,1fr);gap:4px 10px;text-align:left;align-items:center;margin:0!important;padding:12px!important;width:100%;min-width:0;white-space:normal;background:var(--ap-card)!important;color:var(--ap-ink)!important;border:1px solid var(--ap-line)!important}
.theme-choice strong{font-size:14px}.theme-choice small{grid-column:2;font-size:12px;line-height:1.4;font-weight:400}
.theme-swatch{grid-row:1/3;display:block;width:34px;height:42px;border:1px solid var(--ap-line);border-radius:4px;background:linear-gradient(90deg,#6d533e 33%,#f8f4ed 33%)}
[data-theme-choice=olive] .theme-swatch{background:linear-gradient(90deg,#3e4d32 33%,#e4e7da 33%)}
[data-theme-choice=graphite] .theme-swatch{background:linear-gradient(90deg,#191e24 33%,#394450 33%)}
[data-theme-choice=light] .theme-swatch{background:linear-gradient(90deg,#dce8f4 33%,#fff 33%)}
[data-theme-choice=architecture] .theme-swatch{border-radius:0;background:repeating-linear-gradient(0deg,transparent 0 8px,#a5bccb 8px 9px),repeating-linear-gradient(90deg,#fff 0 8px,#a5bccb 8px 9px)}
[data-theme-choice=engineering] .theme-swatch{border-radius:0;background:linear-gradient(0deg,#e2eaf4 70%,#245f9e 70%)}
@media(max-width:650px){.theme-chooser{grid-template-columns:1fr}}

/* Low-vision mode is independent of the selected style. */
html body.warm-modern[data-accessibility=light]{--ap-bg:#fff;--ap-card:#fff;--ap-input:#fff;--ap-ink:#111;--ap-muted:#222;--ap-button:#111;--ap-button-ink:#fff;--ap-secondary:#e8e8e8;--ap-line:#222;--ap-sidebar:#fff;--ap-side-ink:#111;--ap-side-active:#ddd;--ap-accent:#111;--ap-link:#003d99;--ap-danger:#8c0011;--ap-good:#005719;color-scheme:light}
html body.warm-modern[data-accessibility=dark]{--ap-bg:#000;--ap-card:#111;--ap-input:#000;--ap-ink:#fff;--ap-muted:#eee;--ap-button:#ffe878;--ap-button-ink:#000;--ap-secondary:#242424;--ap-line:#eee;--ap-sidebar:#000;--ap-side-ink:#fff;--ap-side-active:#303030;--ap-accent:#ffe878;--ap-link:#b9deff;--ap-danger:#ffb6b6;--ap-good:#a5edb8;color-scheme:dark}
html body.warm-modern[data-size=extra] :is(p,label,input,textarea,select,button,.message-body){font-size:20px!important;line-height:1.6!important}
html body.warm-modern[data-size=extra] :is(small,.nav-label){font-size:17px!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) :is(p,label,input,textarea,select,button,.message-body,li,td,th){font-size:20px!important;line-height:1.65!important;letter-spacing:.02em}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark])[data-size=extra] :is(p,label,input,textarea,select,button,.message-body,li,td,th){font-size:24px!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) :is(small,.nav-label,.role){font-size:18px!important;line-height:1.5!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) :is(h1,h2,h3){line-height:1.35!important;overflow-wrap:anywhere}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) :is(button,input,select,.fileLabel){min-height:48px!important;height:auto!important;white-space:normal!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) :is(.card,dialog,input,textarea,select){border-width:2px!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) :is(#view,canvas){cursor:auto!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) .warm-settings-grid{grid-template-columns:1fr}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) .warm-account{position:static!important;width:auto!important;max-width:none!important;flex-wrap:wrap!important}
html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]) main>header{min-height:100px!important;height:auto!important;flex-wrap:wrap;gap:12px}
@media(min-width:1051px){html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark]){--warm-side:290px}html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark])>main{grid-template-rows:auto auto auto minmax(0,1fr)!important}html body.warm-modern:is([data-accessibility=light],[data-accessibility=dark])[data-screen=chats]>main{grid-template-rows:auto auto minmax(0,1fr)!important}}
@media(forced-colors:active){html body.warm-modern[data-theme]{--ap-bg:Canvas;--ap-card:Canvas;--ap-input:Canvas;--ap-ink:CanvasText;--ap-muted:CanvasText;--ap-button:ButtonFace;--ap-button-ink:ButtonText;--ap-secondary:Canvas;--ap-line:ButtonText;--ap-sidebar:Canvas;--ap-side-ink:CanvasText;--ap-side-active:Canvas;--ap-accent:Highlight;--ap-link:LinkText;--ap-danger:CanvasText;--ap-good:CanvasText}}

html body.warm-modern[data-theme] #quickForm button{background:var(--ap-secondary)!important;color:var(--ap-ink)!important;border-color:var(--ap-line)!important}
