/* Base da UI compartilhada (contrato §4). Sem cor literal e sem color-scheme: ambos vêm de tokens.css. */

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

html { scroll-behavior: smooth; }

body {
  background: var(--ui-bg);
  color: var(--ui-ink);
  font: 400 var(--ui-fs-body)/var(--ui-lh-body) var(--ui-font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--ui-selection); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ui-scrollbar);
  border: 2px solid var(--ui-bg);
  border-radius: var(--ui-radius-card);
}
:root[data-eln-theme="cdi-night"] ::-webkit-scrollbar-thumb { border-radius: var(--ui-radius-sm); }

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

[hidden] { display: none !important; }

.ui-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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