/* Base element styles, local fonts and accessibility preferences. */
@layer base {
  @font-face {
    font-family: "Geist Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("./vendor/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: "Geist Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("./vendor/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
  @font-face {
    font-family: "Geist Mono Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("./vendor/fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body {
    margin: 0;
    min-height: 100dvh;
    background: var(--page);
    color: var(--text);
    font: var(--type-body);
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }
  body.locked { overflow: hidden; }
  img, svg { display: block; max-width: 100%; }
  img { height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  button:disabled { cursor: not-allowed; }
  a { color: var(--accent); text-underline-offset: 3px; }
  h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
  h1, h2, h3 { text-wrap: balance; }
  ul, ol { padding-left: 1.2em; }
  table { border-collapse: collapse; }
  [hidden] { display: none !important; }
  summary { cursor: pointer; }
  input[type="number"] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .tabular { font-variant-numeric: tabular-nums; }

  :focus { outline: none; }
  :focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
  input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus-ring); }

  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .skip-link {
    position: fixed; z-index: 200; left: var(--s-4); top: -80px;
    padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
    background: var(--white); color: var(--text); box-shadow: var(--shadow-2);
    font: var(--type-headline); text-decoration: none;
  }
  .skip-link:focus-visible { top: var(--s-3); }
  .no-script { padding: var(--s-8); text-align: center; }

  /* Reduced motion: state changes stay instant, the tutorial glow stays static. */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 1ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 1ms !important;
      scroll-behavior: auto !important;
    }
  }

  /* Forced colours: rely on system colours and visible borders. */
  @media (forced-colors: active) {
    :focus-visible { outline: 3px solid Highlight; box-shadow: none; }
    .glass, .panel, .card, .sheet { border: 1px solid CanvasText !important; }
    .is-active, [aria-pressed="true"], [aria-current="step"] { outline: 2px solid Highlight; }
  }
}
