/* ==========================================================================
   Uprising AI — design tokens
   Source: https://uprisingai.co.uk (home page inline CSS + /assets/site.css),
   pulled 2026-11-12. Values marked "observed" are copied from the site;
   values marked "derived" fill gaps the marketing site never needed
   (dense UI type sizes, a full spacing scale, semantic status colors).
   Layers: 1 raw palette (--up-*)  2 semantic (--color-*, --font-*, …)
           3 legacy aliases for admin.html (--bg, --panel, … remove after the revamp)
   Themes: dark is the brand default. Light follows the site's `body.light`
   paper variant. `data-theme="light|dark"` on <html> forces one; otherwise
   the OS preference decides.
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. RAW PALETTE (theme-independent, observed)
   ------------------------------------------------------------------------- */
:root {
  /* night + bone: the two inks of the dark theme */
  --up-night:        #0b0a10;   /* page background (dark) */
  --up-night-2:      #121119;   /* raised surface: the chat mock */
  --up-night-3:      #17151d;   /* light-theme ink / darkest surface */
  --up-bone:         #f4f1ea;   /* text on dark; button fill on dark */

  /* paper: the light theme family */
  --up-paper:        #f7f2e9;   /* page background (light) */
  --up-paper-2:      #fcf8f2;   /* card gradient bottom */
  --up-paper-3:      #fffdf9;   /* card gradient top / details / author box */
  --up-paper-4:      #f6f0e4;   /* media placeholders */
  --up-paper-5:      #f3efe6;   /* "after" band */
  --up-paper-6:      #fbf4ec;   /* light hero gradient top */
  --up-paper-ink-2:  #3d3a35;   /* body text on paper band */

  /* accents */
  --up-orange:       #fe7146;   /* primary accent, logo mark, "now" */
  --up-blue:         #5574ff;   /* secondary accent, "you" bubble */
  --up-blue-deep:    #3557e8;   /* blue on light surfaces */
  --up-yellow:       #f6c53a;   /* "soon", warning, gathering state */
  --up-yellow-light: #ffd76a;
  --up-violet:       #b39eff;   /* "planned" */
  --up-violet-deep:  #8b6cf0;   /* violet on light surfaces */
  --up-green:        #3fbf85;   /* ok, verified */
  --up-red:          #d6533f;   /* error, missing (observed as rgba(214,83,63)) */

  /* accent alphas (observed set, orange) */
  --up-orange-70: rgba(254,113,70,.70);
  --up-orange-60: rgba(254,113,70,.60);
  --up-orange-50: rgba(254,113,70,.50);
  --up-orange-45: rgba(254,113,70,.45);
  --up-orange-35: rgba(254,113,70,.35);
  --up-orange-28: rgba(254,113,70,.28);
  --up-orange-22: rgba(254,113,70,.22);
  --up-orange-18: rgba(254,113,70,.18);
  --up-orange-12: rgba(254,113,70,.12);
  --up-orange-10: rgba(254,113,70,.10);
  --up-orange-08: rgba(254,113,70,.08);
  --up-orange-07: rgba(254,113,70,.07);
  --up-blue-32:   rgba(85,116,255,.32);
  --up-blue-18:   rgba(85,116,255,.18);
  --up-blue-08:   rgba(85,116,255,.08);
  --up-yellow-50: rgba(246,197,58,.50);
  --up-yellow-35: rgba(246,197,58,.35);
  --up-yellow-12: rgba(246,197,58,.12);
  --up-green-45:  rgba(63,191,133,.45);
  --up-green-16:  rgba(63,191,133,.16);
  --up-red-45:    rgba(214,83,63,.45);

  /* ---------------------------------------------------------------------
     TYPE (observed)
     --------------------------------------------------------------------- */
  --font-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace; /* derived: the site has no code */

  --weight-regular: 400;
  --weight-medium:  500;   /* every heading and display number */
  --weight-semibold: 600;  /* buttons, labels, eyebrows, bold runs */

  /* fluid display scale (marketing surfaces) */
  --text-display-xl: clamp(52px, 6vw, 88px);      /* .num   lh .95  ls -.055em */
  --text-display-lg: clamp(38px, 4.4vw, 66px);    /* h1     lh 1.02 ls -.045em */
  --text-display:    clamp(34px, 3.9vw, 56px);    /* h2     lh 1.03 ls -.04em  */
  --text-display-sm: clamp(34px, 3.2vw, 46px);    /* .amt   lh 1    ls -.045em */
  --text-heading:    clamp(22px, 2.4vw, 30px);    /* section sub-heads */
  --text-title:      clamp(19px, 1.6vw, 23px);    /* card h3  lh 1.2 ls -.02em */
  --text-lead:       clamp(16.5px, 1.3vw, 19px);  /* p.lead  lh 1.55 */

  /* fixed scale */
  --text-prose:   18px;    /* long-form, lh 1.7 */
  --text-subtitle: 17.5px; /* faq summary, weight 500 */
  --text-body-lg: 16px;    /* lh 1.6 */
  --text-body:    15px;    /* buttons, inputs, tables; card body is 15.5 */
  --text-body-sm: 14px;    /* footer, chat bubbles, lh 1.5 */
  --text-caption: 13.5px;  /* chips, notes */
  --text-small:   13px;    /* form labels, crumbs */
  --text-label:   12.5px;  /* eyebrow, uppercase, ls .14em */
  --text-micro:   12px;    /* table heads, footer labels, ls .12em */
  --text-tiny:    11.5px;  /* status pill, ls .12em */
  --text-nano:    10.5px;  /* mobile step labels */

  /* derived: dense UI scale for the console (not on the site) */
  --text-ui-lg: 15px;
  --text-ui:    14px;
  --text-ui-sm: 13px;
  --text-ui-xs: 12px;

  --leading-display: 1.02;
  --leading-tight:   1.2;
  --leading-snug:    1.35;
  --leading-normal:  1.5;
  --leading-body:    1.55;
  --leading-relaxed: 1.65;
  --leading-prose:   1.7;

  --tracking-display-xl: -.055em;
  --tracking-display:    -.045em;
  --tracking-heading:    -.04em;
  --tracking-title:      -.02em;
  --tracking-normal:     0;
  --tracking-label:      .04em;   /* form labels */
  --tracking-caps:       .12em;   /* uppercase micro labels, status */
  --tracking-caps-wide:  .14em;   /* eyebrow */

  /* ---------------------------------------------------------------------
     SPACE (observed values, regularised to a 2px grid)
     --------------------------------------------------------------------- */
  --space-0:  0;
  --space-1:  2px;
  --space-2:  4px;
  --space-3:  6px;
  --space-4:  8px;
  --space-5:  10px;
  --space-6:  12px;
  --space-7:  14px;
  --space-8:  16px;
  --space-9:  18px;
  --space-10: 20px;
  --space-11: 22px;
  --space-12: 24px;
  --space-14: 28px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-28: 56px;
  --space-32: 64px;

  /* component paddings (observed) */
  --pad-button:   13px 22px;
  --pad-button-sm: 6px 12px;
  --pad-chip:      9px 16px;
  --pad-status:    5px 10px;
  --pad-input:    12px 14px;
  --pad-cell:     18px 20px;        /* .tbl */
  --pad-cell-sm:  12px 14px;        /* .prose table */
  --pad-card:     clamp(22px, 2.4vw, 32px);
  --pad-card-sm:  22px;
  --pad-section:  clamp(80px, 11vw, 150px);
  --pad-gutter:   clamp(18px, 4.5vw, 64px);

  /* measures */
  --width-wrap:    1240px;
  --width-prose:   70ch;
  --width-lead:    640px;
  --width-lead-sm: 480px;
  --width-form:    640px;
  --width-narrow:  560px;
  --width-wide:    820px;
  --width-faq:     900px;
  --width-heading: 18ch;

  /* ---------------------------------------------------------------------
     SHAPE
     --------------------------------------------------------------------- */
  --radius-xs:   4px;     /* 3–5px: tiny marks */
  --radius-sm:   10px;
  --radius-md:   12px;    /* inputs */
  --radius-lg:   14px;    /* chat bubbles */
  --radius-xl:   18px;    /* faq details */
  --radius-2xl:  24px;    /* cards, tables, chat frame */
  --radius-3xl:  26px;    /* hero cover */
  --radius-pill: 999px;   /* buttons, chips, status */
  --radius-full: 50%;
  --radius-bubble-them: 14px 14px 14px 4px;
  --radius-bubble-me:   14px 14px 4px 14px;

  --border-hairline: 1px;
  --border-ring:     1.5px;

  /* ---------------------------------------------------------------------
     MOTION (observed)
     --------------------------------------------------------------------- */
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
  --duration-fast:   .15s;   /* button transform */
  --duration-base:   .2s;    /* chip */
  --duration-medium: .3s;    /* header solidify, fades */
  --duration-slow:   .55s;   /* reveal opacity */
  --duration-slower: .7s;    /* reveal transform */
  --lift-hover: translateY(-2px);
  --blur-glass: 14px;        /* sticky header backdrop */
  --blur-glow:  90px;        /* ambient color blobs, opacity .28 */

  /* ---------------------------------------------------------------------
     BREAKPOINTS (observed max-width queries; for reference in JS/Tailwind)
     --------------------------------------------------------------------- */
  --bp-xs: 560px;
  --bp-sm: 640px;
  --bp-md: 720px;
  --bp-lg: 860px;
  --bp-xl: 1080px;

  /* ---------------------------------------------------------------------
     GRADIENTS (observed)
     --------------------------------------------------------------------- */
  --gradient-spectrum:       linear-gradient(90deg, var(--up-orange), var(--up-yellow), var(--up-blue));
  --gradient-spectrum-4:     linear-gradient(90deg, var(--up-orange), var(--up-yellow), var(--up-blue), var(--up-violet));
  --gradient-spectrum-light: linear-gradient(90deg, var(--up-orange), var(--up-yellow), var(--up-blue-deep), var(--up-violet-deep));
  --gradient-accent-wash:    radial-gradient(110% 110% at 100% 0%, var(--up-orange-22), transparent 60%);
  --gradient-accent-wash-strong: radial-gradient(120% 120% at 0% 0%, rgba(254,113,70,.32), rgba(254,113,70,.04) 60%);
  --gradient-blue-wash:      radial-gradient(100% 140% at 100% 0%, var(--up-blue-32), transparent 60%);
  --gradient-yellow-wash:    linear-gradient(135deg, var(--up-yellow-12), rgba(246,197,58,.02));
  --gradient-duo:            linear-gradient(90deg, var(--up-orange-12), var(--up-blue-08));
}

/* -------------------------------------------------------------------------
   2. SEMANTIC — DARK (default; observed from :root + components)
   ------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  --color-bg:            var(--up-night);
  --color-bg-raised:     var(--up-night-2);
  --color-bg-sunken:     #000;
  --color-surface:       linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); /* --card */
  --color-surface-flat:  rgba(244,241,234,.04);   /* inputs */
  --color-surface-hover: rgba(244,241,234,.07);   /* bubbles, chips bg */
  --color-surface-active: rgba(244,241,234,.08);
  --color-glass:         rgba(11,10,16,.78);      /* sticky header */
  --color-scrim:         rgba(11,10,16,.92);
  --color-scrim-soft:    rgba(11,10,16,.72);

  --color-text:          var(--up-bone);
  --color-text-2:        rgba(244,241,234,.74);
  --color-text-3:        rgba(244,241,234,.50);
  --color-text-4:        rgba(244,241,234,.30);   /* placeholders, disabled (derived) */
  --color-text-inverse:  var(--up-night);

  --color-line:          rgba(244,241,234,.10);
  --color-line-strong:   rgba(244,241,234,.20);
  --color-line-ring:     rgba(244,241,234,.45);   /* ghost button ring */
  --color-line-hairline: rgba(244,241,234,.08);   /* header bottom */
  --color-line-track:    rgba(244,241,234,.16);   /* progress tracks */

  --color-accent:        var(--up-orange);
  --color-accent-hover:  #ff8a66;                 /* derived */
  --color-on-accent:     var(--up-night);
  --color-accent-soft:   var(--up-orange-18);
  --color-accent-wash:   var(--up-orange-07);
  --color-accent-ring:   var(--up-orange-60);
  --color-accent-line:   var(--up-orange-45);

  --color-secondary:     var(--up-blue);
  --color-secondary-soft: var(--up-blue-18);
  --color-tertiary:      var(--up-violet);
  --color-highlight:     var(--up-yellow);

  /* status (observed roles: now=orange, soon=yellow, planned=violet, ok=green, miss=red) */
  --color-ok:            var(--up-green);
  --color-ok-soft:       var(--up-green-16);
  --color-ok-line:       var(--up-green-45);
  --color-warn:          var(--up-yellow);
  --color-warn-soft:     var(--up-yellow-12);
  --color-warn-line:     var(--up-yellow-35);
  --color-bad:           var(--up-red);
  --color-bad-soft:      rgba(214,83,63,.12);     /* derived */
  --color-bad-line:      var(--up-red-45);
  --color-info:          var(--up-blue);
  --color-info-soft:     var(--up-blue-18);
  --color-planned:       var(--up-violet);

  /* buttons */
  --button-bg:           var(--up-bone);
  --button-fg:           var(--up-night);
  --button-ghost-ring:   var(--color-line-ring);
  --button-ghost-fg:     var(--color-text);

  /* chat (observed from the home-page chat mock) */
  --bubble-them-bg:      rgba(244,241,234,.07);
  --bubble-them-fg:      var(--color-text-2);
  --bubble-me-bg:        var(--up-blue-18);
  --bubble-me-fg:        var(--color-text);

  /* tables */
  --table-head-fg:       var(--color-text-3);
  --table-cell-fg:       var(--color-text-2);
  --table-highlight-bg:  var(--up-orange-07);

  /* shadows */
  --shadow-ring:         inset 0 0 0 1px var(--color-line);
  --shadow-ring-strong:  inset 0 0 0 1px var(--color-line-strong);
  --shadow-ghost:        inset 0 0 0 1.5px var(--color-line-ring);
  --shadow-ring-accent:  inset 0 0 0 1.5px var(--color-accent-ring);
  --shadow-ring-ok:      inset 0 0 0 1.5px var(--up-green);
  --shadow-ring-bad:     inset 0 0 0 1px var(--up-red-45);
  --shadow-glow-accent:  0 0 14px var(--up-orange);
  --shadow-glow-warn:    0 0 14px var(--up-yellow);
  --shadow-button-hover: 0 12px 34px var(--up-orange-35);
  --shadow-float:        0 40px 90px rgba(0,0,0,.45);
  --shadow-card:         none;
  --shadow-hairline:     0 1px 0 var(--color-line-hairline);
  --focus-ring:          0 0 0 1.5px var(--up-orange-60);   /* derived: site has no explicit focus style */
}

/* -------------------------------------------------------------------------
   2b. SEMANTIC — LIGHT (observed from body.light + .light overrides)
   ------------------------------------------------------------------------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --color-bg:            var(--up-paper);
    --color-bg-raised:     var(--up-paper-3);
    --color-bg-sunken:     var(--up-paper-5);
    --color-surface:       linear-gradient(180deg, var(--up-paper-3), var(--up-paper-2));
    --color-surface-flat:  rgba(23,21,29,.04);
    --color-surface-hover: rgba(23,21,29,.06);
    --color-surface-active: rgba(23,21,29,.08);
    --color-glass:         rgba(247,242,233,.86);
    --color-scrim:         rgba(247,242,233,.98);
    --color-scrim-soft:    rgba(247,242,233,.80);

    --color-text:          var(--up-night-3);
    --color-text-2:        rgba(23,21,29,.74);
    --color-text-3:        rgba(23,21,29,.52);
    --color-text-4:        rgba(23,21,29,.32);
    --color-text-inverse:  var(--up-paper);

    --color-line:          rgba(23,21,29,.12);
    --color-line-strong:   rgba(23,21,29,.20);
    --color-line-ring:     rgba(23,21,29,.30);
    --color-line-hairline: rgba(23,21,29,.08);
    --color-line-track:    rgba(23,21,29,.14);

    --color-accent-hover:  #e8603a;
    --color-on-accent:     var(--up-paper-3);
    --color-secondary:     var(--up-blue-deep);
    --color-tertiary:      var(--up-violet-deep);
    --color-info:          var(--up-blue-deep);

    --button-bg:           var(--up-night-3);
    --button-fg:           var(--up-paper);
    --button-ghost-ring:   rgba(23,21,29,.30);

    --bubble-them-bg:      rgba(23,21,29,.06);
    --bubble-me-bg:        rgba(53,87,232,.14);

    --table-highlight-bg:  var(--up-orange-08);

    --shadow-button-hover: 0 12px 30px var(--up-orange-28);
    --shadow-card:         0 1px 0 rgba(23,21,29,.03), 0 22px 44px -28px rgba(60,40,20,.28);
    --shadow-float:        0 40px 80px -40px rgba(60,40,20,.45);
    --gradient-spectrum-4: var(--gradient-spectrum-light);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --color-bg:            var(--up-paper);
  --color-bg-raised:     var(--up-paper-3);
  --color-bg-sunken:     var(--up-paper-5);
  --color-surface:       linear-gradient(180deg, var(--up-paper-3), var(--up-paper-2));
  --color-surface-flat:  rgba(23,21,29,.04);
  --color-surface-hover: rgba(23,21,29,.06);
  --color-surface-active: rgba(23,21,29,.08);
  --color-glass:         rgba(247,242,233,.86);
  --color-scrim:         rgba(247,242,233,.98);
  --color-scrim-soft:    rgba(247,242,233,.80);

  --color-text:          var(--up-night-3);
  --color-text-2:        rgba(23,21,29,.74);
  --color-text-3:        rgba(23,21,29,.52);
  --color-text-4:        rgba(23,21,29,.32);
  --color-text-inverse:  var(--up-paper);

  --color-line:          rgba(23,21,29,.12);
  --color-line-strong:   rgba(23,21,29,.20);
  --color-line-ring:     rgba(23,21,29,.30);
  --color-line-hairline: rgba(23,21,29,.08);
  --color-line-track:    rgba(23,21,29,.14);

  --color-accent-hover:  #e8603a;
  --color-on-accent:     var(--up-paper-3);
  --color-secondary:     var(--up-blue-deep);
  --color-tertiary:      var(--up-violet-deep);
  --color-info:          var(--up-blue-deep);

  --button-bg:           var(--up-night-3);
  --button-fg:           var(--up-paper);
  --button-ghost-ring:   rgba(23,21,29,.30);

  --bubble-them-bg:      rgba(23,21,29,.06);
  --bubble-me-bg:        rgba(53,87,232,.14);

  --table-highlight-bg:  var(--up-orange-08);

  --shadow-button-hover: 0 12px 30px var(--up-orange-28);
  --shadow-card:         0 1px 0 rgba(23,21,29,.03), 0 22px 44px -28px rgba(60,40,20,.28);
  --shadow-float:        0 40px 80px -40px rgba(60,40,20,.45);
  --gradient-spectrum-4: var(--gradient-spectrum-light);
}

/* A dark band inside a light page (the site does this for .final and footer). */
.theme-dark-band {
  color-scheme: dark;
  --color-bg: var(--up-night); --color-text: var(--up-bone);
  --color-text-2: rgba(244,241,234,.74); --color-text-3: rgba(244,241,234,.5);
  --color-line: rgba(244,241,234,.1); --button-bg: var(--up-bone); --button-fg: var(--up-night);
  --button-ghost-ring: rgba(244,241,234,.45);
  background: var(--color-bg); color: var(--color-text);
}

/* -------------------------------------------------------------------------
   3. LEGACY ALIASES — the names admin.html uses today. Importing this file
   restyles the current console without touching its CSS. Delete after the
   revamp replaces those names with the --color-* layer.
   ------------------------------------------------------------------------- */
:root {
  --bg:     var(--color-bg);
  --panel:  var(--color-bg-raised);
  --line:   var(--color-line);
  --text:   var(--color-text);
  --muted:  var(--color-text-3);
  --accent: var(--color-accent);
  --ok:     var(--color-ok);
  --warn:   var(--color-warn);
  --bad:    var(--color-bad);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0s; --duration-base: 0s; --duration-medium: 0s; --duration-slow: 0s; --duration-slower: 0s; --lift-hover: none; }
}
