/* ==========================================================================
   Reset + base typography
   ========================================================================== */

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

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

body {
    margin:0;
    font-family:var(--font);
    font-size:var(--fs-body);
    line-height:var(--lh-normal);
    color:var(--text);
    background:var(--bg);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

h1,h2,h3,h4,h5,h6 { margin:0; font-weight:var(--fw-semibold); line-height:var(--lh-tight); color:var(--text); }
h1{font-size:var(--fs-h1);} h2{font-size:var(--fs-h2);} h3{font-size:var(--fs-h3);}
p { margin:0 0 var(--s3); }
a { color:var(--link); text-decoration:none; }
a:hover { text-decoration:underline; }

img,svg { max-width:100%; vertical-align:middle; }
button,input,select,textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
[hidden] { display:none !important; }

/* All money and quantity figures align on the decimal. */
.num, .money, td.text-end, .kpi-value { font-variant-numeric:tabular-nums; }

::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:var(--r-full); border:2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background:var(--muted); }

:focus-visible { outline:none; box-shadow:var(--focus-ring); border-radius:var(--r-sm); }

.skip-link {
    position:absolute; left:var(--s4); top:-60px; z-index:var(--z-toast);
    background:var(--primary); color:#fff; padding:var(--s2) var(--s4);
    border-radius:var(--r-md); transition:top var(--t-base) var(--ease-standard);
}
.skip-link:focus { top:var(--s4); text-decoration:none; }

.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;
}

/* ---- Utilities (deliberately small; components carry the styling) ---- */
.stack        { display:flex; flex-direction:column; }
.row          { display:flex; align-items:center; }
.row-between  { display:flex; align-items:center; justify-content:space-between; }
.gap-1{gap:var(--s1);} .gap-2{gap:var(--s2);} .gap-3{gap:var(--s3);} .gap-4{gap:var(--s4);}
.grow{flex:1;} .wrap{flex-wrap:wrap;}
.text-end{text-align:right;} .text-center{text-align:center;}
.text-muted{color:var(--text-3);} .text-danger{color:var(--danger);}
.text-success{color:var(--success);} .text-warning{color:var(--warning);}
.fw-medium{font-weight:var(--fw-medium);} .fw-semibold{font-weight:var(--fw-semibold);}
.fs-caption{font-size:var(--fs-caption);} .fs-label{font-size:var(--fs-label);}
.mt-2{margin-top:var(--s2);} .mt-3{margin-top:var(--s3);} .mt-4{margin-top:var(--s4);}
.mt-6{margin-top:var(--s6);} .mb-3{margin-bottom:var(--s3);} .mb-4{margin-bottom:var(--s4);}
.w-100{width:100%;}
