/* Design tokens. The only file with raw colour values; components consume var() only.
   Light only since 2026-11-11, after the operator rejected the tinted grounds and red as lead
   colour (verbatim in knowledge/ui-feedback.md). Since 2026-11-12 one palette, worked out
   from the warmer version W1 on the operator's word (knowledge/design.md#colour): white
   ground, warm yellow-grey greys (OKLCH hue 68 to 85, no red cast), one accent #0097A7 as in
   his slide scheme, ochre for the second data layer. Text reaches at least 7:1 against white
   and the sidebar; the accent itself (3.5:1) marks graphics and selection only, text in the
   accent hue uses the darker --accent-text. */
/* `pages` holds css/pages.css, the content pages of the static build. It comes after the
   components, so a page rule wins over a shared component rule, as it did while the file
   was unlayered. */
@layer reset, base, tokens, layout, components, pages, utilities;

@font-face {
  font-family: "Junicode";
  src: url("../fonts/Junicode-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Junicode";
  src: url("../fonts/Junicode-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Junicode";
  src: url("../fonts/Junicode-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-500.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-600.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("../fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@layer tokens {
  :root {
    color-scheme: light;

    --font-source: "Junicode", "Iowan Old Style", Georgia, serif;
    --font-ui: "Instrument Sans", system-ui, sans-serif;
    --font-code: "Space Mono", ui-monospace, "Cascadia Mono", monospace;

    /* Ground, text and lines. Contrast: text 16.3:1 on white and 14.9:1 on the sidebar,
       muted 9.2:1 and 8.4:1. The ground stays untinted; warmth lives in the greys. */
    --stage: #ffffff;
    --side: #f7f5f1;
    --text: #22201c;
    --muted: #4d4741;
    --hairline: #e0dad1;
    /* Informative lines of the graphs, 3.5:1 against white. */
    --edge: #8f877c;

    /* The one accent. Graphics and selection in #0097A7; text in the accent hue uses the
       darker value, 7.7:1 against white and 7.1:1 against the sidebar. */
    --accent: #0097a7;
    --accent-text: #005c64;
    --accent-faint: #e3f4f6;

    /* A missing basis: a dark amber, always with a word. */
    --warn: #6b4a00;
    --focus: #005c64;

    /* Regesta per year of the whole delivery, a quiet ground behind the time band. */
    --bars: #d8d1c6;

    /* The base map of the itinerary, quieter than every data mark. Darkened in the design round
       of 2026-11-18 („so blass, dass es kaum als Karte lesbar ist“): coast 3.0:1 on the floor,
       rivers 2.2:1; the points keep their lead (muted 7.0:1, ochre 3.2:1 on the realm). */
    --map-coast: #9a8f7f;
    --map-river: #b3aa9b;
    /* The Empire about 1190 as a soft area under the coast, the faintest fill of the page. */
    --map-realm: #ece6da;

    /* Estate of a person or group in the person drawings (js/stand.js), a rule on the register
       description. Ruler in gold, the church in plum, the lay estate in olive, an open estate
       in the line grey; graphics at least 3:1 against white, and the key names them. The text
       ink stays for the shape signs of the key. */
    --stand-ruler: #a8740f;
    --stand-church: #6a4a8c;
    --stand-lay: #4f6b2f;
    --stand-open: #8f877c;

    --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
    --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
    --step-1: clamp(1.125rem, 1.07rem + 0.3vw, 1.3125rem);
    --step-2: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2.25rem;
    --space-7: 3.5rem;

    --radius: 2px;
    --header-height: 3rem;
    --aside-width: 18rem;
    --detail-width: 26rem;
  }
  /* The second data layer (statements extracted by LLM-based agents) in ochre, 4.0:1 against
     white as a graphic. It stays apart from the muted grey of the first layer and from the
     accent also under simulated protanopia, deuteranopia and tritanopia (OKLab distance at
     least 0.16), and an evidenced point is larger as well, so colour never carries it alone.
     Marks a little heavier and names in the medium weight, as tried in W1. */
  /* The relations of an opened regest in the cube (operator, 2026-11-18): the steps keep the
     accent, the same place takes a berry, the shared person a blue. The four together with the
     ochre layer pass the palette validator of the dataviz method on white (lightness band,
     chroma, contrast at least 3:1, all pairs at least 10 OKLab under deuteranopia, protanopia
     and tritanopia, at least 18 with normal vision); each kind has its own form as well (arrow,
     ring, dashed hairline). */
  :root {
    --rel-place: #a3367a;
    --rel-person: #4058c8;
    --layer2: #9c7a2e;
    --dot-r: 2.5px;
    --label-weight: 500;
  }
}
