/* Tremulations identity tokens. Research semantic colors remain separate. */
:root {
  --ci-accent: #10b981; --ci-indigo: #4f46e5; --ci-lavender: #a5b4fc; --ci-navy: #0f172a;
  --ci-paper: #faf9f6; --ci-surface: #fff; --ci-ink: #0f172a;
  --ci-primary: #4f46e5; --ci-muted: #64748b; --ci-line: #e3e2eb;
  --ci-soft: #f0edfb; --ci-focus: #4f46e5;
  --ci-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ci-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --ci-paper: #111827; --ci-surface: #1b2435; --ci-ink: #f4f2fa;
  --ci-primary: #a5b4fc; --ci-muted: #b5bfcf; --ci-line: #354057;
  --ci-soft: #302c48; --ci-focus: #a5b4fc;
  color-scheme: dark;
}
.ci-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ci-ink); font: 650 21px/1 var(--ci-sans); letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.ci-mark { display: inline-flex; flex: none; width: 32px; height: 32px; }
.ci-mark img { width: 100%; height: 100%; }
.ci-mark .ci-mark--dark { display: none; }
html[data-theme="dark"] .ci-mark .ci-mark--light { display: none; }
html[data-theme="dark"] .ci-mark .ci-mark--dark { display: block; }
.ci-mark.ci-mark--inverse .ci-mark--light { display: none; }
.ci-mark.ci-mark--inverse .ci-mark--dark { display: block; }
.ci-brand--inverse { color: #f4f2fa; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --ci-paper: #111827; --ci-surface: #1b2435; --ci-ink: #f4f2fa;
    --ci-primary: #a5b4fc; --ci-muted: #b5bfcf; --ci-line: #354057;
    --ci-soft: #302c48; --ci-focus: #a5b4fc; color-scheme: dark;
  }
  html:not([data-theme="light"]) .ci-mark .ci-mark--light { display: none; }
  html:not([data-theme="light"]) .ci-mark .ci-mark--dark { display: block; }
}
@media (forced-colors: active) {
  .ci-mark img { display: none !important; }
  .ci-mark { background: CanvasText; mask: url('./assets/identity/mark-mono.svg') center / contain no-repeat; }
}

html[data-theme="light"] {
--color-canvas: #F6F7F5;
--color-surface: #FFFFFF;
--color-surface-subtle: #F7F4EE;
--color-surface-elevated: #FFFFFF;
--color-text-primary: #0f172a;
--color-text-secondary: #667085;
--color-text-tertiary: #8A93A1;
--color-border: #E2E5E8;
--color-divider: #E2E5E8;
--color-accent: #40548F;
--color-on-accent: #FFFFFF;
--color-accent-soft: #E8ECF7;
--color-focus-ring: #4D63A6;
--color-success: #7FA274;
--color-on-success: #FFFFFF;
--color-success-soft: #EDF4E9;
--color-sage: #7FA274;
--color-sage-soft: #EDF4E9;
--color-copper: #A96F55;
--color-warning: #946200;
--color-on-warning: #FFFFFF;
--color-warning-soft: #FFF4D6;
--color-danger: #B42318;
--color-on-danger: #FFFFFF;
--color-danger-soft: #FDECEA;
--color-info: #2563EB;
--color-info-soft: #E8F1FF;
--color-generated-foreground: #445B70;
--color-generated-background-subtle: #EEF3F6;
--color-generated-border: #748694;
--color-unresolved-foreground: #5C4B82;
--color-unresolved-background-subtle: #F3EFF9;
--color-unresolved-border: #917DAF;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
--color-canvas: #11151D;
--color-surface: #171C26;
--color-surface-subtle: #202735;
--color-surface-elevated: #1D2330;
--color-text-primary: #F1F3F7;
--color-text-secondary: #B5BDCA;
--color-text-tertiary: #8993A3;
--color-border: #2C3442;
--color-divider: #2C3442;
--color-accent: #8E9AD4;
--color-on-accent: #11151D;
--color-accent-soft: #292F50;
--color-focus-ring: #A4AEE2;
--color-success: #92B98A;
--color-on-success: #11151D;
--color-success-soft: #223528;
--color-sage: #92B98A;
--color-sage-soft: #223528;
--color-copper: #C39175;
--color-warning: #F4C152;
--color-on-warning: #0E141D;
--color-warning-soft: #3A2E14;
--color-danger: #FF8A80;
--color-on-danger: #0E141D;
--color-danger-soft: #421F23;
--color-info: #8CB4FF;
--color-info-soft: #1B3153;
--color-generated-foreground: #B2C3D2;
--color-generated-background-subtle: #1D2A34;
--color-generated-border: #617584;
--color-unresolved-foreground: #D0BDF2;
--color-unresolved-background-subtle: #2A2238;
--color-unresolved-border: #846B9F;
}
/* Public identity: keep the accepted editorial hierarchy and content. */
.ci-public { --paper: var(--ci-paper); --paper-ink: var(--ci-ink); --paper-muted: var(--ci-muted); --ink: var(--ci-ink); --muted: var(--ci-muted); --line: var(--ci-line); }
.ci-public, .ci-public.release-signup { background: var(--ci-paper); color: var(--ci-ink); }
.ci-environment-label { display: block; margin-top: 5px; color: var(--ci-muted); font: 400 11px/1.2 var(--ci-sans); letter-spacing: 0; }
.ci-public .ci-brand { font: 650 23px/1 var(--ci-sans); letter-spacing: -.035em; }
.ci-public .ci-mark { width: 44px; height: 44px; }
.ci-public .landing-brand h1 { font: 650 24px/1 var(--ci-sans); color: var(--ci-ink); }
.ci-public .landing-brand .landing-tagline { color: var(--ci-muted); }
.ci-public .footer-brand { font-family: var(--ci-sans); font-weight: 650; }
.ci-public .mobile-nav summary { min-width: 44px; min-height: 44px; align-content: center; }
html[data-theme="dark"] .ci-public :is(.path-section, .site-footer, .sources-section, .practice-section) { background: var(--ci-surface); border-color: var(--ci-line); }
html[data-theme="dark"] .ci-public :is(.story p, .path-intro p, .environment-copy p, .path-list p, .path-list li > span, .path-list b, .section-number, .environment-overline, .environment-bottom, .footer-inner, .footer-brand, .legal-meta, .signup-note, .signup-login, .public-legal-footer, .hero-statement, .hero-after, .access-prompt, .editorial-detail, .about-layout, .method-section, .practice-layout, .locale-switch a, .header-nav a) { color: var(--ci-muted); }
html[data-theme="dark"] .ci-public :is(.text-link, .access-prompt a, .locale-switch a[aria-current], .landing-nav > a, .locale-btn--active) { color: var(--ci-primary); }
html[data-theme="dark"] .ci-public :is(.reading-figure, .reading-page, .signup-card) { background: var(--ci-surface); color: var(--ci-ink); border-color: var(--ci-line); }
html[data-theme="dark"] .ci-public :is(.reading-margin, .reading-context, .reading-topline, .reading-reference strong, .reading-figure figcaption, .signup-card h1, .signup-card h2, .signup-consent) { color: var(--ci-ink); }
html[data-theme="dark"] .ci-public :is(.reading-kicker, .reading-reference small) { color: var(--ci-primary); }
@media (max-width: 620px) {
  .ci-public .ci-brand { font-size: 18px; gap: 6px; }
  .ci-public .ci-mark { width: 32px; height: 32px; }
  .ci-public .landing-brand h1 { font-size: 18px; }
  .ci-public .header-login { min-height: 44px; }
}
.ci-public .footer-inner > a.ci-brand:first-child { font: 650 21px/1 var(--ci-sans); }
html[data-theme="dark"] .ci-public :is(.source-section, .about-section) { background: var(--ci-surface); border-color: var(--ci-line); }
html[data-theme="dark"] .ci-public :is(.source-example, .source-example span, .method-reference, .practice-side .ai-note, .hero-after a, .environment-overline, .section-index) { color: var(--ci-muted); }
html[data-theme="dark"] .ci-public.release-signup .signup-card > p:not(.signup-note):not(.signup-login) { color: var(--ci-muted); }
html[data-theme="dark"] .ci-public.release-signup :is(.signup-consent a, .signup-login a, .signup-note a, .public-legal-footer a) { color: var(--ci-primary); }
