.ms-stats {
  --ms-surface: var(--wow-surface, var(--surface));
  --ms-surface-2: var(--wow-surface-strong, var(--surface-2));
  --ms-ink: var(--wow-ink, var(--text));
  --ms-muted: var(--wow-muted, var(--muted));
  --ms-line: var(--wow-line, var(--line));
  --ms-accent: var(--wow-cyan, var(--cyan));
  --ms-chart: #239bac;
  --ms-chart-active: var(--ms-accent);
  min-width: 0;
  padding: clamp(28px, 4vw, 56px) 0 20px;
  color: var(--ms-ink);
}
html[data-theme="dark"] .ms-stats,
html[data-theme="system"][data-theme-auto-resolved="dark"] .ms-stats { --ms-chart: #55bdcd; }
.ms-stats h1, .ms-stats h2, .ms-stats h3, .ms-stats p { margin: 0; }
.ms-stats svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ms-stats__heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.ms-stats__eyebrow { display: block; color: var(--ms-accent); font-size: 11px; font-weight: 800; line-height: 1.4; text-transform: uppercase; letter-spacing: .1em; }
.ms-stats .ms-stats__heading h1 { margin-top: 8px; font-size: clamp(34px, 4vw, 56px); font-weight: 850; line-height: 1.05; letter-spacing: -.045em; }
.ms-stats__heading h1 span { color: var(--ms-accent); }
.ms-stats .ms-stats__heading p { max-width: 600px; margin-top: 14px; color: var(--ms-muted); font-size: 15px; line-height: 1.6; }
.ms-stats__timezone { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--ms-muted); font-size: 12px; font-weight: 600; }
.ms-stats__timezone svg { width: 18px; height: 18px; }
.ms-stats__summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; border: 1px solid var(--ms-line); border-radius: 8px; background: var(--ms-surface); }
.ms-stats__kpi { position: relative; min-width: 0; padding: 23px 25px; }
.ms-stats__kpi + .ms-stats__kpi { border-left: 1px solid var(--ms-line); }
.ms-stats__kpi--accent::after { position: absolute; bottom: -1px; left: 25px; right: 25px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ms-chart); content: ""; }
.ms-stats__kpi-label { display: flex; align-items: center; gap: 9px; color: var(--ms-muted); font-size: 13px; font-weight: 650; line-height: 1.35; }
.ms-stats__kpi-label svg { width: 20px; height: 20px; color: var(--ms-accent); }
.ms-stats__kpi strong { display: block; margin: 15px 0 6px; font-size: clamp(27px, 3vw, 42px); font-weight: 800; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ms-stats__kpi small { color: var(--ms-muted); font-size: 11px; line-height: 1.5; }
.ms-stats__panel { min-width: 0; border: 1px solid var(--ms-line); border-radius: 8px; background: var(--ms-surface); }
.ms-stats__activity { padding: 26px 28px 22px; }
.ms-stats__panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.ms-stats .ms-stats__panel-heading h2 { margin-top: 6px; font-size: clamp(19px, 2vw, 25px); font-weight: 780; line-height: 1.25; letter-spacing: -.025em; }
.ms-stats__periods { display: inline-flex; flex-shrink: 0; gap: 3px; padding: 4px; border: 1px solid var(--ms-line); border-radius: 6px; background: color-mix(in srgb, var(--ms-line) 12%, var(--ms-surface)); }
.ms-stats__periods a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 14px; border-radius: 3px; color: var(--ms-muted); font-size: 12px; font-weight: 750; white-space: nowrap; transition: color .15s, background .15s; }
.ms-stats__periods a:hover { color: var(--ms-ink); background: var(--ms-surface-2); }
.ms-stats__periods a.is-active { background: var(--ms-accent); color: var(--ms-surface); }
.ms-stats__chart-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 24px 0 12px; color: var(--ms-muted); font-size: 12px; }
.ms-stats__chart-caption p { color: var(--ms-ink); font-weight: 700; }
.ms-stats__chart-caption p span { color: var(--ms-muted); font-weight: 500; }
.ms-stats__today-note { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.ms-stats__today-note i { width: 7px; height: 7px; border: 1px solid var(--ms-accent); border-radius: 2px; background: color-mix(in srgb, var(--ms-chart) 30%, transparent); }
.ms-stats__chart-layout { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; margin-top: 3px; }
.ms-stats__chart-layout.is-enhanced { grid-template-columns: 51px minmax(0, 1fr); }
.ms-stats__axis { position: relative; display: none; height: 284px; color: var(--ms-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.is-enhanced .ms-stats__axis { display: block; }
.ms-stats__axis span { position: absolute; right: 12px; transform: translateY(-50%); }
.ms-stats__chart-scroll { min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: var(--ms-line) transparent; scrollbar-width: thin; }
.ms-stats__chart-canvas { min-width: 0; }
.ms-stats__chart-canvas > svg { display: block; overflow: visible; font-family: inherit; }
.ms-stats__grid-line { stroke: var(--ms-line); stroke-width: 1; stroke-dasharray: 3 5; }
.ms-stats__baseline { stroke: var(--ms-line); stroke-width: 1; }
.ms-stats__bar rect { stroke: none; fill: var(--ms-chart); }
.ms-stats__bar.is-today .ms-stats__bar-column { fill: color-mix(in srgb, var(--ms-chart) 42%, var(--ms-surface)); stroke: var(--ms-chart); stroke-width: 1; stroke-dasharray: 4 3; }
.ms-stats__bar .ms-stats__bar-hit { fill: transparent; stroke: none; }
.ms-stats__bar.is-selected .ms-stats__bar-column,
.ms-stats__bar:hover .ms-stats__bar-column,
.ms-stats__bar:focus-visible .ms-stats__bar-column { fill: var(--ms-chart-active); stroke: var(--ms-ink); stroke-width: 1.5; }
.ms-stats__bar:focus { outline: none; }
.ms-stats__bar:focus-visible .ms-stats__bar-hit { stroke: var(--ms-accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.ms-stats__bar .ms-stats__bar-empty { fill: none; stroke: var(--ms-muted); stroke-width: 1.2; stroke-dasharray: 2 3; }
.ms-stats__bar text { fill: var(--ms-muted); stroke: none; font-size: 10px; font-variant-numeric: tabular-nums; }
.ms-stats__bar .ms-stats__bar-value { fill: var(--ms-ink); font-size: 10px; font-weight: 650; }
.ms-stats__bar.is-today .ms-stats__bar-date { fill: var(--ms-accent); font-weight: 750; }
.ms-stats__chart-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--ms-muted); font-size: 11px; }
.ms-stats__chart-footer p { display: flex; align-items: center; gap: 7px; }
.ms-stats__key { width: 8px; height: 8px; border-radius: 2px; background: var(--ms-chart); }
.ms-stats__selection { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 72px; margin-top: 18px; padding: 13px 17px; border: 1px solid var(--ms-line); border-radius: 5px; background: color-mix(in srgb, var(--ms-line) 10%, var(--ms-surface)); }
.ms-stats__selection > div > span { display: block; font-size: 13px; font-weight: 750; }
.ms-stats__selection small { display: block; min-height: 14px; margin-top: 5px; color: var(--ms-muted); font-size: 10px; }
.ms-stats__selection dl { display: flex; gap: 28px; margin: 0; }
.ms-stats__selection dt { color: var(--ms-muted); font-size: 10px; }
.ms-stats__selection dd { margin: 5px 0 0; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ms-stats__fallback { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(42px, 1fr); gap: 8px; min-width: 100%; height: 284px; margin: 0; padding: 26px 0 30px; list-style: none; }
.ms-stats__fallback-day { position: relative; display: flex; align-items: end; height: 100%; min-width: 0; }
.ms-stats__fallback-bar { display: block; width: 100%; height: 100%; }
.ms-stats__fallback-bar rect { fill: var(--ms-chart); stroke: none; }
.ms-stats__fallback-day.is-today .ms-stats__fallback-bar { opacity: .5; }
.ms-stats__fallback-day.is-missing .ms-stats__fallback-bar rect { fill: none; stroke: var(--ms-muted); stroke-width: 1px; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.ms-stats__fallback-value { position: absolute; top: -21px; left: 50%; transform: translateX(-50%); font-size: 10px; white-space: nowrap; }
.ms-stats__fallback-date { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); color: var(--ms-muted); font-size: 10px; white-space: nowrap; }
.ms-stats__method { margin-top: 24px; padding: 24px 28px; }
.ms-stats .ms-stats__method > p { max-width: 1000px; margin-top: 15px; color: var(--ms-muted); font-size: 13px; line-height: 1.75; }
.ms-stats__method details { margin-top: 14px; }
.ms-stats__method summary { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ms-accent); font-size: 12px; font-weight: 750; list-style: none; cursor: pointer; }
.ms-stats__method summary::-webkit-details-marker { display: none; }
.ms-stats__method summary svg { width: 16px; height: 16px; transition: transform .15s; }
.ms-stats__method details[open] summary svg { transform: rotate(180deg); }
.ms-stats__method details > div { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ms-line); }
.ms-stats__method details p { color: var(--ms-muted); font-size: 12px; line-height: 1.65; }
.ms-stats__empty { display: grid; justify-items: center; align-content: center; min-height: 280px; padding: 35px 15px; text-align: center; }
.ms-stats__empty svg { width: 52px; height: 52px; margin-bottom: 16px; color: var(--ms-accent); }
.ms-stats__empty h3 { font-size: 17px; }
.ms-stats .ms-stats__empty p { max-width: 330px; margin-top: 10px; color: var(--ms-muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 980px) {
  .ms-stats__kpi { padding: 20px 17px; }
  .ms-stats__kpi-label { gap: 6px; font-size: 11px; }
  .ms-stats__panel-heading { align-items: start; gap: 18px; }
  .ms-stats__activity > .ms-stats__panel-heading { flex-direction: column; }
  .ms-stats__method { padding: 22px; }
}
@media (max-width: 700px) {
  .ms-stats__heading { align-items: start; flex-direction: column; gap: 15px; }
  .ms-stats__heading p { font-size: 13px; }
  .ms-stats__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
  .ms-stats__kpi { padding: 20px 18px; }
  .ms-stats__kpi:nth-child(3) { border-left: 0; }
  .ms-stats__kpi:nth-child(n+3) { border-top: 1px solid var(--ms-line); }
  .ms-stats__kpi strong { margin-top: 13px; font-size: 33px; }
  .ms-stats__activity { padding: 22px 18px 18px; }
  .ms-stats__chart-caption { flex-direction: column; gap: 8px; }
  .ms-stats__chart-caption p span { display: block; margin-top: 5px; font-size: 11px; }
  .ms-stats__method { margin-top: 18px; }
  .ms-stats__selection { flex-direction: column; align-items: stretch; gap: 13px; }
  .ms-stats__selection dl { justify-content: space-between; gap: 15px; }
}
@media (max-width: 400px) {
  .ms-stats__kpi { padding: 17px 12px; }
  .ms-stats__kpi-label { font-size: 10px; }
  .ms-stats__kpi-label svg { width: 16px; height: 16px; }
  .ms-stats__kpi strong { font-size: 28px; }
  .ms-stats__kpi small { font-size: 10px; }
  .ms-stats__activity { padding-right: 12px; padding-left: 12px; }
  .ms-stats__periods { width: 100%; }
  .ms-stats__periods a { flex: 1; padding: 7px 9px; font-size: 11px; }
  .ms-stats__chart-layout.is-enhanced { grid-template-columns: 40px minmax(0, 1fr); }
  .ms-stats__axis span { right: 7px; font-size: 9px; }
  .ms-stats__method { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-stats *, .ms-stats *::before, .ms-stats *::after { transition: none !important; }
}
