/*
 * Shared typography for Market, Licence, learning and Admin.
 * Source: frontend-shared/site-typography.css
 * Publish the identical assets and page links with Sync-SiteTypography.ps1.
 * Only font selection changes here. Page sizes, weights and spacing remain
 * owned by their components. A named layer resolves old !important families
 * without another chain of increasingly specific component overrides.
 */
@font-face {
  font-family: "Nunito Sans Local";
  src: url("../fonts/nunito-sans-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --site-font-body: "Nunito Sans Local", "Segoe UI", Tahoma, Arial, sans-serif;
  --site-font-brand: "Space Grotesk", "Segoe UI", Tahoma, Arial, sans-serif;
  --site-font-code: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --font-ui: var(--site-font-body);
  --font-geist-sans: var(--site-font-body);
  --font-geist-mono: var(--site-font-code);
}

@layer site-typography {
  html,
  body,
  body :where(
    a, address, article, aside, b, blockquote, button, caption, dd, details,
    dfn, dialog, div, dl, dt, em, fieldset, figcaption, figure, footer, form,
    h1, h2, h3, h4, h5, h6, header, i, input, label, legend, li, main, nav,
    ol, optgroup, option, output, p, section, select, small, span, strong,
    sub, summary, sup, table, tbody, td, textarea, tfoot, th, thead, time, tr, ul
  ) {
    font-family: var(--site-font-body) !important;
    font-optical-sizing: auto;
  }

  /* Keep the platform wordmark distinct from interface text. */
  :is(
    .topbar-logo, .topbar-logo-copy, .landing-brand, .login-brand,
    .auth-brand-v2514, .auth-brand-word-v2514, .auth-card-brand-v2516,
    .brand, .brand-copy strong, .license-brand
  ),
  :is(
    .topbar-logo, .topbar-logo-copy, .landing-brand, .login-brand,
    .auth-brand-v2514, .auth-brand-word-v2514, .auth-card-brand-v2516,
    .brand, .brand-copy strong, .license-brand
  ) * {
    font-family: var(--site-font-brand) !important;
  }

  /* Columns of money and balances align without a different typeface. */
  :is(
    input[type="number"], input[inputmode="numeric"], output,
    .numeric, .token-summary-lines dd, .topbar-token-value,
    .ref-card-price, .detail-price, .summary-value,
    .latest-withdrawal-balance-card > strong, .log-b-subtotals b
  ) {
    font-variant-numeric: lining-nums tabular-nums;
  }

  /* Actual code, technical diagnostics and keyboard shortcuts stay monospaced. */
  :is(pre, code, kbd, samp, .code-box, .api-result, .advanced-tools textarea),
  :is(pre, code, kbd, samp, .code-box, .api-result, .advanced-tools textarea) * {
    font-family: var(--site-font-code) !important;
  }

  .auth-google-mark-v2514 {
    font-family: Arial, sans-serif !important;
  }
}
