/* Shared appearance for the landing, viewer, accounts and format guide. */
:root{color-scheme:light;--accent:#c52238;--accent-text:#ab1830;--accent-soft:#fbe8ec;--accent-border:#dc9aa6;--surface:#fff;--surface-raised:#f5f5f6;--ink:#202026;--line:#dddde0;--muted:#686871;--ruler:#c6c6ca;--glass:#fffffff2;--drawing:#e8e9e4;--drawing-line:#9ba4ad}
:root[data-theme=dark]{color-scheme:dark;--accent:#ed627c;--accent-text:#ff99ad;--accent-soft:#3b1c28;--accent-border:#914253;--surface:#18171d;--surface-raised:#211d25;--ink:#ededf1;--line:#3c3540;--muted:#b6b0be;--ruler:#645360;--glass:#19171ef2;--drawing:#37343e;--drawing-line:#9b91a6;--shadow:0 14px 42px #00000035;--lp-line:var(--line);--lp-muted:var(--muted)}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:38px;height:38px;min-height:38px;padding:8px;border:1px solid var(--line);border-radius:0;background:var(--surface);color:var(--ink);cursor:pointer}
.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .theme-sun{display:none}[data-theme=dark] .theme-toggle .theme-moon{display:none}[data-theme=dark] .theme-toggle .theme-sun{display:block}
.theme-toggle:hover{color:var(--accent-text);border-color:var(--accent)}
.lp-language{display:flex;align-items:center;gap:8px}.guide-controls{display:flex;align-items:center;gap:8px}
button.active,button[aria-pressed=true],.icon-button.active,.part-row.active,.demo-mode .part-row.active,.demo-mode .icon-button.active,.inside-button.active,.demo-mode .inside-button.active{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-border);box-shadow:none}
.part-row.active .part-number{border-color:var(--accent-border);background:var(--accent-soft);color:var(--accent-text)}
.view-controls button[aria-pressed=true],.view-controls button.active{color:var(--accent-text)}
.text-button:hover,.explode-control>svg,.explode-control output,.welcome-symbol{color:var(--accent-text)}
.measure-label,.warning-intro{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-border)}
.badge,.status-dot{background:var(--accent)}.spinner{border-top-color:var(--accent)}
.holes-table tr:hover td{background:var(--accent-soft)}
.drilling-drawing svg path{fill:var(--drawing);stroke:var(--drawing-line)}
.drilling-drawing svg text{fill:var(--muted)}
.lp-demo-heading button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-border)}
.lp-demo-heading .theme-toggle{width:38px}
.theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
[data-theme=dark]{background:#101014;color:var(--ink)}
[data-theme=dark] body{background:#101014;color:var(--ink)}
[data-theme=dark] .lp{--lp-line:var(--line);--lp-muted:var(--muted);color:var(--ink);background-color:#101014;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath fill='%23d9c8d3' fill-opacity='.11' d='M1 1h1.5v1.5H1z'/%3E%3C/svg%3E"),radial-gradient(ellipse at 90% 0%,#37192566,transparent 48%)}
[data-theme=dark] img[data-theme-logo]:not([src*="-dark.svg"]){visibility:hidden}
[data-theme=dark] :is(.lp h1 em,.lp h2 em,.lp-why h2 em,.lp-search input,.lp-footer .lp-brand,.lp-demo-foot #demoNext,.lp-account-tabs button[aria-pressed=true],.lp-password-field button[aria-pressed=true]){color:var(--ink)}
[data-theme=dark] :is(.lp-intro,.lp-hero-note,.lp-local,.lp-kicker small,.lp-promise,.lp-format-main small,.lp-format-arrow,.lp-format-status,.lp-upload-info>p:not(.lp-kicker),.lp-upload-action>span,.lp-upload-action>small,.lp-upload-status,.lp-text-link,.lp-preview-info p:not(.lp-kicker),.lp-preview-term span,.lp-use-grid p,.lp-use-grid small,.lp-use-grid article>span,.lp-scope-note,.lp-why>div>p:not(.lp-kicker),.lp-reasons p,.lp-faq details p,.lp-footer,.lp-account-copy>p:not(.lp-kicker),.lp-account-status,.lp-account-note,.lp-account-panel label,.lp-password-field button,.lp-drawing-note,.lp-section-marker,.lp-section-head .lp-kicker,.lp-faq .lp-kicker,.lp-demo-tag,.lp-demo-heading>span,.lp-demo-foot,.lp-ruler,.lp-stage-coordinate){color:var(--muted)}
[data-theme=dark] :is(.lp-upload-info .lp-limit,.lp-preview-info .lp-demo-disclaimer){color:var(--muted)!important}
[data-theme=dark] :is(.lp-search,.lp-format,.lp-preview,.lp-account-panel,.guide-cards article){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.lp-format-code,.lp-upload,.lp-guide,.lp-preview-picture,.lp-preview-info .lp-demo-disclaimer,.lp-why,.lp-account-panel input,.lp-account-panel select,.lp-password-field){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.lp-format:hover,.lp-account-panel button:hover:not(.lp-cta)){background:var(--accent-soft)!important;color:var(--ink);border-color:var(--accent-border)}
[data-theme=dark] .lp-format[aria-pressed=true]{background:var(--accent-soft);color:var(--ink);border-color:var(--accent-border);box-shadow:inset 3px 0 var(--accent)}
[data-theme=dark] .lp-format-code{border-color:var(--line)}
[data-theme=dark] .lp-tabs button[aria-pressed=true]{background:transparent;color:var(--ink);border-color:var(--accent)}
[data-theme=dark] .lp-cta{background:#8d243d!important;border-color:#b43854!important;color:#fff3f6!important}
[data-theme=dark] .lp-cta:hover{background:#ae2e4c!important;border-color:#e15b78!important}
[data-theme=dark] :is(.lp-file-message,.lp-guide){border-color:var(--accent-border)}
[data-theme=dark] .lp-file-message{background:var(--accent-soft);color:var(--accent-text)}
[data-theme=dark] .lp-preview-picture>span{background:var(--glass);color:var(--ink)}
[data-theme=dark] :is(.lp-red,.lp-required,.lp-steps li>span,.lp-reasons article>span,.lp-account-benefits span,.lp-demo-foot i),[data-theme=dark] .lp-faq summary::after,[data-theme=dark] .lp-promise span::before,[data-theme=dark] .lp-section-marker>span:first-child::before{color:var(--accent)}
[data-theme=dark] :is(.lp-header nav a:hover,.lp-text-link:hover,.lp-auth-nav button:hover,.lp-demo-foot #demoNext:hover){color:var(--accent-text)}
[data-theme=dark] :is(.lp-kicker>span,.lp-signal){background:var(--accent)}
[data-theme=dark] .lp-ruler i,[data-theme=dark] .lp-hero::before{border-color:var(--ruler);background:repeating-linear-gradient(90deg,var(--ruler) 0 1px,transparent 1px 12px)}
[data-theme=dark] :is(.lp-section-marker,.lp-steps li,.lp-upload-action,.lp-reasons article+article,.lp-demo-tag,.lp-demo-foot #demoNext){border-color:var(--line)}
[data-theme=dark] .lp-kitchen-demo{background:#15131b;border-color:var(--line)}
[data-theme=dark] .lp-kitchen-demo::before,[data-theme=dark] .lp-kitchen-demo::after{background:#101014;color:var(--muted)}
[data-theme=dark] :is(.lp-demo-heading,.lp-demo-foot){background:#18151df5;border-color:var(--line)}
[data-theme=dark] .lp-demo-heading button{border-color:var(--line)}
[data-theme=dark] .lp-demo-heading button:hover{background:var(--accent-soft);color:var(--accent-text)}
[data-theme=dark] #demoPoster{mix-blend-mode:screen;opacity:.4}
[data-theme=dark] :is(.language-select,select){color:var(--ink);background:var(--surface);border-color:var(--line)}
[data-theme=dark] select option{color:var(--ink);background:var(--surface)}
[data-theme=dark] input::placeholder{color:#aaa2b1}
/* Viewer chrome and its transparent WebGL canvas. Source material colours stay intact. */
[data-theme=dark] #viewport{background:radial-gradient(ellipse at 42% 24%,#362333 0%,#191720 48%,#101015 100%)}
[data-theme=dark] :is(.panel,.demo-mode .panel,.glass,.icon-button,.demo-mode .icon-button,.view-controls,.webgl-error,dialog){background:var(--glass);color:var(--ink);border-color:var(--line);box-shadow:var(--shadow)}
[data-theme=dark] :is(.inside-button,.assembly-button){background:var(--glass);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(button:hover,.demo-mode .tool-menu button:hover,.icon-button:hover){background:var(--surface-raised);color:var(--ink)}
[data-theme=dark] :is(button.active,button[aria-pressed=true],.icon-button.active,.demo-mode .icon-button.active,.part-row.active,.demo-mode .part-row.active,.inside-button.active,.demo-mode .inside-button.active){background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-border)}
[data-theme=dark] .theme-toggle{background:var(--surface);color:var(--ink)}
[data-theme=dark] :is(.search-wrap,.secondary,.assembly-check,.drilling-drawing,.holes-table th,.connection-card,.share-text,.help-note,#modalBody input[type=text],#modalBody input[type=password],.assembly-search input,#modalBody select){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.search-wrap input,.help-grid b){color:var(--ink)}
[data-theme=dark] :is(.project-heading span,.demo-mode .project-heading span,.text-button,.check-filter,.block-heading,.block-heading span:last-child,.part-row small,.panel-bottom,.dimensions small,.material-line,.count-pill,.caption,.holes-table th,.holes-table td,.edge-info,.menu svg,.menu .key,.menu-footer,.view-controls button,.explode-control label,.bottom-hint,.busy span,.webgl-error p,.empty-list,#modalBody,.assembly-button small,.assembly-help,.connection-row small,.assembly-total,.connection-card p,.connection-card details,.connection-card .connection-source,#assemblyFilters>summary){color:var(--muted)}
[data-theme=dark] :is(.part-number,.menu .key,.count-pill,.assembly-legend button,.view-controls hr,.units){border-color:var(--line);color:var(--muted)}
[data-theme=dark] .part-row.active .part-number{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-border)}
[data-theme=dark] .view-controls button[aria-pressed=true]{color:var(--accent-text)}
[data-theme=dark] .primary{background:#8d243d;border-color:#b43854;color:#fff3f6}
[data-theme=dark] .primary:hover{background:#ae2e4c}
[data-theme=dark] .toast{background:#3b1c2aef;color:#f7edf1;border:1px solid var(--accent-border)}
[data-theme=dark] :is(.busy,.drop-zone){background:#151219e8;border-color:var(--accent-border)}
[data-theme=dark] .drop-zone :is(svg,p){color:var(--accent-text)}
[data-theme=dark] dialog::backdrop{background:#08070bc7}
[data-theme=dark] .spinner{border-color:var(--line);border-top-color:var(--accent)}
/* Standalone guide and error page. */
[data-theme=dark] body{--ink:#ededf1;--text:#ccc5d0;--muted:#b6b0be;--line:#3c3540;--paper:#101014}
[data-theme=dark] :is(.guide-cards .limit,.guide-cards p,.lead,.notice){color:var(--muted)}
@media(max-width:700px){.lp-language{gap:6px}.lp-header .language-select{max-width:112px}.theme-toggle{width:36px;min-height:36px;height:36px}.guide-controls{margin-left:auto}}
@media print{[data-theme] body{background:white;color:#111}.theme-toggle{display:none!important}[data-theme=dark] #printArea{background:white;color:#111}}
