/* TallyReel tokens: the one source for every app (web, Studio). Night and Day colours, shadows and grounds.
   Web imports this in apps/web/src/app/globals.css; Studio gets a synced copy (static/tokens.css). Edit here only. */

/*
 * TallyReel's look: "Night" and "Day". Quiet grounds, hairline borders, soft shadows. One accent, gold (2026-11-11,
 * chosen in the dev theme studio): the main button is gold (--commit) and accent words are gold (--accent-text, darker
 * in Day). Selected chips, tabs and the place you are on stay quiet (--signal: warm white in Night, slate ink in Day).
 * Night is a plain grey near-black; Day is a plain soft off-white (no grid, wash or glow since 2026-11-15). The logo
 * keeps its orange (--logo-reel). Words and icons in the accent use --accent-text (the .text-accent override below).
 *
 * Token names are the ones every screen already uses: ground = page, surface = card, surface-2 = trays and hovers,
 * side = sidebar, accent = ink, commit = the primary button, ok / warn / bad = status. Dark follows the system
 * unless data-theme says otherwise.
 */

:root {
  color-scheme: light;

  /* Day ("Calm"): a plain soft off-white page, white cards on it, slate ink. */
  --ground: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eeeff1;
  --surface-3: #e4e5e7;
  --side: #f7f8fa;
  --well: #fbfbf9;
  /* A pill or tab lifted out of a tray. */
  --raised: #ffffff;
  --line: #e3e4e6;
  --line-hi: #d2d3d5;
  /* Edges of text boxes and search pills: 3:1 against the page so a field can be found. */
  --field-edge: #7a838d;
  --dot: #e6e4df;
  /* The make workspace in Day: one white sheet with hairlines, so grey only ever means a control or a hover. */
  --work: #fbfbf9;
  --work-2: #f1f2f4;
  --work-3: #e5e6e8;

  --ink: #1e2a32;
  --ink-2: #45525c;
  --muted: #5d6872;
  --on-note: rgba(23, 24, 28, 0.72);

  /* --accent is ink (chips and fills that sit quiet); --accent-text is the gold for words. --logo-reel is the logo's orange. */
  --accent: #1e2a32;
  --accent-hi: #2f3d47;
  --accent-text: #735529;
  --logo-reel: #c7450c;
  --logo-reel-ink: #ffffff;
  --logo-reel-hi: #b03c08;
  --accent-ink: #ffffff;
  --accent-soft: #ecedef;

  /* The one primary button: gold, dark ink on it, in Day and Night. --commit-deep is the gold dark enough for words. */
  --commit: #d4a94f;
  --commit-hi: #d9b367;
  --commit-ink: #111214;
  --commit-deep: #735529;
  /* The main button and accent words on the dark areas (Home's hero, Create), the same in Day and Night. */
  --dark-commit: #d4a94f;
  --dark-commit-hi: #d9b367;
  --dark-commit-ink: #16120c;
  --dark-accent: #f0b55e;
  --dark-accent-hi: #f5c67e;
  /* Rings, dots, fills for the current place and selected chips: ink in Day, warm white in Night. Never the gold. */
  --signal: #1e2a32;
  --focus: #735529;
  --on-signal: #ffffff;
  /* Paying only (Button "go"): a deep copper, white text 5:1. The same in light and dark. */
  --buy: #b84f26;
  --buy-hi: #c4582c;
  --buy-edge: #9a4220;

  /* Status only, kept quiet. */
  --ok: #2b724f;
  --ok-ink: #ffffff;
  --ok-deep: #2b724f;
  --ok-soft: #e6f2ec;
  --warn: #7a5f1c;
  --warn-soft: #f6efdd;
  --bad: #a84138;
  --bad-soft: #f8e9e6;

  /* Good hours. */
  --peak: #735529;
  --peak-soft: #ecedef;

  /* The old pastel chips are retired: they now read as quiet neutrals, all neutral. */
  --peach: #eeede9;
  --butter: #e7e9ec;
  --mint: #e6f2ec;
  --sky: #e7e9ec;
  --lilac: #e7e9ec;
  --rose: #e7e9ec;
  --butter-ink: #43454c;
  --sky-ink: #43454c;
  --peach-ink: #1e2a32;
  /* The Voices stage: a dark card in both themes. */
  --stage: #1e2a32;
  --stage-ink: #f0f1f3;
  --stage-muted: #a9b3bb;
  --stage-line: rgba(255, 255, 255, 0.14);
  --mint-ink: #2b724f;
  --lilac-ink: #43454c;
  --rose-ink: #43454c;

  --scrim: rgba(23, 24, 28, 0.45);
  --tape: rgba(255, 255, 255, 0.72);
  --glass: rgba(255, 255, 255, 0.9);
  --toast: #17181c;
  --toast-ok: #a6e3bd;
  --toast-bad: #ffb4ab;

  /* Nothing behind the page: the videos carry the colour. */
  --art: none;
  --art-size: auto;

  /* The UI scale (design/ui-audit, 2026-11-15). Depth is two shadows: raised (a tab, a toggle) and pop (menus,
     dialogs, the notch). Cards are set apart by an edge, not a shadow. The old names point at these two. */
  --raise-shadow: 0 1px 2px rgba(23, 24, 28, 0.06), 0 1px 1px rgba(23, 24, 28, 0.04);
  --pop-shadow: 0 2px 4px rgba(23, 24, 28, 0.06), 0 30px 70px -22px rgba(23, 24, 28, 0.32);
  --shadow-sm: var(--raise-shadow);
  --note-shadow: var(--raise-shadow);
  --note-shadow-hi: var(--raise-shadow);
  --print-shadow: var(--raise-shadow);
  --bar-shadow: var(--pop-shadow);

  /* One content width for app pages, a narrower one for reading pages (Settings forms). */
  --page-w: 1200px;
  --read-w: 720px;

  /* The notch is a dark island in both themes. */
  --notch: #0b0b0c;
  --notch-field: #18191b;
  --notch-ink: #e2e3e5;
  --notch-ink-2: #c9cacc;
  --notch-muted: #a2a3a5;
  --notch-faint: #838486;
  --notch-accent: #ffffff;
  --notch-hand: #ffe08a;
  --notch-ok: #9fdcb5;
  --shadow-color: 23 24 28;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Night: written twice, once for "follow the system", once for "dark, on purpose". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --ground: #0c0d0f;
    --surface: #131416;
    --surface-2: #1b1c1e;
    --surface-3: #232426;
    --side: #060709;
    --well: #08090b;
    --raised: #1b1c1e;
    --line: #1b1c1e;
    --line-hi: #292a2c;
    --field-edge: #7f8082;
    --dot: #1e1c1a;
    --work: #131416;
    --work-2: #1b1c1e;
    --work-3: #232426;

    --ink: #e5e6e8;
    --ink-2: #b4b5b7;
    --muted: #898a8c;
    --on-note: rgba(243, 241, 238, 0.74);

    --accent: #e5e6e8;
    --accent-hi: #ffffff;
    --accent-text: #f0b55e;
    --logo-reel: #ff7a45;
    --logo-reel-ink: #2a1206;
    --logo-reel-hi: #ff8d5e;
    --accent-ink: #0f0d0b;
    --accent-soft: #1b1c1e;

    --commit: #d4a94f;
    --commit-hi: #d9b367;
    --commit-ink: #111214;
    --commit-deep: #d4a94f;
    --signal: #e8e6e2;
    --focus: #f0b55e;
    --on-signal: #0f0d0b;

    --ok: #7fc9a3;
    --ok-ink: #0d1f16;
    --ok-deep: #7fc9a3;
    --ok-soft: #1f2e27;
    --warn: #e6cf8f;
    --warn-soft: #2e2a1c;
    --bad: #e58a80;
    --bad-soft: #33211f;

    --peak: #f0b55e;
    --peak-soft: #1b1c1e;

    --peach: #1e1c1a;
    --butter: #161412;
    --mint: #1f2e27;
    --sky: #161412;
    --lilac: #161412;
    --rose: #161412;
    --butter-ink: #c7c4cf;
    --sky-ink: #c7c4cf;
    --peach-ink: #eceff4;
    --stage: #060709;
    --stage-ink: #f0f1f3;
    --stage-muted: #a9b3bb;
    --stage-line: rgba(255, 255, 255, 0.1);
    --mint-ink: #7fc9a3;
    --lilac-ink: #c7c4cf;
    --rose-ink: #c7c4cf;

    --scrim: rgba(0, 0, 0, 0.6);
    --tape: rgba(255, 255, 255, 0.14);
    --glass: rgba(18, 18, 20, 0.9);
    --toast: #1e1c1a;

    --art: none;
    --art-size: auto;

    --raise-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --pop-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  }
}
:root[data-theme="dark"],
[data-theme="dark"] {
  color-scheme: dark;

  --ground: #0c0d0f;
  --surface: #131416;
  --surface-2: #1b1c1e;
  --surface-3: #232426;
  --side: #060709;
  --well: #08090b;
  --raised: #1b1c1e;
  --line: #1b1c1e;
  --line-hi: #292a2c;
  --field-edge: #7f8082;
  --dot: #1e1c1a;
  --work: #131416;
  --work-2: #1b1c1e;
  --work-3: #232426;

  --ink: #e5e6e8;
  --ink-2: #b4b5b7;
  --muted: #898a8c;
  --on-note: rgba(243, 241, 238, 0.74);

  --accent: #e5e6e8;
  --accent-hi: #ffffff;
  --accent-text: #f0b55e;
  --logo-reel: #ff7a45;
  --logo-reel-ink: #2a1206;
  --logo-reel-hi: #ff8d5e;
  --accent-ink: #0f0d0b;
  --accent-soft: #1b1c1e;

  --commit: #d4a94f;
  --commit-hi: #d9b367;
  --commit-ink: #111214;
  --commit-deep: #d4a94f;
  --signal: #e8e6e2;
  --focus: #f0b55e;
  --on-signal: #0f0d0b;

  --ok: #7fc9a3;
  --ok-ink: #0d1f16;
  --ok-deep: #7fc9a3;
  --ok-soft: #1f2e27;
  --warn: #e6cf8f;
  --warn-soft: #2e2a1c;
  --bad: #e58a80;
  --bad-soft: #33211f;

  --peak: #f0b55e;
  --peak-soft: #1b1c1e;

  --peach: #1e1c1a;
  --butter: #161412;
  --mint: #1f2e27;
  --sky: #161412;
  --lilac: #161412;
  --rose: #161412;
  --butter-ink: #c7c4cf;
  --sky-ink: #c7c4cf;
  --peach-ink: #eceff4;
  --stage: #060709;
  --stage-ink: #f0f1f3;
  --stage-muted: #a9b3bb;
  --stage-line: rgba(255, 255, 255, 0.1);
  --mint-ink: #7fc9a3;
  --lilac-ink: #c7c4cf;
  --rose-ink: #c7c4cf;

  --scrim: rgba(0, 0, 0, 0.6);
  --tape: rgba(255, 255, 255, 0.14);
  --glass: rgba(18, 18, 20, 0.9);
  --toast: #1e1c1a;

  --art: none;
  --art-size: auto;

  --raise-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --pop-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}
