/* ANKYR+YRD — colour and type tokens
   Generated 15 September 2026. Values measured, not estimated; see ANKYR_YRD_Identity_Spec.md.
   Neutrals built in OKLCH for even perceptual steps. Every text pairing meets WCAG AA (4.5:1).

   The accent is a PAIR, not one colour: no single hex clears 4.5:1 against both a paper and an
   ink ground. --accent always resolves to the one correct for the current theme. */

:root {
  /* ---- type ---- */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  /* wordmark constants — see spec §3 and §4 */
  --wordmark-weight: 500;
  --wordmark-tracking: 0.020em;
  --wordmark-plus-rise: 0.0435em;   /* centres the plus bar on the cap band */
  --cap-height: 0.698;              /* × font-size */

  /* lockup geometry, as multiples of the wordmark font-size — see spec §4 */
  --lockup-mark-height: 1.2564;
  --lockup-mark-width: 1.4663;
  --lockup-gap: 0.1539;
  --lockup-clear: 0.3420;           /* one ring diameter, on every side */

  /* ---- light theme (default) ---- */
  --ground:  #F6F3ED;   /* page */
  --surface: #EBE7E0;   /* cards, table fills */
  --line:    #D3CFC7;   /* rules, borders */
  --muted:   #746D66;   /* secondary text — 4.60:1 on ground */
  --text:    #221B16;   /* body text — 15.34:1 on ground */
  --accent:  #8B5F22;   /* bronze — 5.05:1 on ground */
  --on-accent: #F6F3ED; /* text on an accent fill — 5.05:1 */

  color-scheme: light;
}

/* ---- dark theme ---- */
:root[data-theme="dark"] {
  --ground:  #17110D;
  --surface: #221D18;
  --line:    #38322D;
  --muted:   #97918A;   /* 6.00:1 on ground */
  --text:    #EEEBE5;   /* 15.73:1 on ground */
  --accent:  #B08347;   /* bronze, dark-context — 5.51:1 on ground */
  --on-accent: #17110D; /* 5.51:1 */

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:  #17110D;
    --surface: #221D18;
    --line:    #38322D;
    --muted:   #97918A;
    --text:    #EEEBE5;
    --accent:  #B08347;
    --on-accent: #17110D;

    color-scheme: dark;
  }
}

/* ---- base ---- */
body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
}

a { color: var(--accent); }

/* The mark inherits currentColor, so it takes the surrounding text colour.
   Set it to var(--accent) only where the accent budget allows — see spec §7. */
.ankyr-mark { color: currentColor; }

/* The wordmark, set live rather than from the outlined SVG. */
.ankyr-wordmark {
  font-family: var(--font-sans);
  font-weight: var(--wordmark-weight);
  letter-spacing: var(--wordmark-tracking);
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}
.ankyr-wordmark .plus {
  display: inline-block;
  transform: translateY(calc(-1 * var(--wordmark-plus-rise)));
}
