.panel-tasks {
  grid-area: tasks;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 28px;
  align-self: stretch;
}

.ivy-row,
.ivy-actions,
.ivy-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ivy-title-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.ivy-note {
  margin: 0;
  color: rgba(242, 244, 241, 0.9);
  max-width: 100%;
  font-size: clamp(0.76rem, 0.88vw, 0.86rem);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ivy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.tasks-foot {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding-top: 2px;
  margin-top: auto;
}

.tasks-foot .button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--accent-strong) 72%, rgba(137, 146, 139, 0.82));
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.tasks-foot .button:hover,
.tasks-foot .button:focus-visible {
  color: var(--accent-strong);
  box-shadow: none;
}

.ivy-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ivy-item.is-focus-slot {
  margin: 0 -10px;
  padding: 14px 10px;
  position: relative;
  border-bottom-color: transparent;
  border-radius: 0;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  box-shadow: none;
}

.ivy-item:has(+ .ivy-item.is-focus-slot) {
  border-bottom-color: transparent;
}

.ivy-item.is-empty {
  opacity: 0.76;
}

.ivy-item.is-empty .ivy-row {
  gap: 0;
}

.ivy-item.is-empty .check-button {
  display: none;
}

.ivy-item.is-empty .ivy-toggle {
  display: none;
}

.ivy-item.is-empty .drag-handle {
  display: none;
}

.ivy-item.is-empty .ivy-copy {
  width: 100%;
}

.ivy-item.is-empty .ivy-title-input {
  color: rgba(242, 244, 241, 0.5);
}

.ivy-item.is-empty .ivy-title-input::placeholder {
  color: rgba(137, 146, 139, 0.42);
}

.ivy-item.is-empty .ivy-title-input:disabled {
  color: rgba(137, 146, 139, 0.34);
  cursor: default;
}

.ivy-item.is-active {
  border-bottom-color: color-mix(in srgb, var(--accent-strong) 55%, transparent);
}

.ivy-item.is-done .ivy-title-input {
  text-decoration: line-through;
  opacity: 0.7;
}

.ivy-item.is-dragging {
  opacity: 0.45;
}

.ivy-item.drop-target {
  border-bottom-color: var(--accent-strong);
}

.ivy-tools {
  flex: 0 0 auto;
  gap: 8px;
}

.ivy-move {
  display: none;
  align-items: center;
  gap: 6px;
}

.check-button {
  margin-top: 0;
  border: 1px solid var(--line-strong);
}

.drag-handle,
.check-button,
.ivy-toggle,
.ivy-delete,
.ivy-move-up,
.ivy-move-down {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
}

.drag-handle,
.check-button,
.ivy-toggle,
.ivy-move-up,
.ivy-move-down {
  color: var(--muted);
}

.drag-handle svg,
.check-button svg,
.ivy-toggle svg,
.ivy-delete svg,
.ivy-move-up svg,
.ivy-move-down svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drag-handle {
  border-color: transparent;
  color: rgba(137, 146, 139, 0.72);
}

.drag-handle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

.check-button.is-done {
  border-color: transparent;
  background: var(--accent);
  color: var(--text);
}

.ivy-toggle {
  border-color: transparent;
  background: var(--accent);
  color: var(--text);
}

.ivy-toggle:hover {
  background: var(--accent-strong);
}

.ivy-toggle.is-running {
  background: color-mix(in srgb, var(--accent-strong) 82%, black);
  color: var(--text);
}

.ivy-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.ivy-title-input {
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.ivy-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: "Roboto Mono", monospace;
  font-size: 0.82rem;
}

.ivy-actions {
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 140ms ease;
}

.ivy-item:hover .ivy-actions,
.ivy-item:focus-within .ivy-actions {
  opacity: 1;
}

.ivy-actions[hidden],
.drag-handle[hidden],
.ivy-move[hidden],
.ivy-meta[hidden],
.check-button[hidden],
.ivy-toggle[hidden] {
  display: none;
}

.ivy-delete {
  color: var(--muted);
}

@media (max-width: 640px) {
  .ivy-row {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .drag-handle {
    display: none;
  }

  .ivy-move {
    display: inline-flex;
  }

  .ivy-note {
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: normal;
  }

  .ivy-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: auto;
  }
}
