/* CallSavvy design tokens: colour, type, spacing, radius, depth and motion.
   Shared by every CallSavvy page. Load before system.css or portal.css. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Brand */
  --cs-accent: #5856d6;
  --cs-accent-hover: #4a48c4;
  --cs-accent-soft: rgba(88, 86, 214, 0.1);
  --cs-on-accent: #ffffff;

  /* Surfaces (grouped background model) */
  --cs-bg: #f5f5f7;
  --cs-bg-elevated: #ffffff;
  --cs-bg-grouped: #ffffff;
  --cs-fill: rgba(120, 120, 128, 0.08);
  --cs-fill-strong: rgba(120, 120, 128, 0.16);

  /* Text */
  --cs-label: #1d1d1f;
  --cs-label-2: #6e6e73;
  --cs-label-3: #8e8e93;

  /* Lines */
  --cs-separator: rgba(60, 60, 67, 0.14);
  --cs-border: rgba(60, 60, 67, 0.2);

  /* Status */
  --cs-green: #248a3d;
  --cs-green-soft: rgba(52, 199, 89, 0.12);
  --cs-orange: #c93400;
  --cs-orange-soft: rgba(255, 149, 0, 0.12);
  --cs-red: #d70015;
  --cs-red-soft: rgba(255, 59, 48, 0.1);

  /* Type */
  --cs-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --cs-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --cs-text-caption: 13px;
  --cs-text-footnote: 14px;
  --cs-text-body: 17px;
  --cs-text-headline: 20px;
  --cs-text-title: 28px;
  --cs-text-large: 40px;

  /* Spacing (8pt grid) */
  --cs-1: 4px;
  --cs-2: 8px;
  --cs-3: 12px;
  --cs-4: 16px;
  --cs-5: 24px;
  --cs-6: 32px;
  --cs-7: 48px;
  --cs-8: 64px;

  /* Shape & depth */
  --cs-radius-sm: 10px;
  --cs-radius: 14px;
  --cs-radius-lg: 22px;
  --cs-radius-pill: 999px;
  --cs-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --cs-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.04), 0 24px 64px rgba(0, 0, 0, 0.1);

  /* Motion */
  --cs-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --cs-fast: 160ms;
  --cs-slow: 320ms;

  --cs-touch: 44px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --cs-accent: #7d7aff;
  --cs-accent-hover: #918eff;
  --cs-accent-soft: rgba(125, 122, 255, 0.16);
  --cs-bg: #161617;
  --cs-bg-elevated: #1f1f21;
  --cs-bg-grouped: #1f1f21;
  --cs-fill: rgba(120, 120, 128, 0.2);
  --cs-fill-strong: rgba(120, 120, 128, 0.32);
  --cs-label: #f5f5f7;
  --cs-label-2: #a1a1a6;
  --cs-label-3: #86868b;
  --cs-separator: rgba(255, 255, 255, 0.1);
  --cs-border: rgba(255, 255, 255, 0.16);
  --cs-green: #30d158;
  --cs-green-soft: rgba(48, 209, 88, 0.16);
  --cs-orange: #ff9f0a;
  --cs-orange-soft: rgba(255, 159, 10, 0.16);
  --cs-red: #ff453a;
  --cs-red-soft: rgba(255, 69, 58, 0.16);
  --cs-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.28);
  --cs-shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --cs-accent: #7d7aff;
    --cs-accent-hover: #918eff;
    --cs-accent-soft: rgba(125, 122, 255, 0.16);
    --cs-bg: #161617;
    --cs-bg-elevated: #1f1f21;
    --cs-bg-grouped: #1f1f21;
    --cs-fill: rgba(120, 120, 128, 0.2);
    --cs-fill-strong: rgba(120, 120, 128, 0.32);
    --cs-label: #f5f5f7;
    --cs-label-2: #a1a1a6;
    --cs-label-3: #86868b;
    --cs-separator: rgba(255, 255, 255, 0.1);
    --cs-border: rgba(255, 255, 255, 0.16);
    --cs-green: #30d158;
    --cs-green-soft: rgba(48, 209, 88, 0.16);
    --cs-orange: #ff9f0a;
    --cs-orange-soft: rgba(255, 159, 10, 0.16);
    --cs-red: #ff453a;
    --cs-red-soft: rgba(255, 69, 58, 0.16);
    --cs-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.28);
    --cs-shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 64px rgba(0, 0, 0, 0.45);
  }
}

/* ---------- Brand logo (light/dark artwork switches with the theme) ---------- */
.cs-logo { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.cs-logo:hover { text-decoration: none; }
.cs-logo img { display: block; width: auto; height: 28px; }
.cs-logo .cs-logo-dark { display: none; }
:root[data-theme="dark"] .cs-logo .cs-logo-light { display: none; }
:root[data-theme="dark"] .cs-logo .cs-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cs-logo .cs-logo-light { display: none; }
  :root:not([data-theme="light"]) .cs-logo .cs-logo-dark { display: block; }
}
/* Beat older ".brand img" square sizing so the wide logo keeps its shape. */
.cs-logo img.cs-logo-light,
.cs-logo img.cs-logo-dark { width: auto; max-width: none; border-radius: 0; object-fit: contain; }
