/* Colorteam brand system for product UI (Studio, Team Clock).
   Source: Colorteam Brand Guidelines 2026 (src/public/assets/Colorteam-Brand-Guidelines.pdf) and the brand26 kit.
   One file, two moods:
     light  = Paper. Off-white paper, forest ink, soft low-contrast corner glows (brand26 "fields").
     dark   = Black. True black, forest-tinted panels, lime corner glow (guide p.24 glow texture).
   Load it AFTER an app's own token block: it only redefines the shared semantic names, so every screen picks it up.
   Rules and do's/don'ts: DESIGN.md beside this file. */

/* ---------- Fonts: Inter (replaces SF Pro Display, 2026 update) and Newsreader (accent serif) ---------- */
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/Inter-normal-latin.woff2") format("woff2")}
@font-face{font-family:"Newsreader";font-style:italic;font-weight:200 800;font-display:swap;src:url("fonts/Newsreader-italic-latin.woff2") format("woff2")}

:root{
  /* ---------- Approved palette (guide p.7 Existing, p.8 Exploration). Never add a colour outside this list. ---------- */
  --ct-green:#5DBF2B; --ct-lime:#A8FC78; --ct-yellow:#F5E371; --ct-black:#000000; --ct-white:#FFFFFF;
  --ct-forest:#17483F; --ct-leaf:#83CF55; --ct-sage:#929A92; --ct-soft-yg:#D5E9A8;
  --ct-forest-950:#10302B; --ct-forest-900:#203C34; --ct-forest-700:#1C5B50; --ct-forest-600:#247258; --ct-forest-500:#188A73;
  --ct-lime-300:#C4F298; --ct-lime-400:#BAEE89; --ct-lime-600:#A7E75D;
  --ct-mint-100:#D0ECDD; --ct-olive-100:#D8DEB8; --ct-olive-500:#83975C; --ct-olive-800:#344B39;
  --ct-paper:#F3F4EE; --ct-paper-50:#F8F9F3; --ct-mist:#E8EFE7; --ct-mist-200:#DBE7D9;
  --ct-grey-600:#748076; --ct-grey-900:#252B29;
  --ct-red:#E5322D; /* the guide's own "Incorrect" red: errors only */

  /* Brand gradient (guide p.9): the only gradient allowed in UI fills */
  --ct-gradient-leaf:linear-gradient(90deg,#188A73 0%,#8DD585 100%);

  /* ---------- Type ---------- */
  --font-sans:"Inter","Helvetica Neue",Arial,sans-serif;
  --font-serif:"Newsreader",Georgia,serif;
  --ui:var(--font-sans);
  --tracking-display:-0.035em; --tracking-heading:-0.02em; --tracking-body:-0.005em;

  /* ---------- Shape: squircle marks, rounded boxes, pill labels (guide p.15, p.24, p.37) ---------- */
  --radius-sm:8px; --radius-md:12px; --radius-lg:20px; --radius-xl:28px; --radius-pill:999px;
  --ease-out:cubic-bezier(.2,.7,.2,1); --dur-fast:140ms; --dur-base:240ms;
}

/* ---------- Light: Paper ---------- */
:root,[data-theme=light]{
  --bg:var(--ct-paper); --panel:var(--ct-white); --panel-2:var(--ct-paper-50); --canvas:var(--ct-mist);
  --line:#E1E5DC; --line-2:var(--ct-mist-200); --hover:var(--ct-mist);
  --text:var(--ct-forest-950); --text-2:var(--ct-olive-800); --text-3:var(--ct-grey-600);
  --primary:var(--ct-forest); --primary-ink:var(--ct-white);
  --accent:var(--ct-lime); --on-accent:var(--ct-forest-950);   /* lime is a fill, never text, on paper */
  --accent-text:var(--ct-forest-600);                          /* accent for words and links on paper */
  --sel:var(--ct-forest-500);
  --ok:var(--ct-forest-600); --ok-fill:var(--ct-soft-yg); --bad:var(--ct-red);
  --frame:rgba(16,48,43,.18);                                   /* hairline frames, guide layout pages */
  --block:var(--ct-gradient-leaf);                              /* data fills: sessions, bars */
  --tick:var(--ct-forest-950);
  --shadow:0 1px 2px rgba(16,48,43,.06),0 12px 32px rgba(16,48,43,.08);
  /* Corner glows: low contrast, approved greens and yellow only, fading into paper */
  --glow:
    radial-gradient(42vmax 42vmax at 100% 0%,rgba(196,242,152,.55),transparent 62%),
    radial-gradient(36vmax 36vmax at 0% 100%,rgba(208,236,221,.75),transparent 62%),
    radial-gradient(28vmax 28vmax at 100% 100%,rgba(245,227,113,.22),transparent 60%);
  color-scheme:light;
}

/* ---------- Dark: Black with lime corner glow ---------- */
[data-theme=dark]{
  --bg:var(--ct-black);
  --panel:color-mix(in srgb,var(--ct-forest-950) 55%,var(--ct-black));
  --panel-2:color-mix(in srgb,var(--ct-forest-950) 80%,var(--ct-black));
  --canvas:var(--ct-black);
  --line:rgba(255,255,255,.10); --line-2:rgba(255,255,255,.18); --hover:rgba(168,252,120,.08);
  --text:var(--ct-white); --text-2:rgba(255,255,255,.72); --text-3:var(--ct-sage);
  --primary:var(--ct-lime); --primary-ink:var(--ct-forest-950);
  --accent:var(--ct-lime); --on-accent:var(--ct-forest-950); --accent-text:var(--ct-lime);
  --sel:var(--ct-lime);
  --ok:var(--ct-lime); --ok-fill:rgba(168,252,120,.14); --bad:#FF8A80;
  --frame:rgba(168,252,120,.45);                                /* lime outline frames, guide p.26-29 */
  --block:linear-gradient(90deg,var(--ct-green),var(--ct-lime));
  --tick:var(--ct-white);
  --shadow:0 1px 2px rgba(0,0,0,.5),0 16px 40px rgba(0,0,0,.6);
  --glow:
    radial-gradient(46vmax 46vmax at 100% 0%,rgba(43,227,107,.20),transparent 60%),
    radial-gradient(40vmax 40vmax at 0% 100%,rgba(168,252,120,.12),transparent 62%),
    radial-gradient(30vmax 30vmax at 0% 0%,rgba(24,138,115,.18),transparent 60%);
  color-scheme:dark;
}

/* ---------- Utilities ---------- */
/* Fixed corner glow behind the whole app */
.ct-glow{background-color:var(--bg);background-image:var(--glow);background-attachment:fixed;background-repeat:no-repeat}
/* Pill label: "Correct" / "Incorrect" / "Website" chips from the guide */
.ct-pill{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:0 10px;border-radius:var(--radius-pill);font-size:12px;font-weight:500;line-height:1;white-space:nowrap}
.ct-pill.ok{background:var(--ct-green);color:var(--ct-white)}
.ct-pill.bad{background:var(--ct-red);color:var(--ct-white)}
.ct-pill.lime{background:var(--ct-lime);color:var(--ct-forest-950)}
.ct-pill.line{border:1px solid var(--frame);color:var(--text)}
/* Outline frame: thin rounded box from the layout pages */
.ct-frame{border:1px solid var(--frame);border-radius:var(--radius-lg)}
/* Corner meta labels: "colorteam ... Brand Guidelines ... 2026" */
.ct-meta{font-size:12px;color:var(--text-3);letter-spacing:0}
/* Serif accent: one word in a heading, guide p.2 "Table of Contents" */
.ct-serif{font-family:var(--font-serif);font-style:italic;font-weight:500;letter-spacing:-0.01em}
/* Four-point sparkle, guide p.24 */
.ct-sparkle{display:inline-block;width:1em;height:1em;background:currentColor;
  clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%)}
