/*
 * ═══════════════════════════════════════════════════════════════════════
 *  darx_style_master.css
 *  Site-wide stylesheet — DARALL Ecosystem + Consumer Landing
 *  DAB-VIS-CSS-001  ·  v3.1  ·  May 2026
 *
 *  Linked by EVERY HTML page on the site:
 *      <link rel="stylesheet" href="/css/darx_style_master.css">
 *
 *  Page-specific styles (linked AFTER this file, override these defaults):
 *      Consumer landing  →  /css/homepage_features.css
 *      Other pages       →  their own /css/{pagename}.css
 * ═══════════════════════════════════════════════════════════════════════
 *
 *  HOW TO CUSTOMIZE — read this first
 *  ───────────────────────────────────
 *  Almost everything visual is controlled by CSS variables in SECTION 1.
 *  Want to tweak the site?  Open SECTION 1, find the variable, change one
 *  value, save.  No need to touch the rule blocks below.
 *
 *  Common tweaks:
 *    • Change brand background        →  --olive-1, --olive-2
 *    • Resize the fixed header/footer →  --stripe-h, --banner-h, --topbar-h
 *    • Change the sidebar width       →  --sidebar-w
 *    • Change body text size          →  body { font-size: ... }
 *    • Change consumer landing colors →  --lp-gold, --lp-dark, --lp-bg
 *
 *  PER-PAGE ENTITY ACCENT (gold / blue / terracotta)
 *  ──────────────────────────────────────────────────
 *  Each template should set its own --accent in a small <style> block
 *  in the page <head>, AFTER linking this file:
 *
 *      :root {
 *        --accent:     #B8832A;   (entity color)
 *        --accent-mid: #D4A95C;   (lighter tint for borders/hover)
 *        --accent-bg:  #FAF1DD;   (very light tint for backgrounds)
 *      }
 *
 *  Reference values:
 *      DARH (Holdings)  →  #1A4D6D / #4A7C9E / #E8EEF3   (deep blue)
 *      DARX (Brands)    →  #B8832A / #D4A95C / #FAF1DD   (atlas gold)
 *      DARM (Maroc)     →  #C4856A / #DCA591 / #F7E8E0   (terracotta)
 *      DAB  (Parent)    →  #B8832A / #D4A95C / #FAF1DD   (same as DARX)
 *
 *  BODY CHROME CLASS
 *  ─────────────────
 *  Pages with the fixed header + footer need  class="has-chrome"  on <body>.
 *  Consumer landing (no fixed chrome) omits this class.
 *
 *  SECTIONS
 *      1.  Design tokens          ← edit here for global changes
 *      2.  Reset
 *      3.  Base body
 *      4.  Chrome (fixed header/footer)
 *      5.  Register A — Sidebar layout (internal pages)
 *      6.  Register B — Document layout (partner pages)
 *      7.  Register C — Editorial layout (customer/investor)
 *      8.  DARALL ecosystem (master entity hub)
 *      9.  Parsed-document viewer (BPGP)
 *     10.  Print
 * ═══════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS  ← MAIN CUSTOMIZATION PANEL
   ═══════════════════════════════════════════════════════════════════════ */

/* Fonts loaded once for all pages */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Montserrat:wght@300;400;500&family=DM+Mono:wght@300;400;500&family=Inter:wght@300;400;500;600&family=Noto+Sans+Tifinagh&display=swap');

:root {
  /* ─── FOUNDATION COLORS ────────────────────────────────────────────
     The neutral backbone. Changing these affects every page. */
  --ivory:        #F6F1E7;            /* main page background     */
  --ink:          #1C1C1E;            /* primary text             */
  --ink-muted:    #4A4A4C;            /* secondary text           */
  --ink-faint:    #8A8A8E;            /* labels, captions, hints  */
  --rule:         rgba(28,28,30,0.10); /* faint dividing lines    */

  /* ─── STATUS COLORS ────────────────────────────────────────────────
     Used for KPI states, error blocks, etc. */
  --ok:           #2E7D32;   /* green — success / on-target       */
  --warn:         #B8832A;   /* gold  — attention (same as DARX)  */
  --alert:        #C0392B;   /* red   — error / off-target        */

  /* ─── DARALL CHROME COLORS ─────────────────────────────────────────
     Fixed header/footer brand-band and topbar/footer-bar.
     Change these to repaint the chrome across ALL system pages. */
  --olive:        #6B7F4A;   /* light olive — accents             */
  --olive-1:      #485532;   /* brand-banner background           */
  --olive-2:      #303922;   /* topbar / footer-bar background    */

  /* ─── ENTITY ACCENT (set per-page in template's local <style>) ─────
     These are FALLBACK defaults; each template overrides them.
     See "PER-PAGE ENTITY ACCENT" in the file header. */
  --accent:       #534E46;   /* neutral fallback                  */
  --accent-mid:   #DBC99A;   /* lighter tint                      */
  --accent-bg:   #F4ECD8;    /* very light background tint        */

  /* ─── BRAND PALETTE ALIASES ────────────────────────────────────────
     Named shortcuts for the four entity colors, useful in custom CSS
     when you want a specific entity color regardless of --accent. */
  --gold:         #B8832A;   /* DARX accent                       */
  --ocean:        #4A7C9E;   /* DARH mid-tint                     */
  --terracotta:   #C4856A;   /* DARM accent                       */
  --charcoal:     #2C3539;   /* dark neutral (chart backgrounds)  */

  /* ─── CONSUMER LANDING PALETTE ─────────────────────────────────────
     Used by homepage_features.css and other consumer pages. */
  --lp-gold:      #d4b26a;   /* landing-page accent (warm gold)   */
  --lp-dark:      #1c1b19;   /* landing-page dark background      */
  --lp-bg:        #f6f2ea;   /* landing-page card background      */

  /* ─── TYPOGRAPHY ───────────────────────────────────────────────────
     Change the font for an entire category at once. */
  --f-display:    'Cormorant Garamond', Georgia, serif;   /* headlines, hero titles */
  --f-body:       'Montserrat', sans-serif;               /* internal-page body     */
  --f-mono:       'DM Mono', monospace;                   /* labels, codes, IDs     */
  --f-landing:    'Inter', sans-serif;                    /* consumer-page body     */

  /* ─── SPACING ──────────────────────────────────────────────────────
     Base padding/margin units used throughout. */
  --space:        20px;      /* standard internal padding         */
  --space-b:      24px;      /* larger block padding              */
  --sidebar-w:    200px;     /* sidebar width (Register A)        */
  --col-w:        720px;     /* main content column max width     */

  /* ─── CHROME HEIGHTS ───────────────────────────────────────────────
     Resize the fixed header/footer by editing these four values.
     --header-h and --footer-h auto-calculate from them. */
  --stripe-h:     16px;      /* top accent stripe                 */
  --sep-h:         8px;      /* black separator lines             */
  --banner-h:     50px;      /* main brand-banner band            */
  --topbar-h:     40px;      /* topbar (entity + ref)             */

  --header-h: calc(var(--stripe-h) + var(--sep-h) + var(--banner-h) + var(--sep-h) + var(--topbar-h));
  --footer-h: calc(var(--topbar-h) + var(--sep-h) + var(--banner-h) + var(--sep-h) + var(--stripe-h));
}


/* ═══════════════════════════════════════════════════════════════════════
   2. RESET
   ═══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

/* Anchor offset — when clicking an in-page link, leave room for the fixed
   header so the target section isn't hidden under it. */
.main [id],
.page-wrap [id],
.editorial [id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}


/* ═══════════════════════════════════════════════════════════════════════
   3. BASE BODY
   ═══════════════════════════════════════════════════════════════════════ */
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 12px;          /* base size — readable but compact      */
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Chrome padding: applied ONLY when the page has the fixed header + footer.
   Add class="has-chrome" to <body> on every system page. Omit on consumer
   pages where the chrome is part of the design (landing, hero, etc.). */
body.has-chrome {
  padding-top:    var(--header-h);
  padding-bottom: var(--footer-h);
}

/* Consumer pages (no fixed chrome) use Inter as the primary font.
   System pages keep Montserrat from --f-body above. */
body:not(.has-chrome) {
  font-family: var(--f-landing);
}


/* ═══════════════════════════════════════════════════════════════════════
   4. CHROME — fixed header & footer
   ─────────────────────────────────────────────────────────────────────
   Used by all system pages with class="has-chrome" on <body>.
   Structure expected in HTML:
       <header class="fixed-header">
         <div class="tricolor-stripe">…</div>
         <div class="black-sep"></div>
         <div class="brand-banner">…</div>
         <div class="black-sep"></div>
         <div class="topbar">…</div>
       </header>
   ═══════════════════════════════════════════════════════════════════════ */

.fixed-header { position: fixed; top: 0; left: 0; right: 0; z-index: 200; }
.fixed-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; }

/* Top accent stripe (solid color) */
.tricolor-stripe { height: var(--stripe-h); background: #1A4D6D; }
.tricolor-stripe .s-darh,
.tricolor-stripe .s-darx,
.tricolor-stripe .s-darm { display: none; }

/* Bottom accent stripe — uses the page's --accent so it matches the entity */
.accent-stripe { height: var(--stripe-h); background: var(--accent); }

/* Thin black separator lines between header bands */
.black-sep { height: var(--sep-h); background: var(--ink); }

/* Brand banner — the big "DARALBEIDA™" band */
.brand-banner {
  background: var(--olive-1);
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--banner-h);
  gap: 20px;
}
.brand-banner a {
  font-family: var(--f-display);
  font-size: 42px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--ivory);
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0.95;
}
.brand-banner sup { font-size: 14px; letter-spacing: 0; vertical-align: super; opacity: 0.7; }
.brand-banner-sub {
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(246,241,231,0.45);
}

/* Topbar — entity code + document reference, sits below the brand banner */
.topbar {
  background: var(--accent);   /* uses page's entity accent */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--topbar-h);
}
.topbar-left  { display: flex; align-items: center; gap: 20px; }
.topbar-entity  { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory); }
.topbar-divider { width: 1px; height: 16px; background: rgba(246,241,231,0.25); }
.topbar-title   { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(246,241,231,0.6); }
.topbar-right   { display: flex; align-items: center; gap: 16px; }
.topbar-ref     { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.10em; color: rgba(246,241,231,0.4); }
.topbar-badge {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 1px;
  background: rgba(246,241,231,0.15); color: var(--ivory); border: 1px solid rgba(246,241,231,0.30);
}

/* Footer bar — uses --accent too, mirrors the topbar */
.footer-bar {
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--topbar-h);
}
.footer-bar-left  { font-family: var(--f-mono); font-size: 9px; color: rgba(246,241,231,0.5); letter-spacing: 0.10em; }
.footer-bar-left span { color: var(--ivory); margin-right: 10px; }
.footer-bar-right { font-family: var(--f-mono); font-size: 9px; color: rgba(246,241,231,0.4); letter-spacing: 0.08em; }

/* DARALL ecosystem chrome override — darker olive instead of entity accent */
.topbar.darall-chrome,
.footer-bar.darall-chrome { background: var(--olive-2); }
.topbar.darall-chrome .topbar-title { color: rgba(252,251,248,0.6); }
.topbar.darall-chrome .topbar-ref   { color: rgba(252,251,248,0.3); }


/* ═══════════════════════════════════════════════════════════════════════
   5. REGISTER A — Sidebar layout (internal pages)
   ─────────────────────────────────────────────────────────────────────
   Used for SOPs, dashboards, viewers, operational reference docs.
   Structure: <div class="layout"><aside class="sidebar"/><main class="main"/></div>
   ═══════════════════════════════════════════════════════════════════════ */

.layout { display: flex; min-height: calc(100vh - var(--header-h) - var(--footer-h)); }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  padding: var(--space) 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h) - var(--footer-h));
  overflow-y: auto;
}
.sidebar-section { padding: 0 0 var(--space); margin-bottom: var(--space); border-bottom: 1px solid var(--rule); }
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }
.sidebar-label {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 var(--space); margin-bottom: 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px var(--space);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink-muted); text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border: none; background: none; width: 100%; text-align: left; cursor: pointer;
}
.sidebar-link:hover { background: var(--accent-bg); color: var(--ink); }
.sidebar-link.active {
  color: var(--accent); background: var(--accent-bg);
  border-left: 2px solid var(--accent);
  padding-left: calc(var(--space) - 2px);
}
.sidebar-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.4; flex-shrink: 0; }

/* ── Main column ── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.page-header {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.page-eyebrow { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.20em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.page-title   { font-family: var(--f-mono); font-size: 18px; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 4px; }
.page-desc    { font-size: 11px; color: var(--ink-muted); }
.page-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Buttons (small monospace style for internal pages) */
.btn {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 1px; border: 1px solid var(--rule);
  background: transparent; color: var(--ink-muted);
  cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.btn:hover         { background: var(--accent-bg); color: var(--ink); border-color: var(--accent-mid); }
.btn-primary       { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: white; }

.content { padding: 24px 32px; flex: 1; }

/* KPI row — four equally-sized metric cells */
.kpi-row  { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 2px; margin-bottom: 24px; overflow: hidden; }
.kpi-cell { padding: 16px var(--space); border-right: 1px solid var(--rule); }
.kpi-cell:last-child { border-right: none; }
.kpi-label { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.kpi-value { font-family: var(--f-mono); font-size: 22px; font-weight: 400; color: var(--ink); line-height: 1; margin-bottom: 4px; }
.kpi-sub   { font-family: var(--f-mono); font-size: 9px; color: var(--ink-faint); }
.kpi-value.ok    { color: var(--ok); }
.kpi-value.warn  { color: var(--warn); }
.kpi-value.alert { color: var(--alert); }

/* Section blocks within main content */
.section-block { margin-bottom: 24px; }
.section-head  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head-title {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); display: flex; align-items: center; gap: 10px;
}
.section-head-title::before { content: ''; display: block; width: 16px; height: 1px; background: var(--accent); }
.section-head-action { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.section-head-action:hover { text-decoration: underline; }

/* Data tables (monospace, compact) */
.data-table    { width: 100%; border-collapse: collapse; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.data-table th { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 400; text-align: left; padding: 10px var(--space); border-bottom: 1px solid var(--rule); background: rgba(28,28,30,0.02); }
.data-table td { font-family: var(--f-mono); font-size: 10px; padding: 10px var(--space); border-bottom: 1px solid var(--rule); color: var(--ink); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td      { background: var(--accent-bg); }


/* ═══════════════════════════════════════════════════════════════════════
   6. REGISTER B — Document layout (partner pages)
   ─────────────────────────────────────────────────────────────────────
   Formal-document style. Used for contracts, technical specs, anything
   you'd print and sign. Structure: <div class="page-wrap">…</div>
   ═══════════════════════════════════════════════════════════════════════ */

.doc-title    { font-family: var(--f-display); font-size: 42px; font-weight: 300; line-height: 1.1; color: var(--ink); margin-bottom: 12px; letter-spacing: -0.01em; }
.doc-subtitle { font-family: var(--f-display); font-size: 20px; font-weight: 300; font-style: italic; color: var(--ink-muted); margin-bottom: 24px; }
.doc-meta       { display: flex; gap: 32px; flex-wrap: wrap; }
.doc-meta-label { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 3px; }
.doc-meta-value { font-family: var(--f-mono); font-size: 10px; color: var(--ink); }

.doc-section  { margin-bottom: 40px; }
.section-title {
  font-family: var(--f-display); font-size: 24px; font-weight: 400;
  color: var(--ink); margin-bottom: 4px;
  display: flex; align-items: baseline; gap: 14px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.section-body         { font-size: 13px; color: var(--ink-muted); line-height: 1.8; margin-top: 16px; }
.section-body p + p   { margin-top: 12px; }

/* Tint block — highlighted callouts */
.tint-block       { background: var(--accent-bg); border-left: 3px solid var(--accent); padding: 20px 24px; margin: 20px 0; border-radius: 0 2px 2px 0; }
.tint-block-label { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.tint-block-body  { font-size: 13px; color: var(--ink); line-height: 1.7; }

/* Field groups (key/value pairs) */
.field-group        { margin-top: 20px; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.field-group-header { padding: 10px 20px; background: var(--accent-bg); border-bottom: 1px solid var(--accent-mid); font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.field-row     { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 20px; border-bottom: 1px solid var(--rule); }
.field-row:last-child { border-bottom: none; }
.field-key     { font-size: 12px; color: var(--ink-muted); }
.field-val     { font-size: 13px; color: var(--ink); font-weight: 400; text-align: right; }

/* Signature block — for printable contracts */
.sig-block { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.sig-line  { height: 1px; background: var(--ink); margin-bottom: 8px; }
.sig-label { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.sig-name  { font-size: 13px; color: var(--ink); margin-top: 2px; }
.sig-role  { font-size: 11px; color: var(--ink-faint); }


/* ═══════════════════════════════════════════════════════════════════════
   7. REGISTER C — Editorial layout (customer / investor)
   ─────────────────────────────────────────────────────────────────────
   Magazine-style, large typography. For brand narrative, investor decks,
   customer-facing long-form. Structure: <main class="editorial">…</main>
   ═══════════════════════════════════════════════════════════════════════ */

.hero-eyebrow { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; }
.hero-title   { font-family: var(--f-display); font-size: 64px; font-weight: 300; font-style: italic; line-height: 1.05; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 32px; }
.hero-body    { font-size: 16px; color: var(--ink-muted); line-height: 1.8; max-width: 560px; font-weight: 300; }
.hero-cta     { margin-top: 40px; display: flex; align-items: center; gap: 24px; }

/* Big CTAs for hero sections */
.cta-btn  { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; padding: 12px 28px; border-radius: 1px; background: var(--accent); color: var(--ivory); text-decoration: none; border: 1px solid var(--accent); transition: all 0.2s; }
.cta-btn:hover  { background: transparent; color: var(--accent); }
.cta-link { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); text-decoration: none; }
.cta-link:hover { color: var(--accent); }

/* Editorial section grid (sticky label + flowing body) */
.editorial         { max-width: 900px; margin: 0 auto; }
.editorial-section { display: grid; grid-template-columns: 200px 1fr; gap: 48px; padding: 64px; border-bottom: 1px solid var(--rule); align-items: start; }
.editorial-section:last-child { border-bottom: none; }
.editorial-label   { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); padding-top: 8px; position: sticky; top: calc(var(--header-h) + 24px); }
.editorial-title   { font-family: var(--f-display); font-size: 36px; font-weight: 300; line-height: 1.1; color: var(--ink); margin-bottom: 20px; }
.editorial-title em { font-style: italic; }
.editorial-text    { font-size: 14px; color: var(--ink-muted); line-height: 1.85; font-weight: 300; }
.editorial-text p + p { margin-top: 16px; }

/* Pull quotes (italic, accented border) */
.pull-quote        { margin: 32px 0; padding: 28px 32px; border-left: 2px solid var(--accent); }
.pull-quote-text   { font-family: var(--f-display); font-size: 24px; font-style: italic; font-weight: 300; line-height: 1.4; color: var(--ink); margin-bottom: 10px; }
.pull-quote-source { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

/* Big numbers (editorial-style stats display) */
.stat-row     { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 32px 0; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.stat-cell    { padding: 24px; border-right: 1px solid var(--rule); }
.stat-cell:last-child { border-right: none; }
.stat-number  { font-family: var(--f-display); font-size: 48px; font-weight: 300; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.stat-label   { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

/* Closing section (end of editorial pages) */
.closing       { padding: 80px 64px; text-align: center; border-top: 1px solid var(--rule); }
.closing-title { font-family: var(--f-display); font-size: 48px; font-style: italic; font-weight: 300; color: var(--ink); margin-bottom: 20px; line-height: 1.1; }
.closing-body  { font-size: 14px; color: var(--ink-muted); max-width: 480px; margin: 0 auto 32px; line-height: 1.8; }
.closing-ref   { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--ink-faint); text-transform: uppercase; }


/* ═══════════════════════════════════════════════════════════════════════
   8. DARALL ECOSYSTEM — master entity hub page
   ─────────────────────────────────────────────────────────────────────
   Used for the page that introduces all three entities (DARH/DARX/DARM).
   Each entity gets its own card with its own color.
   ═══════════════════════════════════════════════════════════════════════ */

.entity-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.entity-card {
  padding: 56px 48px; border-right: 1px solid var(--rule);
  position: relative; overflow: hidden;
  transition: background 0.3s;
  text-decoration: none; color: inherit; display: block;
}
.entity-card:last-child  { border-right: none; }
.entity-card::before     { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.entity-card.darh::before { background: #1A4D6D; }
.entity-card.darx::before { background: #B8832A; }
.entity-card.darm::before { background: #C4856A; }
.entity-card:hover       { background: rgba(28,28,30,0.02); }

.entity-code { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 20px; }
.entity-code.darh { color: #1A4D6D; }
.entity-code.darx { color: #B8832A; }
.entity-code.darm { color: #C4856A; }

.entity-name         { font-family: var(--f-display); font-size: 32px; font-weight: 300; line-height: 1.1; color: var(--ink); margin-bottom: 6px; }
.entity-name em      { font-style: italic; }
.entity-jurisdiction { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 28px; }
.entity-desc         { font-size: 12px; color: var(--ink-muted); line-height: 1.75; margin-bottom: 32px; }

.entity-registers { display: flex; flex-direction: column; gap: 6px; }
.entity-reg       { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-faint); text-decoration: none; transition: color 0.15s; }
.entity-reg:hover { color: var(--ink); }
.entity-reg-dot   { width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0; opacity: 0.4; }
.entity-card.darh .entity-reg-dot { background: #1A4D6D; }
.entity-card.darx .entity-reg-dot { background: #B8832A; }
.entity-card.darm .entity-reg-dot { background: #C4856A; }
.entity-reg:hover .entity-reg-dot { opacity: 1; }

.entity-arrow { position: absolute; bottom: 48px; right: 48px; font-family: var(--f-mono); font-size: 18px; color: var(--rule); transition: color 0.2s, transform 0.2s; }
.entity-card:hover .entity-arrow { transform: translate(3px, -3px); }
.entity-card.darh:hover .entity-arrow { color: #1A4D6D; }
.entity-card.darx:hover .entity-arrow { color: #B8832A; }
.entity-card.darm:hover .entity-arrow { color: #C4856A; }

/* Principles block (below entity grid) */
.principles       { display: grid; grid-template-columns: 240px 1fr; border-bottom: 1px solid var(--rule); }
.principles-left  { padding: 56px 48px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; justify-content: space-between; }
.principles-label { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.20em; text-transform: uppercase; color: var(--ink-faint); }
.principles-title { font-family: var(--f-display); font-size: 28px; font-weight: 300; font-style: italic; color: var(--ink); line-height: 1.2; }
.principles-right { padding: 56px 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px; }
.principle-num    { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 8px; }
.principle-title  { font-family: var(--f-display); font-size: 18px; font-weight: 400; color: var(--ink); margin-bottom: 6px; }
.principle-body   { font-size: 11px; color: var(--ink-muted); line-height: 1.7; }

/* Tagline band */
.tagline-band     { padding: 80px; display: flex; align-items: center; justify-content: space-between; gap: 64px; border-bottom: 1px solid var(--rule); }
.tagline-text     { font-family: var(--f-display); font-size: 44px; font-weight: 300; font-style: italic; line-height: 1.1; color: var(--ink); flex: 1; }
.tagline-meta     { flex-shrink: 0; text-align: right; }
.tagline-meta-line { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); line-height: 2; }


/* ═══════════════════════════════════════════════════════════════════════
   9. PARSED-DOCUMENT VIEWER (BPGP)
   ─────────────────────────────────────────────────────────────────────
   Classes consumed by viewer scripts (darx_vwr.html etc).
   Composes with Register A primitives above.
   ═══════════════════════════════════════════════════════════════════════ */

/* Demo caption — appears at top of viewer pages */
.demo-caption {
  border: 1px dashed var(--rule);
  background: rgba(28,28,30,0.02);
  padding: 12px 16px; margin-bottom: 24px; border-radius: 2px;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.06em;
  color: var(--ink-faint); line-height: 1.7;
}
.demo-caption strong { color: var(--ink-muted); font-weight: 500; letter-spacing: 0.10em; }
.demo-caption code   { font-family: var(--f-mono); font-size: 9px; background: rgba(28,28,30,0.04); padding: 1px 5px; border-radius: 1px; color: var(--ink-muted); }

/* Fetch error block — shown when txt file fails to load */
.fetch-error       { border: 1px solid var(--alert); background: rgba(192,57,43,0.04); padding: 18px 20px; margin-bottom: 24px; border-radius: 2px; }
.fetch-error-title { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--alert); margin-bottom: 10px; }
.fetch-error-body  { font-size: 11px; color: var(--ink-muted); margin-bottom: 10px; }
.fetch-error code  { font-family: var(--f-mono); font-size: 10px; background: rgba(28,28,30,0.04); padding: 1px 6px; border-radius: 1px; color: var(--ink); }
.fetch-error pre   { font-family: var(--f-mono); font-size: 10px; color: var(--ink); background: rgba(28,28,30,0.04); padding: 10px 12px; border-radius: 2px; border: 1px solid var(--rule); white-space: pre-wrap; word-break: break-word; }

/* Parsed section heads */
.doc-section-head  { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--accent); }
.doc-section-num   { font-family: var(--f-mono); font-size: 11px; font-weight: 500; color: var(--ivory); letter-spacing: 0.12em; background: var(--accent); padding: 4px 10px; border-radius: 1px; flex-shrink: 0; min-width: 36px; text-align: center; }
.doc-section-title { font-family: var(--f-mono); font-size: 14px; font-weight: 400; color: var(--ink); letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3; }

/* Subsections within a section */
.doc-subsection      { margin-bottom: 28px; }
.doc-subsection:last-child { margin-bottom: 0; }
.doc-subsection-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; margin-top: 4px; }
.doc-subsection-num  { font-family: var(--f-mono); font-size: 9px; font-weight: 400; color: var(--accent); letter-spacing: 0.08em; background: var(--accent-bg); border: 1px solid var(--accent-mid); padding: 2px 7px; border-radius: 1px; flex-shrink: 0; }
.doc-subsection-title { font-family: var(--f-mono); font-size: 11px; font-weight: 500; color: var(--ink); letter-spacing: 0.10em; text-transform: uppercase; }

/* Parsed prose & sub-labels */
.doc-prose      { font-size: 12px; color: var(--ink); line-height: 1.7; margin-bottom: 12px; }
.doc-prose:last-child { margin-bottom: 0; }
.sub-label      { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-top: 16px; margin-bottom: 6px; }

/* Viewer-specific sidebar link enhancements */
.sidebar-link  { line-height: 1.4; align-items: flex-start; padding-top: 7px; padding-bottom: 7px; }
.sidebar-num   { font-size: 9px; color: var(--ink-faint); width: 18px; flex-shrink: 0; padding-top: 1px; }
.sidebar-link.active .sidebar-num { color: var(--accent); }
.sidebar-text  { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; word-break: break-word; }

/* Parsed lists (bullets and lettered) */
ul.doc-list, ol.doc-list { margin: 0 0 14px 0; padding-left: 0; list-style: none; }
ul.doc-list li, ol.doc-list li { position: relative; padding-left: 18px; margin-bottom: 6px; font-size: 12px; color: var(--ink); line-height: 1.7; }
ul.doc-list li::before { content: ''; position: absolute; left: 0; top: 11px; width: 8px; height: 1px; background: var(--accent); }
ol.doc-list    { counter-reset: doclist; }
ol.doc-list li { padding-left: 28px; }
ol.doc-list li::before { counter-increment: doclist; content: counter(doclist, lower-alpha) "."; position: absolute; left: 4px; top: 0; font-family: var(--f-mono); font-size: 10px; color: var(--accent); }

/* Parsed tables (decision matrices etc) */
.doc-table-wrap   { margin: 14px 0 18px; overflow-x: auto; }
table.doc-table   { width: 100%; border-collapse: collapse; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; font-family: var(--f-mono); font-size: 10px; }
table.doc-table th { font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 400; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: rgba(28,28,30,0.02); vertical-align: top; }
table.doc-table td { padding: 9px 14px; border-bottom: 1px solid var(--rule); color: var(--ink); vertical-align: top; line-height: 1.5; }
table.doc-table tr:last-child td { border-bottom: none; }
table.doc-table tr:hover td      { background: var(--accent-bg); }

/* Acronym / glossary blocks */
.acronym-grid   { display: grid; grid-template-columns: 90px 1fr; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.acronym-key    { font-family: var(--f-mono); font-size: 10px; font-weight: 500; color: var(--accent); letter-spacing: 0.04em; padding: 8px 14px; background: rgba(28,28,30,0.02); border-bottom: 1px solid var(--rule); }
.acronym-val    { font-family: var(--f-body); font-size: 11px; color: var(--ink); padding: 8px 14px; border-bottom: 1px solid var(--rule); }
.acronym-grid > div:nth-last-child(-n+2) { border-bottom: none; }

.glossary-entry { margin-bottom: 14px; }
.glossary-term  { font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 4px; }
.glossary-def   { font-size: 11px; color: var(--ink-muted); line-height: 1.7; padding-left: 14px; border-left: 1px solid var(--rule); }

/* Document control block (at end of viewer pages) */
.doc-control       { border: 1px solid var(--accent); background: var(--accent-bg); border-radius: 2px; padding: 18px 20px; margin-top: 32px; }
.doc-control-title { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.20em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--accent-mid); }
.doc-control-row   { display: flex; gap: 16px; padding: 6px 0; border-bottom: 1px solid rgba(28,28,30,0.04); }
.doc-control-row:last-child { border-bottom: none; }
.doc-control-key   { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.10em; color: var(--ink-faint); flex-shrink: 0; width: 130px; text-transform: uppercase; }
.doc-control-val   { font-family: var(--f-mono); font-size: 10px; color: var(--ink); flex: 1; line-height: 1.6; }
.doc-control-row.compliance .doc-control-key { color: var(--alert); }
.doc-control-row.compliance .doc-control-val { color: var(--ink); font-weight: 500; }

.doc-end-marker {
  text-align: center;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.20em;
  color: var(--ink-faint); padding: 18px 0; margin-top: 16px;
  border-top: 1px solid var(--rule);
}

/* Raw fallback display */
pre.doc-raw {
  font-family: var(--f-mono); font-size: 10px;
  white-space: pre-wrap; color: var(--ink-muted);
  padding: 10px 12px; border-left: 2px solid var(--rule); margin: 10px 0;
}


/* ═══════════════════════════════════════════════════════════════════════
   10. PRINT
   ─────────────────────────────────────────────────────────────────────
   Strip the chrome and sidebars when printing. Keep document content.
   ═══════════════════════════════════════════════════════════════════════ */
@media print {
  .fixed-header, .fixed-footer, .sidebar, .page-header-right, .demo-caption { display: none; }
  body                 { padding-top: 0; padding-bottom: 0; }
  .layout              { display: block; }
  .main                { flex: none; }
  .doc-section, .doc-subsection { page-break-inside: avoid; }
  table.doc-table      { page-break-inside: avoid; }
}
