/* =============================================================================
   bh-tokens.css — the Bello Console design tokens (Atelier / Night Desk).
   -----------------------------------------------------------------------------
   Approved 2026-07-12 (docs/superpowers/specs/2026-07-12-pms-elevation-program-
   charter.md §4). ONE system, two lightings:
       :root                     → Atelier    (warm, light)
       html[data-theme="dark"]   → Night Desk (navy cockpit, dark)

   PARALLEL NAMESPACE — this file is PURELY ADDITIVE. It introduces a NEW token
   family `--bhc-*` (bello console) and does NOT touch the app's existing
   `--bh-*` / `--bhds-*` tokens. So loading it has ZERO effect on the current
   look. Views adopt the new language by switching to the `.bhc-*` components
   (bh-components.css), which read these `--bhc-*` tokens — a view flips cleanly
   and completely when its batch migrates it, never a half-done two-tone state.
   Once every view has migrated, the legacy `--bh-*` system is retired.

   Adapts to the app's existing theme toggle (html[data-theme="dark"]).
   Accessibility: text tokens are WCAG-AA on their intended surfaces.
   ============================================================================= */

:root {
  /* ---- ATELIER (light) — surfaces & lines --------------------------------- */
  --bhc-bg:            #f6f1e6;
  --bhc-panel:         #fcf9f1;
  --bhc-panel-alt:     #f1eadb;
  --bhc-border:        rgba(35,29,20,0.12);
  --bhc-border-strong: rgba(35,29,20,0.20);
  --bhc-chip:          #f1eadb;
  --bhc-kbd:           #ede4d0;

  /* Ink / text — AA on the light surfaces above */
  --bhc-ink:      #231d14;
  --bhc-ink-soft: #5f5646;
  --bhc-ink-mute: #6f685b;
  --bhc-eyebrow:  #7a5512;   /* gold-as-text needs this bronze for AA */

  /* Gold — decorative accent + on-gold foreground */
  --bhc-gold:      #b0842f;
  --bhc-gold-deep: #8f6a22;
  --bhc-gold-soft: rgba(176,132,47,0.12);
  --bhc-gold-line: rgba(176,132,47,0.32);
  --bhc-on-gold:   #fcf9f1;

  /* Semantic — AA text on the soft -bg tints */
  --bhc-success:#3f7a4c; --bhc-success-bg:rgba(63,122,76,0.13);
  --bhc-warn:   #8a5a12; --bhc-warn-bg:rgba(201,164,92,0.20);
  --bhc-danger: #a6402c; --bhc-danger-bg:rgba(166,64,44,0.11);
  --bhc-info:   #1d5f8a; --bhc-info-bg:rgba(46,130,175,0.12);

  /* Calendar bars sit over weekend/today bands. These are the semantic
     channel tints composited once against --bhc-panel, then stored as solid
     colors so the cell bands can never bleed through their labels. */
  --bhc-calendar-airbnb-fill: #f3e5db;
  --bhc-calendar-info-fill:   #e3ebe9;
  --bhc-calendar-direct-fill: #f3ebda;

  /* ---- Machined surfaces (calendar redesign 2026-10-24, Hallmark "Ribbon's craft in Bello's colours") ----
     Panels lit from above, a recessed bed, metal parts and hairlines. First used by css/calendar-month.css. */
  --bhc-panel-top:    #fcf9f1;
  --bhc-panel-bottom: #f3ecdd;
  --bhc-bed:          #efe7d6;
  --bhc-bed-shadow:   inset 0 1px 2px rgba(35,29,20,0.14);
  --bhc-ink-2:        #4f473a;
  --bhc-hairline:     rgba(35,29,20,0.07);
  --bhc-metal-hi:     #fffdf8;
  --bhc-metal-lo:     #e3d8c1;
  --bhc-edge-light:   inset 0 1px 0 rgba(255,255,255,0.75);
  --bhc-lit-edge:     inset 0 1px 0 rgba(255,255,255,0.3);
  --bhc-shadow-part:  0 1px 0 rgba(35,29,20,0.10), 0 8px 14px -8px rgba(35,29,20,0.22);
  --bhc-shadow-panel: 0 1px 0 rgba(35,29,20,0.08), 0 24px 48px -20px rgba(35,29,20,0.26);
  --bhc-sheet-scrim:  rgba(35,29,20,0.38);
  --bhc-field-edge:   #857a68;
  --bhc-radius-card:  20px;
  --bhc-radius-part:  6px;
  --bhc-dur-micro:    120ms;
  /* Calendar marks: channel inks on their fills, block hatching and the day bands. */
  --bhc-calendar-airbnb:       #9c3a27;
  --bhc-calendar-vrbo:         #1d5f8a;
  --bhc-calendar-booking:      #284d8c;
  --bhc-calendar-booking-fill: #e5e9f1;
  --bhc-calendar-block-fill:   #ece4d4;
  --bhc-calendar-stripe:       rgba(35,29,20,0.09);
  --bhc-calendar-rule-stripe:  rgba(176,132,47,0.16);
  --bhc-calendar-past:         rgba(35,29,20,0.045);
  --bhc-calendar-weekend:      rgba(35,29,20,0.022);
  --bhc-calendar-today:        rgba(176,132,47,0.10);

  /* ---- Signature component tokens ----------------------------------------- */
  /* Status spine — the severity rail on every card/row. Solid in light. */
  --bhc-spine-crit:#a6402c; --bhc-spine-warn:#c9a45c; --bhc-spine-ok:#3f7a4c; --bhc-spine-info:#1d5f8a;
  --bhc-spine-neutral:#6f685b; --bhc-spine-glow: 0 0 0 0 transparent;
  /* Brass property plate — letterpress in light */
  --bhc-plate-bg: linear-gradient(180deg,#e7d6ac,#cbaf78);
  --bhc-plate-ink:#3a2c12; --bhc-plate-line:#b79a62;
  --bhc-plate-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 2px rgba(60,44,18,0.22);
  /* Ledger + live pulse */
  --bhc-ledger-rule: var(--bhc-gold);
  --bhc-live:#3f7a4c; --bhc-live-pulse: rgba(63,122,76,0.4);

  /* ---- Structure ---------------------------------------------------------- */
  --bhc-radius-sm:8px; --bhc-radius:14px; --bhc-radius-lg:18px; --bhc-radius-pill:999px;
  --bhc-shadow-sm: 0 1px 2px rgba(10,22,40,0.05), 0 1px 3px rgba(10,22,40,0.04);
  --bhc-shadow-md: 0 6px 18px rgba(10,22,40,0.08), 0 2px 4px rgba(10,22,40,0.04);
  --bhc-shadow-lg: 0 24px 60px rgba(10,22,40,0.12), 0 8px 20px rgba(10,22,40,0.06);
  --bhc-ease: cubic-bezier(0.22,1,0.36,1);
  --bhc-ease-emphasis: cubic-bezier(0.2,0.85,0.3,1);
  --bhc-dur-1:.15s; --bhc-dur-2:.28s; --bhc-dur-3:.5s;

  /* ---- Type --------------------------------------------------------------- */
  --bhc-font-display: "Fraunces", Georgia, "Hoefler Text", serif;
  --bhc-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bhc-font-mono: "SFMono-Regular", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --bhc-fs-eyebrow:.68rem; --bhc-fs-label:.72rem; --bhc-fs-body:.9rem; --bhc-fs-lead:1.5rem;
  --bhc-tracking-caps:.16em;

  /* ---- Space scale (4px base) --------------------------------------------- */
  --bhc-space-1:4px; --bhc-space-2:8px; --bhc-space-3:12px; --bhc-space-4:16px;
  --bhc-space-5:24px; --bhc-space-6:32px; --bhc-space-7:48px; --bhc-space-8:64px;
}

/* =============================================================================
   NIGHT DESK (dark) — the signature expression. Adapts to the app's existing
   html[data-theme="dark"] toggle; only the palette shifts.
   ============================================================================= */
html[data-theme="dark"] {
  --bhc-bg:            #111a2e;
  --bhc-panel:         #16213b;
  --bhc-panel-alt:     #1b2842;
  --bhc-border:        rgba(214,179,106,0.16);
  --bhc-border-strong: rgba(214,179,106,0.30);
  --bhc-chip:          #1b2842;
  --bhc-kbd:           #22304c;

  --bhc-ink:      #e9edf6;
  --bhc-ink-soft: #93a0bc;
  --bhc-ink-mute: #74819e;
  --bhc-eyebrow:  #e0bc72;

  --bhc-gold:      #d6b36a;
  --bhc-gold-deep: #e4c583;
  --bhc-gold-soft: rgba(214,179,106,0.14);
  --bhc-gold-line: rgba(214,179,106,0.32);
  --bhc-on-gold:   #0f1729;

  /* mint = live / positive ONLY (kept off the accent role) */
  --bhc-success:#4fd0b0; --bhc-success-bg:rgba(79,208,176,0.13);
  --bhc-warn:   #e0a63c; --bhc-warn-bg:rgba(224,166,60,0.15);
  --bhc-danger: #e5654f; --bhc-danger-bg:rgba(229,101,79,0.14);
  --bhc-info:   #8ecbe8; --bhc-info-bg:rgba(46,130,175,0.20);

  --bhc-calendar-airbnb-fill: #332b3e;
  --bhc-calendar-info-fill:   #1b3452;
  --bhc-calendar-direct-fill: #313542;

  --bhc-panel-top:    #18233d;
  --bhc-panel-bottom: #141e35;
  --bhc-bed:          #0f1729;
  --bhc-bed-shadow:   inset 0 1px 3px rgba(0,0,0,0.45);
  --bhc-ink-2:        #c3cce0;
  --bhc-hairline:     rgba(214,179,106,0.08);
  --bhc-metal-hi:     #3a4560;
  --bhc-metal-lo:     #222c44;
  --bhc-edge-light:   inset 0 1px 0 rgba(255,255,255,0.06);
  --bhc-lit-edge:     inset 0 1px 0 rgba(255,255,255,0.35);
  --bhc-shadow-part:  0 1px 0 rgba(0,0,0,0.45), 0 8px 14px -8px rgba(0,0,0,0.55);
  --bhc-shadow-panel: 0 1px 0 rgba(0,0,0,0.4), 0 24px 48px -20px rgba(0,0,0,0.6);
  --bhc-sheet-scrim:  rgba(0,0,0,0.55);
  --bhc-field-edge:   #66749a;
  --bhc-calendar-airbnb:       #f29680;
  --bhc-calendar-vrbo:         #93cdea;
  --bhc-calendar-booking:      #adc3f2;
  --bhc-calendar-booking-fill: #1f2e4e;
  --bhc-calendar-block-fill:   #1d2945;
  --bhc-calendar-stripe:       rgba(233,237,246,0.08);
  --bhc-calendar-rule-stripe:  rgba(214,179,106,0.18);
  --bhc-calendar-past:         rgba(0,0,0,0.2);
  --bhc-calendar-weekend:      rgba(233,237,246,0.025);
  --bhc-calendar-today:        rgba(214,179,106,0.11);

  --bhc-spine-crit:#e5654f; --bhc-spine-warn:#d6b36a; --bhc-spine-ok:#4fd0b0; --bhc-spine-info:#8ecbe8;
  --bhc-spine-neutral:#93a0bc; --bhc-spine-glow: 0 0 9px 0;
  --bhc-plate-bg: #1c2a47;
  --bhc-plate-ink:#b9c6e2; --bhc-plate-line:rgba(214,179,106,0.35);
  --bhc-plate-shadow: none;
  --bhc-live:#4fd0b0; --bhc-live-pulse: rgba(79,208,176,0.5);

  --bhc-shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.25);
  --bhc-shadow-md: 0 8px 22px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
  --bhc-shadow-lg: 0 30px 70px rgba(0,0,0,0.55), 0 10px 24px rgba(0,0,0,0.4);
}
