/* =====================================================================
   DOORWAY DESIGN TOKENS  ·  one file restyles every surface
   ---------------------------------------------------------------------
   Palette: CRIMSON & PARCHMENT (Logo Idea 1), adopted 2026-10-10.
   Spec: deck/rb/brand/BRAND.md. Crimson #AE042E is the brand colour
   (primary actions, links, active states, the mark); crimson-deep #7D0322
   is the dark frame (rails, mastheads, bands); parchment #F3D6AB is the
   hero ground, text and mark on crimson, and the "needs you" fill; cream
   #FCF6EC is the default ground; espresso ink #2A1A15 is the text.
   Fraunces display, Archivo text (expanded caps for labels), IBM Plex Mono
   for figures. The mark is the perspective door from brand/mark-*.svg.
   Colour laws kept from the Doorway canon (PRO_WIREFRAME_PLAN §3–4): calm by
   default, parchment with a crimson edge only on what needs a human, brick
   (darker than brand crimson) only for a promise that broke, cost never
   coloured, nothing green.
   Variable NAMES are kept from the previous palette so components don't
   change: --navy now means "the dark frame" (crimson-deep), --door means
   "needs a human" (parchment), --gold is the ochre chart accent.
   DESIGN_THESIS: light-first, tabular figures on every number, no sparkle.
   Light-only on purpose. Dark mode can return later.
   ===================================================================== */

:root {
  color-scheme: light;

  /* ---- Brand ---- */
  --crimson:      #AE042E;  /* THE brand colour */
  --crimson-deep: #7D0322;  /* hover/pressed, the dark frame */
  --crimson-soft: #F7DFDF;  /* tints, selected rows */
  --parchment:    #F3D6AB;  /* hero ground, text and mark on crimson */
  --parchment-2:  #F8E7CC;  /* lighter parchment: quiet panels, chips */
  --cream:        #FCF6EC;  /* default ground */
  --ochre:        #C98A2B;  /* second chart series, small warm accent */

  --navy:       #7D0322;  /* crimson-deep: the frame (rails, mastheads, bands, dark cards) */
  --navy-2:     #95112F;  /* raised surfaces on the frame */
  --door:       #F3D6AB;  /* parchment: whatever needs a human (fill). Edge/text in --door-ink */
  --door-ink:   #AE042E;  /* crimson: "needs you" edge or text on light grounds */
  --door-soft:  #F8E7CC;  /* "needs you" tint, ink or crimson-deep text on it */
  --gold:       #C98A2B;  /* ochre: charts and small warm accents only */
  --slate:      #F3D6AB;  /* parchment: text on the crimson frame */
  --slate-2:    #CB9B8E;  /* muted text on the frame */

  /* ---- Surfaces ---- */
  --stage:     #FFFFFF;   /* behind devices and pages, carries the dot grid (white) */
  --ground:    #FFFFFF;   /* app and screen background (white) */
  --surface:   #FFFDF8;   /* the work ground: cards, tables */
  --surface-2: #F6ECDD;   /* quiet panels, inputs, stripes (ink text only) */
  --line:      #EADBC4;
  --line-strong:#D8C09C;
  --dot:       rgba(42,26,21,.08);

  /* ---- Text ---- */
  --ink:   #2A1A15;       /* espresso */
  --ink-2: #6B5248;       /* secondary */
  --ink-3: #9C8478;       /* captions */
  --on-navy: #FCF6EC;     /* cream on the crimson frame */

  /* ---- Roles (components read these) ---- */
  --primary:      #AE042E;  /* crimson: primary buttons, links, active states */
  --primary-ink:  #FFFDF8;
  --primary-soft: #F7DFDF;
  --accent:       var(--door);
  --accent-ink:   var(--navy);
  --accent-soft:  var(--door-soft);

  /* ---- Status: meaning only ---- */
  --kept:        #146A5C;  --kept-soft:   #DFF1EC;   /* kept, committed, human-signed (teal) */
  --watch:       #8A5A00;  --watch-soft:  #FBF0D9;   /* at risk, provisional, stale */
  --breach:      #8E2A12;  --breach-soft: #F6E1D8;   /* only a promise that broke (brick, not brand crimson) */
  --info:        #AE042E; --info-soft: #F7DFDF;
  --teal:        #1F8C7B;  /* committed fills (meters, dots) */

  /* ---- Pro sidebar (crimson-deep frame) ---- */
  --side-bg:     #7D0322;
  --side-ink:    #F8E7CC;
  --side-ink-2:  #DDB3A3;
  --side-hover:  #95112F;
  --side-active: #F3D6AB;
  --side-mark:   #F3D6AB;

  /* ---- Charts: ordered series ---- */
  --series-1: #AE042E;  /* crimson */
  --series-2: #C98A2B;  /* ochre */
  --series-3: #1F8C7B;  /* teal */
  --series-4: #2A1A15;  /* ink */
  --series-5: #9C8478;  /* ink-3 */

  /* ---- Type ---- */
  --font-display: 'Fraunces', Georgia, serif;   /* headlines (the wordmark is artwork, never typed) */
  --font-body:    'Archivo', system-ui, sans-serif;
  --font-label:   'Archivo', system-ui, sans-serif; /* eyebrows: expanded (font-stretch 125%) caps */
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; /* IDs, serials, figures */

  --fs-xs: 11px;  --fs-sm: 12.5px;  --fs-md: 14px;  --fs-lg: 16px;
  --fs-xl: 20px;  --fs-2xl: 27px;   --fs-3xl: 38px; --fs-4xl: clamp(40px, 6.4vw, 72px);

  /* ---- Space (4px base) ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-24: 96px;

  /* ---- Shape & depth ---- */
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(42,26,21,.05), 0 4px 16px rgba(42,26,21,.06);
  --shadow-pop:  0 2px 6px rgba(42,26,21,.07), 0 16px 36px rgba(42,26,21,.14);
  --shadow-device: 0 34px 80px rgba(42,26,21,.20), 0 8px 20px rgba(42,26,21,.08);
  --bezel: #2A1A15;

  /* Motion budget: under 200ms for any transition (DESIGN_THESIS §4.4) */
  --ease: cubic-bezier(.22,.9,.3,1);
}

/* =====================================================================
   VOICE (every string, every surface)
   - A competent colleague who respects your time. State facts, not feelings.
   - Lead with the sentence that matters: "Handled." / "Plumbing is 41% open Thursday."
   - Every number is labelled when it isn't real: Modeled · sample data.
   - Say "we" and own failures: "We couldn't reach your FSM."
   - No exclamation points, no emoji, no sparkles, no "AI-powered", no "just".
   - Say what we refuse: we never dispatch, never sell a lead twice, never take
     a cut of your ad spend, never hold your house's record against you.
   - Doorway on everything that leaves the building. One public name.
   ===================================================================== */

/* =====================================================================
   SURFACE THEMES · html[data-side] = ecru (default) | white | grey | navy
   --frame   big brand surfaces (dark cards, report mastheads, credit cards)
   --fill    solid buttons and small brand fills
   Crimson stays as an accent only: links, key numbers, charts, focus.
   Pick one with ?theme=white (or ?side=), remembered per browser.
   ===================================================================== */
:root, html[data-side="ecru"] {
  --frame: #F3EADB; --frame-2: #E9DCC6; --on-frame: #2A1A15;
  --fill:  #EADBC3; --on-fill: #7D0322;
  --slate: #6B5248; --slate-2: #9C8478; --on-navy: #2A1A15; --primary-ink: #7D0322; --logo-on-frame: #AE042E;
}
html[data-side="white"] {
  --frame: #FFFFFF; --frame-2: #F6EFE4; --on-frame: #2A1A15;
  --fill:  #F4EBDD; --on-fill: #7D0322;
  --slate: #6B5248; --slate-2: #9C8478; --on-navy: #2A1A15; --primary-ink: #7D0322; --logo-on-frame: #AE042E;
}
html[data-side="grey"] {
  --frame: #EFEDEA; --frame-2: #E3DFD9; --on-frame: #2A1A15;
  --fill:  #E4E0DA; --on-fill: #7D0322;
  --slate: #6B5248; --slate-2: #8E847C; --on-navy: #2A1A15; --primary-ink: #7D0322; --logo-on-frame: #AE042E;
}
html[data-side="navy"] {
  --frame: #0E1A36; --frame-2: #1B2A4D; --on-frame: #FFFFFF;
  --fill:  #0E1A36; --on-fill: #FFFFFF;
  --slate: #C9D2E3; --slate-2: #94A3B8; --on-navy: #FFFFFF; --primary-ink: #FFFFFF; --logo-on-frame: #F3D6AB;
}
/* light fills get a hairline so buttons still read as buttons on cream */
html:not([data-side="navy"]) .btn:not(.ghost):not(.quiet):not(.danger):not(.brand) { box-shadow: inset 0 0 0 1px rgba(125,3,34,.22); }
