/* glasshouse.css — Glasshouse product-only CSS (Instrument mode).
 *
 * Loaded ONLY on /glasshouse and its subpages. Never on parent or Brew Chai.
 * Owns Glasshouse's distinct visual identity: dark-native, deep cyan-teal accent,
 * humanist sans for chrome + serif for report body, density-over-whitespace.
 *
 * Inheritance:
 *   - assets/css/site.css (shared chrome primitives)
 *   - assets/css/motion.css (shared keyframes + tokens, do NOT redefine)
 *
 * Visual identity (locked):
 *   accent:        #006a66 → #18b5ae (deep cyan-teal, instrument not brand)
 *   surface:       #0e0d0b (cool-tinted near-black, dark-native)
 *   ink:           #f0ede6 (warm-tinted near-white)
 *   serif (body):  "Source Serif 4", "Source Serif Pro", Georgia, serif
 *   sans (chrome): "Inter Tight", "Inter", system-ui, sans-serif
 *   mono (data):   "JetBrains Mono", ui-monospace, monospace
 *
 * Last Updated: 2026-04-30 (rebuild)
 */

:root {
  /* Glasshouse-only tokens — namespaced so they cannot collide with Brew Chai. */
  --gh-accent:           #18b5ae;
  --gh-accent-deep:      #006a66;
  --gh-accent-faint:     rgba(24, 181, 174, 0.16);
  --gh-accent-rule:      rgba(24, 181, 174, 0.32);

  --gh-surface:          #0e0d0b;
  --gh-surface-elev-1:   #181613;
  --gh-surface-elev-2:   #221f1c;
  --gh-ink:              #f0ede6;
  --gh-ink-mute:         #b8b4ad;
  --gh-ink-faint:        #6c6a65;

  --gh-rule:             rgba(108, 122, 120, 0.20);
  --gh-rule-strong:      rgba(108, 122, 120, 0.35);

  /* Confidence bar fill — referenced by report tile + decision-matrix tile. */
  --gh-confidence-low:    #d4a23a;
  --gh-confidence-med:    #18b5ae;
  --gh-confidence-high:   #5fcfb8;
}

/* ============================================================
   Page chrome — Instrument mode default
   ============================================================ */

body.gh-page {
  background: var(--gh-surface);
  color: var(--gh-ink);
  font-feature-settings: "tnum", "ss01";
}

.gh-mono {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.gh-serif {
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}

/* Oxblood rule — used between Pre/Post Truth tiles to mark the moment
   Glasshouse's verdict ends and the world's truth begins. */
.gh-oxblood-rule {
  background: linear-gradient(180deg, transparent 0%, #7c1f2e 50%, transparent 100%);
}

/* ============================================================
   Confidence bar — referenced by Decision Matrix tile
   Animation: fill from 0 to var(--gh-conf-pct) over signature duration
   ============================================================ */

.gh-conf-bar {
  position: relative;
  height: 4px;
  background: var(--gh-rule);
  overflow: hidden;
}

.gh-conf-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--gh-confidence-med);
}

@media (prefers-reduced-motion: no-preference) {
  .gh-conf-bar[data-entering] ::after,
  .gh-conf-bar[data-entering]::after {
    animation: gh-conf-fill var(--gh-dur-signature) var(--gh-ease) both;
  }
}

@keyframes gh-conf-fill {
  from { width: 0; }
  to   { width: var(--gh-conf-pct, 100%); }
}
