/* First Fold Advisory · Emphasis system v1 · Sebastian's pick, 20 Nov 2026: C Vermilion Word everyday, A Crease Marker for big moments.
   Internal, name not cleared. Source: brand_kit/15_type_layout_depth/emphasis/ffa-emphasis.css (copied to website/assets/css/).
   Standalone: reads the site tokens when present (--vermilion, --ember) and falls back to the hex values.

   THE ACCENT RULE
   - One vermilion emphasis per view: one .em phrase or one .em-marker, never both.
   - A Crease Marker headline gets no vermilion word nearby.
   - The tagline's vermilion full stop is the approved exception: "Get the first fold right." keeps its vermilion stop with either device.
   USE
   - .em (C, Vermilion Word): any size. At most one phrase per paragraph or slide.
   - .em-marker (A, Crease Marker): display sizes only (deck titles, web hero, social). At most once per piece, three words or fewer.
     In body text use .em instead. Never on the word just before a vermilion full stop (the stop would vanish into the bar).
   CONTRAST (WCAG 2.2 AA)
   - Vermilion #E8482C is 3.51:1 on cream and 4.38:1 on charcoal: AA for large text only (24 px and up, or 19 px and up in bold).
   - So .em defaults to the small-text colours, Ember #B23A22 on cream (5.38:1) and Vermilion 85 #EA6249 on charcoal (5.15:1),
     always with a weight step so the emphasis never depends on colour alone. Inside display classes it switches to true vermilion. */

:root{
  --em-ver:var(--vermilion, #E8482C);
  --em-ember:var(--ember, #B23A22);     /* existing kit colour, 5.38:1 on cream */
  --em-ver85:#EA6249;                     /* vermilion 85% + cream 15%, 5.15:1 on charcoal; a tint, Approved Nov 20, 2026 */
  --em-crease:.4;                         /* tan(21.75 deg) = 0.399, the kit's crease constant (website --crease-k) */
}

/* ---------- C · .em · Vermilion Word ---------- */
.em{color:var(--em-ember); font-weight:600}                      /* body and small text on cream: Ember, Inter SemiBold */
.on-dark .em{color:var(--em-ver85)}                               /* body and small text on charcoal: Vermilion 85 */
:is(h1,h2,h3,h4,.d0,.d1,.h2,.h2s,.h3,.h4,.stmt,.ffoot__big) .em,
.on-dark :is(h1,h2,h3,h4,.d0,.d1,.h2,.h2s,.h3,.h4,.stmt,.ffoot__big) .em{
  color:var(--em-ver); font-weight:800;                          /* headlines: true vermilion, Bricolage ExtraBold, one step over Bold */
}
.em-display .em, .on-dark .em-display .em{color:var(--em-ver); font-weight:600}
/* .em-display: put it on large running text (24 px and up, e.g. deck body at 26 to 30 px) so .em can use true vermilion there.
   Inter SemiBold keeps the weight step. Web body (18 px) and anything under 24 px stays on the default small-text colours. */

/* ---------- A · .em-marker · Crease Marker ----------
   A vermilion bar behind the bottom third of the letters: from 10% of the x-height below the baseline
   to 35% of the x-height above it, so it sits under the letters like a marker swipe and never crosses their middle.
   Ends cut at the 21.75 deg crease (the end edge leans 21.75 deg from vertical). Overhang: .04em before the word,
   .04em plus the cut after it. Every length is in em, so one class works from a 40 px social line to a 184 px hero.
   Geometry: Bricolage Grotesque (variable) x-height .528, hhea descender .27. The bar is placed from the bottom of the
   inline content box, which is the baseline plus the descender. */
.em-marker{
  --xh:.528; --desc:.27;
  --lo:calc(var(--xh) * -.10em);                 /* bar bottom: 10% of x-height under the baseline */
  --hi:calc(var(--xh) * .35em);                  /* bar top: 35% of x-height over the baseline */
  --h:calc(var(--hi) - var(--lo));               /* = 45% of x-height, about .24em */
  --k:calc(var(--h) * var(--em-crease));         /* run of the crease cut */
  --y:calc(var(--desc) * 1em + var(--lo));       /* content-box bottom to bar bottom */
  --c:var(--em-ver);
  padding-inline:.04em calc(var(--k) + .04em);
  margin-inline:-.04em calc(-1 * (var(--k) + .04em));   /* net zero: the word does not move */
  -webkit-box-decoration-break:clone; box-decoration-break:clone;   /* a wrapped phrase gets a full bar, both cuts, on each line */
  background:
    linear-gradient(to bottom right, transparent calc(50% - .6px), var(--c) calc(50% + .6px)) left 0 bottom var(--y) / var(--k) var(--h) no-repeat,
    linear-gradient(var(--c), var(--c)) left var(--k) bottom var(--y) / calc(100% - 2 * var(--k) + 1px) var(--h) no-repeat,
    linear-gradient(to top left, transparent calc(50% - .6px), var(--c) calc(50% + .6px)) right 0 bottom var(--y) / var(--k) var(--h) no-repeat;
}
.em-marker.em-inter{--xh:.546; --desc:.241}       /* if a display line is ever set in Inter */

/* .em-end: a marker that runs straight into punctuation ("It scales it."). The end overhang would slide under the full stop,
   so the bar ends with the last letter and its crease cut sits under that letter instead. (Fresh review fix, Nov 20, 2026.) */
.em-marker.em-end{padding-inline-end:0; margin-inline-end:0}

/* keep a short phrase together on one line (three words or fewer) */
.em-keep{white-space:nowrap}

/* The accent rule in CSS: a line that carries emphasis sends its other vermilion full stops to ink.
   The tagline keeps its stop: mark it <span class="dot dot--tagline">. */
.has-em .dot:not(.dot--tagline){color:inherit}

@media (forced-colors: active){
  .em-marker{background:none; text-decoration:underline; text-decoration-thickness:.1em; text-underline-offset:.06em}
  /* .em keeps its weight step in forced colours */
}
@media print{ .em-marker{-webkit-print-color-adjust:exact; print-color-adjust:exact} }
