/* Respark console — Home in the live style (Mutaz, 2026-11-05, from the approved prototype):
   one period for the page (quick chips + the kit's range picker), a live mark, a hero trend with a glowing line and a
   pulsing last point, small trends with their change on the cards. Colours come from the console's look (--pol-chart,
   --card, --muted…), so every palette, light or dark, glass or solid cards, keeps working. Motion stops under reduced motion. */
body.pol .ov-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin:-4px 0 14px}
body.pol .ov-live{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 12px;border-radius:999px;background:color-mix(in srgb,#16a34a 12%,var(--card));color:var(--ink);font:500 13px/1.6 var(--f-body)}
body.pol .ov-live b{font-weight:700;color:#0c5132}
body.pol[data-dark="1"] .ov-live b{color:#86efac}
body.pol .ov-live .num{color:var(--muted)}
body.pol .ov-dot{position:relative;display:inline-block;width:8px;height:8px;flex:none;border-radius:50%;background:#16a34a}
body.pol .ov-dot::after{content:"";position:absolute;inset:0;border-radius:50%;background:#16a34a;will-change:transform,opacity;animation:ovPulse 1.8s ease-out 3}
@keyframes ovPulse{0%{opacity:.55;transform:scale(1)}100%{opacity:0;transform:scale(3)}}
body.pol .ov-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body.pol .ov-chips{display:inline-flex;gap:2px;padding:3px;border-radius:999px;background:var(--card);box-shadow:var(--pol-card)}
body.pol .ov-chip{border:0;background:transparent;color:var(--muted);font:600 13px/1.5 var(--f-body);min-height:34px;min-width:44px;padding:0 12px;border-radius:999px;cursor:pointer;transition:background .2s,color .2s}
body.pol .ov-chip:hover{color:var(--ink);background:var(--soft)}
body.pol .ov-chip.on{background:var(--black);color:var(--card)}

/* the hero */
body.pol .kpi.ov-hero{display:flex;flex-direction:column;gap:6px;padding:18px 20px 12px;margin-bottom:14px}
body.pol .ovh-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
body.pol .ovh-tag{display:inline-flex;align-items:center;gap:6px;padding:0 10px;border-radius:999px;background:color-mix(in srgb,#16a34a 12%,var(--card));color:#0c5132;font:700 12px/1.85 var(--f-body)}
body.pol[data-dark="1"] .ovh-tag{color:#86efac}
body.pol .ovh-per{margin-inline-start:auto;padding:0 10px;border-radius:999px;background:color-mix(in srgb,var(--pol-chart) 14%,var(--card));color:var(--black);font:700 12px/1.85 var(--f-body)}
body.pol .ovh-val{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px}
body.pol .ovh-val b{font:700 44px/1.45 var(--f-num);color:var(--black);letter-spacing:-.01em;font-variant-numeric:tabular-nums}
body.pol .ovh-chart{display:block;width:100%;height:auto;overflow:visible;margin-top:4px}
body.pol .ovh-chart .grid{stroke:var(--line);stroke-width:1;opacity:.7}
body.pol .ovh-line{fill:none;stroke:var(--pol-chart);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 6px 8px color-mix(in srgb,var(--pol-chart) 45%,transparent))}
body.pol .ovh-end{fill:var(--card);stroke:var(--pol-chart);stroke-width:3}
/* the pulse runs three times each time fresh numbers arrive (a page left open does not animate for ever), as an HTML ring over the last point, animated with transform and opacity only (the compositor draws it;
   an animated SVG stroke or box-shadow would repaint the glass cards every frame) */
body.pol .ovh-plot{position:relative}
body.pol .ovh-ring{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid var(--pol-chart);box-sizing:border-box;pointer-events:none;will-change:transform,opacity;animation:ovRing 1.8s ease-out 3 forwards}
@keyframes ovRing{0%{opacity:.6;transform:scale(1)}100%{opacity:0;transform:scale(2.6)}}
body.pol .ovh-axis{display:flex;justify-content:space-between;gap:8px;color:var(--muted);font:500 12px/1.85 var(--f-body)}

/* the cards: a value with its change, the sub line, then a small trend */
body.pol #kpis .k-val{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;font-variant-numeric:tabular-nums}
body.pol #kpis .k-val .pol-delta{font-size:12px}
body.pol .k-spark{display:block;width:100%;height:auto;margin-top:auto;padding-top:6px}
body.pol .k-spark .sp-line{fill:none;stroke:var(--pol-chart);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body.pol .k-spark .sp-area{fill:color-mix(in srgb,var(--pol-chart) 16%,transparent)}
body.pol #kpis .kpi{transition:transform .25s ease,box-shadow .25s ease}
body.pol #kpis .kpi:hover,body.pol .kpi.ov-hero:hover{transform:translateY(-2px);box-shadow:0 1px 0 rgba(26,26,26,.07),0 14px 30px -14px color-mix(in srgb,var(--pol-chart) 45%,transparent)}

@media (max-width:640px){
  body.pol .ov-bar{align-items:stretch}
  body.pol .ov-tools{width:100%}
  body.pol .ovh-val b{font-size:34px}
  body.pol .ovh-per{margin-inline-start:0}
}
@media (prefers-reduced-motion:reduce){
  body.pol .ov-dot::after,body.pol .ovh-ring{animation:none}
  body.pol .ov-dot::after{display:none}
  body.pol .ovh-ring{display:none}
  body.pol #kpis .kpi,body.pol .ov-chip{transition:none}
  body.pol #kpis .kpi:hover,body.pol .kpi.ov-hero:hover{transform:none}
}
@media print{body.pol .ov-bar{display:none}}
