/*
 * Base styles: reset, typography and element defaults. No layout or component rules here.
 */

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

code, pre, kbd { font-family: var(--font-mono); }

kbd {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
}

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

/* Inline SVG icons injected by js/icons.js */
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] svg { width: 18px; height: 18px; }

.muted { color: var(--muted); }

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* The hidden attribute always wins over component display rules (e.g. .nav-item is flex). */
[hidden] { display: none !important; }

/* Scrollbars: thin and themed everywhere (sidebar lists, chat thread, tables, code, dialogs). */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb); border-radius: 999px;
  border: 3px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
*::-webkit-scrollbar-corner { background: transparent; }
