/* Reversible local art-direction trial. Desktop and CMS retain their own themes. */
body.editorial-dark-preview:not(.desktop-mode) { background:#1b1c1c; color:#ece9e2; }
body.editorial-dark-preview:not(.desktop-mode)::before { opacity:.018; mix-blend-mode:screen; }
.editorial-dark-preview .editorial-site {
  --paper:#1b1c1c;
  --ink:#ece9e2;
  --muted:#b1b0aa;
  --line:rgba(236,233,226,.16);
  --surface:#242625;
  color:var(--ink); background:var(--paper); color-scheme:dark;
}
.editorial-dark-preview .orbitarium { background:var(--paper); }
.editorial-dark-preview :is(.dynamic-island,.island-apolo,.history-island) {
  color:#ece9e2; background:rgba(38,40,39,.86); border-color:rgba(236,233,226,.16);
  box-shadow:0 16px 38px #0004;
}
.editorial-dark-preview :is(.island-brand,.footer-mark) { background:#343735; border-color:#ece9e224; }
.editorial-dark-preview :is(.island-brand img,.footer-mark img,.island-apolo .apolo-symbol) { filter:invert(1); }
.editorial-dark-preview .island-links a { color:#b8b8b1; }
.editorial-dark-preview .island-links a:hover { color:#fff; }
.editorial-dark-preview .island-links a.active { color:#1b1c1c; background:#ece9e2; box-shadow:0 3px 15px #0003; }
.editorial-dark-preview .island-desktop { background:#111513; border:1px solid #ece9e21c; }
.editorial-dark-preview .history-island a { color:#b8b8b1; }
.editorial-dark-preview .history-island a:hover { color:#ece9e2; background:#363a37; }
.editorial-dark-preview .history-island a.is-active { color:#b9f5d3; background:#111814; }
.editorial-dark-preview .exhibition-index { color:#b1b0aa; }
.editorial-dark-preview .exhibition-index i { background:#ece9e245; }

/* Quiet surfaces; the intentionally coloured covers and photographic assets stay intact. */
.editorial-dark-preview :is(.home-project-card,.site-project,.commander-role-main,.tool-grid article,.things-portal,.case-question) {
  background:var(--surface); border-color:var(--line); color:var(--ink);
}
.editorial-dark-preview :is(.home-project-apolo,.project-primary) { border-color:#ff967d65; }
.editorial-dark-preview .hero-playground { background:#242625; border-color:var(--line); }
.editorial-dark-preview .float-chip { color:#171717; color-scheme:light; }
.editorial-dark-preview .commander-role-tabs button { background:#242625; color:var(--ink); border-color:var(--line); }
.editorial-dark-preview .commander-role-tabs button.is-active { background:#111814; color:#b9f5d3; }
.editorial-dark-preview .talks-years article:not(.talk-featured) { background:#242625; border-color:var(--line); }
.editorial-dark-preview .history-talk-row:hover { background:#242625; }
.editorial-dark-preview .history-talk-row.is-featured:hover { background:#111814; }
.editorial-dark-preview .museum-ticker { border-color:var(--line); background:#1b1c1c; }

/* Copy on neutral backgrounds. Do not invert text sitting on branded colour panels. */
.editorial-dark-preview :is(
  .site-kicker,.section-number,.hero-lead,.manifesto-aside,.home-project-meta,.home-project-copy p,
  .home-projects-heading > div:last-child p,.museum-intro > p:last-child,
  .history-hero > div > p:not(.section-number),.history-statement p:last-child,
  .commander-role-copy > p:not(.section-number),.workbench-heading > p,.tool-grid p,
  .practice-map > p:last-child,.history-timeline-heading > p,.history-timeline time,.history-timeline p,
  .history-education li span,.history-talks-heading > div:last-child p,
  .history-talk-row:not(.is-featured) p,.history-talk-row:not(.is-featured) time,
  .history-talk-row:not(.is-featured) span,.history-talk-row:not(.is-featured) > i,
  .things-portal > div:first-child > p:not(.section-number),.talks-hero > p,
  .talks-years article:not(.talk-featured) p,.talks-years article:not(.talk-featured) span,
  .section-heading > p,.project-chapter p,.project-top,.project-copy p,
  .project-territories > div:last-child > p,.log-intro > p:not(.section-number),
  .log-entry-index,.log-entry-copy > span,.log-list p,.log-entry-meta,
  .site-footer p,.footer-map strong,.legal-hero > p:last-child,.legal-layout > aside strong,.legal-content p,
  .commander-role-tabs button:not(.is-active) span,.commander-role-tabs button:not(.is-active) small
) { color:var(--muted); }
.editorial-dark-preview :is(
  .text-button,.outline-button,.home-projects-heading a,.home-project-copy button,.home-project-copy a,
  .commander-role-copy > a,.practice-map,.history-talks-heading a,.history-talk-row:not(.is-featured),
  .project-copy button,.project-copy a,.log-entry,.log-entry-meta span:last-child,
  .footer-links a,.footer-map a,.footer-map button,.legal-layout > aside a,.legal-content a,
  .reading-body footer button
) { color:var(--ink); }
.editorial-dark-preview :is(.project-copy a,.project-copy button,.outline-button) { border-color:var(--line); }
.editorial-dark-preview .dark-button { color:#1b1c1c; border-color:#ece9e2; background:#ece9e2; }
.editorial-dark-preview .archive-filters button.active { color:#1b1c1c; background:#ece9e2; }
.editorial-dark-preview .reading-body p { color:#c1c0b9; }
.editorial-dark-preview .reading-body p.lead { color:var(--ink); }
.editorial-dark-preview :is(.talk-cover-placeholder,.reading-cover-placeholder,.archive-cover-placeholder) { color:#171717; }
.editorial-dark-preview .case-title-card .section-number { color:inherit; }
.editorial-dark-preview :is(.teaching-block,.museum-room,.archive-record,.thing-card,.reading-hero,.route-progress,.guided-routes a) .section-number { color:inherit; }

/* Shared hairlines establish rhythm without creating light/dark section breaks. */
.editorial-dark-preview :is(
  .home-projects,.manifesto,.museum-entrance,.history-statement,.workbench,.practice-map,
  .history-timeline,.history-timeline article,.history-education li,.history-talks-list,.history-talk-row,
  .archive-personal-heading,.projects-section,.project-exhibition-note,.project-territories,.log-section,
  .log-entry,.archive-section,.things-section,.desktop-invitation,.site-footer,
  .legal-layout,.legal-content section
) { border-color:var(--line); }
.editorial-dark-preview .project-chapter i { background:var(--line); }
.editorial-dark-preview .editorial-panel-sheet { --ink:#ece9e2; --muted:#b1b0aa; color:#ece9e2; background:#242625; }
.editorial-dark-preview :is(.editorial-panel-bar,.editorial-panel-content article) { border-color:#ece9e229; }
.editorial-dark-preview .editorial-panel-bar button { color:#ece9e2; }
.editorial-dark-preview :is(.editorial-panel-content span,.editorial-panel-content p) { color:#b1b0aa; }
.editorial-dark-preview .editorial-site ::selection { color:#1b1c1c; background:#ffb39a; }
.editorial-dark-preview .editorial-site :focus-visible { outline-color:#ffb39a; }

/* Navigation belongs to the dark editorial system, not the project artwork. */
.editorial-dark-preview .room-history { --room-accent:#62a0ff; --room-base:#2445bc; }
.editorial-dark-preview .room-archive { --room-accent:#c074ff; --room-base:#6a22ac; }
.editorial-dark-preview .room-talks { --room-accent:#24e1da; --room-base:#005a68; }
.editorial-dark-preview .museum-room {
  color:#fff4eb;
  background:var(--room-base);
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--room-accent) 24%,var(--room-base)),transparent 75%),var(--room-base);
  border:1px solid #ece9e21f;
  transition:transform .22s ease,border-color .22s ease,background-color .22s ease;
}
.editorial-dark-preview .museum-room::after { color:var(--room-accent); opacity:.38; }
.editorial-dark-preview .museum-room > span { color:#fff4eb; }
.editorial-dark-preview .museum-room > span::before {
  content:''; display:inline-block; width:5px; height:5px; margin-right:9px;
  border-radius:50%; background:var(--room-accent); vertical-align:1px;
}
.editorial-dark-preview .museum-room:hover {
  border-color:color-mix(in srgb,var(--room-accent) 45%,transparent);
  box-shadow:0 12px 28px #0002;
}
/* Restyle the original presets only; custom CMS colors remain the source. */
.editorial-dark-preview .guided-routes a[data-route-color="#ff705c" i] { --space-base:#ae302a; --space-accent:#ff705c; }
.editorial-dark-preview .guided-routes a[data-route-color="#9ebfff" i] { --space-base:#2445bc; --space-accent:#62a0ff; }
.editorial-dark-preview .guided-routes a[data-route-color="#b9f5d3" i] { --space-base:#005a68; --space-accent:#24e1da; }
.editorial-dark-preview .guided-routes a[data-route-color="#f4d34f" i] { --space-base:#6a22ac; --space-accent:#c074ff; }
.editorial-dark-preview .guided-routes a {
  --card-base:var(--space-base,color-mix(in srgb,var(--route-color,#b9d2c4) 32%,#17201e));
  --card-accent:var(--space-accent,var(--route-color,#b9d2c4));
  color:#fff4eb; background:var(--card-base);
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--card-accent) 24%,var(--card-base)),transparent 75%),var(--card-base);
  border:1px solid #ece9e21f;
  transition:transform .25s,border-color .25s,background-color .25s;
}
.editorial-dark-preview .guided-routes a::before {
  content:''; width:30px; height:2px; margin-bottom:22px; flex-shrink:0;
  background:var(--card-accent); opacity:1;
}
.editorial-dark-preview .guided-routes a p { color:#fff4eb; padding-top:24px; }
.editorial-dark-preview .guided-routes a[href^="/proyectos/apolo?"] { border-color:#ff9a8459; }
.editorial-dark-preview .guided-routes a:hover {
  transform:translateY(-4px);
  border-color:var(--card-accent);
  box-shadow:0 12px 28px #0002;
}
@media(prefers-reduced-motion:reduce) {
  .editorial-dark-preview :is(.museum-room,.guided-routes a) { transition:none; }
  .editorial-dark-preview .guided-routes a:hover { transform:none; }
}
