/* The humanities figure kit (ui/figures/humanities.js): the timeline, and later `compare` and `annotated-text`.
   Linked from index.html; the kit's rules live here and nowhere else (never in styles.css). Rules are `.cx-figure--<kind>` and `.hu-*`
   classes; colour tokens are declared three times, as in geo.css (:root, the dark preference and data-theme="dark"). See docs/figures/README.md.
   Builds on the shared .cx, .cx-figure rules in styles.css and on its tokens (--surface, --text, --wire, --muted). */

/* ---- Colours -----------------------------------------------------------------------------------------------------
   The dot of an event is at least 3:1 against the card (--surface) in both themes (tests/ui-figures-humanities.test.js measures the
   tokens, tests/ui-figures-humanities-browser.test.js the drawing). Colour is never the only cue: an event is its dot on the axis, its stem,
   its year and its label, all written out. A break on the axis is two slashes, drawn in a line, never in colour. */
:root {
  --hu-dot: #3b5bdb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hu-dot: #8ea2ff;
  }
}
:root[data-theme="dark"] {
  --hu-dot: #8ea2ff;
}

/* ---- The picture ------------------------------------------------------------------------------------------------- */
.cx-figure--timeline { max-width: 420px; }
/* Text is at least 12 units of a 320-unit picture, bold: the width estimate (textWidth in data-chart.js) is for bold text. */
.hu-text { font-size: 13px; font-weight: 600; fill: var(--text); font-family: inherit; font-variant-numeric: tabular-nums; }
.hu-year { font-weight: 800; }

/* ---- timeline ----------------------------------------------------------------------------------------------------- */
.hu-axis { stroke: var(--wire); stroke-width: 2.5; stroke-linecap: round; }
.hu-slash { stroke: var(--wire); stroke-width: 2.5; stroke-linecap: round; } /* the break: two slashes across the axis where a gap is not to scale */
.hu-stem { stroke: var(--wire); stroke-width: 2; stroke-linecap: round; }
.hu-dot { fill: var(--hu-dot); stroke: var(--surface); stroke-width: 2; }
