/* [CLIENT]'s colours and type tokens, as the existing StageBoard application
 * defines them in client/src/index.css (stageboard repository, commit 76e3045,
 * lines 73 to 225). Copied for build plan task T1.27 (EPIC §4, Q15b); every
 * value is unchanged. Two changes from the source: the light set's selector is
 * ":root" alone, as the whiteboard surface ".sg-wall" it also named does not
 * carry (Q1); and the "@layer base" wrapper is left out. Colours written as three
 * numbers are HSL, used as hsl(var(--token)); the --sg-* brand literals are hex.
 * The fonts are declared in fonts/fonts.css. */

:root {
  /* ---- The brand, as literals ----
     Kept alongside the semantic tokens because a few surfaces (the paper
     chrome, the stamp) want the exact brand value rather than a role. */
  --sg-ink: #1e1d1a;
  --sg-paper: #f6f5f3;
  --sg-bone: #e3d8c6;

  /* ---- Surfaces (layered from page → most-elevated) ----
     ~29-point lightness spread (70% → 98.5%) so each layer is tonally
     distinct: sunken wells sit below the page, the page below cards,
     cards below dialogs. */
  --bg-base: 40 5% 78%; /* #cac8c4 — the hero's concrete, the page ground */
  --bg-surface: 40 14% 96%; /* #f6f5f3 — cards / columns (warm paper) */
  --bg-elevated: 40 30% 98.5%; /* #fcfbf9 — dialogs, popovers (extra shadow) */
  --bg-sunken: 40 5% 70%; /* #b7b4b0 — inputs, pressed states */
  --bg-subtle: 40 5% 74%; /* #c0bdb9 — subtle hover / inset */

  /* ---- Foreground ---- */
  --fg-primary: 40 8% 11%; /* #1e1d1a — the brand ink, 10.1:1 on bg-base */
  --fg-secondary: 40 6% 25%; /* #43413d — secondary text, 6.1:1 */
  --fg-muted: 40 5% 32%; /* #56534d — meta / placeholder, 4.6:1 */
  --fg-on-accent: 37 34% 83%; /* bone lettering on an ink plate */

  /* ---- Borders ---- */
  --border-subtle: 40 6% 68%; /* #b2afa8 — default divider */
  --border-strong: 40 6% 44%; /* #77726a — input outlines, 3.1:1 on base */

  /* ---- Accent / brand ----
     Ink, lettered in bone — the portal's live tile. No hue: the identity is
     carried by value and by the one warm off-white. */
  --accent-1: 40 8% 13%; /* #24221f — 9.4:1 on bg-base */
  --accent-1-hover: 40 8% 22%; /* #3d3a34 — lifts in value, never shifts hue */
  --accent-1-pressed: 40 10% 6%; /* #111008 */
  --accent-1-fg: 37 34% 83%; /* #e3d8c6 — bone, 11.4:1 on the ink fill */
  --accent-1-soft: 37 38% 87%; /* #eee3d2 — bone wash for accent surfaces */

  /* ---- Status ----
     Muted to sit inside a monochrome interface; danger is the address
     cards' felt pen, so the loudest colour on screen is one already on
     the wall. */
  --success: 150 45% 24%; /* #215932 — 4.9:1 on bg-base */
  --success-fg: 40 20% 96%;
  --warning: 36 70% 26%; /* #714c14 — 4.6:1 on bg-base */
  --warning-fg: 40 20% 96%;
  --danger: 6 76% 39%; /* #af2718 — the red felt pen. Measured in Chromium (T4.48, issue 298, 26 Nov 2026), not the 4.8:1
     this comment said: 4.0:1 on bg-base, under QA1's 4.5:1, and 6.2:1 on bg-surface. Every red text measured, in the 27 screen
     states that draw one, sits on a card (bg-surface), none on the page ground. */
  --danger-fg: 40 20% 96%;

  /* ---- Focus ring ----
     The front door outlines focus in solid ink (portal.css `:focus-visible`).
     Same here: on a low-chroma page ink is the most visible thing there is. */
  --focus-ring: 40 10% 18%;

  /* ---- Neumorphic shadow tuning (deltas above/below current surface) ----
     Neumorphism only reads if both edges are visible: the mid-tone page
     makes the white highlight land, and the dark edge needs enough alpha
     to register against it. The dark edge is warm, not slate, or the
     shadows pull the whole page back toward blue. */
  --neo-light-edge: 255, 253, 249; /* highlight colour (RGB triplet) */
  --neo-light-alpha: 0.9; /* light edge strength */
  --neo-dark-edge: 46, 42, 36; /* shadow colour (RGB triplet — warm ink) */
  --neo-dark-alpha: 0.22; /* dark edge strength */

  /* ---- Shadcn aliases (preserved for existing utility/component usage) ---- */
  --background: var(--bg-base);
  --foreground: var(--fg-primary);
  --card: var(--bg-surface);
  --card-foreground: var(--fg-primary);
  --popover: var(--bg-elevated);
  --popover-foreground: var(--fg-primary);
  --primary: var(--accent-1);
  --primary-foreground: var(--accent-1-fg);
  --secondary: var(--bg-sunken);
  --secondary-foreground: var(--fg-secondary);
  --muted: var(--bg-subtle);
  --muted-foreground: var(--fg-muted);
  --accent: var(--accent-1);
  --accent-foreground: var(--accent-1-fg);
  --destructive: var(--danger);
  --destructive-foreground: var(--danger-fg);
  --border: var(--border-subtle);
  --input: var(--border-strong);
  --ring: var(--focus-ring);
  /* Square-ish. The front door is built from hard rectangles, octagons and
     true circles — nothing on it has a soft corner, and a 1rem radius made
     the application read as a different, rounder product. */
  --radius: 0.375rem;

  /* TaskWarnings + matching task borders (kept as separate tokens for the
     inline-border helper at @/lib/task-warning-border). */
  --warning-accent: 36 74% 42%;
  --toast-overdue-accent: 6 72% 46%;
  --toast-info-accent: 40 8% 24%;

  --font-sans: 'Montserrat', sans-serif;
  --font-display: 'Montserrat', sans-serif;

  color-scheme: light;
}

.dark {
  /* Same three brand literals; ink and paper trade places. */
  --sg-ink: #181715;
  --sg-paper: #f7f5f1;
  --sg-bone: #e3d8c6;

  /* ---- Surfaces ---- */
  --bg-base: 40 6% 9%; /* #181715 — warm ink, NOT pitch black */
  --bg-surface: 40 6% 14%; /* #262421 — cards, clearly above page */
  --bg-elevated: 40 6% 19%; /* #33302c — dialogs / popovers */
  --bg-sunken: 40 8% 6%; /* #100f0d — inputs, pressed wells */
  --bg-subtle: 40 6% 17%; /* #2d2a27 — subtle hover */

  /* ---- Foreground ---- */
  --fg-primary: 40 20% 96%; /* #f7f5f1 — 17.9:1 on bg-base */
  --fg-secondary: 40 12% 80%; /* #d2ccc4 — 11.7:1 */
  --fg-muted: 40 8% 62%; /* #a8a197 — 7.2:1 */
  --fg-on-accent: 40 10% 10%; /* ink lettering on a bone plate */

  /* ---- Borders ---- */
  --border-subtle: 40 7% 26%; /* #47433d */
  --border-strong: 40 7% 44%; /* #786f65 */

  /* ---- Accent — the same pairing, inverted: bone plate, ink lettering.
     Bone is the office colour in both themes, which is what makes the
     toggle feel like the lights going down rather than a different app. */
  --accent-1: 37 34% 83%; /* #e3d8c6 — 13.2:1 on bg-base */
  --accent-1-hover: 37 42% 89%; /* #f0e8db */
  --accent-1-pressed: 37 28% 73%; /* #ccbfa9 */
  --accent-1-fg: 40 10% 10%; /* #1c1a17 */
  --accent-1-soft: 37 16% 22%; /* #413a30 — bone-tinted surface */

  /* ---- Status (lifted for dark surfaces, hues unchanged) ---- */
  --success: 150 38% 58%; /* #6cbd90 */
  --success-fg: 40 10% 10%;
  --warning: 36 66% 62%; /* #dda65e */
  --warning-fg: 40 10% 10%;
  --danger: 6 72% 64%; /* #e56e61 — the felt pen, lifted. Measured in Chromium (T4.48): 5.7:1 on bg-base and 5.0:1 on
     bg-surface, where every red text measured sits. */
  --danger-fg: 40 10% 10%;

  /* ---- Focus ring — bone, the brightest thing on an ink page ---- */
  --focus-ring: 37 52% 80%;

  /* ---- Neumorphic shadows re-tuned for near-black surfaces ---- */
  --neo-light-edge: 255, 250, 240;
  --neo-light-alpha: 0.05;
  --neo-dark-edge: 0, 0, 0;
  --neo-dark-alpha: 0.45;

  color-scheme: dark;
}
}
