/* Recapture design tokens: the ONE token file for every Recapture surface (Mack, Nov 26 2026: "the same theme throughout
   all our products", the native SwiftUI iPhone look). Values come from the iOS app, which is the source of truth:
   apps/ios/RecaptureKit/Sources/RecaptureUI/Theme.swift (enum Brand L12-23, CardModifier L37-46, Pill L59-73,
   BigButtonStyle L75-102). Do not invent colors or sizes here; if the web needs something the app has no value for,
   derive it from these and say so where it is used.

   Load order: this file first, then /ios-kit.css (components), then each surface's own CSS, which reads these
   variables (legacy names like cockpit.css --bg or crm.css --c-bg are re-pointed at them, never the other way round).

   Themes: light is :root; dark is html[data-theme="dark"]. Every page sets that attribute before its first paint from
   the device (prefers-color-scheme) unless the Appearance switch saved a choice (localStorage "rc-theme"); see
   THEME_SCRIPT in app/pwa-head.js. There is no locked-dark page any more: staff pages follow the device too.

   Names: the --ios-* names already used by ios-kit.css, ios-look.css and the tests, plus one alias per Theme.swift
   Brand color (--ios-card, --ios-text, --ios-muted, --ios-hairline, --ios-warn, --ios-soft, --ios-gold, --ios-on-accent). */

:root{
  /* System font: San Francisco on Apple devices, the platform UI font elsewhere. No web font (Inter is retired). */
  --ios-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display",system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --ios-font-display:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --ios-font-mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;
  /* The 11 iOS text styles at Dynamic Type "Large" (the default), in rem so they follow the browser and OS text size:
     largeTitle 34/41, title1 28/34, title2 22/28, title3 20/25, headline 17/22, body 17/22, callout 16/21,
     subheadline 15/20, footnote 13/18, caption 12/16, caption2 11/13 (points = CSS px at 16px per rem). */
  --ios-large-title:700 2.125rem/2.5625rem var(--ios-font-display);
  --ios-title1:700 1.75rem/2.125rem var(--ios-font-display);
  --ios-title2:700 1.375rem/1.75rem var(--ios-font-display);
  --ios-title3:600 1.25rem/1.5625rem var(--ios-font-display);
  --ios-headline:600 1.0625rem/1.375rem var(--ios-font);
  --ios-body:400 1.0625rem/1.375rem var(--ios-font);
  --ios-callout:400 1rem/1.3125rem var(--ios-font);
  --ios-subhead:400 .9375rem/1.25rem var(--ios-font);
  --ios-footnote:400 .8125rem/1.125rem var(--ios-font);
  --ios-caption1:400 .75rem/1rem var(--ios-font);
  --ios-caption2:500 .6875rem/.8125rem var(--ios-font);

  /* ---- Brand colors, light (Theme.swift Brand, first value of each ui(light, dark)) ---- */
  /* Brand.background, L15 */
  --ios-bg:#f5f5f7;
  /* Brand.card, L16 */
  --ios-bg-2:#ffffff;
  --ios-card:var(--ios-bg-2);
  /* A field inside a card: the page grey, so it reads as inset. */
  --ios-bg-3:#f5f5f7;
  --ios-bg-elevated:#ffffff;
  /* Brand.text, L17 */
  --ios-label:#1d1d1f;
  --ios-text:var(--ios-label);
  /* Brand.muted, L18: 4.66:1 on #f5f5f7, 5.07:1 on white */
  --ios-label-2:#6e6e73;
  --ios-muted:var(--ios-label-2);
  /* Secondary text on bars and the tab bar (Designer, Nov 26): 5.9:1 on the bar material. */
  --ios-label-bar:#5f5f64;
  --ios-label-3:#8a8a8e;       /* icons and placeholders only, never body text */
  /* Brand.hairline, L19: black at 8% */
  --ios-hairline:rgba(0,0,0,.08);
  --ios-separator:rgba(60,60,67,.29);
  --ios-separator-opaque:#c6c6c8;
  --ios-fill:rgba(120,120,128,.2);
  --ios-fill-2:rgba(120,120,128,.16);
  --ios-fill-3:rgba(118,118,128,.12);
  --ios-gray:#8e8e93;--ios-gray-2:#aeaeb2;--ios-gray-3:#c7c7cc;--ios-gray-4:#d1d1d6;--ios-gray-5:#e5e5ea;--ios-gray-6:#f2f2f7;
  /* Brand.accent, L12: the one tint. White on it 5.1:1; it on white 5.3:1, on #f5f5f7 4.69:1. */
  --ios-accent:#0b7d5e;
  --ios-accent-pressed:#096a50;
  /* Brand.onAccent, L14 */
  --ios-on-accent:#ffffff;
  /* Pill fill (Pill L70: tint at 8%) and the darker accent text that sits on it: 5.9:1 on the 8% tint. */
  --ios-accent-soft:rgba(11,125,94,.08);
  --ios-accent-ink:#096a50;
  /* Brand.soft, L21: the tinted circle behind an icon (SymbolBadge) */
  --ios-soft:#e7f3ef;
  /* Brand.warn, L20: warnings, "needs callback", over cap. 5.2:1 on white. Pill text uses the darker ink (5.9:1 on its tint). */
  --ios-warn:#a15c07;
  --ios-warn-soft:rgba(161,92,7,.08);
  --ios-warn-ink:#8a4f06;
  /* Brand.gold, L23: owners, money and the sales race ONLY. 5.1:1 on white; pill ink 5.9:1 on its tint. */
  --ios-gold:#8a6a00;
  --ios-gold-soft:rgba(138,106,0,.08);
  --ios-gold-ink:#765a00;
  /* Danger (Designer, Nov 26): #d70015, 5.4:1 on white, not iOS system red. */
  --ios-danger:#d70015;
  --ios-danger-soft:rgba(215,0,21,.08);
  --ios-danger-ink:#b4000f;
  /* iOS system colors (accessible variants), for charts and swipe actions only. No web violet. */
  --ios-red:#d70015;--ios-orange:#c93400;--ios-yellow:#a05a00;--ios-green:#248a3d;--ios-blue:#0040dd;--ios-indigo:#3634a3;--ios-purple:#8944ab;
  /* Materials (bars, glass cards, sheets, toasts). */
  --ios-material:rgba(249,249,251,.84);
  --ios-material-thick:rgba(249,249,251,.88);
  --ios-material-thin:rgba(255,255,255,.55);
  --ios-material-solid:#f9f9fb;
  /* The phone tab bar: nearly opaque, so whatever scrolls under it can't pull its labels under 4.5:1. */
  --ios-material-bar:rgba(247,247,249,.94);
  --ios-glass-edge:rgba(255,255,255,.7);
  --ios-blur:saturate(180%) blur(20px);
  /* Cards have no shadow in the app, just a 1pt hairline (CardModifier L43-44). As a ring, so it needs no border box. */
  --ios-shadow-card:0 0 0 1px var(--ios-hairline);
  --ios-shadow-float:0 10px 40px rgba(0,0,0,.14),0 2px 8px rgba(0,0,0,.06);
  --ios-scrim:rgba(0,0,0,.32);

  /* ---- Shape, size, spacing ---- */
  /* Main card: CardModifier L43, radius 20 continuous */
  --ios-r-card:20px;
  /* Buttons: BigButtonStyle L85, radius 14 */
  --ios-r-button:14px;
  /* Small cards and tiles (Designer, Nov 26) */
  --ios-r-tile:16px;
  /* Lists and grouped rows (Designer, Nov 26; insetGrouped) */
  --ios-r-list:12px;
  /* Tap target: BigButtonStyle L82 minHeight 44 */
  --ios-tap:44px;
  /* Page gutter and card padding: CardModifier L41 padding 16 */
  --ios-gutter:16px;
  --ios-radius-sm:10px;--ios-radius:12px;--ios-radius-lg:16px;--ios-radius-xl:22px;--ios-radius-sheet:14px;
  --ios-row-h:44px;--ios-bar-h:49px;--ios-nav-h:44px;--ios-rail:240px;--ios-sidebar:260px;
  /* Motion */
  --ios-ease:cubic-bezier(.32,.72,0,1);         /* UIKit's sheet and push curve */
  --ios-ease-out:cubic-bezier(.25,.1,.25,1);
  --ios-spring:cubic-bezier(.34,1.36,.64,1);     /* a light overshoot, for things that pop in */
  --ios-dur:.35s;--ios-dur-fast:.18s;
  --ios-safe-top:env(safe-area-inset-top,0px);--ios-safe-bottom:env(safe-area-inset-bottom,0px);
  --ios-safe-left:env(safe-area-inset-left,0px);--ios-safe-right:env(safe-area-inset-right,0px);
  color-scheme:light;
}
/* Springs where the browser can draw them (Safari 17.2+, Chrome 113+): a real damped spring, not a bezier. */
@supports (transition-timing-function:linear(0,1)){
  :root{--ios-spring:linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938 16.7%,1.017 19.4%,1.067,1.099 24.3%,1.108 26%,1.1,1.077 30.8%,1.017 37.9%,.995 42.3%,.987 46.2%,.991 54.1%,1 66.8%,1)}
}

/* ---- Dark (Theme.swift Brand, second value of each ui(light, dark)) ---- */
html[data-theme="dark"]{
  /* Brand.background L15, Brand.card L16 */
  --ios-bg:#000000;
  --ios-bg-2:#1c1c1e;
  --ios-bg-3:#2c2c2e;
  --ios-bg-elevated:#1c1c1e;
  /* Brand.text L17, Brand.muted L18: 6.6:1 on #1c1c1e, 8.2:1 on black */
  --ios-label:#f5f5f7;
  --ios-label-2:#a1a1a9;
  --ios-label-bar:#a1a1a9;
  --ios-label-3:#6e6e73;
  /* Brand.hairline L19: white at 8% */
  --ios-hairline:rgba(255,255,255,.08);
  --ios-separator:rgba(84,84,88,.6);
  --ios-separator-opaque:#38383a;
  --ios-fill:rgba(120,120,128,.36);
  --ios-fill-2:rgba(120,120,128,.32);
  --ios-fill-3:rgba(118,118,128,.24);
  --ios-gray:#8e8e93;--ios-gray-2:#636366;--ios-gray-3:#48484a;--ios-gray-4:#3a3a3c;--ios-gray-5:#2c2c2e;--ios-gray-6:#1c1c1e;
  /* Brand.accent L12, Brand.onAccent L14 (10.8:1). Mint is never used on a white surface. */
  --ios-accent:#82dfcb;
  --ios-accent-pressed:#9de8d7;
  --ios-on-accent:#04211c;
  --ios-accent-soft:rgba(130,223,203,.12);
  --ios-accent-ink:#82dfcb;
  /* Brand.soft L21 */
  --ios-soft:#10302a;
  /* Brand.warn L20 */
  --ios-warn:#fbbf24;
  --ios-warn-soft:rgba(251,191,36,.12);
  --ios-warn-ink:#fbbf24;
  /* Brand.gold L23 */
  --ios-gold:#e6c46a;
  --ios-gold-soft:rgba(230,196,106,.12);
  --ios-gold-ink:#e6c46a;
  /* #d70015 is only 3.4:1 on black, so dark mode keeps the lighter red (6.0:1 on #1c1c1e). */
  --ios-danger:#ff6961;
  --ios-danger-soft:rgba(255,105,97,.12);
  --ios-danger-ink:#ff6961;
  --ios-red:#ff6961;--ios-orange:#ffb340;--ios-yellow:#ffd426;--ios-green:#30db5b;--ios-blue:#409cff;--ios-indigo:#7d7aff;--ios-purple:#da8fff;
  --ios-material:rgba(30,30,32,.86);
  --ios-material-thick:rgba(28,28,30,.9);
  --ios-material-thin:rgba(44,44,46,.55);
  --ios-material-solid:#1c1c1e;
  --ios-material-bar:rgba(30,30,32,.94);
  --ios-glass-edge:rgba(255,255,255,.1);
  --ios-shadow-float:0 12px 50px rgba(0,0,0,.6);
  --ios-scrim:rgba(0,0,0,.5);
  color-scheme:dark;
}
