/* SPERA dark: colour only; layout, type scale and motion remain shared. */
html[data-theme="dark"]{
  color-scheme:dark;
  --paper:#081828;--ink:#f2f7fc;--muted:#b7c9dc;
  --blue:#8ecbff;--light-blue:#afdfff;--rule:#29415a;
  --accent:#e88b3f;--accent-ink:#ffae6b;
  --surface:#102b47;--surface-hover:#163b60;--border:#3c6286;
  --green:#65c9a2;--orange:#e4aa59;--red:#e3848a;
  background:var(--paper);color:var(--ink);
}
html[data-theme="dark"] body{color:var(--ink)}
html[data-theme="dark"] ::selection{background:#265e92;color:#fff}
html[data-theme="dark"] .ambient{
  background:radial-gradient(ellipse at 79% 43%,#123a60 0%,#0c2540 30%,var(--paper) 70%);
}
html[data-theme="dark"] .dark-section{
  --blue:#8ecbff;--dark-text:#f2f7fc;--dark-muted:#c1d4e8;--rule:#365675;
  background-color:#0d3157;
  background-image:radial-gradient(circle at 18% 8%,#328bcb26,transparent 35%),linear-gradient(135deg,#0a2542,#0d3f7f);
  border-color:var(--rule);
}
html[data-theme="dark"] .content-section{background:#0b2036}
html[data-theme="dark"] .audit{background:#102941}
html[data-theme="dark"] .content-section.dark-section{
  background:radial-gradient(circle at 18% 8%,#328bcb26,transparent 35%),linear-gradient(135deg,#0a2542,#0d3f7f);
}
html[data-theme="dark"] .header{background:#081828f5;border-bottom-color:#29415a}
html[data-theme="dark"] .header .brand img,
html[data-theme="dark"] .hero-art-logo img{filter:brightness(0) invert(1)}
html[data-theme="dark"] .header .brand{position:relative}
html[data-theme="dark"] .header .brand::after,
html[data-theme="dark"] .hero-art-logo::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:url("assets/logo-spera.png?v=39") center/100% 100% no-repeat;
  clip-path:inset(0 73.4% 0 0);
}
html[data-theme="dark"] .header .main-nav a,
html[data-theme="dark"] .mobile-menu a{color:#d0dfed}
html[data-theme="dark"] .header .main-nav a:hover,
html[data-theme="dark"] .header .main-nav a[aria-current],
html[data-theme="dark"] .mobile-menu a:hover{color:var(--blue)}
html[data-theme="dark"] .header .menu-toggle{background:var(--surface);border-color:var(--border)}
html[data-theme="dark"] .header .menu-toggle>span{background:var(--ink)}
html[data-theme="dark"] .mobile-menu{background:#0d233b;border-color:var(--border);box-shadow:0 22px 70px #0006}
html[data-theme="dark"] .header .contact-link,
html[data-theme="dark"] .mobile-menu .contact-link,
html[data-theme="dark"] .mobile-menu .contact-link:hover{color:#fff}
html[data-theme="dark"] .skip-link{background:#0b4f9c;color:#fff}
html[data-theme="dark"] .chapter-number{color:var(--accent-ink);border-color:#98683e}
html[data-theme="dark"] .text-link{border-color:var(--border)}
html[data-theme="dark"] .small-caption,
html[data-theme="dark"] .scene-end,
html[data-theme="dark"] .benefits li span,
html[data-theme="dark"] .process-tabs .module-number,
html[data-theme="dark"] .study-status,
html[data-theme="dark"] .visual-heading,
html[data-theme="dark"] .visual-heading span,
html[data-theme="dark"] .illustration-note,
html[data-theme="dark"] .study-center>small,
html[data-theme="dark"] .chapter-rail,
html[data-theme="dark"] .process-hint,
html[data-theme="dark"] .popup-text,
html[data-theme="dark"] .popup-close,
html[data-theme="dark"] .question-answer,
html[data-theme="dark"] .dashboard-topline,
html[data-theme="dark"] .dashboard-figure figcaption,
html[data-theme="dark"] .dashboard-tabs button,
html[data-theme="dark"] .dashboard-note,
html[data-theme="dark"] .data-questions button,
html[data-theme="dark"] .data-questions button>span,
html[data-theme="dark"] .role-list article>span,
html[data-theme="dark"] .role-list p,
html[data-theme="dark"] .security-list p,
html[data-theme="dark"] .configuration-list li,
html[data-theme="dark"] .ownership-note,
html[data-theme="dark"] .section-heading>p:last-child,
html[data-theme="dark"] .credentials article>span,
html[data-theme="dark"] .credentials p{color:var(--muted)}
html[data-theme="dark"] .data-questions button[aria-pressed="true"],
html[data-theme="dark"] .dashboard-tabs button[aria-selected="true"],
html[data-theme="dark"] .process-tabs button[aria-expanded="true"]>.module-number,
html[data-theme="dark"] .credentials strong,
html[data-theme="dark"] .support-icon,
html[data-theme="dark"] .region-scope{color:var(--blue)}
html[data-theme="dark"] .adoption .support-icon,
html[data-theme="dark"] .audit .audit-icon{color:var(--accent)}
html[data-theme="dark"] .rail-track{background:var(--rule)}
html[data-theme="dark"] .study-tag,
html[data-theme="dark"] .region-node-label{
  color:var(--ink);background:#102b47f5;border-color:var(--border);
  box-shadow:0 3px 0 #0003,0 8px 22px #0002;
}
html[data-theme="dark"] .study-tag:hover{
  color:#fff;background:var(--surface-hover);border-color:var(--blue);
  box-shadow:0 3px 0 #0003,0 8px 22px #0003;
}
html[data-theme="dark"] .study-center{background:#0b2036e8}
html[data-theme="dark"] .process-popover,
html[data-theme="dark"] dialog{background:#102941fa;border-color:var(--border);box-shadow:0 20px 80px #0008}
html[data-theme="dark"] .process-popover h3{color:var(--ink)}
html[data-theme="dark"] .popup-close:hover{background:var(--surface-hover);color:#fff}
html[data-theme="dark"] dialog::backdrop{background:#020b16c9}
html[data-theme="dark"] .dialog-close{color:var(--blue)}
html[data-theme="dark"] .dashboard-shell{background:#102941;border-color:var(--border);box-shadow:0 22px 70px #0003}
html[data-theme="dark"] .dashboard-topline{background:#102941}
html[data-theme="dark"] .dashboard-tabs{border-color:var(--rule)}
html[data-theme="dark"] .role-list article,
html[data-theme="dark"] .security-list article,
html[data-theme="dark"] .credentials,
html[data-theme="dark"] .credentials article{border-color:var(--rule)}
html[data-theme="dark"] .hero .hero-scroll-cue{background:#102b47db;color:var(--blue)}
html[data-theme="dark"] .hero .hero-scroll-cue:hover{background:var(--surface-hover);color:#fff}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form{
  color-scheme:dark;color:var(--ink);background:#102b47;box-shadow:0 30px 80px #00102066;
}
html[data-theme="dark"] .demo-form-heading p,
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form .form-note,
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form .demo-consent{color:var(--muted)}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form label{color:#d5e3ef}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form input,
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form select{
  background:#081c31;color:var(--ink);border-color:#547697;
}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form input::placeholder{color:#a8bdd1}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form option{background:#081c31;color:var(--ink)}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form .form-result{color:#88d9b9}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form .draft-link{color:var(--blue)}
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form input:focus-visible,
html[data-theme="dark"] .demo-section.dark-section .inline-demo-form select:focus-visible{
  outline-color:var(--accent);border-color:var(--accent);
}
html[data-theme="dark"] .institutional-footer{background:#061525;border-top:1px solid var(--rule)}
