/* AirPrice — Apple-inspired design tokens */
:root {
  /* Surfaces */
  --bg: #f5f5f7;
  --bg-deep: #ebebef;
  --surface: #ffffff;
  --stage: #ffffff;
  --fg: #1d1d1f;
  --text: var(--fg);
  --muted: #86868b;
  --muted-2: #aeaeb2;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);

  /* Accent — Apple blue for CTAs; brand stays neutral elsewhere */
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-press: #0066cc;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --on-accent: #ffffff;

  --danger: #ff3b30;

  /* Radii — Apple HIG */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 980px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);

  /* Layout */
  --content: min(1120px, 100%);
  --content-narrow: min(640px, 100%);
  --pad: clamp(16px, 4vw, 32px);
  --pad-lg: clamp(24px, 5vw, 48px);
  --tabbar-h: 52px;
  --topbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  /* Typography — SF Pro stack */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fw-body: 400;
  --fw-ui: 500;
  --fw-emphasis: 600;
  --fw-display: 600;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 21px;
  --text-2xl: 28px;
  --text-3xl: clamp(32px, 5vw, 40px);
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.47059;
  --tracking-tight: -0.022em;
  --tracking-display: -0.045em;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-press: 100ms;
  --dur-ui: 220ms;
  --dur-screen: 280ms;
  --press-scale: 0.96;
  --feed-aspect: 1 / 1;

  /* Breakpoints (for reference in media queries) */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* Telegram theme override */
  --tg-theme-link-color: var(--accent);
  --tg-theme-accent-text-color: var(--accent);
  --tg-theme-text-color: var(--fg);
  --tg-theme-hint-color: var(--muted);
  --tg-theme-button-color: var(--accent);
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-bg-color: var(--bg);
  --tg-theme-secondary-bg-color: var(--surface);
}

@media (prefers-color-scheme: dark) {
  :root.auto-dark {
    --bg: #000000;
    --bg-deep: #1c1c1e;
    --surface: #1c1c1e;
    --stage: #2c2c2e;
    --fg: #f5f5f7;
    --muted: #98989d;
    --line: rgba(255, 255, 255, 0.1);
  }
}
