/* Shared typography for pdf-document text entries (.textEntry content).
   Linked by every surface that renders the same content:
     - the canvas editor (proshop/includes/pageHead.php -> manage_canvas.php)
     - proshop/pdf-preview.php
     - pdf-render.php (the page PDFShift converts to the actual PDF)
   Only typography lives here — each surface keeps its own structural and
   text-scaling rules (positioning, the zoom/transform on .textEntry_inner).
   Change type here and all three stay in sync; adding a typographic rule in
   any one surface's own CSS instead will make editor and PDF drift apart.
   rem values resolve against the page root (16px on all three surfaces)
   and are then scaled per item by each surface's text-scale factor.
   Inline styles TinyMCE writes into the content always win over these. */

/* CralterSans is a local font, so it never comes in via the Google Fonts
   link the pdf surfaces load — and pdf-preview.php / pdf-render.php load no
   other stylesheet. These @font-face rules are what make the font available
   there. The front-end bundle and proshop/css/styles.css declare the same
   faces for their own surfaces; a duplicate declaration of an identical
   family is harmless (same family name, and these paths resolve to the same
   /fonts/CralterSans* files). */
@font-face {
  font-family: "CralterSansRough";
  src:
    url("../../fonts/CralterSansRough/font.woff2") format("woff2"),
    url("../../fonts/CralterSansRough/font.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "CralterSansStamp";
  src:
    url("../../fonts/CralterSansStamp/font.woff2") format("woff2"),
    url("../../fonts/CralterSansStamp/font.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "CralterSansRegular";
  src:
    url("../fonts/CralterSansRegular/font.woff2") format("woff2"),
    url("../fonts/CralterSansRegular/font.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

.textEntry {
  font-family: "CralterSansRegular", sans-serif;
  color: #aba69d;
  text-align: left;
  /* letter-spacing and word-spacing inherit, and each host page's <body>
     sets them differently (the canvas admin's is 0.01em, the front-end's is
     normal) — enough drift across a headline to move a line break by a word.
     font-smoothing likewise changes glyph width slightly. Pin all of it so
     the text wraps the same on every surface regardless of the host page. */
  letter-spacing: normal;
  word-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* the inner wrapper's padding is part of the text's wrap width, so it must
   be identical everywhere; box-sizing is declared here because the canvas
   admin page (unlike the pdf pages) has no global border-box reset.

   container-type makes this wrapper the reference for the headings' cqw
   font sizes below. It must be THIS element, not an ancestor like
   ul.canvas: the pdf surfaces lay the text out here at the PDF's native
   pixel width (width: 100% / --total-text-scale) and then scale the whole
   wrapper down, so only a container on the wrapper itself measures the
   same coordinate space the text actually wraps in. With no container at
   all, cqw silently falls back to the viewport, which decouples heading
   size from the item box and makes every surface wrap differently. */
.textEntry .textEntry_inner {
  padding: 10px;
  box-sizing: border-box;
  container-type: inline-size;
}

.textEntry h1,
.textEntry h2,
.textEntry h3 {
  margin: 0 0 1rem 0;
  padding: 0;
  font-weight: 400;
}

.textEntry h2 {
  line-height: 0.9;
  font-size: 5cqw;
}

.textEntry h3 {
  line-height: 0.9;
  font-size: 2.3cqw;
}

.textEntry ul,
.textEntry ol {
  margin: 1rem 0 1rem 2rem;
}

/* every surface renders items inside a ul.canvas with list markers
   disabled, which content lists inherit — restore them */
.textEntry ul li,
.textEntry ol li {
  list-style: initial;
}
