/* ==========================================================================
   TOKENS — the theme contract.

   This is the only file you edit to change how an app looks.
   Every variable declared here is consumed by base.css and components.css.
   Nothing downstream is allowed to invent its own colour, size, or radius.

   Default theme: "Verdigris" — pale green-grey paper, deep patina green,
   plum secondary, warm signal for focus.
   ========================================================================== */

:root {
  /* ---- Colour: surfaces ------------------------------------------------ */
  --c-bg:            #edf1ee;   /* page */
  --c-bg-raised:     #fbfcfb;   /* cards, menus, anything lifted off the page */
  --c-bg-sunken:     #dfe6e1;   /* wells, code blocks, table stripes */

  /* ---- Colour: text ---------------------------------------------------- */
  --c-ink:           #131d19;   /* body + headings */
  --c-ink-soft:      #47554e;   /* secondary text, captions */
  --c-ink-faint:     #7c8b83;   /* placeholders, disabled, metadata */

  /* ---- Colour: lines --------------------------------------------------- */
  --c-line:          #cbd5ce;   /* default border */
  --c-line-strong:   #a9b8af;   /* emphasised border, dividers under headers */

  /* ---- Colour: accent (primary action) --------------------------------- */
  --c-accent:        #17604f;
  --c-accent-hover:  #124e40;
  --c-accent-ink:    #f6fbf9;   /* text placed ON accent */
  --c-accent-soft:   #d2e6de;   /* tinted background, selected rows */

  /* ---- Colour: secondary (badges, links, accents that aren't actions) -- */
  --c-second:        #6e3a57;
  --c-second-soft:   #ecdfe7;

  /* ---- Colour: status -------------------------------------------------- */
  --c-ok:            #2e6b45;
  --c-ok-soft:       #d9ebdf;
  --c-warn:          #8a6410;
  --c-warn-soft:     #f4e8cd;
  --c-bad:           #9a3325;
  --c-bad-soft:      #f3dcd8;

  /* ---- Colour: focus ring ---------------------------------------------- */
  /* Deliberately a different hue from the accent so it reads on every
     surface, including on top of accent-coloured buttons. */
  --c-focus:         #b8482e;

  /* ---- Type: families -------------------------------------------------- */
  /* Swap these three lines to change the entire personality of the app.
     Faces are self-hosted in static/fonts/ and declared in fonts.css.

     Zero-request alternative — no font files served at all, at the cost of
     looking different on every OS. Comment out the fonts.css <link> in
     base.html if you use this:
       --font-display: ui-sans-serif, "Segoe UI", Roboto, Helvetica, sans-serif;
       --font-body:    ui-sans-serif, "Segoe UI", Roboto, Helvetica, sans-serif;
       --font-mono:    ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace;
  */
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body:    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- Type: fluid scale ----------------------------------------------- */
  --step--1: clamp(0.78rem, 0.76rem + 0.10vw, 0.84rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-1:  clamp(1.14rem, 1.08rem + 0.30vw, 1.33rem);
  --step-2:  clamp(1.37rem, 1.26rem + 0.55vw, 1.78rem);
  --step-3:  clamp(1.64rem, 1.45rem + 0.95vw, 2.37rem);
  --step-4:  clamp(1.97rem, 1.66rem + 1.55vw, 3.16rem);
  --step-5:  clamp(2.36rem, 1.87rem + 2.45vw, 4.21rem);

  /* ---- Type: rhythm ---------------------------------------------------- */
  --lh-tight:      1.08;
  --lh-heading:    1.18;
  --lh-body:       1.6;
  --track-display: -0.022em;
  --track-body:    0em;
  --track-caps:    0.09em;
  --weight-body:   400;
  --weight-medium: 500;
  --weight-bold:   700;

  /* ---- Space (1.5x-ish scale) ------------------------------------------ */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* ---- Shape ----------------------------------------------------------- */
  --radius-sm:   3px;
  --radius-md:   6px;
  --radius-lg:   12px;
  --radius-full: 999px;
  --border-w:    1px;

  /* ---- Elevation ------------------------------------------------------- */
  /* Tinted with the ink colour rather than pure black so shadows sit in the
     same colour world as the rest of the theme. */
  --shadow-1: 0 1px 2px rgb(19 29 25 / 0.06);
  --shadow-2: 0 2px 4px rgb(19 29 25 / 0.06), 0 6px 16px rgb(19 29 25 / 0.08);
  --shadow-3: 0 4px 8px rgb(19 29 25 / 0.08), 0 16px 40px rgb(19 29 25 / 0.12);

  /* ---- Motion ---------------------------------------------------------- */
  --dur-fast: 110ms;
  --dur:      200ms;
  --ease:     cubic-bezier(0.2, 0, 0.15, 1);

  /* ---- Layout ---------------------------------------------------------- */
  --measure:   68ch;   /* max width of running text */
  --container: 76rem;  /* max width of page shell */
  --gutter:    var(--s-5);
  --col-min:        18rem;  /* min column width in .grid before it wraps */
  --col-min-narrow: 12rem;  /* min column width in .form-row */
}
