/* TITAN WORD MARK — the word TITAN renders in Titan orange/saffron everywhere.
 *
 * Papa's fire, 2026-09-12: "SINCE TITAN IS A MINDSET AND NOT A WARRIOR ETHOS,
 * THE WORD TITAN SHOULD BE IN TITAN ORANGE / SAFFRON EVERYWHERE IT APPEARS.
 * EVERY SURFACE, EVERY SITE, INSIDE AND OUT."
 *
 * The colour is not a choice made here. Source-custody court, 2026-09-12:
 * `--saffron: #FFAD1F` was already shipping on titanarray.net and
 * wearetitans.dev before any remap work -- the pre-existing house token.
 * `urn:titan:identity:saffron:v1` is frozen to #FFAD1F. The earlier
 * #ff7a1a in this file is classified NONCANONICAL_IMPLEMENTATION_DIVERGENCE;
 * this sheet consumes the house token and owns no literal identity hex.
 */

:root {
  --titan-saffron: #FFAD1F;                /* CANON: urn:titan:identity:saffron:v1 */
  --titan-orange: var(--titan-saffron);    /* deprecated compatibility alias  */
  --titan-word-color: var(--titan-saffron);/* the word consumes the house token */
  --titan-word-saffron: #FFD77D;           /* pale lift, very dark grounds    */
  --titan-word-on-light: #996100;          /* V1 deep stop, 5.17:1 on white   */
  --titan-word-print: #8A5600;             /* print stop, 6.16:1 on white     */
}

/* The selector is repeated deliberately. A single `.titan-word` is specificity
 * (0,1,0) and loses to any host rule like `.hero span { color: #f2f6ff }`
 * at (0,1,1) -- measured live: 1 of 24 wordmarks kept the host colour.
 * Repeating the class raises it to (0,3,0) without inventing a parent
 * selector that only one site has. `!important` then covers ordinary host
 * rules at any specificity, and `-webkit-text-fill-color` covers sites whose
 * wordmark uses gradient/clipped text, where `color` alone paints nothing. */
.titan-word,
.titan-word.titan-word.titan-word {
  /* LAYOUT-NEUTRAL, and this is not negotiable.
   *
   * `display: inline` is NOT enough, and the reason is not the cascade.
   * A span inside a flex or inline-flex parent becomes a flex item, and CSS
   * BLOCKIFIES flex items -- computed display becomes `block` no matter what
   * the rule says, `!important` included. Measured on a live page: two of
   * twenty-four wordmarks sat inside `<a>` elements with display:flex and
   * inline-flex, and "See how TitanDash works with hosting" rendered as three
   * stacked lines.
   *
   * `display: contents` generates NO BOX for the span. There is nothing to
   * blockify, in any container type, so layout cannot change -- while `color`
   * still inherits to the text inside. The word is recoloured and the page is
   * untouched.
   */
  display: contents !important;

  color: var(--titan-word-color) !important;
  -webkit-text-fill-color: var(--titan-word-color) !important;
  /* inherit everything else — weight, size, spacing, letter-spacing, family.
     The word changes colour and nothing else. A remap that also changes
     weight or tracking is a redesign wearing a colour change. */
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: none;
  text-decoration: inherit;
}

/* On a dark ground the deeper orange loses contrast; lift to saffron.
   Sites that set an explicit dark theme opt in by data-theme or .dark. */
:root[data-theme="dark"] .titan-word,
.dark .titan-word,
[data-scheme="dark"] .titan-word {
  color: var(--titan-word-saffron) !important;
  -webkit-text-fill-color: var(--titan-word-saffron) !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .titan-word {
    color: var(--titan-word-saffron);
  }
}

/* Inverse law (TITAN-BRAND-TOKENS-V1): on a light ground #FFAD1F is ~1.87:1,
   under the 4.5:1 floor -- the word would be unreadable exactly where most
   people read. Sites that declare a light surface get the deep stop, which
   is the same identity hue at 5.17:1 on white / 4.80:1 on paper. */
:root[data-theme="light"] .titan-word,
.light .titan-word,
[data-scheme="light"] .titan-word,
.titan-brand-plate--light .titan-word {
  color: var(--titan-word-on-light) !important;
  -webkit-text-fill-color: var(--titan-word-on-light) !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .light-strict .titan-word {
    color: var(--titan-word-on-light);
  }
}

/* Forced colours (Windows High Contrast et al.): the person chose their own
   palette because they need it. Hand the word back to CanvasText. */
@media (forced-colors: active) {
  .titan-word {
    color: CanvasText !important;
    -webkit-text-fill-color: CanvasText !important;
  }
}

/* Inside a link, the word still reads as part of the link: keep the
   underline/decoration the anchor already carries, just recolour the glyphs. */
a .titan-word {
  text-decoration: inherit;
}

/* Never let the remap fight a deliberate one-off. Anything that opts out
   keeps its own colour. */
.titan-word-opt-out .titan-word,
.no-titan-remap .titan-word {
  color: inherit;
}

/* Print: saffron on paper prints weak; the print stop is the same hue walked
   down for single-ink reproduction (6.80:1 on white). */
@media print {
  .titan-word {
    color: var(--titan-word-print);
    -webkit-text-fill-color: var(--titan-word-print);
  }
}
