/* Oh bits design tokens: the canonical visual vocabulary for the user app. */
:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;

  --color-bg-canvas: #020408;
  --color-bg-page: #05080c;
  --color-surface: #10151c;
  --color-surface-raised: #0c1117;
  --color-border: #2a3038;
  --color-text: #f7f8fb;
  --color-text-secondary: #c1c7d0;
  --color-text-muted: #9aa1ad;
  --color-brand: #f7a707;
  --color-brand-strong: #ffbe1a;
  --color-success: #22c761;
  --color-success-strong: #35d875;
  --color-danger: #ff4d57;
  --color-warning: #f7a707;
  --color-focus: #ffcd4d;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --control-height-md: 44px;
  --control-height-lg: 48px;
  --control-height: var(--control-height-md);
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --shadow-raised: 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.24);
  --shadow-md: var(--shadow-soft);
  --shadow-lg: var(--shadow-raised);
  --safe-area-bottom: env(safe-area-inset-bottom);

  /* Legacy aliases are retained while page CSS is consolidated. */
  --bg: var(--color-bg-page);
  --page: #080c11;
  --card: var(--color-surface);
  --card-soft: var(--color-surface-raised);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --green: var(--color-success);
  --green-2: var(--color-success-strong);
  --red: var(--color-danger);
  --black: var(--color-bg-page);
  --blue: var(--color-brand);
  --amber: var(--color-warning);
  --brand: var(--color-brand);
  --brand-2: var(--color-brand-strong);
  --brand-gradient: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
  --focus-ring: var(--color-focus);
  --shadow: var(--shadow-raised);
}

/* Approved v2 vocabulary. Opt in per batch so unreviewed pages keep their UI. */
:root.ui-batch-1 {
  --bg: #080A0D;
  --surface-1: #0E1115;
  --surface-2: #13171C;
  --surface-3: #181D23;
  --border: #252B33;
  --divider: rgba(255,255,255,.08);
  --text-primary: #F4F6F8;
  --text-secondary: #9199A5;
  --text-muted: #626B77;
  --brand: #F5A707;
  --brand-strong: #FFB52E;
  --brand-soft: rgba(245,167,7,.10);
  --positive: #25D695;
  --negative: #F0505F;

  --color-bg-canvas: var(--bg);
  --color-bg-page: var(--bg);
  --color-surface: var(--surface-1);
  --color-surface-raised: var(--surface-2);
  --color-border: var(--border);
  --color-text: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-secondary);
  --color-brand: var(--brand);
  --color-brand-strong: var(--brand-strong);
  --color-success: var(--positive);
  --color-success-strong: var(--positive);
  --color-danger: var(--negative);
  --color-warning: var(--brand);
  --color-focus: var(--brand-strong);
  --page: var(--bg);
  --brand-gradient: var(--brand);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --control-height-lg: 50px;
  --shadow-raised: 0 16px 40px rgba(0,0,0,.32);
  --shadow-soft: none;

  /* Second-pass scale. Keep the existing color/size aliases for legacy views. */
  --font-size-secondary: 13px;
  --font-size-primary: 15px;
  --font-size-section: 18px;
  --font-size-content: 22px;
  --font-weight-title: 600;
  --line-height-body: 1.5;
  --line-height-title: 1.25;
  --header-height: 56px;
  --control-height-sm: 34px;
  --radius-dialog: 12px;
  --space-field: 18px;
  --app-shell-width: 430px;
}

@media (min-width: 768px) {
  :root.ui-batch-1 { --app-shell-width: 600px; }
}
