/* =====================================================================
   HIG — acabamento no padrão das Apple Human Interface Guidelines
   (developer.apple.com/design). Camada final: carrega por último e só
   ajusta; para desfazer, basta tirar o <link> do index.html.
   ===================================================================== */
:root { --ease-apple: cubic-bezier(.25,.1,.25,1); --ease-mola: cubic-bezier(.34,1.3,.64,1); }

html { -webkit-tap-highlight-color: transparent; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-kerning: normal; }
h1, h2, h3 { text-wrap: balance; }

/* Toque: resposta imediata ao apertar */
.bt { transition: border-color .2s var(--ease-apple), background-color .2s var(--ease-apple), transform .12s var(--ease-apple); }
.bt:active:not(:disabled) { transform: scale(.97); }
.chave::after { transition: left .28s var(--ease-mola); }
.chave { transition: background-color .2s var(--ease-apple); }

/* Alvos de toque de 44 pt sem mudar o visual */
.faixa-x, .conv-inv, .hist-dir .bt, .conv-per button { position: relative; }
.faixa-x::after { content: ''; position: absolute; inset: -10px; }
.conv-inv::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.conv-per button::after { content: ''; position: absolute; inset: -8px 0; }
.hist-dir .bt::after { content: ''; position: absolute; inset: -7px; }
@media (pointer: coarse) {
  /* campo com fonte < 16px faz o iPhone dar zoom ao tocar */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), textarea, select { font-size: max(16px, 1em); }
}

/* Contraste mínimo 4,5:1: aviso de erro com texto branco usa o vermelho mais fechado */
.toast.erro { background: #c8323f; }

/* Foco visível no estilo do sistema */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--azul) 55%, transparent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .bt:active:not(:disabled) { transform: none; } }
