/* Base layer: reset + quality-floor rules (UI_GUIDELINES Pillars 1-2).
   Mobile-first. Media queries only widen. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }

/* Quality floor: visible keyboard focus, everywhere */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Quality floor: touch targets */
button, [role="button"], a.button, input[type="checkbox"], input[type="radio"] {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
}

/* Quality floor: reduced motion respected */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsiveness: tables never break the page on small screens */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }


/* Skeleton placeholder (no layout shift: set explicit dimensions in use) */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-surface) 25%, var(--color-bg) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.2s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-wave { to { background-position: -200% 0; } }
