/* Copied from brand/tokens/promptuary.css on 2026-12-05. Re-copy deliberately when the brand changes. */
/* ==========================================================================
   Promptuary design tokens: the one source of colour, type, radius, shadow
   and motion for every Promptuary app.

   Use it in an app:
     1. Copy this file into the app (e.g. src/styles/promptuary.css), or import
        it by path in a monorepo.
     2. Import it BEFORE Tailwind:   @import "./promptuary.css";
                                     @import "tailwindcss";
     3. Add brand/tokens/tailwind-theme.css to get utilities such as
        bg-surface, text-ink-2 and border-line.
     4. Set the app's facet on <html>: <html data-facet="teal">

   Themes: light (default), .dark, and .high-contrast (works with either).
   Never hard-code a colour in a component; use var(--token).
   Contrast: every text tier was checked against every surface it sits on
   (≥ 4.5:1). See brand/BRAND.md for the ratios.
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- Brand facets: the five faces of the logo cube (exact logo hex) ---- */
  --pr-violet:  #581CF9;   /* AI skills: the primary brand colour */
  --pr-magenta: #EB2C87;   /* Create: visual and creative tools */
  --pr-coral:   #F75153;   /* Focus: time, tasks, attention */
  --pr-amber:   #FEAA02;   /* Knowledge: notes, docs, newsletter */
  --pr-teal:    #21A98D;   /* Dev tools: utilities, data */

  /* Text-safe "ink" variants (≥ 5:1 on white and on --bg-app). Use these for
     text, links and icons on light surfaces. The raw facets are for fills,
     illustrations and charts only. */
  --pr-violet-ink:  #581CF9;
  --pr-magenta-ink: #B8166A;
  --pr-coral-ink:   #C42B2E;
  --pr-amber-ink:   #8A5300;
  --pr-teal-ink:    #0B7560;

  /* The prism: the brand gradient. Use it at most once per screen, on a
     hero accent, a progress bar or a frame. Never put it behind body text. */
  --pr-prism: linear-gradient(120deg, var(--pr-violet) 0%, var(--pr-magenta) 38%, var(--pr-coral) 62%, var(--pr-amber) 100%);
  --pr-prism-cool: linear-gradient(120deg, var(--pr-violet) 0%, var(--pr-teal) 100%);

  /* ---- Surfaces ---- */
  --bg-app:      #F4F3FA;
  --surface:     #FFFFFF;
  --surface-2:   #F8F7FD;
  --surface-3:   #EFEDF8;
  --bg-header:   rgba(255, 255, 255, .82);
  --bg-overlay:  rgba(19, 17, 31, .42);

  /* ---- Lines ---- */
  --border:        #E3E1F0;
  --border-light:  #EEECF7;
  --border-strong: #C9C5DE;

  /* ---- Text tiers: 1 is strongest, 4 faintest (all ≥ 5.2:1 on every light surface) ---- */
  --text-1: #13111F;
  --text-2: #35315A;
  --text-3: #57537A;
  --text-4: #625E80;

  /* ---- Accent. The app's facet sets it (see data-facet below); the default is violet ---- */
  --accent:        var(--pr-violet);
  --accent-ink:    var(--pr-violet-ink);
  --accent-hover:  color-mix(in srgb, var(--accent) 86%, #000);
  --on-accent:     #FFFFFF;
  --accent-soft:   color-mix(in srgb, var(--accent) 8%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-glow:   color-mix(in srgb, var(--accent) 20%, transparent);
  --focus-ring:    0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);

  /* ---- Status ---- */
  --success: #0B7560;  --success-soft: color-mix(in srgb, #21A98D 12%, transparent);
  --warning: #8A5300;  --warning-soft: color-mix(in srgb, #FEAA02 16%, transparent);
  --danger:  #C42B2E;  --danger-soft:  color-mix(in srgb, #F75153 12%, transparent);
  --info:    #581CF9;  --info-soft:    color-mix(in srgb, #581CF9 8%, transparent);

  /* ---- Code ---- */
  --code-bg: #F2F1F9;  --code-border: #DCD9EC;  --code-fg: #2A2650;

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 2px rgba(30, 20, 80, .06), 0 0 0 1px rgba(30, 20, 80, .03);
  --shadow-md: 0 6px 18px -6px rgba(30, 20, 80, .12), 0 2px 4px rgba(30, 20, 80, .04);
  --shadow-lg: 0 18px 44px -12px rgba(30, 20, 80, .18), 0 4px 12px rgba(30, 20, 80, .06);
  --shadow-xl: 0 30px 72px -16px rgba(30, 20, 80, .26), 0 8px 24px rgba(30, 20, 80, .08);
  --shadow-glow: 0 10px 40px -10px var(--accent-glow);

  /* ---- Icon buttons (one round hover everywhere) ---- */
  --icon-hover-bg: color-mix(in srgb, var(--accent) 14%, transparent);
  --icon-hover-fg: var(--accent-ink);

  /* ---- IconPark colour slots (see brand/templates/icons.jsx) ---- */
  --ip-stroke: currentColor;
  --ip-tone: var(--accent);
  --ip-tone-opacity: .3;
  --ip-on-fill: var(--surface);
  --ip-pop: var(--pr-amber);
  --ip-mc-stroke: color-mix(in srgb, var(--accent) 45%, #14102a);
  --ip-mc-fill: var(--accent);
  --ip-mc-inner-stroke: #fff;
  --ip-mc-inner-fill: var(--ip-pop);

  /* ---- Type ---- */
  --font-sans: "Inter", "InterVariable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Display", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-2xs: 11px;  --fs-xs: 12px;  --fs-sm: 13px;  --fs-md: 14px;  --fs-lg: 16px;
  --fs-xl: 20px;   --fs-2xl: 24px; --fs-3xl: 32px; --fs-4xl: 44px; --fs-5xl: 60px; --fs-6xl: 76px;
  --lh-tight: 1.1; --lh-snug: 1.3; --lh-body: 1.6;
  --tracking-display: -0.035em; --tracking-heading: -0.02em; --tracking-caps: 0.08em;

  /* ---- Space (4px grid) ---- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-24: 96px;

  /* ---- Radius ---- */
  --radius-xs: 6px;    /* chips, kbd */
  --radius-sm: 8px;    /* inputs, small buttons */
  --radius-md: 12px;   /* menus, cards, toasts */
  --radius-lg: 18px;   /* panels, dialogs */
  --radius-xl: 28px;   /* hero cards, slides, bento tiles */
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --dur-fast: 120ms;  --dur-base: 200ms;  --dur-slow: 320ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* ---- Layout ---- */
  --container: 1200px;
  --header-h: 56px;

  /* ======================================================================
     shadcn/ui aliases. React Bits, Kokonut UI and Watermelon UI components
     (all shadcn-registry based) read these names, so pasted components
     follow the Promptuary theme with no edits.
     ====================================================================== */
  --background: var(--bg-app);
  --foreground: var(--text-1);
  --card: var(--surface);
  --card-foreground: var(--text-1);
  --popover: var(--surface);
  --popover-foreground: var(--text-1);
  --primary: var(--accent);
  --primary-foreground: var(--on-accent);
  --secondary: var(--surface-3);
  --secondary-foreground: var(--text-2);
  --muted: var(--surface-2);
  --muted-foreground: var(--text-3);
  --destructive: var(--danger);
  --input: var(--border);
  --ring: var(--accent);
  --radius: var(--radius-md);
  --chart-1: var(--pr-violet);
  --chart-2: var(--pr-teal);
  --chart-3: var(--pr-magenta);
  --chart-4: var(--pr-amber);
  --chart-5: var(--pr-coral);
}

/* ---- Facets: each app sets one on <html data-facet="…">. Brand chrome
       (logo, prism) stays the same; only the working accent changes. ---- */
[data-facet="violet"]  { --accent: var(--pr-violet);  --accent-ink: var(--pr-violet-ink);  --on-accent: #FFFFFF; }
/* Magenta: the logo hex #EB2C87 gives white text only 4.0:1, so the working accent is a slightly deeper #D41A75 (5.0:1). */
[data-facet="magenta"] { --accent: #D41A75; --accent-ink: var(--pr-magenta-ink); --on-accent: #FFFFFF; }
[data-facet="coral"]   { --accent: var(--pr-coral);   --accent-ink: var(--pr-coral-ink);   --on-accent: #13111F; }
[data-facet="amber"]   { --accent: var(--pr-amber);   --accent-ink: var(--pr-amber-ink);   --on-accent: #13111F; }
[data-facet="teal"]    { --accent: var(--pr-teal);    --accent-ink: var(--pr-teal-ink);    --on-accent: #13111F; }

/* ==========================================================================
   Dark
   ========================================================================== */
.dark {
  color-scheme: dark;

  --pr-violet-ink:  #9D7BFF;
  --pr-magenta-ink: #FF6BB0;
  --pr-coral-ink:   #FF7D7F;
  --pr-amber-ink:   #FEAA02;
  --pr-teal-ink:    #3DD6B3;

  --bg-app:     #0E0C1A;
  --surface:    #16142A;
  --surface-2:  #1E1B36;
  --surface-3:  #262243;
  --bg-header:  rgba(22, 20, 42, .8);
  --bg-overlay: rgba(4, 3, 10, .62);

  --border:        #2B2748;
  --border-light:  #221F3B;
  --border-strong: #3E3966;

  --text-1: #F3F1FF;
  --text-2: #CAC6E6;
  --text-3: #A6A1C9;
  --text-4: #9893BC;

  --accent-ink: var(--pr-violet-ink);
  --accent-hover: color-mix(in srgb, var(--accent) 82%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 38%, transparent);

  --success: #3DD6B3; --warning: #FEAA02; --danger: #FF7D7F; --info: #9D7BFF;

  --code-bg: #120F24; --code-border: #2B2748; --code-fg: #E4E0FF;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .03);
  --shadow-md: 0 8px 22px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow-lg: 0 22px 50px -14px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .05);
  --shadow-xl: 0 34px 80px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);

  --icon-hover-fg: var(--accent-ink);
  --ip-on-fill: var(--surface);
  --ip-tone-opacity: .4;
  --ip-mc-stroke: color-mix(in srgb, var(--accent) 35%, #fff);
  --ip-mc-inner-stroke: #15112b;
}
.dark[data-facet="violet"],  .dark [data-facet="violet"]  { --accent-ink: #9D7BFF; }
.dark[data-facet="magenta"], .dark [data-facet="magenta"] { --accent-ink: #FF6BB0; }
.dark[data-facet="coral"],   .dark [data-facet="coral"]   { --accent-ink: #FF7D7F; }
.dark[data-facet="amber"],   .dark [data-facet="amber"]   { --accent-ink: #FEAA02; }
.dark[data-facet="teal"],    .dark [data-facet="teal"]    { --accent-ink: #3DD6B3; }

/* ==========================================================================
   High contrast: an independent switch that works with light and dark
   ========================================================================== */
.high-contrast {
  --text-3: var(--text-2);
  --text-4: var(--text-2);
  --border: var(--border-strong);
  --border-light: var(--border-strong);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --pr-prism: var(--accent);           /* solid frames instead of gradients */
  --shadow-glow: none;
}
.high-contrast:not(.dark) { --border-strong: #6E6994; --text-2: #221F40; }
.high-contrast.dark       { --border-strong: #8D88B6; --text-2: #E6E3FA; }

/* ==========================================================================
   Accessibility and motion defaults
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --bg-header: var(--surface); }
  .pr-glass { background: var(--surface) !important; backdrop-filter: none !important; }
}

/* ==========================================================================
   Small shared primitives (optional; apps can use their own components)
   ========================================================================== */
.pr-prism-text { background: var(--pr-prism); -webkit-background-clip: text; background-clip: text; color: transparent; }
.high-contrast .pr-prism-text { color: var(--accent-ink); background: none; }

.pr-glass {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.pr-icon-btn {
  display: inline-grid; place-items: center;
  min-width: 32px; min-height: 32px;
  border-radius: var(--radius-pill);
  color: var(--text-2); background: transparent; border: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.pr-icon-btn:hover, .pr-icon-btn:focus-visible { background: var(--icon-hover-bg); color: var(--icon-hover-fg); }
.pr-icon-btn[data-danger] { --icon-hover-bg: var(--danger-soft); --icon-hover-fg: var(--danger); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-3) 30%, transparent); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }

/* IconPark slot mapping (brand/templates/icons.jsx) */
.ip [stroke="#0a0b01"] { stroke: var(--ip-stroke); }
.ip [fill="#0a0b01"]   { fill: var(--ip-stroke); }
.ip-two-tone [fill="#0a0b02"] { fill: var(--ip-tone); fill-opacity: var(--ip-tone-opacity); }
.ip-two-tone [stroke="#0a0b03"] { stroke: var(--ip-stroke); }
.ip-filled [fill="#0a0b01"] { fill: var(--ip-body, var(--ip-stroke)); }
.ip-filled [fill="#FFF" i]  { fill: var(--ip-on-fill); }
.ip-multi-color [stroke="#0a0b01"] { stroke: var(--ip-mc-stroke); }
.ip-multi-color [fill="#0a0b02"]   { fill: var(--ip-mc-fill); }
.ip-multi-color [stroke="#0a0b03"] { stroke: var(--ip-mc-inner-stroke); }
.ip-multi-color [fill="#0a0b04"]   { fill: var(--ip-mc-inner-fill); }
.i-icon.ip { display: inline-flex; flex: none !important; padding: 0 !important; background: none !important; border: 0 !important; min-width: 0 !important; line-height: 0; }
