/**
 * Davar v2 — design tokens.
 *
 * THIS IS THE ONLY FILE IN v2 THAT MAY CONTAIN A HEX VALUE.
 *
 * Every other sheet reads from these variables. The rule exists because the old
 * front end defined its palette in four sheets that then disagreed with each
 * other, and because "use my brand colours, nothing more" is only enforceable
 * if there is one place to check.
 *
 * THE SIX BRAND COLOURS
 *
 * Sampled from the source files, not chosen by eye:
 *   #FAB230  the V in logo-davar-dark.png — 206 of the sampled opaque pixels
 *   #FFDD51  the light gold in ai-logo.png
 *   #167575  the teal in ai-logo.png, and site.webmanifest theme_color
 *   #008694  the bright teal in ai-logo.png
 *   #F7FFFE  the DAVAR wordmark
 *   #FDF3EB  site.webmanifest background_color
 *
 * THE NEUTRALS ARE DERIVED, NOT INTRODUCED
 *
 * A neutral grey would be a seventh colour. Instead every neutral here is one
 * of the six moved toward black or toward white, so the whole surface stays in
 * the brand's own hue family — the inks carry the teal's green cast, the rules
 * carry the cream's warmth. Each one records what it came from.
 *
 * SINGLE THEME, DELIBERATELY
 *
 * Bazaar is a committed light surface. There is no prefers-color-scheme block
 * and no [data-theme] block, so there is no second palette to keep in step.
 * color-scheme is declared so form controls and scrollbars render light rather
 * than inheriting the OS and fighting the page.
 */

:root {
  color-scheme: light;

  /* ── Brand, untouched ──────────────────────────────────────────────── */
  --brand-gold:      #FAB230;
  --brand-gold-soft: #FFDD51;
  --brand-teal:      #167575;
  --brand-teal-lit:  #008694;
  --brand-mint:      #F7FFFE;
  --brand-cream:     #FDF3EB;

  /* ── Derived inks — the teal walked toward black ───────────────────── */
  --ink:        #0E1F1E;   /* teal → black, headings and figures        */
  --ink-body:   #3E5451;   /* teal → black, running text                */
  --ink-dim:    #7A8F8B;   /* teal → black, labels and captions         */
  --ink-faint:  #A8B9B5;   /* teal → black, disabled and placeholder    */

  /* ── Derived surfaces — the cream and the mint ─────────────────────── */
  --surface:      #FDF3EB;  /* brand cream: the page ground             */
  --surface-card: #F7FFFE;  /* brand mint: cards read as white, warmly  */
  --surface-warm: #FFF8F1;  /* cream → white: raised strips, the ticker */
  --surface-deep: #0E1F1E;  /* the ink, for inverted bars               */

  /* ── Derived rules — the cream walked toward the ink ───────────────── */
  --rule:        #E5D9CD;
  --rule-strong: #D3C3B3;
  --rule-faint:  #F0E7DC;

  /* ── Semantic roles ────────────────────────────────────────────────── */
  --accent:        var(--brand-teal);      /* structure, links, primary action */
  --accent-lit:    var(--brand-teal-lit);  /* hover and active                 */
  --accent-on:     var(--brand-mint);      /* text on an accent fill           */
  --live:          var(--brand-gold);      /* new, urgent, the AI's voice      */
  --live-soft:     var(--brand-gold-soft);
  --live-on:       #2B1D03;                /* gold → black: text on gold       */

  /* Owner-verified media. The bright teal, so it never competes with gold. */
  --verified:      var(--brand-teal-lit);
  --verified-on:   var(--brand-mint);

  /**
   * The assistant's band, inside the search card.
   *
   * The teal walked toward the ink at one end and left alone at the other, so
   * it reads as part of the market rather than as an advertisement sitting on
   * it. Derived rather than picked: no seventh colour enters the palette.
   */
  --ai-band: linear-gradient(100deg,
              color-mix(in srgb, var(--brand-teal) 72%, var(--surface-deep)),
              var(--brand-teal));

  /* ── Type ──────────────────────────────────────────────────────────── */
  --font-display: "Sitka Display", Constantia, "Palatino Linotype", Georgia, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-ar: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", monospace;

  /* A scale, so sizes are chosen from a set rather than typed by feel. */
  --t-xs:   11.5px;
  --t-sm:   12.5px;
  --t-base: 14px;
  --t-md:   15.5px;
  --t-lg:   18px;
  --t-xl:   22px;
  --t-2xl:  28px;
  --t-3xl:  clamp(26px, 3.6vw, 40px);
  --t-4xl:  clamp(32px, 5vw, 54px);

  /* ── Space, on a 4px step ──────────────────────────────────────────── */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px;

  /* ── Geometry ──────────────────────────────────────────────────────── */
  --radius:    5px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  --page-max: 1240px;
  --page-pad: clamp(16px, 3.2vw, 32px);

  /* ── Elevation — warm, because the ground is warm ──────────────────── */
  --lift-1: 0 1px 2px rgba(14, 31, 30, .06);
  --lift-2: 0 4px 14px -4px rgba(14, 31, 30, .12);
  --lift-3: 0 16px 40px -12px rgba(14, 31, 30, .22);

  /* ── Motion ────────────────────────────────────────────────────────── */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: 140ms;
  --slow: 260ms;

  /* ── Layering. Written down so two components cannot both invent 9999. */
  --z-sticky: 20;
  --z-header: 40;
  --z-sheet:  60;
  --z-dock:   70;
  --z-modal:  90;
}
