/* ==========================================================================
   Reset + base element styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

:root {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.15s ease, color 0.15s ease;
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

input,
select,
textarea {
  font-size: var(--text-base);
  color: var(--color-text);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img, svg {
  display: block;
  max-width: 100%;
}

::placeholder {
  color: var(--color-text-faint);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Thin, unobtrusive scrollbars for the horizontal-scroll strips */
.scroll-x {
  overflow-x: auto;
  /* Explicit, not the default `visible` — per spec, a non-visible overflow-x
     with overflow-y left as `visible` gets overflow-y silently upgraded to
     `auto` too, so any sub-pixel vertical overflow was sprouting a vertical
     scrollbar these strips never needed. */
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}

.scroll-x::-webkit-scrollbar {
  height: 6px;
}

.scroll-x::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
