/* Reset + typography + utilities */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button, input, select, textarea { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 3px; }
img, video, canvas { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* Typography */
.t-metric { font-size: var(--fs-metric); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.t-page-title { font-size: var(--fs-page-title); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
.t-section-title { font-size: var(--fs-section-title); font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; }
.t-component-title { font-size: var(--fs-component-title); font-weight: 600; line-height: 1.5; }
.t-body { font-size: var(--fs-body); line-height: 1.6; }
.t-secondary { font-size: var(--fs-secondary); color: var(--text-secondary); line-height: 1.5; }
.t-caption { font-size: var(--fs-caption); font-weight: 500; color: var(--text-secondary); line-height: 1.5; }
.t-strong { font-weight: 600; }
.t-muted { color: var(--text-secondary); }
.t-error { color: var(--error); }
.t-success { color: var(--success); }
.t-brand { color: var(--brand); }
.t-center { text-align: center; }
.t-right { text-align: right; }
.t-nowrap { white-space: nowrap; }
.t-break { word-break: keep-all; overflow-wrap: anywhere; }

/* Layout utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.w-full { width: 100%; }
.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; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

.hide-mobile { display: initial; }
.show-mobile { display: none; }
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { font-size: 16px; }
}
