/* ==========================================================================
   memori — Base / reset
   Element-level defaults only; anything class-based lives in layout.css
   or components.css.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-pad);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

a {
  color: inherit;
}

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

input {
  font-family: inherit;
}

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

/* Icon placeholders and rendered lucide SVGs */
i[data-lucide] {
  display: inline-block;
}

svg.lucide {
  vertical-align: middle;
}

/* Screen-reader helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Slim scrollbars for the demo panes */
.thin-scroll::-webkit-scrollbar {
  width: 8px;
}

.thin-scroll::-webkit-scrollbar-thumb {
  background: var(--hair-strong);
  border-radius: var(--radius-l);
}

.thin-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.thin-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--hair-strong) transparent;
}

/* Skip link — first tab stop */
.skip-link {
  position: fixed;
  top: var(--sp-5);
  left: var(--sp-5);
  z-index: var(--z-toasts);
  padding: var(--sp-4) var(--sp-9);
  background: var(--accent);
  color: var(--ink);
  font: 600 var(--fs-md)/1.2 var(--font-sans);
  text-decoration: none;
  border-radius: var(--radius-s);
  transform: translateY(calc(-100% - var(--sp-8)));
}

.skip-link:focus-visible {
  transform: none;
}

/* No-JS notice — hidden once the module bundle runs (it adds html.js) */
.noscript-note {
  padding: var(--sp-4) var(--sp-6);
  border: 1px solid var(--hair-strong);
  color: var(--soft);
  font-size: var(--fs-md);
  max-width: 72ch;
}

html.js .noscript-note {
  display: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
