/* 05 · types: the token contract (settings 10, the user, 2026-10-13: "every element is a type; reuse, never make; an
   internal framework for 30 websites").
   Every element on a page is an instance of one type: Button, Chip, Card, Panel, Plate, Stripe, Field, Figure, Scene.
   Each type reads only its own short set of tokens here, and every default here reads 01-elements, which reads
   00-palette. So:
   - a variant (ghost, quiet, sold out) is a class that overrides that type's tokens and nothing else;
   - a new site re-skins by overriding 00-palette alone, and every type follows (dev/components/tokens.md).
   Colours are never written here, only pointers; sizes and numbers are the house defaults. A gem-tinted share
   (anything mixed with --gem-*) is written as a number, because the gem ladder lives on the engine, not on :root,
   and the type mixes it where it is used. Type files read these through var() with the same values as fallbacks. */

:root{
  /* Button (06-button.css; variants: ghost, checkout) */
  --btn-ground-a:var(--rw-cta-a);
  --btn-ground-b:var(--rw-cta-b);
  --btn-bloom:var(--rw-cta-bloom);
  --btn-ink:var(--rw-cta-ink);
  --btn-edge:var(--rw-cta-edge);
  --btn-glow:var(--rw-cta-glow);
  --btn-aura:var(--rw-cta-aura);
  --btn-hover-ink:var(--rw-cta-ink);
  --btn-radius:10px;
  --btn-pad-y:11px;
  --btn-pad-x:18px;
  --btn-font:var(--f-body);
  --btn-size:inherit;
  --btn-weight:600;

  /* Chip: a pill that picks one of a set (the subject row) */
  --chip-ground:var(--rw-chip-bg);
  --chip-edge:var(--rw-chip-edge);
  --chip-ink:var(--rw-chip-ink);
  --chip-hover-ink:var(--rw-chip-hover);
  --chip-radius:999px;
  --chip-pad-y:6px;
  --chip-pad-x:15px;
  --chip-size:14px;
  --chip-weight:600;

  /* Card: the playing card and the table it lies on; a card's own colours come from its record (--card-h, --card-k) */
  --card-radius:14px;
  --card-shadow:var(--rw-card-shadow);
  --card-table:var(--rw-table);
  --card-table-shade:var(--rw-table-shade);
  --card-table-radius:22px;

  /* Panel: a raised surface that holds a live part (the shape engine) */
  --panel-ground:var(--rw-engine-bg);
  --panel-edge:var(--rw-engine-edge);
  --panel-ink:var(--ink);
  --panel-radius:18px;
  --panel-pad:18px;

  /* Plate: the caption plate under a panel, its figure, words and door */
  --plate-edge:var(--rw-plate-edge);
  --plate-ink:var(--rw-caption-ink);
  --plate-note:var(--rw-plate-note);
  --plate-radius:12px;
  --plate-gem-edge:40%;          /* how much of the gem tints the plate's edge */

  /* Stripe: a long band with one number, a meter and one door (the money stripe) */
  --stripe-accent:var(--rose);
  --stripe-deep:var(--rose-deep);
  --stripe-shade:var(--rose-dark);
  --stripe-edge:var(--rw-plate-edge);
  --stripe-ink:var(--rw-caption-ink);
  --stripe-radius:12px;
  --stripe-meter:8px;

  /* Field: a text input and its focus */
  --field-ground:var(--rw-input-bg);
  --field-edge:var(--rw-input-edge);
  --field-ink:var(--rw-input-ink);
  --field-hint:var(--rw-input-hint);
  --field-focus:var(--rw-focus);
  --field-radius:10px;
  --field-pad-y:11px;
  --field-pad-x:14px;

  /* Figure: a drawn person or beast on its plinth (lib/figure.js); the plinth's gem shares, matte by default */
  --fig-shadow:var(--ink);
  --fig-shadow-o:.18;
  --fig-plinth-top:18%;
  --fig-plinth-lit:26%;
  --fig-plinth-shade:30%;
  --fig-aura-core:.5;
  --fig-aura-rim:.18;

  /* Scene: a backdrop drawn behind the data, never on it (notes/rulewell.md, Backdrop rule) */
  --scene-ink:var(--rw-bd-ink);
  --scene-radius:18px;
  --scene-strength:var(--rw-bd-strength);   /* .25 by night, .18 by day, set per theme in 36-backdrop.css */

  /* Product (minion 2; core/types-product.js, 07-product.css): the phone-shaped selling card, a satellite's mobile
     page and a product page's hybrid column. The card takes the night by its own color-scheme, so these pointers
     resolve to the wine look wherever it stands */
  --product-ground:var(--rw-ground-end);
  --product-glow:var(--rose-dark);
  --product-accent:var(--rose);
  --product-accent-soft:var(--rose-soft);
  --product-title:var(--rw-hero-title-ink);
  --product-ink:var(--rw-title-ink);
  --product-lede:var(--rw-lede-ink);
  --product-paper:var(--rw-photo-paper);
  --product-shot:var(--rose-dark);
  --product-shadow:var(--rw-card-shadow);
  --product-radius:0px;
  --product-pad:22px 20px 28px;
  --product-min-h:100svh;

  /* Offer (minion 3's block): a big offer card on the shelf (core/types-content.js). Its colours stay the card's own
     --rw-item-* tokens, set on each card (a pack's hue retints them there); a pointer set here on :root would freeze
     them at the house colour. Only the shape lives here */
  --offer-radius:16px;
  --offer-pad:20px;
  --offer-gap:10px;
  --offer-lean-x:3deg;    /* how far the camera tilts it, up and down */
  --offer-lean-y:4deg;    /* and side to side */
}
