/*
  Self-hosted body typography for the individual (editorial) surface.

  Why webfonts: the editorial body must render identically on macOS, Windows,
  and Linux. System stacks fail this — Charter and Iowan Old Style are
  Apple-only, Georgia is absent from most Linux distros, so Linux scientists
  would read Monko in DejaVu Serif. Body typography is the product here
  (Pablo, 2026-07-07), so the face ships with the page.

  Licenses (files alongside the fonts in app/assets/fonts/editorial/):
  - Charter: Bitstream Charter license (permissive; CHARTER-LICENSE.txt).
    BITSTREAM CHARTER is a registered trademark of Bitstream Inc.
  - Newsreader: SIL Open Font License (NEWSREADER-OFL.txt). Latin subset,
    variable (opsz + wght axes).

  Linked from layouts/editorial.html.erb only — never from the workspace or
  marketing layouts.
*/

@font-face {
  font-family: "Charter";
  src: url("/assets/editorial/charter_regular-c9f2785c.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Charter";
  src: url("/assets/editorial/charter_italic-f1a420b4.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Charter";
  src: url("/assets/editorial/charter_bold-13feabb3.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Charter";
  src: url("/assets/editorial/charter_bold_italic-270e5cf0.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/editorial/newsreader-var-fe979712.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/editorial/newsreader-italic-var-fd8d4ba4.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/*
  Styleguide-only: the body-candidates review section. Lives here (not in the
  Tailwind source) so the review surface doesn't touch the design-token file;
  once Pablo picks a face, --editorial-body-font flips in
  app/assets/tailwind/application.css and this section can be trimmed.
*/

.editorial-candidates {
  display: grid;
  gap: 3rem;
}

.editorial-candidate {
  display: grid;
  gap: 0.5rem;
  max-width: var(--editorial-measure, 68ch);
}

.editorial-candidate__sample {
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

.editorial-candidate__display {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.02;
  font-optical-sizing: auto;
}

.editorial-candidate--charter .editorial-candidate__sample,
.editorial-candidate--charter .editorial-candidate__display {
  font-family: "Charter", Georgia, serif;
}

.editorial-candidate--newsreader .editorial-candidate__sample,
.editorial-candidate--newsreader .editorial-candidate__display {
  font-family: "Newsreader", Georgia, serif;
}

.editorial-candidate--newsreader .editorial-candidate__display {
  font-weight: 440;
}
