/**
 * SmartCare AI — Base Stylesheet (2027 Baseline Architecture)
 */

@layer reset, tokens, base, components, utilities;

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

  html {
    -webkit-text-size-adjust: 100%;
    font-family: var(--font-sans);
    scrollbar-color: var(--line-field) transparent;
    scrollbar-width: thin;
  }

  body {
    margin: 0;
    background-color: var(--surface-page);
    color: var(--ink-base);
    font-family: var(--font-sans);
    font-size: var(--text-body-md);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3, h4, p, ul, ol, figure {
    margin: 0;
  }

  button, input, select, textarea {
    font: inherit;
    color: inherit;
  }

  button {
    cursor: pointer;
    border: 0;
    background: none;
  }

  img, svg {
    display: block;
    max-width: 100%;
  }
}

@layer base {
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2.5px solid var(--focus-ring);
    outline-offset: 2px;
  }

  .tabular-nums {
    font-variant-numeric: tabular-nums;
  }

  .font-mono {
    font-family: var(--font-mono);
  }

  .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;
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}
