/* =========================================================
   Shared base — reset and element defaults common to every app.
   Load after tokens.css, before the app's own stylesheet.
   Component styles live in each app, not here.
   ========================================================= */
* { box-sizing: border-box; }

/* `hidden` must win over component `display` rules — author styles otherwise
   beat the UA's [hidden] rule and the element stays on screen. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  overscroll-behavior-y: none;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type="number"],
input[type="text"],
input[type="search"],
input[type="date"],
input[type="time"] {
  font-family: var(--font-mono);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
