/*
 * LessonStack design tokens.
 *
 * Paper and ink with one accent, the cobalt of the Stacks mark. The names are
 * the ones the Cursio academy components paint with, so setting them here is
 * all it takes to brand the catalog and the player. Dark values follow the
 * operating system.
 *
 * Shape rule: buttons are full pills, cards and panels are 16px, inputs 12px.
 */
:root {
  color-scheme: light dark;
  --page: #f6f5f1;
  --surface: #ffffff;
  --tint: #eceae3;
  --ink: #14161f;
  --muted: #555a6b;
  --line: #dedbd2;
  --accent: #1f47d6;
  --accent-ink: #ffffff;
  --accent-soft: #e6ebfd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b0d14;
    --surface: #12151f;
    --tint: #191d2a;
    --ink: #f2f3f7;
    --muted: #a0a6b8;
    --line: #262b3b;
    --accent: #7b9bff;
    --accent-ink: #0a1030;
    --accent-soft: #161f45;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: Geist, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/*
 * A component with a client script is wrapped in a scope element, which would
 * otherwise become the containing block and stop the sticky header travelling.
 */
body > div[data-stx-scope] {
  display: contents;
}
