/* Riti UI v1 — tokens. Extracted from the approved "Unbound" prototype (prototype/ui/unbound/app.css).
   Clean white canvas; colour lives inside components and always means something (levels, roles, formats, agents).
   Faces: Geist (variable 100–900; latin-ext file carries ₹), Instrument Serif italic as a one-word voice, Plex Mono.
   Theme: follows prefers-color-scheme; data-theme="light|dark" on any element forces it for that subtree.
   Self-hosted fonts only (no third-party network); licences sit next to the files in fonts/. */

@font-face { font-family: 'Geist'; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Geist'; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-display: swap; src: url(fonts/instrument-serif-italic.woff2) format('woff2'); }
@font-face { font-family: 'Plex Mono'; font-weight: 400; font-display: swap; src: url(fonts/plex-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'Plex Mono'; font-weight: 500; font-display: swap; src: url(fonts/plex-mono-500.woff2) format('woff2'); }

:root, [data-theme='light'] {
  color-scheme: light;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --voice: 'Instrument Serif', Georgia, serif;
  --mono: 'Plex Mono', ui-monospace, monospace;

  --bg: #ffffff; --bg-2: #f7f7f8; --bg-3: #efeff1; --lift: #ffffff;
  --ink: #0b0b0d; --ink-2: #4b4d55; --ink-3: #6a6d76;
  --line: #e6e6ea; --line-2: #d5d6db;
  --shadow-1: 0 1px 2px rgba(10,10,15,.06), 0 1px 1px rgba(10,10,15,.04);
  --shadow-2: 0 2px 4px rgba(10,10,15,.04), 0 12px 32px -8px rgba(10,10,15,.18);
  --shadow-3: 0 4px 8px rgba(10,10,15,.06), 0 24px 64px -12px rgba(10,10,15,.28);
  --focus: #2b5cff;
  --primary: #0b0b0d; --on-primary: #ffffff;
  --live: #2b5cff;
  --on-ag: #ffffff;
  --toast-bg: #111114; --toast-ink: #f4f4f6; --toast-sub: #b9bbc4; --toast-btn: #2a2a31; --toast-btn-h: #3a3a43; --toast-btn-ink: #fff;
  --scrim: rgba(10,10,15,.32);
  /* avatar hues */
  --av1: #2049d6; --av2: #b0306a; --av3: #14703f; --av4: #7038b8; --av5: #9e4724; --av6: #0b6f86; /* each ≥ 4.5:1 on its own 13% wash (audit #47) */
  /* sharing levels: ink (text-safe on its wash) + wash */
  --everyone: #c4232b;   --everyone-w: #fdecec;
  --code: #8a5300;       --code-w: #fff3dc;
  --conn: #17794a;       --conn-w: #e6f6ed;
  --conncode: #7038b8;   --conncode-w: #f3ecfc;
  --me: #4a5160;         --me-w: #eef0f3;
  /* roles */
  --editor: #2049d6; --editor-w: #eaf0ff;
  --commenter: #b0306a; --commenter-w: #fdedf4;
  --viewer: #4a5160; --viewer-w: #eef0f3;
  /* formats (purpose map) */
  --f-page: #2b58d6; --f-deck: #c2410c; --f-sheet: #0d7a48; --f-plan: #7a35e6; --f-tracker: #b3205a; --f-card: #9a5b00; --f-gallery: #0b6f86; --f-canvas: #4651c8;
  --good: #17794a; --bad: #c4232b; --warn: #8a5300;
  --hl: #ffe9a8; --hl-strong: #ffd866;
  --light-1: #fff6c9; --light-2: #ffd75e; --light-3: #f0a020; /* the warm light behind an open door */

  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 22px;
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.067, 1.099 24.3%, 1.108 26%, 1.103, 1.084 30.9%, 1.008 39.5%, 0.987 44.4%, 0.985 47.6%, 0.999 59.7%, 1.003 67.5%, 1);
  --spring-soft: linear(0, 0.06 4%, 0.25 9%, 0.62 18%, 0.87 27%, 0.99 36%, 1.03 44%, 1.02 55%, 1);
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* dark: forced by data-theme, or chosen by the system when nothing forces light */
[data-theme='dark'] { color-scheme: dark;
  --bg: #0b0b0d; --bg-2: #131317; --bg-3: #1b1b21; --lift: #17171c;
  --ink: #f4f4f6; --ink-2: #b9bbc4; --ink-3: #9a9ca6; --line: #26262d; --line-2: #34343c;
  --shadow-1: 0 1px 2px rgba(0,0,0,.5); --shadow-2: 0 12px 32px -8px rgba(0,0,0,.7), 0 0 0 1px #26262d; --shadow-3: 0 24px 64px -12px rgba(0,0,0,.8), 0 0 0 1px #2c2c33;
  --focus: #7c9bff; --primary: #f4f4f6; --on-primary: #0b0b0d; --live: #7c9bff; --on-ag: #0b0b0d;
  --toast-bg: #f4f4f6; --toast-ink: #0b0b0d; --toast-sub: #4b4d55; --toast-btn: #e2e2e6; --toast-btn-h: #d2d2d8; --toast-btn-ink: #0b0b0d;
  --scrim: rgba(0,0,0,.55);
  --av1: #8fb0ff; --av2: #ff8fbf; --av3: #6fd6a0; --av4: #c4a1ff; --av5: #f0a07a; --av6: #67d3e6;
  --everyone: #ff8a8a; --everyone-w: #2c1517; --code: #f5bf5c; --code-w: #2a2010; --conn: #6fd6a0; --conn-w: #10251a;
  --conncode: #c4a1ff; --conncode-w: #221832; --me: #b8bfcc; --me-w: #1d2026;
  --editor: #8fb0ff; --editor-w: #151d33; --commenter: #ff8fbf; --commenter-w: #2b1520; --viewer: #b8bfcc; --viewer-w: #1d2026;
  --f-page: #8fb0ff; --f-deck: #ff9a66; --f-sheet: #6fd6a0; --f-plan: #c4a1ff; --f-tracker: #ff8fb6; --f-card: #f2c25a; --f-gallery: #67d3e6; --f-canvas: #a3abff;
  --good: #6fd6a0; --bad: #ff8a8a; --warn: #f5bf5c;
  --hl: #4a3d12; --hl-strong: #6b5512;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { color-scheme: dark;
  --bg: #0b0b0d; --bg-2: #131317; --bg-3: #1b1b21; --lift: #17171c;
  --ink: #f4f4f6; --ink-2: #b9bbc4; --ink-3: #9a9ca6; --line: #26262d; --line-2: #34343c;
  --shadow-1: 0 1px 2px rgba(0,0,0,.5); --shadow-2: 0 12px 32px -8px rgba(0,0,0,.7), 0 0 0 1px #26262d; --shadow-3: 0 24px 64px -12px rgba(0,0,0,.8), 0 0 0 1px #2c2c33;
  --focus: #7c9bff; --primary: #f4f4f6; --on-primary: #0b0b0d; --live: #7c9bff; --on-ag: #0b0b0d;
  --toast-bg: #f4f4f6; --toast-ink: #0b0b0d; --toast-sub: #4b4d55; --toast-btn: #e2e2e6; --toast-btn-h: #d2d2d8; --toast-btn-ink: #0b0b0d;
  --scrim: rgba(0,0,0,.55);
  --av1: #8fb0ff; --av2: #ff8fbf; --av3: #6fd6a0; --av4: #c4a1ff; --av5: #f0a07a; --av6: #67d3e6;
  --everyone: #ff8a8a; --everyone-w: #2c1517; --code: #f5bf5c; --code-w: #2a2010; --conn: #6fd6a0; --conn-w: #10251a;
  --conncode: #c4a1ff; --conncode-w: #221832; --me: #b8bfcc; --me-w: #1d2026;
  --editor: #8fb0ff; --editor-w: #151d33; --commenter: #ff8fbf; --commenter-w: #2b1520; --viewer: #b8bfcc; --viewer-w: #1d2026;
  --f-page: #8fb0ff; --f-deck: #ff9a66; --f-sheet: #6fd6a0; --f-plan: #c4a1ff; --f-tracker: #ff8fb6; --f-card: #f2c25a; --f-gallery: #67d3e6; --f-canvas: #a3abff;
  --good: #6fd6a0; --bad: #ff8a8a; --warn: #f5bf5c;
  --hl: #4a3d12; --hl-strong: #6b5512; } }
