/* ==========================================================================
   Base — reset ligero + ajustes tipográficos CableSpeedy
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-14);
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p { margin: 0; }

a { color: var(--accent-ink); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--text); }

/* Números tabulares para datos/montos */
.tnum, .stat-value, .money, td.num, th.num, .kpi__value { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* Iconos SVG lineales */
.ico { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }

/* Selección */
::selection { background: var(--accent-soft-2); color: var(--accent-ink); }

/* Scrollbars discretas */
* { scrollbar-width: thin; scrollbar-color: oklch(0.86 0.008 256) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: oklch(0.86 0.008 256); border-radius: var(--r-full); border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: oklch(0.78 0.010 256); background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* Foco accesible (anillo ámbar) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }

[x-cloak] { display: none !important; }

/* Skip-link: salto directo al contenido (accesibilidad de teclado) */
.skip-link {
    position: fixed; top: 8px; left: 8px; z-index: 3000;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    border-radius: var(--r-btn); padding: 10px 16px; font-weight: 600; font-size: var(--fs-13);
    box-shadow: var(--shadow-md);
    transform: translateY(-160%);
    transition: transform var(--t-fast);
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--accent); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
}
