/* Ragafied design tokens. Canonical source for Rails and React. See design/design-system.md. */
:root {
  color-scheme: light;
  --color-paper: #fbf7ef;
  --brand-logo-filter: none;
  --color-audience-learners: #f5ecdd;
  --color-audience-teachers: #f0e6d7;
  --color-surface: #fffaf2;
  --color-surface-raised: #f1e7d9;
  --color-surface-hover: #e9dcc9;
  --color-ink: #29150b;
  --color-ink-soft: #6a5b4e;
  --color-muted: #6a5b4e;
  --color-neutral: #7b6b5d;
  --color-rule: #ded1bf;
  --color-rule-strong: #aa9380;
  --color-button: #29150b;
  --color-button-ink: #fff6e9;
  --color-accent: #754522;
  --color-accent-soft: #f4e4cf;
  --color-accent-ink: #fffaf2;
  --color-focus: #754522;
  --color-error: #b42318;
  --color-error-surface: #fff0ee;
  --color-success: #217346;
  --color-success-surface: #edf7f0;
  --color-guru: oklch(60% 0.17 42);
  --color-guru-soft: oklch(92% 0.035 42);
  --color-student: oklch(51% 0.105 188);
  --color-student-soft: oklch(91% 0.03 188);
  --color-slide: oklch(58% 0.17 244);
  --color-slide-soft: oklch(94% 0.032 244);
  --color-title: oklch(60% 0.16 344);
  --color-title-soft: oklch(95% 0.028 344);
  --color-overlay: oklch(15% 0.012 250 / 0.4);
  --color-glass: rgb(251 247 239 / .72);
  --color-shadow: oklch(20% 0.015 250 / 0.11);
  --color-shadow-float: oklch(20% 0.015 250 / 0.16);

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-data: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 9rem;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.25rem;
  --text-lg: 1.5625rem;
  --text-xl: 1.953rem;
  --text-2xl: 2.441rem;
  --text-3xl: 3.052rem;
  --text-display: clamp(2.4rem, 4.5vw, 4.25rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 200ms;
  --dur-long: 420ms;

  --rule-hairline: 0.0625rem;
  --radius-small: 0.625rem;
  --radius-medium: 1rem;
  --radius-large: 1.5rem;
  --radius-round: 999px;

  --color-paper-2: var(--color-surface);
  --color-paper-3: var(--color-surface-raised);
  --color-accent-strong: #573019;
  --color-error-paper: var(--color-error-surface);
  --color-success-paper: var(--color-success-surface);
  --color-focus-inner: var(--color-surface);
  --font-mono: var(--font-data);
  --text-4xl: 3.815rem;
  --shell-width: 70rem;
  --page-gutter: clamp(1.5rem, 4vw, 3rem);
  --section-space: clamp(4.5rem, 8vw, 7.5rem);
  --header-height: 4rem;
  --control-height: 2.75rem;
  --control-height-small: 2.5rem;
  --control-padding: 1.5rem;
  /* The drop-down chevron (controls.css). The grey reads on light and dark surfaces. */
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8b8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --select-chevron-size: 1rem;
  --select-chevron-inset: 1rem;
  --shadow-surface: 0 1px 3px rgb(0 0 0 / 0.04), 0 8px 28px rgb(0 0 0 / 0.04);
  --shadow-overlay: 0 12px 40px rgb(0 0 0 / 0.14);

  --z-base: 1;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-studio-theme="light"]) {
  color-scheme: dark;
  --color-paper: #21140e;
  --brand-logo-filter: brightness(0) invert(1);
  --color-audience-learners: #35251a;
  --color-audience-teachers: #35251a;
  --color-surface: #2c1d14;
  --color-surface-raised: #37271c;
  --color-surface-hover: #463225;
  --color-ink: #fbf0de;
  --color-ink-soft: #ccbaa5;
  --color-muted: #ccbaa5;
  --color-neutral: #baa68f;
  --color-rule: #594330;
  --color-rule-strong: #947a5f;
  --color-button: #e8b87b;
  --color-button-ink: #29150b;
  --color-accent: #e8b87b;
  --color-accent-strong: #f4cea0;
  --color-accent-soft: #483020;
  --color-accent-ink: #21140e;
  --color-focus: #e8b87b;
  --color-error: #ffb4ab;
  --color-error-surface: #3b2324;
  --color-success: #88d6a7;
  --color-success-surface: #1c3226;
  --color-overlay: rgb(0 0 0 / 0.65);
  --color-glass: rgb(33 20 14 / .82);
  --shadow-surface: 0 1px 3px rgb(0 0 0 / 0.12), 0 8px 28px rgb(0 0 0 / 0.12);
  --shadow-overlay: 0 12px 40px rgb(0 0 0 / 0.35);
  }
}
:root[data-theme="dark"]:not([data-studio-theme="light"]), :root[data-studio-theme="dark"] {
  color-scheme: dark;
  --color-paper: #21140e;
  --brand-logo-filter: brightness(0) invert(1);
  --color-audience-learners: #35251a;
  --color-audience-teachers: #35251a;
  --color-surface: #2c1d14;
  --color-surface-raised: #37271c;
  --color-surface-hover: #463225;
  --color-ink: #fbf0de;
  --color-ink-soft: #ccbaa5;
  --color-muted: #ccbaa5;
  --color-neutral: #baa68f;
  --color-rule: #594330;
  --color-rule-strong: #947a5f;
  --color-button: #e8b87b;
  --color-button-ink: #29150b;
  --color-accent: #e8b87b;
  --color-accent-strong: #f4cea0;
  --color-accent-soft: #483020;
  --color-accent-ink: #21140e;
  --color-focus: #e8b87b;
  --color-error: #ffb4ab;
  --color-error-surface: #3b2324;
  --color-success: #88d6a7;
  --color-success-surface: #1c3226;
  --color-overlay: rgb(0 0 0 / 0.65);
  --color-glass: rgb(33 20 14 / .82);
  --shadow-surface: 0 1px 3px rgb(0 0 0 / 0.12), 0 8px 28px rgb(0 0 0 / 0.12);
  --shadow-overlay: 0 12px 40px rgb(0 0 0 / 0.35);
}

/* Explicit choices also apply when the operating system prefers dark mode. */
:root[data-theme="light"]:not([data-studio-theme="dark"]), :root[data-studio-theme="light"] {
  color-scheme: light;
  --color-paper: #fbf7ef;
  --brand-logo-filter: none;
  --color-audience-learners: #f5ecdd;
  --color-audience-teachers: #f0e6d7;
  --color-surface: #fffaf2;
  --color-surface-raised: #f1e7d9;
  --color-surface-hover: #e9dcc9;
  --color-ink: #29150b;
  --color-ink-soft: #6a5b4e;
  --color-muted: #6a5b4e;
  --color-neutral: #7b6b5d;
  --color-rule: #ded1bf;
  --color-rule-strong: #aa9380;
  --color-button: #29150b;
  --color-button-ink: #fff6e9;
  --color-accent: #754522;
  --color-accent-soft: #f4e4cf;
  --color-accent-ink: #fffaf2;
  --color-focus: #754522;
  --color-error: #b42318;
  --color-error-surface: #fff0ee;
  --color-success: #217346;
  --color-success-surface: #edf7f0;
  --color-guru: oklch(60% 0.17 42);
  --color-guru-soft: oklch(92% 0.035 42);
  --color-student: oklch(51% 0.105 188);
  --color-student-soft: oklch(91% 0.03 188);
  --color-slide: oklch(58% 0.17 244);
  --color-slide-soft: oklch(94% 0.032 244);
  --color-title: oklch(60% 0.16 344);
  --color-title-soft: oklch(95% 0.028 344);
  --color-overlay: oklch(15% 0.012 250 / 0.4);
  --color-glass: rgb(251 247 239 / .72);
  --color-shadow: oklch(20% 0.015 250 / 0.11);
  --color-shadow-float: oklch(20% 0.015 250 / 0.16);
  --color-paper-2: var(--color-surface);
  --color-paper-3: var(--color-surface-raised);
  --color-accent-strong: #573019;
  --color-error-paper: var(--color-error-surface);
  --color-success-paper: var(--color-success-surface);
  --color-focus-inner: var(--color-surface);
  --shadow-surface: 0 1px 3px rgb(0 0 0 / 0.04), 0 8px 28px rgb(0 0 0 / 0.04);
  --shadow-overlay: 0 12px 40px rgb(0 0 0 / 0.14);
}
