/* Adaa — the work in numbers (section #work, between the Signal check and Contact).
   Typography and colour are inline in index.html, as everywhere else; this file holds what inline styles can't:
   the grid that gives each shown counter an equal column, the hidden states, and the tally cells assets/js/stats.js draws. */

/* one equal column per counter that has a value; a hidden counter takes no column */
[data-stats-grid]{grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
[data-stat][hidden],[data-stat-tally][hidden],[data-stat-unit][hidden]{display:none!important}
/* tablets: four counters go two by two (three and fewer keep one row) */
@media (max-width:880px){[data-stats-grid][data-n="4"]{grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr))}}
/* phones: one under the other */
@media (max-width:640px){[data-stats-grid]{grid-auto-flow:row!important;grid-template-columns:minmax(0,1fr)!important}}

/* the tally: one 10px cell per item on the site's 14px grid, four rows at most (three and a "1 cell = 100" line past that,
   the same unit on every tile). Fixed height, so the numbers under it line up across the row. */
[data-stat-tally]{height:56px;display:flex;flex-direction:column;gap:6px;overflow:hidden}
[data-stat-cells]{display:flex;flex-wrap:wrap;align-content:flex-start;gap:4px}
[data-stat-cells] i{display:block;width:10px;height:10px;flex:none;background:#043BC1;opacity:0;transform:scale(0);transition:opacity 200ms ease-out,transform 380ms cubic-bezier(.34,1.56,.64,1)}
[data-stat-cells] i[data-on]{opacity:1;transform:none}
/* the last cell of a scaled tally, when it stands for less than a whole unit: a faint cell filled from the left in
   proportion (--part, set by stats.js), the one still filling up */
[data-stat-cells] i[data-part]{background:linear-gradient(90deg,#043BC1 var(--part,0%),rgba(4,59,193,0.16) var(--part,0%))}
/* the unit line sits at the foot of the tally, so it lines up across the row however many rows the cells take */
[data-stat-unit]{margin-top:auto;font-family:'Courier New',monospace;font-size:12.5px;line-height:12px;letter-spacing:0.02em;color:rgba(0,25,45,0.55)}
/* the final value for screen readers while the visible digits count up */
[data-stat-sr]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-reduced-motion:reduce){[data-stat-cells] i{transition:none!important}}
