/* Cyntelligence mark — rev 12a
   The mark IS the type: a flat field with CY knocked out, Archivo 900.
   No drawing, so it can never drift from the wordmark.

   Insets are authored in em, NOT percent: percentage padding resolves against
   the PARENT's width, so a 26px mark in a 1200px nav bar would take an 85px
   inset. em resolves against this element's own font-size, which is S. */

/* The theme-flipping pair, OPAQUE on both sides.
   MARK.md authors the field as a FLAT FILL and forbids grading it, and the ink
   is what makes the declared ratio the delivered one. --text-color is
   rgba(237,234,226,0.92), so using it as the field paints paper at 92% over
   whatever is behind — a fill that changes with its backdrop, which is the one
   thing the mark must not do. --paper and --void are literal and are not
   redeclared per theme, so flipping WHICH is field and which is knockout is
   the whole job: 17.1:1 either way, both rows of MARK.md's sanctioned table.

   Declared on :root, and the light override on `html` — `_applyTheme` puts
   .light-mode on <html> as well as <body>, and a body-only selector would not
   reach a token consumed here (CLAUDE.md §10.6). */
:root {
  --mark-field:    var(--paper);
  --mark-knockout: var(--void);
}
/* …and a dark-LOCKED page's navbar when the reader chose light (2026-10-12,
   `chrome-light` — see shared.js _applyTheme): the bar is white there, so
   its mark must be the light-theme mark, not cream on white at 1.16:1. */
/* ⚠ LIGHT IS THE PAGE GROUND AND THE PAGE INK, NAMED DIRECTLY (owner,
   2026-11-24: "keep it like the most pages"). This block read
   `--mark-field: var(--void); --mark-knockout: var(--paper)` on the claim
   above that the two are never redeclared per theme. page-archetypes.css §19z
   redeclares BOTH in light (--void -> --surface-1, --paper -> --text-color),
   so from 2026-07-29 every archetype page drew a cream field with dark
   letters, and the six pages that do not load that sheet (coverage, bulk
   lookup, FAQ, knowledge map, simulation, strategic brief) drew a black
   field. Shown both, the owner kept the first. So the light pair names the
   tokens the remap ended at, which shared.css's light block defines on every
   page, and no longer depends on which stylesheets a page loads. The field
   is 1.09:1 on the white bar: in light the mark reads as its letters. */
html.light-mode, html.chrome-light body #main-navbar {
  --mark-field:    var(--surface-1);
  --mark-knockout: var(--text-color);
}

.cyn-mark {
  --s: 26px;
  --cyn-knockout: #F2EEE4;

  box-sizing: border-box;         /* stays S x S whatever the host reset does */
  display: flex;
  align-items: flex-end;          /* bottom-set — this half is unchanged */
  justify-content: center;        /* horizontally balanced — see below */
  flex: none;

  width: var(--s);
  height: var(--s);
  font-size: var(--s);            /* the em values below resolve against this */

  /* ⚠ HORIZONTALLY BALANCED SINCE 2026-08-02, AND THIS OVERRIDES MARK.md.
     The spec is `left inset 0.071 S`, flush left, with misuse rule 4 reading
     "Don't centre it". Rendered at nav size that puts the CY 2.0px from the
     left edge and 7.5px from the right — a 5.5px difference across a 26px
     field, which reads as a typesetting mistake rather than as a decision.
     Owner, on the rendered mark: "the spacing is uneven on both sides".

     ONLY THE HORIZONTAL AXIS MOVED. Bottom-set is what the rule is really
     protecting — a mark centred on BOTH axes is the generic one — so the
     0.083 S bottom inset is untouched and `align-items: flex-end` stays.

     The 0.038em right inset is not arbitrary: `letter-spacing: -0.06em`
     applies after the final Y as well as between the letters, so the advance
     box sits left of the ink and pure centring lands 5.25 / 4.25. Measured by
     rasterising the glyph and scanning opaque columns; 0.038em is the value
     that reads 4.75 / 4.75. Re-measure it if the tracking or the face changes,
     because it is derived from both. */
  padding: 0 0.038em 0.083em 0;

  background: currentColor;
  border-radius: 0;
}

.cyn-mark > span {
  /* --font-brand, not a bare `Archivo`: shared.css owns the fallback chain and
     having it in two places means the mark and the wordmark can fall back to
     DIFFERENT faces the day Archivo fails to load. Archivo is vendored now, so
     the fallback should never be reached — but the point of a token is that
     the answer is written once. */
  font: 900 0.524em/0.72 var(--font-brand);
  letter-spacing: -0.06em;        /* locks CY as one shape */
  color: var(--cyn-knockout);
}

/* The C cut — at 20px and below. Two counters close up at that size, so the Y
   is dropped rather than shipped as a smudge. Do not interpolate between cuts.

   No right inset here: the C carries no trailing tracking (letter-spacing is 0
   at this cut), so plain centring already measures 4.5 / 4.67 at 18px. The CY
   cut's 0.038em correction exists only because of ITS tracking. */
.cyn-mark--c { padding: 0 0 0.075em 0; }
.cyn-mark--c > span { font-size: 0.86em; letter-spacing: 0; }

/* Wordmark — Archivo, uppercase, -0.035em.

   ⚠ 400, NOT 900, SINCE 2026-08-02 (owner: "remove the bold from the
   Cyntelligence text"), and this also overrides MARK.md, which specifies
   Archivo 900 for the wordmark as well as the mark.

   THE MARK STAYS 900 and that is the point of the pairing: the mark is a
   knockout and needs the mass to hold its counters at 26px, while the wordmark
   is read as words. A heavy mark beside a regular wordmark is a normal lockup;
   both at 900 was the thing that read as shouting. */
.cyn-wordmark {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 1;
}

/* Lockup — gap is 0.25 x mark height */
.cyn-lockup { display: flex; align-items: center; gap: calc(var(--s, 26px) * 0.25); }
