/* The brand palette is available before React hydration and without JavaScript.
   Only an explicit pastel preview restores the original styles.
   Logo blue #1d4ed8 / green #00b894. Darker green is used for readable text. */
html:not([data-readable-palette="pastel"]) {
  --brand-blue: #1d4ed8;
  --brand-green: #00b894;
  --brand-green-ink: #08745d;
  --brand-soft: #f4f8fc;
  --brand-tint: #eaf1ff;
  --brand-mint: #e2f6ee;
  --brand-border: #d8e5ef;
  --brand-surface: linear-gradient(115deg, #eaf1ff, #e5f8f0);
  --brand-accent: linear-gradient(100deg, #1d4ed8, #00b894);
  --brand-button: linear-gradient(180deg, #285fe6, #1d4ed8);
}

/* Large surfaces and shared calls to action. */
html:not([data-readable-palette="pastel"]) .readable-home .home-hero::before,
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-benefits, .home-closing, .home-footer, .public-auth-story, .report-intro, .report-score-card, .collectivites-hero, .collectivites-process-section, .collectivites-purchase-section, .collectivites-account-card, .resource-hero, .annex-legal-hero) {
  background: var(--brand-surface);
}
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-button:not(.home-button-light), .rl-header .rl-button:not(.rl-button-ghost), .landing-auth-submit, .collectivites-register-modal .landing-auth-submit),
html:not([data-readable-palette="pastel"]) .collectivites-modern .rl-button:not(.rl-button-outline):not(.rl-button-ghost) {
  border-color: var(--brand-blue);
  background: var(--brand-button);
  color: #fff;
}
html:not([data-readable-palette="pastel"]) .readable-home .home-button-light {
  background: #fff;
  border-color: #c8d9eb;
  color: #15386d;
}
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-section-pill, .feature-tag, .collectivites-offer-label, .report-demo-badge, .public-auth-progress, .report-action-icon, .report-priority-number) {
  background: var(--brand-tint);
  color: #244d93;
}
html:not([data-readable-palette="pastel"]) .home-benefits .home-section-pill { background: #ffffffcf; }
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-journey-row, .home-collectivity-note, .report-reading-note, .landing-auth-tabs, .collectivites-contact-section, .collectivites-intermediate-card, .collectivites-feature-card, .annex-toc, .legal-page__summary, .annex-contact-card, .annex-mail-ready) {
  background: var(--brand-soft);
  border-color: var(--brand-border);
}
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-pricing .rl-price-card.is-featured, .collectivites-offer-card.is-featured) {
  background: var(--brand-surface);
  border-color: #bbdece;
}
html:not([data-readable-palette="pastel"]) .home-billing-choice button[aria-pressed="true"] {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* Charts retain their underlying values and semantic warning colours. */
html:not([data-readable-palette="pastel"]) :is(.home-bars span, .feature-bars > div > span, .home-closing-bars > div > span) {
  background: linear-gradient(160deg, #c8dbfb, #bfeadc);
}
html:not([data-readable-palette="pastel"]) :is(.home-bars span.is-highlight, .feature-bars > div > span.is-accent, .home-closing-bars > div > span.is-accent, .feature-priority-track i, .feature-progress-track i, .public-auth-preview-track span, .report-score-track i) {
  background: var(--brand-accent);
}
html:not([data-readable-palette="pastel"]) :is(.feature-priority-track, .feature-progress-track, .public-auth-preview-track) { background: #e9f1f5; }
html:not([data-readable-palette="pastel"]) :is(#home-line-gradient, #home-gauge-gradient, #feature-insight-gradient, #feature-portfolio-gradient, #closing-gauge-gradient) stop { stop-color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) :is(#home-line-gradient, #home-gauge-gradient, #feature-insight-gradient, #feature-portfolio-gradient, #closing-gauge-gradient) stop:last-child { stop-color: var(--brand-green); }
html:not([data-readable-palette="pastel"]) #home-line-gradient stop:nth-child(2) { stop-color: #258fab; }
html:not([data-readable-palette="pastel"]) .report-site-score i {
  background: linear-gradient(90deg, var(--brand-blue) var(--report-score), #e9f1f5 var(--report-score));
}

/* Decorative icons and illustration surfaces. */
html:not([data-readable-palette="pastel"]) .readable-home :is(.feature-symbol, .feature-avatar, .feature-site-avatar, .home-site-icon):is(.is-purple, .is-blue) {
  color: var(--brand-blue); background: var(--brand-tint);
}
html:not([data-readable-palette="pastel"]) .readable-home :is(.feature-symbol, .feature-avatar, .feature-site-avatar, .home-site-icon).is-pink {
  color: var(--brand-green-ink); background: var(--brand-mint);
}
html:not([data-readable-palette="pastel"]) .readable-home :is(.feature-benefit-icon, .collectivites-icon) {
  color: var(--brand-blue); background: linear-gradient(145deg, #f0f6ff, #bfd6ff);
}
html:not([data-readable-palette="pastel"]) .feature-benefit-icon.is-purple {
  color: var(--brand-green-ink); background: linear-gradient(145deg, #effbf6, #a8e3cd);
}
html:not([data-readable-palette="pastel"]) .readable-home :is(.feature-task.is-highlighted, .feature-assignment, .feature-portfolio-label, .journey-evidence-file) { background: var(--brand-surface); }
html:not([data-readable-palette="pastel"]) .readable-home .feature-tag.is-green { background: var(--brand-mint); color: var(--brand-green-ink); }
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-audiences .feature-icon, .feature-task .feature-icon, .feature-priority-row > .feature-icon, .feature-checklist li > .feature-icon, .feature-checklist-heading .feature-icon, .journey-team-heading .feature-icon, .home-usecase-head > .feature-icon, .report-kpis dt .feature-icon) { color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-audiences li:nth-child(even) .feature-icon, .feature-checklist li:nth-child(even) > .feature-icon, .home-journey-checks .feature-icon) { color: var(--brand-green-ink); border-color: #89baa9; }
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-resource-art, .annex-article-art) { background: linear-gradient(135deg, #d1e1ff, #d9f4e8); }
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-resource-art.is-standards, .annex-article-art.is-keyboard) { background: linear-gradient(135deg, #c9ddfa, #ebf4ff); }
html:not([data-readable-palette="pastel"]) .readable-home :is(.home-resource-art.is-practice, .annex-article-art.is-link) { background: linear-gradient(135deg, #d9f4e8, #b9e6d8); }
html:not([data-readable-palette="pastel"]) .readable-home :is(.resource-art-symbol, .annex-article-art svg) { color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) .resource-art-stamp { background: #bde9d9; color: var(--brand-green-ink); }
html:not([data-readable-palette="pastel"]) .resource-art-sheet > i { background: #d3e1f0; }
html:not([data-readable-palette="pastel"]) .resource-art-dot { background: linear-gradient(135deg, #fff, #9bdcc8); }

/* Forms, report navigation, and annex pages. */
html:not([data-readable-palette="pastel"]) .readable-home :is(.landing-auth-link, .landing-auth-legal a, .landing-auth-modal-eyebrow, .home-journey-step, .feature-text-link, .report-eyebrow, .report-summary-heading button, .report-action-card .report-action-site, .annex-toc a:hover, .resource-content a:not(.home-button), .collectivites-contact-email a, .collectivites-purchase-list a) { color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) .readable-home .landing-auth-field input:focus,
html:not([data-readable-palette="pastel"]) .annex-contact-form :is(input, select, textarea):focus { border-color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) .annex-page :is(.legal-inline-link, .legal-section a, .annex-contact-card a, .annex-contact-card > .feature-icon, .annex-contact-privacy a, .annex-mail-ready a) { color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) .annex-page .legal-table th { background: var(--brand-tint); color: #244d93; }
html:not([data-readable-palette="pastel"]) .readable-home .report-tabs button[aria-selected="true"] { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) .collectivites-modern .collectivites-register-modal .landing-auth-modal-panel { background: #f6fafc; }
html:not([data-readable-palette="pastel"]) .collectivites-modern .collectivites-register-modal .landing-auth-tab.is-active { background: var(--brand-tint); color: var(--brand-blue); }
html:not([data-readable-palette="pastel"]) .annex-page .resource-steps li::before,
html:not([data-readable-palette="pastel"]) .readable-home :is(.annex-nav a[aria-current="page"], .annex-nav a:hover, .resource-release-heading span, .resource-levels strong, .resource-card-grid article > span, .resource-article-grid article > span, .resource-content .rl-button, .report-sites-table thead, .report-sites-table tfoot, .collectivites-card-line > span, .collectivites-process-list li > span) {
  background: var(--brand-tint); color: #244d93; border-color: var(--brand-border);
}
html:not([data-readable-palette="pastel"]) .annex-page :is(.resource-steps li, .resource-card-grid article, .resource-article-grid article, .resource-levels p, .resource-links a, .annex-callout) { background: var(--brand-soft); border-color: var(--brand-border); }
html:not([data-readable-palette="pastel"]) .annex-callout { border-left-color: var(--brand-green); }
html:not([data-readable-palette="pastel"]) .annex-toc > p { color: #626b7b; }
html:not([data-readable-palette="pastel"]) .public-flow {
  --blue: #1d4ed8; --line: #d8e5ef; --bg: #f4f8fc;
  --invitation-bg: #f4f8fc; --invitation-primary: #1d4ed8; --invitation-border: #d8e5ef;
}
html:not([data-readable-palette="pastel"]) .public-flow :is(.result-hero, .summary-hero, .invitation-page, .manual-session-header, .public-flow-footer) { background: var(--brand-surface); }
html:not([data-readable-palette="pastel"]) .public-flow :is(.primary-link, .invitation-form button) { background: var(--brand-button); border-color: var(--brand-blue); }

/* Local comparison control; it never changes layout or appears in print. */
.public-palette-preview { position: fixed; z-index: 40; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); }
.public-palette-preview button { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 16px; border: 1px solid #d9e0e9; border-radius: 99px; background: #fffffff5; box-shadow: 0 3px 18px #142b4b15; color: #26334b; font: 12px/1.4 Arial, Helvetica, sans-serif; cursor: pointer; }
.public-palette-preview button::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, #1d4ed8 50%, #00b894 50%); }
html:not([data-readable-palette="pastel"]) .public-palette-preview button::before { background: linear-gradient(135deg, #d9b6ee 50%, #f6cfc0 50%); }
.public-palette-preview button:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 3px; }
body[data-public-menu-open="true"] .public-palette-preview { visibility: hidden; }
@media print { .public-palette-preview { display: none; } }
