:root {
  --bg: #f6f4f0;
  --card: #ffffff;
  --ink: #17181c;
  --soft: rgba(23, 24, 28, 0.56);
  --line: rgba(23, 24, 28, 0.09);
  --accent: #ee5a2a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.co { --n: 7; width: min(360px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 14px 14px 16px; border-radius: 24px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(23, 24, 28, 0.04), 0 22px 40px -28px rgba(23, 24, 28, 0.3); }
.co__roll { display: block; overflow: hidden; }
.co__roll > * { display: block; white-space: nowrap; }

.co__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 46px; }
.co__titles { display: grid; gap: 2px; min-width: 0; }
.co__name { font-size: 15px; font-weight: 740; font-stretch: 104%; }
.co__what { height: 17px; line-height: 17px; font-size: 12px; font-weight: 600; color: var(--soft); }
.co__read { display: grid; justify-items: end; gap: 0; }
.co__num { font-size: 30px; line-height: 30px; font-weight: 760; font-stretch: 106%; letter-spacing: -0.03em; }
.co__num i { font-style: normal; font-size: 16px; font-weight: 720; color: var(--soft); margin-left: 1px; }
.co__who { height: 16px; line-height: 16px; font-size: 11.500px; font-weight: 620; color: var(--soft); text-align: right; }

.co__grid { position: relative; display: grid; grid-template-columns: 46px repeat(var(--n), minmax(0, 1fr)); gap: 3px; outline: none; border-radius: 10px; touch-action: pan-y; cursor: default; }
.co__grid:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.co__col, .co__row { height: 24px; display: flex; align-items: center; font-size: 10.500px; font-weight: 640; color: var(--soft); white-space: nowrap; transition: color 0.2s; }
.co__col { justify-content: center; height: 18px; }
.co__col.is-on, .co__row.is-on { color: var(--ink); font-weight: 760; }
.co__cell { position: relative; height: 24px; border-radius: 7px; }
.co__cell i { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: var(--tint); color: var(--on); font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: -0.01em; transition: opacity 0.25s, box-shadow 0.25s; }
.co__avg i { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.co__row.co__avgname { color: var(--ink); font-weight: 720; }
.co__gap { grid-column: 1 / -1; height: 3px; }
/* a cell is being read: its row, its column and the diagonal of the same calendar week stay, the rest steps back */
.co__grid.has-read .co__cell:not(.is-near) i { opacity: 0.34; }
.co__grid.has-read .co__cell.is-diag i { box-shadow: inset 0 0 0 1.500px color-mix(in srgb, var(--ink) 55%, transparent); }
.co__grid.has-read .co__avg.is-near i { box-shadow: inset 0 0 0 1.500px var(--ink); }

/* the frame that follows the cell being read, on a spring */
.co__lens { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 9px; box-shadow: 0 0 0 2px var(--ink), 0 8px 16px -6px rgba(23, 24, 28, 0.5); opacity: 0; pointer-events: none; z-index: 2; will-change: transform; }

.co__say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; pointer-events: none; opacity: 0; fill: var(--ink); stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(23, 24, 28, 0.3)); z-index: 5; }

@media (max-width: 350px) {
  .co { padding: 14px 12px 12px 14px; gap: 10px; }
  .co__grid { grid-template-columns: 40px repeat(var(--n), minmax(0, 1fr)); gap: 2px; }
  .co__cell i { font-size: 9.500px; }
  .co__col, .co__row { font-size: 10px; }
}
@media (max-height: 360px) {
  .co__cell, .co__row { height: 20px; }
  .co__head { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .co__cell i, .co__col, .co__row { transition: none; }
}
