/* AI Buying Concierge: base styles
   Reset, type styles (one class per Figma text style), focus, and the theme switch. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg-canvas);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] { display: none !important; }

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

button { font: inherit; color: inherit; }

a { color: var(--color-text-accent); text-underline-offset: 3px; }

/* Focus: a 2px orchid ring outside the element */
:focus-visible {
  outline: var(--border-width-focus) solid var(--color-border-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: var(--space-3); top: -64px; z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  background: var(--color-bg-inverse); color: var(--color-text-inverse);
}
.skip-link:focus { top: var(--space-3); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Type styles */
.t-display { font-size: var(--font-size-3xl); line-height: 46px; font-weight: 600; letter-spacing: -0.8px; }
.t-h1 { font-size: var(--font-size-2xl); line-height: 38px; font-weight: 600; letter-spacing: -0.5px; }
.t-h2 { font-size: var(--font-size-xl); line-height: 30px; font-weight: 600; letter-spacing: -0.3px; }
.t-h3 { font-size: var(--font-size-lg); line-height: 24px; font-weight: 600; }
.t-body-lg { font-size: var(--font-size-lg); line-height: 28px; }
.t-body-md { font-size: var(--font-size-md); line-height: 24px; }
.t-body-sm { font-size: var(--font-size-sm); line-height: 20px; }
.t-label-md { font-size: var(--font-size-md); line-height: 20px; font-weight: 500; }
.t-label-sm { font-size: var(--font-size-sm); line-height: 18px; font-weight: 500; }
.t-label-xs { font-size: var(--font-size-xs); line-height: 16px; font-weight: 600; letter-spacing: 0.2px; }
.t-data-md { font-family: var(--font-mono); font-size: var(--font-size-sm); line-height: 20px; }
.t-data-sm { font-family: var(--font-mono); font-size: 13px; line-height: 18px; }
.t-data-price { font-family: var(--font-mono); font-size: var(--font-size-lg); line-height: 24px; font-weight: 500; }

@media (max-width: 640px) {
  .t-display { font-size: var(--font-size-2xl); line-height: 38px; }
}

.text-secondary { color: var(--color-text-secondary); }
.text-accent { color: var(--color-text-accent); }

/* Theme switch */
.theme-toggle {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--size-touch-min); padding: 0 var(--space-4);
  border: var(--border-width) solid var(--color-border-control); border-radius: var(--radius-full);
  background: var(--color-bg-surface); color: var(--color-text-primary);
  font-size: var(--font-size-sm); font-weight: 500; cursor: pointer;
}
.theme-toggle:hover { background: var(--color-bg-hover); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

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