:root {
  --bg: #f1f0ec;
  --card: #ffffff;
  --ink: #17181c;
  --soft: rgba(23, 24, 28, 0.55);
  --line: rgba(23, 24, 28, 0.08);
  --accent: #7a63f0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(120% 90% at 50% 0%, #faf9f6 0%, var(--bg) 70%);
  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 10px;
}

.pi { position: relative; width: min(344px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); padding: 14px 14px 10px; border-radius: 26px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(23, 24, 28, 0.05), 0 30px 50px -32px rgba(23, 24, 28, 0.35); }

.pi__head { display: flex; align-items: center; gap: 10px; }
.pi__thumb { flex: none; width: 40px; height: 40px; border-radius: 12px; background: radial-gradient(90% 90% at 25% 20%, #ffd6a8, transparent 60%), linear-gradient(140deg, #f0705a, #7a63f0); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.pi__meta { flex: 1 1 auto; min-width: 0; }
.pi__title { font-size: 15px; line-height: 20px; font-weight: 720; font-stretch: 104%; white-space: nowrap; }
.pi__sub { font-size: 11.500px; line-height: 16px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi__reach { flex: none; text-align: right; }
.pi__big { display: block; font-size: 22px; line-height: 24px; font-weight: 780; font-stretch: 96%; letter-spacing: -0.02em; }
.pi__small { display: block; font-size: 10.500px; line-height: 14px; font-weight: 600; color: var(--soft); white-space: nowrap; }

/* the week of the reaction being read: one line that bends into the next */
.pi__chart { position: relative; margin-top: 12px; padding: 8px 10px 4px; border-radius: 16px; background: #f6f5f2; box-shadow: inset 0 0 0 1px var(--line); }
.pi__chart svg { display: block; width: 100%; height: 84px; overflow: visible; }
.pi__area { fill: url(#pi-fill); }
.pi__stop-a { stop-color: var(--accent); stop-opacity: 0.24; }
.pi__stop-b { stop-color: var(--accent); stop-opacity: 0; }
.pi__line { fill: none; stroke: var(--accent); stroke-width: 2.400; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pi__peak { position: absolute; left: 0; top: 0; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--ink); color: #ffffff; font-size: 11px; line-height: 20px; font-weight: 720; white-space: nowrap; pointer-events: none; }
.pi__days { display: flex; justify-content: space-between; margin-top: 2px; font-size: 9.500px; line-height: 14px; font-weight: 600; color: rgba(23, 24, 28, 0.4); }

.pi__rows { display: grid; gap: 2px; margin-top: 8px; }
.pi__row { --c: #7a63f0; position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr) 46px; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s; }
.pi__row[aria-checked="true"] { background: rgba(23, 24, 28, 0.05); }
.pi__row:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.pi__name { font-size: 12.500px; font-weight: 640; color: var(--soft); transition: color 0.2s; }
.pi__row[aria-checked="true"] .pi__name { color: var(--ink); }
.pi__bar { height: 6px; border-radius: 3px; background: rgba(23, 24, 28, 0.07); overflow: hidden; }
.pi__fill { display: block; height: 100%; border-radius: 3px; background: var(--c); transform-origin: 0 50%; transform: scaleX(0); opacity: 0.45; transition: opacity 0.25s; }
.pi__row[aria-checked="true"] .pi__fill { opacity: 1; }
.pi__val { text-align: right; font-size: 12.500px; font-weight: 740; }

@media (hover: hover) { .pi__row:hover { background: rgba(23, 24, 28, 0.04); } .pi__row[aria-checked="true"]:hover { background: rgba(23, 24, 28, 0.05); } }

.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; }
