:root {
  --fondo: #ffffff;
  --inchiostro: #141416;
  --grigio: #71717a;
  --grigio-chiaro: #a1a1aa;
  --linea: #e7e7ea;
  --campo: #f4f4f5;
  --accento: #17a05d;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

p { margin: 0; }

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

/* the frame keeps the size of the open thread: when the comment is gone the button glides to its centre */
.frame {
  position: relative;
  width: min(340px, 92vw);
  height: 204px;
  display: grid;
  align-items: center;
}
.col { display: grid; gap: 14px; }

.slot { position: relative; }

/* the comment card */
.card {
  position: relative;
  padding: 14px 14px 13px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--linea), 0 1px 2px rgba(20, 20, 22, 0.04), 0 12px 28px -18px rgba(20, 20, 22, 0.28);
  overflow: hidden;
  display: grid;
  gap: 8px;
  transition: box-shadow 0.25s;
  z-index: 1;
}
.card.is-hover { box-shadow: 0 0 0 1px #d9d9de, 0 1px 2px rgba(20, 20, 22, 0.05), 0 16px 32px -18px rgba(20, 20, 22, 0.34); }
.card.is-warn { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accento) 45%, #fff), 0 0 0 4px color-mix(in srgb, var(--accento) 10%, transparent), 0 12px 28px -18px rgba(20, 20, 22, 0.28); }

.card__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.av { width: 30px; height: 30px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px rgba(20, 20, 22, 0.06); }
.av svg { width: 30px; height: 30px; display: block; }
.card__who { display: flex; align-items: baseline; gap: 7px; min-width: 0; white-space: nowrap; }
.card__who b { font-size: 13.5px; font-weight: 640; letter-spacing: -0.005em; }
.card__who time { font-size: 12.5px; color: var(--grigio-chiaro); font-weight: 480; }
.card__tag {
  margin-left: auto;
  flex: none;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--campo);
  font-size: 11.5px;
  font-weight: 560;
  color: var(--grigio);
  line-height: 22px;
  white-space: nowrap;
}

.card__text {
  font-size: 14px;
  line-height: 20px;
  font-weight: 460;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 40px;
}

.card__replies {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 40px;
  height: 22px;
  font-size: 12.5px;
  white-space: nowrap;
}
.mini { position: relative; width: 34px; height: 20px; flex: none; }
.mini__av {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  overflow: hidden;
}
.mini__av svg { width: 100%; height: 100%; display: block; }
.mini__av--a { left: 0; background: #ffd9c7; z-index: 2; }
.mini__av--b { left: 13px; background: #cfe3ff; }
.card__count { font-weight: 600; color: var(--grigio); transition: color 0.2s; }
.card.is-hover .card__count { color: var(--inchiostro); }
.card__last { color: var(--grigio-chiaro); overflow: hidden; text-overflow: ellipsis; }

/* the button row */
.row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.resolve {
  position: relative;
  height: 60px;
  padding: 0 24px 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--inchiostro);
  font: inherit;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  isolation: isolate;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.resolve:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.resolve__bg, .resolve__fill { position: absolute; inset: 0; border-radius: inherit; z-index: -1; }
.resolve__bg {
  background: #fff;
  box-shadow: 0 0 0 1px var(--linea), 0 1px 2px rgba(20, 20, 22, 0.06), 0 10px 22px -14px rgba(20, 20, 22, 0.35);
  transition: box-shadow 0.25s;
}
.resolve.is-hover .resolve__bg { box-shadow: 0 0 0 1px #d4d4d8, 0 1px 2px rgba(20, 20, 22, 0.08), 0 14px 26px -14px rgba(20, 20, 22, 0.42); }
.resolve.is-down .resolve__bg { box-shadow: 0 0 0 1px #d4d4d8, 0 1px 1px rgba(20, 20, 22, 0.1), 0 4px 10px -8px rgba(20, 20, 22, 0.4); }
.resolve__fill { background: var(--accento); clip-path: circle(0% at 29px 50%); }

.resolve__ico { position: relative; width: 22px; height: 22px; flex: none; }
.resolve__ico svg { position: absolute; inset: 0; width: 22px; height: 22px; overflow: visible; }
.ring { fill: none; stroke: currentColor; stroke-width: 1.7; }
.tick { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12; stroke-dashoffset: 12; }

.labels { position: relative; display: block; height: 22px; overflow: hidden; }
.label {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 22px;
  white-space: nowrap;
  font-stretch: 100%;
  opacity: 0;
}
.label[data-l="resolve"] { opacity: 1; }

/* the small Undo that pops out beside it */
.undo-slot { position: relative; width: 0; height: 44px; flex: none; z-index: 1; }
.undo {
  position: absolute;
  left: 10px;
  top: 0;
  height: 44px;
  padding: 0 15px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--campo);
  color: var(--inchiostro);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s;
}
.undo.is-hover { background: #e9e9ec; }
.undo:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.undo svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

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

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  fill: #111113;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

@media (hover: hover) {
  .undo:hover { background: #e9e9ec; }
}

@media (max-width: 360px) {
  .card__tag { display: none; }
}
