/* DARK - the RCS emulator's face (design/starters/dark/rcs.css). Contract version 1.

   Clean, for the night: deep greys, soft light ink, the workspace's colour lightened to glow on dark.

   A STARTER DESIGN (designer-css-plan section 2.6): ours, read-only, loaded and changed and saved as a workspace's own
   design. Written ONLY against the --cv-* tokens and the data-cv-* parts, moments, turns, states and screens of
   design/contract.json - never a class name, never an !important. A design's CSS lands in the cascade layer cv.design (the
   server wraps it; on the go site's stage, Tests/Design/ShotCases.Starters.cs does), so it beats our default bundle
   without a specificity war. url() reaches only this package's own files.

   1. THE TOKENS - on :root (the page around the phone - the bezel, the toast), the phone's screen and the bottom
      sheet: the screen and the sheet declare their own tokens, so a token set on :root alone never reaches the
      phone. They equal manifest.json's tokens, value for value (Tests/Design/StarterLibraryTests).
   2. THE LOOK - every shape, glow, picture and motion is scoped to the conversation's own screen
      ([data-cv-screen="thread"]). A protected screen (confirm, consent, payment, sign-in) and a protected part (the
      verified note, Powered by, a signature, an action's confirm) take COLOURS ONLY, inside the contrast floor - so when
      the locked layer lands (P1) nothing here has to move. Motion runs only when the reader has not asked for less. */

:root,
[data-cv-part="screen"],
[data-cv-part="sheet"] {
  /* reference */
  --cv-color-ink: #e6e8eb;
  --cv-color-paper: #0f1115;
  --cv-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cv-font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cv-radius-s: 8px;
  --cv-radius-m: 12px;
  --cv-radius-l: 18px;
  --cv-shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --cv-shadow-2: 0 4px 12px rgba(0, 0, 0, .45);
  --cv-shadow-3: 0 20px 50px rgba(0, 0, 0, .6);
  --cv-motion-fast: 120ms;
  --cv-motion-slow: 240ms;
  /* semantic */
  --cv-surface: #16191f;
  --cv-on-surface: var(--cv-color-ink);
  --cv-accent: color-mix(in srgb, var(--cv-color-brand) 55%, #ffffff);
  --cv-on-accent: #0f1115;
  --cv-muted: #9aa3ad;
  --cv-danger: #ff8a80;
  --cv-focus: var(--cv-accent);
  --cv-bubble-me-bg: var(--cv-accent);
  --cv-bubble-me-ink: var(--cv-on-accent);
  --cv-bubble-them-bg: #22262e;
  --cv-bubble-them-ink: #e6e8eb;
  --cv-field-font-size: 16px;
  /* component */
  --cv-header-bg: #16191f;
  --cv-header-ink: var(--cv-on-surface);
  --cv-header-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-header-shadow: none;
  --cv-avatar-bg: var(--cv-accent);
  --cv-bubble-radius: var(--cv-radius-l);
  --cv-bubble-tail-radius: var(--cv-radius-s);
  --cv-bubble-font-size: 14.5px;
  --cv-bubble-them-shadow: none;
  --cv-typing-dot: var(--cv-muted);
  --cv-card-radius: var(--cv-radius-l);
  --cv-chip-bg: #16191f;
  --cv-chip-ink: var(--cv-accent);
  --cv-chip-border: #343a44;
  --cv-chip-radius: 999px;
  --cv-chip-hover-bg: color-mix(in srgb, var(--cv-accent) 10%, var(--cv-surface));
  --cv-composer-bg: #1b1f26;
  --cv-composer-ink: var(--cv-on-surface);
  --cv-composer-placeholder-ink: var(--cv-muted);
  --cv-composer-line: color-mix(in srgb, var(--cv-on-surface) 16%, transparent);
  --cv-send-bg: var(--cv-accent);
  --cv-send-ink: var(--cv-on-accent);
  --cv-sheet-bg: var(--cv-surface);
  --cv-sheet-backdrop: rgba(0, 0, 0, .6);
  --cv-verified-bg: color-mix(in srgb, var(--cv-accent) 9%, transparent);
  --cv-verified-ink: var(--cv-muted);
  --cv-verified-icon: var(--cv-accent);
  --cv-verified-shield: var(--cv-accent);
  --cv-daymark-bg: color-mix(in srgb, var(--cv-on-surface) 7%, transparent);
  --cv-daymark-ink: var(--cv-muted);
  --cv-receipt-ink: var(--cv-muted);
  --cv-thread-bg: #0f1115;
  --cv-card-bg: #16191f;
  --cv-card-title-ink: var(--cv-bubble-them-ink);
  --cv-card-text-ink: var(--cv-muted);
  --cv-card-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-card-shadow: var(--cv-shadow-2);
  --cv-card-button-hover-bg: color-mix(in srgb, var(--cv-accent) 8%, transparent);
  --cv-tile-ink: var(--cv-muted);
  --cv-chip-hover-shadow: var(--cv-shadow-1);
  /* the answers as a list: the chips' own dark panel and hairline, the picked one lit with the accent */
  --cv-reply-list-bg: #16191f;
  --cv-reply-list-border: #343a44;
  --cv-reply-list-border-width: 1px;
  --cv-reply-list-shadow: none;
  --cv-reply-list-line: #262b33;
  --cv-reply-list-radius: 14px;
  --cv-reply-list-selected-bg: color-mix(in srgb, var(--cv-accent) 18%, #16191f);
  --cv-reply-list-selected-ink: #e6e8eb;
  --cv-composer-icon-ink: var(--cv-muted);
  --cv-composer-icon-hover-bg: color-mix(in srgb, var(--cv-on-surface) 6%, transparent);
  --cv-composer-shadow: none;
  --cv-home-bar: color-mix(in srgb, var(--cv-on-surface) 30%, transparent);
  --cv-sheet-ink: var(--cv-on-surface);
  --cv-sheet-muted: var(--cv-muted);
  --cv-sheet-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-sheet-row-line: color-mix(in srgb, var(--cv-on-surface) 7%, transparent);
  --cv-sheet-row-hover: color-mix(in srgb, var(--cv-accent) 7%, var(--cv-surface));
  --cv-sheet-field: color-mix(in srgb, var(--cv-on-surface) 22%, transparent);
  --cv-toast-bg: var(--cv-on-surface);
  --cv-toast-ink: var(--cv-surface);
  --cv-toast-line: transparent;
  --cv-toast-shadow: var(--cv-shadow-3);
  --cv-device-bezel: linear-gradient(150deg, #3a3f47 0%, #1b1e23 40%, #0f1115 60%, #2d3138 100%);
  --cv-device-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -24px rgba(0, 0, 0, .8);
}

/* ── Dark ─────────────────────────────────────────────────────────────────────────────────────── */

[data-cv-part="header"] { border-bottom: 1px solid #262b33; }
[data-cv-part="brand-name"] { font-weight: 600; }
