/*!
 * CAPHENIA Design Kit — v1.0.0
 * Bundled CSS: tokens + typography + components + brand patterns.
 * Single source of truth: tokens.css. Density modes: [data-density="product"|"marketing"].
 * Drop this file + /fonts folder into any project — that's the whole install.
 */

/* ===== fonts/fonts.css ===== */
/* ========================================================================
   CAPHENIA Design Kit — Webfonts
   ------------------------------------------------------------------------
   Barlow (full family) — served LOCALLY from this folder.
   Inter / JetBrains Mono — Google Fonts substitutes for Söhne / IBM Plex.

   Path is resolved RELATIVE TO THIS FILE — drop the /fonts folder anywhere
   and as long as fonts.css sits next to the .ttf files, it just works.
   ======================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 100; font-display: swap; src: url("../fonts/Barlow-Thin.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 100; font-display: swap; src: url("../fonts/Barlow-ThinItalic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 200; font-display: swap; src: url("../fonts/Barlow-ExtraLight.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 200; font-display: swap; src: url("../fonts/Barlow-ExtraLightItalic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/Barlow-Light.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/Barlow-LightItalic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/Barlow-Italic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Barlow-Medium.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/Barlow-MediumItalic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Barlow-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/Barlow-SemiBoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Barlow-Bold.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/Barlow-BoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/Barlow-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 800; font-display: swap; src: url("../fonts/Barlow-ExtraBoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/Barlow-Black.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 900; font-display: swap; src: url("../fonts/Barlow-BlackItalic.ttf") format("truetype"); }


/* ===== tokens/tokens.css ===== */
/* ========================================================================
   CAPHENIA Design Kit — Tokens (canonical)
   ------------------------------------------------------------------------
   Single source of truth. CSS custom properties only — no @font-face here
   (that lives in /fonts/fonts.css so tokens stay drop-in for any pipeline).

   Density modes:
     [data-density="marketing"]  → caphenia.com (generous spacing, larger type)
     [data-density="product"]    → Altitude / DeepResearch (Bloomberg-grade
                                   density, tabular figures, tight scale)
   ======================================================================== */

:root {
  /* ====================================================================
     1. COLOR — primitives
     Rigorously monochrome. One brand red is the ONLY chromatic accent.
     ==================================================================== */
  --red-500:        #C9252B;   /* canonical brand red, primary actions, anchors */
  --red-600:        #A50016;   /* deep red — pressed states, dark surfaces */
  --red-700:        #930013;
  --red-100:        #FFE2DF;   /* tint — selected rows, highlights */
  --red-050:        #FFF5F4;

  --neutral-000:    #FFFFFF;
  --neutral-050:    #F9F9F9;   /* page bg, marketing */
  --neutral-100:    #F3F3F3;   /* surface-container-low (sidebar, panel) */
  --neutral-150:    #EEEEEE;
  --neutral-200:    #E8E8E8;   /* zebra rows */
  --neutral-250:    #E2E2E2;
  --neutral-300:    #D1D1D1;   /* hairline accessibility border (cap) */
  --neutral-400:    #A3A3A3;   /* disabled / very low emphasis */
  --neutral-500:    #6E6E6E;   /* secondary text, metadata */
  --neutral-600:    #505050;
  --neutral-700:    #2F3131;
  --neutral-800:    #1A1C1C;   /* primary text, near-black */
  --neutral-900:    #0E0F0F;   /* deepest near-black */

  /* Semantic — derived from primitives ONLY. Never invent a new color. */
  --color-bg:                 var(--neutral-000);
  --color-bg-subtle:          var(--neutral-100);
  --color-bg-muted:           var(--neutral-150);
  --color-bg-inverse:         var(--neutral-900);
  --color-surface:            var(--neutral-000);
  --color-surface-raised:     var(--neutral-000);     /* depth via stacking, not shadow */
  --color-surface-sunken:     var(--neutral-100);

  --fg-1:                     var(--neutral-800);
  --fg-2:                     var(--neutral-500);
  --fg-3:                     var(--neutral-400);
  --fg-on-inverse:            var(--neutral-000);
  --fg-brand:                 var(--red-500);

  --color-primary:            var(--red-500);
  --color-primary-hover:      #D43A40;
  --color-primary-pressed:    var(--red-600);
  --color-on-primary:         var(--neutral-000);

  /* Borders — "Ghost Border": prefer surface shifts over lines */
  --border-ghost:             var(--neutral-100);
  --border-strong:            var(--neutral-250);
  --border-max:               var(--neutral-300);
  --border-focus:             var(--neutral-800);     /* focus is near-black, NOT red */
  --border-error:             var(--red-500);

  /* Status — derived; success uses tone, not green */
  --status-active:            var(--red-500);
  --status-warning:           #C28A00;
  --status-error:             var(--red-500);
  --status-stable:            var(--neutral-500);
  --status-stale:             var(--neutral-400);

  --trust-high:               var(--neutral-800);
  --trust-medium:             var(--neutral-500);
  --trust-low:                var(--neutral-400);

  --conf-band-fill:           rgba(26, 28, 28, 0.06);
  --conf-band-stroke:         rgba(26, 28, 28, 0.12);

  /* ====================================================================
     2. TYPOGRAPHY
     ==================================================================== */
  --font-display:   "Barlow", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:      "Barlow", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:      "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* pt-based scale */
  --fs-9:    9pt;
  --fs-10:  10pt;
  --fs-11:  11pt;
  --fs-12:  12pt;
  --fs-13:  13pt;
  --fs-16:  16pt;
  --fs-20:  20pt;
  --fs-28:  28pt;
  --fs-40:  40pt;
  --fs-56:  56pt;

  --fw-regular:    400;
  --fw-medium:     500;
  --fw-semibold:   600;
  --fw-bold:       700;

  --lh-tight:    1.05;
  --lh-snug:     1.20;
  --lh-normal:   1.45;
  --lh-relaxed:  1.60;

  --tracking-tight:    -0.01em;
  --tracking-normal:    0;
  --tracking-wide:      0.08em;
  --tracking-wider:     0.15em;
  --tracking-widest:    0.20em;

  /* ====================================================================
     3. SPACING — 4px base
     ==================================================================== */
  --space-0:   0;
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-24:  6rem;

  /* ====================================================================
     4. RADII — 4px max except pill
     ==================================================================== */
  --radius-xs:    2px;
  --radius-sm:    4px;
  --radius-md:    6px;
  --radius-lg:    8px;
  --radius-pill:  9999px;

  /* ====================================================================
     5. ELEVATION — depth via stacking, not shadows
     ==================================================================== */
  --elev-0:  none;
  --elev-1:  0 1px 0 rgba(26, 28, 28, 0.04);
  --elev-2:  0 4px 12px rgba(26, 28, 28, 0.06);
  --elev-3:  0 12px 32px rgba(26, 28, 28, 0.10);

  /* ====================================================================
     6. MOTION
     ==================================================================== */
  --motion-quick:   120ms;
  --motion-base:    150ms;
  --motion-slow:    240ms;
  --easing-standard:   cubic-bezier(0.2, 0, 0, 1);
  --easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --easing-linear:     linear;

  /* ====================================================================
     7. LAYOUT
     ==================================================================== */
  --max-width-prose:      72ch;
  --max-width-content:    1280px;
  --max-width-marketing:  1440px;
  --sidebar-w:            256px;
  --topbar-h:             64px;
}

/* ---------- Density: PRODUCT (Altitude / DeepResearch) ----------------- */
[data-density="product"] {
  --density-cell-y:       var(--space-3);
  --density-cell-x:       var(--space-4);
  --density-card-pad:     var(--space-5);
  --density-section-gap:  var(--space-8);
  --density-page-pad:     var(--space-8);
  --num-features: "tnum" 1, "lnum" 1;
}

/* ---------- Density: MARKETING (caphenia.com) -------------------------- */
[data-density="marketing"] {
  --density-cell-y:       var(--space-4);
  --density-cell-x:       var(--space-6);
  --density-card-pad:     var(--space-8);
  --density-section-gap:  var(--space-16);
  --density-page-pad:     var(--space-12);
  --num-features: "tnum" 1, "lnum" 1;
}

/* ===== Default to product density ===== */
:root { color-scheme: light; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html:not([data-density]) {
  --density-cell-y:       var(--space-3);
  --density-cell-x:       var(--space-4);
  --density-card-pad:     var(--space-5);
  --density-section-gap:  var(--space-8);
  --density-page-pad:     var(--space-8);
  --num-features: "tnum" 1, "lnum" 1;
}


/* ===== tokens/typography.css ===== */
/* ========================================================================
   CAPHENIA Design Kit — Semantic Type Styles
   Use these classes (or copy the rules) instead of restating sizes inline.
   Depends on: tokens.css
   ======================================================================== */

body, .body {
  font-family: var(--font-body);
  font-size:   var(--fs-11);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color:       var(--fg-1);
  font-feature-settings: "ss01" 1;
}

.h1, h1.cph {
  font-family: var(--font-display);
  font-size:   var(--fs-16);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color:       var(--color-primary);
  margin: 0;
}

.h2, h2.cph {
  font-family: var(--font-display);
  font-size:   var(--fs-13);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color:       var(--fg-1);
  margin: 0;
}

.h3, h3.cph {
  font-family: var(--font-display);
  font-size:   var(--fs-12);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color:       var(--fg-1);
  margin: 0;
}

.eyebrow,
.label, label.cph {
  font-family: var(--font-display);
  font-size:   var(--fs-9);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color:       var(--fg-2);
}

.body-sm  { font-size: var(--fs-10); line-height: var(--lh-normal); }
.body-md  { font-size: var(--fs-11); line-height: var(--lh-normal); }
.body-lg  { font-size: var(--fs-12); line-height: var(--lh-relaxed); }

.kpi-value {
  font-family: var(--font-display);
  font-size:   var(--fs-20);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color:       var(--fg-1);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: var(--num-features);
}

.mono, code, pre, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: var(--num-features);
}

/* ----- Marketing-density type overrides ----- */
[data-density="marketing"] .h1,
[data-density="marketing"] h1.cph {
  font-size: var(--fs-40);
  letter-spacing: var(--tracking-tight);
  text-transform: none;
  color: var(--fg-1);
}
[data-density="marketing"] .h2,
[data-density="marketing"] h2.cph { font-size: var(--fs-28); }
[data-density="marketing"] .display {
  font-family: var(--font-display);
  font-size: var(--fs-56);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}

/* ========================================================================
   FOCUS RING — accessibility, never red
   ======================================================================== */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}


/* ===== components/button.css ===== */
/* ========================================================================
   CAPHENIA — Buttons
   ======================================================================== */
.btn {
  --btn-pad-y: 8px;
  --btn-pad-x: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-11);
  line-height: 1;
  letter-spacing: 0.02em;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  transition: background var(--motion-base) var(--easing-standard),
              border-color var(--motion-base) var(--easing-standard),
              color var(--motion-base) var(--easing-standard);
  user-select: none;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}
.btn--primary:hover:not(:disabled) { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn--primary:active:not(:disabled) { background: var(--color-primary-pressed); border-color: var(--color-primary-pressed); }

.btn--secondary {
  background: var(--neutral-000);
  color: var(--fg-1);
  border-color: var(--border-strong);
}
.btn--secondary:hover:not(:disabled) { background: var(--neutral-100); }

.btn--ghost {
  background: transparent;
  color: var(--fg-1);
  border-color: transparent;
}
.btn--ghost:hover:not(:disabled) { background: var(--neutral-100); }

.btn--inverse {
  background: var(--neutral-000);
  color: var(--neutral-900);
  border-color: var(--neutral-000);
}

.btn--sm { --btn-pad-y: 6px; --btn-pad-x: 10px; font-size: var(--fs-10); }
.btn--lg { --btn-pad-y: 12px; --btn-pad-x: 20px; font-size: var(--fs-12); }


/* ===== components/card.css ===== */
/* ========================================================================
   CAPHENIA — Card / Surface
   ======================================================================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-sm);
  padding: var(--density-card-pad, 20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card--sunken    { background: var(--color-surface-sunken); }
.card--inverse   { background: var(--color-bg-inverse); color: var(--fg-on-inverse); border-color: transparent; }
.card--no-border { border-color: transparent; }
.card--strong    { border-color: var(--border-strong); }

.card-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-title  {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-12);
  color: var(--fg-1);
  margin: 0;
}
.card-meta {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-9);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-2);
}


/* ===== components/kpi.css ===== */
/* ========================================================================
   CAPHENIA — KPI tile
   ======================================================================== */
.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--density-card-pad, 20px);
  background: var(--color-surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-sm);
}
.kpi-label {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-9);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-2);
}
.kpi-value {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-20);
  line-height: var(--lh-tight);
  color: var(--fg-1);
  font-variant-numeric: tabular-nums lining-nums;
}
.kpi-delta {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  color: var(--fg-2);
  font-variant-numeric: tabular-nums lining-nums;
}
.kpi-delta--up   { color: var(--fg-1); }
.kpi-delta--down { color: var(--color-primary); }


/* ===== components/table.css ===== */
/* ========================================================================
   CAPHENIA — Tables
   "No-Line" rule: structure via zebra surface shifts, never with vertical
   rules. One subtle bottom hairline per row, max.
   ======================================================================== */
.cph-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-body);
  font-size: var(--fs-11);
  color: var(--fg-1);
  font-variant-numeric: tabular-nums lining-nums;
}
.cph-table thead th {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-9);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-2);
  text-align: left;
  padding: var(--density-cell-y, 12px) var(--density-cell-x, 16px);
  border-bottom: 1px solid var(--border-strong);
  background: var(--color-surface);
}
.cph-table tbody td {
  padding: var(--density-cell-y, 12px) var(--density-cell-x, 16px);
  border-bottom: 1px solid var(--border-ghost);
  vertical-align: top;
}
.cph-table tbody tr:nth-child(even) td { background: var(--neutral-050); }
.cph-table tbody tr:hover td           { background: var(--red-050); }
.cph-table .num,
.cph-table td.num,
.cph-table th.num {
  font-family: var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
}
.cph-table tr.is-selected td { background: var(--red-100) !important; }


/* ===== components/chip.css ===== */
/* ========================================================================
   CAPHENIA — Chips / Pills / Status badges
   ======================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-9);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--neutral-100);
  color: var(--fg-1);
  border: 1px solid transparent;
  line-height: 1;
}
.chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.chip--active   { background: var(--red-100); color: var(--red-600); }
.chip--stable   { background: var(--neutral-100); color: var(--fg-1); }
.chip--warning  { background: #FFF6E0; color: var(--status-warning); }
.chip--error    { background: var(--red-100); color: var(--red-600); }
.chip--stale    { background: var(--neutral-100); color: var(--fg-3); }
.chip--inverse  { background: var(--neutral-800); color: var(--neutral-000); }
.chip--ghost    { background: transparent; border-color: var(--border-strong); color: var(--fg-2); }
.chip--no-dot::before { display: none; }


/* ===== components/input.css ===== */
/* ========================================================================
   CAPHENIA — Form inputs
   ======================================================================== */
.input,
.textarea,
.select {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-11);
  color: var(--fg-1);
  background: var(--color-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  line-height: 1.4;
  transition: border-color var(--motion-base) var(--easing-standard);
}
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--neutral-400); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--border-focus); }
.input[aria-invalid="true"] { border-color: var(--border-error); }
.input:disabled { background: var(--neutral-100); color: var(--fg-3); cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-9);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-2);
}
.field-help { font-size: var(--fs-10); color: var(--fg-2); }
.field-error { font-size: var(--fs-10); color: var(--color-primary); }


/* ===== components/brand-patterns.css ===== */
/* ========================================================================
   CAPHENIA Design Kit — Brand Patterns
   ------------------------------------------------------------------------
   The two distinctive marketing patterns observed in print/email collateral:

   1. .cph-redblock     — full-bleed CAPHENIA red panel; oversized white H1
                          set in Barlow Bold. Used for hero stoppers, section
                          dividers ("BOTTLENECK", "THE END GAME"), email banners.
   2. .cph-redblock--cut — the email-banner / roll-up variant: the red block
                          is "cut" by a soft S-curve revealing white-on-white
                          architectural CAD imagery on the left third.

   Use sparingly. One brand-block per page is the rule.
   Never inside product surfaces (Altitude stays monochrome).
   ======================================================================== */

.cph-redblock {
  background: var(--color-primary);
  color: var(--neutral-000);
  padding: clamp(24px, 6vw, 96px) clamp(24px, 6vw, 96px);
  position: relative;
  overflow: hidden;
}
.cph-redblock h1, .cph-redblock .cph-redblock-h {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(28pt, 6vw, 56pt);
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--neutral-000);
  margin: 0;
  text-wrap: balance;
}
.cph-redblock p, .cph-redblock .cph-redblock-sub {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  font-size: clamp(13pt, 1.6vw, 18pt);
  line-height: 1.4;
  color: var(--neutral-000);
  opacity: 0.92;
  margin: 16px 0 0;
  max-width: 60ch;
}

.cph-redblock--cut {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  align-items: stretch;
  padding: 0;
  min-height: 200px;
}
.cph-redblock--cut > .cph-redblock-img {
  background: var(--neutral-000);
  clip-path: polygon(0 0, 100% 0, 78% 50%, 100% 100%, 0 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 32px;
}
.cph-redblock--cut > .cph-redblock-img img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  filter: grayscale(100%) brightness(1.02) contrast(0.98);
}
.cph-redblock--cut > .cph-redblock-body {
  padding: clamp(20px, 4vw, 48px) clamp(24px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: center;
}

/* Page anchor — uppercase H1 stoppers between teaser sections. */
.cph-anchor {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(28pt, 4.5vw, 48pt);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--fg-1);
  margin: 0;
  text-wrap: balance;
}
.cph-anchor--brand   { color: var(--color-primary); }
.cph-anchor--inverse { color: var(--neutral-000); }

/* Eyebrow numeral — "01", "02", "03" */
.cph-step-num {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-13);
  color: var(--color-primary);
  letter-spacing: 0.10em;
  display: inline-block;
}

/* Big-number callout */
.cph-bignum {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(48pt, 7vw, 96pt);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums lining-nums;
}
.cph-bignum--neutral { color: var(--fg-1); }
.cph-bignum-sub {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--fg-2);
  margin-top: 12px;
}


/* ===== components/motion.css ===== */
/* ========================================================================
   CAPHENIA — Motion utilities
   Restrained, deterministic motion only. Reveal-on-scroll + staggered
   cascade, driven by one global IntersectionObserver (RevealOnScroll.tsx).
   Honours prefers-reduced-motion.
   ======================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms var(--easing-standard),
              transform 500ms var(--easing-standard);
}
.reveal.is-in { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms var(--easing-standard),
              transform 400ms var(--easing-standard);
}
.reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.is-in > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.is-in > *:nth-child(8) { transition-delay: 420ms; }

@keyframes cph-pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.cph-pulse { animation: cph-pulse-dot 2.4s infinite var(--easing-standard); }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .cph-pulse { animation: none !important; }
}


/* ===== components/provenance.css ===== */
/* ========================================================================
   CAPHENIA — Provenance marker (D-009 trust differentiator)
   Five tiers: verified · targeted · modeled · regulatory · 3p. Chip, not
   punctuation — sits next to a value, never inside body prose.
   ======================================================================== */
.prov {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.prov::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.prov--verified   { background: var(--neutral-100); color: var(--neutral-800); }
.prov--targeted   { background: var(--red-050);     color: var(--red-500); }
.prov--modeled    { background: var(--neutral-100); color: var(--neutral-600); }
.prov--modeled::before   { background: transparent; border: 1px solid currentColor; width: 6px; height: 6px; }
.prov--regulatory { background: var(--neutral-100); color: var(--neutral-800); border-color: var(--border-strong); }
.prov--3p         { background: transparent; color: var(--fg-2); border: 1px dashed var(--border-max); }
.prov--3p::before { background: transparent; border: 1px solid currentColor; width: 6px; height: 6px; }


/* ===== components/audit-ribbon.css ===== */
/* ========================================================================
   CAPHENIA — Audit Ribbon (reproducibility contract, always visible)
   (git_sha, assumptions_hash, scenario_hash) → byte-identical result.
   Pulsing dot = fresh compute (< 200 ms this request).
   ======================================================================== */
.ribbon {
  display: inline-flex;
  align-items: stretch;
  background: var(--color-surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10.5px;
  overflow: hidden;
}
.ribbon__seg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px;
  border-right: 1px solid var(--border-ghost);
}
.ribbon__seg:last-child { border-right: 0; }
.ribbon__seg .k {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-3);
}
.ribbon__seg .v { color: var(--fg-1); }
.ribbon__seg .v.dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red-500);
  margin-right: 6px;
  vertical-align: 1px;
  animation: cph-pulse-dot 2.4s infinite var(--easing-standard);
}
@media (prefers-reduced-motion: reduce) {
  .ribbon__seg .v.dot::before { animation: none; }
}


/* ===== components/capital-stack.css ===== */
/* ========================================================================
   CAPHENIA — Capital Stack visualizer + non-dilutive gauge
   Brand-red bars = dilutive (venture / CVC); near-black = non-dilutive.
   ======================================================================== */
.stack-viz { display: flex; flex-direction: column; gap: 4px; }
.stack-viz__layer {
  display: grid;
  grid-template-columns: 180px 1fr 90px 90px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-xs);
  transition: transform var(--motion-quick) var(--easing-standard),
              border-color var(--motion-quick) var(--easing-standard);
}
.stack-viz__layer:hover { transform: translateX(2px); border-color: var(--neutral-800); }
.stack-viz__name { font-size: var(--fs-11); font-weight: var(--fw-semibold); }
.stack-viz__bar {
  height: 8px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}
.stack-viz__bar i { position: absolute; inset: 0 auto 0 0; background: var(--neutral-800); border-radius: var(--radius-pill); }
.stack-viz__layer--brand .stack-viz__bar i { background: var(--red-500); }
.stack-viz__pct { font-family: var(--font-mono); font-size: var(--fs-11); text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.stack-viz__tag { text-align: right; }
.stack-viz__legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--fs-10); color: var(--fg-2); margin-top: 12px; }
.stack-viz__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.stack-viz__legend .swatch-brand { background: var(--red-500); }
.stack-viz__legend .swatch-ink   { background: var(--neutral-800); }
.gauge { width: 160px; height: 80px; position: relative; }
.gauge svg { width: 100%; height: auto; }
.gauge__v {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-20);
  color: var(--red-500);
  font-variant-numeric: tabular-nums lining-nums;
}


/* ===== components/wedge.css ===== */
/* ========================================================================
   CAPHENIA — Wedge card ("us vs reference" cost-down beat)
   Bar fills on first reveal-on-scroll intersection (.is-in).
   ======================================================================== */
.wedge {
  background: var(--color-surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
}
.wedge__side h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--fs-10);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-2);
}
.wedge__num {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-28);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums lining-nums;
}
.wedge__sub { margin-top: 6px; font-size: var(--fs-10); color: var(--fg-2); }
.wedge--us  .wedge__num { color: var(--red-500); }
.wedge--ref .wedge__num {
  color: var(--fg-3);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--border-strong);
}
.wedge__bar-row { grid-column: 1 / -1; margin-top: 8px; }
.wedge__bar {
  height: 24px; position: relative;
  background: repeating-linear-gradient(90deg, var(--border-ghost) 0 1px, transparent 1px 10%);
}
.wedge__bar-us { position: absolute; inset: 0 auto 0 0; background: var(--red-500); width: 0; transition: width 1000ms var(--easing-standard); }
.wedge.is-in .wedge__bar-us { width: var(--wedge-fill, 37%); }
.wedge__bar-ref-mark { position: absolute; left: 100%; top: -4px; bottom: -4px; border-left: 1px solid var(--fg-3); transform: translateX(-1px); }
.wedge__bar-axis { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--font-mono); font-size: var(--fs-10); color: var(--fg-3); }
@media (prefers-reduced-motion: reduce) {
  .wedge__bar-us { transition: none; width: var(--wedge-fill, 37%); }
}


/* ===== components/risk-card.css ===== */
/* ========================================================================
   CAPHENIA — Risk card (defence beat + backup frame + tier)
   ======================================================================== */
.risk-card {
  background: var(--color-surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 16px;
  align-items: start;
}
.risk-card__n { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--fg-3); padding-top: 3px; }
.risk-card__title { font-size: var(--fs-12); font-weight: var(--fw-semibold); }
.risk-card__defense { margin-top: 8px; font-size: var(--fs-11); color: var(--fg-2); line-height: var(--lh-normal); }
.risk-card__defense strong { color: var(--fg-1); font-weight: var(--fw-semibold); }


/* ===== components/pbr.css ===== */
/* ========================================================================
   CAPHENIA — 3-in-1 PBR pictogram (CSS-only, three reactions in one vessel)
   ======================================================================== */
.pbr {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--color-surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pbr__step { padding: 22px 20px; border-right: 1px solid var(--border-ghost); position: relative; }
.pbr__step:last-child { border-right: 0; }
.pbr__n { font-family: var(--font-mono); font-size: var(--fs-10); font-weight: var(--fw-semibold); color: var(--fg-3); letter-spacing: 0.1em; }
.pbr__name { margin-top: 4px; font-family: var(--font-display); font-size: var(--fs-12); font-weight: var(--fw-semibold); color: var(--fg-1); }
.pbr__formula { margin-top: 14px; font-family: var(--font-mono); font-size: var(--fs-13); color: var(--red-500); letter-spacing: 0.02em; }
.pbr__role { margin-top: 4px; font-size: var(--fs-10); color: var(--fg-2); }
.pbr__arrow { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 20px; height: 1px; background: var(--border-strong); }
.pbr__arrow::after { content: ""; position: absolute; right: 0; top: -3px; border-left: 5px solid var(--border-strong); border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
@media (max-width: 720px) {
  .pbr { grid-template-columns: 1fr; }
  .pbr__step { border-right: 0; border-bottom: 1px solid var(--border-ghost); }
  .pbr__step:last-child { border-bottom: 0; }
  .pbr__arrow { display: none; }
}


/* ===== components/data-page.css ===== */
/* ========================================================================
   CAPHENIA — Data-page structure primitives
   page-hero · section header · compact KPI · calc-pending marker · block
   placeholder · timeline · partner-rail · ramp axis · waffle · entry card.
   ======================================================================== */
.ph { background: var(--color-surface); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); padding: 18px 20px; }
.ph__crumb { font-size: var(--fs-11); color: var(--fg-3); }
.ph__h1 { font-family: var(--font-display); font-size: var(--fs-13); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--color-primary); margin: 4px 0 0; }
.ph__lede { margin-top: 6px; color: var(--fg-2); font-size: var(--fs-12); max-width: 60ch; line-height: var(--lh-normal); }

.mh { font-family: var(--font-display); font-size: var(--fs-10); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-widest); text-transform: uppercase; color: var(--fg-2); margin: 18px 0 10px; }
.mh--red { color: var(--color-primary); }

.mkpi { background: var(--color-surface); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 88px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.mkpi__l { font-family: var(--font-display); font-size: var(--fs-9); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--fg-2); }
.mkpi__v { font-family: var(--font-display); font-weight: var(--fw-medium); font-size: var(--fs-20); line-height: 1; font-variant-numeric: tabular-nums lining-nums; color: var(--fg-1); letter-spacing: -0.005em; }
.mkpi__v--brand { color: var(--red-500); }
.mkpi__u { font-size: var(--fs-11); color: var(--fg-2); margin-left: 2px; }
.mkpi__sub { font-size: var(--fs-10); color: var(--fg-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Calc-pending marker — investor numbers resolve from engine/Supabase at
   render time (CLAUDE.md Hard Rule). Until a value lands, render this in the
   slot. Visible, greppable promise that "a number computes here". Pair with
   <Provenance/>. */
.calc-pending { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-weight: var(--fw-medium); color: var(--fg-3); font-variant-numeric: tabular-nums lining-nums; }
.calc-pending::before { content: "—"; color: var(--fg-3); }
.calc-pending__src { font-family: var(--font-mono); font-size: var(--fs-9); letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-3); border: 1px dashed var(--border-max); border-radius: var(--radius-xs); padding: 1px 5px; }

.placeholder { border: 1px dashed var(--border-max); border-radius: var(--radius-sm); background: var(--color-bg-subtle); color: var(--fg-2); font-size: var(--fs-11); line-height: var(--lh-normal); padding: 18px 20px; }

.timeline { display: flex; gap: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6%; right: 6%; top: 8px; height: 1px; background: var(--border-strong); }
.timeline__node { flex: 1; text-align: center; position: relative; padding-top: 18px; }
.timeline__node::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 9px; height: 9px; background: var(--color-surface); border: 1px solid var(--neutral-800); border-radius: 50%; }
.timeline__node--brand::before { background: var(--red-500); border-color: var(--red-500); }
.timeline__node--ghost::before { background: var(--color-surface); border-color: var(--border-strong); }
.timeline__y { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--fg-1); }
.timeline__l { font-size: var(--fs-10); color: var(--fg-2); margin-top: 2px; line-height: 1.3; }

.partner-rail { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); background: var(--color-surface); overflow: hidden; }
.partner-rail__cell { padding: 14px 16px; border-right: 1px solid var(--border-ghost); display: flex; flex-direction: column; gap: 6px; }
.partner-rail__cell:last-child { border-right: 0; }
.partner-rail__name { font-weight: var(--fw-semibold); font-size: var(--fs-12); }
.partner-rail__role { font-family: var(--font-display); font-size: var(--fs-10); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--fg-2); }
@media (max-width: 720px) { .partner-rail { grid-template-columns: 1fr; } }

.ramp { background: var(--color-surface); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); padding: 14px; }
.ramp svg { width: 100%; height: auto; display: block; }
.ramp__axis, .chart-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--fs-10); color: var(--fg-3); margin-top: 4px; }

.waffle { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; }
.waffle i { aspect-ratio: 1 / 1; background: var(--color-bg-muted); display: block; }
.waffle i.f-1 { background: var(--red-500); }
.waffle i.f-2 { background: var(--neutral-800); }
.waffle i.f-3 { background: var(--neutral-500); }
.waffle i.f-4 { background: var(--neutral-300); }
.waffle-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--fs-10); color: var(--fg-2); margin-top: 12px; }
.waffle-legend span i { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin-right: 4px; border-radius: 2px; }

.entry { display: block; background: var(--color-surface); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); padding: 14px 16px; transition: border-color var(--motion-quick) var(--easing-standard), transform var(--motion-quick) var(--easing-standard); }
.entry:hover { border-color: var(--red-500); transform: translateX(2px); }
.entry__stage { font-family: var(--font-mono); font-size: var(--fs-10); color: var(--fg-3); letter-spacing: 0.1em; }
.entry__h { margin-top: 4px; font-size: var(--fs-12); font-weight: var(--fw-semibold); }
.entry__sub { margin-top: 6px; font-size: var(--fs-10); color: var(--fg-2); line-height: 1.5; }


/* ===== components/operator-console.css ===== */
/* ========================================================================
   CAPHENIA — Operator console (admin-only). Monochrome: severity is
   neutral → amber (--status-warning) → red, never green.
   ======================================================================== */
.opconsole { display: grid; grid-template-columns: 1.2fr 1.2fr 1.4fr 1fr; background: var(--neutral-900); color: var(--neutral-200); border-radius: var(--radius-sm); overflow: hidden; font-family: var(--font-mono); font-size: 11.5px; }
@media (max-width: 900px) { .opconsole { grid-template-columns: 1fr 1fr; } }
.opconsole__cell { padding: 14px 18px; border-right: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 6px; }
.opconsole__cell:last-child { border-right: 0; }
.opconsole__k { font-family: var(--font-display); font-size: 9px; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.opconsole__v { font-family: var(--font-mono); font-size: 14px; font-weight: var(--fw-medium); color: var(--neutral-000); }
.opconsole__v.is-ok { color: var(--neutral-000); }
.opconsole__v.is-drift { color: var(--status-warning); }
.opconsole__sub { font-size: 10.5px; color: rgba(255, 255, 255, 0.5); }
.opconsole__pings { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.opconsole__ping { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.opconsole__ping i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.opconsole__ping.is-ok i { background: var(--neutral-300); }
.opconsole__ping.is-warn i { background: var(--status-warning); }
.opconsole__ping.is-err i { background: var(--red-500); animation: cph-pulse-dot 1.6s infinite var(--easing-standard); }
.pulse-live { display: inline-flex; align-items: center; gap: 6px; }
.pulse-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--red-500); animation: cph-pulse-dot 2s infinite var(--easing-standard); }
@media (prefers-reduced-motion: reduce) { .opconsole__ping.is-err i, .pulse-live i { animation: none; } }
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, 1fr); } }
.board__pane { background: var(--color-surface); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; min-height: 110px; transition: border-color var(--motion-quick) var(--easing-standard), transform var(--motion-quick) var(--easing-standard); }
.board__pane:hover { border-color: var(--neutral-800); transform: translateY(-1px); }
.board__pane--block { border-left: 3px solid var(--red-500); }
.board__pane--drift { border-left: 3px solid var(--neutral-400); }
.board__pane--ok { border-left: 3px solid var(--neutral-800); }
.board__sec { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.04em; }
.board__title { font-size: 12.5px; font-weight: var(--fw-semibold); line-height: 1.35; margin-top: 2px; }
.board__val { margin-top: auto; font-family: var(--font-display); font-weight: var(--fw-medium); font-size: var(--fs-20); line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums lining-nums; }
.board__val--brand { color: var(--red-500); }
.board__meta { font-size: 10px; color: var(--fg-3); font-family: var(--font-mono); }
.board__chip { position: absolute; top: 12px; right: 12px; }
.sync-banner { background: var(--color-surface); border: 1px solid var(--border-ghost); border-left: 3px solid var(--neutral-800); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; align-items: center; gap: 12px; font-size: 11.5px; }
.sync-banner--warn { border-left-color: var(--red-500); }
.sync-banner__k { font-family: var(--font-display); font-size: 9.5px; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--fg-2); }
.sync-banner__v { font-family: var(--font-mono); color: var(--fg-1); }
.sync-banner__sub { margin-left: auto; color: var(--fg-2); font-size: 11px; }
.mermaid-frame { background: var(--color-surface); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); overflow: hidden; }
.mermaid-frame__toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--color-bg-subtle); border-bottom: 1px solid var(--border-ghost); font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-2); }
.mermaid-frame__toolbar .ico-btn { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--radius-xs); color: var(--fg-2); cursor: pointer; }
.mermaid-frame__toolbar .ico-btn:hover { border-color: var(--border-strong); color: var(--fg-1); }
.mermaid-frame__body { padding: 22px; min-height: 160px; background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(0,0,0,0.012) 8px 16px); }
.mermaid-frame__placeholder { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.syscard { background: var(--color-surface); border: 1px solid var(--border-ghost); border-radius: var(--radius-sm); padding: 16px; position: relative; transition: border-color var(--motion-quick) var(--easing-standard), transform var(--motion-quick) var(--easing-standard); }
.syscard:hover { border-color: var(--neutral-800); transform: translateY(-1px); }
.syscard__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.syscard__title { font-size: var(--fs-12); font-weight: var(--fw-semibold); }
.syscard__sub { font-size: 11.5px; color: var(--fg-2); line-height: var(--lh-normal); }


/* ===== components/admin-controls.css ===== */
/* ========================================================================
   CAPHENIA — Admin controls & feeds (admin-only): filter chips, settings
   toggle, live tail, engagement heatmap, changelog groups, user-list row.
   ======================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters__l { font-family: var(--font-display); font-size: 9.5px; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--fg-2); margin-right: 4px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-1); background: var(--color-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-xs); transition: all var(--motion-quick) var(--easing-standard); cursor: pointer; }
.fchip:hover { border-color: var(--neutral-800); }
.fchip.is-on { background: var(--neutral-900); color: var(--neutral-000); border-color: var(--neutral-900); }
.fchip.is-on--brand { background: var(--red-500); color: var(--neutral-000); border-color: var(--red-500); }
.setting-row { display: grid; grid-template-columns: 1.4fr auto; gap: 24px; padding: 18px 0; align-items: start; border-top: 1px solid var(--border-ghost); }
.setting-row:first-child { border-top: 0; }
.setting-row__name { font-size: 14px; font-weight: var(--fw-semibold); }
.setting-row__body { margin-top: 6px; font-size: 12.5px; color: var(--fg-2); line-height: var(--lh-normal); max-width: 56ch; }
.setting-row__audit { margin-top: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); display: flex; gap: 8px; flex-wrap: wrap; }
.setting-row__audit code { background: var(--color-bg-muted); padding: 1px 5px; border-radius: var(--radius-xs); font-size: 10px; }
.toggle { width: 44px; height: 24px; border-radius: var(--radius-pill); background: var(--neutral-200); position: relative; transition: background var(--motion-quick) var(--easing-standard); flex-shrink: 0; cursor: pointer; border: 0; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--neutral-000); transition: transform var(--motion-quick) var(--easing-standard); }
.toggle.is-on { background: var(--red-500); }
.toggle.is-on::after { transform: translateX(20px); }
.tail-row { display: grid; grid-template-columns: 110px 1fr 88px 70px; gap: 12px; align-items: center; padding: 8px 12px; font-size: 11.5px; border-bottom: 1px solid var(--border-ghost); background: var(--color-surface); }
.tail-row.is-new { animation: tail-glow 1.4s var(--easing-standard) forwards; }
@keyframes tail-glow { 0% { background: rgba(201, 37, 43, 0.10); } 100% { background: var(--color-surface); } }
.tail-row .ts { font-family: var(--font-mono); color: var(--fg-2); font-size: 10.5px; }
.tail-row .who { color: var(--fg-1); font-family: var(--font-mono); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tail-row .act .chip { height: 18px; padding: 0 7px; font-size: 9px; }
.tail-row .target { font-family: var(--font-mono); color: var(--fg-2); font-size: 10.5px; text-align: right; }
@media (prefers-reduced-motion: reduce) { .tail-row.is-new { animation: none; } }
.heatmap { display: grid; grid-template-columns: 48px repeat(24, 1fr); gap: 2px; align-items: center; }
.heatmap__hr { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); text-align: center; }
.heatmap__day { font-family: var(--font-mono); font-size: 10px; color: var(--fg-2); padding-right: 8px; text-align: right; }
.heatmap__cell { aspect-ratio: 1 / 1; background: var(--color-bg-muted); border-radius: 1px; }
.heatmap__cell.l1 { background: rgba(201, 37, 43, 0.18); }
.heatmap__cell.l2 { background: rgba(201, 37, 43, 0.35); }
.heatmap__cell.l3 { background: rgba(201, 37, 43, 0.60); }
.heatmap__cell.l4 { background: var(--red-500); }
.cl-week { margin-top: 24px; }
.cl-week__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cl-week__y { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-2); letter-spacing: 0.08em; }
.cl-week__h { font-family: var(--font-display); font-size: 13px; font-weight: var(--fw-semibold); }
.cl-week__rule { flex: 1; height: 1px; background: var(--border-ghost); }
.cl-entry { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border-ghost); }
.cl-entry__date { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-2); padding-top: 2px; }
.cl-entry__sha { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-top: 2px; }
.cl-entry__title { font-size: 13.5px; font-weight: var(--fw-semibold); }
.cl-entry__body { font-size: 12.5px; color: var(--fg-2); margin-top: 4px; line-height: var(--lh-normal); }
.cl-entry__tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.urow { display: grid; grid-template-columns: 1.4fr 1fr 110px 130px 80px; gap: 12px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--border-ghost); background: var(--color-surface); font-size: 12px; }
.urow:hover { background: var(--color-bg-subtle); }
.urow__email { font-family: var(--font-mono); font-size: 11px; color: var(--fg-1); }
.urow__name { font-size: 11px; color: var(--fg-2); margin-top: 2px; }
.urow__role { font-family: var(--font-display); font-size: 10px; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wider); text-transform: uppercase; }
.urow__seen { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-2); }

