/* ============================================================
   KINETIC UI KIT · kernel.css · v1.0.0
   One kernel. Every Kinetic surface imports this file.
   Tokens are law. Drift is a bug. Do not restate these values.
   ============================================================ */

:root{
  /* ink scale */
  --fg:#E9E7E2;
  --muted:#9BA1A8;
  --dim:#5E666D;
  --faint:#3A424A;

  /* signal (one green, house-wide) */
  --green:#3CB44B;
  --green-b:#5BD86B;
  --green-dim:rgba(60,180,75,.10);

  /* alerts */
  --amber:#C9A44D;
  --red:#B96B5E;

  /* voices */
  --serif:'Cormorant Garamond',serif;
  --sans:'Inter',sans-serif;
  --mono:'Geist Mono',monospace;

  /* spacing scale (4px base, use these, never arbitrary values) */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;

  /* motion (Active Theory: style states are CSS-only, GPU-safe) */
  --t-fast:120ms; --t-base:180ms; --t-slow:300ms;
  --ease:cubic-bezier(.25,.1,.25,1);

  /* z-scale (never invent a z-index) */
  --z-nav:50; --z-gate:60; --z-modal:70; --z-toast:80;

  /* legacy aliases (fleet compatibility, do not use in new work) */
  --ink:var(--fg); --ink-2:var(--muted); --ink-3:var(--dim);
  --accent:var(--green); --accent-b:var(--green-b);
  --sig:var(--green); --sig-2:var(--green-b); --sig-dim:var(--green-dim);
}

*{margin:0;padding:0;box-sizing:border-box}
body{color:var(--fg);font-family:var(--sans);-webkit-font-smoothing:antialiased}
::selection{background:rgba(60,180,75,.25)}

/* keyboard focus is law (Apple: a control without visible focus does not exist) */
:focus-visible{outline:1px solid var(--green);outline-offset:3px;border-radius:1px}
:focus:not(:focus-visible){outline:none}

/* three voices: serif states, mono proves, sans explains */
.mono{font-family:var(--mono)}
.kicker,.lbl{font-family:var(--mono);font-size:10px;letter-spacing:.24em;text-transform:uppercase;color:var(--dim)}

/* screen-reader only */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* keyboard hint */
kbd{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;color:var(--dim);border:1px solid var(--faint);border-radius:3px;padding:2px 6px}

/* skeleton loading (shared shimmer, both screen registers) */
.skel{display:inline-block;background:var(--faint);opacity:.35;border-radius:2px;animation:k-skel 1.4s var(--ease) infinite;color:transparent!important;pointer-events:none;user-select:none}
@keyframes k-skel{0%,100%{opacity:.22}50%{opacity:.42}}

/* live pulse (data feels alive, signal only) */
.pulse{animation:k-pulse 2.2s var(--ease) infinite}
@keyframes k-pulse{0%,100%{opacity:1}50%{opacity:.45}}

/* reduced motion: everything still works with motion off */
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* scrollbars, quiet */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--faint);border-radius:5px}
::-webkit-scrollbar-track{background:transparent}

/* ============================================================
   KINETIC UI KIT · kernel-additions.css · v2.2.0 · TOKENS LANE
   Typography scale, weight, line-height, letter-spacing tokens.
   ADDITIVE ONLY: appended after kernel.css, zero visual change.
   Every value traced from the existing kit registers (kernel,
   enterprise, hyperminimal). No rendering delta.
   ============================================================ */

:root {

  /* ── Font Size Scale ──────────────────────────────────────────
     24-step ramp covering every px literal across all three
     registers. Anchored at --fs-base (13px, enterprise table body).
     Steps 4xs → xl span readable text; 2xl → 3xl are transitional;
     heading/display tiers above. Half-pixel register values carry
     a "-5" suffix (read: "plus half").
     
     Survey source: kernel.css (9.5, 10), enterprise.css (9 → 34),
     hyperminimal.css (8.5 → 38). All values pixel-identical. */

  --fs-4xs:    8.5px;   /* HM: book specimen caption                    */
  --fs-3xs:    9px;     /* ENT: brand-sub, band kicker (.k)             */
  --fs-2xs:    9.5px;   /* K: kbd; ENT: field labels, th, .foot         */
  --fs-xs:     10px;    /* K: kicker/lbl; ENT: nav .nsec, pill, legend  */
  --fs-xs-5:   10.5px;  /* ENT: .tblfoot button; HM: .tblfoot button   */
  --fs-sm:     11px;    /* ENT: .side-foot, .btn, .help, .affix span    */
  --fs-sm-5:   11.5px;  /* ENT: table.ent td:first-child mono           */
  --fs-md:     12px;    /* ENT: .crumbs, .note, .tblfoot, .btn.lg       */
  --fs-md-5:   12.5px;  /* ENT: .drop, .bulkbar, .toast, dense, state-p */
  --fs-base:   13px;    /* ENT: table.ent body, .enttabs, .dl, empty    */
  --fs-base-5: 13.5px;  /* ENT: nav a, .panel p, .field input, .check   */
  --fs-lg:     14px;    /* ENT: .note .dismiss icon                     */
  --fs-lg-5:   14.5px;  /* ENT: .lead paragraph                         */
  --fs-xl:     15px;    /* ENT: body default                             */
  --fs-2xl:    16px;    /* ENT: .dialog .x close icon                   */
  --fs-3xl:    17px;    /* HM: mid heading tier                         */
  --fs-sub:    19px;    /* HM: subheading                               */
  --fs-title:  20px;    /* ENT: .dialog h3, .ent-state h4               */
  --fs-brand:  21px;    /* ENT: .shell .brand; HM: brand                */
  --fs-h2:     24px;    /* ENT: .ent-state .glyph                       */
  --fs-h1:     26px;    /* ENT: .band .v stat value                     */
  --fs-d3:     30px;    /* HM: display heading                          */
  --fs-d2:     34px;    /* ENT: h1.ent; HM: display                     */
  --fs-d1:     38px;    /* HM: largest display heading                  */

  /* ── Font Weight Tokens ───────────────────────────────────────
     Three weights used across all registers. Named for role. */

  --fw-regular: 400;    /* body copy, form inputs, panel text            */
  --fw-medium:  500;    /* emphasis bold (b tags), serif headings        */
  --fw-semi:    600;    /* mono labels, buttons, table headers           */

  /* ── Line Height Scale ────────────────────────────────────────
     Five values covering every line-height literal in the kit.  */

  --lh-none:    1;      /* icons, dismiss buttons, single-line compact   */
  --lh-tight:   1.2;    /* headings, .brand                              */
  --lh-snug:    1.5;    /* .help text                                    */
  --lh-base:    1.55;   /* body default                                  */
  --lh-loose:   1.6;    /* textarea                                      */
  --lh-relaxed: 1.9;    /* .side-foot (mono at small sizes)              */

  /* ── Letter Spacing Scale ─────────────────────────────────────
     Named pair: mono label tracking and serif/brand tracking.
     Individual steps for the graduated mono scale used in labels. */

  --ls-tight:   .01em;  /* serif heading: .ent-state h4                  */
  --ls-brand:   .02em;  /* .shell .brand serif                           */
  --ls-kbd:     .08em;  /* kbd element                                   */
  --ls-btn:     .1em;   /* .btn, .bar-cap                                */
  --ls-pill:    .12em;  /* .pill                                         */
  --ls-steps:   .14em;  /* .steps wizard                                 */
  --ls-label:   .16em;  /* field labels, .dl dt, th                      */
  --ls-foot:    .18em;  /* .foot, .band .k, .side-foot                   */
  --ls-wide:    .2em;   /* nav .nsec, .panel h4, .fset legend            */
  --ls-sub:     .22em;  /* .brand-sub                                    */
  --ls-mono:    .24em;  /* K: kicker/lbl (widest tracking)               */
}
