:root {
  --bg: #ffffff;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.58);
  --line: rgba(23, 23, 26, 0.1);
  --accent: #4b5dff;
}

*, *::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;
}
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; }

.tt { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(348px, 100%); padding: 16px 16px 14px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(23, 23, 26, 0.4); }
.tt__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.tt__head strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.tt__today { font-size: 12.500px; line-height: 16px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.tt__today b { font-weight: 720; color: var(--ink); font-variant-numeric: tabular-nums; }

.tt__projects { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 17px; background: rgba(23, 23, 26, 0.055); }
.tt__projects button { position: relative; z-index: 1; height: 30px; border-radius: 14px; font-size: 12.500px; font-weight: 690; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s ease; }
.tt__projects button[aria-checked="true"] { color: var(--ink); }
.tt__projects button:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.tt__thumb { position: absolute; left: 3px; top: 3px; width: calc((100% - 6px) / 3); height: 30px; border-radius: 14px; background: #ffffff; box-shadow: 0 1px 0 rgba(23, 23, 26, 0.06), 0 5px 9px -5px rgba(23, 23, 26, 0.4); }

/* the clock: the time and what it is worth on the left, the one round button on the right */
.tt__clock { display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 12px; padding: 2px 2px 2px 4px; }
.tt__read { display: grid; gap: 3px; min-width: 0; }
.tt__time { display: flex; height: 44px; font-size: 42px; line-height: 44px; font-weight: 640; font-stretch: 88%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt__d { display: block; height: 44px; overflow: hidden; }
.tt__d span { display: block; }
.tt__d.is-sep { opacity: 0.32; }
.tt__worth { display: flex; align-items: baseline; gap: 8px; font-size: 12.500px; line-height: 16px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.tt__worth b { font-weight: 720; color: var(--ink); font-variant-numeric: tabular-nums; }
.tt__clip { display: block; height: 16px; overflow: hidden; }
.tt__clip span { display: block; }
.tt__go { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; }
.tt__ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; pointer-events: none; }
.tt__lap { stroke: var(--accent); stroke-width: 2.400; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tt__face { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--ink); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 16px -10px rgba(23, 23, 26, 0.7); transition: background-color 0.3s ease; }
.tt__go.is-running .tt__face { background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 16px -10px var(--accent); }
.tt__face svg { display: block; width: 24px; height: 24px; fill: currentColor; stroke: currentColor; stroke-width: 2.400; stroke-linejoin: round; }
.tt__go:focus-visible .tt__face { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }

/* today's sessions: three rows in view, the newest on top; each row is placed by the script */
.tt__log { position: relative; height: 114px; border-radius: 14px; background: rgba(23, 23, 26, 0.04); overflow: hidden; }
.tt__row { position: absolute; left: 0; top: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; height: 38px; padding: 0 12px; }
.tt__row::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 1px; background: rgba(23, 23, 26, 0.07); }
.tt__what { display: grid; min-width: 0; }
.tt__what b { font-size: 13px; line-height: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt__what i { font-style: normal; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tt__len { font-size: 12.500px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tt__pay { min-width: 52px; text-align: right; font-size: 12.500px; font-weight: 620; color: var(--soft); font-variant-numeric: tabular-nums; }
.tt__row.is-new .tt__len { color: var(--accent); }

.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: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (max-width: 350px) { .tt { padding: 14px 13px 13px; } .tt__time { font-size: 38px; } .tt__row { padding: 0 10px; gap: 8px; } .tt__pay { min-width: 48px; } }
@media (max-height: 400px) { .tt { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .tt__projects button, .tt__face { transition: none; } }
