/* Client specification 9.4. Shared geometry, complete visitor-selected palettes. */
body.cr-site {
  --cr-bg: #F7F5EF;
  --cr-paper: #F7F5EF;
  --cr-sage: #E3EBE5;
  --cr-mist: #E5EDF0;
  --cr-lavender: #E8E3EE;
  --cr-ink: #172D3E;
  --cr-muted: #53636A;
  --cr-primary: #29475A;
  --cr-teal: #7EA6A0;
  --cr-purple: #E8E3EE;
  --cr-coral: #D9A583;
  --cr-gold: #D9A583;
  --cr-blue: #E5EDF0;
  --cr-green: #172D3E;
  --cr-accent: #7EA6A0;
  --cr-apricot: #D9A583;
  --cr-focus: #29475A;
  --cr-selected: #E3EBE5;
  --cr-on-primary: #F7F5EF;
  --cr-line: color-mix(in srgb, #172D3E 23%, #F7F5EF);
  --cr-mode-fill: #29475A;
  --cr-mode-text: #F7F5EF;
}
html[data-cr-mode="enhanced"] body.cr-site {
  --cr-bg: #FBFAF6;
  --cr-paper: #FBFAF6;
  --cr-sage: #E5EFE8;
  --cr-mist: #E5EFE8;
  --cr-lavender: #FBFAF6;
  --cr-ink: #102C40;
  --cr-muted: #102C40;
  --cr-primary: #173F59;
  --cr-teal: #287F78;
  --cr-purple: #72599A;
  --cr-coral: #C96852;
  --cr-gold: #B47A22;
  --cr-blue: #347A9A;
  --cr-green: #102C40;
  --cr-accent: #287F78;
  --cr-apricot: #C96852;
  --cr-focus: #72599A;
  --cr-selected: #E5EFE8;
  --cr-on-primary: #FBFAF6;
  --cr-line: color-mix(in srgb, #102C40 35%, #FBFAF6);
  --cr-mode-fill: #287F78;
  --cr-mode-text: #FBFAF6;
}

/* Primary text, surfaces and persistent selector follow the current view. */
.cr-site .cr-display-bar { background: var(--cr-sage) !important; border-color: var(--cr-line); }
.cr-site .cr-display-intro, .cr-site .cr-demo-note, .cr-site .cr-preview-label { color: var(--cr-muted); }
.cr-site .cr-mode-options { background: var(--cr-paper); border-color: var(--cr-primary); }
.cr-site .cr-mode-button { color: var(--cr-ink); }
/* Swap paired foreground/background colours together, without low-contrast in-between frames. */
.cr-site .cr-mode-button, .cr-site .cr-demo-tab, .cr-site .cr-test-tools { transition: none !important; }
html[data-cr-mode] .cr-site .cr-mode-button[aria-pressed="true"] {
  background: var(--cr-mode-fill); color: var(--cr-mode-text); border-color: transparent;
  box-shadow: inset 0 -3px var(--cr-mode-fill);
}
.cr-site .cr-preference-panel, .cr-site .cr-tools-dialog, .cr-site .cr-dialog {
  background: var(--cr-paper); color: var(--cr-ink); border-color: var(--cr-line);
}
.cr-site .cr-view-descriptions strong, .cr-site .cr-inline-button, .cr-site .cr-dialog h2, .cr-site .cr-dialog p { color: var(--cr-ink); }
.cr-site .cr-dialog .cr-dialog-close, .cr-site .cr-tools-close:hover { background: var(--cr-sage); color: var(--cr-ink); border-color: var(--cr-primary); }
.cr-site .cr-tools-close { border-color: var(--cr-line); color: var(--cr-ink); }
.cr-site .cr-tools-dialog .cr-demo-footer { background: var(--cr-sage); color: var(--cr-muted); border-color: var(--cr-line); }
.cr-site .cr-preference-panel .cr-mode-status { background: var(--cr-sage); color: var(--cr-ink); }
.cr-site .cr-button-secondary, .cr-site .cr-page-link.cr-button-secondary:hover { border-color: var(--cr-primary); color: var(--cr-ink) !important; }
.cr-site .cr-button:not(.cr-button-secondary):not(.cr-button-light):not(.cr-test-tools) { color: var(--cr-on-primary) !important; }
.cr-site .cr-skip-link { background: var(--cr-ink); color: var(--cr-paper); }
.cr-site .cr-header .cr-brand-mark { color: var(--cr-primary); }
html[data-cr-mode="enhanced"] .cr-site .cr-header .cr-brand-mark,
html[data-cr-mode="enhanced"] .cr-site .cr-hero .cr-accent-text { color: var(--cr-teal); }
.cr-site .cr-hero .cr-value-strip span::before { width: 7px; height: 7px; background: var(--cr-teal); }
.cr-site .cr-hero .cr-value-strip span:nth-child(2)::before { background: var(--cr-coral); }
.cr-site .cr-hero .cr-value-strip span:nth-child(3)::before { background: var(--cr-primary); }

/* Calm supporting colours become distinct icon fills in Enhanced. */
.cr-site .cr-mission-editorial .cr-mission-principle:nth-child(1) .cr-mission-symbol { background: var(--cr-teal); color: var(--cr-ink); }
.cr-site .cr-mission-editorial .cr-mission-principle:nth-child(2) .cr-mission-symbol { background: var(--cr-purple); color: var(--cr-ink); }
.cr-site .cr-mission-editorial .cr-mission-principle:nth-child(3) .cr-mission-symbol { background: var(--cr-coral); color: var(--cr-ink); }
html[data-cr-mode="enhanced"] .cr-site .cr-mission-editorial .cr-mission-principle:nth-child(-n+2) .cr-mission-symbol { color: var(--cr-paper); }
.cr-site .cr-mission-editorial .cr-mission-principle-inner, .cr-site .cr-mission-editorial > .section-content > .cr-mission-closing { border-color: var(--cr-line); }
.cr-site .cr-mission-editorial .cr-mission-personal { color: var(--cr-ink); }
.cr-site .cr-overview.cr-overview-story .cr-overview-concepts li { color: var(--cr-ink); }
.cr-site .cr-overview.cr-overview-story .cr-overview-concepts li svg { color: var(--cr-primary); }
html[data-cr-mode="enhanced"] .cr-site .cr-overview.cr-overview-story .cr-overview-concepts li:nth-child(1) svg { color: var(--cr-teal); }
html[data-cr-mode="enhanced"] .cr-site .cr-overview.cr-overview-story .cr-overview-concepts li:nth-child(2) svg { color: var(--cr-purple); }
html[data-cr-mode="enhanced"] .cr-site .cr-overview.cr-overview-story .cr-overview-concepts li:nth-child(3) svg { color: var(--cr-blue); }

/* Readable pastel panels in Calm; richer accents on warm white in Enhanced. */
.cr-site .cr-journey .cr-step:nth-child(1) { --cr-step-fill: var(--cr-sage); --cr-step-accent: var(--cr-teal); }
.cr-site .cr-journey .cr-step:nth-child(2) { --cr-step-fill: var(--cr-lavender); --cr-step-accent: var(--cr-primary); }
.cr-site .cr-journey .cr-step:nth-child(3) { --cr-step-fill: var(--cr-mist); --cr-step-accent: var(--cr-primary); }
html[data-cr-mode="enhanced"] .cr-site .cr-journey .cr-step:nth-child(1) { --cr-step-fill: var(--cr-paper); --cr-step-accent: var(--cr-teal); }
html[data-cr-mode="enhanced"] .cr-site .cr-journey .cr-step:nth-child(2) { --cr-step-fill: var(--cr-paper); --cr-step-accent: var(--cr-purple); }
html[data-cr-mode="enhanced"] .cr-site .cr-journey .cr-step:nth-child(3) { --cr-step-fill: var(--cr-paper); --cr-step-accent: var(--cr-blue); }
.cr-site .cr-journey .cr-step .cr-step-card {
  background: var(--cr-step-fill); border-color: var(--cr-line); box-shadow: inset 0 4px var(--cr-step-accent);
}
.cr-site .cr-journey .cr-step .cr-step-card:hover, .cr-site .cr-journey .cr-step .cr-step-card:focus-within {
  border-color: var(--cr-step-accent); box-shadow: inset 0 4px var(--cr-step-accent);
}
.cr-site .cr-journey .cr-step-top .cr-step-number { color: var(--cr-ink); }
.cr-site .cr-journey .cr-step-top .cr-step-icon { color: var(--cr-primary); }
html[data-cr-mode="enhanced"] .cr-site .cr-journey .cr-step-top .cr-step-number,
html[data-cr-mode="enhanced"] .cr-site .cr-journey .cr-step-top .cr-step-icon { color: var(--cr-step-accent); }
.cr-site .cr-step-card > .cr-step-note { color: var(--cr-ink); }

/* Apricot supports the invitation in Calm; gold marks the active invitation in Enhanced. */
.cr-site .cr-reading-invite-bar .cr-test-tools, .cr-site .cr-reading-invite-bar .cr-test-tools:hover {
  background: var(--cr-apricot); border-color: var(--cr-primary); color: var(--cr-ink) !important; box-shadow: inset 0 -4px var(--cr-apricot);
}
html[data-cr-mode="enhanced"] .cr-site .cr-reading-invite-bar .cr-test-tools,
html[data-cr-mode="enhanced"] .cr-site .cr-reading-invite-bar .cr-test-tools:hover {
  background: var(--cr-primary); border-color: var(--cr-primary); color: var(--cr-paper) !important; box-shadow: inset 0 -4px var(--cr-gold);
}
html[data-cr-mode="enhanced"] .cr-site .cr-reading-invite-bar .cr-test-tools svg { color: var(--cr-gold); }

/* Four reader tools: repeated, recognisable states with readable labels. */
.cr-site .cr-tools-dialog #cr-tab-words { --cr-tool-fill: var(--cr-teal); --cr-tool-text: var(--cr-ink); --cr-tool-line: var(--cr-primary); }
.cr-site .cr-tools-dialog #cr-tab-read { --cr-tool-fill: var(--cr-lavender); --cr-tool-text: var(--cr-ink); --cr-tool-line: var(--cr-primary); }
.cr-site .cr-tools-dialog #cr-tab-simplify { --cr-tool-fill: var(--cr-mist); --cr-tool-text: var(--cr-ink); --cr-tool-line: var(--cr-primary); }
.cr-site .cr-tools-dialog #cr-tab-pictures { --cr-tool-fill: var(--cr-apricot); --cr-tool-text: var(--cr-ink); --cr-tool-line: var(--cr-primary); }
html[data-cr-mode="enhanced"] .cr-site .cr-tools-dialog #cr-tab-words { --cr-tool-fill: var(--cr-teal); --cr-tool-text: var(--cr-paper); --cr-tool-line: var(--cr-teal); }
html[data-cr-mode="enhanced"] .cr-site .cr-tools-dialog #cr-tab-read { --cr-tool-fill: var(--cr-purple); --cr-tool-text: var(--cr-paper); --cr-tool-line: var(--cr-purple); }
html[data-cr-mode="enhanced"] .cr-site .cr-tools-dialog #cr-tab-simplify { --cr-tool-fill: var(--cr-blue); --cr-tool-text: var(--cr-paper); --cr-tool-line: var(--cr-blue); }
html[data-cr-mode="enhanced"] .cr-site .cr-tools-dialog #cr-tab-pictures { --cr-tool-fill: var(--cr-paper); --cr-tool-text: var(--cr-ink); --cr-tool-line: var(--cr-coral); }
html[data-cr-mode] .cr-site .cr-tools-dialog .cr-demo-tab[aria-selected="true"] {
  background: var(--cr-tool-fill); color: var(--cr-tool-text); border-bottom-color: var(--cr-tool-line); box-shadow: inset 0 0 0 1px var(--cr-tool-line);
}
.cr-site .cr-tools-dialog .cr-demo-tab:not([aria-selected="true"]) { color: var(--cr-ink); }
.cr-site .cr-tools-dialog .cr-demo-tab:hover { background: var(--cr-sage); }
html[data-cr-mode] .cr-site .cr-tools-dialog .cr-demo-panel mark { background: var(--cr-apricot); color: var(--cr-ink); border-bottom-color: var(--cr-primary); }
html[data-cr-mode="enhanced"] .cr-site .cr-tools-dialog .cr-demo-panel mark { background: var(--cr-paper); border-bottom-color: var(--cr-gold); box-shadow: inset 0 -3px var(--cr-gold); }
.cr-site .cr-word-definition, .cr-site .cr-simplified { border-left-color: var(--cr-teal); }
.cr-site .cr-preference-panel .cr-view-descriptions p:first-child { border-top-color: var(--cr-teal); }
.cr-site .cr-preference-panel .cr-view-descriptions p:last-child { border-top-color: var(--cr-purple); }

/* The menu, feedback and focus states use the same palette as the page. */
.cr-site .cr-header .cr-mega-panel, .cr-site .cr-header .cr-mega-bottom { border-color: var(--cr-line); }
.cr-site .cr-header .cr-mega-intro { background: var(--cr-sage); }
.cr-site .cr-header .cr-mega-icon { color: var(--cr-primary); }
html[data-cr-mode="enhanced"] .cr-site .cr-header .cr-mega-icon { color: var(--cr-teal); }
html[data-cr-mode="enhanced"] .cr-site .cr-header .cr-mega-link[data-cr-page="how-it-works"] .cr-mega-icon { color: var(--cr-purple); }
html[data-cr-mode="enhanced"] .cr-site .cr-header .cr-mega-link[data-cr-page="accessibility"] .cr-mega-icon { color: var(--cr-blue); }
.cr-site .cr-faq-icon { color: var(--cr-ink); border-color: var(--cr-primary); }
.cr-site .cr-faq-icon::before, .cr-site .cr-faq-icon::after { background: currentColor; }
.cr-site .cr-faq[open] .cr-faq-icon { color: var(--cr-ink); background: var(--cr-teal); }
html[data-cr-mode="enhanced"] .cr-site .cr-faq[open] .cr-faq-icon { color: var(--cr-paper); }
html[data-cr-mode] .cr-site :focus-visible { outline-color: var(--cr-focus); }
.cr-site .cr-remember-label input { accent-color: var(--cr-primary); }
.cr-site .cr-trial, .cr-site .cr-trial-film { background: var(--cr-primary); }
/* Keep real reading motion visible. White copy remains at least 5.42:1 even
   over a pure-white frame beneath this 70% overlay in either sensory view. */
.cr-site .cr-trial-film::after { background: color-mix(in srgb, var(--cr-ink) 70%, transparent); }
.cr-site .cr-trial h2, .cr-site .cr-trial p, .cr-site .cr-trial .cr-button { color: #FFFFFF !important; }

@media (prefers-reduced-motion: reduce) {
  html[data-cr-mode] .cr-site *, html[data-cr-mode] .cr-site *::before, html[data-cr-mode] .cr-site *::after { transition: none !important; animation: none !important; }
}
