/* "The clinic in numbers" on the home page (canon/stats.js). Shared by the desktop and phone home pages, on top of
   each build's own stylesheet. Three porcelain cards, each with its own small drawing: a goniometer for the years, a
   field of dots for the patients, a road with the branches on it. They settle once, when the section comes into
   view (transform and opacity only); with reduced motion the finished drawings show at once. */
.st-sec{container-type:inline-size}
.sta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:32px}
.sta-card{position:relative;display:flex;flex-direction:column;padding:22px 26px 26px;border-radius:28px;background:var(--surface);color:inherit;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
a.sta-card{transition:transform .35s cubic-bezier(.16,1,.3,1),box-shadow .35s}
a.sta-card:hover{transform:translateY(-3px)}
a.sta-card:focus-visible{outline:3px solid var(--sky);outline-offset:3px}
/* every drawing in the same box, so the three numbers line up */
.sta-art{height:150px;display:flex;align-items:center;justify-content:center;margin-bottom:18px}
.sta-art svg{display:block;height:100%;width:auto;max-width:100%;overflow:visible}
.st-num{font-size:clamp(46px,4.4vw,64px);font-weight:800;letter-spacing:-.04em;line-height:1;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.st-num small{font-size:.56em;font-weight:800;color:var(--sky-ink);margin-left:.06em;vertical-align:.42em}
/* the counting figure sits over an invisible copy of the final one, so it is exactly as wide from the start */
.st-count{display:inline-grid}
.st-count > span{grid-area:1/1}
.st-count > span:first-child{visibility:hidden}
.st-label{font-size:17px;font-weight:700;color:var(--ink);margin-top:10px}
.st-sub{font-size:14px;color:var(--ink-2);margin-top:4px;text-wrap:pretty}
.st-go{display:inline-flex;align-items:center;gap:4px;margin-top:auto;padding-top:14px;font-size:15px;font-weight:700;color:var(--sky-ink)}
.st-go svg{width:16px;height:16px;transition:transform .3s cubic-bezier(.16,1,.3,1)}
a.sta-card:hover .st-go svg{transform:translateX(3px)}

/* the goniometer: its arm swings open, the ticks it passes light up */
.g-arm{transform-box:view-box;transform-origin:100px 104px;transform:rotate(var(--sweep,138deg));transition:transform 1.6s cubic-bezier(.22,1,.36,1)}
.sta.is-waiting .g-arm{transform:none}
.g-lit{transition:opacity .25s ease}
.sta.is-waiting .g-lit{opacity:0}
/* the patients: the dots fill in like a wave */
.d-on{transition:opacity .4s ease}
.sta.is-waiting .d-on{opacity:0}
/* the branches: the pins drop onto the road */
.r-pin{transition:transform .7s cubic-bezier(.34,1.56,.64,1),opacity .3s ease}
.sta.is-waiting .r-pin{transform:translateY(-26px);opacity:0}
.r-lab{transition:opacity .4s ease}
.sta.is-waiting .r-lab{opacity:0}

/* narrow (every phone, a small window): one card a row, the drawing beside the number */
@container (max-width:760px){
  .sta{grid-template-columns:1fr;gap:10px;margin-top:18px}
  .sta-card{display:grid;grid-template-columns:104px minmax(0,1fr);column-gap:16px;align-items:center;padding:16px 18px 16px 14px;border-radius:24px}
  .sta-art{grid-row:1 / span 4;height:76px;margin:0}
  .st-num{font-size:40px}
  .st-label{font-size:15px;margin-top:6px}
  .st-sub{font-size:13px;margin-top:2px}
  .st-go{padding-top:6px;font-size:14px}
  .r-lab{display:none}
}
@media (prefers-reduced-motion:reduce){
  .g-arm,.g-lit,.d-on,.r-pin,.r-lab,a.sta-card,.st-go svg{transition:none}
}
