/* DarkTask — base
   Fonte, escala de tipo, foco, movimento reduzido e utilitários.
   Carrega depois das folhas antigas de propósito: o que está aqui é o piso
   que vale para o app inteiro, e as exceções ficam nos componentes. */

/* --- Inter, hospedada aqui. Antes vinha do Google Fonts, bloqueando a
   primeira pintura antes mesmo do login. É uma fonte variável: um arquivo
   por subconjunto cobre todos os pesos. --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Plus Jakarta Sans, a família do novo template (design system 09/2026).
   Auto-hospedada pelo mesmo motivo do Inter: nada de Google Fonts bloqueando
   a primeira pintura, e o app segue funcionando offline (PWA). Variável, um
   arquivo por subconjunto cobre 300–800. É a nova --font-ui em tokens.css. --- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Uma família só. O peso NÃO é forçado: título 600, rótulo e botão 500,
   corpo 400. A regra antiga zerava tudo em 300 e apagava a hierarquia. ---
   O JetBrains Mono continua onde o autor o pediu (números tabulares). */
html,
body,
body *:not(.ti):not(.dt-mono):not([style*="JetBrains"]):not([class*="mono"]) {
  font-family: var(--font-ui) !important;
}
.dt-mono,
[style*="JetBrains"] {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.01em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
h4, h5, h6 { font-size: var(--fs-md); line-height: var(--lh-snug); }
strong, b { font-weight: 600; }
button, label, summary, [role="tab"], [role="button"] { font-weight: 500; }
small { font-size: var(--fs-sm); }

::placeholder { color: var(--text-3); opacity: 1; font-weight: 400; }

/* --- Foco: um anel só, visível em todo focável. O !important é o que
   derrota os 68 outline:none espalhados, 17 deles em estilo inline. --- */
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="tab"], [role="radio"], [role="switch"], [contenteditable="true"]):focus-visible {
  outline: var(--focus-ring) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}
:where(input, select, textarea, [contenteditable="true"]):focus-visible { outline-offset: 0 !important; }
:focus:not(:focus-visible) { outline: none; }

/* --- Movimento reduzido: reset global, inclusive do que está inline. --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Utilitários --- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.dt-skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: var(--z-auth);
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
}
.dt-skip-link:focus { left: 12px; }

/* Texto de acento solto (não em botão cheio) lê com a variante corrigida. */
a { color: var(--accent-text); }
