/* ==========================================================================
   theme.css — design tokens (Phase E; E4, E5a, E12, E13)

   ⚠ THE PRODUCT IS LIGHT ONLY (owner, 2026-09-01). There is no dark palette and
   `prefers-color-scheme: dark` is ignored — see the note above `html { color-
   scheme: light }` at the foot of this file for the decision and what it costs.

   ⚠ THE PALETTE IS VAZHAI FINANCE'S. Finance is the design reference for this
   product and the instruction was its colours, depth and scale "as it is". Every
   value here is Finance's, mapped onto the token NAMES this codebase already uses
   — 2,600 lines of module.css and shell.css reference them, so renaming was never
   on the table.

   ── ⚠ FOUR TOKENS ARE DARKER THAN FINANCE'S, AND A TEST IS WHY ───────────
   `tests/Unit/ThemeContrastTest` computes WCAG ratios from THIS FILE. Adopting
   Finance verbatim turned it red on five assertions, because Finance's own light
   theme is below AA on its primary button (white on #5DB52E = 2.59), that
   button's hover (4.34), the green used as text (2.39), its tertiary text (3.01)
   and its warning orange used as text (2.17).

   The owner's decision (2026-09-01) was to keep Finance's look and clear the bar:
   **#5DB52E stays as `--vz-primary`** — accents, borders, focus rings, active nav,
   which is where most of the Finance look lives — and only the tokens that carry
   TEXT or sit UNDER text were darkened within the same hue family:

       --vz-primary-strong  #5DB52E -> #437a1f   2.59 -> 5.20
       --vz-primary-hover   #3B8A1A -> #357615   4.34 -> 5.59
       --vz-subtle          #8A908A -> #646B65   3.01 -> 5.05
       --vz-warning         #EF9F27 -> #C77A0A   2.17 -> 3.38

   ⚠ DO NOT "RESTORE" THESE TO FINANCE'S VALUES. The test will fail, and it must
   not be weakened: its docblock records that this defect has been found twice
   before and closes *"A comment is not a check"* — which is exactly what an
   earlier version of THIS comment tried to be.

   ── 🐛 AND `--vz-primary` IS THE ACCENT, NEVER TEXT (E12) ──────────────────
   It is held to a NON-TEXT floor on purpose — borders, focus rings, active nav —
   and it measures 2.59 as text on a card. `shell.css` painted the *"Chit"* half
   of the brand lockup with it, on every screen, and no assertion in this file
   mentioned `--vz-primary` at all, because every assertion named its own pair.
   `testEveryTokenAStylesheetPaintsTextWithClearsTheFloor` now asks the
   stylesheets which tokens they paint TEXT with and holds every answer to 4.5, so
   the next one fails the suite instead of shipping. **A rule that wants a green
   word wants `--vz-primary-strong`.**
   ========================================================================== */

:root {
  /* --- Brand: Vazhai Finance greens ---------------------------------------- */
  /* ── ⚠ THE BUTTON KEEPS A WHITE LABEL, SO THE FILL IS WHAT MOVES (E15, owner) ──
     `vazhai-finance` paints `.vz-btn--primary` as `--vz-primary` #5DB52E with a WHITE
     label, hovering to #3B8A1A. White on those measures **2.59** and **4.34**, both under
     AA — and below the 2.81 of a deliberately greyed-out placeholder.

     E14 kept Finance's exact fill and turned the label black (8.11). The owner did not
     want a black label, so the fill moves instead: **`#417e20` is the brightest shade of
     Finance's own hue AND saturation that a white label clears the bar on with headroom
     (4.96)**. Four candidates were rendered as real buttons and compared before this one
     was chosen — `#448522` is two steps brighter and clears by 0.04, which is the margin
     `#178a45` and E5a's rejected candidates both died on.

     ⚠ **ONLY THE BUTTON DARKENS.** `--vz-primary` stays Finance's exact `#5DB52E` and is
     still what paints focus rings, the focused input's border, the active nav rule and
     every accent — so the bright Finance green is still the colour the interface reads
     as. One component steps down so its label can be white. */
  --vz-primary:         #5DB52E;  /* Finance's --vz-primary: accents, focus, active nav */
  --vz-primary-button:  #417e20;  /* THE BUTTON FILL — white label clears 4.96          */
                                  /* ⚠ THIS IS THE EXACT VALUE THE OWNER APPROVED BY LOOKING AT IT.
                                     `BrandPalette` derives #417f20 for the same input — one unit
                                     of green, 4.90 against 4.96 — and the shipped default is NOT
                                     quietly changed to match it. A colour chosen from a rendered
                                     comparison is chosen at that value. */
  --vz-primary-hover:   #376a1b;  /* the same, one step down: 6.48                      */
  --vz-primary-contrast:#FFFFFF;  /* the label ON the button                            */

  /* ⚠ BRAND TEXT IS A DIFFERENT TOKEN FROM THE BUTTON FILL, AND IT HAS TO BE. The two
     roles have different floors: a fill is measured against the label ON it, and text is
     measured against the surface UNDER it. `#417e20` clears white at 4.96 and then
     measures **4.38 as text on `--vz-surface-2`** — under the bar. One token cannot be
     both, which is why the split exists rather than being tidied away. */
  --vz-primary-strong:  #437a1f;  /* BRAND TEXT — footer link, panel title             */
  --vz-primary-deep:    #3B8A1A;  /* Finance's --vz-primary-dark; no rule uses it yet   */
  --vz-primary-bright:  #6FC93F;  /* highlights                                 */
  --vz-primary-tint:    #EAF3DE;  /* Finance's --vz-primary-tint, unchanged      */

  /* ── 🔴 ⚠ VAZHAI'S OWN NAME, AND THE ONE GREEN AN OPERATOR CANNOT MOVE ──────
     Owner, 2026-09-06 (`OPERATING_MODE §7` item 25, option B): **the lockup stays
     Vazhai's and the operator's mark goes on their documents.** An operator is Vazhai's
     customer and their staff signing into a product called Vazhai Chit is accurate; a
     statutory filing the OPERATOR produces and hands to a Registrar is the operator's
     artifact, and carrying their software vendor's mark on it would be odd. The split is
     **whose artifact is it**, not how much branding is allowed.

     ⚠ SO THIS EXISTS ONLY BECAUSE `BrandPalette` REWRITES THE OTHER ONE.
     `.vz-brand-word b` painted `--vz-primary-strong`, which is in `BrandPalette::TOKENS`
     — so an operator who set a purple brand got *"Vazhai **Chit**"* in purple beside a
     green product tile, which is two brands in one lockup rather than either of them.
     This token is deliberately NOT in that list, and `BrandPaletteTest` asserts it stays
     out. **Every other role keeps following the operator** — buttons, navigation, focus
     rings, active states, the footer link and the panel title. E4b is not reverted; only
     the LOCKUP stops following.

     🔴 ⚠ AND IT IS THE SHIPPED VALUE, NOT A NEW ONE CHOSEN BY EYE. `#437a1f` is
     `--vz-primary-strong`'s own default, measuring **5.20** on `--vz-surface` — E12 moved
     this word off `--vz-primary` because that measured **2.59** as 18px text (`§7` item
     27), and inventing a shade here is how that comes straight back.
     `testEveryTokenAStylesheetPaintsTextWithClearsTheFloor` holds it automatically: it
     asks the stylesheets which tokens paint TEXT and measures every answer against 4.5. */
  --vz-wordmark:        #437a1f;  /* THE PRODUCT'S OWN NAME — never org-overridable   */

  /* Gold = auspicious/prized accent. ALWAYS dark text on top (BRANDING §6).
     ⚠ NOT A FINANCE TOKEN — Finance has no gold. Kept because this product uses
     it for the PRIZED state, which is chit-fund domain vocabulary Finance has no
     equivalent of, and dropping it would leave `.vz-badge--prized` unstyled. */
  --vz-gold:            #E0A63C;
  --vz-gold-strong:     #C7962A;

  /* --- Text ---------------------------------------------------------------- */
  --vz-ink:             #1F2421;
  --vz-muted:           #5A615B;
  --vz-subtle:          #646B65;  /* DARKENED from Finance's #8A908A — see above  */

  /* --- Surfaces ------------------------------------------------------------ */
  --vz-bg:              #F5F6F4;
  --vz-surface:         #FFFFFF;
  --vz-surface-2:       #F0F1EE;
  --vz-border:          #E2E4DF;
  --vz-border-strong:   #CBCEC7;

  /* --- Semantic ------------------------------------------------------------ */
  --vz-success:         #639922;
  --vz-warning:         #C77A0A;
  --vz-danger:          #E24B4A;
  --vz-info:            #378ADD;

  /* Finance pairs every semantic colour with a tint and a text colour, so a
     callout is a tinted panel with legible ink rather than coloured text on the
     page background. All four text-on-tint pairs measure 8.2–9.0. */
  --vz-success-tint:    #EAF3DE;
  --vz-warning-tint:    #FAEEDA;
  --vz-danger-tint:     #FCEBEB;
  --vz-info-tint:       #E6F1FB;
  --vz-success-text:    #27500A;
  --vz-warning-text:    #633806;
  --vz-danger-text:     #791F1F;
  --vz-info-text:       #0C447C;

  /* ── ⚠ THE SOLID DANGER BUTTON NEEDS ITS OWN RED, AND IT IS THE GREEN BUTTON'S
     TRADE AGAIN (E17, owner-approved) ────────────────────────────────────────
     White on `--vz-danger` #E24B4A measures **3.93** — under AA, and under the 4.38 of
     a deliberately greyed-out placeholder. So the solid variant cannot use the shared
     token, exactly as `.vz-action--primary` cannot use `--vz-primary`.

     ⚠ AND DARKENING THE SHARED TOKEN WOULD CHANGE THREE OTHER THINGS. `--vz-danger` is
     also the alert border, the required asterisk (`.vz-required`) and the invalid field's
     outline — none of which carries text, so all three are correctly held to a NON-TEXT
     floor at 3.93. A fill is measured against the label ON it; a border is measured
     against the surface UNDER it. One token cannot be both, which is why this split
     exists rather than being tidied away. `--vz-primary-button` is the precedent and the
     reasoning is identical.

         --vz-danger-button   #d92423   white 4.97
         --vz-danger-hover    #b81b1a   white 6.54

     ⚠ `#d92423` IS THE VALUE THE OWNER APPROVED, from rendered buttons compared side by
     side. It is not silently moved to a neighbouring shade for tidiness — `§E15` settled
     that a colour is chosen at the value you looked at. */
  --vz-danger-button:   #d92423;  /* THE SOLID FILL — white label clears 4.97 */
  --vz-danger-hover:    #b81b1a;  /* the same, one step down: 6.54           */

  /* --- Typography ---------------------------------------------------------- */
  /* Finance's stack, with the Indic faces this product cannot drop.
     ⚠ THE FACES SIT AHEAD OF THEIR LOCALES DELIBERATELY. v1 ships ENGLISH ONLY —
     `ta` and `ml` are frozen drafts awaiting native review — but a Tamil member
     NAME is already rendered today, on every screen and inside the statutory
     PDFs. A missing glyph renders as an empty box and Indic conjuncts need real
     shaping, so the stack cannot wait for the catalog. D11c is the worked example
     of what a missing face costs: mPDF's default font prints ₹ perfectly and
     Tamil as NOTHING. */
  --vz-font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
                  'Noto Sans Tamil', 'Noto Sans Malayalam', Arial, sans-serif;
  --vz-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
                  'Liberation Mono', monospace;

  /* ⚠ FINANCE'S SCALE IS TIGHTER THAN THE ONE IT REPLACES, and that is most of
     what makes the two products look alike: h1 18 rather than 24, display 22
     rather than 30. The four small steps were already identical. */
  --vz-fs-xs:      12px;  /* caption */
  --vz-fs-sm:      13px;
  --vz-fs-base:    14px;  /* body */
  --vz-fs-md:      16px;  /* h2 — also the mobile input size, which stops iOS
                             zooming the page on focus */
  --vz-fs-lg:      18px;
  --vz-fs-h1:      18px;
  --vz-fs-display: 22px;

  /* Finance runs 400/500. The 600 step is kept because this codebase's headings
     reference `--vz-fw-bold`, and 600 against Finance's 500 is the smallest step
     that still reads as emphasis at 18px. */
  --vz-fw-regular: 400;
  --vz-fw-medium:  500;
  --vz-fw-bold:    600;

  /* Malayalam conjuncts run taller than Tamil (BRANDING §4) — this line-height is
     set for the tallest active script, not for Latin. */
  --vz-lh-tight:  1.35;
  --vz-lh-base:   1.55;

  /* --- Spacing ------------------------------------------------------------- */
  /* ⚠ FINANCE'S STEPS 5 AND 6 ARE TIGHTER (20/24 against 24/32), which is the
     other half of its density. Step 7 has no Finance equivalent and is kept
     because this codebase uses it for page-level gaps. */
  --vz-space-1:  4px;
  --vz-space-2:  8px;
  --vz-space-3:  12px;
  --vz-space-4:  16px;
  --vz-space-5:  20px;
  --vz-space-6:  24px;
  --vz-space-7:  40px;

  /* --- Radii + elevation --------------------------------------------------- */
  /* ⚠ FINANCE'S PILL IS 20px, NOT 999px. A 999px pill on a tall element becomes a
     lozenge; 20px keeps the corner constant, which is what the branch chip and
     the status badges actually want. */
  --vz-radius-sm:  6px;
  --vz-radius-md:  8px;
  --vz-radius-lg:  12px;
  --vz-radius-pill: 20px;

  --vz-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --vz-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* --- Motion (E13) --------------------------------------------------------- */
  /* ⚠ ONE DURATION FOR THE WHOLE PRODUCT, AND IT IS THE ONE ALREADY IN USE.
     `.vz-control`'s focus transition has been `.15s ease` since B2; making it a token
     rather than adding a second number is what keeps every hover in the app feeling
     like the same app. The owner's brief was *"subtle transitions and hover effects …
     natural and effortless"*, and at this duration the change is felt rather than
     watched — long enough to soften the snap, short enough that a fast clicker never
     waits for it.

     ⚠ AND IT IS APPLIED ONLY TO COLOUR, NEVER TO LAYOUT OR TO `outline`. A transition
     on size or position makes a dense table shimmer as the pointer crosses it, and a
     transition on the focus ring would delay the one indicator a keyboard user needs
     immediately. See the `prefers-reduced-motion` block at the foot of module.css,
     which turns all of this off for anyone who has asked for less movement. */
  --vz-transition: 150ms ease;

  /* Minimum touch target. ⚠ The citation used to read "RESPONSIVE.md", which has
     never existed. The rule lives in `START_HERE §3`'s testing conventions: every
     new screen checked at 375 / 768 / 1440 for overflow, tap targets and contrast,
     by MEASUREMENT rather than by eye. ("in both themes" was part of that rule
     until E13 left one.) */
  --vz-tap-min: 44px;
}

/* ── ⚠ THERE IS NO DARK PALETTE, AND THAT IS A DECISION (owner, 2026-09-01) ──
   `theme.css` used to ship three theme states: light on `:root`, a
   `prefers-color-scheme: dark` block, and an explicit `[data-theme='dark']`
   block. **All three of Finance's dark tokens are gone and the product is light
   only**, on the owner's instruction: *"I'd prefer to keep the overall design
   lighter … avoid dark colors and keep the overall experience simple, smooth,
   and easy to use."*

   ⚠ THE COST WAS STATED BEFORE THE CHOICE AND IS RECORDED HERE RATHER THAN
   FORGOTTEN. A dark theme is an accessibility affordance for some readers —
   light sensitivity, migraine, low vision — and this product no longer offers
   it. `prefers-color-scheme: dark` is now ignored: a user whose device asks for
   dark gets light anyway. That is the trade-off, taken deliberately.

   ⚠ AND `color-scheme: light` BELOW IS PART OF THE SAME DECISION, not a detail.
   Without it a dark-OS browser still paints its OWN chrome dark — form controls,
   scrollbars, the canvas behind the page — so a light palette would sit inside
   dark furniture. Declaring `light` makes the browser render its widgets to match.

   ⚠ WHAT REPLACED THE DELETED ASSERTIONS. `ThemeContrastTest` measured all three
   states; two of them no longer exist, so those assertions could not be kept.
   They were not simply removed: `testTheStylesheetShipsNoDarkPaletteAtAll` now
   fails if a dark block reappears, because a dark palette added back without the
   measurements is exactly the state this file has twice been in before.
   `PHASE_E §E13`. */

/* --- Minimal base, so the kernel error pages render before any app CSS ---- */
html { color-scheme: light; }

body {
  margin: 0;
  font-family: var(--vz-font-sans);
  font-size: var(--vz-fs-base);
  line-height: var(--vz-lh-base);
  color: var(--vz-ink);
  background: var(--vz-bg);
}

/* Money columns: tabular figures so paise align down the column. */
.vz-num, .vz-money { font-variant-numeric: tabular-nums lining-nums; }
