/* Shimmer skeletons (public/js/wf-skeleton.js). Theme tokens only; the shimmer stops under prefers-reduced-motion. */
.wf-skel { font-family: var(--font-body); }
.wf-skel-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wf-skel-bar, .wf-skel-dot { display: block; border-radius: 6px; flex: 0 0 auto; max-width: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--border) 70%, transparent) 0%, color-mix(in srgb, var(--border) 30%, transparent) 40%, color-mix(in srgb, var(--border) 70%, transparent) 80%);
  background-size: 240% 100%; animation: wf-skel-shine 1.3s ease-in-out infinite; }
.wf-skel-bar.is-pill { border-radius: 999px; }
.wf-skel-bar.is-btn { border-radius: 10px; }
.wf-skel-bar.is-block { border-radius: 10px; }
.wf-skel-bar.is-end { margin-left: auto; }
.wf-skel-dot { width: 36px; height: 36px; border-radius: 50%; }
.wf-skel-dot.is-big { width: 40px; height: 40px; }
@keyframes wf-skel-shine { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .wf-skel-bar, .wf-skel-dot { animation: none; background: color-mix(in srgb, var(--border) 55%, transparent); } }
.wf-skel-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); overflow: hidden; }
.wf-skel-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--border); }
.wf-skel-row:first-child { border-top: 0; }
.wf-skel-list.is-steps { border: 0; background: none; gap: 12px; }
.wf-skel-row.is-step { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); padding: 16px 18px; }
.wf-skel-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wf-skel-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.wf-skel-cards.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; }
.wf-skel-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); }
.wf-skel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.wf-skel-review { border: 1px solid var(--border); border-radius: 16px; background: var(--bg-raised); padding: 14px 16px 16px; }
.wf-skel-rh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.wf-skel-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.wf-skel-doc { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-panel); min-width: 0; }
.wf-skel-line { display: flex; justify-content: space-between; gap: 12px; }
.wf-skel-drawer { padding: 4px 0; }
@media (max-width: 760px) {
  .wf-skel-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-skel-split { grid-template-columns: minmax(0, 1fr); }
}

/* Home while its first numbers load (perf 2026-11-04, Hal: "SOLD THIS MONTH —" with nothing moving). #home-grid carries .is-loading from the
   markup until refreshDashboard() has its answer, so the cards show the shimmer, never a bare dash or an empty card. Later refreshes keep the
   last numbers on screen (no flicker). */
#home-grid.is-loading :is(.home-hero-num, .home-num, .kpi-value) {
  color: transparent !important; display: inline-block; min-width: 7ch; border-radius: 8px; user-select: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--border) 70%, transparent) 0%, color-mix(in srgb, var(--border) 30%, transparent) 40%, color-mix(in srgb, var(--border) 70%, transparent) 80%);
  background-size: 240% 100%; animation: wf-skel-shine 1.3s ease-in-out infinite;
}
#home-grid.is-loading .home-hero-num { min-width: 9ch; }
#home-grid.is-loading :is(#home-sales-chart, #home-stock-age, #home-work-list):empty {
  display: block; min-height: 96px; border-radius: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--border) 55%, transparent) 0%, color-mix(in srgb, var(--border) 22%, transparent) 40%, color-mix(in srgb, var(--border) 55%, transparent) 80%);
  background-size: 240% 100%; animation: wf-skel-shine 1.3s ease-in-out infinite;
}
#home-grid.is-loading #home-stock-age:empty { min-height: 28px; }
#home-grid.is-loading #home-stock-figs:empty, #home-grid.is-loading .home-delta:empty, #home-grid.is-loading .kpi-sub:empty {
  display: block; min-height: 12px; width: 60%; margin-top: 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--border) 45%, transparent); animation: wf-skel-shine 1.3s ease-in-out infinite; background-size: 240% 100%;
}
@media (prefers-reduced-motion: reduce) {
  #home-grid.is-loading :is(.home-hero-num, .home-num, .kpi-value, #home-sales-chart, #home-stock-age, #home-work-list, #home-stock-figs, .home-delta, .kpi-sub) { animation: none; }
}
