/* ============================================================
   JURASSIC INTERFACE — TOKENS
   Inspired by early-90s workstation GUIs. No third-party marks.
   Swap these values to reskin the entire system.
   ============================================================ */

:root {
  /* ---- CHASSIS · DAY (gray control console) ---------------- */
  --jp-chassis:      #a9a9a9;   /* body of every panel        */
  --jp-chassis-2:    #bdbdbd;   /* raised surface             */
  --jp-hi:           #e4e4e4;   /* bevel light edge           */
  --jp-lo:           #5c5c5c;   /* bevel shadow edge          */
  --jp-edge:         #2a2a2a;   /* hard outline               */

  /* ---- WELLS (recessed content areas) --------------------- */
  --jp-well:         #000000;
  --jp-well-2:       #ffffff;
  --jp-well-line:    #3a3a3a;

  /* ---- INK ------------------------------------------------ */
  /* Each surface has a matched foreground. Never pair --jp-ink with
     a well: wells invert between day and night, ink does not.     */
  --jp-ink:          #000000;   /* absolute black of the palette  */
  --jp-ink-inv:      #ffffff;   /* absolute white of the palette  */

  --jp-on-chassis:   #000000;   /* text on chassis / panels       */
  --jp-dim-chassis:  #383838;   /* secondary text on chassis (4.99:1) */
  --jp-on-well:      #ffffff;   /* text inside a dark well        */
  --jp-dim-well:     #8a8a8a;   /* secondary text inside a well   */
  --jp-on-well-2:    #000000;   /* text on a paper well           */

  /* ---- SIGNAL (meaning only — never decoration) ----------- */
  --jp-go:           #00a13a;   /* nominal / clear / success  */
  --jp-hold:         #f2d600;   /* attention / pending        */
  --jp-fail:         #cc1111;   /* fault / destructive        */
  --jp-data:         #0b1fb0;   /* selected / active record   */
  --jp-trace:        #7fe3ff;   /* line art, plots, wireframe */
  --jp-off:          #4a4a4a;   /* lamp, unlit                */

  /* ---- TYPE ----------------------------------------------- */
  /* Display: condensed grotesque, italic. System stack = no licensing,
     no network request, works offline. Upgrade path in README.   */
  /* Condensed faces first — "Helvetica Neue" is NOT condensed and must
     never lead the stack, or the display type renders full-width.      */
  --jp-face-display: "Arial Narrow", "Avenir Next Condensed",
                     "Liberation Sans Narrow", "Nimbus Sans Narrow",
                     "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  /* Static narrow faces (Arial Narrow) report normal width, so stretch is
     inert for the default stack. Set to `condensed` only if you swap in a
     variable or width-axis family.                                      */
  --jp-stretch:      normal;
  --jp-face-data:    ui-monospace, "SF Mono", Menlo, Consolas,
                     "DejaVu Sans Mono", monospace;

  --jp-slant:        italic;    /* set to `normal` for a calmer variant */
  --jp-track:        0.02em;    /* display letterspacing */
  --jp-track-wide:   0.14em;    /* buttons, tabs, plates */

  /* Small sizes stay fixed — they already sit on the accessibility floor
     and must not shrink. Display sizes are fluid, so type responds
     systemically and no page needs its own breakpoint for headings.   */
  --jp-t-xs:  11px;
  --jp-t-sm:  13px;
  --jp-t-md:  15px;
  --jp-t-lg:  clamp(17px, 0.9vw + 14px, 20px);
  --jp-t-xl:  clamp(21px, 2.6vw + 12px, 30px);
  --jp-t-2xl: clamp(27px, 5.2vw + 10px, 44px);

  /* ---- METRICS -------------------------------------------- */
  --jp-bevel:   2px;   /* every raised/inset edge is exactly this */
  --jp-radius:  0;     /* structural: nothing is ever rounded     */
  --jp-gap:     6px;   /* the one true gutter                     */
  --jp-pad:     10px;
  --jp-pad-lg:  16px;
  --jp-row:     26px;  /* dense list row height                   */

  /* ---- DESKTOP & WINDOWS ---------------------------------- */
  --jp-desktop:      #2f7d7a;   /* mottled wallpaper base     */
  --jp-desktop-2:    #256a67;   /* wallpaper noise            */
  --jp-win-bar:      #cfcabb;   /* focused title bar (warm)   */
  --jp-win-bar-off:  #a4a49c;   /* unfocused title bar        */
  --jp-win-ink:      #17170f;
  --jp-terminal:     #252c8f;   /* the indigo console         */
  --jp-terminal-ink: #ffffff;
  --jp-cursor:       #35ff5e;   /* hollow block caret         */

  /* ---- PLOT SURFACE --------------------------------------- */
  --jp-plot-bg:      #12143a;   /* dark indigo chart well     */
  --jp-plot-grid:    #2b2e66;
  --jp-plot-axis:    #8f95d8;   /* >=4.5:1 on --jp-plot-bg */

  /* ---- SERIES (categorical — identity, NOT status) ---------
     Fixed order, never cycled. A 6th series folds into OTHER,
     small multiples, or a composite encoding — never a new hue.
     These are deliberately separate from --jp-go/hold/fail: status
     colors are reserved and must never encode a data series.
     Validated with the dataviz palette checker against a dark
     surface: lightness band, chroma floor, CVD separation,
     normal-vision floor and contrast all PASS.               */
  --jp-s1: #2da84f;   /* phosphor green */
  --jp-s2: #c94fc0;   /* magenta        */
  --jp-s3: #bf8310;   /* amber          */
  --jp-s4: #3f9ed4;   /* cyan-blue      */
  --jp-s5: #8368d6;   /* violet         */

  /* ---- TOUCH ---------------------------------------------- */
  /* Minimum hit size. Governed by POINTER, not width — a touchscreen
     laptop at 1400px needs big targets; a narrow desktop window does not. */
  --jp-tap: 28px;

  /* ---- MOTION --------------------------------------------- */
  --jp-blink:  1.1s;   /* cursors, alarm lamps */
  --jp-snap:   0ms;    /* UI state changes are instant, not eased */
}

/* ------------------------------------------------------------
   Charts on a light surface need their own steps — a dark-mode
   ramp is never an automatic flip of the light one.
   Validated --mode light: all hard checks PASS. CVD separation
   WARNs at dE 6.7 (deutan) on violet/blue, which is legal ONLY
   with secondary encoding — so .jp-plot and .jp-bars ship
   mandatory direct labels and 2px segment gaps. Do not remove
   them on a light surface.
   ------------------------------------------------------------ */
.jp-well--paper,
.jp-plot--paper {
  --jp-s1: #20803d;
  --jp-s2: #a3389b;
  --jp-s3: #94640a;
  --jp-s4: #2a79a8;
  --jp-s5: #7b3fa8;
}

/* ============================================================
   NIGHT — the blue security-terminal palette.
   Forced with [data-jp-mode="night"], automatic in system dark mode
   unless the page opts out with [data-jp-mode="day"].
   ============================================================ */

.jp-night-palette,
[data-jp-mode="night"] {
  --jp-chassis:   #384d69;
  --jp-chassis-2: #445b7c;
  --jp-hi:        #6d87ad;
  --jp-lo:        #1a2738;
  --jp-edge:      #14202f;
  --jp-well:      #05080f;
  --jp-well-2:    #0d1626;
  --jp-well-line: #2a415f;
  --jp-ink:       #0a1220;
  --jp-ink-inv:   #eaf2ff;

  --jp-on-chassis:  #eaf2ff;
  --jp-dim-chassis: #b7c9e2;
  --jp-on-well:     #eaf2ff;
  --jp-dim-well:    #93b0d4;
  --jp-on-well-2:   #eaf2ff;

  --jp-desktop:     #16323f;
  --jp-desktop-2:   #0f2531;
  --jp-win-bar:     #51688c;
  --jp-win-bar-off: #33455e;
  --jp-win-ink:     #eaf2ff;
  --jp-terminal:    #0b1140;
  --jp-plot-bg:     #080a24;
  --jp-plot-grid:   #1e2150;

  --jp-trace:     #cfe6ff;
  --jp-go:        #34d977;
  --jp-hold:      #ffe14d;
  --jp-fail:      #ff5a5a;
  --jp-data:      #3f6fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-jp-mode="day"]) {
    --jp-chassis:   #384d69;
    --jp-chassis-2: #445b7c;
    --jp-hi:        #6d87ad;
    --jp-lo:        #1a2738;
    --jp-edge:      #14202f;
    --jp-well:      #05080f;
    --jp-well-2:    #0d1626;
    --jp-well-line: #2a415f;
    --jp-ink:       #0a1220;
    --jp-ink-inv:   #eaf2ff;

    --jp-on-chassis:  #eaf2ff;
    --jp-dim-chassis: #b7c9e2;
    --jp-on-well:     #eaf2ff;
    --jp-dim-well:    #93b0d4;
    --jp-on-well-2:   #eaf2ff;

    --jp-desktop:     #16323f;
    --jp-desktop-2:   #0f2531;
    --jp-win-bar:     #51688c;
    --jp-win-bar-off: #33455e;
    --jp-win-ink:     #eaf2ff;
    --jp-terminal:    #0b1140;
    --jp-plot-bg:     #080a24;
    --jp-plot-grid:   #1e2150;

    --jp-trace:     #cfe6ff;
    --jp-go:        #34d977;
    --jp-hold:      #ffe14d;
    --jp-fail:      #ff5a5a;
    --jp-data:      #3f6fff;
  }
}


/* ============================================================
   RESPONSE
   Two independent axes. Do not conflate them:
     WIDTH   governs LAYOUT      — how many panels fit side by side
     POINTER governs ERGONOMICS  — how big a thing you have to hit
   ============================================================ */

/* --- POINTER: coarse input relaxes density. This is the one place
       rule 9 (density) yields, and it yields to the a11y floor. ------ */
@media (pointer: coarse) {
  :root {
    --jp-tap:    44px;
    --jp-gap:    8px;
    --jp-pad:    12px;
    --jp-pad-lg: 18px;
    --jp-row:    44px;
    --jp-t-xs:   12px;
    --jp-t-sm:   14px;
    --jp-t-md:   16px;
  }
}

/* --- EDITORIAL: a density scope, not a component. -----------------
   Law 9 (density) is right for a control surface and wrong for a
   page someone reads. Scope this to a content-led page and the whole
   system loosens without any component changing. Parallel to the
   pointer-coarse mode above: same tokens, different pressure.     */
.jp-editorial {
  --jp-gap:    14px;
  --jp-pad:    18px;
  --jp-pad-lg: 28px;
  --jp-t-2xl:  clamp(30px, 7.4vw + 4px, 56px);
}
@media (min-width: 900px) {
  .jp-editorial {
    --jp-gap:    18px;
    --jp-pad:    22px;
    --jp-pad-lg: 36px;
    --jp-t-2xl:  clamp(44px, 5.4vw, 76px);
  }
}

/* Display type is fluid (clamp), so no width-based type overrides are
   needed or wanted — a fixed override here would fight the clamp. */
