/* Typography System — UI Comprehensive Refactor v2
 * Requires tokens.css to be loaded first.
 * Inter loaded via Google Fonts link in each HTML page.
 * Changes from v1: expanded scale (2xs/4xl), weight tokens,
 *   line-relaxed, tracking-caps, new semantic classes.
 */

:root {
  /* ── Font family ── */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', 'Monaco', monospace;

  /* ── Type scale ── */
  --font-2xs:  11px;   /* CAPS sidebar groups, table column headers */
  --font-xs:   12px;   /* eyebrow caps, microcopy */
  --font-sm:   13px;   /* secondary text, table cells */
  --font-base: 14px;   /* body default, form inputs, nav links */
  --font-md:   16px;   /* card titles */
  --font-lg:   18px;   /* section subtitles */
  --font-xl:   22px;   /* page titles (settings-style) */
  --font-2xl:  28px;   /* page titles (dashboard-style) */
  --font-3xl:  36px;   /* KPI card values */
  --font-4xl:  48px;   /* hero h1 (about-style manifesto) */

  /* ── Weights ── */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;

  /* ── Line heights ── */
  --line-tight:   1.15;
  --line-snug:    1.3;
  --line-base:    1.5;
  --line-relaxed: 1.65;

  /* ── Letter spacing ── */
  --tracking-eyebrow: 0.08em;
  --tracking-caps:    0.06em;
  --tracking-tight:   -0.02em;
}

/* Apply Inter across app pages */
body {
  font-family: var(--font-family);
}

/* ── Semantic typography classes ─────────────────────────────────────────── */

/* Eyebrow caps — standard */
.eyebrow {
  font-size: var(--font-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Eyebrow caps — compact (sidebar groups, table headers) */
.eyebrow-sm {
  font-size: var(--font-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Page title — default (settings-style, 28px) */
.page-title {
  font-size: var(--font-2xl);
  font-weight: var(--weight-semi);
  line-height: var(--line-tight);
  color: var(--text-primary);
  margin: 0;
}

/* Page title — large (dashboard hero, 36px) */
.page-title--lg {
  font-size: var(--font-3xl);
}

/* Page title — hero (about-style manifesto, 48px) */
.page-title--hero {
  font-size: var(--font-4xl);
  letter-spacing: var(--tracking-tight);
}

/* Page subtitle */
.page-subtitle {
  font-size: var(--font-base);
  color: var(--text-secondary);
  line-height: var(--line-base);
  margin: 8px 0 0 0;
}

/* Section title */
.section-title {
  font-size: var(--font-xl);
  font-weight: var(--weight-semi);
  line-height: var(--line-snug);
  color: var(--text-primary);
  margin: 0;
}

/* Card title */
.card-title {
  font-size: var(--font-md);
  font-weight: var(--weight-semi);
  color: var(--text-primary);
  line-height: var(--line-snug);
  margin: 0;
}

/* Card description / supporting text under card title */
.card-description {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: var(--line-base);
}

/* Body text */
.body    { font-size: var(--font-base); color: var(--text-primary);   line-height: var(--line-base); }
.body-sm { font-size: var(--font-sm);   color: var(--text-secondary); line-height: var(--line-base); }
.body-xs { font-size: var(--font-xs);   color: var(--text-muted);     line-height: var(--line-base); }

/* Field hint / meta — lowest-priority muted microcopy (same role family, two names) */
/* §1 row 9 + row 18 — helper text under a field, small counts, separators */
.field-hint,
.meta {
  font-size: var(--font-xs);          /* 12px */
  font-weight: var(--weight-regular); /* 400 */
  line-height: 1.4;                   /* tighter than --line-base (1.5) on purpose */
  color: var(--text-muted);
}

/* Data / numeric value — 13px semi-bold for table values, metrics, subscriber counts */
/* §1 row 11 — replaces 12/13/13.6/15px orphans */
.data-value {
  font-size: var(--font-sm);          /* 13px */
  font-weight: var(--weight-semi);    /* 600 */
  line-height: var(--line-snug);      /* 1.3 */
  color: var(--text-primary);
}

/* Mono variant — code/prompt-preview blocks */
.data-value--mono {
  font-family: var(--font-mono);
  font-weight: var(--weight-regular); /* 400 — mono at 600 is too heavy */
}
