:root[data-theme] {
  --paper: #f5f8f5; --surface: #fff; --text: #193632; --secondary: #425d56;
  --edge: #96aca5; --chrome: #e6eeea; --accent: #165749; --action: #184f45;
  --action-text: #fff; --focus: #a94e08; --note: #fff0ce; --note-text: #402a08;
}
:root[data-concept=b] { --chrome:#edf4ff; --accent:#174789; --action:#153d75; }
:root[data-theme=dark] {
  --paper:#0e1e21; --surface:#182c30; --text:#ebf6f2; --secondary:#bfd5cd;
  --edge:#718b85; --chrome:#102b2c; --accent:#a2e5cd; --action:#b5e7ce;
  --action-text:#0f322d; --focus:#ffd18b; --note:#3e3522; --note-text:#ffe9bc;
}
:root[data-theme=dark][data-concept=b] {
  --paper:#101a2b; --surface:#19283e; --chrome:#101f3e; --accent:#b6d7ff;
  --action:#b8d7ff; --action-text:#132b50;
}
html[data-theme] body {background:var(--paper); color:var(--text)}
html[data-theme] :is(header,footer) {
  display:flex; align-items:center; flex-wrap:wrap; gap:.5rem 1rem;
  background:var(--chrome); color:var(--text); border-color:var(--edge);
}
html[data-theme] header {border-bottom:1px solid var(--edge)}
html[data-theme] footer {border-top:1px solid var(--edge); padding:1rem max(4vw,1rem); justify-content:center}
html[data-theme] header>:first-child {margin-inline-end:auto}
html[data-theme] :is(a,summary) {color:var(--accent)}
html[data-theme] :is(header,footer) a {color:var(--text); min-height:44px; display:inline-flex; align-items:center}
html[data-theme] :is(h1,h2,h3,h4,legend) {color:var(--text)}
html[data-theme] :is(.sheet,article,fieldset,.columns>section,details) {
  color:var(--text); background:var(--surface); border-color:var(--edge);
}
html[data-theme] :is(input:not([type=checkbox]):not([type=hidden]),select,textarea) {background:var(--surface);color:var(--text);border-color:var(--edge)}
html[data-theme] :is(button,.button) {background:var(--action);color:var(--action-text)}
html[data-theme] :is(.quiet,.secondary,#panel-theme) {background:var(--surface);color:var(--accent);border:1px solid var(--edge)}
html[data-theme] .danger {background:#963a30;color:#fff}
html[data-theme] :is(.notice,.error) {background:var(--note);color:var(--note-text)}
html[data-theme] :is(.small,.eyebrow,small) {color:var(--secondary)}
html[data-theme] .skip {color:var(--accent);background:var(--surface);min-height:44px}
.pending-fields {display:grid;gap:.9rem;min-inline-size:0;margin:0;padding:0;border:0}
.pending-fields legend {padding:0 0 .65rem;font-weight:600}
.pending-fields :is(input,button):disabled {cursor:not-allowed}
html[data-theme] :focus-visible {outline:3px solid var(--focus);outline-offset:3px}
#panel-theme {width:44px;height:44px;min-height:44px;padding:0;align-items:center;justify-content:center;display:inline-flex;border-radius:50%}
#panel-theme svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
#panel-theme .day,html[data-theme=dark] #panel-theme .night,#panel-theme[hidden] {display:none}
html[data-theme=dark] #panel-theme .day {display:inline}
.a11y-big {font-size:115%}
.a11y-links a {text-decoration:underline!important;text-underline-offset:.2em}
.a11y-spacing :is(p,li,label,summary) {letter-spacing:.04em;word-spacing:.12em;line-height:1.8}
html.a11y-contrast {--edge:currentColor;--secondary:var(--text)}
.a11y-still *, .a11y-still *::before,.a11y-still *::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(max-width:480px){html[data-theme] header{gap:6px 9px}html[data-theme] header nav{order:2;flex-basis:100%}}

/* The editorial proposal uses short entrances and responses to deliberate actions. */
#panel-motion {
  display:inline-flex;align-items:center;justify-content:center;gap:.4rem;
  min-height:44px;min-width:44px;padding:.45rem .65rem;border:1px solid var(--edge);
  background:var(--surface);color:var(--accent);border-radius:6px;font:600 .875rem/1.2 system-ui,sans-serif;
}
#panel-motion svg {width:17px;height:17px;fill:currentColor}
#panel-motion .play,#panel-motion[aria-pressed=true] .pause {display:none}
#panel-motion[aria-pressed=true] .play {display:inline}
#panel-motion:disabled {opacity:1}
@media(prefers-reduced-motion:no-preference) {
  html[data-concept=a]:not(.a11y-still) main h1 {animation:panel-heading .48s cubic-bezier(.2,.7,.2,1) both}
  html[data-concept=a]:not(.a11y-still) main>.grid>* {animation:panel-section .38s cubic-bezier(.2,.75,.25,1) both}
  html[data-concept=a]:not(.a11y-still) main>.grid>*:nth-child(2) {animation-delay:45ms}
  html[data-concept=a]:not(.a11y-still) :is(button,.button,summary) {transition:background-color .16s,border-color .16s,transform .16s}
  html[data-concept=a]:not(.a11y-still) :is(button,.button):active:not(:disabled) {transform:translateY(1px)}
  html[data-concept=a]:not(.a11y-still) details[open]>:not(summary) {animation:panel-section .24s ease-out}
  @keyframes panel-heading {from {transform:translateY(7px)} to {transform:none}}
  @keyframes panel-section {from {transform:translateY(4px)} to {transform:none}}
}
@media(prefers-reduced-motion:reduce) {
  html[data-concept=a] *,html[data-concept=a] *::before,html[data-concept=a] *::after {
    animation:none!important;transition:none!important;scroll-behavior:auto!important;
  }
}
.reading-settings {max-width:100%;text-align:left}
.reading-settings summary {cursor:pointer;font-weight:700;padding:12px}
.reading-settings label {display:flex;align-items:center;gap:10px;min-height:44px;margin:0;padding:2px 12px}
.reading-settings input {width:20px;height:20px;min-height:20px;margin:0}
