/* ==========================================================================
   Galerne — design tokens (packages/design/GUIDELINES.md). Copied from Tramontane, prefix --gl-, accent sea teal.
   In the dashboard, light is the default; dark applies via [data-theme="dark"]
   (the toggle in the sidebar, remembered in localStorage).
   ========================================================================== */


:root {
  /* ---- Typefaces ------------------------------------------------------- */
  --gl-font-mono: var(--font-jetbrains-mono), "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gl-font-sans: var(--font-hanken-grotesk), "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* ---- Type scale (size / line-height / tracking) ---------------------- */
  --gl-display-xl: clamp(48px, 9vw, 128px);   --gl-display-xl-lh: 0.95;  --gl-display-xl-ls: -0.065em;
  --gl-display-l:  clamp(40px, 5.6vw, 72px);  --gl-display-l-lh: 1.02;   --gl-display-l-ls: -0.06em;
  --gl-h2:         clamp(34px, 4vw, 52px);    --gl-h2-lh: 1.05;          --gl-h2-ls: -0.055em;
  --gl-h3:         24px;                      --gl-h3-lh: 1.2;           --gl-h3-ls: -0.02em;
  --gl-h4:         15px;                      --gl-h4-lh: 1.3;
  --gl-body-l:     19px;                      --gl-body-l-lh: 1.55;
  --gl-body:       16px;                      --gl-body-lh: 1.6;
  --gl-body-s:     14px;                      --gl-body-s-lh: 1.5;
  --gl-ui:         13px;                      /* mono chrome: nav, buttons, labels */
  --gl-caption:    12px;                      /* mono meta: timestamps, eyebrows */
  --gl-micro:      11px;                      /* mono dividers, tags */

  /* ---- Spacing (4px base) ---------------------------------------------- */
  --gl-space-1: 4px;   --gl-space-2: 8px;   --gl-space-3: 12px;  --gl-space-4: 16px;
  --gl-space-5: 20px;  --gl-space-6: 24px;  --gl-space-7: 28px;  --gl-space-8: 32px;
  --gl-space-10: 40px; --gl-space-12: 48px; --gl-space-14: 56px; --gl-space-18: 72px;
  --gl-space-24: 96px;

  /* ---- Layout ---------------------------------------------------------- */
  --gl-container: 1240px;
  --gl-gutter: 24px;
  --gl-section-y: 96px;
  --gl-sidebar-w: 320px;

  /* ---- Shape ----------------------------------------------------------- */
  --gl-radius: 0;          /* everything is square */
  --gl-radius-dot: 50%;    /* status dots and window lights only */
  --gl-border: 1px;
  --gl-border-active: 2px; /* active tab underline, highlighted table column */

  /* ---- Elevation (floating windows only) ------------------------------- */
  --gl-shadow-window: 0 30px 80px -40px rgba(0, 0, 0, 0.5);

  /* ---- Motion ---------------------------------------------------------- */
  --gl-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gl-dur-fast: 120ms;
  --gl-dur: 200ms;
  --gl-dur-drift: 14s;     /* streamline drift loop */

  /* ---- Brand constants (theme-independent) ----------------------------- */
  --gl-teal-300: #6FD3C4;
  --gl-teal-700: #0B6E66;

  /* ---- Color: LIGHT (default) ------------------------------------------ */
  color-scheme: light;
  --gl-bg:            #F4F6F5;
  --gl-surface:       #FFFFFF;
  --gl-surface-sunk:  #ECEFED;
  --gl-raised:        #E2E6E3;
  --gl-raised-strong: #CDD3CF;
  --gl-line:          #DFE3E0;
  --gl-line-strong:   #C3CAC6;
  --gl-text:          #121615;
  --gl-text-muted:    #545B58;
  --gl-text-subtle:   #5F6763;
  --gl-accent:        #0B6E66;
  --gl-accent-text:   #0B6E66;
  --gl-on-accent:     #FFFFFF;
  --gl-success:       #2E7A3A;
  --gl-success-line:  rgba(46, 122, 58, 0.4);
  --gl-warning:       #875E00;
  --gl-danger:        #C2362B;
  --gl-shadow-window: 0 30px 80px -40px rgba(18, 22, 21, 0.28);
}

/* ---- Color: DARK ------------------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --gl-bg:            #141414;
  --gl-surface:       #1B1B1B;   /* panels, cards, windows */
  --gl-surface-sunk:  #181818;   /* sidebars, list columns */
  --gl-raised:        #262626;   /* selected row, avatar, hover */
  --gl-raised-strong: #3A3A3A;   /* chart misses, window lights */
  --gl-line:          #2B2B2B;   /* all hairlines and borders */
  --gl-line-strong:   #454545;   /* streamlines, input focus ring base */
  --gl-text:          #ECEBE8;
  --gl-text-muted:    #9D9B97;   /* secondary copy */
  --gl-text-subtle:   #86847F;   /* timestamps, placeholders, meta */
  --gl-accent:        #6FD3C4;   /* sea teal: one per view, used sparingly */
  --gl-accent-text:   #6FD3C4;   /* accent when used as text */
  --gl-on-accent:     #061A17;
  --gl-success:       #86C281;   /* live, ready, "new" */
  --gl-success-line:  rgba(134, 194, 129, 0.35);
  --gl-warning:       #E3C26B;   /* building, queued */
  --gl-danger:        #FF7A6E;   /* failed, error */
  --gl-shadow-window: 0 30px 80px -40px rgba(0, 0, 0, 0.5);
}
