/**
 * base.css — Global Reset & Utilities
 * Imports variables.css first; all values use CSS custom properties.
 */

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

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;      /* 14px */
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App shell ──────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Scrollbars ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(0 0 0 / 0.08);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb {
  background: rgba(255 255 255 / 0.35);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255 255 255 / 0.55);
}

/* ── Utility: screen-reader only ────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Utility: icon button ───────────────────────────────────── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  line-height: 1;
  font-size: 1rem;
}

.btn-icon:hover {
  background-color: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.btn-icon:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}
