/* Toran brand tokens. **This is the only copy.**

   There used to be two, `brand/tokens.css` and this one, byte-identical, with
   only this one served (`app.css` imports `/tokens.css`, wrangler serves
   `./public`). A token edited in the other file looked like it had done
   nothing. `brand/tokens.css` is gone; this file is the single source and the
   one to keep in step with Paper.
   White cards on a near-white ground, deep teal as the brand, and a warm sand
   tint for soft fills. Gold and plum exist only on the dark bands: gold is
   2.42:1 on white, which fails, but 5.12:1 on deep teal, which passes. That
   constraint is the whole reason the marketing page alternates light and dark
   bands rather than scattering colour across one light page. */
:root {
  --toran-white:         #FFFFFF;  /* cards, raised surfaces */
  --toran-surface:       #F4F7F6;  /* page ground */
  --toran-hairline:      #E2E8E6;
  --toran-ink:           #16201D;
  --toran-ink-soft:      #4F5B58;
  --toran-muted:         #6D7876;
  --toran-teal:          #16544F;
  --toran-teal-deep:     #0C3B36;
  --toran-sand:          #F2E9D9;  /* soft fill. 10.29:1 under teal-deep text */
  --toran-amber:         #B4780F;
  --toran-amber-deep:    #94620C;
  --toran-amber-soft:    #FBEFD8;
  --toran-ruby:          #AE2B2B;

  /* dark-band only */
  --toran-gold:          #C9A227;
  --toran-gold-light:    #E3C45A;
  --toran-gold-pale:     #F2E3B0;
  --toran-plum:          #5B2A42;
  --toran-plum-deep:     #3F1B2E;

  /* semantic */
  --bg:            var(--toran-surface);
  --bg-raised:     var(--toran-white);
  --border:        var(--toran-hairline);
  --text:          var(--toran-ink);
  --text-muted:    var(--toran-ink-soft);
  --text-subtle:   var(--toran-muted);
  --brand:         var(--toran-teal);
  --brand-deep:    var(--toran-teal-deep);
  --brand-tint:    var(--toran-sand);
  /* amber is reserved for pending and overdue states. It is never decoration. */
  --warning:       var(--toran-amber);
  --warning-text:  var(--toran-amber-deep);
  --warning-tint:  var(--toran-amber-soft);
  --danger:        var(--toran-ruby);

  --font-display:  'Fraunces', Georgia, serif;
  --font-display-deva: 'Noto Serif Devanagari', serif;
  --font-body:     'Mukta', system-ui, sans-serif;  /* covers Latin + Devanagari */
}

/* ---------------------------------------------------------------------------
   The scales, added 6 Nov 2026, and why they were missing.

   The Paper file has defined a type scale, a spacing scale, radii, weights,
   tracking and leading since the file was made. None of them existed here, so
   every size, space and radius in the product was a literal and there was
   nothing in the code to be consistent *with*. Measured before adding these:
   645 of 1002 spacing values and 183 of 301 font sizes were off the scale, and
   two whole extra radius steps (10px x15, 12px x9) had grown beside the four
   that were meant to exist.

   That is not drift, it is the absence of a definition. One of them had already
   failed in production: `app.css` writes `letter-spacing: var(--tracking-tight)`
   with no fallback, Paper defined that token and this file did not, so the
   declaration was invalid at computed-value time and `.loadtext` silently lost
   its tracking. Adding the token fixes it with no change to app.css.

   **These values are Paper's, exactly.** If you change one, change it in Paper
   too -- that is the rule in CLAUDE.md and it now covers more than colour.

   **There is deliberately no migration.** Nothing was converted to use these.
   Rewriting a thousand literals across a stylesheet that several sessions touch
   every day is a large, conflict-heavy change with no user-visible benefit and
   real regression risk. The rule going forward is narrower and cheaper: new work
   uses the tokens, and an existing literal becomes a token when you are editing
   that rule anyway. Adding custom properties changes nothing until something
   references them, so this block is inert on its own.
   --------------------------------------------------------------------------- */
:root {
  /* type scale */
  --text-label:    12px;
  --text-xs:       14px;
  --text-sm:       16px;
  --text-base:     18px;
  --text-lg:       22px;
  --text-xl:       28px;
  --text-2xl:      38px;
  --text-3xl:      54px;
  --text-display:  92px;

  --font-weight-light:     300;
  --font-weight-regular:   400;
  --font-weight-medium:    500;
  --font-weight-semibold:  600;
  --font-weight-bold:      700;

  /* `--tracking-tight` is the one app.css already asks for. */
  --tracking-tight:   -0.025em;
  --tracking-normal:   0em;
  --tracking-label:    0.14em;

  --leading-tight:   104%;
  --leading-snug:    130%;
  --leading-body:    160%;
  --leading-deva:    165%;

  --opacity-muted:   70%;

  /* spacing scale. The gaps are intentional: there is no 5, 7, 9 or 11. */
  --spacing-1:    4px;
  --spacing-2:    8px;
  --spacing-3:   12px;
  --spacing-4:   16px;
  --spacing-6:   24px;
  --spacing-8:   32px;
  --spacing-10:  40px;
  --spacing-12:  48px;
  --spacing-16:  64px;
  --spacing-20:  80px;
  --spacing-28: 112px;

  --radius-sm:     8px;
  --radius-md:    14px;
  --radius-lg:    22px;
  --radius-pill: 999px;

  --container-content: 1180px;

  /* Parity with Paper only. A custom property cannot be used in a media query,
     so every breakpoint in the stylesheets is still written out by hand. */
  --breakpoint-desktop: 1440px;
}

/* Gold and plum only resolve to something legible on a dark band. Scope them
   so a stray --accent on a light surface fails loudly rather than quietly. */
.band-dark {
  --bg:         var(--toran-teal-deep);
  --text:       var(--toran-white);
  --text-muted: var(--toran-sand);
  --accent:     var(--toran-gold);
}
.band-plum {
  --bg:         var(--toran-plum);
  --text:       var(--toran-white);
  --text-muted: var(--toran-gold-pale);
  --accent:     var(--toran-gold-light);
}

html[lang="hi"] {
  --font-display: var(--font-display-deva);
  /* Devanagari needs more leading and zero tracking: letter-spacing breaks
     conjunct forms, and the script has no uppercase. */
  line-height: 1.65;
  letter-spacing: 0;
}

/* Tiro and Noto Serif Devanagari ship one weight / no true italic, so stop
   the browser faking them. */
body { font-synthesis: none; }
