/* ============================================================
   Nile Hatch — brand tokens
   Drop-in custom properties for the books, the site, slides, and apps.
   Decided 2026-07-20/21. See ~/notes/00-Dashboard/NILE.md for rationale.

   Usage (Quarto): add this file to the `css:` list in _quarto.yml,
   ahead of the per-book skin, then style through the tokens.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700&family=Spectral:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* ---- Brand core ------------------------------------------------
     Cerulean + gold is the brand-level pair: logo, site, slides, video.
     COLOUR GRAMMAR (a rule, not a preference):
       gold     = the sun   — light, evidence, knowledge
       cerulean = the horizon — ground, the known
     Never colour the bar gold; it inverts the grammar and the mark
     reads as a cerulean sun over a gold horizon.                     */
  --nh-cerulean:       #007BA7;
  --nh-cerulean-dark:  #006B90;
  --nh-teal:           #008080;
  --nh-gold:           #E3A008;
  --nh-ink:            #1F2937;
  --nh-muted:          #6B7280;
  --nh-tint:           #E9F3F6;
  --nh-line:           #DDE5EA;

  /* ---- Type ------------------------------------------------------
     Fira Sans  — humanist sans, display/headings (Gill Sans lineage)
     Spectral   — low-contrast screen serif, body/long-form reading
     Both low contrast: no hairline strokes to fight the eye.
     A serif body also lets maths return to natural serif setting —
     no more \mathsf{} workarounds in the analytics books.            */
  --nh-font-display: "Fira Sans", system-ui, -apple-system, sans-serif;
  --nh-font-body:    "Spectral", Georgia, "Times New Roman", serif;

  /* ---- Semantic figure palette (books, figures, apps) -------------
     Meaning-carrying colour, held consistently everywhere:
       demand = blue · cost = red/orange ("in the red") · profit = green */
  --nh-demand:        #2563EB;
  --nh-demand-dark:   #1E3A8A;
  --nh-demand-light:  #78B7FA;
  --nh-cost:          #C2410C;
  --nh-cost-dark:     #7F1D1D;
  --nh-cost-light:    #FB923C;
  --nh-profit:        #0F5132;
  --nh-profit-light:  #1F9D8A;
}

/* ---- Per-book skins ----------------------------------------------
   Each book keeps a distinct gradient for identity; all share the gold
   accent and the gold-sun mark, so the family reads as one hand.
   Apply a class to <body> (or set these in the book's custom_*.css).  */

.book-ei {                 /* Expeditionary Innovation — warmed toward cerulean */
  --book-primary:   #2E6FB0;
  --book-secondary: var(--nh-cerulean);
  --book-tint:      #E8F0FA;
}
.book-mtc {                /* Make the Call — "calm confidence in a harried environment" */
  --book-primary:   var(--nh-cerulean);
  --book-secondary: var(--nh-teal);
  --book-tint:      #EAF4F7;
}
.book-itwd {               /* Is This Worth Doing? — "in the money" */
  --book-primary:   #0F5132;
  --book-secondary: #1F9D8A;
  --book-tint:      #E9F7F3;
}

/* Shared branded components read from the book skin, so only colour
   changes between books. */
.nh-banner {
  background: linear-gradient(102deg, var(--book-primary, var(--nh-cerulean)),
                                      var(--book-secondary, var(--nh-teal)));
  color: #fff;
  border-radius: 12px;
  padding: 1.2rem 1.3rem 1rem;
  margin-bottom: 2.25rem;   /* Quarto zeroes this for sidebar layouts — see note */
}
.nh-banner .title    { font-family: var(--nh-font-display); font-weight: 600; }
.nh-banner .subtitle { font-family: var(--nh-font-body); font-style: italic; }

/* NOTE for Quarto books: the theme sets
     body.nav-sidebar #title-block-header { margin-block-end: 0 }
   which overrides .quarto-title-block margins. To restore breathing room:
     body.nav-sidebar #title-block-header { margin-bottom: 2.25rem !important; } */
