/* "Cut the Crap™": a tiny UX-writing toy on the home board (js/cut-the-crap.js). Overcomplicated interface copy goes in, clear microcopy comes out.
   It looks like a green section in a design tool: a mint fill with a thin soft-green stroke, a light card inside and a green name tag. */
.cut-crap {
  --mint: #dff3e7; /* the section */
  --mint-light: #f3fcf7; /* the card inside it */
  --mint-tag: #97e0b8; /* the green tags */
  --mint-edge: #6cc79b;
  --mint-ink: #123a27;
  --stroke: #b2dfc6; /* the thin outline around the section */
  --focus: #1f7a4d;
  position: absolute;
  left: 460px; /* the upper-left of the board, in the open area to the left of the title and above the Michael Scott sticker: found by dragging the board to the right */
  top: 930px; /* (a little higher than before, to leave room for the pink character below it) */
  z-index: 2;
  box-sizing: border-box;
  width: 272px;
  padding: 12px;
  background: var(--mint);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  user-select: none;
  -webkit-user-select: none;
}

.cut-crap__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

/* the name tag, like a section's label */
.cut-crap__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border: 1px solid var(--mint-edge);
  border-radius: 8px;
  background: var(--mint-tag);
  color: var(--mint-ink);
}

.cut-crap__scissors {
  flex: none;
  width: 14px;
  height: 14px;
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.cut-crap.is-cut .cut-crap__scissors {
  transform: rotate(-20deg);
}

.cut-crap__title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.005em;
}

.cut-crap__shuffle {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4d7360;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.3s ease;
}

.cut-crap__shuffle svg {
  width: 15px;
  height: 15px;
}

.cut-crap__shuffle:hover {
  background: rgba(18, 58, 39, 0.1);
  color: var(--mint-ink);
}

.cut-crap__shuffle:active {
  transform: rotate(180deg);
}

/* the text: the room is reserved for the longest example, so nothing moves when it changes */
.cut-crap__stage {
  display: flex;
  align-items: center;
  min-height: 102px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mint-light);
}

.cut-crap__text {
  margin: 0;
  width: 100%;
  transition: opacity 0.16s ease, filter 0.16s ease, transform 0.16s ease;
}

.cut-crap__text.is-swapping {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(3px);
}

.cut-crap__text.is-crap {
  font-size: 0.76rem;
  line-height: 1.45;
  color: #4b6659;
}

.cut-crap__text.is-clean {
  font-size: 1.6rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--mint-ink);
}

.cut-crap__btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #1c1b19;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.cut-crap__btn:hover {
  background: #34322e;
}

.cut-crap__btn:active {
  transform: scale(0.97);
}

.cut-crap__btn:focus-visible,
.cut-crap__shuffle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cut-crap__caption {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: #4d7360;
}

@media (prefers-reduced-motion: reduce) {
  .cut-crap__text,
  .cut-crap__scissors,
  .cut-crap__shuffle,
  .cut-crap__btn {
    transition: none;
  }
}

/* phones and tablets get the simpler home page without it */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  body.home .cut-crap {
    display: none;
  }
}
