/* HSL Facilities 2.0: tokens gerados de tokens.json. Componentes usam só estas variáveis, nunca hex direto. */
:root {
  --bg: #FBF7F0; --surface: #FFFFFF; --surface-soft: #F1F6F5;
  --border: #E1DDD3; --border-input: #7C8280;
  --text: #1F2625; --text-muted: #555B59;
  --accent: #0E7273; --on-accent: #FFFFFF; --accent-soft: #D9ECEC; --accent-deep: #0B6E6F;
  --brand: #128C8D; --highlight: #C98E4F;
  --danger: #B42318; --danger-bg: #FDECEA;
  --success: #1E7A45; --success-bg: #E6F4EC;
  --warning: #9A5B13; --warning-bg: #FEF3DC;

  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-lg: 20px; --text-xl: 24px; --text-display: 32px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 48px; --space-8: 64px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(31,38,37,.05), 0 2px 8px rgba(31,38,37,.06);
  --shadow-pop: 0 16px 40px rgba(31,38,37,.18);
  --motion-fast: 120ms; --motion-base: 180ms; --ease: cubic-bezier(.2,.8,.2,1);
  --content-max: 1120px; --form-max: 560px; --header-h: 56px; --tabbar-h: 60px; --touch-min: 48px;
  color-scheme: light;
}

/* Aparência: automático segue o sistema; a escolha do usuário grava data-theme no <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C2A2B; --surface: #10393A; --surface-soft: #154546;
    --border: #24595A; --border-input: #6FA3A3;
    --text: #F1F6F5; --text-muted: #B5CFCF;
    --accent: #9AE0E0; --on-accent: #0C2A2B; --accent-soft: #1B5152; --accent-deep: #9AE0E0;
    --brand: #9AE0E0;
    --danger: #FFB4AB; --danger-bg: #5A1F1A;
    --success: #8BDDAE; --success-bg: #174A30;
    --warning: #F2C879; --warning-bg: #4A3610;
    --shadow-card: 0 1px 2px rgba(0,0,0,.3); --shadow-pop: 0 16px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C2A2B; --surface: #10393A; --surface-soft: #154546;
  --border: #24595A; --border-input: #6FA3A3;
  --text: #F1F6F5; --text-muted: #B5CFCF;
  --accent: #9AE0E0; --on-accent: #0C2A2B; --accent-soft: #1B5152; --accent-deep: #9AE0E0;
  --brand: #9AE0E0;
  --danger: #FFB4AB; --danger-bg: #5A1F1A;
  --success: #8BDDAE; --success-bg: #174A30;
  --warning: #F2C879; --warning-bg: #4A3610;
  --shadow-card: 0 1px 2px rgba(0,0,0,.3); --shadow-pop: 0 16px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}
