/* v210.css — SPEC-v2.10 §4 (צבי: "תרחיב קצת את העמוד של הסטטיסטיקות שיהיה הרבה יותר מעניין"): the
   festive "📊 סטטיסטיקות" page of ui/stats.js, on top of v29.css (the range switch, the bars, the
   tiles, the family card stay as they were):
     the yellow note "🍽️ N ארוחות תוכננו" + "↑ יותר מ…" + three round magnets (.st-kpis),
     "💡 עובדה משעשעת" (a lilac note, 🔄 for another one), "🏆 מצעד המנות" (🥇🥈🥉 / a number
     circle, ↑ / ↓ / חדש, "עוד 5"), "⚖️ איזון" (a ring + a bar per kind: 🍞 / 🍗 / 🥗),
     "🌈 גיוון" (a green note, "🆕" chips), "🔥 רצף" (a peach note, a strip of 14 dots),
     "😴 מזמן לא אכלתם", "👤 כרטיס לכל אחד" (a small card per board, its colour on top),
     "📅 היום העמוס" (a bar per weekday, the whole row) and the family card's small tiles —
   and §1's "סוג:" row of chips in the dish editor (ui/menus.js).
   Like v29.css: built only from the app's shared variables (style.css), which theme-clean.css
   points at its own tokens, so the fridge look (default, where paper and notes stay light objects
   even in dark mode) and html[data-theme="clean"] (light and dark) both follow it; the clean-only
   rules below swap a fridge object for its flat twin and keep the three kinds apart (lemon / ink /
   green). The only numbers set from the page are --p (a ring's share, 0–100), --h (a weekday's
   bar, 0–100) and --bc (a board's colour, through safeColor).
   Every font-size follows the text-size slider (var(--ts) / var(--ts2)); every tap target >= 44px;
   nothing wider than a 360px phone. */

/* ---------------- the range switch: four across even with a very big text ---------------- */
/* (its words grow half as fast, like the board's dense chrome, and are never split: "3 חודשים") */
.sec-switch.st-range .sec-btn { padding-left: 2px; padding-right: 2px; font-size: calc(15.5px * var(--ts2)); overflow-wrap: normal; }

/* ---------------- "🍽️ N ארוחות תוכננו": the comparison and three round magnets ---------------- */
.st-cmp { margin-top: 4px; font: 700 calc(14px * var(--ts))/1.35 var(--font); color: var(--ink-soft); }
.st-cmp.up { color: var(--ink); }
.st-cmp.up > span { color: var(--marker-green); font-weight: 800; }
.st-kpis {
  list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin-top: 14px;
}
.st-kpi {
  min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 10px 4px 9px; border-radius: 16px; text-align: center;
  background: var(--g-white); box-shadow: var(--sh-white);
}
.st-kpi-v { font: 800 calc(20px * var(--ts))/1.1 var(--font); color: var(--ink); overflow-wrap: anywhere; }
.st-kpi-l { font: 700 calc(12.5px * var(--ts))/1.2 var(--font); color: var(--ink-soft); overflow-wrap: anywhere; }

/* ---------------- "💡 עובדה משעשעת": a lilac note, a little tilted ---------------- */
.st-fact {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px;
  transform: rotate(-0.6deg);
}
.st-fact-t { grid-column: 1 / -1; font: 800 calc(14px * var(--ts))/1.3 var(--font); color: var(--ink-soft); }
.st-fact .st-fact-x { font: 600 calc(19px * var(--ts))/1.45 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.st-fact-next {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(19px * var(--ts2)); line-height: 1;
  background: var(--g-round-white); box-shadow: var(--sh-round);
}
.st-fact-next:active { transform: translateY(1px); box-shadow: var(--rim-pressed); }

/* ---------------- "🏆 מצעד המנות" ---------------- */
.st-parade .st-line { align-items: center; gap: 8px; }
.st-medal { flex: none; font-size: calc(21px * var(--ts2)); line-height: 1; }
.st-rank {
  flex: none; width: calc(25px * var(--ts2)); height: calc(25px * var(--ts2)); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: 800 calc(12.5px * var(--ts2))/1 var(--font); color: var(--ink-soft);
  background: var(--g-round-white); box-shadow: var(--sh-round);
}
.st-podium .st-name { font-size: calc(19px * var(--ts)); }
.st-podium .st-bar { height: 12px; }
.st-p2 .st-bar i { background: var(--frame-b); }
.st-p3 .st-bar i { background: var(--doodle); }
/* ↑ / ↓ / חדש against the period before */
.st-trend {
  flex: none; min-width: 26px; padding: 2px 7px; border-radius: 999px; text-align: center;
  font: 800 calc(13px * var(--ts))/1.25 var(--font); white-space: nowrap;
}
.st-trend.up { color: var(--marker-green); background: rgba(46, 158, 79, 0.14); }
.st-trend.down { color: var(--marker-red); background: rgba(224, 57, 62, 0.11); }
.st-trend.new { color: var(--lemon-ink); background: var(--g-lemon); box-shadow: var(--rim-lemon); }
.st-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 44px; margin-top: 8px; border-radius: 12px;
  font: 700 calc(15px * var(--ts))/1.2 var(--font); color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.045);
}

/* ---------------- "⚖️ איזון": a ring (the score) beside a bar per kind ---------------- */
.st-bal-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
.st-ring {
  width: calc(108px * var(--ts2)); height: calc(108px * var(--ts2)); border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--marker-green) calc(var(--p, 0) * 1%), rgba(0, 0, 0, 0.08) 0);
}
.st-ring-in {
  width: 74%; height: 74%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--paper); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.st-ring-in b { font: 800 calc(24px * var(--ts2))/1 var(--font); color: var(--ink); }
.st-ring-in small { margin-top: 3px; font: 700 calc(11px * var(--ts2))/1.1 var(--font); color: var(--ink-soft); text-align: center; }
.st-roles { list-style: none; display: grid; gap: 10px; min-width: 0; }
.st-role-n { flex: 1 1 auto; min-width: 0; font: 700 calc(15.5px * var(--ts))/1.25 var(--font); color: var(--ink); }
.st-role .st-bar { margin-top: 4px; }
.st-role.r-carb .st-bar i { background: var(--doodle); }
.st-role.r-protein .st-bar i { background: var(--tom); }
.st-role.r-veg .st-bar i { background: var(--marker-green); }
.st-say { margin-top: 12px; font: 700 calc(18px * var(--ts))/1.35 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.st-bal .muted.small { margin-top: 8px; }
/* a very big text: the ring above the bars */
@media (max-width: 340px) {
  .st-bal-top { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .st-roles { width: 100%; }
}

/* ---------------- the notes of the page: "🌈 גיוון", "🔥 רצף" ---------------- */
.st-note .card-title { margin-bottom: 4px; }
.st-mid { font: 700 calc(19px * var(--ts))/1.3 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.st-mid .num { font: 800 calc(28px * var(--ts))/1 var(--font); }
.st-note p { margin-top: 4px; }
.st-note .st-h { margin-top: 14px; }
.st-count {
  display: inline-block; margin-inline-start: 4px; padding: 1px 8px; border-radius: 999px; vertical-align: middle;
  font: 800 calc(13px * var(--ts))/1.3 var(--font); color: var(--lemon-ink);
  background: var(--g-lemon); box-shadow: var(--rim-lemon);
}
.st-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip {
  max-width: 100%; padding: 5px 11px; border-radius: 999px;
  font: 600 calc(14.5px * var(--ts))/1.3 var(--font); color: var(--ink); overflow-wrap: anywhere;
  background: var(--g-white); box-shadow: var(--sh-white);
}
.st-chip.st-chip-more { background: transparent; box-shadow: none; color: var(--ink-soft); }
/* the last 14 days: a dot each (today = the last one, ringed) */
.st-strip {
  list-style: none; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px;
  margin: 12px 0 2px;
}
.st-strip li {
  justify-self: center; width: 100%; max-width: 22px; aspect-ratio: 1; border-radius: 50%;
  background: rgba(0, 0, 0, 0.09);
}
.st-strip li.on { background: var(--g-tom); box-shadow: var(--rim-on-color); }
.st-strip li.today { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ---------------- "😴 מזמן לא אכלתם" ---------------- */
.st-zz-list { list-style: none; }
.st-zz-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; }
.st-zz-row + .st-zz-row { border-top: 1.5px dashed var(--rule); }
.st-zz-row:last-child { padding-bottom: 2px; }
.st-ago {
  flex: none; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font: 700 calc(13px * var(--ts))/1.3 var(--font); color: var(--ink-soft);
  background: var(--g-round-white); box-shadow: var(--sh-round);
}

/* ---------------- "👤 כרטיס לכל אחד": a small card per board, its colour on top ---------------- */
.st-people {
  list-style: none; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
}
.st-person {
  min-width: 0; padding: 12px 12px 10px; border-radius: 12px;
  border-top: 5px solid var(--bc, var(--lemon));
  background: rgba(255, 255, 255, 0.75); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.st-p-head { display: flex; align-items: center; gap: 6px; font: 700 calc(16.5px * var(--ts))/1.25 var(--hand); color: var(--ink); }
.st-p-name { min-width: 0; overflow-wrap: anywhere; }
.st-p-meals { margin-top: 4px; font: 600 calc(14px * var(--ts))/1.3 var(--font); color: var(--ink-soft); }
.st-p-meals .num { font: 800 calc(18px * var(--ts))/1 var(--font); color: var(--ink); }
.st-person .st-bar { height: 8px; margin-top: 6px; }
.st-p-facts { display: grid; gap: 6px; margin-top: 10px; }
.st-p-facts dt { font: 700 calc(12.5px * var(--ts))/1.2 var(--font); color: var(--ink-soft); }
.st-p-facts dd { font: 600 calc(15px * var(--ts))/1.3 var(--hand); color: var(--ink); overflow-wrap: anywhere; }

/* ---------------- "📅 היום העמוס": the whole row, a bar per weekday ---------------- */
.st-tiles .st-tile-wide { grid-column: 1 / -1; }
.st-days {
  list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end;
  height: calc(74px * var(--ts2)); margin-top: 10px;
}
.st-days li { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.st-days i {
  display: block; width: 100%; max-width: 28px; min-height: 3px; height: calc(var(--h, 0) * 0.7%);
  border-radius: 6px 6px 3px 3px; background: var(--frame-a);
}
.st-days li.on i { background: var(--g-tom); box-shadow: var(--rim-on-color); }
.st-days span { font: 700 calc(12px * var(--ts2))/1 var(--font); color: var(--ink-soft); }
.st-days li.on span { color: var(--ink); }

/* ---------------- "👨‍👩‍👧 בכל המשפחה": its small tiles ---------------- */
.st-fam-tiles {
  list-style: none; display: grid; gap: 10px; margin: 12px 0 4px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}
.st-ft {
  min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px;
  border-radius: 12px; background: var(--g-white); box-shadow: var(--sh-white);
}
.st-ft-t { font: 700 calc(13px * var(--ts))/1.3 var(--font); color: var(--ink-soft); }
.st-ft-v { font: 700 calc(18px * var(--ts))/1.25 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.st-ft-s { font: 600 calc(13.5px * var(--ts))/1.3 var(--font); color: var(--ink-soft); overflow-wrap: anywhere; }
.st-ft-meals .st-ft-v { font: 800 calc(26px * var(--ts))/1.1 var(--font); }

/* ---------------- the dish editor's "סוג:" row (SPEC-v2.10 §1, ui/menus.js) ---------------- */
/* one small row under the name: 🍞 פחמימה · 🍗 חלבון · 🥗 ירקות — the guess "suggested" (dashed,
   lemon) + "(אוטומטי)"; chosen by hand: filled, and "↺ אוטומטי" to go back. It wraps, never scrolls. */
.de-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 4px; }
.de-roles .dr-lbl { font: 700 calc(14px * var(--ts))/1.2 var(--font); color: var(--ink-soft); }
.role-chip {
  min-height: 44px; display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap;
  background: transparent; box-shadow: none; border: 1.5px solid var(--ink-mute); color: var(--ink-soft);
  font: 600 calc(14px * var(--ts))/1.2 var(--font);
}
.role-chip.sug { border-style: dashed; border-color: var(--lemon-sub); background: var(--g-lemon); color: var(--lemon-ink); }
.role-chip.on {
  border-color: transparent; background: var(--g-member); box-shadow: var(--rim-on-color);
  color: var(--member-ink); font-weight: 700;
}
.role-chip:active { transform: translateY(1px) scale(0.98); }
.de-roles .dr-auto { font: 500 calc(12.5px * var(--ts))/1.2 var(--font); color: var(--ink-mute); }
.de-roles .dr-reset {
  min-height: 44px; padding: 4px 4px; background: none; border: 0; box-shadow: none;
  font: 600 calc(13px * var(--ts))/1.2 var(--font); color: var(--ink-soft); text-decoration: underline;
}

/* ---------------- the clean look ("לבן ולימון") ---------------- */
/* the yellow note → a soft lemon card; the magnets, tracks and cards → flat greys; the kinds:
   🍞 lemon · 🍗 ink · 🥗 green */
html[data-theme="clean"] .st-hero { background: var(--c-lemon-soft); border-color: transparent; }
html[data-theme="clean"] .st-kpi { background: var(--c-surface); box-shadow: none; }
html[data-theme="clean"] .st-cmp.up > span { color: var(--c-ok); }
html[data-theme="clean"] .st-fact { border-style: dashed; }
html[data-theme="clean"] .st-fact .st-fact-x { font-weight: 500; font-size: calc(17.5px * var(--ts)); }
html[data-theme="clean"] .st-fact-next:active { transform: none; background: var(--c-fill2); }
html[data-theme="clean"] .st-rank { background: var(--c-fill); box-shadow: none; }
html[data-theme="clean"] .st-podium .st-name { font-size: calc(17.5px * var(--ts)); }
html[data-theme="clean"] .st-trend.up { color: var(--c-ok); background: var(--c-fill); }
html[data-theme="clean"] .st-trend.down { color: var(--c-ink2); background: var(--c-fill); }
html[data-theme="clean"] .st-trend.new { background: var(--c-lemon); color: var(--c-on-lemon); box-shadow: none; }
html[data-theme="clean"] .st-more { background: var(--c-fill); color: var(--c-ink2); }
html[data-theme="clean"] .st-ring { background: conic-gradient(var(--c-ok) calc(var(--p, 0) * 1%), var(--c-fill) 0); }
html[data-theme="clean"] .st-ring-in { background: var(--c-surface); box-shadow: none; }
html[data-theme="clean"] .st-ring-in b { font-weight: 700; }
html[data-theme="clean"] .st-role.r-carb .st-bar i { background: var(--c-lemon); }
html[data-theme="clean"] .st-role.r-protein .st-bar i { background: var(--c-ink); }
html[data-theme="clean"] .st-role.r-veg .st-bar i { background: var(--c-ok); }
html[data-theme="clean"] .st-say { font-weight: 600; font-size: calc(17px * var(--ts)); }
html[data-theme="clean"] .st-mid { font-weight: 600; }
html[data-theme="clean"] .st-mid .num { font-weight: 700; }
html[data-theme="clean"] .st-count { background: var(--c-lemon); color: var(--c-on-lemon); box-shadow: none; }
html[data-theme="clean"] .st-chip { background: var(--c-fill); box-shadow: none; }
html[data-theme="clean"] .st-chip.st-chip-more { background: transparent; }
html[data-theme="clean"] .st-strip li { background: var(--c-fill2); }
html[data-theme="clean"] .st-strip li.on { background: var(--c-lemon); box-shadow: none; }
html[data-theme="clean"] .st-strip li.today { outline-color: var(--c-ink); }
html[data-theme="clean"] .st-zz-row + .st-zz-row { border-top-style: solid; border-top-width: 1px; }
html[data-theme="clean"] .st-ago { background: var(--c-fill); box-shadow: none; color: var(--c-ink2); }
html[data-theme="clean"] .st-person { background: var(--c-fill); box-shadow: none; border-radius: 14px; border-top-width: 4px; }
html[data-theme="clean"] .st-p-head, html[data-theme="clean"] .st-p-facts dd { font-weight: 600; }
html[data-theme="clean"] .st-days i { background: var(--c-fill2); }
html[data-theme="clean"] .st-days li.on i { background: var(--c-lemon); box-shadow: none; }
html[data-theme="clean"] .st-ft { background: var(--c-fill); box-shadow: none; }
html[data-theme="clean"] .st-ft-v { font-weight: 600; }
html[data-theme="clean"] .st-ft-meals .st-ft-v { font-weight: 700; }
/* the dish editor's "סוג:" row: grey outline, the guess on soft lemon, chosen = ink (as .opt-btn.on) */
html[data-theme="clean"] .de-roles .dr-lbl { font-weight: 600; color: var(--c-ink2); }
html[data-theme="clean"] .role-chip { border-color: var(--c-ink4); color: var(--c-ink2); font-weight: 500; }
html[data-theme="clean"] .role-chip.sug { border-color: var(--c-ink4); background: var(--c-lemon-soft); color: var(--c-ink); }
html[data-theme="clean"] .role-chip.on { border-color: transparent; background: var(--c-ink); color: var(--c-bg); box-shadow: none; font-weight: 600; }
html[data-theme="clean"] .role-chip:active { transform: scale(0.98); }
html[data-theme="clean"] .de-roles .dr-reset { color: var(--c-ink2); font-weight: 500; }

/* v2.12 (צבי): a dish in the stats is a button to its menu; its row there lights up for a moment */
.st-dish {
  all: unset; cursor: pointer; font: inherit; color: inherit; overflow-wrap: anywhere;
  text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  border-radius: 4px; -webkit-tap-highlight-color: transparent;
}
.st-dish:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.st-dish:active { opacity: 0.6; }
.dish-row.st-lit { animation: st-lit 2.4s ease-out; }
@keyframes st-lit { 0%, 45% { background: rgba(255, 205, 40, 0.42); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .dish-row.st-lit { animation: none; background: rgba(255, 205, 40, 0.3); } }
/* …and the whole row of a list is a tap target too */
.st-row[data-act], .st-zz-row[data-act] { cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 8px; }
.st-row[data-act]:active, .st-zz-row[data-act]:active { background: rgba(255, 205, 40, 0.22); }
