/*
 * demo-brand.css — PRE-PAINT FALLBACK for every Vantage demo surface.
 *
 * NOT THE SOURCE OF TRUTH. Read this before editing a value here.
 * ---------------------------------------------------------------
 * The canonical demo seed is vantage/demo/demo-brand-seed.js, which feeds
 * vantage-brand.js the two-seed contract. That engine injects into
 * html:not([data-theme]) — specificity (0,1,1) — which beats every :root
 * (0,1,0) declared below. So the moment the brand fetch resolves, the engine's
 * derived ramp replaces everything in this file.
 *
 * This file's ONLY job is the first frame: it paints before that fetch lands so
 * the demos don't flash the platform default. Same arrangement as the fallback
 * blocks in netlify/functions/lib/templates.js — the safety net, never the
 * substitute. Changing a colour HERE will not change what the demos render.
 * Change vantage/demo/demo-brand-seed.js instead.
 *
 * The values below are the pre-derivation seed, so they intentionally do NOT
 * equal what you will read out of getComputedStyle at runtime (the engine
 * republishes the canvas at L 9% and the accent at L 92%).
 *
 * WHY THIS FILE EXISTS
 * --------------------
 * The eight demo pages each carried their own hardcoded :root copy of the
 * brand tokens. Eight copies of one concept is exactly the drift Rule G-1
 * forbids: a re-skin meant editing eight blocks and they had already diverged
 * (--bg-dark, --white, --yellow and the *-rgb partners were present in some
 * and missing in others). One fallback, in one place. The pages own layout and
 * domain tokens only.
 *
 * SCOPE — what belongs here
 * -------------------------
 * ONLY the brand seed: the canvas family, the accent family, their rgb
 * partners, the derived accent fill, and the default face. Everything else
 * stays page-local:
 *   • layout tokens      (--section-max, --content-ml, --pnav-w, --nav)
 *   • semantic status    (--green, --red, --yellow, --blue, --amber, --link)
 *   • per-page type role (--font-body — the proposal viewers set a serif
 *                         document face; the portal and designer do not)
 * A status green is not brand. Do not migrate those here to "finish the job" —
 * they are deliberately tuned per surface and unifying them silently repaints
 * every badge on every demo.
 *
 * PALETTE — SSI canvas, Vantage gold (agreed 2026-08-03)
 * ------------------------------------------------------
 * The canvas moves to the near-black used on smartspaceintegration.com
 * (css/style.css:46-48). The accent does not move: --gold was ALREADY
 * #C9A464 on both sides, so the gold surfaces in every demo are unchanged
 * and only the green cast of the old #162626 canvas goes away.
 *
 * TRAP — --gold-dim means two different things
 * --------------------------------------------
 * SSI's stylesheet defines --gold-dim as rgba(201,164,100,0.12): a hairline
 * BORDER tint. Vantage defines it as #917040: a solid dim gold used as TEXT
 * color (demo-schedule.html:50 column headers, and everything reading
 * var(--gold-dim-text, var(--gold-dim))). They share a name and nothing else.
 * Do NOT "finish the SSI match" by copying that alpha value across — it
 * renders that text at 12% opacity on a near-black canvas, i.e. invisible.
 * The Vantage solid value is kept deliberately.
 *
 * LOAD ORDER — this must come LAST
 * --------------------------------
 * nDEMO-design.html also loads client-design.css, which carries its own :root
 * seed AND is shared with the real, tenant-facing client-design.html. That
 * file must not be edited — repainting it would repaint production. So this
 * link is placed after it and wins on source order at equal specificity.
 * Same rule for the page's own <style> block: any brand token left in a page
 * :root would beat this file, which is why those blocks were stripped rather
 * than left in place as a fallback.
 *
 * RUNTIME OVERRIDE — expected, on all eight demo pages
 * -----------------------------------------------------
 * Every demo now loads vantage-brand.js, so the tenant palette always compiles
 * over these values into html:not([data-theme]) (vantage-brand.js:705-728), and
 * light mode is written into html[data-theme="light"]. That is the design, not
 * a bug: do not try to win the fight with !important or a higher-specificity
 * selector here. If a demo renders the wrong colour, the seed is wrong — fix
 * vantage/demo/demo-brand-seed.js.
 */

:root {
  /* ── Canvas — SSI near-black (ssi-public/css/style.css:46-48) ── */
  --bg:             #070c0c;
  --bg-mid:         #0b1212;
  --bg-light:       #0f1818;
  --bg-dark:        #030606;   /* one step under --bg; designer chrome only */

  --bg-rgb:         7, 12, 12;
  --bg-mid-rgb:     11, 18, 18;
  --bg-light-rgb:   15, 24, 24;

  /* ── Accent — unchanged, already identical to SSI ── */
  --gold:           #C9A464;
  --gold-light:     #E6D0A5;
  --gold-dim:       #917040;   /* SOLID — a text color. See the trap note above. */

  --gold-rgb:       201, 164, 100;
  --gold-light-rgb: 230, 208, 165;
  --gold-dim-rgb:   145, 112, 64;

  /* Derived, so it retints automatically with the canvas and the accent. */
  --gold-fill:      color-mix(in srgb, var(--gold) 7%, var(--bg-mid));

  /* ── Supporting ── */
  --muted:          #4a7070;
  --muted-rgb:      74, 112, 112;
  --white:          #ffffff;

  --font:           'Lato', Arial, sans-serif;
}

/* ══════════════════════════════════════════════════════════════════════════
 * DEMO SHELL OVERRIDES — not brand tokens
 * ══════════════════════════════════════════════════════════════════════════
 *
 * Chrome that the real app needs and a demo does not. Kept here rather than
 * copied into each page because this is the one stylesheet every demo surface
 * already loads; duplicating two rules across pages is the drift the token
 * consolidation above just removed.
 *
 * ── The empty app bar ──
 * vantage-sidebar.js builds #vsb-appbar and puts `vsb-on` on <body>, which
 * reserves 56px via body padding-top. On a demo that bar is empty: the context
 * slot measures 0x0 and the actions slot holds a single 57px control. The 56px
 * band was always there, but it used to disappear into the surrounding chrome
 * because the hairlines were warm and translucent (rgba(230,208,165,0.18)).
 * The two-seed engine replaced those with an opaque neutral line, so the empty
 * band started reading as a gap under the demo banner.
 *
 * Hiding the bar is not enough on its own — the 56px lives in body's padding,
 * so both have to go or the space simply outlives the element.
 *
 * SCOPE: keyed on body.vsb-on, which only the sidebar shell sets. The proposal
 * viewers use body.has-proposal-nav with padding-top 0 and build no appbar, so
 * these rules are inert there. Do not rewrite them to bare `body` — that would
 * strip the offset from any demo that later adopts real top chrome.
 *
 * SPECIFICITY: the offset being cancelled is
 *     vantage-ui.css → body.v-app-shell { padding-top: 56px !important }
 * which is also !important and also (0,1,1). Equal specificity means source
 * order decides, and vantage-ui.css is INJECTED AT RUNTIME by vantage-brand.js
 * (injectAppFoundation), so it always lands after this file and wins. Hence
 * the doubled class below — (0,2,1) beats it regardless of load order. A
 * single-class version of this rule silently no-ops; that is not a typo to
 * tidy up.
 */
#vsb-appbar { display: none !important; }
body.v-app-shell.vsb-on { padding-top: 0 !important; }
