/* Reset acotado y fundamentos tipográficos. */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--fw-canvas);
    color: var(--fw-text);
    font-family: var(--fw-font);
    font-size: var(--fw-size-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Las cifras deben alinearse en columna dentro de tablas y tarjetas. */
    font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, p, figure { margin: 0; }

h1 { font-size: var(--fw-size-h1); font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: var(--fw-size-h2); font-weight: 600; letter-spacing: -0.01em; }

a { color: var(--fw-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }

img, svg { display: block; max-width: 100%; }

/*
 * El atributo hidden debe poder ocultar cualquier cosa. La regla del navegador
 * ([hidden] { display: none }) tiene la misma especificidad que una clase, así que
 * cualquier componente que declare su propio display la anula y el elemento se pinta
 * aunque esté marcado como oculto — fue lo que pasó con el aviso de error del acceso,
 * que se veía como una franja de color vacía. Esta regla cierra esa puerta para todos.
 */
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--fw-primary);
    outline-offset: 2px;
}

/* ---------- Utilidades tipográficas ---------- */

.fw-label {
    display: block;
    font-size: var(--fw-size-label);
    font-weight: 600;
    letter-spacing: var(--fw-tracking-label);
    text-transform: uppercase;
    color: var(--fw-text-subtle);
}

.fw-muted  { color: var(--fw-text-muted); }
.fw-subtle { color: var(--fw-text-subtle); }

/* Cifra grande con centavos reducidos, como en la referencia. */
.fw-amount {
    font-size: var(--fw-size-display);
    font-weight: 650;
    letter-spacing: var(--fw-tracking-tight);
    line-height: 1.05;
}

.fw-amount--sm { font-size: var(--fw-size-amount); }

.fw-amount__cents {
    font-size: 0.5em;
    font-weight: 600;
    letter-spacing: 0;
}

/* ---------- Accesibilidad ---------- */

.fw-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
