/*
 * ORAGO — type scale
 *
 * The canonical scale (--fs-10 / 11 / 12 / 13 / 15 / 18 / 20 / 24 / 32)
 * lives in colors_and_type.css. The legacy aliases (--fs-display, --fs-h1,
 * --fs-body, --fs-small, --fs-micro) are mapped in tokens.extended.css.
 *
 * This file owns:
 *   1. Body-level font defaults (smoothing, ligatures, base size).
 *   2. Helper classes pages reach for (.fs-*, .text-muted, .text-soft, etc.).
 *   3. Dark-mode optical-density tweaks for Barlow on deep surfaces.
 */

body {
    font-size: var(--fs-12);
    line-height: var(--lh-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Helper classes mapped to the canonical scale. The legacy --fs-* aliases
   resolve via tokens.extended.css so existing markup keeps working. */
.fs-display { font-size: var(--fs-24); line-height: 1.2;  font-weight: var(--fw-semi); }
.fs-h1      { font-size: var(--fs-18); line-height: 1.25; font-weight: var(--fw-semi); }
.fs-body    { font-size: var(--fs-12); line-height: var(--lh-normal); font-weight: var(--fw-normal); }
.fs-small   { font-size: var(--fs-11); line-height: 1.4;  font-weight: var(--fw-normal); }
.fs-micro   { font-size: var(--fs-10); line-height: 1.2;  font-weight: var(--fw-medium); }

.text-muted { color: var(--fg-3); }
.text-soft  { color: var(--fg-2); }
.uppercase  { text-transform: uppercase; letter-spacing: var(--tracking-label); }

/* Dark mode: Barlow renders thin against deep surfaces. Bump data-dense
   surfaces (tables, card bodies) to weight 500 so they match the optical
   density of the light theme without changing token values. */
[data-theme="dark"] table.grid td,
[data-theme="dark"] .card-body {
    color: var(--fg-1);
}
[data-theme="dark"] table.grid tbody td {
    font-weight: var(--fw-medium);
}
[data-theme="dark"] table.matrix tbody td:not(.matrix-cell) {
    font-weight: var(--fw-medium);
}
