/* GERADO por ferramentas/gerar-tokens-css.py a partir de
   replica/design/tokens.json e tokens-escuro.json. Nao edite a' mao:
   mude o JSON, rode o gerador e o contrast.py nos dois temas.
   O ponto de quebra do menu (900px) mora nas
   consultas @media do casca.css: @media nao aceita var(). */
:root,[data-tema="claro"]{
  --bg:#F7F5EF;
  --surface:#FFFFFF;
  --surface-muted:#EFEBE3;
  --border:#DFD9CE;
  --border-input:#857E73;
  --text:#1B2A31;
  --text-muted:#5C6B72;
  --accent:#0C1F3D;
  --on-accent:#F7F5EF;
  --accent-soft:#E6E9EF;
  --on-accent-soft:#0C1F3D;
  --sidebar:#0C1F3D;
  --sidebar-text:#F7F5EF;
  --sidebar-muted:#D8CFC0;
  --sidebar-active:#34495E;
  --sidebar-detail:#D0B96C;
  --danger:#8C2F2F;
  --success:#3E6B4F;
  --focus:#0C1F3D;
  --accent-hover:#1E3556;
  --aviso-bg:#FFFDF8;
  --aviso-borda:#8A6D2F;
  --erro-bg:#FDF6F6;
  --ok-bg:#F5FAF6;
  --detalhe-dourado:#B99B5F;
  color-scheme:light;
}
:root{
  --font-sans:Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-heading:'League Spartan', Inter, system-ui, sans-serif;
  --font-mono:'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-quote:'Source Serif 4', Georgia, serif;
  --text-xs:12px;
  --leading-xs:16px;
  --weight-xs:500;
  --text-sm:14px;
  --leading-sm:20px;
  --weight-sm:400;
  --text-base:16px;
  --leading-base:24px;
  --weight-base:400;
  --text-lg:18px;
  --leading-lg:26px;
  --weight-lg:600;
  --text-xl:24px;
  --leading-xl:30px;
  --weight-xl:700;
  --text-display:32px;
  --leading-display:38px;
  --weight-display:700;
  --space-0:0px;
  --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:6px;
  --radius-md:10px;
  --radius-lg:14px;
  --radius-pill:999px;
  --shadow-card:0 1px 2px rgba(12,31,61,.05);
  --shadow-pop:0 12px 32px rgba(12,31,61,.14);
  --motion:200ms cubic-bezier(.2,.8,.2,1);
  --motion-fast:120ms cubic-bezier(.2,.8,.2,1);
  --sidebar-w:256px;
  --sidebar-collapsed:64px;
  --content-max:960px;
  --reading-max:680px;
  --design-max:1200px;
  --amostra-min:520px;
  --touch-min:44px;
  --hairline:1px;
  --line-thick:3px;
  --focus-ring:2px;
  --focus-offset:2px;
  --control-sm:40px;
  --control-md:48px;
  --icon:20px;
}
[data-tema="escuro"]{
  --bg:#0F1824;
  --surface:#162231;
  --surface-muted:#1E2C3D;
  --border:#2E3F52;
  --border-input:#7F8D9B;
  --text:#EEEBE3;
  --text-muted:#A8B3BB;
  --accent:#E4DCCB;
  --on-accent:#0C1F3D;
  --accent-soft:#26384F;
  --on-accent-soft:#EEEBE3;
  --sidebar:#09121D;
  --sidebar-text:#F7F5EF;
  --sidebar-muted:#D8CFC0;
  --sidebar-active:#26384D;
  --sidebar-detail:#D0B96C;
  --danger:#E8A3A3;
  --success:#93C7A3;
  --focus:#E4DCCB;
  --accent-hover:#F3EEE3;
  --aviso-bg:#2A2619;
  --aviso-borda:#C9AE68;
  --erro-bg:#2E1D1F;
  --ok-bg:#18291F;
  --detalhe-dourado:#C9AE68;
  color-scheme:dark;
}
@media (prefers-color-scheme: dark){
  :root:not([data-tema]){
    --bg:#0F1824;
    --surface:#162231;
    --surface-muted:#1E2C3D;
    --border:#2E3F52;
    --border-input:#7F8D9B;
    --text:#EEEBE3;
    --text-muted:#A8B3BB;
    --accent:#E4DCCB;
    --on-accent:#0C1F3D;
    --accent-soft:#26384F;
    --on-accent-soft:#EEEBE3;
    --sidebar:#09121D;
    --sidebar-text:#F7F5EF;
    --sidebar-muted:#D8CFC0;
    --sidebar-active:#26384D;
    --sidebar-detail:#D0B96C;
    --danger:#E8A3A3;
    --success:#93C7A3;
    --focus:#E4DCCB;
    --accent-hover:#F3EEE3;
    --aviso-bg:#2A2619;
    --aviso-borda:#C9AE68;
    --erro-bg:#2E1D1F;
    --ok-bg:#18291F;
    --detalhe-dourado:#C9AE68;
    color-scheme:dark;
  }
}
@media print{
  :root,:root:not([data-tema]),[data-tema]{
    --bg:#F7F5EF;
    --surface:#FFFFFF;
    --surface-muted:#EFEBE3;
    --border:#DFD9CE;
    --border-input:#857E73;
    --text:#1B2A31;
    --text-muted:#5C6B72;
    --accent:#0C1F3D;
    --on-accent:#F7F5EF;
    --accent-soft:#E6E9EF;
    --on-accent-soft:#0C1F3D;
    --sidebar:#0C1F3D;
    --sidebar-text:#F7F5EF;
    --sidebar-muted:#D8CFC0;
    --sidebar-active:#34495E;
    --sidebar-detail:#D0B96C;
    --danger:#8C2F2F;
    --success:#3E6B4F;
    --focus:#0C1F3D;
    --accent-hover:#1E3556;
    --aviso-bg:#FFFDF8;
    --aviso-borda:#8A6D2F;
    --erro-bg:#FDF6F6;
    --ok-bg:#F5FAF6;
    --detalhe-dourado:#B99B5F;
    color-scheme:light;
  }
}
