:root {
  --bg: #000000;
  --card: #141416;
  --ink: #f4f4f6;
  --soft: rgba(244, 244, 246, 0.56);
  --line: rgba(244, 244, 246, 0.12);
  --accent: #5fe0a8;
  --miss: #ffb347;
}

*, *::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: 8px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.cv { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; width: min(348px, 100%); padding: 15px 16px 15px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 50px -30px rgba(0, 0, 0, 0.9); }
.cv__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px; }
.cv__file { display: grid; gap: 1px; min-width: 0; }
.cv__file strong { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 18px; font-weight: 700; }
.cv__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; }
.cv__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }
.cv__file .cv__clip { font-size: 12px; font-weight: 620; color: var(--soft); }
.cv__pct { display: flex; align-items: baseline; gap: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv__pct b { font-size: 30px; line-height: 34px; font-weight: 700; font-stretch: 90%; letter-spacing: -0.02em; }
.cv__pct i { font-style: normal; font-size: 15px; font-weight: 700; color: var(--soft); }
.cv__bar { position: relative; height: 4px; border-radius: 2px; background: rgba(244, 244, 246, 0.1); overflow: hidden; }
.cv__bar i:first-child { position: absolute; inset: 0; border-radius: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.cv__shine { position: absolute; top: 0; left: 0; width: 34%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent); opacity: 0; }

/* the code: per line a number, a strip saying whether tests reached it, the text, and how many times it ran */
.cv__code { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); padding: 6px 0; border-radius: 14px; background: rgba(0, 0, 0, 0.38); box-shadow: inset 0 0 0 1px rgba(244, 244, 246, 0.06); font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.500px; line-height: 16px; overflow: hidden; }
.cv__ln { position: relative; display: grid; grid-template-columns: 22px 3px minmax(0, 1fr) auto; align-items: center; column-gap: 7px; height: 16px; padding: 0 10px 0 4px; outline: none; cursor: default; }
.cv__ln::before { content: ""; position: absolute; inset: 0; background: rgba(244, 244, 246, 0.07); opacity: 0; transition: opacity 0.15s ease; }
.cv__ln.is-peek::before, .cv__ln:focus-visible::before { opacity: 1; }
.cv__n { position: relative; text-align: right; color: rgba(244, 244, 246, 0.3); font-variant-numeric: tabular-nums; }
.cv__strip { position: relative; display: block; width: 3px; height: 12px; border-radius: 1.500px; overflow: hidden; }
.cv__strip i { display: block; width: 100%; height: 100%; border-radius: 1.500px; background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); }
.cv__ln.is-miss .cv__strip i { background: repeating-linear-gradient(180deg, var(--miss) 0 2px, transparent 2px 4px); }
.cv__src { position: relative; white-space: pre; overflow: hidden; color: rgba(244, 244, 246, 0.9); }
.cv__src .k { color: rgba(244, 244, 246, 0.5); }
.cv__src .s { color: color-mix(in srgb, var(--accent) 60%, #ffffff); }
.cv__hits { position: relative; min-width: 20px; text-align: right; color: rgba(244, 244, 246, 0.42); font-variant-numeric: tabular-nums; opacity: 0; }
.cv__ln.is-miss .cv__hits { color: var(--miss); }
/* the line no test reaches: a hatched band behind it, as well as the dashed strip and the zero */
.cv__hatch { position: absolute; inset: 0 0 0 33px; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--miss) 26%, transparent) 0 3px, transparent 3px 7px); opacity: 0; pointer-events: none; }

.cv__info { padding: 0 2px; }
.cv__info .cv__clip { font-size: 12px; font-weight: 620; color: var(--soft); }
.cv__btn { display: grid; place-items: center; height: 44px; border-radius: 22px; background: var(--ink); color: #0c0c0e; font-size: 14px; font-weight: 730; white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 14px 20px -12px rgba(244, 244, 246, 0.3); }
.cv__btn:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #ffffff; stroke: #0c0c0e; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); z-index: 6; }

@media (max-width: 350px) { .cv { padding: 13px 13px 13px; } .cv__code { font-size: 10px; } .cv__ln { grid-template-columns: 18px 3px minmax(0, 1fr) auto; column-gap: 5px; padding: 0 7px 0 3px; } .cv__hits { min-width: 17px; } .cv__hatch { left: 26px; } }
@media (prefers-reduced-motion: reduce) { .cv__ln::before { transition: none; } }
