.mu-heat[data-mono] {
  --heat-paper: #fff;
  --heat-ink: #181818;
  --heat-muted: #5d5d5d;
  --heat-rule: #d2d2d2;
  --heat-zero: #ededed;
  --heat-one: #c2c2c2;
  --heat-two: #909090;
  --heat-three: #606060;
  --heat-four: #242424;
  --heat-label-width: 1.625rem;
  --heat-cell: clamp(.625rem,calc((100cqi - var(--heat-label-width)) / var(--heat-weeks) - var(--heat-gap)),.75rem);
  --heat-gap: clamp(.125rem,.37cqi,.1875rem);
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  container-type: inline-size;
  padding: clamp(1rem, 3.5vw, 2.1rem);
  color: var(--heat-ink);
  background: var(--heat-paper);
}
html[data-theme="dark"] .mu-heat[data-mono] {
  --heat-paper: #202020;
  --heat-ink: #f3f3f3;
  --heat-muted: #b8b8b8;
  --heat-rule: #484848;
  --heat-zero: #333;
  --heat-one: #626262;
  --heat-two: #929292;
  --heat-three: #c3c3c3;
  --heat-four: #f1f1f1;
}
.mu-heat-head h2 { font-size: 1.05rem; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; }
.mu-heat .mu-heat-stats { display: flex; flex-wrap: wrap; gap: .8rem clamp(1.1rem, 3.4cqi, 2.4rem); margin-block: .85rem 1.2rem; }
.mu-heat-stats > div { display: flex; flex-direction: column-reverse; gap: .12rem; }
.mu-heat-stats dt, .mu-heat-month, .mu-heat-weekdays, .mu-heat-key { color: var(--heat-muted); font-size: .7rem; font-weight: 500; line-height: 1.25; }
.mu-heat-stats dd { font-size: clamp(1.45rem, 3.25cqi, 1.8rem); font-weight: 625; line-height: 1.06; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }

.mu-heat-chart {
  position: relative;
  width: min(100%,calc(var(--heat-label-width) + var(--heat-weeks) * (var(--heat-cell) + var(--heat-gap))));
}
.mu-heat-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--heat-rule) transparent; }
.mu-heat-scroll:focus-visible { border-radius: .16rem; }
.mu-heat-grid { display: grid; grid-auto-flow: column; grid-template-columns: var(--heat-label-width); grid-auto-columns: var(--heat-cell); column-gap: var(--heat-gap); width: max-content; padding: .2rem 0 .4rem; }
.mu-heat-week, .mu-heat-weekdays { display: grid; grid-template-rows: 1rem repeat(7,var(--heat-cell)); row-gap: var(--heat-gap); }
.mu-heat-week { grid-template-columns: minmax(0,1fr); }
.mu-heat-month { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mu-heat-week:has(+ .mu-heat-week .mu-heat-month:not(:empty)) .mu-heat-month { visibility: hidden; }
.mu-heat-week:last-child .mu-heat-month:not(:empty) { justify-self: end; }
.mu-heat-weekdays { position: sticky; left: 0; z-index: 1; background: var(--heat-paper); }
.mu-heat-weekdays span { display: flex; align-items: center; }
.mu-heat-weekdays span:nth-child(1) { grid-row: 3; }
.mu-heat-weekdays span:nth-child(2) { grid-row: 5; }
.mu-heat-weekdays span:nth-child(3) { grid-row: 7; }
.mu-heat [data-level] { display: block; border-radius: .18rem; background: var(--heat-zero); }
.mu-heat [data-level="1"] { background: var(--heat-one); }
.mu-heat [data-level="2"] { background: var(--heat-two); }
.mu-heat [data-level="3"] { background: var(--heat-three); }
.mu-heat [data-level="4"] { background: var(--heat-four); }
.mu-heat time[data-inspecting] { outline: 1px solid var(--heat-ink); outline-offset: 1px; }
.mu-heat-tip {
  position: absolute; z-index: 2; pointer-events: none;
  max-width: 100%; padding: .38rem .6rem; border-radius: .32rem;
  color: var(--heat-paper); background: var(--heat-ink);
  font: 550 .73rem/1.4 system-ui,sans-serif; box-shadow: 0 2px 8px #0002;
}
.mu-heat-key { display: flex; align-items: center; justify-content: safe flex-end; gap: var(--heat-gap); margin-top: .45rem; }
.mu-heat-key span:first-child { margin-inline-end: .18rem; }
.mu-heat-key span:last-child { margin-inline-start: .18rem; }
.mu-heat-key i { flex: none; width: var(--heat-cell); height: var(--heat-cell); }
@media (forced-colors: active) {
  .mu-heat [data-level] { forced-color-adjust: none; border: 1px solid CanvasText; background: Canvas; }
  .mu-heat [data-level="1"] { background: color-mix(in srgb, CanvasText 25%, Canvas); }
  .mu-heat [data-level="2"] { background: color-mix(in srgb, CanvasText 50%, Canvas); }
  .mu-heat [data-level="3"] { background: color-mix(in srgb, CanvasText 75%, Canvas); }
  .mu-heat [data-level="4"] { background: CanvasText; }
}
