/* Home "Organism profiles" tile with a live organism preview. Uses the app's theme tokens. */
.home-stat-box { padding:0 !important; }
.home-stat-link { all:unset; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:6px; width:100%; height:100%; padding:20px 10px 14px; border-radius:inherit; cursor:pointer; text-align:center; min-width:0; }
.home-stat-link:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.home-stat-live { transition:border-color .2s; }
.home-stat-live:hover { border-color:var(--brand) !important; }

/* Ticker: one organism at a time, sliding up. */
.home-stats .hs-ticker { display:block; width:100%; margin-top:4px; padding-top:8px; border-top:1px dashed var(--line); }
.home-stats .hs-window { position:relative; display:block; height:34px; overflow:hidden; }
.home-stats .hs-item {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:6px;
  transform:translateY(100%); opacity:0; transition:transform .55s var(--ease-out, ease), opacity .55s var(--ease-out, ease);
}
.home-stats .hs-item.is-in { transform:translateY(0); opacity:1; }
.home-stats .hs-item.is-out { transform:translateY(-100%); opacity:0; }
.home-stats .hs-icon { width:20px; height:20px; flex:0 0 20px; object-fit:contain; border-radius:50%; background:var(--surface-sunk); }
.home-stats .hs-name { min-width:0; font:600 11.5px/1.3 'IBM Plex Sans',Arial,sans-serif; color:var(--ink); text-align:left;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; overflow-wrap:anywhere; }
.home-stats .hs-name i { font-style:italic; }

@media (max-width:860px) { .home-stat-link { padding:16px 6px 12px; } }
@media (max-width:600px) {
  .home-stats .hs-window { height:30px; }
  .home-stats .hs-icon { display:none; }
  .home-stats .hs-name { font-size:10.5px; text-align:center; }
}
@media (prefers-reduced-motion: reduce) { .home-stats .hs-item { transition:none; } }

/* Organism groups tile: one group at a time with its icon, sliding sideways; swipeable. */
.home-stats .hs-gticker { touch-action:pan-y; user-select:none; -webkit-user-select:none; cursor:grab; }
.home-stats .hs-gwindow { position:relative; display:block; height:92px; overflow:hidden; }
.home-stats .hs-gitem {
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  transition:transform .5s var(--ease-out, ease), opacity .5s var(--ease-out, ease);
}
.home-stats .hs-gitem.is-in { transform:translateX(0); opacity:1; }
.home-stats .hs-gitem.from-next, .home-stats .hs-gitem.to-prev { transform:translateX(100%); opacity:0; }
.home-stats .hs-gitem.from-prev, .home-stats .hs-gitem.to-next { transform:translateX(-100%); opacity:0; }
.home-stats .hs-gicon { width:44px; height:44px; flex:0 0 44px; object-fit:contain; border-radius:50%; background:var(--surface-sunk); pointer-events:none; }
.home-stats .hs-gname { font:600 12px/1.25 'IBM Plex Sans',Arial,sans-serif; color:var(--ink); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-stats .hs-gcount { font-size:11px; font-weight:600; color:var(--brand); font-variant-numeric:tabular-nums; }
.home-stats .hs-dots { display:flex; justify-content:center; gap:4px; margin-top:6px; }
.home-stats .hs-dot { width:5px; height:5px; border-radius:50%; background:var(--line-strong, var(--line)); transition:background .3s, transform .3s; }
.home-stats .hs-dot.is-on { background:var(--brand); transform:scale(1.3); }
@media (max-width:600px) {
  .home-stats .hs-gwindow { height:86px; }
  .home-stats .hs-gicon { width:38px; height:38px; flex-basis:38px; }
  .home-stats .hs-gname { font-size:10.5px; white-space:normal; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; text-align:center; }
  .home-stats .hs-gcount { font-size:10px; }
  .home-stats .hs-dots { gap:3px; }
  .home-stats .hs-dot { width:4px; height:4px; }
}
@media (prefers-reduced-motion: reduce) { .home-stats .hs-gitem, .home-stats .hs-dot { transition:none; } }

/* Balance the profiles tile against the taller groups tile. */
.home-stats #homeProfilesTile .hs-ticker { flex:1; display:flex; flex-direction:column; justify-content:center; }

/* This session tile: latest identification and a link to the Session log. */
.home-stats #homeSessionTile .hs-ticker { flex:1; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; }
.home-stats .hs-latest { display:flex; flex-direction:column; align-items:center; gap:2px; min-width:0; max-width:100%; }
.home-stats .hs-latest-label { font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint, var(--ink-soft)); }
.home-stats .hs-latest-name { font:600 12px/1.3 'IBM Plex Sans',Arial,sans-serif; color:var(--ink); max-width:100%;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; }
.home-stats .hs-latest-pct { font-size:11px; font-weight:600; color:var(--brand); font-variant-numeric:tabular-nums; }
.home-stats .hs-latest-empty { font-size:11.5px; color:var(--ink-soft); line-height:1.35; }
.home-stats .hs-cta { font-size:11.5px; font-weight:600; color:var(--brand); }
@media (max-width:600px) {
  .home-stats .hs-latest-name { font-size:10.5px; }
  .home-stats .hs-latest-empty, .home-stats .hs-cta { font-size:10px; }
}

/* Flat (2D) duotone icons for the "At your bench" cards. */
.home-shortcut-icon.home-shortcut-flat { display:grid; place-items:center; color:var(--brand); background:color-mix(in srgb, var(--brand) 12%, var(--surface)); border:1px solid color-mix(in srgb, var(--brand) 22%, transparent); }
.home-shortcut-flat .flat-icon { width:30px; height:30px; }
.home-shortcut-flat .fi-fill { fill:color-mix(in srgb, var(--brand) 30%, transparent); }
.home-shortcut-flat .fi-fill-2 { fill:color-mix(in srgb, var(--var) 45%, transparent); }
.home-shortcut-flat .fi-rack { fill:color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.home-shortcut-flat .fi-bubble { fill:var(--surface); }
.home-shortcut-flat .fi-accent { stroke:var(--var); }

/* At your bench: one card per row (Biochemical Tests dictionary first, Scientific References below). */
#homeView .home-shortcuts { grid-template-columns:minmax(0,1fr) !important; }
/* Stacked cards stay compact on phones: icon beside the text, not above it. */
#homeView .home-shortcut { flex-direction:row !important; align-items:center !important; gap:14px; }
