/* Paper / ink themes affect presentation surfaces; cinema plates keep their own colors. */
:root[data-theme="light"] {
  --theme-page:#f7f7f3; --theme-soft:#eee8f5; --theme-panel:#fff;
  --theme-ink:#18151c; --theme-muted:#62586b; --theme-line:#c7c0ce;
  --theme-accent:#6b438e; --theme-tint:#dfd5ef; --theme-hover:#ebe3f5;
  --theme-button:#18151c; --theme-button-ink:#f7f7f3; --theme-error:#842449;
}
:root[data-theme="dark"] {
  --theme-page:#151419; --theme-soft:#211d28; --theme-panel:#25202c;
  --theme-ink:#f3edf8; --theme-muted:#c4bacd; --theme-line:#514957;
  --theme-accent:#d6bced; --theme-tint:#211b2c; --theme-hover:#2d2538;
  --theme-button:#d3c5ed; --theme-button-ink:#18151c; --theme-error:#f2b0c8;
}
html[data-theme] body {background:var(--theme-page);color:var(--theme-ink)}
html[data-theme] :is(.work-section,.cap-section,.studio-section,footer,.flagship-story,.project-story-footer,.enquiry-panel,dialog) {background:var(--theme-page);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme] :is(.original-section,.distribution-section,.contact-section,.contact-page .site-header,.contact-intro) {background:var(--theme-tint);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme] :is(.original-feature,.original-copy) {background:var(--theme-soft);color:var(--theme-ink)}
html[data-theme] :is(.original-number,.original-author,.original-description,.original-inventory,.original-coming) {color:var(--theme-muted)}
html[data-theme] .original-actions>* {border-color:var(--theme-line)}
html[data-theme] :is(.project-meta p,.row-desc,.row-category,.detail-meta,.detail-body,.detail-note,.intro-note,.collection-message,.spotlight-category,.spotlight-description,.flagship-heading p,.flagship-link small,.flagship-story p,.flagship-story header>p:first-child,.flagship-process figcaption,.flagship-delivery li,.story-films figcaption,.studio-reel-button small,.studio-body .quiet,.enquiry-intro,.contact-privacy,.contact-receipt,.optional) {color:var(--theme-muted)}
html[data-theme] :is(.collection-copy,.project-row,.filters button,.thumbnail-motion,.spotlight-actions button,.spotlight-choice,.flagship-link,.flagship-brief,.flagship-delivery,.project-links a,.studio-reel-button,.family-spread-header,.family-close,.family-count) {border-color:var(--theme-line);color:var(--theme-ink)}
html[data-theme] :is(.filters button[aria-pressed="true"],.primary-button,.spotlight-actions .spotlight-open) {background:var(--theme-button);color:var(--theme-button-ink);border-color:var(--theme-button)}
html[data-theme] :is(.filters button:not([aria-pressed="true"]):hover,.thumbnail-motion:hover,.project-links a:hover,.spotlight-actions button:hover) {background:var(--theme-hover)}
html[data-theme] .spotlight-actions .spotlight-toggle {background:var(--theme-soft)}
html[data-theme] .spotlight-actions .spotlight-open:hover {background:var(--theme-button);color:var(--theme-button-ink)}
html[data-theme] .project-index .project-row:hover {background:transparent}
html[data-theme] .project-index .project-row:hover .row-title {color:var(--theme-accent)}
html[data-theme] .family-spread {background:var(--theme-soft);color:var(--theme-ink)}
html[data-theme] .project-index .family-child :is(.row-desc,.row-category) {color:var(--theme-muted)}
html[data-theme] .family-child .collection-copy {border-color:var(--theme-line)}
html[data-theme] .spotlight-progress {background:var(--theme-line)}
html[data-theme] .spotlight-progress::before {background:var(--theme-accent)}
html[data-theme] .spotlight-choice:is(.is-active,[aria-pressed="true"]) {border-color:var(--theme-accent)}
html[data-theme] :is(.flagship-process img,.flagship-link img,.project-context) {background:var(--theme-soft)}
html[data-theme] .dialog-close {background:var(--theme-page);color:var(--theme-ink);box-shadow:0 0 0 1px var(--theme-line)}
html[data-theme] .studio-flower {color:var(--theme-accent)}
html[data-theme] .social-share {--share-ink:var(--theme-ink);--share-muted:var(--theme-muted);--share-line:var(--theme-line);--share-hover:var(--theme-hover);--share-focus:var(--theme-accent)}

/* Capability copy and controls use the same palette in both modes. */
html[data-theme] :is(.cap-heading>p,.cap-eyebrow,.cap-nav__number,.cap-nav__arrow,.cap-chapter-heading>span,.cap-art figcaption,.cap-service-body,.cap-related>span,.cap-footnote,.cap-motion-meta,.cap-motion-note,.cap-motion-controls,.consulting__introduction,.consulting__outcome p,.consulting__comparison-help,.performance-capture__copy,.live-action-ai__help,.live-action-ai__study-title,.agent-fleet__help,.agent-fleet__number,.tool-playground__help,.tool-playground__description,.tool-playground__image-status) {color:var(--theme-muted)}
html[data-theme] :is(.cap-nav,.cap-chapter,.cap-service-list,.cap-service-list details,.cap-related button) {border-color:var(--theme-line)}
html[data-theme] :is(.cap-service-body .cap-deliverables,.cap-enquire,.cap-related button,.cap-service-list summary:hover) {color:var(--theme-accent)}
html[data-theme] .cap-plus::before,html[data-theme] .cap-plus::after {background:var(--theme-accent)}
html[data-theme] .cap-section :is(button,a,input,summary):focus-visible {outline-color:var(--theme-accent)}
html[data-theme] :is(.cap-consulting-link,.consulting__enquire) {background:var(--theme-tint);color:var(--theme-ink)}
html[data-theme] .cap-consulting-link small {color:var(--theme-muted)}
html[data-theme] :is(.cap-consulting-link,.consulting__enquire):hover {background:var(--theme-hover)}
html[data-theme] .consulting {--consulting-pearl:var(--theme-ink);--consulting-rule:var(--theme-line)}
html[data-theme] :is(.consulting__step,.consulting__step-number) {color:var(--theme-muted)}
html[data-theme] .consulting__step {border-color:var(--theme-line)}
html[data-theme] .consulting__step:is(:hover,[aria-pressed="true"]) {color:var(--theme-ink);border-color:var(--theme-accent)}
html[data-theme] .performance-capture {--pc-ink:var(--theme-page);--pc-ivory:var(--theme-ink);--pc-silver:var(--theme-muted);--pc-orchid:var(--theme-accent);--pc-rule:var(--theme-line)}
html[data-theme] .world-production {--wp-ivory:var(--theme-ink);--wp-silver:var(--theme-muted);--wp-orchid:var(--theme-accent);--wp-rule:var(--theme-line)}
html[data-theme] .live-action-ai {--la-light:var(--theme-ink);--la-silver:var(--theme-muted);--la-orchid:var(--theme-accent);--la-rule:var(--theme-line)}
html[data-theme] .agent-fleet {--fleet-light:var(--theme-ink);--fleet-silver:var(--theme-muted);--fleet-orchid:var(--theme-accent);--fleet-rule:var(--theme-line)}
html[data-theme] :is(.performance-control__status,.live-action-ai__fallback,.agent-fleet__fallback,.world-production__fallback) {color:#f3edf8}
html[data-theme] :is(.cap-motion-toggle,.tool-playground__toggle,.tool-playground__sound) {color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme] .tool-playground__machines {border-color:var(--theme-line)}
html[data-theme] .tool-playground__machines button {color:var(--theme-muted)}
html[data-theme] .tool-playground__machines button::before {background:var(--theme-line)}
html[data-theme] .tool-playground__machines button:is(:hover,[aria-pressed="true"]) {color:var(--theme-ink)}
html[data-theme] .tool-playground__machines button[aria-pressed="true"]::before {background:var(--theme-accent)}
html[data-theme] :is(.cap-motion-toggle,.tool-playground__toggle,.tool-playground__retry):hover {color:var(--theme-accent)}
html[data-theme] .agent-fleet__toggle:hover {color:var(--theme-accent)}

/* Distribution is loaded on demand; theme selectors outrank its independent stylesheet. */
html[data-theme] .distribution-section {--network-line:var(--theme-line)}
html[data-theme] :is(.network-totals,.network-feature-copy p,.network-directory-meta,.network-directory-intro,.network-result-line,.network-card-topic,.network-card-description,.network-no-film,.distribution-credit,.network-film-header p,#network-film-copy>p) {color:var(--theme-muted)}
html[data-theme] :is(.network-totals strong,.network-view button) {color:var(--theme-ink)}
html[data-theme] :is(.network-controls input[type="search"],.network-controls select,.enquiry-panel input,.enquiry-panel select,.enquiry-panel textarea) {background:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme] :is(.enquiry-panel input,.enquiry-panel textarea)::placeholder {color:var(--theme-muted)}
html[data-theme] :is(.network-explore,.network-card-actions>*,.distribution-invitation button,.network-view button,.network-film-close,#network-film-options button) {border-color:var(--theme-line)}
html[data-theme] :is(.network-picks>button[aria-pressed="true"],.network-view [aria-pressed="true"],#network-film-options [aria-pressed="true"]) {background:var(--theme-button);color:var(--theme-button-ink)}
html[data-theme] .network-picks>button:hover:not([aria-pressed="true"]) {background:var(--theme-hover)}
html[data-theme] :is(.network-directory-toggle:hover,.success-flower) {color:var(--theme-accent)}
html[data-theme] #contact-status {color:var(--theme-error)}
html[data-theme] #studio-reel-dialog {background:var(--theme-page);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme] :is(#studio-reel-dialog .reel-heading p,#studio-reel-dialog .reel-footer p) {color:var(--theme-muted)}
html[data-theme] #studio-reel-dialog .reel-footer a {color:var(--theme-accent)}

/* One always-reachable switch, opposite the existing Jump to section control. */
.theme-toggle {position:fixed;z-index:12;left:max(22px,env(safe-area-inset-left));bottom:max(22px,env(safe-area-inset-bottom));display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;min-width:88px;padding:0 15px;border:1px solid var(--theme-line);border-radius:30px;background:var(--theme-page);color:var(--theme-ink);font-size:12px;line-height:1;box-shadow:0 3px 20px #18151c26}
.theme-toggle:hover {background:var(--theme-hover)}
.theme-toggle:focus-visible {outline:2px solid var(--theme-accent);outline-offset:4px}
.theme-toggle svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.theme-toggle__sun {display:none}
html[data-theme="dark"] .theme-toggle__moon {display:none}
html[data-theme="dark"] .theme-toggle__sun {display:block}
html:not([data-theme]) .theme-toggle {display:none}
html[data-theme] .section-nav {color:var(--theme-ink)}
html[data-theme] :is(.section-nav__toggle,.section-nav__links) {background:var(--theme-soft);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme] :is(.section-nav__current,.section-nav__links>a) {color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme] .section-nav__links>a:is(:hover,:focus-visible,[aria-current="location"]) {background:var(--theme-hover)}
body:has(dialog[open]) .theme-toggle {visibility:hidden}
@media(max-width:520px) {.theme-toggle {left:max(16px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));min-width:78px;padding:0 12px}}
@media(max-width:380px) {.section-nav__current {display:none}}
