/* =============================================================================
   Fraley V2 - design tokens
   Visual thesis: professional engineering editorial + restrained mission-control.
   Base is graphite, cool neutral surfaces, one signal-blue accent, one warm
   status accent used sparingly. Type: Avenir Next LT Pro for public text,
   IBM Plex Mono only for instrumentation labels and technical readouts.
   ============================================================================= */
:root {
  /* ---- colour: surfaces ---- */
  --c-bg-0: #0b0e13;            /* page base - graphite */
  --c-bg-1: #0f141b;            /* alternate section band */
  --c-bg-2: #131a23;            /* card / panel */
  --c-bg-3: #19222d;            /* elevated / hover */
  --c-bg-4: #1f2a37;            /* pressed / active */

  /* ---- colour: lines ---- */
  --c-line-1: rgba(199, 216, 235, 0.10);
  --c-line-2: rgba(199, 216, 235, 0.18);
  --c-line-3: rgba(199, 216, 235, 0.32);
  --c-grid:   rgba(199, 216, 235, 0.05);

  /* ---- colour: text ---- */
  --c-text-1: #e8edf3;          /* primary */
  --c-text-2: #b6c0cc;          /* secondary */
  --c-text-3: #8794a5;          /* muted labels (≥ 4.5:1 on bg-0) */
  --c-text-4: #7d8a9a;          /* quietest readable text - ≥ 4.5:1 on bg-0/bg-2 */

  /* ---- colour: accents ---- */
  --c-accent:        #78c6f5;   /* signal blue - links, indicators */
  --c-accent-bright: #a9dcff;   /* link hover / lit state */
  --c-accent-strong: #2a6fbf;   /* buttons - white text ≥ 4.5:1 */
  --c-accent-strong-hover: #2f74c8;
  --c-accent-ink:    #07141f;   /* text on accent */
  --c-accent-glow:   rgba(120, 198, 245, 0.16);
  --c-accent-line:   rgba(120, 198, 245, 0.45);
  --c-warm:          #e8b35e;   /* status / first-author / boundary highlight */
  --c-warm-glow:     rgba(232, 179, 94, 0.14);
  --c-ok:            #7fd0a3;   /* status dot only */

  /* ---- type families ---- */
  --f-sans: 'avenir-next-lt-pro', Avenir, 'Helvetica Neue', Arial, sans-serif;
  --f-serif: var(--f-sans);
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---- type scale (fluid) ---- */
  --t-display: clamp(2.55rem, 1.65rem + 3vw, 4.35rem);
  --t-h1:      clamp(2.05rem, 1.45rem + 2vw, 3.2rem);
  --t-h2:      clamp(1.55rem, 1.25rem + 1vw, 2.15rem);
  --t-h3:      clamp(1.2rem, 1.1rem + 0.35vw, 1.4rem);
  --t-h4:      1.0625rem;
  --t-lede:    clamp(1.1rem, 1.02rem + 0.42vw, 1.32rem);
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-xs:      0.8125rem;
  --t-label:   0.75rem;
  --t-micro:   0.6875rem;
  /* Component-relative metric text with an absolute legibility floor/ceiling. */
  --t-metric-secondary: clamp(0.9rem, calc(0.3em + 0.35rem), 1.05rem);
  --metric-inline-gap: clamp(0.2rem, 0.12em, 0.35rem);

  --lh-tight: 1.04;
  --lh-snug:  1.2;
  --lh-text:  1.42;
  --lh-body:  1.65;
  --track-label: 0.14em;
  --track-tight: -0.022em;

  /* ---- spacing (4px base) ---- */
  --s-1: 0.25rem;  --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;   --s-5: 1.5rem;
  --s-6: 2rem;     --s-7: 3rem;    --s-8: 4rem;    --s-9: 6rem;   --s-10: 8rem;
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --block-y:   clamp(2rem, 1.5rem + 2vw, 3.5rem);

  /* ---- layout ---- */
  --w-max:  1200px;
  --w-wide: 1360px;
  --w-read: 44rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 64px;

  --r-1: 3px; --r-2: 6px; --r-3: 10px;
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-2: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 50px rgba(0, 0, 0, 0.45);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;
  --dur-slow: 480ms;

  color-scheme: dark;
}
