.guided-task {
  margin: 12px 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  border: 2px solid #8fc8d6;
  border-radius: 18px;
  background: #dff2f7;
  scroll-margin-top: 152px;
}

.guided-task-tools {
  display: grid;
  gap: 7px;
}

.guided-task-number {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.guided-restart-button {
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.guided-restart-button:hover,
.guided-restart-button:focus-visible {
  color: var(--ink);
}

.guided-task h2 {
  margin: 0 0 5px;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.guided-task p,
.guided-task ol,
.guided-task ul {
  margin: 0;
}

.guided-task ol,
.guided-task ul {
  padding-left: 1.3rem;
}

.guided-task li + li {
  margin-top: 4px;
}

.guided-task.guided-final-task {
  margin-top: 18px;
  border-color: #8fc8d6;
  background: #dff2f7;
  box-shadow: 0 12px 28px rgba(73, 123, 142, 0.12);
}

.guided-final-task .guided-task-number {
  background: var(--ink);
}

.guided-final-task h2::before {
  content: "Zum Abschluss · ";
  color: var(--blue);
  font-size: 0.76em;
  font-weight: 900;
  letter-spacing: 0.025em;
}

.guided-actions {
  margin: 12px 0 18px;
  display: flex;
  justify-content: flex-end;
}

.guided-actions .button {
  min-height: 46px;
}

.guided-summary {
  margin: 2px 0 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #b9dc8d;
  border-radius: 16px;
  background: var(--green-soft);
}

.guided-summary > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guided-summary p {
  margin: 0;
}

.guided-checkmark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--ink);
  font-weight: 950;
}

.guided-current-task[data-just-opened="true"] {
  animation: guided-module-task-in 240ms ease both;
}

@keyframes guided-module-task-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
  .guided-task {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .guided-task-tools {
    width: fit-content;
  }
}

@media (max-width: 600px) {
  .guided-task,
  .guided-summary {
    padding: 13px;
  }

  .guided-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .guided-summary .button,
  .guided-actions .button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guided-current-task[data-just-opened="true"] {
    animation: none;
  }
}
