:root {
  --bg: #ffffff;
  --ink: #15171c;
  --soft: rgba(21, 23, 28, 0.56);
  --line: rgba(21, 23, 28, 0.09);
  --accent: #4b3bff;
  --good: #159a5c;
  --warn: #d98312;
  --late: #d8452e;
}

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

/* --tone is the colour of the status: red off track, amber at risk, green on track */
.okr { --tone: var(--late); width: min(344px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 16px 12px; border-radius: 24px; background: #ffffff; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(21, 23, 28, 0.04), 0 22px 40px -28px rgba(21, 23, 28, 0.3); }
.okr__roll { display: block; overflow: hidden; }
.okr__roll > * { display: block; white-space: nowrap; }

.okr__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 24px; }
.okr__when { font-size: 13px; font-weight: 700; font-stretch: 104%; }
.okr__when i { font-style: normal; font-weight: 600; color: var(--soft); margin-left: 6px; }
.okr__status { height: 24px; line-height: 24px; padding: 0 10px; border-radius: 12px; background: color-mix(in srgb, var(--tone) 12%, transparent); color: var(--tone); font-size: 12px; font-weight: 720; transition: color 0.35s, background-color 0.35s; }

.okr__goal { display: flex; align-items: center; gap: 14px; }
.okr__ring { position: relative; flex: none; width: 64px; height: 64px; }
.okr__ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.okr__track { fill: none; stroke: rgba(21, 23, 28, 0.07); stroke-width: 6; }
.okr__arc { fill: none; stroke: var(--tone); stroke-width: 6; stroke-linecap: round; transition: stroke 0.35s; }
.okr__notch { stroke: var(--ink); stroke-width: 1.600; stroke-linecap: round; }
.okr__pct { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 22px; font-size: 18px; line-height: 20px; font-weight: 760; font-stretch: 104%; letter-spacing: -0.02em; }
.okr__pct i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--soft); margin-left: 1px; }
.okr__text { min-width: 0; display: grid; gap: 3px; }
.okr__label { font-size: 11px; font-weight: 680; letter-spacing: 0.04em; text-transform: uppercase; color: var(--soft); }
.okr__title { font-size: 19px; line-height: 22px; font-weight: 740; font-stretch: 104%; letter-spacing: -0.015em; text-wrap: balance; }

.okr__list { display: grid; gap: 2px; margin: 0 -8px; }
.okr__kr { position: relative; display: grid; gap: 7px; width: 100%; padding: 8px 8px 10px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s; }
.okr__kr:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.okr__kr.is-press, .okr__kr:active { background: rgba(21, 23, 28, 0.045); }
@media (hover: hover) { .okr__kr:hover { background: rgba(21, 23, 28, 0.035); } }
.okr__in { display: grid; gap: 7px; }
.okr__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; height: 18px; }
.okr__name { position: relative; font-size: 13.500px; font-weight: 640; white-space: nowrap; }
.okr__val { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--soft); font-weight: 600; white-space: nowrap; }
.okr__val .okr__roll { height: 18px; line-height: 18px; }
.okr__val b { font-weight: 740; color: var(--ink); }
.okr__tick { width: 14px; height: 14px; margin-left: -19px; opacity: 0; fill: none; stroke: var(--good); stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset 0.4s cubic-bezier(0.3, 0.7, 0.2, 1) 0.15s, margin-left 0.35s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.2s; }
.okr__kr.is-done .okr__tick { margin-left: 0; opacity: 1; stroke-dashoffset: 0; }
.okr__bar { position: relative; height: 8px; }
.okr__rail { position: absolute; inset: 0; border-radius: 4px; background: rgba(21, 23, 28, 0.07); overflow: hidden; }
.okr__fill { position: absolute; inset: 0; }
.okr__fill i { position: absolute; inset: 0; border-radius: 4px; background: var(--accent); transition: background-color 0.35s; }
.okr__fill i::after { content: ""; position: absolute; inset: 1px 2px auto 2px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.34); }
.okr__kr.is-done .okr__fill i { background: var(--good); }
.okr__pace { position: absolute; top: -3px; bottom: -3px; width: 1.600px; margin-left: -0.800px; border-radius: 1px; background: var(--ink); }
.okr__delta { position: absolute; left: 100%; top: 0; margin-left: 8px; height: 18px; line-height: 18px; padding: 0 7px; border-radius: 9px; background: var(--ink); color: #ffffff; font-size: 11px; font-weight: 720; white-space: nowrap; opacity: 0; pointer-events: none; }

.okr__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 16px; font-size: 11.500px; font-weight: 600; color: var(--soft); }
.okr__key { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.okr__key i { width: 1.600px; height: 11px; border-radius: 1px; background: var(--ink); }
.okr__hint { height: 16px; line-height: 16px; text-align: right; }

.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(21, 23, 28, 0.3)); z-index: 5; }

@media (max-width: 350px) {
  .okr { padding: 14px 14px 10px; gap: 10px; }
  .okr__title { font-size: 17px; line-height: 20px; }
  .okr__key { display: none; }
  .okr__foot { justify-content: flex-end; }
}
@media (max-height: 380px) {
  .okr { gap: 8px; padding-top: 12px; padding-bottom: 8px; }
  .okr__kr { padding-top: 5px; padding-bottom: 7px; gap: 5px; }
  .okr__in { gap: 5px; }
  .okr__foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .okr__status, .okr__arc, .okr__fill i, .okr__tick, .okr__kr { transition: none; }
}
